operateList.js
3.8 KB
"use strict";const e=require("../common/vendor.js"),o=require("../api/work.js"),a=require("../store/modules/user.js");if(!Array){(e.resolveComponent("up-parse")+e.resolveComponent("up-modal")+e.resolveComponent("up-textarea")+e.resolveComponent("up-input")+e.resolveComponent("up-radio")+e.resolveComponent("up-radio-group"))()}Math||((()=>"../uni_modules/uview-plus/components/u-parse/u-parse.js")+(()=>"../uni_modules/uview-plus/components/u-modal/u-modal.js")+(()=>"../uni_modules/uview-plus/components/u-textarea/u-textarea.js")+(()=>"../uni_modules/uview-plus/components/u-input/u-input.js")+(()=>"../uni_modules/uview-plus/components/u-radio/u-radio.js")+(()=>"../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js"))();const t={__name:"operateList",props:{carInfo:{type:Object,require:!0}},emits:["refreshList"],setup(t,{emit:s}){const u=t,l=a.useUserStore(),n=s,r=e.ref([]),p=e.reactive({deptName:void 0,status:void 0}),i=e.ref(0),c=e.ref(9),v=e.ref(!1),d=e.ref(""),m=e.ref(!1),f=e.ref(""),I=e.ref(!1),h=e.ref(""),w=e.ref(!1),y=e.ref(!1),x=()=>{c.value=0,e.index.showModal({title:"提示",content:"是否通过",success:function(a){a.confirm?o.disposeUser({associationapprove:"0",associationapprovetype:"0",deptid:l.transferDeptId},u.carInfo.taskId).then((o=>{e.index.$u.toast("保单已通过"),n("refreshList")})):a.cancel&&console.log("用户点击取消")}})},C=()=>{c.value=1,m.value=!0},_=()=>{c.value=4,I.value=!0},j=async()=>{c.value=3;const{data:e}=await o.queryDefeatContent({processInstanceId:u.carInfo.processInstanceId,type:0});d.value=e.message,v.value=!0},S=()=>{c.value=2,y.value=!0;const o=u.carInfo.businessKey;e.index.navigateTo({url:`/pages/carDetail/carDetail?carInfoId=${o}&roleId=1`})},g=()=>{c.value=5,k(),w.value=!0},k=()=>{o.listDept(p).then((e=>{r.value=e.data.filter((e=>100===e.parentId))}))},L=()=>{const a={associationapprove:"2",comment:h.value},t=u.carInfo.taskId;o.disposeUser(a,t).then((o=>{n("refreshList"),e.index.$u.toast("保单已作废"),I.value=!1}))},q=()=>{const a={associationapprove:"1",comment:f.value},t=u.carInfo.taskId;o.disposeUser(a,t).then((o=>{n("refreshList"),e.index.$u.toast("保单退回"),m.value=!1}))},D=()=>{const a={associationapprove:"0",associationapprovetype:"1",deptid:i.value.toString()},t=u.carInfo.taskId;o.disposeUser(a,t).then((o=>{w.value=!1,n("refreshList"),e.index.$u.toast("保单已分配成功")}))};return(o,a)=>e.e({a:"问题件"!=t.carInfo.policyStatus&&y.value},"问题件"!=t.carInfo.policyStatus&&y.value?{b:0===c.value?1:"",c:e.o(x)}:{},{d:"问题件"!=t.carInfo.policyStatus&&y.value},"问题件"!=t.carInfo.policyStatus&&y.value?{e:1===c.value?1:"",f:e.o(C)}:{},{g:"问题件"!=t.carInfo.policyStatus},"问题件"!=t.carInfo.policyStatus?{h:2===c.value?1:"",i:e.o(S)}:{},{j:"问题件"==t.carInfo.policyStatus},"问题件"==t.carInfo.policyStatus?{k:3===c.value?1:"",l:e.o(j)}:{},{m:4===c.value?1:"",n:e.o(_),o:5===c.value?1:"",p:e.o(g),q:e.p({content:d.value}),r:e.o((e=>v.value=!1)),s:e.p({show:v.value,title:"作废备注"}),t:e.o((e=>h.value=e)),v:e.p({placeholder:"请输入内容",modelValue:h.value}),w:e.o(L),x:e.o((e=>I.value=!1)),y:e.p({show:I.value,showCancelButton:!0,title:"填写作废内容"}),z:e.o((e=>f.value=e)),A:e.p({placeholder:"请输入内容",modelValue:f.value}),B:e.o(q),C:e.o((e=>m.value=!1)),D:e.p({show:m.value,showCancelButton:!0,title:"填写退回内容"}),E:e.o((e=>p.deptName=e)),F:e.p({placeholder:"请输入承保公司名称",prefixIcon:"search",modelValue:p.deptName}),G:e.o(k),H:e.f(r.value,((o,a,t)=>({a:a,b:"d7065c6a-9-"+t+",d7065c6a-8",c:e.p({label:o.deptName,name:o.deptId})}))),I:e.o((e=>i.value=e)),J:e.p({placement:"column",modelValue:i.value}),K:e.o(D),L:e.o((e=>w.value=!1)),M:e.o((e=>w.value=!1)),N:e.p({show:w.value,showCancelButton:!0,closeOnClickOverlay:!0,title:"选择分配项"})})}},s=e._export_sfc(t,[["__scopeId","data-v-d7065c6a"]]);wx.createComponent(s);