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