chunk-0d9c9802.ccfe040f.js 10 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0d9c9802"],{"083a":function(t,e,s){"use strict";var a=s("0d51"),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+a(e)+" of "+a(t))}},3658:function(t,e,s){"use strict";s.d(e,"a",(function(){return i})),s.d(e,"b",(function(){return r})),s.d(e,"c",(function(){return n}));var a=s("be40");function i(){return Object(a["a"])({url:"statis/comment",method:"get"})}function r(){return Object(a["a"])({url:"statis/order",method:"get"})}function n(){return Object(a["a"])({url:"statis/repair",method:"get"})}},4662:function(t,e,s){"use strict";s("68ef"),s("a71a"),s("9d70"),s("3743"),s("09fe"),s("4d75"),s("e3b3"),s("8270"),s("786d"),s("504b")},a434:function(t,e,s){"use strict";var a=s("23e7"),i=s("7b0b"),r=s("23cb"),n=s("5926"),o=s("07fa"),c=s("3a34"),d=s("3511"),l=s("65f0"),u=s("8418"),h=s("083a"),p=s("1dde"),f=p("splice"),v=Math.max,m=Math.min;a({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var s,a,p,f,_,b,g=i(this),y=o(g),C=r(t,y),w=arguments.length;for(0===w?s=a=0:1===w?(s=0,a=y-C):(s=w-2,a=m(v(n(e),0),y-C)),d(y+s-a),p=l(g,a),f=0;f<a;f++)_=C+f,_ in g&&u(p,f,g[_]);if(p.length=a,s<a){for(f=C;f<y-a;f++)_=f+a,b=f+s,_ in g?g[b]=g[_]:h(g,b);for(f=y;f>y-a+s;f--)h(g,f-1)}else if(s>a)for(f=y-a;f>C;f--)_=f+a-1,b=f+s-1,_ in g?g[b]=g[_]:h(g,b);for(f=0;f<s;f++)g[f+C]=arguments[f+2];return c(g,y-a+s),p}})},b0c8:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t._self._c;return e("div",[t.tabIndex>-1?e("van-tabs",{staticClass:"shadow",attrs:{sticky:""},on:{change:t.beforeChange},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},[e("van-tab",{attrs:{title:"全部 ("+t.statisRepair.all+")",name:"0",to:{path:"/repairs",query:{tabIndex:0}},replace:""}}),e("van-tab",{attrs:{title:"待审核 ("+t.statisRepair.state0+")",name:"1",to:{path:"/repairs",query:{tabIndex:1}},replace:""}}),e("van-tab",{attrs:{title:"已通过 ("+t.statisRepair.state1+")",name:"2",to:{path:"/repairs",query:{tabIndex:2}},replace:""}}),e("van-tab",{attrs:{title:"未通过 ("+t.statisRepair.state2+")",name:"3",to:{path:"/repairs",query:{tabIndex:3}},replace:""}})],1):t._e(),e("van-search",{attrs:{shape:"round",placeholder:"请输入客户姓名或手机"},on:{search:t.beforeChange,clear:t.beforeChange},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}}),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,"immediate-check":!1,error:t.error,"error-text":"请求失败,点击重新加载","finished-text":""},on:{"update:error":function(e){t.error=e},load:t.loadOrderList},model:{value:t.loading,callback:function(e){t.loading=e},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"},[e("div",{staticClass:"pb-2 flex items-center justify-between border-b mb-2"},[e("span",{staticClass:"font-bold",class:"text-"+t.audit_type_list[s.audit_type].color},[t._v(t._s(t.audit_type_list[s.audit_type].name))]),e("span",[t._v(t._s(s.order_no))]),e("span",{class:"text-"+t.audit_state_list[s.audit_state].color+" rounded-sm",staticStyle:{width:"3.7rem",height:"100%","text-align":"center",border:"1px solid","border-radius":"5%"}},[t._v(t._s(t.audit_state_list[s.audit_state].name))])]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("报修时间:")]),t._v(t._s(s.order_created_at))]),e("div",{staticClass:"pb-1 flex items-center"},[e("span",{staticClass:"font-bold"},[t._v("报修姓名:")]),e("span",{staticClass:"flex items-center"},[e("span",[t._v(t._s(s.link_name))]),s.link_phone?e("span",{staticClass:"flex items-center"},[t._v("("+t._s(s.link_phone)+")"),e("a",{staticClass:"flex items-center",attrs:{href:"tel:"+s.link_phone}},[e("van-icon",{attrs:{name:"phone",size:"22",color:"#009688"}})],1)]):t._e()])]),s.leader?e("div",{staticClass:"pb-1 flex items-center text-green-600"},[e("span",{staticClass:"font-bold"},[t._v("工程队长:")]),e("span",{staticClass:"flex items-center"},[e("span",[t._v(t._s(s.leader_info.username))]),s.leader_info.phone?e("span",{staticClass:"flex items-center"},[t._v("("+t._s(s.leader_info.phone)+")"),e("a",{staticClass:"flex items-center",attrs:{href:"tel:"+s.leader_info.phone}},[e("van-icon",{attrs:{name:"phone",size:"22",color:"#009688"}})],1)]):t._e()])]):t._e(),s.end_time?e("div",{staticClass:"pb-1 text-red-600"},[e("span",{staticClass:"font-semibold"},[t._v("维修截至时间:")]),t._v(t._s(s.end_time))]):t._e(),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.duration)+" 小时")]),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("维修结果:")]),t._v(t._s(s.state_name))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("完成时间:")]),t._v(t._s(s.finished_at))]),e("div",{staticClass:"pb-1"},[t._l(s.pic_list,(function(a,i){return["mp4"==a.split("/").pop().split(".").pop()?e("div",{key:i,staticClass:"overflow-hidden flex justify-center items-center",staticStyle:{width:"5rem",height:"5rem",display:"inline-block"}},[e("video",{staticClass:"min-w-full min-h-full",attrs:{src:a},on:{click:function(e){return t.videoPlay(a)}}},[t._v(" 您的浏览器不支持视频播放 ")])]):e("van-image",{key:i,staticClass:"mr-1 border border-gray-100",attrs:{src:a,width:"5rem",height:"5rem"},on:{click:function(e){return t.preview(s.pic_list,i)}}})]}))],2),e("div",{staticClass:"text-right"},[e("van-button",{staticClass:"ml-2",attrs:{plain:"",type:"info",to:"/orders/"+s.order_id+"/info",size:"small"}},[t._v("工单详情")])],1)])})),0),t.videoShow?e("van-overlay",{staticClass:"flex justify-center items-center",attrs:{show:t.videoShow,"z-index":"1000"}},[e("video",{staticClass:"max-w-full max-h-full",attrs:{src:t.videoUrl,controls:""}},[t._v(" 您的浏览器不支持视频播放 ")]),e("i",{staticClass:"van-icon van-icon-clear van-image-preview__close-icon van-image-preview__close-icon--top-right",attrs:{role:"button"},on:{click:function(e){t.videoShow=!1}}})]):t._e()],1)},i=[],r=(s("4662"),s("28a2")),n=(s("c975"),s("14d9"),s("a434"),s("e25e"),s("e902")),o=s("3658"),c={name:"OrderList",components:{},data:function(){return{statisRepair:{all:0,state0:0,state1:0,state2:0},loadingCheck:!1,loadingDelete:!1,keyword:"",showEmpty:!1,orderList:[],loading:!1,error:!1,page:1,finished:!1,tabIndex:0,listTypes:{1:{title:"今日工单"},2:{title:"今日回访"}},listType:0,title:"维修列表",typeList:[],typeID:0,leaderList:[],leaderID:0,videoShow:!1,videoUrl:"",checkShow:!1,checkFrom:{},audit_state_list:[{color:"indigo-500",name:"待审核"},{color:"green-500",name:"已通过"},{color:"red-500",name:"未通过"}],audit_type_list:[{color:"red-500",name:""},{color:"blue-500",name:"变更时间审核"},{color:"green-500",name:"完成审核"}]}},created:function(){this.$route.query&&this.$route.query.tabIndex>=0&&(this.tabIndex=this.$route.query.tabIndex),console.log("created"),this.loadOrderStatis(),this.loadOrderList()},activated:function(){console.log("activated")},beforeRouteEnter:function(t,e,s){s((function(t){t.$store.commit("keepAlive/add","RepairList"),console.log(t.$store.state.keepAlive.list)}))},beforeRouteLeave:function(t,e,s){["orderInfo","addVisit","editVisit","orderSuspend","orderIssue","orderAllot"].indexOf(t.name)<0&&(console.log("remove cache"),this.$store.commit("keepAlive/remove","RepairList")),s()},methods:{videoPlay:function(t){this.videoUrl=t,this.videoShow=!0},updateOrder:function(t){for(var e=this,s=-1,a=0;a<this.orderList.length;a++)this.orderList[a].id===parseInt(t)&&(s=a);if(s<0)return!1;Object(n["e"])({tab_index:this.tabIndex,keyword:this.keyword,list_type:this.listType,id:t}).then((function(t){t.data.length>0?e.orderList.splice(s,1,t.data[0]):e.orderList.splice(s,1)})),this.loadOrderStatis()},loadOrderStatis:function(){var t=this;Object(o["c"])().then((function(e){t.statisRepair=e.data}))},preview:function(t,e){Object(r["a"])({images:t,startPosition:e,closeable:!0})},beforeChange:function(){return this.finished=!1,this.loading=!1,this.error=!1,this.page=1,this.orderList=[],this.loadOrderStatis(),this.loadOrderList(),!0},loadOrderList:function(){var t=this;this.loading=!0,Object(n["e"])({audit_state:this.tabIndex,page:this.page++,keyword:this.keyword}).then((function(e){for(var s in t.loading=!1,e.data.length<t.$store.getters.setting.page_size&&(t.finished=!0),e.data)t.orderList.push(e.data[s]);0===t.orderList.length?t.showEmpty=!0:t.showEmpty=!1})).catch((function(){t.loading=!1,t.error=!0}))},handleCheck:function(t,e){this.checkFrom={id:t,state:e},this.checkShow=!0},checkCheck:function(){var t=this;this.$dialog.confirm({title:"提示",message:"确认"+(1==this.checkFrom.state?"通过":"不通过")+"审核吗?"}).then((function(){t.loadingCheck=!0,checkRepair(t.checkFrom.id,t.checkFrom).then((function(e){t.$toast("操作成功"),t.loadingCheck=!1,t.checkShow=!1,t.updateOrder(t.checkFrom.id)})).catch((function(e){console.log(e),t.loadingCheck=!1}))})).catch((function(t){console.log(t)}))}}},d=c,l=s("2877"),u=Object(l["a"])(d,a,i,!1,null,null,null);e["default"]=u.exports},e902:function(t,e,s){"use strict";s.d(e,"d",(function(){return i})),s.d(e,"c",(function(){return r})),s.d(e,"a",(function(){return n})),s.d(e,"g",(function(){return o})),s.d(e,"f",(function(){return c})),s.d(e,"b",(function(){return d})),s.d(e,"e",(function(){return l}));var a=s("be40");function i(t){return Object(a["a"])({url:"orders",method:"get",params:t})}function r(t){return Object(a["a"])({url:"orders/".concat(t),method:"get"})}function n(t){return Object(a["a"])({url:"orders/".concat(t,"/confirm"),method:"post"})}function o(t,e){return Object(a["a"])({url:"orders/".concat(t,"/schedule"),method:"post",data:e})}function c(t,e){return Object(a["a"])({url:"orders/".concat(t,"/repair"),method:"post",data:e})}function d(t){return Object(a["a"])({url:"orders/".concat(t,"/finish"),method:"post"})}function l(t){return Object(a["a"])({url:"repairs",method:"get",params:t})}}}]);