import{B as Z,D as ee,y as te,A as oe,w as ae,L as ne,C as ie,O as re,P as le,Q as ue}from"./element-plus.76ad22d1.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.53484866.js";import{f as ce,a as pe}from"./index.7dbdd523.js";import{_ as de}from"./index.vue_vue_type_style_index_0_lang.69260dad.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.70540139.js";import{u as _e}from"./usePaging.5a1a0ff2.js";import{u as fe}from"./useDictOptions.19212006.js";import{c as R,a as W,b as De}from"./subcontractor.1274515f.js";import{f as ge}from"./subcontracting_contract.2ea27f74.js";import{a as he}from"./project.91cef4ae.js";import{_ as be}from"./edit.vue_vue_type_script_setup_true_name_procurementContractEdit_lang.9e730270.js";import ve from"./detail.c005aab2.js";import{u as Ce}from"./vue-router.87ebc608.js";import{d as N,s as j,r as E,a0 as Fe,ai as ye,o as s,c as L,V as e,M as o,O as f,u as t,L as p,S as T,n as k,W as we,a8 as Ee,a as I,k as ke,T as _}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.9bff6341.js";import"./dayjs.4e54c873.js";import"./axios.c27a9cd7.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.12303e67.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.ce2b95b7.js";import"./color.0b62cf11.js";import"./clone.b8d2a027.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.026d6bda.js";import"./vue-clipboard3.1a74f940.js";import"./clipboard.80ee0599.js";import"./echarts.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.d693a0d8.js";import"./index.c145206a.js";import"./dialogTableConfig.1168ddc2.js";import"./cost_approved_project.87772dc0.js";import"./task_type.523a1d31.js";import"./suppler_list.39e50042.js";import"./procurement_contract.d97ecdd9.js";import"./paymentplan.8cb97641.js";import"./bank_account.7dd11955.js";import"./financial_fee_application.30ee7cf5.js";import"./financial_borrow_money.768bab5d.js";import"./marketing_custom_return_visit_template.5fb4f637.js";import"./marketing_custom_return_visit.4572b4d1.js";import"./marketing_custom.c254a56a.js";import"./project_attendance_record.39160317.js";import"./marketing_contract.aacda360.js";import"./marketing_competitor.a5e5d9a6.js";import"./index.vue_vue_type_script_setup_true_lang.3b0be00d.js";import"./index.fff3ca65.js";import"./approve.ed586464.js";import"./flow.dc01463b.js";import"./index.vue_vue_type_script_setup_true_lang.57d9d1ff.js";import"./custom.b51735c6.js";import"./flowSet.a68efc86.js";const Be=_("\u67E5\u8BE2"),xe=_("\u91CD\u7F6E"),Ve=_(" \u65B0\u589E "),$e=_(" \u5220\u9664 "),Se={class:"mt-4"},Pe=_(" \u7F16\u8F91 "),Re=_(" \u5220\u9664 "),We=_(" \u8BE6\u60C5 "),je={class:"flex justify-end mt-4"},Le=N({name:"projectLists"}),Ht=N({...Le,setup(Te){var $;const C=j(),g=j(),h=E(!1),F=E(!1),c=Fe({negotiation_no:"",subcontracting_contract_id:"",negotiation_type:"",project_id:""}),y=E([]),q=l=>{y.value=l.map(({id:a})=>a)},{dictData:w}=fe("negotiation_type"),{pager:i,getLists:b,resetParams:z,resetPage:A}=_e({fetchFun:W,params:c}),O=async()=>{var l;h.value=!0,await k(),(l=g.value)==null||l.open("add")},U=async l=>{var d,u;let a=await R({id:l.id});h.value=!0,await k(),(d=g.value)==null||d.open("edit"),(u=g.value)==null||u.setFormData(a)},B=async l=>{await ce.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await De({id:l}),b()},x=async l=>{var d,u;let a=await R({id:l.id});F.value=!0,await k(),(d=C.value)==null||d.open(),(u=C.value)==null||u.setFormData(a)},V=Ce();return($=V.query)!=null&&$.listId&&x({id:V.query.listId}),b(),(l,a)=>{const d=me,u=Z,M=ee,S=te,Q=oe,m=ae,G=de,H=ne,P=ie,J=pe,r=re,K=le,X=se,D=ye("perms"),Y=ue;return s(),L("div",null,[e(P,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(H,{class:"mb-[-16px]",model:c,inline:""},{default:o(()=>[e(u,{label:"\u5173\u8054\u5408\u540C",prop:"subcontracting_contract_id"},{default:o(()=>[e(d,{formData:c,model:"subcontracting_contract_id",api:t(ge)},null,8,["formData","api"])]),_:1}),e(u,{label:"\u6240\u5C5E\u9879\u76EE",prop:"project_id"},{default:o(()=>[e(d,{formData:c,model:"project_id",api:t(he)},null,8,["formData","api"])]),_:1}),e(u,{label:"\u6D3D\u5546\u7F16\u53F7",prop:"negotiation_no"},{default:o(()=>[e(M,{class:"w-[280px]",modelValue:c.negotiation_no,"onUpdate:modelValue":a[0]||(a[0]=n=>c.negotiation_no=n),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6D3D\u5546\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u6D3D\u5546\u7C7B\u522B",prop:"negotiation_type"},{default:o(()=>[e(Q,{class:"w-[280px]",modelValue:c.negotiation_type,"onUpdate:modelValue":a[1]||(a[1]=n=>c.negotiation_type=n),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u6D3D\u5546\u7C7B\u522B"},{default:o(()=>[e(S,{label:"\u5168\u90E8",value:""}),(s(!0),L(we,null,Ee(t(w).negotiation_type,(n,v)=>(s(),p(S,{key:v,label:n.name,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:o(()=>[e(m,{type:"primary",onClick:t(A)},{default:o(()=>[Be]),_:1},8,["onClick"]),e(m,{onClick:t(z)},{default:o(()=>[xe]),_:1},8,["onClick"]),e(G,{class:"ml-2.5","fetch-fun":t(W),params:c,"page-size":t(i).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),f((s(),p(P,{class:"!border-none",shadow:"never"},{default:o(()=>[f((s(),p(m,{type:"primary",onClick:O},{icon:o(()=>[e(J,{name:"el-icon-Plus"})]),default:o(()=>[Ve]),_:1})),[[D,["contract.subcontracting_contract_negotiation/add"]]]),f((s(),p(m,{disabled:!y.value.length,onClick:a[2]||(a[2]=n=>B(y.value))},{default:o(()=>[$e]),_:1},8,["disabled"])),[[D,["contract.subcontracting_contract_negotiation/delete"]]]),I("div",Se,[e(K,{border:"",data:t(i).lists,onSelectionChange:q},{default:o(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(r,{label:"\u4F9B\u5E94\u5546\u540D\u79F0",prop:"supplier_name","render-header":t(i).calcWidth},null,8,["render-header"]),e(r,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","render-header":t(i).calcWidth},null,8,["render-header"]),e(r,{label:"\u5408\u540C\u540D\u79F0",prop:"contract_name","render-header":t(i).calcWidth},null,8,["render-header"]),e(r,{label:"\u6D3D\u5546\u7F16\u53F7",prop:"negotiation_no","render-header":t(i).calcWidth},null,8,["render-header"]),e(r,{"render-header":t(i).calcWidth,label:"\u6D3D\u5546\u5355\u540D\u79F0",prop:"negotiation_name","show-overflow-tooltip":""},null,8,["render-header"]),e(r,{"render-header":t(i).calcWidth,label:"\u6D3D\u5546\u91D1\u989D",prop:"negotiation_amount","show-overflow-tooltip":""},null,8,["render-header"]),e(r,{"render-header":t(i).calcWidth,label:"\u6D3D\u5546\u7C7B\u522B",prop:"negotiation_type_text","show-overflow-tooltip":""},null,8,["render-header"]),e(r,{label:"\u6D3D\u5546\u8D28\u4FDD\u91D1\u989D",prop:"warranty_amount","show-overflow-tooltip":""}),e(r,{label:"\u6D3D\u5546\u8D28\u4FDD\u5230\u671F\u65F6\u95F4",prop:"warranty_expire_date"}),e(r,{label:"\u64CD\u4F5C",width:"160",fixed:"right",align:"center"},{default:o(({row:n})=>[f((s(),p(m,{type:"primary",link:"",onClick:v=>U(n)},{default:o(()=>[Pe]),_:2},1032,["onClick"])),[[D,["contract.subcontracting_contract_negotiation/edit"]]]),f((s(),p(m,{type:"danger",link:"",onClick:v=>B(n.id)},{default:o(()=>[Re]),_:2},1032,["onClick"])),[[D,["contract.subcontracting_contract_negotiation/delete"]]]),f((s(),p(m,{link:"",onClick:v=>x(n)},{default:o(()=>[We]),_:2},1032,["onClick"])),[[D,["contract.subcontracting_contract_negotiation/detail"]]])]),_:1})]),_:1},8,["data"])]),I("div",je,[e(X,{modelValue:t(i),"onUpdate:modelValue":a[3]||(a[3]=n=>ke(i)?i.value=n:null),onChange:t(b)},null,8,["modelValue","onChange"])])]),_:1})),[[Y,t(i).loading]]),h.value?(s(),p(be,{key:0,ref_key:"editRef",ref:g,"dict-data":t(w),onSuccess:t(b),onClose:a[4]||(a[4]=n=>h.value=!1)},null,8,["dict-data","onSuccess"])):T("",!0),F.value?(s(),p(ve,{key:1,ref_key:"detailRef",ref:C,"dict-data":t(w),onClose:a[5]||(a[5]=n=>F.value=!1)},null,8,["dict-data"])):T("",!0)])}}});export{Ht as default};