import{I as z,y as G,w as H,D as J,C as K,L as Q,M as W,N as X}from"./element-plus.258bf9e7.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import{a as Z}from"./index.ec401e3b.js";import{u as tt}from"./usePaging.f6660143.js";import{u as et}from"./useDictOptions.c644f395.js";import{_ as ot,a as at,b as lt}from"./edit.vue_vue_type_script_setup_true_name_customerDemandEdit_lang.1d53a398.js";import"./lodash.1d82ee7c.js";import rt from"./detail.f5341cd8.js";import{u as nt}from"./vue-router.87ebc608.js";import{d as P,a0 as V,s as j,r as h,ai as st,o as s,c as it,V as t,M as a,O as b,u as l,L as p,S as x,n as R,a as L,k as ut,T as _}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.9492d03b.js";import"./department.1c914e1a.js";import"./organization.f0387125.js";import"./index.vue_vue_type_script_setup_true_lang.5a5f706a.js";import"./project.bccf4059.js";import"./index.vue_vue_type_script_setup_true_lang.fa76c14a.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import"./contract.4f8a540d.js";import"./index.a91b9a2c.js";import"./approve.4bfa22cd.js";import"./flow.825559ec.js";import"./custom.13e75d58.js";import"./flowSet.6e7dc427.js";const pt=_("\u67E5\u8BE2"),mt=_("\u91CD\u7F6E"),ct=_(" \u65B0\u589E "),dt={class:"mt-4"},_t=_(" \u8BE6\u60C5 "),ft={class:"flex justify-end mt-4"},vt=P({name:"projectLists"}),ve=P({...vt,setup(wt){var k;V([]);const f=j(),E=j(),v=h(!1),w=h(!1),m=V({settlement_code:""}),$=h([]),I=r=>{$.value=r.map(({id:o})=>o)},{dictData:C}=et("labor_contract_status,labor_contract_type,labor_contract_name"),{pager:i,getLists:D,resetParams:N,resetPage:S}=tt({fetchFun:lt,params:m}),T=async()=>{var r;v.value=!0,await R(),(r=E.value)==null||r.open("add")},F=async r=>{var c,u;let o=await at({id:r.id});w.value=!0,await R(),(c=f.value)==null||c.open(),(u=f.value)==null||u.setFormData(o)},y=nt();return(k=y.query)!=null&&k.listId&&F({id:y.query.listId}),D(),(r,o)=>{const c=z,u=G,d=H,q=J,B=K,A=Z,e=Q,M=W,U=Y,g=st("perms"),O=X;return s(),it("div",null,[t(B,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[t(q,{class:"mb-[-16px]",model:m,inline:""},{default:a(()=>[t(u,{label:"\u7ED3\u7B97\u5355\u53F7",prop:"settlement_code"},{default:a(()=>[t(c,{modelValue:m.settlement_code,"onUpdate:modelValue":o[0]||(o[0]=n=>m.settlement_code=n),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7ED3\u7B97\u5355\u53F7"},null,8,["modelValue"])]),_:1}),t(u,null,{default:a(()=>[t(d,{type:"primary",onClick:l(S)},{default:a(()=>[pt]),_:1},8,["onClick"]),t(d,{onClick:l(N)},{default:a(()=>[mt]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),b((s(),p(B,{class:"!border-none",shadow:"never"},{default:a(()=>[b((s(),p(d,{type:"primary",onClick:T},{icon:a(()=>[t(A,{name:"el-icon-Plus"})]),default:a(()=>[ct]),_:1})),[[g,["project.project_settlement/add"]]]),L("div",dt,[t(M,{data:l(i).lists,onSelectionChange:I},{default:a(()=>[t(e,{type:"selection",width:"55"}),t(e,{label:"\u5E8F\u53F7",type:"index",width:"55"}),t(e,{label:"\u7ED3\u7B97\u5355\u53F7",prop:"settlement_code","show-overflow-tooltip":""}),t(e,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),t(e,{label:"\u5408\u540C\u540D\u79F0",prop:"contract_name","show-overflow-tooltip":""}),t(e,{label:"\u5408\u540C\u7F16\u53F7",prop:"contract_code","show-overflow-tooltip":""}),t(e,{label:"\u7ED3\u7B97\u65E5\u671F",prop:"settlement_date","show-overflow-tooltip":""}),t(e,{label:"\u5408\u540C\u91D1\u989D",prop:"contract_amount","show-overflow-tooltip":""}),t(e,{label:"\u6D3D\u5546\u91D1\u989D",prop:"negotiation_amount","show-overflow-tooltip":""}),t(e,{label:"\u7ED3\u7B97\u91D1\u989D",prop:"settlement_amount","show-overflow-tooltip":""}),t(e,{label:"\u7ED3\u7B97\u5DEE\u5F02",prop:"settlement_difference","show-overflow-tooltip":""}),t(e,{label:"\u6DFB\u52A0\u4EBA",prop:"add_user_name","show-overflow-tooltip":""}),t(e,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:a(({row:n})=>[b((s(),p(d,{link:"",onClick:Dt=>F(n)},{default:a(()=>[_t]),_:2},1032,["onClick"])),[[g,["project.project_settlement/detail"]]])]),_:1})]),_:1},8,["data"])]),L("div",ft,[t(U,{modelValue:l(i),"onUpdate:modelValue":o[1]||(o[1]=n=>ut(i)?i.value=n:null),onChange:l(D)},null,8,["modelValue","onChange"])])]),_:1})),[[O,l(i).loading]]),v.value?(s(),p(ot,{key:0,ref_key:"editRef",ref:E,"dict-data":l(C),onSuccess:l(D),onClose:o[2]||(o[2]=n=>v.value=!1)},null,8,["dict-data","onSuccess"])):x("",!0),w.value?(s(),p(rt,{key:1,ref_key:"detailRef",ref:f,"dict-data":l(C),onClose:o[3]||(o[3]=n=>w.value=!1)},null,8,["dict-data"])):x("",!0)])}}});export{ve as default};