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.

planList.3627c1f3.js 11KB

1
  1. import{d as _e,A as ve,D as be,b as M,r as g,a0 as T,L as ge,o as Ae,c as i,a4 as ye,e as A,f as V,h as a,i as l,u,I as z,k as Y,F as B,J as we,g as m,V as N,j as p,t as Me,w as xe,x as he}from"./index.d340e473.js";import{E as je}from"./index.af6ebbed.js";import{h as De,i as Ve,f as Ne}from"./uploadAction.95992a5e.js";import{l as ke,s as Pe,p as Ee,e as Ce}from"./annualPlanStore.59ea977c.js";import Oe from"./approvalDialog.195fc445.js";import Te from"./importProjectDialog.5de340b9.js";import Ye from"./exportFieldDialog.2f518c6d.js";import{u as Re}from"./useExportExc.c3c2ae13.js";import{g as R,a as Ue}from"./getIsShowRegionTree.26f6f682.js";import"./index.cf3ded3c.js";const Ie={class:"flex"},Se={class:"flex"},$e={class:"flex"},Le={class:"flex justify-between items-center"},Fe={class:"flex items-center"},Ge=m("span",{class:"mr-24"},"\u5217\u8868",-1),ze={class:"flex items-center relative"},Be=["onClick"],He=["onClick"],qe=["onClick"],We=_e({name:"planList"}),na=Object.assign(We,{props:{isTemporaryAugment:{type:Number,default:0}},setup(H){const{proxy:k}=he(),U=H,I=ve(),{statusOptions:x,statusOptionsCascader:q,projectTypeOptions:W}=be.dictStore.globalDicts||{},e=M({projectName:void 0,buildOrg:void 0,projectType:void 0,status:void 0,declareAmountMin:void 0,declareAmountMax:void 0,approveAmountMin:void 0,approveAmountMax:void 0,projectYear:void 0,times:void 0}),c=g(),S=g(0),J=M([{type:"selection",width:"50"},{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"\u7533\u62A5\u5355\u4F4D",key:"buildOrg",prop:"buildOrg",minWidth:"200",showOverflowTooltip:!0},{label:"\u9879\u76EE\u7C7B\u578B",key:"projectTypeName",prop:"projectTypeName",width:80},{label:"\u9879\u76EE\u7533\u62A5\u8D44\u91D1(\u4E07\u5143)",key:"declaredAmount",prop:"declaredAmount",width:"150"},{label:"\u9879\u76EE\u6279\u590D\u8D44\u91D1(\u4E07\u5143)",key:"approvalAmount",prop:"approvalAmount",width:"150"},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear",width:"80"},{label:"\u662F\u5426\u5F00\u542F\u65B9\u6848\u7533\u62A5",key:"isStartDeclaredProject",prop:"isStartDeclaredProject",width:"140",render:o=>T("span",o.isStartDeclaredProject?"\u662F":"\u5426")},{label:"\u9879\u76EE\u72B6\u6001",key:"status",prop:"status",width:"180",render:o=>{var t,s,d,r;return[T("span",{class:["dot mr-4",`bg-${(t=x[o.status])==null?void 0:t.color}`]}),T("span",{class:`text-${(s=x[o.status])==null?void 0:s.color}`},o.status&&((d=x[o.stage])==null?void 0:d.name)+"-"+((r=x[o.status])==null?void 0:r.name))]}},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"200",fixed:"right"}]),$=g([]),h=g({}),f=g(),K=o=>{f.value=o.regionLevel===3?o.regionCode:void 0,c.value.pageParams.pageNumber=1,_()},_=async(o=c.value.pageParams)=>{var s,d,r;const t=await ke({...o,...e,status:(s=e.status)==null?void 0:s[e.status.length-1],projectYear:e.projectYear*1||void 0,declareAmountMin:e.declareAmountMin*1||void 0,declareAmountMax:e.declareAmountMax*1||void 0,approveAmountMin:e.approveAmountMin*1||void 0,approveAmountMax:e.approveAmountMax*1||void 0,createOnMin:((d=e.times)==null?void 0:d[0])||void 0,createOnMax:((r=e.times)==null?void 0:r[1])||void 0,regionCode:f.value||void 0,times:void 0});$.value=t.data.records,S.value=t.data.total},Q=(o,t)=>!o.isStartDeclaredProject,P=()=>{_()},X=()=>{e.projectName=void 0,e.buildOrg=void 0,e.projectType=void 0,e.status=void 0,e.declareAmountMin=void 0,e.declareAmountMax=void 0,e.approveAmountMin=void 0,e.approveAmountMax=void 0,e.projectYear=void 0,e.times=void 0,c.value.pageParams.pageNumber=1,c.value.pageParams.pageSize=10,_()},E=g([]),Z=o=>{E.value=o},ee=()=>{if(!E.value.length){k.$message.warning("\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u9879\u76EE");return}k.$messageBox.confirm(`\u662F\u5426${f.value==="331181"?"\u5217\u5165\u5E74\u5EA6\u8BA1\u5212":"\u5F00\u542F\u65B9\u6848\u7533\u62A5"}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await Pe({projectIds:E.value.map(o=>o.projectId)}),k.$message.success(`${f.value==="331181"?"\u5217\u5165":"\u5F00\u542F"}\u6210\u529F\uFF01`),_()})},C=M({visible:!1}),ae=()=>{C.visible=!1},j=M({visible:!1}),te=o=>{j.visible=!0},O=()=>{j.visible=!1},{exportData:L}=Re(),le=async o=>{await L(()=>{var t,s,d;return Ee({...c.value.pageParams,...e,status:(t=e.status)==null?void 0:t[e.status.length-1],createOnMin:((s=e.times)==null?void 0:s[0])||void 0,createOnMax:((d=e.times)==null?void 0:d[1])||void 0,regionCode:f.value||void 0,isTemporaryAugment:U.isTemporaryAugment,times:void 0,exportOptionList:o})}),O()},oe=async()=>{await L(()=>{var o,t,s;return Ce({...c.value.pageParams,...e,status:(o=e.status)==null?void 0:o[e.status.length-1],createOnMin:((t=e.times)==null?void 0:t[0])||void 0,createOnMax:((s=e.times)==null?void 0:s[1])||void 0,regionCode:f.value||void 0,times:void 0,isTemporaryAugment:U.isTemporaryAugment})}),O()},ne=o=>{I.push({name:"planEdit",query:{id:o.projectId}})},v=M({visible:!1,title:void 0,rowData:void 0}),se=o=>{v.visible=!0,v.title=`\u7ACB\u9879\u6279\u590D-${o.projectName}`,v.rowData=o},re=o=>{v.visible=!1,o&&_()};return ge(()=>h.value.file,async o=>{P()}),Ae(async()=>{R(["SUPER_ADMIN","REGION_MANAGER"])||_()}),(o,t)=>{const s=i("el-col"),d=i("el-input"),r=i("el-form-item"),ie=i("el-option"),de=i("el-select"),y=i("el-row"),ue=i("el-cascader"),D=i("el-input-number"),F=i("el-date-picker"),b=i("el-button"),pe=i("el-form"),G=i("el-card"),me=i("el-upload"),ce=i("table-list"),fe=ye("hasRole");return A(),V(B,null,[a(y,null,{default:l(()=>[u(R)(["SUPER_ADMIN","REGION_MANAGER"])?(A(),z(s,{key:0,span:4,class:"pr-16"},{default:l(()=>[a(je,{params:u(Ue)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:K},null,8,["params"])]),_:1})):Y("",!0),a(s,{span:u(R)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:l(()=>[a(G,{class:"w-full search"},{default:l(()=>[a(pe,{model:e,size:"small","label-suffix":":"},{default:l(()=>[a(y,{gutter:16,class:"mb-16"},{default:l(()=>[a(s,{span:8},{default:l(()=>[a(r,{label:"\u9879\u76EE\u540D\u79F0"},{default:l(()=>[a(d,{modelValue:e.projectName,"onUpdate:modelValue":t[0]||(t[0]=n=>e.projectName=n),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:8},{default:l(()=>[a(r,{label:"\u7533\u62A5\u5355\u4F4D"},{default:l(()=>[a(d,{modelValue:e.buildOrg,"onUpdate:modelValue":t[1]||(t[1]=n=>e.buildOrg=n),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:8},{default:l(()=>[a(r,{label:"\u9879\u76EE\u7C7B\u578B"},{default:l(()=>[a(de,{modelValue:e.projectType,"onUpdate:modelValue":t[2]||(t[2]=n=>e.projectType=n),placeholder:"\u5168\u90E8",class:"w-full"},{default:l(()=>[(A(!0),V(B,null,we(u(W),(n,w)=>(A(),z(ie,{key:w,label:n,value:w},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(y,{gutter:16,class:"mb-16"},{default:l(()=>[a(s,{span:8},{default:l(()=>[a(r,{label:"\u9879\u76EE\u72B6\u6001"},{default:l(()=>[a(ue,{modelValue:e.status,"onUpdate:modelValue":t[3]||(t[3]=n=>e.status=n),class:"w-full",props:{label:"name",value:"code"},options:u(q)},null,8,["modelValue","options"])]),_:1})]),_:1}),a(s,{span:8},{default:l(()=>[a(r,{class:"whitespace-nowrap",label:"\u7533\u62A5\u8D44\u91D1(\u4E07\u5143)"},{default:l(()=>[m("div",Ie,[a(D,{modelValue:e.declareAmountMin,"onUpdate:modelValue":t[4]||(t[4]=n=>e.declareAmountMin=n),clearable:"",controls:!1,onMousewheel:t[5]||(t[5]=N(()=>{},["prevent"]))},null,8,["modelValue"]),p(" \xA0\u81F3\xA0 "),a(D,{modelValue:e.declareAmountMax,"onUpdate:modelValue":t[6]||(t[6]=n=>e.declareAmountMax=n),clearable:"",controls:!1,onMousewheel:t[7]||(t[7]=N(()=>{},["prevent"]))},null,8,["modelValue"])])]),_:1})]),_:1}),a(s,{span:8},{default:l(()=>[a(r,{class:"whitespace-nowrap",label:"\u6279\u590D\u8D44\u91D1(\u4E07\u5143)"},{default:l(()=>[m("div",Se,[a(D,{modelValue:e.approveAmountMin,"onUpdate:modelValue":t[8]||(t[8]=n=>e.approveAmountMin=n),controls:!1,clearable:"",onMousewheel:t[9]||(t[9]=N(()=>{},["prevent"]))},null,8,["modelValue"]),p(" \xA0\u81F3\xA0 "),a(D,{modelValue:e.approveAmountMax,"onUpdate:modelValue":t[10]||(t[10]=n=>e.approveAmountMax=n),controls:!1,clearable:"",onMousewheel:t[11]||(t[11]=N(()=>{},["prevent"]))},null,8,["modelValue"])])]),_:1})]),_:1})]),_:1}),a(y,{gutter:16,class:"mb-16"},{default:l(()=>[a(s,{span:8},{default:l(()=>[a(r,{label:"\u9884\u7B97\u5E74\u5EA6"},{default:l(()=>[a(F,{modelValue:e.projectYear,"onUpdate:modelValue":t[12]||(t[12]=n=>e.projectYear=n),type:"year","value-format":"YYYY",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:16},{default:l(()=>[a(r,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:l(()=>[a(F,{modelValue:e.times,"onUpdate:modelValue":t[13]||(t[13]=n=>e.times=n),type:"datetimerange",editable:!1,format:"YYYY-MM-DD HH:mm","value-format":"YYYY-MM-DD HH:mm","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(y,null,{default:l(()=>[a(s,{span:24},{default:l(()=>[a(r,{class:"btn"},{default:l(()=>[m("div",$e,[a(b,{type:"primary",onClick:P},{default:l(()=>[p("\u67E5\u8BE2 ")]),_:1}),a(b,{onClick:X},{default:l(()=>[p("\u91CD\u7F6E ")]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(G,{class:"w-full mt-8"},{header:l(()=>[m("div",Le,[m("div",Fe,[Ge,a(b,{type:"primary",size:"small",onClick:ee},{default:l(()=>[p(Me(f.value==="331181"?"\u5217\u5165\u5E74\u5EA6\u8BA1\u5212":"\u5F00\u542F\u65B9\u6848\u7533\u62A5"),1)]),_:1})]),m("div",ze,[a(me,{"file-list":h.value.file,"onUpdate:fileList":t[14]||(t[14]=n=>h.value.file=n),class:"absolute -left-70 -top-2","show-file-list":!1,data:{importFlag:o.$route.name==="annualPlanStore"?"ANNUAL_PLAN":"ANNUAL_PLAN_SUPPLEMENT"},action:"/pm/api/v1/annualPlan/importAnnualPlan","on-success":n=>u(De)(n,h.value.file,!0,P),"on-error":u(Ve),limit:1,"before-upload":n=>u(Ne)(n,{types:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]}),accept:"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{default:l(()=>[a(b,{type:"primary",plain:"",size:"small"},{default:l(()=>[p("\u5BFC\u5165 ")]),_:1})]),_:1},8,["file-list","data","on-success","on-error","before-upload"]),a(b,{type:"primary",class:"ml-10",plain:"",size:"small",onClick:oe},{default:l(()=>[p("\u5BFC\u51FA\u7F16\u8F91\u8868 ")]),_:1}),a(b,{type:"primary",plain:"",size:"small",onClick:te},{default:l(()=>[p("\u5BFC\u51FA ")]),_:1})])])]),default:l(()=>[a(ce,{ref_key:"tableListRef",ref:c,column:J,data:$.value,total:S.value,selectable:Q,onSelectionChange:Z,onGetTableData:_},{action:l(({scope:n})=>[n.row.status===10010?xe((A(),V("a",{key:0,onClick:w=>ne(n.row)},[p("\u7F16\u8F91")],8,Be)),[[fe,["\u8D85\u7EA7\u7BA1\u7406\u5458"]]]):Y("",!0),n.row.status===10014?(A(),V("a",{key:1,onClick:w=>se(n.row)},"\u7ACB\u9879\u6279\u590D",8,He)):Y("",!0),m("a",{onClick:w=>u(I).push({name:"projectDetail",query:{id:n.row.projectId}})},"\u8BE6\u60C5",8,qe)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1}),a(Oe,{visible:v.visible,title:v.title,data:v.rowData,onClose:re},null,8,["visible","title","data"]),a(Te,{visible:C.visible,data:C.rowData,onClose:ae},null,8,["visible","data"]),a(Ye,{visible:j.visible,data:j.rowData,onClose:O,onExportProject:le},null,8,["visible","data"])],64)}}});export{na as default};