societyOrder.js
3.4 KB
"use strict";const e=require("../../common/vendor.js"),a=require("../../api/work.js");if(!Array){(e.resolveComponent("up-navbar")+e.resolveComponent("up-empty")+e.resolveComponent("uni-pagination")+e.resolveComponent("up-parse")+e.resolveComponent("up-modal"))()}Math||((()=>"../../uni_modules/uview-plus/components/u-navbar/u-navbar.js")+s+n+t+o+(()=>"../../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-parse/u-parse.js")+(()=>"../../uni_modules/uview-plus/components/u-modal/u-modal.js"))();const o=()=>"../../components/carCard.js",s=()=>"../../components/navTop.js",n=()=>"../../components/wordInfo.js",t=()=>"../../components/operateList.js",u={__name:"societyOrder",setup(o){const s=e.ref([]),n=e.ref(0),t=e.ref(0),u=e.ref(!1),l=e.ref(!1),r=e.ref({policyNumber:"",message:""}),p=e.ref({message:""}),v=e.reactive({pageNum:1,pageSize:10,type:0}),i=e.ref("");e.onLoad((e=>{t.value=Number(e.type),c(t.value)})),e.onPullDownRefresh((async()=>{v.pageNum=1,s.value=[],c(t.value)}));const c=o=>{switch(o){case 0:i.value="待处理",a.queryMyList(v).then((a=>{s.value=a.data.rows||[],n.value=a.data.total,e.index.stopPullDownRefresh()}));break;case 1:i.value="已处理",a.queryProcessedList(v).then((a=>{s.value=a.rows||[],n.value=a.total,e.index.stopPullDownRefresh()}));break;case 2:i.value="进行中",a.queryOngoingList(v).then((a=>{s.value=a.rows||[],n.value=a.total,e.index.stopPullDownRefresh()}));break;case 3:i.value="已完结",a.queryEndedList(v).then((a=>{s.value=a.rows||[],n.value=a.total,e.index.stopPullDownRefresh()}));break;case 4:i.value="已作废",a.queryDeprecatedList(v).then((a=>{s.value=a.rows||[],n.value=a.total,e.index.stopPullDownRefresh()}))}},d=e=>{v.type=e,c(t.value)};return(o,m)=>({a:e.p({placeholder:!0,leftIconColor:"#fff",autoBack:!0,bgColor:"transparent"}),b:0===v.type?1:"",c:e.o((e=>d(0))),d:1===v.type?1:"",e:e.o((e=>d(1))),f:e.f(s.value,((o,s,n)=>e.e({a:"57a502fe-2-"+n+",57a502fe-1-"+n,b:e.p({carNum:o.licensePlateNumber}),c:"57a502fe-3-"+n+",57a502fe-1-"+n,d:e.p({phone:o.phone,userName:o.name,company:o.sysDeptName})},0===t.value?{e:e.o(c,o.taskId),f:"57a502fe-4-"+n+",57a502fe-1-"+n,g:e.p({carInfo:o})}:{},{h:e.o((a=>{return s=o.businessKey,void e.index.navigateTo({url:`/pages/carDetail/carDetail?carInfoId=${s}`});var s}),o.taskId)},3===t.value?{i:e.o((e=>{return s=o.processInstanceId,void a.queryResult({processInstanceId:s}).then((e=>{var a,o;r.value.policyNumber=null==(a=null==e?void 0:e.data)?void 0:a.policyNumber,r.value.message=null==(o=null==e?void 0:e.data)?void 0:o.message,u.value=!0}));var s}),o.taskId)}:{},4===t.value?{j:e.o((e=>{return s=o.processInstanceId,void a.queryDefeatContent({processInstanceId:s,type:2}).then((e=>{var a;p.value.message=null==(a=null==e?void 0:e.data)?void 0:a.message,l.value=!0}));var s}),o.taskId)}:{},{k:o.taskId,l:"57a502fe-1-"+n,m:e.p({tipContent:i.value,carInfo:o})}))),g:0===t.value,h:3===t.value,i:4===t.value,j:e.p({show:0==s.value.length,mode:"list",text:"暂无待办事项"}),k:e.o((e=>c(t.value))),l:e.o((e=>v.pageNum=e)),m:e.p({total:n.value,pageSize:v.pageSize,modelValue:v.pageNum}),n:s.value.length>0,o:e.p({content:r.value.message}),p:e.o((e=>u.value=!1)),q:e.p({show:u.value,title:"保单回馈"}),r:e.p({content:p.value.message}),s:e.o((e=>l.value=!1)),t:e.p({show:l.value,title:"作废备注"})})}},l=e._export_sfc(u,[["__scopeId","data-v-57a502fe"]]);wx.createPage(l);