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