1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1bbc1964"],{3408:function(t,s,e){"use strict";e.d(s,"d",(function(){return n})),e.d(s,"c",(function(){return i})),e.d(s,"a",(function(){return r})),e.d(s,"f",(function(){return o})),e.d(s,"e",(function(){return c})),e.d(s,"b",(function(){return l}));var a=e("46ac");function n(t){return Object(a["a"])({url:"orders",method:"get",params:t})}function i(t){return Object(a["a"])({url:"orders/".concat(t),method:"get"})}function r(t){return Object(a["a"])({url:"orders/".concat(t,"/confirm"),method:"post"})}function o(t,s){return Object(a["a"])({url:"orders/".concat(t,"/schedule"),method:"post",data:s})}function c(t,s){return Object(a["a"])({url:"orders/".concat(t,"/repair"),method:"post",data:s})}function l(t){return Object(a["a"])({url:"orders/".concat(t,"/finish"),method:"post"})}},4662:function(t,s,e){"use strict";e("68ef"),e("a71a"),e("9d70"),e("3743"),e("09fe"),e("4d75"),e("e3b3"),e("8270"),e("786d"),e("504b")},d225:function(t,s,e){"use strict";e.d(s,"a",(function(){return n})),e.d(s,"b",(function(){return i}));var a=e("46ac");function n(){return Object(a["a"])({url:"statis/comment",method:"get"})}function i(){return Object(a["a"])({url:"statis/order",method:"get"})}},f447:function(t,s,e){"use strict";e.r(s);var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[t._m(0),e("div",{staticClass:"bg-white w-11/12 px-4 py-6 mx-auto shadow rounded relative -top-20"},[e("div",{staticClass:"border-b pb-4 flex justify-between items-center"},[e("div",{staticClass:"flex items-center"},[e("van-icon",{attrs:{size:"20",name:"bar-chart-o"}}),e("span",{staticClass:"pl-1"},[t._v("工单数统计")])],1),e("div",[t._v("今日工单:"+t._s(t.statisOrder.day_num))])]),e("div",{staticClass:"flex justify-between items-center pt-4"},[e("router-link",{staticClass:"flex flex-col text-center",attrs:{to:{path:"/orders",query:{tabIndex:0}}}},[e("span",{staticClass:"font-bold text-4xl text-yellow-600"},[t._v(t._s(t.statisOrder.confirm))]),e("span",{staticClass:"text-sm pt-1 max-w-xs"},[t._v("待确认")])]),e("router-link",{staticClass:"flex flex-col text-center",attrs:{to:{path:"/orders",query:{tabIndex:1}}}},[e("span",{staticClass:"font-bold text-4xl text-red-600"},[t._v(t._s(t.statisOrder.repairing))]),e("span",{staticClass:"text-sm pt-1 max-w-xs"},[t._v("处理中")])]),e("router-link",{staticClass:"flex flex-col text-center",attrs:{to:{path:"/orders",query:{tabIndex:2}}}},[e("span",{staticClass:"font-bold text-4xl text-green-600"},[t._v(t._s(t.statisOrder.repaired))]),e("span",{staticClass:"text-sm pt-1 max-w-xs"},[t._v("已完成")])])],1)]),e("van-empty",{directives:[{name:"show",rawName:"v-show",value:t.showEmpty,expression:"showEmpty"}],attrs:{description:"暂无订单"}}),e("van-list",{staticClass:"mt-4",attrs:{finished:t.finished,error:t.error,"error-text":"请求失败,点击重新加载","finished-text":""},on:{"update:error":function(s){t.error=s},load:t.loadOrderList},model:{value:t.loading,callback:function(s){t.loading=s},expression:"loading"}},t._l(t.orderList,(function(s,a){return e("div",{key:a,staticClass:"bg-white mb-4 w-11/12 p-4 mx-auto text-sm shadow rounded relative -top-16"},[e("div",{staticClass:"pb-2 flex items-center justify-between border-b mb-2"},[e("span",[e("span",{staticClass:"font-bold"},[t._v("工单编号:")]),t._v(t._s(s.order_no))]),e("span",{class:"text-"+s.state_color+" px-2 py-1 rounded-sm"},[t._v(t._s(s.state_name))])]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("报修时间:")]),t._v(t._s(s.created_at))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("报修姓名:")]),t._v(t._s(s.link_name))]),e("div",{staticClass:"pb-1 flex items-center"},[e("span",{staticClass:"font-bold"},[t._v("联系电话:")]),e("span",{staticClass:"flex items-center"},[e("span",{staticClass:"pr-2"},[t._v(t._s(s.link_phone))]),e("a",{staticClass:"flex",attrs:{href:"tel:"+s.link_phone}},[e("van-icon",{attrs:{name:"phone",size:"22",color:"#009688"}})],1)])]),e("div",{staticClass:"pb-1 text-red-600"},[e("span",{staticClass:"font-bold"},[t._v("是否保修:")]),e("span",[t._v(t._s(s.warranty_period))])]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("报修地址:")]),t._v(t._s(s.address))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("故障类型:")]),t._v(t._s(s.type))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("故障描述:")]),t._v(t._s(s.content))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("故障图片:")])]),e("div",{staticClass:"pb-1"},t._l(s.pics,(function(a,n){return e("van-image",{key:n,staticClass:"mr-1 border border-gray-100",attrs:{src:a,width:"5rem",height:"5rem"},on:{click:function(e){return t.preview(s.pics,n)}}})})),1),e("div",{staticClass:"text-right"},[s.auth.sup_confirm?e("van-button",{staticClass:"ml-2",attrs:{loading:t.loadingConfirm,type:"primary",size:"small"},on:{click:function(e){return t.handleConfirm(s.id)}}},[t._v("立即确认")]):t._e(),s.auth.repairing?e("van-button",{staticClass:"ml-2",attrs:{type:"info",size:"small",to:"/orders/"+s.id+"/schedule"}},[t._v("提交上门时间")]):t._e(),s.auth.feedback?e("van-button",{staticClass:"ml-2",attrs:{type:"warning",size:"small",to:"/orders/"+s.id+"/repair"}},[t._v("维修反馈")]):t._e(),s.auth.repaired?e("van-button",{staticClass:"ml-2",attrs:{loading:t.loadingFinish,type:"danger",size:"small"},on:{click:function(e){return t.handleFinish(s.id)}}},[t._v("提交业主")]):t._e(),e("van-button",{staticClass:"ml-2",attrs:{plain:"",type:"info",to:"/orders/"+s.id+"/info",size:"small"}},[t._v("报修进度")])],1)])})),0)],1)},n=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"h-48 bg-green-500"},[e("p",{staticClass:"text-white text-xl pt-12 w-11/12 mx-auto font-bold text-center"},[t._v("志远报修平台(监理端)")])])}],i=(e("4662"),e("28a2")),r=e("3408"),o=e("d225"),c={data:function(){return{showEmpty:!1,loadingFinish:!1,loadingConfirm:!1,loading:!1,orderList:[],error:!1,page:1,statisOrder:{},finished:!1}},created:function(){this.loadOrderStatis()},methods:{preview:function(t,s){Object(i["a"])({images:t,startPosition:s})},loadOrderStatis:function(){var t=this;Object(o["b"])().then((function(s){t.statisOrder=s.data}))},handleConfirm:function(t){var s=this;this.loadingConfirm=!0,Object(r["a"])(t).then((function(t){s.$toast("操作成功"),s.refresh(),s.loadingConfirm=!1})).catch((function(){s.loadingConfirm=!1}))},refresh:function(){return this.finished=!1,this.loading=!1,this.error=!1,this.page=1,this.orderList=[],this.loadOrderList(),!0},handleFinish:function(t){var s=this;this.$dialog.confirm({title:"提示",message:"确认提交维修信息给业主?"}).then((function(){s.loadingFinish=!0,Object(r["b"])(t).then((function(t){s.$toast("操作成功"),s.refresh(),s.loadingFinish=!1})).catch((function(){s.loadingFinish=!1}))})).catch((function(t){console.log(t)}))},loadOrderList:function(){var t=this;this.loading=!0,Object(r["d"])({tab_index:-1,page:this.page++}).then((function(s){for(var e in t.loading=!1,s.data.length<t.$store.getters.setting.page_size&&(t.finished=!0),s.data)t.orderList.push(s.data[e]);0===t.orderList.length?t.showEmpty=!0:t.showEmpty=!1})).catch((function(){t.loading=!1,t.error=!0}))}}},l=c,d=e("2877"),u=Object(d["a"])(l,a,n,!1,null,null,null);s["default"]=u.exports}}]);
|