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
6.4KB

  1. import{d as z,z as H,A as J,D as B,r as j,L as K,c as i,e as h,I as G,i as e,g as f,h as t,j as p,f as I,k as A,F as Q,V as T,u as s,t as q,ah as X,ae as Y,x as Z}from"./index.cfb2717e.js";import{h as $,i as N,f as P,c as w,b as R,e as U,g as ee}from"./uploadAction.a855217d.js";const te={key:0,class:"infoTip flex items-center mb-16"},oe=f("span",null,"\u9A73\u56DE\u540E\uFF0C\u9700\u8981\u7533\u62A5\u5355\u4F4D\u4FEE\u6539\u9879\u76EE\u4FE1\u606F\u540E\uFF0C\u91CD\u65B0\u53D1\u8D77\u8BE5\u6D41\u7A0B\u3002",-1),ae={key:1,class:"infoTip flex items-center mb-16"},le=f("span",null,"\u9000\u56DE\u540E\uFF0C\u9700\u8981\u7533\u62A5\u5355\u4F4D\u4FEE\u6539\u9879\u76EE\u4FE1\u606F\u540E\uFF0C\u518D\u7531\u60A8\u8FDB\u884C\u5BA1\u6838\u786E\u8BA4\u3002",-1),se={class:"el-upload__tip"},ne={class:"el-upload__tip"},ie={class:"flex justify-center"},re=z({name:"auditDialog"}),de=Object.assign(re,{props:{visible:{type:Boolean,default:!1,required:!0},title:{type:String,default:"\u901A\u8FC7"},taskId:{type:String,default:""},action:{type:String,default:""},constructionSuggestions:{type:Boolean,default:!1},projectCode:{type:String,default:""},isPerformance:{type:Boolean,default:!1}},emits:["close","reload"],setup(n,{emit:D}){const v=H(),F=J(),{proxy:x}=Z(),C=B.dictStore.uploadUrl,r=n,g=D,S=j(),l=j({attachments:[]}),M={comment:[{required:!0,message:"\u8BF7\u8F93\u5165\u610F\u89C1",trigger:"blur"}],proposeTotalInvest:[{required:!0,message:"\u8BF7\u8F93\u5165\u5EFA\u8BAE\u603B\u6295\u8D44"}],proposeAnnualBudget:[{required:!0,message:"\u8BF7\u8F93\u5165\u5EFA\u8BAE\u5E74\u5EA6\u9884\u7B97"}],proposeAttachFiles:[{required:!0,message:"\u8BF7\u4E0A\u4F20"}]},L=async d=>{!d||await d.validate(async a=>{if(a){const _={instanceId:v.query.instanceId,projectId:v.query.projectId,projectCode:r.projectCode,taskId:r.taskId,action:r.action,auditInfo:{text:l.value.comment,attachments:l.value.attachments.map(y=>({fileId:y.response.data.id,fileName:y.response.data.originalFileName}))}};r.constructionSuggestions&&r.action==="PASS"&&await X({projectCode:r.projectCode,instanceId:v.query.instanceId,proposeTotalInvest:l.value.proposeTotalInvest,proposeAnnualBudget:l.value.proposeAnnualBudget,proposeAttachFiles:l.value.proposeAttachFiles&&JSON.stringify(ee(l.value.proposeAttachFiles))});const u=await Y(_);u.data==="TASKID_ERROR"?(x.$message.warning("\u5F53\u524D\u5BA1\u6279\u4EFB\u52A1\u6709\u53D8\u52A8\uFF0C\u8BF7\u8FD4\u56DE\u5F85\u6211\u5904\u7406\u5217\u8868\uFF01"),F.push({name:"waitMeToHandle"})):(x.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),u.data&&F.push({query:{...v.query,taskId:u.data}}),g("close",!0),g("reload",u.data),await B.countStore.setCountStore())}})};return K(()=>r.visible,async d=>{d||(S.value.resetFields(),l.value={})}),(d,a)=>{const _=i("Warning"),u=i("el-icon"),y=i("el-input"),c=i("el-form-item"),m=i("el-col"),V=i("el-input-number"),b=i("el-button"),k=i("el-upload"),O=i("el-row"),E=i("el-form"),W=i("el-dialog");return h(),G(W,{"model-value":n.visible,title:n.title,width:"600px","destroy-on-close":"",onClose:a[9]||(a[9]=o=>g("close"))},{footer:e(()=>[f("div",ie,[t(b,{class:"ml-22",type:"primary",onClick:a[7]||(a[7]=o=>L(S.value))},{default:e(()=>[p(" \u63D0\u4EA4 ")]),_:1}),t(b,{onClick:a[8]||(a[8]=o=>g("close"))},{default:e(()=>[p(" \u5173\u95ED ")]),_:1})])]),default:e(()=>[n.title==="\u9A73\u56DE"&&!n.isPerformance?(h(),I("div",te,[t(u,{class:"mr-8"},{default:e(()=>[t(_)]),_:1}),oe])):A("",!0),n.title==="\u9000\u56DE"?(h(),I("div",ae,[t(u,{class:"mr-8"},{default:e(()=>[t(_)]),_:1}),le])):A("",!0),t(E,{ref_key:"formRef",ref:S,model:l.value,rules:M,"label-width":"auto","label-suffix":":"},{default:e(()=>[t(O,null,{default:e(()=>[t(m,{span:24},{default:e(()=>[t(c,{label:`${n.title}\u610F\u89C1`,prop:"comment"},{default:e(()=>[t(y,{modelValue:l.value.comment,"onUpdate:modelValue":a[0]||(a[0]=o=>l.value.comment=o),maxlength:"200",placeholder:"\u8BF7\u8F93\u5165","show-word-limit":"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),n.constructionSuggestions&&n.action==="PASS"?(h(),I(Q,{key:0},[t(m,{span:24},{default:e(()=>[t(c,{label:"\u5EFA\u8BAE\u603B\u6295\u8D44",prop:"proposeTotalInvest"},{default:e(()=>[t(V,{modelValue:l.value.proposeTotalInvest,"onUpdate:modelValue":a[1]||(a[1]=o=>l.value.proposeTotalInvest=o),class:"input-amount",placeholder:"\u8BF7\u586B\u5199",min:1e-6,controls:!1,onMousewheel:a[2]||(a[2]=T(()=>{},["prevent"]))},{suffix:e(()=>[p("\u4E07\u5143")]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(m,{span:24},{default:e(()=>[t(c,{label:"\u5EFA\u8BAE\u5E74\u5EA6\u9884\u7B97",prop:"proposeAnnualBudget"},{default:e(()=>[t(V,{modelValue:l.value.proposeAnnualBudget,"onUpdate:modelValue":a[3]||(a[3]=o=>l.value.proposeAnnualBudget=o),class:"input-amount",placeholder:"\u8BF7\u586B\u5199",min:1e-6,controls:!1,onMousewheel:a[4]||(a[4]=T(()=>{},["prevent"]))},{suffix:e(()=>[p("\u4E07\u5143")]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(m,{span:24},{default:e(()=>[t(c,{label:"\u8BC4\u5BA1\u610F\u89C1\u9644\u4EF6",prop:"proposeAttachFiles"},{default:e(()=>[t(k,{"file-list":l.value.proposeAttachFiles,"onUpdate:fileList":a[5]||(a[5]=o=>l.value.proposeAttachFiles=o),class:"w-full",action:s(C),"on-success":o=>s($)(o,l.value.proposeAttachFiles),"on-error":s(N),"before-upload":o=>s(P)(o,{types:s(w)}),accept:s(w).map(o=>`.${o}`).join(","),multiple:"",limit:10,"on-preview":s(R)},{tip:e(()=>[f("div",se,"\u652F\u6301"+q(s(U))+"\u6587\u4EF6",1)]),default:e(()=>[t(b,{type:"primary",class:"mr-4"},{default:e(()=>[p("\u4E0A\u4F20\u9644\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload","accept","on-preview"])]),_:1})]),_:1})],64)):A("",!0),t(m,{span:24},{default:e(()=>[t(c,{label:`${n.constructionSuggestions&&n.action==="PASS"?"\u5176\u4ED6\u9644\u4EF6":"\u9644\u4EF6"}`,prop:"files"},{default:e(()=>[t(k,{"file-list":l.value.attachments,"onUpdate:fileList":a[6]||(a[6]=o=>l.value.attachments=o),class:"w-full",action:s(C),"on-success":o=>s($)(o,l.value.attachments),"on-error":s(N),"before-upload":o=>s(P)(o,{types:s(w)}),accept:s(w).map(o=>`.${o}`).join(","),multiple:"",limit:10,"on-preview":s(R)},{tip:e(()=>[f("div",ne,"\u652F\u6301"+q(s(U))+"\u6587\u4EF6",1)]),default:e(()=>[t(b,{type:"primary",class:"mr-4"},{default:e(()=>[p("\u4E0A\u4F20\u9644\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload","accept","on-preview"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"])}}});export{de as default};