You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
13KB

  1. import{d as X,D as Z,A as x,z as ee,r as $,o as le,c as p,e as n,f as M,h as t,i as a,F as T,J as Y,I as d,g,t as b,j as m,k as ae,V as te,u as s,x as oe}from"./index.3d9e59d0.js";import{h as C,f as U,c as f,b as D,e as w,g as S}from"./uploadAction.d75dad42.js";import{s as se}from"./purchaseResults.1fe35184.js";import{d as ue}from"./projectCollectionEnter.8038d1bb.js";const re={class:"fillPurchasingResult footerPage"},ce={class:"flex justify-between"},ne={class:"el-upload__tip"},ie={class:"el-upload__tip"},pe={class:"el-upload__tip"},de={class:"el-upload__tip"},me={class:"el-upload__tip"},fe={class:"footer"},_e=X({name:"fillPurchasingResult"}),ye=Object.assign(_e,{setup(ve){const h=Z.dictStore.uploadUrl,{proxy:N}=oe(),j=x(),A=ee(),I=$(),E=(_,i,r)=>{if(i==="")return r(new Error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7"));if(/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(i))r();else return r(new Error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7"))},F={bidName:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u6BB5\u540D\u79F0"}],supplier:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F9B\u5E94\u5546"}],supplierContact:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F9B\u5E94\u5546\u8054\u7CFB\u4EBA"}],supplierContactInfo:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F9B\u5E94\u5546\u8054\u7CFB\u65B9\u5F0F"},{validator:E,trigger:"blur"}],purchaseMethod:[{required:!0,message:"\u8BF7\u9009\u62E9\u91C7\u8D2D\u65B9\u5F0F"}],transactionAmount:[{required:!0,message:"\u8BF7\u8F93\u5165\u6210\u4EA4\u91D1\u989D"}],transactionTime:[{required:!0,message:"\u8BF7\u9009\u62E9\u6210\u4EA4\u65F6\u95F4"}],biddingDoc:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u6295\u6807\u6587\u4EF6"}],bidDoc:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u62DB\u6807\u6587\u4EF6"}],acceptanceLetter:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u4E2D\u6807\u901A\u77E5\u4E66"}]},o=$({sections:[{biddingDoc:[],bidDoc:[],acceptanceLetter:[]}],devChangeCode:""}),L=$(!1),O=async _=>{!_||_.validate(async i=>{if(i){L.value=!0;const r={projectId:A.query.id,tenders:o.value.sections.map(u=>({...u,biddingDoc:u.biddingDoc&&JSON.stringify(S(u.biddingDoc)),bidDoc:u.bidDoc&&JSON.stringify(S(u.bidDoc)),acceptanceLetter:u.acceptanceLetter&&JSON.stringify(S(u.acceptanceLetter))})),devChangeCode:o.value.devChangeCode};try{await se(r),L.value=!1,N.$message.success("\u63D0\u4EA4\u6210\u529F"),j.go(-1)}catch{L.value=!1}}})},B=()=>{var _;if(((_=o.value.sections)==null?void 0:_.length)>=10){N.$message.warning("\u6700\u591A\u6DFB\u52A010\u4E2A\u6807\u6BB5");return}o.value.sections.push({biddingDoc:[],bidDoc:[],acceptanceLetter:[]})},J=_=>{o.value.sections.splice(_,1)},P=$([]);return le(async()=>{P.value=(await ue()).data}),(_,i)=>{const r=p("el-input"),u=p("el-form-item"),R=p("el-card"),v=p("el-button"),c=p("el-col"),H=p("el-radio"),z=p("el-radio-group"),G=p("el-input-number"),K=p("el-date-picker"),k=p("el-row"),V=p("el-upload"),Q=p("el-form");return n(),M("div",re,[t(Q,{ref_key:"formRef",ref:I,model:o.value,rules:F,"label-position":"right","label-width":"180px","label-suffix":":","scroll-to-error":""},{default:a(()=>[t(R,{class:"w-full mb-16"},{default:a(()=>[t(u,{label:"\u53D1\u6539\u7F16\u7801",rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],prop:"devChangeCode"},{default:a(()=>[t(r,{modelValue:o.value.devChangeCode,"onUpdate:modelValue":i[0]||(i[0]=q=>o.value.devChangeCode=q),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),(n(!0),M(T,null,Y(o.value.sections,(q,l)=>(n(),d(R,{key:l,class:"w-full mb-16"},{header:a(()=>{var e;return[g("div",ce,[g("span",null,"\u6807\u6BB5"+b(l+1),1),((e=o.value.sections)==null?void 0:e.length)>1?(n(),d(v,{key:0,link:"",type:"danger",onClick:y=>J(l)},{default:a(()=>[m("\u5220\u9664")]),_:2},1032,["onClick"])):ae("",!0)])]}),default:a(()=>[t(k,{gutter:40},{default:a(()=>[t(c,{span:12},{default:a(()=>[t(u,{label:"\u6807\u6BB5\u540D\u79F0",prop:`sections[${l}].bidName`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},{default:a(()=>[t(r,{modelValue:o.value.sections[l].bidName,"onUpdate:modelValue":e=>o.value.sections[l].bidName=e,maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),t(c,{span:12},{default:a(()=>[t(u,{label:"\u4F9B\u5E94\u5546",prop:`sections[${l}].supplier`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},{default:a(()=>[t(r,{modelValue:o.value.sections[l].supplier,"onUpdate:modelValue":e=>o.value.sections[l].supplier=e,maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),t(c,{span:12},{default:a(()=>[t(u,{label:"\u4F9B\u5E94\u5546\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801",prop:`sections[${l}].supplierSocialCreditCode`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},{default:a(()=>[t(r,{modelValue:o.value.sections[l].supplierSocialCreditCode,"onUpdate:modelValue":e=>o.value.sections[l].supplierSocialCreditCode=e,placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),t(c,{span:12},{default:a(()=>[t(u,{label:"\u4F9B\u5E94\u5546\u8054\u7CFB\u4EBA",prop:`sections[${l}].supplierContact`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},{default:a(()=>[t(r,{modelValue:o.value.sections[l].supplierContact,"onUpdate:modelValue":e=>o.value.sections[l].supplierContact=e,maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),t(c,{span:12},{default:a(()=>[t(u,{label:"\u4F9B\u5E94\u5546\u8054\u7CFB\u65B9\u5F0F",prop:`sections[${l}].supplierContactInfo`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},{default:a(()=>[t(r,{modelValue:o.value.sections[l].supplierContactInfo,"onUpdate:modelValue":e=>o.value.sections[l].supplierContactInfo=e,maxlength:"11",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),t(c,{span:24},{default:a(()=>[t(u,{label:"\u91C7\u8D2D\u65B9\u5F0F",prop:`sections[${l}].purchaseMethod`,rules:[{required:!0,message:"\u8BF7\u9009\u62E9"}]},{default:a(()=>[t(z,{modelValue:o.value.sections[l].purchaseMethod,"onUpdate:modelValue":e=>o.value.sections[l].purchaseMethod=e},{default:a(()=>{var e;return[(n(!0),M(T,null,Y((e=P.value)==null?void 0:e.filter(y=>y.type==="PURCHASE_METHOD"),(y,W)=>(n(),d(H,{key:W,label:y.value},{default:a(()=>[m(b(y.label),1)]),_:2},1032,["label"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),t(c,{span:12},{default:a(()=>[t(u,{label:"\u6210\u4EA4\u91D1\u989D",prop:`sections[${l}].transactionAmount`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},{default:a(()=>[t(G,{modelValue:o.value.sections[l].transactionAmount,"onUpdate:modelValue":e=>o.value.sections[l].transactionAmount=e,placeholder:"\u8BF7\u586B\u5199",min:0,controls:!1,onMousewheel:i[1]||(i[1]=te(()=>{},["prevent"]))},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),t(c,{span:12},{default:a(()=>[t(u,{label:"\u6210\u4EA4\u65F6\u95F4",prop:`sections[${l}].transactionTime`,rules:[{required:!0,message:"\u8BF7\u9009\u62E9"}]},{default:a(()=>[t(K,{modelValue:o.value.sections[l].transactionTime,"onUpdate:modelValue":e=>o.value.sections[l].transactionTime=e,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)]),_:2},1024),t(k,{gutter:40},{default:a(()=>[t(c,{span:12},{default:a(()=>[["00","05"].includes(o.value.sections[l].purchaseMethod)?(n(),d(u,{key:0,label:"\u91C7\u8D2D\u4EE3\u7406\u673A\u6784"},{default:a(()=>[t(r,{modelValue:o.value.sections[l].agency,"onUpdate:modelValue":e=>o.value.sections[l].agency=e,maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):(n(),d(u,{key:1,label:"\u91C7\u8D2D\u4EE3\u7406\u673A\u6784",prop:`sections[${l}].agency`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},{default:a(()=>[t(r,{modelValue:o.value.sections[l].agency,"onUpdate:modelValue":e=>o.value.sections[l].agency=e,maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]))]),_:2},1024),t(c,{span:12},{default:a(()=>[["00","05"].includes(o.value.sections[l].purchaseMethod)?(n(),d(u,{key:0,label:"\u91C7\u8D2D\u4EE3\u7406\u673A\u6784\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801"},{default:a(()=>[t(r,{modelValue:o.value.sections[l].purchaseSocialCreditCode,"onUpdate:modelValue":e=>o.value.sections[l].purchaseSocialCreditCode=e,placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):(n(),d(u,{key:1,label:"\u91C7\u8D2D\u4EE3\u7406\u673A\u6784\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801",prop:`sections[${l}].purchaseSocialCreditCode`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},{default:a(()=>[t(r,{modelValue:o.value.sections[l].purchaseSocialCreditCode,"onUpdate:modelValue":e=>o.value.sections[l].purchaseSocialCreditCode=e,placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]))]),_:2},1024),t(c,{span:12},{default:a(()=>[t(u,{label:"\u9884\u7B97\u6267\u884C\u786E\u8BA4\u4E66\u7F16\u53F7"},{default:a(()=>[t(r,{modelValue:o.value.sections[l].budgetExecConfirmNo,"onUpdate:modelValue":e=>o.value.sections[l].budgetExecConfirmNo=e,placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:2},1024),t(k,null,{default:a(()=>[t(c,{span:12},{default:a(()=>[t(u,{label:"\u6295\u6807\u6587\u4EF6",prop:`sections[${l}].biddingDoc`,rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20"}]},{default:a(()=>[t(V,{"file-list":o.value.sections[l].biddingDoc,"onUpdate:fileList":e=>o.value.sections[l].biddingDoc=e,class:"w-full",action:s(h),"on-success":e=>s(C)(e,o.value.sections[l].biddingDoc),"before-upload":e=>s(U)(e,{types:s(f)}),accept:s(f).map(e=>`.${e}`).join(","),"on-preview":s(D)},{tip:a(()=>[g("div",ne," \u652F\u6301"+b(s(w))+"\u6587\u4EF6 ",1)]),default:a(()=>[t(v,{type:"primary",plain:""},{default:a(()=>[m("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:2},1032,["file-list","onUpdate:fileList","action","on-success","before-upload","accept","on-preview"])]),_:2},1032,["prop"])]),_:2},1024),t(c,{span:12},{default:a(()=>[o.value.sections[l].purchaseMethod!=="00"?(n(),d(u,{key:0,label:"\u62DB\u6807\u6587\u4EF6",prop:`sections[${l}].bidDoc`,rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20"}]},{default:a(()=>[t(V,{"file-list":o.value.sections[l].bidDoc,"onUpdate:fileList":e=>o.value.sections[l].bidDoc=e,class:"w-full",action:s(h),"on-success":e=>s(C)(e,o.value.sections[l].bidDoc),"before-upload":e=>s(U)(e,{types:s(f)}),accept:s(f).map(e=>`.${e}`).join(","),"on-preview":s(D)},{tip:a(()=>[g("div",ie," \u652F\u6301"+b(s(w))+"\u6587\u4EF6 ",1)]),default:a(()=>[t(v,{type:"primary",plain:""},{default:a(()=>[m("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:2},1032,["file-list","onUpdate:fileList","action","on-success","before-upload","accept","on-preview"])]),_:2},1032,["prop"])):(n(),d(u,{key:1,label:"\u62DB\u6807\u6587\u4EF6"},{default:a(()=>[t(V,{"file-list":o.value.sections[l].bidDoc,"onUpdate:fileList":e=>o.value.sections[l].bidDoc=e,class:"w-full",action:s(h),"on-success":e=>s(C)(e,o.value.sections[l].bidDoc),"before-upload":e=>s(U)(e,{types:s(f)}),accept:s(f).map(e=>`.${e}`).join(","),"on-preview":s(D)},{tip:a(()=>[g("div",pe," \u652F\u6301"+b(s(w))+"\u6587\u4EF6 ",1)]),default:a(()=>[t(v,{type:"primary",plain:""},{default:a(()=>[m("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:2},1032,["file-list","onUpdate:fileList","action","on-success","before-upload","accept","on-preview"])]),_:2},1024))]),_:2},1024),t(c,{span:12},{default:a(()=>[["00","05"].includes(o.value.sections[l].purchaseMethod)?(n(),d(u,{key:1,label:"\u4E2D\u6807\u901A\u77E5\u4E66"},{default:a(()=>[t(V,{"file-list":o.value.sections[l].acceptanceLetter,"onUpdate:fileList":e=>o.value.sections[l].acceptanceLetter=e,class:"w-full",action:s(h),"on-success":e=>s(C)(e,o.value.sections[l].acceptanceLetter),"before-upload":e=>s(U)(e,{types:s(f)}),accept:s(f).map(e=>`.${e}`).join(","),"on-preview":s(D)},{tip:a(()=>[g("div",me," \u652F\u6301"+b(s(w))+"\u6587\u4EF6 ",1)]),default:a(()=>[t(v,{type:"primary",plain:""},{default:a(()=>[m("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:2},1032,["file-list","onUpdate:fileList","action","on-success","before-upload","accept","on-preview"])]),_:2},1024)):(n(),d(u,{key:0,label:"\u4E2D\u6807\u901A\u77E5\u4E66",prop:`sections[${l}].acceptanceLetter`,rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20"}]},{default:a(()=>[t(V,{"file-list":o.value.sections[l].acceptanceLetter,"onUpdate:fileList":e=>o.value.sections[l].acceptanceLetter=e,class:"w-full",action:s(h),"on-success":e=>s(C)(e,o.value.sections[l].acceptanceLetter),"before-upload":e=>s(U)(e,{types:s(f)}),accept:s(f).map(e=>`.${e}`).join(","),"on-preview":s(D)},{tip:a(()=>[g("div",de," \u652F\u6301"+b(s(w))+"\u6587\u4EF6 ",1)]),default:a(()=>[t(v,{type:"primary",plain:""},{default:a(()=>[m("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:2},1032,["file-list","onUpdate:fileList","action","on-success","before-upload","accept","on-preview"])]),_:2},1032,["prop"]))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),g("p",null,[t(v,{type:"primary",plain:"",icon:"Plus",class:"w-full",onClick:B},{default:a(()=>[m("\u6DFB\u52A0\u6807\u6BB5")]),_:1})])]),_:1},8,["model"]),g("div",fe,[t(v,{onClick:i[2]||(i[2]=q=>s(j).go(-1))},{default:a(()=>[m(" \u8FD4\u56DE ")]),_:1}),t(v,{type:"primary",loading:L.value,onClick:i[3]||(i[3]=q=>O(I.value))},{default:a(()=>[m(" \u63D0\u4EA4 ")]),_:1},8,["loading"])])])}}});export{ye as default};