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

  1. import{d as G,x as H,r as k,o as J,c as i,e as r,f as y,G as _,i as e,g as m,t as f,h as t,j as d,k as $,F as D,H as B,l as P,q as M}from"./index.149277cd.js";import{p as h}from"./projectStore.ccee2ad6.js";import{s as z,a as K,b as Q}from"./reviewCheckProjectList.a19f32cd.js";const W={class:"footerPage auditList"},X={class:"card-header"},Y={class:"flex justify-between items-center"},Z={class:"flex-1"},ee={class:"font-bold"},te={class:"mt-8 search"},ae={class:"font-bold text-16 mb-8"},le={class:"flex items-center"},oe={class:"footer"},se=G({name:"auditList"}),ie=Object.assign(se,{setup(ue){const{proxy:L}=M(),b=H(),c=k({}),N=k(),p=k({}),O=async()=>{var a;const u=await h(b.query.id);p.value=u.data,c.value={reviewChecklist:((a=u.data)==null?void 0:a.reviewChecklist)&&JSON.parse(u.data.reviewChecklist)||[]}},E=async()=>{const u=await z(b.query.projectCode);c.value={reviewChecklist:u.data}},g=k(!1),F=u=>{!u||u.validate(async a=>{if(a){g.value=!0;const o=[];c.value.reviewChecklist.forEach(s=>{s.modules.forEach(V=>{o.push({...V,...s,projectCode:b.query.projectCode,modules:void 0})})});try{await K(o),g.value=!1,L.$message.success("\u63D0\u4EA4\u6210\u529F"),P.go(-1)}catch{g.value=!1}}})},I=async()=>{await Q(b.query.projectCode),L.$message.success("\u5408\u6210\u6210\u529F"),P.go(-1)};return J(()=>{b.name==="auditList"?O():E()}),(u,a)=>{const o=i("el-form-item"),s=i("el-col"),V=i("el-row"),R=i("el-form"),q=i("el-card"),v=i("el-input"),x=i("el-radio"),T=i("el-radio-group"),A=i("el-divider"),U=i("el-button");return r(),y("div",W,[u.$route.name==="auditList"?(r(),_(q,{key:0,shadow:"never",class:"mb-16"},{default:e(()=>[m("div",X,[m("div",Y,[m("div",Z,[m("p",ee,f(p.value.projectName),1),m("div",te,[t(R,{"label-suffix":":"},{default:e(()=>[t(V,{gutter:24},{default:e(()=>[t(s,{span:6},{default:e(()=>[t(o,{label:"\u9879\u76EE\u8054\u7CFB\u4EBA"},{default:e(()=>[d(f(p.value.contactName||"-"),1)]),_:1})]),_:1}),t(s,{span:6},{default:e(()=>[t(o,{label:"\u8054\u7CFB\u65B9\u5F0F"},{default:e(()=>[d(f(p.value.contactPhone||"-"),1)]),_:1})]),_:1}),t(s,{span:6},{default:e(()=>[t(o,{label:"\u5EFA\u8BBE\u5355\u4F4D"},{default:e(()=>[d(f(p.value.buildOrgName||"-"),1)]),_:1})]),_:1}),t(s,{span:6},{default:e(()=>[t(o,{label:"\u6295\u8D44\u603B\u4F30\u7B97"},{default:e(()=>[d(f(p.value.declareAmount||"-")+"\u4E07\u5143",1)]),_:1})]),_:1}),t(s,{span:6},{default:e(()=>[t(o,{label:"\u9879\u76EE\u7B80\u4ECB"},{default:e(()=>[d(f(p.value.projectIntroduction||"-"),1)]),_:1})]),_:1})]),_:1})]),_:1})])])])])]),_:1})):$("",!0),t(q,{shadow:"never"},{default:e(()=>[t(R,{ref_key:"formRef",ref:N,model:c.value,"label-suffix":":","label-position":"top"},{default:e(()=>[(r(!0),y(D,null,B(c.value.reviewChecklist,(w,C)=>{var S;return r(),y("div",{key:C},[m("p",ae,f(w.title),1),(r(!0),y(D,null,B(w.modules,(l,j)=>(r(),y("div",{key:j,class:"mb-16"},[t(V,{gutter:16,class:"items-center"},{default:e(()=>[t(s,{span:8},{default:e(()=>[t(o,{label:l.subTitle},{default:e(()=>[t(v,{modelValue:l.content,"onUpdate:modelValue":n=>l.content=n,type:"textarea",disabled:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:2},1024),t(s,{span:4},{default:e(()=>[t(o,{label:"\u5426\u51B3\u60C5\u5F62"},{default:e(()=>[t(v,{modelValue:l.rejectionSituation,"onUpdate:modelValue":n=>l.rejectionSituation=n,type:"textarea",disabled:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024),t(s,{span:6},{default:e(()=>[t(o,{label:"\u54CD\u5E94\u60C5\u51B5",class:"flex-form-item",style:{"margin-bottom":"14px"}},{default:e(()=>[t(v,{modelValue:l.responseSituation,"onUpdate:modelValue":n=>l.responseSituation=n,disabled:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),t(o,{label:"\u5BF9\u5E94\u9875\u9762",class:"flex-form-item",style:{"margin-bottom":"0"}},{default:e(()=>[t(v,{modelValue:l.corrPageNum,"onUpdate:modelValue":n=>l.corrPageNum=n,disabled:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024),u.$route.name==="auditList"?(r(),_(s,{key:0,span:6},{default:e(()=>[m("div",le,[l.reviewResult===2||l.reviewResult===3?(r(),_(o,{key:0,label:"\u5BA1\u6838\u610F\u89C1",prop:`reviewChecklist[${C}].modules[${j}].reviewComments`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],style:{"margin-right":"4px"}},{default:e(()=>[t(v,{modelValue:l.reviewComments,"onUpdate:modelValue":n=>l.reviewComments=n,type:"textarea"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):$("",!0),t(o,{prop:`reviewChecklist[${C}].modules[${j}].reviewResult`,rules:[{required:!0,message:"\u8BF7\u9009\u62E9"}],style:{"margin-bottom":"0"}},{default:e(()=>[t(T,{modelValue:l.reviewResult,"onUpdate:modelValue":n=>l.reviewResult=n,class:"resultRadiogroup"},{default:e(()=>[t(x,{label:1},{default:e(()=>a[2]||(a[2]=[d("\u901A\u8FC7")])),_:1}),t(x,{label:2},{default:e(()=>a[3]||(a[3]=[d("\u4E0D\u901A\u8FC7")])),_:1}),t(x,{label:3},{default:e(()=>a[4]||(a[4]=[d("\u4E00\u7968\u5426\u51B3")])),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])])]),_:2},1024)):(r(),_(s,{key:1,span:6},{default:e(()=>[t(o,{label:"\u5BA1\u6838\u610F\u89C1"},{default:e(()=>[t(v,{modelValue:l.reviewComments,"onUpdate:modelValue":n=>l.reviewComments=n,type:"textarea",disabled:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024))]),_:2},1024)]))),128)),C<((S=c.value.reviewChecklist)==null?void 0:S.length)-1?(r(),_(A,{key:0})):$("",!0)])}),128))]),_:1},8,["model"])]),_:1}),m("div",oe,[t(U,{onClick:a[0]||(a[0]=w=>u.$router.go(-1))},{default:e(()=>a[5]||(a[5]=[d(" \u8FD4\u56DE ")])),_:1}),u.$route.name==="auditList"?(r(),_(U,{key:0,type:"primary",loading:g.value,onClick:a[1]||(a[1]=w=>F(N.value))},{default:e(()=>a[6]||(a[6]=[d(" \u63D0\u4EA4 ")])),_:1},8,["loading"])):(r(),_(U,{key:1,type:"primary",onClick:I},{default:e(()=>a[7]||(a[7]=[d(" \u5408\u6210\u62A5\u544A ")])),_:1}))])])}}});export{ie as default};