import{k as L,a as m,r as M,R,ak as I,b as l,M as Q,o as p,c as H,d as e,e as t,g as n,N as q,s as _,f as Z,t as j,i as v,Z as F,H as i,C as G}from"./index.699f1124.js";import{d as J}from"./demand.a01350ec.js";const K={class:"app-container"},O=i("\u53D1\u5E03\u9700\u6C42"),W=i("\u5F85\u53D7\u7406"),X=i("\u5DF2\u53D7\u7406"),Y=i("\u5DF2\u9A73\u56DE"),ee=i("\u5DF2\u7ED3\u675F"),te=i("\u5220\u9664"),ae=i("\u53D6\u6D88\u53D1\u5E03"),oe=i("\u67E5\u770B"),re=i("\u5B8C\u6210"),de={__name:"serviceDemand",setup(se){const{proxy:y}=G(),x=L(),k=m([]),b=m(!0),w=m(!0),f=m(0);m([]);const S=M({form:{},queryParams:{pageNum:1,pageSize:10,status:1},rules:{name:[{required:!0,message:"\u516C\u53F8\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],dutyParagraph:[{required:!0,message:"\u516C\u53F8\u7A0E\u53F7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],bank:[{required:!0,message:"\u5F00\u6237\u884C\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],bankAccount:[{required:!0,message:"\u5F00\u6237\u884C\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],bankPhone:[{required:!0,message:"\u5F00\u6237\u884C\u7535\u8BDD\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],email:[{required:!0,message:"\u7535\u5B50\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],phone:[{required:!0,message:"\u8054\u7CFB\u7535\u8BDD\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],address:[{required:!0,message:"\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],username:[{required:!0,message:"\u8054\u7CFB\u4EBA\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],userPhone:[{required:!0,message:"\u8054\u7CFB\u4EBA\u7535\u8BDD\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],userAddress:[{required:!0,message:"\u90AE\u5BC4\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}}),{queryParams:r,form:le,rules:ne}=R(S),u=async()=>{b.value=!0;const o=await J(r.value);k.value=o.rows,f.value=o.total,b.value=!1};function z(){r.value.pageNum=1,u()}function C(o){y.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BA2\u5355\u53F7\u4E3A"'+o+'"\u7684\u6570\u636E\u9879\uFF1F').then(function(){return demandDelete(postIds)}).then(()=>{u(),y.$modal.msgSuccess("\u5220\u9664\u6210\u529F")}).catch(()=>{})}function N(o){x.push({path:"./release",query:{id:o}})}const D=o=>{ElMessageBox.confirm(`\u662F\u5426\u786E\u8BA4\u7ED3\u675F\u7F16\u53F7\u4E3A${o}\u7684\u6570\u636E\u9879\uFF1F`).then(async()=>{await updateCasDemand({id:o,status:4}),u(),ElMessage.success("\u5220\u9664\u6210\u529F")}).catch(()=>{})};return u(),I(()=>{u()}),(o,s)=>{const c=l("el-button"),V=l("router-link"),$=l("el-col"),P=l("right-toolbar"),B=l("el-row"),g=l("el-radio-button"),T=l("el-radio-group"),d=l("el-table-column"),E=l("el-table"),U=l("pagination"),A=Q("loading");return p(),H("div",K,[e(B,{gutter:10,class:"mb8"},{default:t(()=>[e($,{span:1.5},{default:t(()=>[e(V,{to:"./release"},{default:t(()=>[e(c,{type:"primary",size:"small"},{default:t(()=>[O]),_:1})]),_:1})]),_:1},8,["span"]),e(P,{showSearch:w.value,"onUpdate:showSearch":s[0]||(s[0]=a=>w.value=a),onQueryTable:u},null,8,["showSearch"])]),_:1}),e(T,{modelValue:n(r).status,"onUpdate:modelValue":s[1]||(s[1]=a=>n(r).status=a),size:"small",onChange:z},{default:t(()=>[e(g,{label:0},{default:t(()=>[W]),_:1}),e(g,{label:1},{default:t(()=>[X]),_:1}),e(g,{label:2},{default:t(()=>[Y]),_:1}),e(g,{label:4},{default:t(()=>[ee]),_:1})]),_:1},8,["modelValue"]),q((p(),_(E,{data:k.value,style:{"margin-top":"20px"}},{default:t(()=>[e(d,{label:"\u9700\u6C42\u7C7B\u522B",align:"center",prop:"kind"}),e(d,{label:"\u72B6\u6001",align:"center",prop:"status"}),e(d,{label:"\u8054\u7CFB\u4EBA",align:"center",prop:"name"}),e(d,{label:"\u624B\u673A\u53F7",align:"center",prop:"mobile"}),e(d,{label:"\u53D1\u5E03\u65F6\u95F4",align:"center",prop:"createTime",width:"180"},{default:t(({row:a})=>[Z("span",null,j(o.parseTime(a.createTime)),1)]),_:1}),e(d,{label:"\u64CD\u4F5C",align:"center","class-name":"small-padding fixed-width"},{default:t(a=>[n(r).type==3?(p(),_(c,{key:0,size:"small",type:"text",icon:"Delete",onClick:h=>C(a.row.id)},{default:t(()=>[te]),_:2},1032,["onClick"])):v("",!0),n(r).type==1?(p(),_(c,{key:1,size:"small",type:"text",icon:"Close",onClick:h=>C(a.row.id)},{default:t(()=>[ae]),_:2},1032,["onClick"])):v("",!0),n(r).type!=3?(p(),_(c,{key:2,size:"small",type:"text",icon:"View",onClick:h=>N(a.row.id)},{default:t(()=>[oe]),_:2},1032,["onClick"])):v("",!0),e(c,{type:"text",size:"small",onClick:s[2]||(s[2]=h=>D(o.row.id))},{default:t(()=>[re]),_:1})]),_:1})]),_:1},8,["data"])),[[A,b.value]]),q(e(U,{total:f.value,page:n(r).pageNum,"onUpdate:page":s[3]||(s[3]=a=>n(r).pageNum=a),limit:n(r).pageSize,"onUpdate:limit":s[4]||(s[4]=a=>n(r).pageSize=a),onPagination:u},null,8,["total","page","limit"]),[[F,f.value>0]])])}}};export{de as default};
