companyHome.js
6.9 KB
"use strict";const e=require("../../common/vendor.js"),a=require("../../common/assets.js"),o=require("../../api/work.js"),u=require("../../store/modules/tabbar.js");if(!Array){(e.resolveComponent("up-navbar")+e.resolveComponent("up-empty")+e.resolveComponent("uni-pagination")+e.resolveComponent("up-input")+e.resolveComponent("up-form-item")+e.resolveComponent("up-textarea")+e.resolveComponent("up-form")+e.resolveComponent("up-modal")+e.resolveComponent("up-parse")+e.resolveComponent("up-radio")+e.resolveComponent("up-radio-group")+e.resolveComponent("up-tabbar-item")+e.resolveComponent("up-tabbar"))()}Math||((()=>"../../uni_modules/uview-plus/components/u-navbar/u-navbar.js")+l+s+n+t+(()=>"../../uni_modules/uview-plus/components/u-empty/u-empty.js")+(()=>"../../uni_modules/uni-pagination/components/uni-pagination/uni-pagination.js")+(()=>"../../uni_modules/uview-plus/components/u-input/u-input.js")+(()=>"../../uni_modules/uview-plus/components/u-form-item/u-form-item.js")+(()=>"../../uni_modules/uview-plus/components/u-textarea/u-textarea.js")+(()=>"../../uni_modules/uview-plus/components/u-form/u-form.js")+(()=>"../../uni_modules/uview-plus/components/u-modal/u-modal.js")+(()=>"../../uni_modules/uview-plus/components/u-parse/u-parse.js")+(()=>"../../uni_modules/uview-plus/components/u-radio/u-radio.js")+(()=>"../../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js")+(()=>"../../uni_modules/uview-plus/components/u-tabbar-item/u-tabbar-item.js")+(()=>"../../uni_modules/uview-plus/components/u-tabbar/u-tabbar.js"))();const t=()=>"../../components/carCard.js",n=()=>"../../components/centerLine.js",s=()=>"../../components/wordInfo.js",l=()=>"../../components/navTop.js",p={__name:"companyHome",setup(t){const n=u.useTabbarStore(),s=e.ref([]),l=e.ref([]),p=e.ref([]),r=e.ref(0),m=e.ref(0),i=e.ref({username:"",taskId:""}),c=e.ref([]),v=e.ref(!1),d=e.ref(!1),f=e.ref(!1),g=e.ref({message:"",policyNumber:""}),y=e.ref({policystatus:"2",message:"",policynumber:""}),b=e.reactive({pageNum:1,pageSize:10}),h=e.reactive({pageNum:1,pageSize:10,orderprogress:1,policystatus:0}),w=e=>{var a,o,u;r.value=null==(a=e.detail)?void 0:a.current,0===(null==(o=e.detail)?void 0:o.current)?C():1===(null==(u=e.detail)?void 0:u.current)?I():N()},C=async()=>{const{data:e}=await o.queryMyList(b);s.value=e.rows,m.value=e.total,n.companyTotal=e.total},I=async()=>{const{rows:e,total:a}=await o.queryContinueList(h);l.value=e,m.value=a,n.companyTotal=a},N=async()=>{const{rows:e,total:a}=await o.queryEndedList(b);p.value=e,m.value=a,n.companyTotal=a},j=e=>{y.value.taskId=e,v.value=!0},_=e=>{o.disposeUser({policystatus:"1"},y.value.taskId).then((e=>{v.value=!1,C()}))},k=()=>{const e={policystatus:"2",message:y.value.message,policynumber:y.value.policynumber};o.disposeUser(e,y.value.taskId).then((e=>{v.value=!1,C(),proxy.$modal.msgSuccess("回馈成功")}))},x=()=>{const e={username:i.value.username},a=i.value.taskId;o.transfer(e,a).then((e=>{d.value=!1,C(),proxy.$modal.msgSuccess("保单已分配成功")}))},S=a=>{n.employeeCurrent=a,e.index.redirectTo({url:"/pages/companyMy/companyMy"})};return C(),(u,t)=>({a:e.p({placeholder:!0,leftIconSize:0,bgColor:"transparent"}),b:0===r.value?1:"",c:e.o((e=>r.value=0)),d:1===r.value?1:"",e:e.o((e=>r.value=1)),f:2===r.value?1:"",g:e.o((e=>r.value=2)),h:e.f(s.value,((a,u,t)=>e.e({a:"80592cfa-2-"+t+",80592cfa-1-"+t,b:e.p({carNum:a.licensePlateNumber}),c:"80592cfa-3-"+t+",80592cfa-1-"+t,d:e.p({phone:a.phone,userName:a.name,company:a.sysDeptName}),e:"已承接"===a.orderProgress},"已承接"===a.orderProgress?{f:e.o((e=>j(a.taskId)),a.taskId),g:e.o((e=>_(a.taskId)),a.taskId),h:"80592cfa-4-"+t+",80592cfa-1-"+t,i:e.p({leftContent:"承接回馈",rightContent:"疑难件"})}:{j:e.o((u=>{return t=a.taskId,void e.index.showModal({content:"是否要承接该保单",success:function(a){a.confirm?o.disposeUser({},t).then((a=>{e.index.$u.toast("承接成功"),C()})):a.cancel&&e.index.$u.toast("已取消")}});var t}),a.taskId),k:e.o((e=>(async e=>{const{data:a}=await o.getUserList();i.value.taskId=e,c.value=a,d.value=!0})(a.taskId)),a.taskId),l:"80592cfa-5-"+t+",80592cfa-1-"+t,m:e.p({leftContent:"承接",rightContent:"转办"})},{n:a.taskId,o:"80592cfa-1-"+t,p:e.p({tipContent:a.orderProgress,carInfo:a})}))),i:e.p({show:0==s.value.length,mode:"list",text:"暂无待办事项"}),j:e.o(C),k:e.o((e=>b.pageNum=e)),l:e.p({total:m.value,pageSize:b.pageSize,modelValue:b.pageNum}),m:s.value.length>0,n:e.f(l.value,((a,o,u)=>({a:"80592cfa-9-"+u+",80592cfa-8-"+u,b:e.p({carNum:a.licensePlateNumber}),c:"80592cfa-10-"+u+",80592cfa-8-"+u,d:e.p({phone:a.phone,userName:a.name,company:a.sysDeptName}),e:e.o((e=>j(a.taskId)),o),f:e.o((e=>_(a.taskId)),o),g:"80592cfa-11-"+u+",80592cfa-8-"+u,h:o,i:"80592cfa-8-"+u,j:e.p({tipContent:"查看详情",carInfo:a})}))),o:e.p({leftContent:"承接回馈",rightContent:"疑难件"}),p:e.p({show:0==l.value.length,mode:"list",text:"暂无数据"}),q:e.o(I),r:e.o((e=>h.pageNum=e)),s:e.p({total:m.value,pageSize:h.pageSize,modelValue:h.pageNum}),t:l.value.length>0,v:e.f(p.value,((a,u,t)=>({a:"80592cfa-15-"+t+",80592cfa-14-"+t,b:e.p({carNum:a.licensePlateNumber}),c:"80592cfa-16-"+t+",80592cfa-14-"+t,d:e.p({phone:a.phone,userName:a.name,company:a.sysDeptName}),e:e.o((e=>{return u=a.processInstanceId,void o.queryResult({processInstanceId:u}).then((e=>{var a,o;g.value.policyNumber=null==(a=null==e?void 0:e.data)?void 0:a.policyNumber,g.value.message=null==(o=null==e?void 0:e.data)?void 0:o.message,f.value=!0}));var u}),u),f:u,g:"80592cfa-14-"+t,h:e.p({tipContent:a.policyStatus,carInfo:a})}))),w:e.p({show:0==p.value.length,mode:"list",text:"暂无数据"}),x:e.o(N),y:e.o((e=>b.pageNum=e)),z:e.p({total:m.value,pageSize:b.pageSize,modelValue:b.pageNum}),A:p.value.length>0,B:r.value,C:e.o(w),D:e.o((e=>y.value.policynumber=e)),E:e.p({modelValue:y.value.policynumber}),F:e.p({label:"承保单号",prop:"name"}),G:e.o((e=>y.value.message=e)),H:e.p({placeholder:"请输入内容",modelValue:y.value.message}),I:e.p({label:"回馈内容",prop:"name"}),J:e.p({model:y.value,labelWidth:"80"}),K:e.o(k),L:e.o((e=>v.value=!1)),M:e.p({show:v.value,showCancelButton:!0,title:"填写回馈及单号"}),N:e.o((e=>g.value.policyNumber=e)),O:e.p({modelValue:g.value.policyNumber}),P:e.p({label:"承保单号",prop:"name"}),Q:e.p({content:g.value.message}),R:e.p({label:"回馈内容",prop:"name"}),S:e.p({model:g.value,labelWidth:"80"}),T:e.o((e=>f.value=!1)),U:e.p({show:f.value,title:"回馈内容"}),V:e.f(c.value,((a,o,u)=>({a:o,b:"80592cfa-33-"+u+",80592cfa-32",c:e.p({label:a.userName,name:a.userName})}))),W:e.o((e=>i.value.username=e)),X:e.p({modelValue:i.value.username}),Y:e.o(x),Z:e.o((e=>d.value=!1)),aa:e.p({show:d.value,showCancelButton:!0,title:"选择转办人员"}),ab:e.p({text:"主页",icon:"home",badge:e.unref(n).companyTotal}),ac:a._imports_0$1,ad:a._imports_1$1,ae:e.o(S),af:e.p({text:"我的",icon:"account"}),ag:e.p({value:e.unref(n).employeeCurrent,activeColor:"#3680FE",inactiveColor:"#707070"})})}},r=e._export_sfc(p,[["__scopeId","data-v-80592cfa"]]);wx.createPage(r);