1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-513b9ab0"],{3266:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n("4160"),n("b64b"),n("d3b7"),n("e25e"),n("4d63"),n("ac1f"),n("25f0"),n("4d90"),n("5319"),n("159b");var i=n("53ca");function r(t,e){if(0===arguments.length||!t)return null;var n,r=e||"{y}-{m}-{d} {h}:{i}:{s}";"object"===Object(i["a"])(t)?n=t:("string"===typeof t&&(t=/^[0-9]+$/.test(t)?parseInt(t):t.replace(new RegExp(/-/gm),"/")),"number"===typeof t&&10===t.toString().length&&(t*=1e3),n=new Date(t));var o={y:n.getFullYear(),m:n.getMonth()+1,d:n.getDate(),h:n.getHours(),i:n.getMinutes(),s:n.getSeconds(),a:n.getDay()},a=r.replace(/{([ymdhisa])+}/g,(function(t,e){var n=o[e];return"a"===e?["日","一","二","三","四","五","六"][n]:n.toString().padStart(2,"0")}));return a}},3408:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"f",(function(){return c})),n.d(e,"e",(function(){return s})),n.d(e,"b",(function(){return u}));var i=n("46ac");function r(t){return Object(i["a"])({url:"orders",method:"get",params:t})}function o(t){return Object(i["a"])({url:"orders/".concat(t),method:"get"})}function a(t){return Object(i["a"])({url:"orders/".concat(t,"/confirm"),method:"post"})}function c(t,e){return Object(i["a"])({url:"orders/".concat(t,"/schedule"),method:"post",data:e})}function s(t,e){return Object(i["a"])({url:"orders/".concat(t,"/repair"),method:"post",data:e})}function u(t){return Object(i["a"])({url:"orders/".concat(t,"/finish"),method:"post"})}},"4de4":function(t,e,n){"use strict";var i=n("23e7"),r=n("b727").filter,o=n("1dde"),a=n("ae40"),c=o("filter"),s=a("filter");i({target:"Array",proto:!0,forced:!c||!s},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},e7a9:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("van-nav-bar",{staticClass:"shadow",attrs:{title:"提交上门时间","left-text":"返回","left-arrow":""},on:{"click-left":function(e){return t.$router.back(-1)}}}),n("van-form",{staticClass:"w-11/12 mx-auto mt-4",on:{submit:t.onSubmit}},[n("div",{staticClass:"bg-white shadow"},[n("van-cell",{attrs:{title:"选择上门日期",value:t.timeForm.date},on:{click:function(e){t.showPicker=!0}}}),n("van-popup",{attrs:{position:"bottom"},model:{value:t.showPicker,callback:function(e){t.showPicker=e},expression:"showPicker"}},[n("van-datetime-picker",{attrs:{type:"datetime",title:"选择完整时间","min-date":t.minDate,filter:t.filter},on:{confirm:t.onConfirm,cancel:function(e){t.showPicker=!1}}})],1)],1),n("div",{staticClass:"mt-8"},[n("van-button",{attrs:{loading:t.submitLoading,block:"",type:"info","loading-text":"加载中...","native-type":"submit"}},[t._v("确认提交")])],1)])],1)},r=[],o=(n("4de4"),n("3408")),a=n("3266"),c={data:function(){return{minDate:"",showPicker:!1,timeForm:{date:""},id:0,submitLoading:!1}},created:function(){this.$route.params&&this.$route.params.id&&(this.id=this.$route.params.id),this.minDate=new Date,this.minDate.setTime(this.minDate.getTime()+72e5),this.minDate.setMinutes(0,0,0)},methods:{onConfirm:function(t){this.timeForm.date=Object(a["a"])(t,"{y}-{m}-{d} {h}:{i}"),this.showPicker=!1},filter:function(t,e){return"minute"===t?e.filter((function(t){return t%30===0})):e},onSubmit:function(){var t=this;this.submitLoading=!0,Object(o["f"])(this.id,this.timeForm).then((function(){t.$toast.success({message:"操作成功",duration:1e3,onClose:function(){t.$router.back(-1)}})})).catch((function(){t.submitLoading=!1}))}}},s=c,u=n("2877"),d=Object(u["a"])(s,i,r,!1,null,null,null);e["default"]=d.exports}}]);
|