(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-524c254e"],{"0c9b":function(t,e,s){"use strict";var o=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"el-fade-in"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.toTopShow,expression:"toTopShow"}],staticClass:"page-up",on:{click:t.scrollToTop}},[e("van-icon",{staticStyle:{margin:"10%"},attrs:{name:"back-top",color:"#f9fafb",size:"2rem"}})],1)])},a=[],n={name:"pageup",data:function(){return{toTopShow:!0}},created:function(){},mounted:function(){this.$nextTick((function(){window.addEventListener("scroll",this.handleScroll,!0)}))},destroyed:function(){window.removeEventListener("scroll",this.handleScroll,!0)},methods:{handleScroll:function(){this.scrollTop=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,this.scrollTop>0?this.toTopShow=!0:this.toTopShow=!1},scrollToTop:function(){var t=null,e=this;cancelAnimationFrame(t),t=requestAnimationFrame((function s(){e.scrollTop>1e3||e.scrollTop>1e3&&e.scrollTop<=5e3||e.scrollTop>200&&e.scrollTop<=1e3||e.scrollTop>50&&e.scrollTop<=200||e.scrollTop>0&&e.scrollTop<=50?(e.scrollTop-=0,document.documentElement.scrollTop=0,window.pageYOffset=0,document.body.scrollTop=0,t=requestAnimationFrame(s)):(cancelAnimationFrame(t),e.toTopShow=!1)}))}}},r=n,i=(s("9d9b"),s("2877")),l=Object(i["a"])(r,o,a,!1,null,"03d30358",null);e["a"]=l.exports},"3c72":function(t,e,s){"use strict";s.d(e,"b",(function(){return a})),s.d(e,"a",(function(){return n}));var o=s("a77d");function a(t){return Object(o["a"])({url:"orders",method:"get",params:t})}function n(t){return Object(o["a"])({url:"orders/".concat(t),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")},"9d9b":function(t,e,s){"use strict";s("daa2")},daa2:function(t,e,s){},e562:function(t,e,s){"use strict";s.r(e);var o=function(){var t=this,e=t._self._c;return e("div",[e("van-tabs",{staticClass:"shadow",attrs:{"before-change":t.beforeChange,sticky:""},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},[e("van-tab",{attrs:{title:"待确认",name:"0",to:{path:"/orders",query:{tabIndex:0}},re:"",lace:""}}),e("van-tab",{attrs:{title:"处理中",name:"1",to:{path:"/orders",query:{tabIndex:1}},replace:""}}),e("van-tab",{attrs:{title:"已完成",name:"2",to:{path:"/orders",query:{tabIndex:2}},replace:""}})],1),e("van-search",{attrs:{shape:"round",placeholder:"请输入客户姓名或手机"},on:{search:function(e){return t.beforeChange(t.tabIndex)},clear:function(e){return t.beforeChange(t.tabIndex)}},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,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,o){return e("div",{key:o,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",[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))]),s.leader?e("div",{staticClass:"pb-1 flex items-cente text-yellow-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(),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("故障图片:")])]),e("div",{staticClass:"pb-1"},t._l(s.pics,(function(o,a){return e("van-image",{key:a,staticClass:"mr-1 border border-gray-100",attrs:{src:o,width:"5rem",height:"5rem"},on:{click:function(e){return t.preview(s.pics,a)}}})})),1),e("div",{staticClass:"text-right"},[e("van-button",{staticClass:"ml-2",attrs:{plain:"",type:"info",to:"/orders/"+s.id+"/info",size:"small"}},[t._v("报修进度")])],1)])})),0),e("ScrollTop")],1)},a=[],n=(s("4662"),s("28a2")),r=(s("c975"),s("14d9"),s("3c72")),i=s("0c9b"),l={name:"OrderList",components:{ScrollTop:i["a"]},data:function(){return{keyword:"",loadingFinish:!1,loadingConfirm:!1,showEmpty:!1,orderList:[],loading:!1,error:!1,page:1,finished:!1,tabIndex:0}},created:function(){this.$route.query&&this.$route.query.tabIndex>=0&&(this.tabIndex=this.$route.query.tabIndex)},beforeRouteEnter:function(t,e,s){s((function(t){t.$store.commit("keepAlive/add","OrderList"),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","OrderList")),s()},methods:{preview:function(t,e){Object(n["a"])({images:t,startPosition:e,closeable:!0})},beforeChange:function(t){return this.finished=!1,this.loading=!1,this.error=!1,this.page=1,this.orderList=[],this.tabIndex=t,this.loadOrderList(),!0},loadOrderList:function(){var t=this;this.loading=!0,Object(r["b"])({tab_index:this.tabIndex,page:this.page++,keyword:this.keyword}).then((function(e){for(var s in t.loading=!1,e.data.length