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