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

  1. import{d as re,B as se,r as A,y as ie,x as ne,b as Y,Z as S,o as pe,c as d,e as k,f as q,h as t,i as o,g as u,T as _,j as c,F as ue,k as R,G as de,u as me,q as fe}from"./index.88314652.js";import{e as ce,c as ve,d as ge,f as be}from"./evaluationPlan.4bbb0c22.js";import ye from"./projectListDialog.44052643.js";import _e from"./applicationListDialog.742b89fa.js";import{a as je}from"./performanceApprove.6362e212.js";import{t as Ae}from"./indicatorTemplate.d39a8306.js";const we={class:"mainBox"},Ve={class:"flex items-center"},xe={class:"flex"},Ye={class:"flex items-center text-14"},Se={class:"flex w-full"},ke={class:"flex items-center text-14 w-full"},Re={class:"mb-8 flex"},Ce=["onClick"];const De=["onClick"],qe={class:"footer"},Ne=re({name:"addPlan"}),Le=Object.assign(Ne,{setup(Te){const{projectTypeOptions:M}=se.dictStore.globalDicts||{},a=A({target:["1"],projects:[],applications:[]}),v=A(),N=ie(),g=ne(),{proxy:F}=fe(),T=(s,e,r)=>{e||r(),/^\d+(\.\d{1,6})?$/.test(e)?e*1>=1e8?r("\u8BF7\u8F93\u5165\u6B63\u786E\u683C\u5F0F\uFF0C\u5C0F\u4E8E100000000"):a.value.startAmount&&a.value.endAmount&&a.value.startAmount>a.value.endAmount?r("\u9879\u76EE\u91D1\u989D\u8303\u56F4\u7684\u8D77\u59CB\u91D1\u989D\u4E0D\u80FD\u5927\u4E8E\u6700\u7EC8\u91D1\u989D"):r():r("\u8BF7\u8F93\u5165\u6B63\u786E\u683C\u5F0F\uFF0C\u6700\u591A\u4FDD\u7559\u516D\u4F4D\u5C0F\u6570")},h=(s,e,r)=>{e||r(),a.value.selfAppraisalScoreRate&&a.value.reAppraisalScoreRate&&a.value.selfAppraisalScoreRate+a.value.reAppraisalScoreRate!==100?r("\u81EA\u8BC4\u5206\u548C\u590D\u8BC4\u5206\u6BD4\u4F8B\u76F8\u52A0\u5FC5\u987B\u7B49\u4E8E100"):r()},P=(s,e,r)=>{e||r(),a.value.projectYearStart>a.value.projectYearEnd?r("\u5F00\u59CB\u5E74\u4EFD\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u7ED3\u675F\u5E74\u4EFD"):r()},O={name:[{required:!0,message:"\u8BF7\u8F93\u5165"}],startSelfDays:[{required:!0,message:"\u8BF7\u8F93\u5165"}],completeSelfDays:[{required:!0,message:"\u8BF7\u8F93\u5165"}],target:[{required:!0,message:"\u8BF7\u9009\u62E9"}],projectYear:[{required:!0,message:"\u8BF7\u9009\u62E9"}],projectYearStart:[{required:!0,message:"\u8BF7\u9009\u62E9"},{validator:P,trigger:"blur"}],projectYearEnd:[{required:!0,message:"\u8BF7\u9009\u62E9"},{validator:P,trigger:"blur"}],startAmount:[{required:!0,message:"\u8BF7\u8F93\u5165"},{validator:T,trigger:"blur"}],endAmount:[{required:!0,message:"\u8BF7\u8F93\u5165"},{validator:T,trigger:"blur"}],reAppraisalRate:[{required:!0,message:"\u8BF7\u9009\u62E9"}],selfAppraisalScoreRate:[{required:!0,message:"\u8BF7\u8F93\u5165"},{validator:h,trigger:"blur"}],reAppraisalScoreRate:[{required:!0,message:"\u8BF7\u8F93\u5165"},{validator:h,trigger:"blur"}],projects:[{required:!0,message:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u9879\u76EE"}],applications:[{required:!0,message:"\u8BF7\u6DFB\u52A0"}]},z=Y([{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear"},{label:"\u9879\u76EE\u91D1\u989D",key:"declareAmount",prop:"declareAmount"},{label:"\u7533\u62A5\u5355\u4F4D",key:"buildOrgName",prop:"buildOrgName"},{label:"\u9879\u76EE\u7C7B\u578B",key:"projectType",prop:"projectType",render:s=>S("span",M[s.projectType]||"-")},{label:"\u6A21\u677F\u7C7B\u578B",key:"templateType",prop:"templateType",render:s=>{var e,r;return S("span",((r=(e=D.value)==null?void 0:e.find(l=>l.id===s.templateType))==null?void 0:r.name)||"-")}},{label:"\u662F\u5426\u590D\u8BC4",key:"isReAppraisal",slot:"isReAppraisal"},{label:"\u64CD\u4F5C",slot:"action",width:"70",fixed:"right"}]),G=Y([{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u5E94\u7528\u540D\u79F0",key:"relatedExistsApplication",prop:"relatedExistsApplication",minWidth:150,render:s=>S("span",s.relatedExistsApplication||s.applicationName),showOverflowTooltip:!0},{label:"\u7533\u62A5\u5355\u4F4D",key:"buildOrgName",prop:"buildOrgName"},{label:"\u5E94\u7528\u7C7B\u578B",key:"applicationType",prop:"applicationType"},{label:"\u5E94\u7528\u9886\u57DF",key:"bizDomain",prop:"bizDomain",render:s=>S("span",s.bizDomain)},{label:"\u53D1\u5E03\u7AEF",key:"publishSide",prop:"publishSide"},{label:"\u64CD\u4F5C",slot:"action",width:"70",fixed:"right"}]),W=A(),Z=A(),b=Y({visible:!1,data:void 0,params:void 0}),H=()=>{const s=[];s.push(new Promise((e,r)=>{v.value.validateField("projectYear",l=>{l?e():r(!1)})})),s.push(new Promise((e,r)=>{v.value.validateField("startAmount",l=>{l?e():r(!1)})})),s.push(new Promise((e,r)=>{v.value.validateField("endAmount",l=>{l?e():r(!1)})})),Promise.all([...s]).then(()=>{var r;b.visible=!0,b.data=((r=a.value)==null?void 0:r.projects)||[];const e=[];for(let l=a.value.projectYearStart*1;l<=a.value.projectYearEnd*1;l++)e.push(l);b.params={projectYear:e.join(","),startAmount:a.value.startAmount,endAmount:a.value.endAmount}})},U=()=>{b.visible=!1},J=s=>{a.value.projects=s.map(e=>({...e})),U()},I=(s,e)=>{a.value[e].splice(s,1)},j=Y({visible:!1,data:void 0,params:{regionCode:g.query.regionId,status:30001,appraisalId:g.query.id}}),K=()=>{var s;j.visible=!0,j.data=((s=a.value)==null?void 0:s.applications)||[]},$=()=>{j.visible=!1},Q=s=>{a.value.applications=s.map(e=>({...e,appId:e.id})),$()},C=A(),X=async s=>{!s||await s.validate(async e=>{var r,l,p,n;if(e){const f=[];for(let m=a.value.projectYearStart*1;m<=a.value.projectYearEnd*1;m++)f.push(m);const V={...a.value,auditId:C.value||void 0,projectYear:f.join(","),target:a.value.target.join(","),projects:a.value.target.includes("1")&&((l=(r=a.value)==null?void 0:r.projects)==null?void 0:l.map(m=>({...m,id:m.projectId||m.id})))||void 0,applicationIds:a.value.target.includes("2")&&((n=(p=a.value)==null?void 0:p.applications)==null?void 0:n.map(m=>m.appId))||void 0,applications:void 0,auditInfo:void 0,auditStatus:void 0,auditStatusName:void 0,auditMessage:void 0,projectYearStart:void 0,projectYearEnd:void 0};g.query.id?await ce(V):await ve(V),F.$message.success("\u63D0\u4EA4\u6210\u529F"),N.go(-1)}})},ee=async()=>{var s,e,r,l;if(g.query.auditId){const p=await je(g.query.auditId),n=(s=p.data.appraisalDetail)==null?void 0:s.projectYear.toString().split(",");a.value={...(e=p.data)==null?void 0:e.appraisalDetail,projectYearStart:(n==null?void 0:n[0])||"",projectYearEnd:(n==null?void 0:n[n.length-1])||"",target:(r=p.data)==null?void 0:r.appraisalDetail.target.split(",")},p.data.auditStatus===3&&(C.value=p.data.id)}else{const p=await ge(g.query.id),n=(l=p.data)==null?void 0:l.projectYear.toString().split(",");a.value={...p.data,projectYearStart:(n==null?void 0:n[0])||"",projectYearEnd:(n==null?void 0:n[n.length-1])||"",target:p.data.target.split(",")},p.data.auditInfo.auditStatus===3&&(C.value=p.data.auditInfo.id)}},w=()=>{var s;(s=a.value.projects)!=null&&s.length&&(a.value.projects=[])},ae=async()=>{const s=[];s.push(new Promise((e,r)=>{v.value.validateField("projectYear",l=>{l?e():r(!1)})})),s.push(new Promise((e,r)=>{v.value.validateField("startAmount",l=>{l?e():r(!1)})})),s.push(new Promise((e,r)=>{v.value.validateField("endAmount",l=>{l?e():r(!1)})})),s.push(new Promise((e,r)=>{v.value.validateField("reAppraisalRate",l=>{l?e():r(!1)})})),Promise.all([...s]).then(async()=>{const e=[];for(let l=a.value.projectYearStart*1;l<=a.value.projectYearEnd*1;l++)e.push(l);const r=await be({projectYear:e.join(","),startAmount:a.value.startAmount,endAmount:a.value.endAmount,reAppraisalRate:a.value.reAppraisalRate,appraisalId:g.query.id||void 0});a.value.projects=r.data.map(l=>({...l,isAppraisal:!0}))})},D=A(),te=async()=>{const s=await Ae();D.value=s.data};return pe(()=>{te(),(g.query.id||g.query.auditId)&&ee()}),(s,e)=>{const r=d("el-input"),l=d("el-form-item"),p=d("el-col"),n=d("el-row"),f=d("el-input-number"),V=d("el-checkbox"),m=d("el-checkbox-group"),E=d("el-date-picker"),x=d("el-button"),L=d("el-switch"),B=d("table-list"),le=d("el-form"),oe=d("el-card");return k(),q("div",we,[t(oe,null,{default:o(()=>[t(le,{ref_key:"fromRef",ref:v,model:a.value,rules:O,"label-position":"right","label-width":"","label-suffix":":","scroll-to-error":""},{default:o(()=>[t(n,{gutter:24},{default:o(()=>[t(p,{span:12},{default:o(()=>[t(l,{label:"\u8BA1\u5212\u540D\u79F0",prop:"name"},{default:o(()=>[t(r,{modelValue:a.value.name,"onUpdate:modelValue":e[0]||(e[0]=i=>a.value.name=i),maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),t(n,{gutter:24},{default:o(()=>[t(p,{span:24},{default:o(()=>[t(l,{label:"\u81EA\u8BC4\u65F6\u95F4",required:""},{default:o(()=>[u("div",Ve,[e[21]||(e[21]=u("span",null,"\u9879\u76EE\u7EC8\u9A8C\u540E",-1)),t(l,{"label-width":"0",style:{"margin-bottom":"0",width:"60px"},class:"mx-4",prop:"startSelfDays"},{default:o(()=>[t(f,{modelValue:a.value.startSelfDays,"onUpdate:modelValue":e[1]||(e[1]=i=>a.value.startSelfDays=i),min:0,controls:!1,onMousewheel:e[2]||(e[2]=_(()=>{},["prevent"]))},null,8,["modelValue"])]),_:1}),e[22]||(e[22]=u("span",null,"\u5929\u540E\u5F00\u59CB\u81EA\u8BC4\uFF0C",-1)),t(l,{"label-width":"0",style:{"margin-bottom":"0",width:"60px"},class:"mx-4",prop:"completeSelfDays"},{default:o(()=>[t(f,{modelValue:a.value.completeSelfDays,"onUpdate:modelValue":e[3]||(e[3]=i=>a.value.completeSelfDays=i),min:0,controls:!1,onMousewheel:e[4]||(e[4]=_(()=>{},["prevent"]))},null,8,["modelValue"])]),_:1}),e[23]||(e[23]=u("span",null,"\u5929\u5185\u9700\u5B8C\u6210\u81EA\u8BC4",-1))])]),_:1})]),_:1}),t(p,{span:24},{default:o(()=>[t(l,{label:"\u8BC4\u4EF7\u5BF9\u8C61",prop:"target"},{default:o(()=>[t(m,{modelValue:a.value.target,"onUpdate:modelValue":e[5]||(e[5]=i=>a.value.target=i)},{default:o(()=>[t(V,{label:"1"},{default:o(()=>e[24]||(e[24]=[c("\u9879\u76EE")])),_:1}),t(V,{label:"2"},{default:o(()=>e[25]||(e[25]=[c("\u5E94\u7528")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),a.value.target.includes("1")?(k(),q(ue,{key:0},[e[34]||(e[34]=u("p",{class:"font-bold mb-8"},"\u9879\u76EE\u9009\u62E9",-1)),t(n,null,{default:o(()=>[t(p,{span:12},{default:o(()=>[u("div",xe,[t(l,{label:"\u9884\u7B97\u5E74\u5EA6",prop:"projectYearStart"},{default:o(()=>[t(E,{modelValue:a.value.projectYearStart,"onUpdate:modelValue":e[6]||(e[6]=i=>a.value.projectYearStart=i),type:"year",placeholder:"\u5F00\u59CB\u5E74\u4EFD",format:"YYYY","value-format":"YYYY",onChange:w},null,8,["modelValue"])]),_:1}),e[26]||(e[26]=u("span",null,"\xA0~\xA0",-1)),t(l,{"label-width":"0",prop:"projectYearStart"},{default:o(()=>[t(E,{modelValue:a.value.projectYearEnd,"onUpdate:modelValue":e[7]||(e[7]=i=>a.value.projectYearEnd=i),type:"year",placeholder:"\u7ED3\u675F\u5E74\u4EFD",format:"YYYY","value-format":"YYYY",onChange:w},null,8,["modelValue"])]),_:1})])]),_:1}),t(p,{span:24,class:"mb-18"},{default:o(()=>[u("div",Ye,[t(l,{label:"\u9879\u76EE\u91D1\u989D\uFF08\u8303\u56F4\uFF09",style:{"margin-bottom":"0"},prop:"startAmount"},{default:o(()=>[t(f,{modelValue:a.value.startAmount,"onUpdate:modelValue":e[8]||(e[8]=i=>a.value.startAmount=i),clearable:"",controls:!1,placeholder:"\u8BF7\u8F93\u5165\u8D77\u59CB\u91D1\u989D",onMousewheel:e[9]||(e[9]=_(()=>{},["prevent"])),onChange:w},null,8,["modelValue"])]),_:1}),e[27]||(e[27]=u("span",null,"\xA0\u4E07\u5143\xA0\u2264\xA0\u9879\u76EE\u91D1\u989D\xA0<\xA0",-1)),t(l,{"label-width":"0",style:{"margin-bottom":"0"},prop:"endAmount"},{default:o(()=>[t(f,{modelValue:a.value.endAmount,"onUpdate:modelValue":e[10]||(e[10]=i=>a.value.endAmount=i),clearable:"",controls:!1,placeholder:"\u8BF7\u8F93\u5165\u7ED3\u675F\u91D1\u989D",onMousewheel:e[11]||(e[11]=_(()=>{},["prevent"])),onChange:w},null,8,["modelValue"])]),_:1}),e[28]||(e[28]=u("span",null,"\xA0\u4E07\u5143",-1))])]),_:1})]),_:1}),t(n,null,{default:o(()=>[t(p,{span:8},{default:o(()=>[t(l,{label:"\u9879\u76EE\u590D\u8BC4\u5360\u6BD4",prop:"reAppraisalRate"},{default:o(()=>[u("div",Se,[t(f,{modelValue:a.value.reAppraisalRate,"onUpdate:modelValue":e[12]||(e[12]=i=>a.value.reAppraisalRate=i),clearable:"",controls:!1,placeholder:"\u8BF7\u8F93\u5165",max:100,min:0,precision:0,onMousewheel:e[13]||(e[13]=_(()=>{},["prevent"])),onChange:w},null,8,["modelValue"]),e[29]||(e[29]=c("\xA0% "))])]),_:1})]),_:1})]),_:1}),t(n,null,{default:o(()=>[t(p,{span:24,class:"mb-18"},{default:o(()=>[u("div",ke,[t(l,{label:"\u6700\u7EC8\u8BC4\u5206\u516C\u5F0F",style:{"margin-bottom":"0"},prop:"selfAppraisalScoreRate"},{default:o(()=>[t(f,{modelValue:a.value.selfAppraisalScoreRate,"onUpdate:modelValue":e[14]||(e[14]=i=>a.value.selfAppraisalScoreRate=i),class:"width-150",clearable:"",controls:!1,placeholder:"\u8BF7\u8F93\u5165",precision:0,max:100,min:0,onMousewheel:e[15]||(e[15]=_(()=>{},["prevent"]))},null,8,["modelValue"])]),_:1}),e[30]||(e[30]=c("\xA0%\u81EA\u8BC4\u5206\xA0+\xA0 ")),t(l,{"label-width":"0",style:{"margin-bottom":"0"},prop:"reAppraisalScoreRate"},{default:o(()=>[t(f,{modelValue:a.value.reAppraisalScoreRate,"onUpdate:modelValue":e[16]||(e[16]=i=>a.value.reAppraisalScoreRate=i),class:"width-150",clearable:"",controls:!1,precision:0,max:100,min:0,placeholder:"\u8BF7\u8F93\u5165",onMousewheel:e[17]||(e[17]=_(()=>{},["prevent"]))},null,8,["modelValue"])]),_:1}),e[31]||(e[31]=c("\xA0%\u590D\u8BC4\u5206 "))])]),_:1})]),_:1}),u("div",Re,[t(x,{icon:"plus",plain:"",type:"primary",onClick:ae},{default:o(()=>e[32]||(e[32]=[c("\u7B5B\u9009\u9879\u76EE")])),_:1}),t(x,{icon:"plus",plain:"",type:"primary",onClick:H},{default:o(()=>e[33]||(e[33]=[c("\u6DFB\u52A0\u9879\u76EE")])),_:1})]),t(l,{"label-width":"0",prop:"projects"},{default:o(()=>[t(B,{ref_key:"tableListRef",ref:W,column:z,pagination:!1,data:a.value.projects,"empty-temp":!1,class:"flex-1 mb-16"},{isAppraisal:o(({scope:i})=>[t(L,{modelValue:i.row.isAppraisal,"onUpdate:modelValue":y=>i.row.isAppraisal=y},null,8,["modelValue","onUpdate:modelValue"])]),isReAppraisal:o(({scope:i})=>[t(L,{modelValue:i.row.isReAppraisal,"onUpdate:modelValue":y=>i.row.isReAppraisal=y},null,8,["modelValue","onUpdate:modelValue"])]),action:o(({scope:i})=>[i.row.selfAppraisalScoreTime&&i.row.selfAppraisalTotalScore?R("",!0):(k(),q("a",{key:0,class:"text-danger",onClick:y=>I(i.$index,"projects")},"\u5220\u9664",8,Ce))]),_:1},8,["column","data"])]),_:1})],64)):R("",!0),R("",!0),a.value.target.includes("2")?(k(),de(n,{key:2,gutter:24},{default:o(()=>[t(p,{span:24},{default:o(()=>[t(l,{label:"\u8BC4\u4EF7\u5E94\u7528",prop:"applications"},{default:o(()=>[t(B,{ref_key:"tableListRef1",ref:Z,column:G,pagination:!1,data:a.value.applications,"empty-temp":!1,class:"flex-1"},{action:o(({scope:i})=>[u("a",{class:"text-danger",onClick:y=>I(i.$index,"applications")},"\u5220\u9664",8,De)]),_:1},8,["column","data"]),u("div",null,[t(x,{icon:"plus",plain:"",type:"primary",class:"mt-16",onClick:K},{default:o(()=>e[36]||(e[36]=[c("\u6DFB\u52A0\u5E94\u7528")])),_:1})])]),_:1})]),_:1})]),_:1})):R("",!0),t(n,{gutter:16},{default:o(()=>[t(p,{span:12},{default:o(()=>[t(l,{label:"\u5907\u6CE8"},{default:o(()=>[t(r,{modelValue:a.value.remark,"onUpdate:modelValue":e[18]||(e[18]=i=>a.value.remark=i),type:"textarea",maxlength:200,"show-word-limit":""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),u("div",qe,[t(x,{type:"primary",onClick:e[19]||(e[19]=i=>X(v.value))},{default:o(()=>e[37]||(e[37]=[c(" \u63D0\u4EA4 ")])),_:1}),t(x,{onClick:e[20]||(e[20]=i=>me(N).go(-1))},{default:o(()=>e[38]||(e[38]=[c("\u53D6\u6D88")])),_:1})]),t(ye,{visible:b.visible,data:b.data,params:b.params,"template-type-list-data":D.value,onClose:U,onGetProjectData:J},null,8,["visible","data","params","template-type-list-data"]),t(_e,{visible:j.visible,data:j.data,params:j.params,onClose:$,onGetAppData:Q},null,8,["visible","data","params"])])}}});export{Le as default};