chunk-58ccaab4.f7e61ff0.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-58ccaab4"],{"083a":function(t,e,a){"use strict";var n=a("0d51"),r=TypeError;t.exports=function(t,e){if(!delete t[e])throw new r("Cannot delete property "+n(e)+" of "+n(t))}},3375:function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));a("d401"),a("4de4"),a("4160"),a("b64b"),a("d3b7"),a("4d63"),a("c607"),a("ac1f"),a("2c3e"),a("25f0"),a("4d90"),a("5319"),a("159b");function n(t,e){var a,n={"Y+":e.getFullYear().toString(),"m+":(e.getMonth()+1).toString(),"d+":e.getDate().toString(),"H+":e.getHours().toString(),"M+":e.getMinutes().toString(),"S+":e.getSeconds().toString()};for(var r in n)a=new RegExp("("+r+")").exec(t),a&&(t=t.replace(a[1],1==a[1].length?n[r]:n[r].padStart(a[1].length,"0")));return t}},4662:function(t,e,a){"use strict";a("68ef"),a("a71a"),a("9d70"),a("3743"),a("09fe"),a("4d75"),a("e3b3"),a("8270"),a("786d"),a("504b")},"4c10":function(t,e,a){"use strict";a.d(e,"g",(function(){return r})),a.d(e,"f",(function(){return s})),a.d(e,"e",(function(){return i})),a.d(e,"a",(function(){return o})),a.d(e,"j",(function(){return c})),a.d(e,"c",(function(){return d})),a.d(e,"d",(function(){return l})),a.d(e,"i",(function(){return u})),a.d(e,"k",(function(){return h})),a.d(e,"h",(function(){return f})),a.d(e,"b",(function(){return p}));var n=a("1808");function r(t){return Object(n["a"])({url:"orders",method:"get",params:t})}function s(t){return Object(n["a"])({url:"orders/".concat(t),method:"get"})}function i(t){return Object(n["a"])({url:"orders/".concat(t),method:"delete"})}function o(t,e){return Object(n["a"])({url:"orders/".concat(t,"/allot"),method:"post",data:e})}function c(t,e){return Object(n["a"])({url:"orders/".concat(t,"/allot"),method:"put",data:e})}function d(t,e){return Object(n["a"])({url:"orders/".concat(t,"/check"),method:"post",data:e})}function l(t){return Object(n["a"])({url:"orders/".concat(t,"/complete"),method:"post"})}function u(t,e){return Object(n["a"])({url:"orders/".concat(t,"/issue"),method:"post",data:e})}function h(t,e){return Object(n["a"])({url:"orders/".concat(t,"/suspend"),method:"post",data:e})}function f(t){return Object(n["a"])({url:"workorders",method:"get",params:t})}function p(t,e){return Object(n["a"])({url:"extension/".concat(t,"/check"),method:"post",data:e})}},"711e":function(t,e,a){"use strict";a.r(e);var n=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.statisExtension.all+")",name:"0",to:{path:"/repairs",query:{tabIndex:0}},replace:""}}),e("van-tab",{attrs:{title:"待审核 ("+t.statisExtension.state0+")",name:"1",to:{path:"/repairs",query:{tabIndex:1}},replace:""}}),e("van-tab",{attrs:{title:"已通过 ("+t.statisExtension.state1+")",name:"2",to:{path:"/repairs",query:{tabIndex:2}},replace:""}}),e("van-tab",{attrs:{title:"未通过 ("+t.statisExtension.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(a,n){return e("div",{key:n,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"},[t._v(t._s(a.pick_name))]),e("span",{class:"text-"+t.audit_state_list[a.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[a.audit_state].name))])]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("申请时间:")]),t._v(" "+t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*a.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(a.manager_info.username))]),e("span",{staticClass:"flex items-center"},[t._v("("+t._s(a.manager_info.phone)+")"),e("a",{staticClass:"flex items-center",attrs:{href:"tel:"+a.manager_info.phone}},[e("van-icon",{attrs:{name:"phone",size:"22",color:"#009688"}})],1)])])]),a.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(a.leader_info.username))]),a.leader_info.phone?e("span",{staticClass:"flex items-center"},[t._v("("+t._s(a.leader_info.phone)+")"),e("a",{staticClass:"flex items-center",attrs:{href:"tel:"+a.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("工地:")]),t._v(t._s(a.village))]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("类型:")]),t._v(t._s(t.extension_type[a.type])+" ")]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("天数:")]),t._v(t._s(a.duration)+" 天")]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("延期说明:")]),t._v(t._s(a.content)+" ")]),t.jsonArray(a.pictures).length>0?e("div",[e("div",{staticClass:"p-4 leading-6"},t._l(t.jsonArray(a.pictures),(function(n,r){return e("van-image",{key:r,attrs:{width:"10rem",height:"10rem",fit:"cover",src:n},on:{click:function(e){t.ImagePreview({images:t.jsonArray(a.pictures),startPosition:r,closeable:!0})}}})})),1)]):t._e(),a.audit_remark?e("div",{staticClass:"pb-1 text-red-600"},[e("span",{staticClass:"font-semibold"},[t._v("审核备注:")]),t._v(" "+t._s(a.audit_remark)+" ")]):t._e(),a.audit_at?e("div",{staticClass:"pb-1 text-red-600"},[e("span",{staticClass:"font-semibold"},[t._v("审核时间:")]),t._v(" "+t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*a.audit_at)))+" ")]):t._e(),a.finished_at?e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-semibold"},[t._v("截止时间:")]),t._v(" "+t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*a.finished_at)))+" ")]):t._e(),e("div",{staticClass:"text-right"},[0==a.audit_state?[e("van-button",{staticClass:"ml-2",attrs:{type:"primary",size:"small",loading:t.loadingCheck},on:{click:function(e){return t.handleCheck(a.id,1)}}},[t._v("通过")]),e("van-button",{staticClass:"ml-2",attrs:{type:"danger",size:"small",loading:t.loadingCheck},on:{click:function(e){return t.handleCheck(a.id,2)}}},[t._v("不通过")])]:t._e()],2)])})),0),e("van-popup",{attrs:{closeable:"",round:"",position:"bottom"},model:{value:t.checkShow,callback:function(e){t.checkShow=e},expression:"checkShow"}},[e("div",{staticClass:"mt-2 text-center leading-10 text-lg"},[t._v("审核"+t._s(1==t.checkFrom.state?"通过":"不通过"))]),e("van-field",{attrs:{rows:"1",autosize:"",label:"备注",type:"textarea",placeholder:"请输入备注"},model:{value:t.checkFrom.remark,callback:function(e){t.$set(t.checkFrom,"remark",e)},expression:"checkFrom.remark"}}),e("van-button",{attrs:{size:"large",type:"info"},on:{click:function(e){return t.checkCheck(t.checkFrom.id)}}},[t._v("提交")])],1)],1)},r=[],s=(a("4662"),a("28a2")),i=(a("c975"),a("14d9"),a("a434"),a("b64b"),a("e25e"),a("4c10")),o=a("ad7b"),c=a("3375"),d={name:"OrderList",components:{},data:function(){return{statisExtension:{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:{},extension_type:{0:"节点延期",1:"整体延期"},audit_state_list:[{color:"indigo-500",name:"待审核"},{color:"green-500",name:"已通过"},{color:"red-500",name:"未通过"}]}},created:function(){this.$route.query&&this.$route.query.tabIndex>=0&&(this.tabIndex=this.$route.query.tabIndex),this.loadOrderStatis(),this.loadOrderList()},activated:function(){console.log("activated")},beforeRouteEnter:function(t,e,a){a((function(t){t.$store.commit("keepAlive/add","RepairList"),console.log(t.$store.state.keepAlive.list)}))},beforeRouteLeave:function(t,e,a){["orderInfo","addVisit","editVisit","orderSuspend","orderIssue","orderAllot"].indexOf(t.name)<0&&(console.log("remove cache"),this.$store.commit("keepAlive/remove","RepairList")),a()},methods:{jsonArray:function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(e){return[]}return t instanceof Array?t:[]},dateFormat:c["a"],updateOrder:function(t,e){for(var a=this,n=-1,r=0;r<this.orderList.length;r++)this.orderList[r].id===parseInt(t)&&(n=r);if(n<0)return!1;Object(i["h"])({tab_index:this.tabIndex,keyword:this.keyword,list_type:this.listType,id:t}).then((function(t){t.data.length>0?a.orderList.splice(n,1,t.data[0]):a.orderList.splice(n,1)})),this.loadOrderStatis()},loadOrderStatis:function(){var t=this;Object(o["a"])().then((function(e){t.statisExtension=e.data}))},preview:function(t,e){Object(s["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.loadOrderList(),!0},loadOrderList:function(){var t=this;this.loading=!0,Object(i["h"])({audit_state:this.tabIndex,page:this.page++,keyword:this.keyword}).then((function(e){for(var a in t.loading=!1,e.data.length<t.$store.getters.setting.page_size&&(t.finished=!0),e.data)t.orderList.push(e.data[a]);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,Object(i["b"])(t.checkFrom.id,t.checkFrom).then((function(e){t.$toast("操作成功"),t.beforeChange(t.tabIndex),t.loadingCheck=!1,t.checkShow=!1,t.updateOrder(t.checkFrom.id,t.checkFrom.state)})).catch((function(e){console.log(e),t.loadingCheck=!1}))})).catch((function(t){console.log(t)}))}}},l=d,u=a("2877"),h=Object(u["a"])(l,n,r,!1,null,null,null);e["default"]=h.exports},a434:function(t,e,a){"use strict";var n=a("23e7"),r=a("7b0b"),s=a("23cb"),i=a("5926"),o=a("07fa"),c=a("3a34"),d=a("3511"),l=a("65f0"),u=a("8418"),h=a("083a"),f=a("1dde"),p=f("splice"),m=Math.max,b=Math.min;n({target:"Array",proto:!0,forced:!p},{splice:function(t,e){var a,n,f,p,v,g,_=r(this),k=o(_),x=s(t,k),C=arguments.length;for(0===C?a=n=0:1===C?(a=0,n=k-x):(a=C-2,n=b(m(i(e),0),k-x)),d(k+a-n),f=l(_,n),p=0;p<n;p++)v=x+p,v in _&&u(f,p,_[v]);if(f.length=n,a<n){for(p=x;p<k-n;p++)v=p+n,g=p+a,v in _?_[g]=_[v]:h(_,g);for(p=k;p>k-n+a;p--)h(_,p-1)}else if(a>n)for(p=k-n;p>x;p--)v=p+n-1,g=p+a-1,v in _?_[g]=_[v]:h(_,g);for(p=0;p<a;p++)_[p+x]=arguments[p+2];return c(_,k-n+a),f}})},ad7b:function(t,e,a){"use strict";a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return s})),a.d(e,"a",(function(){return i}));var n=a("1808");function r(){return Object(n["a"])({url:"statis/order",method:"get"})}function s(){return Object(n["a"])({url:"statis/repair",method:"get"})}function i(){return Object(n["a"])({url:"statis/extension",method:"get"})}}}]);