Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

2 lines
7.0KB

  1. import{x as J,y as K,E as U,r as P,B as z,b as i,c as w,L as R,h as o,e as c,f as l,i as d,d as x,j as S,F as G,N as h,u as s,t as k,k as Q,ai as X,aj as Y,af as Z,s as ee}from"./index-dd5fae99.js";import{h as C,i as B,f as V,b as v,c as q,e as T,g as te}from"./uploadAction-3962500e.js";const oe={key:0,class:"infoTip flex items-center mb-16"},le={key:1,class:"infoTip flex items-center mb-16"},ae={class:"el-upload__tip"},se={class:"el-upload__tip"},ne={class:"el-upload__tip"},ie={class:"flex justify-center"},re=Q({name:"auditDialog"}),de=Object.assign(re,{props:{visible:{type:Boolean,default:!1,required:!0},title:{type:String,default:"通过"},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:O}){const g=J(),N=K(),{proxy:$}=ee(),j=U.dictStore.uploadUrl,u=n,_=O,A=P(),a=P({attachments:[],opinions:[]}),L={comment:[{required:!0,message:"请输入意见",trigger:"blur"}],proposeTotalInvest:[{required:!0,message:"请输入建议总投资"}],proposeAnnualBudget:[{required:!0,message:"请输入建议年度预算"}],proposeAttachFiles:[{required:!0,message:"请上传"}],opinions:[{required:!0,message:"请上传"}]},M=async y=>{y&&await y.validate(async e=>{if(e){const I={instanceId:g.query.instanceId,projectId:g.query.projectId,projectCode:u.projectCode,taskId:u.taskId,action:u.action,auditInfo:{text:a.value.comment,attachments:a.value.attachments.map(r=>({fileId:r.response.data.id,fileName:r.response.data.originalFileName}))}};if(u.constructionSuggestions&&u.action==="PASS"&&await X({projectCode:u.projectCode,instanceId:g.query.instanceId,proposeTotalInvest:a.value.proposeTotalInvest,proposeAnnualBudget:a.value.proposeAnnualBudget,proposeAttachFiles:a.value.proposeAttachFiles&&JSON.stringify(te(a.value.proposeAttachFiles))}),a.value.opinions&&a.value.opinions.length>0)try{await Y({projectId:g.query.projectId,opinions:a.value.opinions.map(r=>({fileId:r.response.data.id,fileName:r.response.data.originalFileName}))})}catch(r){console.log(r)}const p=await Z(I);p.data==="TASKID_ERROR"?($.$message.warning("当前审批任务有变动,请返回待我处理列表!"),N.push({name:"waitMeToHandle"})):($.$message.success("提交成功!"),p.data&&N.push({query:{...g.query,taskId:p.data}}),_("close",!0),_("reload",p.data),await U.countStore.setCountStore())}})};return z(()=>u.visible,async y=>{y||(A.value.resetFields(),a.value={attachments:[],opinions:[]})}),(y,e)=>{const I=i("Warning"),p=i("el-icon"),r=i("el-input"),m=i("el-form-item"),f=i("el-col"),D=i("el-input-number"),b=i("el-button"),F=i("el-upload"),E=i("el-row"),W=i("el-form"),H=i("el-dialog");return w(),R(H,{"model-value":n.visible,title:n.title,width:"600px","destroy-on-close":"",onClose:e[10]||(e[10]=t=>_("close"))},{footer:o(()=>[c("div",ie,[l(b,{class:"ml-22",type:"primary",onClick:e[8]||(e[8]=t=>M(A.value))},{default:o(()=>e[18]||(e[18]=[d(" 提交 ")])),_:1}),l(b,{onClick:e[9]||(e[9]=t=>_("close"))},{default:o(()=>e[19]||(e[19]=[d(" 关闭 ")])),_:1})])]),default:o(()=>[n.title==="驳回"&&!n.isPerformance?(w(),x("div",oe,[l(p,{class:"mr-8"},{default:o(()=>[l(I)]),_:1}),e[11]||(e[11]=c("span",null,"驳回后,需要申报单位修改项目信息后,重新发起该流程。",-1))])):S("",!0),n.title==="退回"?(w(),x("div",le,[l(p,{class:"mr-8"},{default:o(()=>[l(I)]),_:1}),e[12]||(e[12]=c("span",null,"退回后,需要申报单位修改项目信息后,再由您进行审核确认。",-1))])):S("",!0),l(W,{ref_key:"formRef",ref:A,model:a.value,rules:L,"label-width":"auto","label-suffix":":"},{default:o(()=>[l(E,null,{default:o(()=>[l(f,{span:24},{default:o(()=>[l(m,{label:`${n.title}意见`,prop:"comment"},{default:o(()=>[l(r,{modelValue:a.value.comment,"onUpdate:modelValue":e[0]||(e[0]=t=>a.value.comment=t),maxlength:"200",placeholder:"请输入","show-word-limit":"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),n.constructionSuggestions&&n.action==="PASS"?(w(),x(G,{key:0},[l(f,{span:24},{default:o(()=>[l(m,{label:"建议总投资",prop:"proposeTotalInvest"},{default:o(()=>[l(D,{modelValue:a.value.proposeTotalInvest,"onUpdate:modelValue":e[1]||(e[1]=t=>a.value.proposeTotalInvest=t),class:"input-amount",placeholder:"请填写",min:1e-6,controls:!1,onMousewheel:e[2]||(e[2]=h(()=>{},["prevent"]))},{suffix:o(()=>e[13]||(e[13]=[d("万元")])),_:1},8,["modelValue"])]),_:1})]),_:1}),l(f,{span:24},{default:o(()=>[l(m,{label:"建议年度预算",prop:"proposeAnnualBudget"},{default:o(()=>[l(D,{modelValue:a.value.proposeAnnualBudget,"onUpdate:modelValue":e[3]||(e[3]=t=>a.value.proposeAnnualBudget=t),class:"input-amount",placeholder:"请填写",min:1e-6,controls:!1,onMousewheel:e[4]||(e[4]=h(()=>{},["prevent"]))},{suffix:o(()=>e[14]||(e[14]=[d("万元")])),_:1},8,["modelValue"])]),_:1})]),_:1}),l(f,{span:24},{default:o(()=>[l(m,{label:"评审意见附件",prop:"proposeAttachFiles"},{default:o(()=>[l(F,{"file-list":a.value.proposeAttachFiles,"onUpdate:fileList":e[5]||(e[5]=t=>a.value.proposeAttachFiles=t),class:"w-full",action:s(j),"on-success":t=>s(C)(t,a.value.proposeAttachFiles),"on-error":s(B),"before-upload":t=>s(V)(t,{types:s(v)}),accept:s(v).map(t=>`.${t}`).join(","),multiple:"",limit:10,"on-preview":s(q)},{tip:o(()=>[c("div",ae,"支持"+k(s(T))+"文件",1)]),default:o(()=>[l(b,{type:"primary",class:"mr-4"},{default:o(()=>e[15]||(e[15]=[d("上传附件")])),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload","accept","on-preview"])]),_:1})]),_:1})],64)):S("",!0),n.projectDetail&&n.projectDetail.status===20004?(w(),R(f,{key:1,span:24},{default:o(()=>[l(m,{label:"终验意见",prop:"opinions"},{default:o(()=>[l(F,{"file-list":a.value.opinions,"onUpdate:fileList":e[6]||(e[6]=t=>a.value.opinions=t),class:"w-full",action:s(j),"on-success":t=>s(C)(t,a.value.opinions),"on-error":s(B),"before-upload":t=>s(V)(t,{types:s(v)}),accept:s(v).map(t=>`.${t}`).join(","),multiple:"",limit:10,"on-preview":s(q)},{tip:o(()=>[c("div",se,"支持"+k(s(T))+"文件",1)]),default:o(()=>[l(b,{type:"primary",class:"mr-4"},{default:o(()=>e[16]||(e[16]=[d("上传附件")])),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload","accept","on-preview"])]),_:1})]),_:1})):S("",!0),l(f,{span:24},{default:o(()=>[l(m,{label:`${n.constructionSuggestions&&n.action==="PASS"?"其他附件":"附件"}`,prop:"files"},{default:o(()=>[l(F,{"file-list":a.value.attachments,"onUpdate:fileList":e[7]||(e[7]=t=>a.value.attachments=t),class:"w-full",action:s(j),"on-success":t=>s(C)(t,a.value.attachments),"on-error":s(B),"before-upload":t=>s(V)(t,{types:s(v)}),accept:s(v).map(t=>`.${t}`).join(","),multiple:"",limit:10,"on-preview":s(q)},{tip:o(()=>[c("div",ne,"支持"+k(s(T))+"文件",1)]),default:o(()=>[l(b,{type:"primary",class:"mr-4"},{default:o(()=>e[17]||(e[17]=[d("上传附件")])),_: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};