chunk-5718c36a.0d6f9821.js 6.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5718c36a"],{"1a9e":function(t,e,s){"use strict";s.r(e);var a=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}},replace:""}}),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-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,a){return e("div",{key:a,staticClass:"bg-white mb-4 w-11/12 p-4 mx-auto text-sm shadow"},[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+" 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"},[e("span",{staticClass:"font-bold"},[t._v("联系电话:")]),t._v(t._s(s.link_phone)+" ")]),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-center"},[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(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.revoke?e("van-button",{staticClass:"ml-2",attrs:{type:"warning",size:"small",to:"/orders/"+s.id+"/revoke"}},[t._v("撤销报修")]):t._e(),s.auth.confirm?e("van-button",{staticClass:"ml-2",attrs:{type:"danger",size:"small",to:"/orders/"+s.id+"/comment"}},[t._v("确认完成")]):t._e(),e("van-button",{staticClass:"ml-2",attrs:{type:"info",size:"small",to:"/orders/"+s.id+"/info"}},[t._v("报修进度")])],1)])})),0)],1)},n=[],i=(s("4662"),s("28a2")),o={data:function(){return{orderList:[],loading:!1,error:!1,page:1,tabIndex:0,finished:!1,showEmpty:!1}},created:function(){this.$route.query&&this.$route.query.tabIndex>=0&&(this.tabIndex=this.$route.query.tabIndex),console.log(this.tabIndex)},methods:{preview:function(t,e){Object(i["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(){0==this.tabIndex?this.orderList=[{id:0,order_no:"100000000000000000",main_type:0,sub_type:0,type:"XX/XXX",link_name:"客户",link_phone:"13000000000",address:"联发广场 X-X-XXXX",content:"XXXXXXXXXXXXXXXXXXX",pics:["https://image.nczyzs.com/17111796835249483636614200244.jpg","https://image.nczyzs.com/17124067795563612565117412409.jpg","https://image.nczyzs.com/17107371559867504924763436260.jpg"],comment_id:0,state:30,state_name:"待维修",state_color:"blue-500",auth:{revoke:!1,confirm:!1,comment:!1},created_at:(new Date).getFullYear()+"-"+((new Date).getMonth()+1)+"-"+(new Date).getDate(),leader:797,leader_info:{id:797,username:"XXX",phone:"15000000000"}}]:1==this.tabIndex?this.orderList=[{id:1,order_no:"100000000000000000",main_type:0,sub_type:0,type:"XX/XXX",link_name:"客户",link_phone:"13000000000",address:"联发广场 X-X-XXXX",content:"XXXXXXXXXXXXXXXXXXX",pics:["https://image.nczyzs.com/17111796835249483636614200244.jpg","https://image.nczyzs.com/17124067795563612565117412409.jpg","https://image.nczyzs.com/17107371559867504924763436260.jpg"],comment_id:0,state:50,state_name:"维修中",state_color:"indigo-500",auth:{revoke:!1,confirm:!0,comment:!1},created_at:(new Date).getFullYear()+"-"+((new Date).getMonth()+1)+"-"+(new Date).getDate(),leader:799,leader_info:{id:799,username:"XXX",phone:"15000000000"}}]:this.orderList=[{id:2,order_no:"100000000000000000",main_type:0,sub_type:0,type:"XX/XXX",link_name:"客户",link_phone:"13000000000",address:"联发广场 X-X-XXXX",content:"XXXXXXXXXXXXXXXXXXX",pics:["https://image.nczyzs.com/17111796835249483636614200244.jpg","https://image.nczyzs.com/17124067795563612565117412409.jpg","https://image.nczyzs.com/17107371559867504924763436260.jpg"],comment_id:886,state:70,state_name:"已确认",state_color:"green-500",auth:{revoke:!1,confirm:!1,comment:!1},created_at:(new Date).getFullYear()+"-"+((new Date).getMonth()+1)+"-"+(new Date).getDate(),leader:799,leader_info:{id:799,username:"XXX",phone:"15000000000"}}],this.finished=!0}}},r=o,d=s("2877"),l=Object(d["a"])(r,a,n,!1,null,null,null);e["default"]=l.exports},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")}}]);