Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

2 lignes
15KB

  1. import{d as re,D as se,r as A,A as ie,z as ne,b as x,a0 as Y,o as pe,c as d,e as S,f as C,h as t,i as o,g as u,V as y,j as f,F as ue,k,I as de,u as me,x as ce}from"./index.121be81f.js";import{e as fe,c as ve,d as _e,f as ge}from"./evaluationPlan.91b6dbaf.js";import be from"./projectListDialog.e80b9016.js";import ye from"./applicationListDialog.ca170e85.js";import{a as je}from"./performanceApprove.58589ceb.js";import{t as Ae}from"./indicatorTemplate.80c727a2.js";const we={class:"mainBox"},Ve={class:"flex items-center"},he=u("span",null,"\u9879\u76EE\u7EC8\u9A8C\u540E",-1),xe=u("span",null,"\u5929\u540E\u5F00\u59CB\u81EA\u8BC4\uFF0C",-1),Ye=u("span",null,"\u5929\u5185\u9700\u5B8C\u6210\u81EA\u8BC4",-1),Se=u("p",{class:"font-bold mb-8"},"\u9879\u76EE\u9009\u62E9",-1),ke={class:"flex"},Re=u("span",null,"\xA0~\xA0",-1),De={class:"flex items-center text-14"},Ce=u("span",null,"\xA0\u4E07\u5143\xA0\u2264\xA0\u9879\u76EE\u91D1\u989D\xA0<\xA0",-1),qe=u("span",null,"\xA0\u4E07\u5143",-1),Ne={class:"flex w-full"},Te={class:"flex items-center text-14 w-full"},Pe={class:"mb-8 flex"},Ue=["onClick"];const Ie=["onClick"],$e={class:"footer"},Ee=re({name:"addPlan"}),We=Object.assign(Ee,{setup(Le){const{projectTypeOptions:B}=se.dictStore.globalDicts||{},a=A({target:["1"],projects:[],applications:[]}),v=A(),q=ie(),_=ne(),{proxy:F}=ce(),N=(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")},T=(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:N,trigger:"blur"}],endAmount:[{required:!0,message:"\u8BF7\u8F93\u5165"},{validator:N,trigger:"blur"}],reAppraisalRate:[{required:!0,message:"\u8BF7\u9009\u62E9"}],selfAppraisalScoreRate:[{required:!0,message:"\u8BF7\u8F93\u5165"},{validator:T,trigger:"blur"}],reAppraisalScoreRate:[{required:!0,message:"\u8BF7\u8F93\u5165"},{validator:T,trigger:"blur"}],projects:[{required:!0,message:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u9879\u76EE"}],applications:[{required:!0,message:"\u8BF7\u6DFB\u52A0"}]},z=x([{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=>Y("span",B[s.projectType]||"-")},{label:"\u6A21\u677F\u7C7B\u578B",key:"templateType",prop:"templateType",render:s=>{var e,r;return Y("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=x([{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u5E94\u7528\u540D\u79F0",key:"relatedExistsApplication",prop:"relatedExistsApplication",minWidth:150,render:s=>Y("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=>Y("span",s.bizDomain)},{label:"\u53D1\u5E03\u7AEF",key:"publishSide",prop:"publishSide"},{label:"\u64CD\u4F5C",slot:"action",width:"70",fixed:"right"}]),W=A(),H=A(),g=x({visible:!1,data:void 0,params:void 0}),J=()=>{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;g.visible=!0,g.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);g.params={projectYear:e.join(","),startAmount:a.value.startAmount,endAmount:a.value.endAmount}})},U=()=>{g.visible=!1},K=s=>{a.value.projects=s.map(e=>({...e})),U()},I=(s,e)=>{a.value[e].splice(s,1)},j=x({visible:!1,data:void 0,params:{regionCode:_.query.regionId,status:30001,appraisalId:_.query.id}}),Q=()=>{var s;j.visible=!0,j.data=((s=a.value)==null?void 0:s.applications)||[]},$=()=>{j.visible=!1},X=s=>{a.value.applications=s.map(e=>({...e,appId:e.id})),$()},R=A(),Z=async s=>{!s||await s.validate(async e=>{var r,l,p,n;if(e){const c=[];for(let m=a.value.projectYearStart*1;m<=a.value.projectYearEnd*1;m++)c.push(m);const V={...a.value,auditId:R.value||void 0,projectYear:c.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};_.query.id?await fe(V):await ve(V),F.$message.success("\u63D0\u4EA4\u6210\u529F"),q.go(-1)}})},ee=async()=>{var s,e,r,l;if(_.query.auditId){const p=await je(_.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&&(R.value=p.data.id)}else{const p=await _e(_.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&&(R.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 ge({projectYear:e.join(","),startAmount:a.value.startAmount,endAmount:a.value.endAmount,reAppraisalRate:a.value.reAppraisalRate,appraisalId:_.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(),(_.query.id||_.query.auditId)&&ee()}),(s,e)=>{const r=d("el-input"),l=d("el-form-item"),p=d("el-col"),n=d("el-row"),c=d("el-input-number"),V=d("el-checkbox"),m=d("el-checkbox-group"),E=d("el-date-picker"),h=d("el-button"),L=d("el-switch"),M=d("table-list"),le=d("el-form"),oe=d("el-card");return S(),C("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,[he,t(l,{"label-width":"0",style:{"margin-bottom":"0",width:"60px"},class:"mx-4",prop:"startSelfDays"},{default:o(()=>[t(c,{modelValue:a.value.startSelfDays,"onUpdate:modelValue":e[1]||(e[1]=i=>a.value.startSelfDays=i),min:0,controls:!1,onMousewheel:e[2]||(e[2]=y(()=>{},["prevent"]))},null,8,["modelValue"])]),_:1}),xe,t(l,{"label-width":"0",style:{"margin-bottom":"0",width:"60px"},class:"mx-4",prop:"completeSelfDays"},{default:o(()=>[t(c,{modelValue:a.value.completeSelfDays,"onUpdate:modelValue":e[3]||(e[3]=i=>a.value.completeSelfDays=i),min:0,controls:!1,onMousewheel:e[4]||(e[4]=y(()=>{},["prevent"]))},null,8,["modelValue"])]),_:1}),Ye])]),_: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(()=>[f("\u9879\u76EE")]),_:1}),t(V,{label:"2"},{default:o(()=>[f("\u5E94\u7528")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),a.value.target.includes("1")?(S(),C(ue,{key:0},[Se,t(n,null,{default:o(()=>[t(p,{span:12},{default:o(()=>[u("div",ke,[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}),Re,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",De,[t(l,{label:"\u9879\u76EE\u91D1\u989D\uFF08\u8303\u56F4\uFF09",style:{"margin-bottom":"0"},prop:"startAmount"},{default:o(()=>[t(c,{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]=y(()=>{},["prevent"])),onChange:w},null,8,["modelValue"])]),_:1}),Ce,t(l,{"label-width":"0",style:{"margin-bottom":"0"},prop:"endAmount"},{default:o(()=>[t(c,{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]=y(()=>{},["prevent"])),onChange:w},null,8,["modelValue"])]),_:1}),qe])]),_: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",Ne,[t(c,{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]=y(()=>{},["prevent"])),onChange:w},null,8,["modelValue"]),f("\xA0% ")])]),_:1})]),_:1})]),_:1}),t(n,null,{default:o(()=>[t(p,{span:24,class:"mb-18"},{default:o(()=>[u("div",Te,[t(l,{label:"\u6700\u7EC8\u8BC4\u5206\u516C\u5F0F",style:{"margin-bottom":"0"},prop:"selfAppraisalScoreRate"},{default:o(()=>[t(c,{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]=y(()=>{},["prevent"]))},null,8,["modelValue"])]),_:1}),f("\xA0%\u81EA\u8BC4\u5206\xA0+\xA0 "),t(l,{"label-width":"0",style:{"margin-bottom":"0"},prop:"reAppraisalScoreRate"},{default:o(()=>[t(c,{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]=y(()=>{},["prevent"]))},null,8,["modelValue"])]),_:1}),f("\xA0%\u590D\u8BC4\u5206 ")])]),_:1})]),_:1}),u("div",Pe,[t(h,{icon:"plus",plain:"",type:"primary",onClick:ae},{default:o(()=>[f("\u7B5B\u9009\u9879\u76EE")]),_:1}),t(h,{icon:"plus",plain:"",type:"primary",onClick:J},{default:o(()=>[f("\u6DFB\u52A0\u9879\u76EE")]),_:1})]),t(l,{"label-width":"0",prop:"projects"},{default:o(()=>[t(M,{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":b=>i.row.isAppraisal=b},null,8,["modelValue","onUpdate:modelValue"])]),isReAppraisal:o(({scope:i})=>[t(L,{modelValue:i.row.isReAppraisal,"onUpdate:modelValue":b=>i.row.isReAppraisal=b},null,8,["modelValue","onUpdate:modelValue"])]),action:o(({scope:i})=>[i.row.selfAppraisalScoreTime&&i.row.selfAppraisalTotalScore?k("",!0):(S(),C("a",{key:0,class:"text-danger",onClick:b=>I(i.$index,"projects")},"\u5220\u9664",8,Ue))]),_:1},8,["column","data"])]),_:1})],64)):k("",!0),k("",!0),a.value.target.includes("2")?(S(),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(M,{ref_key:"tableListRef1",ref:H,column:G,pagination:!1,data:a.value.applications,"empty-temp":!1,class:"flex-1"},{action:o(({scope:i})=>[u("a",{class:"text-danger",onClick:b=>I(i.$index,"applications")},"\u5220\u9664",8,Ie)]),_:1},8,["column","data"]),u("div",null,[t(h,{icon:"plus",plain:"",type:"primary",class:"mt-16",onClick:Q},{default:o(()=>[f("\u6DFB\u52A0\u5E94\u7528")]),_:1})])]),_:1})]),_:1})]),_:1})):k("",!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",$e,[t(h,{type:"primary",onClick:e[19]||(e[19]=i=>Z(v.value))},{default:o(()=>[f(" \u63D0\u4EA4 ")]),_:1}),t(h,{onClick:e[20]||(e[20]=i=>me(q).go(-1))},{default:o(()=>[f("\u53D6\u6D88")]),_:1})]),t(be,{visible:g.visible,data:g.data,params:g.params,"template-type-list-data":D.value,onClose:U,onGetProjectData:K},null,8,["visible","data","params","template-type-list-data"]),t(ye,{visible:j.visible,data:j.data,params:j.params,onClose:$,onGetAppData:X},null,8,["visible","data","params"])])}}});export{We as default};