import{r,C as G,D as H,e as o,E as J,o as m,c as w,G as b,H as V,i as l,f as e,h as s,l as O,F as z,I as A,J as C,m as y,K as W,y as X,B as Z,v as $}from"./index-C1_1_QXk.js";import{a as ee}from"./contract-C1nmEna0.js";const te={class:"app-container"},le=Z({name:"Post"}),se=Object.assign(le,{setup(ae){const{proxy:S}=$(),h=r([]),_=r(!1),u=r(!0),k=r([]),D=r(!0),x=r(!0),g=r(0);r(""),r(!1),r(!1);const U=r([{id:"labor",name:"劳动合同"},{id:"business",name:"商务合同"}]),q=G({form:{},queryParams:{page:1,limit:10,flag:"exact"},rules:{operationtime:[{required:!0,message:"请选择日期",trigger:"blur"}]}}),{queryParams:n,form:R,rules:ne}=H(q);function c(){_.value=!0,ee(n.value).then(p=>{h.value=p.data,g.value=p.count,_.value=!1}),R.value={}}function f(){n.value.pageNum=1,c()}function B(){S.resetForm("queryRef"),f()}function K(p){k.value=p.map(a=>a.postId),D.value=p.length!=1,x.value=!p.length}return c(),(p,a)=>{const P=o("el-input"),d=o("el-form-item"),Y=o("el-option"),F=o("el-select"),I=o("el-date-picker"),v=o("el-button"),L=o("el-form"),N=o("el-col"),Q=o("right-toolbar"),E=o("el-row"),i=o("el-table-column"),M=o("el-table"),T=o("pagination"),j=J("loading");return m(),w("div",te,[b(e(L,{model:l(n),ref:"queryRef",inline:!0},{default:s(()=>[e(d,{label:"证件号码",prop:"idno"},{default:s(()=>[e(P,{modelValue:l(n).idno,"onUpdate:modelValue":a[0]||(a[0]=t=>l(n).idno=t),placeholder:"",clearable:"",style:{width:"200px"},onKeyup:O(f,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(d,{label:"合同类型",prop:"type"},{default:s(()=>[e(F,{modelValue:l(n).type,"onUpdate:modelValue":a[1]||(a[1]=t=>l(n).type=t),placeholder:"请选择"},{default:s(()=>[(m(!0),w(z,null,A(l(U),t=>(m(),C(Y,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"签署日期",prop:"signtime"},{default:s(()=>[e(I,{modelValue:l(n).signtime,"onUpdate:modelValue":a[2]||(a[2]=t=>l(n).signtime=t),type:"date",placeholder:"签署日期","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),e(d,null,{default:s(()=>[e(v,{type:"primary",icon:"Search",onClick:f},{default:s(()=>[y("搜索")]),_:1}),e(v,{icon:"Refresh",onClick:B},{default:s(()=>[y("重置")]),_:1})]),_:1})]),_:1},8,["model"]),[[V,l(u)]]),e(E,{gutter:10,class:"mb8"},{default:s(()=>[e(N,{span:1.5}),e(Q,{showSearch:l(u),"onUpdate:showSearch":a[3]||(a[3]=t=>W(u)?u.value=t:null),onQueryTable:c},null,8,["showSearch"])]),_:1}),b((m(),C(M,{data:l(h),onSelectionChange:K},{default:s(()=>[e(i,{label:"姓名",align:"center",prop:"name"}),e(i,{label:"证件号码",align:"center",prop:"id_no"}),e(i,{label:"合同类型",align:"center",width:"80"},{default:s(({row:t})=>[y(X(t.type=="labor"?"劳动合同":t.type=="business"?"商务合同":"其他"),1)]),_:1}),e(i,{label:"甲方",align:"center",prop:"party_a",width:"220"}),e(i,{label:"乙方",align:"center",prop:"party_b",width:"220"}),e(i,{label:"丙方",align:"center",prop:"party_c",width:"220"}),e(i,{label:"签署结果",align:"center",prop:"result",width:"220"}),e(i,{label:"签署时间",align:"center",prop:"sign_time",width:"220"})]),_:1},8,["data"])),[[j,l(_)]]),b(e(T,{total:l(g),page:l(n).page,"onUpdate:page":a[4]||(a[4]=t=>l(n).page=t),limit:l(n).limit,"onUpdate:limit":a[5]||(a[5]=t=>l(n).limit=t),onPagination:c},null,8,["total","page","limit"]),[[V,l(g)>0]])])}}});export{se as default};
