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

  1. import{B as le,Z as h,d as De,y as Ce,b as U,r as x,J as Ne,o as Ve,c as i,a2 as Pe,e as d,f as k,h as t,i as o,u as f,G as R,k as _,F as T,H as Oe,g,T as I,j as v,t as Te,w as W,q as Ee}from"./index.a2494fc2.js";import{E as $e}from"./index.108a55d4.js";import{h as Se,i as Ye,f as Ue}from"./uploadAction.0eabe13b.js";import{l as Re,s as Ie,p as Le,e as Ge}from"./annualPlanStore.a72df6b3.js";import Fe from"./approvalDialog.53710b98.js";import qe from"./importProjectDialog.ce9905ab.js";import ze from"./exportFieldDialog.50515003.js";import{u as Be}from"./useExportExc.03cd7129.js";import{g as H,a as We}from"./getIsShowRegionTree.7b64ce60.js";import He from"./operationDialog.b88997b2.js";import"./index.7c249f3d.js";const{statusOptions:b}=le.dictStore.globalDicts||{},oe={type:"selection",width:"50"},te=[{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:r=>h("span",r.isStartDeclaredProject?"\u662F":"\u5426")},{label:"\u9879\u76EE\u72B6\u6001",key:"status",prop:"status",width:"180",render:r=>{var p,y,u,w;return[h("span",{class:["dot mr-4",`bg-${(p=b[r.status])==null?void 0:p.color}`]}),h("span",{class:`text-${(y=b[r.status])==null?void 0:y.color}`},r.status&&((u=b[r.stage])==null?void 0:u.name)+"-"+((w=b[r.status])==null?void 0:w.name))]}},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"120",fixed:"right"}],Je=[oe,{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:r=>h("span",r.isStartDeclaredProject?"\u662F":"\u5426")},{label:"\u9879\u76EE\u72B6\u6001",key:"status",prop:"status",width:"180",render:r=>{var p,y,u,w;return[h("span",{class:["dot mr-4",`bg-${(p=b[r.status])==null?void 0:p.color}`]}),h("span",{class:`text-${(y=b[r.status])==null?void 0:y.color}`},r.status&&((u=b[r.stage])==null?void 0:u.name)+"-"+((w=b[r.status])==null?void 0:w.name))]}},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"180",fixed:"right"}],Ze=[oe,{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:"\u8FD0\u7EF4\u5305",key:"declaredAmount",prop:"declaredAmount",width:"150"},{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:r=>h("span",r.isStartDeclaredProject?"\u662F":"\u5426")},{label:"\u9879\u76EE\u72B6\u6001",key:"status",prop:"status",width:"180",render:r=>{var p,y,u,w;return[h("span",{class:["dot mr-4",`bg-${(p=b[r.status])==null?void 0:p.color}`]}),h("span",{class:`text-${(y=b[r.status])==null?void 0:y.color}`},r.status&&((u=b[r.stage])==null?void 0:u.name)+"-"+((w=b[r.status])==null?void 0:w.name))]}},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"150",fixed:"right"}],ae={"00":te,"01":Je,"02":Ze,"03":te},Ke={class:"flex"},Qe={class:"flex"},Xe={class:"flex"},et={class:"flex justify-between items-center"},tt={class:"flex justify-between items-center mb-20"},at={class:"flex items-center"},lt={class:"flex items-center relative"},ot=["onClick"],nt=["onClick"],rt=["onClick"],st=["onClick"],it=["onClick"],ut=["onClick"],dt=["onClick"],pt=["onClick"],mt=De({name:"planList"}),xt=Object.assign(mt,{props:{isTemporaryAugment:{type:Number,default:0}},setup(r){const{proxy:p}=Ee(),y=r,u=Ce(),{statusOptionsCascader:w,projectTypeOptions:ne}=le.dictStore.globalDicts||{},a=U({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}),m=x("00"),D=x(),J=x(0),Z=x(ae[m.value]),K=x([]),E=x({}),C=x(),re=n=>{C.value=n.regionLevel===3?n.regionCode:void 0,D.value.pageParams.pageNumber=1,A()},A=async(n=D.value.pageParams)=>{var s,M,c;const e=await Re({...n,...a,queryProjectType:m.value,status:(s=a.status)==null?void 0:s[a.status.length-1],projectYear:a.projectYear*1||void 0,declareAmountMin:a.declareAmountMin*1||void 0,declareAmountMax:a.declareAmountMax*1||void 0,approveAmountMin:a.approveAmountMin*1||void 0,approveAmountMax:a.approveAmountMax*1||void 0,createOnMin:((M=a.times)==null?void 0:M[0])||void 0,createOnMax:((c=a.times)==null?void 0:c[1])||void 0,regionCode:C.value||void 0,times:void 0});K.value=e.data.records,J.value=e.data.total},se=(n,e)=>m.value==="01"?!n.isStartDeclaredProject:!0,L=()=>{A()},ie=()=>{a.projectName=void 0,a.buildOrg=void 0,a.projectType=void 0,a.status=void 0,a.declareAmountMin=void 0,a.declareAmountMax=void 0,a.approveAmountMin=void 0,a.approveAmountMax=void 0,a.projectYear=void 0,a.times=void 0,D.value.pageParams.pageNumber=1,D.value.pageParams.pageSize=10,A()},N=x([]),ue=n=>{N.value=n},de=()=>{if(!N.value.length){p.$message.warning("\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u9879\u76EE");return}p.$messageBox.confirm(`\u662F\u5426${C.value==="331181"?"\u5217\u5165\u5E74\u5EA6\u8BA1\u5212":"\u5F00\u542F\u65B9\u6848\u7533\u62A5"}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await Ie({projectIds:N.value.map(n=>n.projectId)}),p.$message.success(`${C.value==="331181"?"\u5217\u5165":"\u5F00\u542F"}\u6210\u529F\uFF01`),A()})},G=U({visible:!1}),pe=()=>{G.visible=!1},$=U({visible:!1}),me=n=>{$.visible=!0},F=()=>{$.visible=!1},{exportData:Q}=Be(),ce=async n=>{await Q(()=>{var e,s,M;return Le({...D.value.pageParams,...a,status:(e=a.status)==null?void 0:e[a.status.length-1],createOnMin:((s=a.times)==null?void 0:s[0])||void 0,createOnMax:((M=a.times)==null?void 0:M[1])||void 0,regionCode:C.value||void 0,isTemporaryAugment:y.isTemporaryAugment,times:void 0,exportOptionList:n})}),F()},fe=async()=>{await Q(()=>{var n,e,s;return Ge({...D.value.pageParams,...a,status:(n=a.status)==null?void 0:n[a.status.length-1],createOnMin:((e=a.times)==null?void 0:e[0])||void 0,createOnMax:((s=a.times)==null?void 0:s[1])||void 0,regionCode:C.value||void 0,times:void 0,isTemporaryAugment:y.isTemporaryAugment})}),F()},q=n=>{u.push({name:"planEdit",query:{id:n.projectId}})},V=U({visible:!1,title:void 0,rowData:void 0}),ve=n=>{V.visible=!0,V.title=`\u7ACB\u9879\u6279\u590D-${n.projectName}`,V.rowData=n},be=n=>{V.visible=!1,n&&A()};Ne(()=>E.value.file,async n=>{L()}),Ve(async()=>{H(["SUPER_ADMIN","REGION_MANAGER"])||A()});function ye(){A(),Z.value=ae[m.value],N.value=[]}const z=x(!1);function _e(){if(!N.value.length){p.$message.warning("\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u9879\u76EE");return}z.value=!0}function ge(){A()}return(n,e)=>{const s=i("el-col"),M=i("el-input"),c=i("el-form-item"),we=i("el-option"),je=i("el-select"),O=i("el-row"),ke=i("el-cascader"),S=i("el-input-number"),X=i("el-date-picker"),P=i("el-button"),Ae=i("el-form"),ee=i("el-card"),Y=i("el-tab-pane"),xe=i("el-tabs"),he=i("el-upload"),Me=i("table-list"),B=Pe("hasRole");return d(),k(T,null,[t(O,null,{default:o(()=>[f(H)(["SUPER_ADMIN","REGION_MANAGER"])?(d(),R(s,{key:0,span:4,class:"pr-16"},{default:o(()=>[t($e,{params:f(We)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:re},null,8,["params"])]),_:1})):_("",!0),t(s,{span:f(H)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:o(()=>[t(ee,{class:"w-full search"},{default:o(()=>[t(Ae,{model:a,size:"small","label-suffix":":"},{default:o(()=>[t(O,{gutter:16,class:"mb-16"},{default:o(()=>[t(s,{span:8},{default:o(()=>[t(c,{label:"\u9879\u76EE\u540D\u79F0"},{default:o(()=>[t(M,{modelValue:a.projectName,"onUpdate:modelValue":e[0]||(e[0]=l=>a.projectName=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(s,{span:8},{default:o(()=>[t(c,{label:"\u7533\u62A5\u5355\u4F4D"},{default:o(()=>[t(M,{modelValue:a.buildOrg,"onUpdate:modelValue":e[1]||(e[1]=l=>a.buildOrg=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(s,{span:8},{default:o(()=>[t(c,{label:"\u9879\u76EE\u7C7B\u578B"},{default:o(()=>[t(je,{modelValue:a.projectType,"onUpdate:modelValue":e[2]||(e[2]=l=>a.projectType=l),placeholder:"\u5168\u90E8",class:"w-full"},{default:o(()=>[(d(!0),k(T,null,Oe(f(ne),(l,j)=>(d(),R(we,{key:j,label:l,value:j},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),t(O,{gutter:16,class:"mb-16"},{default:o(()=>[t(s,{span:8},{default:o(()=>[t(c,{label:"\u9879\u76EE\u72B6\u6001"},{default:o(()=>[t(ke,{modelValue:a.status,"onUpdate:modelValue":e[3]||(e[3]=l=>a.status=l),class:"w-full",props:{label:"name",value:"code"},options:f(w)},null,8,["modelValue","options"])]),_:1})]),_:1}),t(s,{span:8},{default:o(()=>[t(c,{class:"whitespace-nowrap",label:"\u7533\u62A5\u8D44\u91D1(\u4E07\u5143)"},{default:o(()=>[g("div",Ke,[t(S,{modelValue:a.declareAmountMin,"onUpdate:modelValue":e[4]||(e[4]=l=>a.declareAmountMin=l),clearable:"",controls:!1,onMousewheel:e[5]||(e[5]=I(()=>{},["prevent"]))},null,8,["modelValue"]),e[18]||(e[18]=v(" \xA0\u81F3\xA0 ")),t(S,{modelValue:a.declareAmountMax,"onUpdate:modelValue":e[6]||(e[6]=l=>a.declareAmountMax=l),clearable:"",controls:!1,onMousewheel:e[7]||(e[7]=I(()=>{},["prevent"]))},null,8,["modelValue"])])]),_:1})]),_:1}),t(s,{span:8},{default:o(()=>[t(c,{class:"whitespace-nowrap",label:"\u6279\u590D\u8D44\u91D1(\u4E07\u5143)"},{default:o(()=>[g("div",Qe,[t(S,{modelValue:a.approveAmountMin,"onUpdate:modelValue":e[8]||(e[8]=l=>a.approveAmountMin=l),controls:!1,clearable:"",onMousewheel:e[9]||(e[9]=I(()=>{},["prevent"]))},null,8,["modelValue"]),e[19]||(e[19]=v(" \xA0\u81F3\xA0 ")),t(S,{modelValue:a.approveAmountMax,"onUpdate:modelValue":e[10]||(e[10]=l=>a.approveAmountMax=l),controls:!1,clearable:"",onMousewheel:e[11]||(e[11]=I(()=>{},["prevent"]))},null,8,["modelValue"])])]),_:1})]),_:1})]),_:1}),t(O,{gutter:16,class:"mb-16"},{default:o(()=>[t(s,{span:8},{default:o(()=>[t(c,{label:"\u9884\u7B97\u5E74\u5EA6"},{default:o(()=>[t(X,{modelValue:a.projectYear,"onUpdate:modelValue":e[12]||(e[12]=l=>a.projectYear=l),type:"year","value-format":"YYYY",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])]),_:1})]),_:1}),t(s,{span:16},{default:o(()=>[t(c,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:o(()=>[t(X,{modelValue:a.times,"onUpdate:modelValue":e[13]||(e[13]=l=>a.times=l),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}),t(O,null,{default:o(()=>[t(s,{span:24},{default:o(()=>[t(c,{class:"btn"},{default:o(()=>[g("div",Xe,[t(P,{type:"primary",onClick:L},{default:o(()=>e[20]||(e[20]=[v("\u67E5\u8BE2 ")])),_:1}),t(P,{onClick:ie},{default:o(()=>e[21]||(e[21]=[v("\u91CD\u7F6E ")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(ee,{class:"w-full mt-8 tab-card"},{header:o(()=>[g("div",et,[t(xe,{modelValue:m.value,"onUpdate:modelValue":e[14]||(e[14]=l=>m.value=l),onTabChange:ye},{default:o(()=>[t(Y,{label:"\u6240\u6709\u9879\u76EE",name:"00"}),t(Y,{label:"\u5EFA\u8BBE\u7C7B\u9879\u76EE",name:"01"}),t(Y,{label:"\u8FD0\u7EF4\u7C7B\u9879\u76EE",name:"02"}),t(Y,{label:"\u8DE8\u5E74\u5EA6\u9879\u76EE",name:"03"})]),_:1},8,["modelValue"])])]),default:o(()=>[g("div",tt,[g("div",at,[e[23]||(e[23]=g("span",{class:"mr-24"},"\u5217\u8868",-1)),m.value==="01"?(d(),R(P,{key:0,type:"primary",size:"small",onClick:de},{default:o(()=>[v(Te(C.value==="331181"?"\u5217\u5165\u5E74\u5EA6\u8BA1\u5212":"\u5F00\u542F\u65B9\u6848\u7533\u62A5"),1)]),_:1})):_("",!0),m.value==="02"?(d(),R(P,{key:1,type:"primary",size:"small",onClick:_e},{default:o(()=>e[22]||(e[22]=[v("\u5173\u8054\u8FD0\u7EF4\u5305 ")])),_:1})):_("",!0)]),g("div",lt,[t(he,{"file-list":E.value.file,"onUpdate:fileList":e[15]||(e[15]=l=>E.value.file=l),class:"absolute -left-70 -top-2","show-file-list":!1,data:{importFlag:n.$route.name==="annualPlanStore"?"ANNUAL_PLAN":"ANNUAL_PLAN_SUPPLEMENT"},action:"/pm/api/v1/annualPlan/importAnnualPlan","on-success":l=>f(Se)(l,E.value.file,!0,L),"on-error":f(Ye),limit:1,"before-upload":l=>f(Ue)(l,{types:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]}),accept:"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{default:o(()=>[t(P,{type:"primary",plain:"",size:"small"},{default:o(()=>e[24]||(e[24]=[v("\u5BFC\u5165 ")])),_:1})]),_:1},8,["file-list","data","on-success","on-error","before-upload"]),t(P,{type:"primary",class:"ml-10",plain:"",size:"small",onClick:fe},{default:o(()=>e[25]||(e[25]=[v("\u5BFC\u51FA\u7F16\u8F91\u8868 ")])),_:1}),t(P,{type:"primary",plain:"",size:"small",onClick:me},{default:o(()=>e[26]||(e[26]=[v("\u5BFC\u51FA ")])),_:1})])]),t(Me,{ref_key:"tableListRef",ref:D,column:Z.value,data:K.value,total:J.value,selectable:se,onSelectionChange:ue,onGetTableData:A},{action:o(({scope:l})=>[m.value==="00"?(d(),k("a",{key:0,onClick:j=>f(u).push({name:"projectDetail",query:{id:l.row.projectId}})},"\u8BE6\u60C5",8,ot)):_("",!0),m.value==="01"?(d(),k(T,{key:1},[l.row.status===10010?W((d(),k("a",{key:0,onClick:j=>q(l.row)},e[27]||(e[27]=[v("\u7F16\u8F91")]),8,nt)),[[B,["\u8D85\u7EA7\u7BA1\u7406\u5458"]]]):_("",!0),l.row.status===10014?(d(),k("a",{key:1,onClick:j=>ve(l.row)},"\u7ACB\u9879\u6279\u590D",8,rt)):_("",!0),g("a",{onClick:j=>f(u).push({name:"projectDetail",query:{id:l.row.projectId}})},"\u8BE6\u60C5",8,st)],64)):_("",!0),m.value==="02"?(d(),k(T,{key:2},[l.row.status===10010?W((d(),k("a",{key:0,onClick:j=>q(l.row)},e[28]||(e[28]=[v("\u7F16\u8F91")]),8,it)),[[B,["\u8D85\u7EA7\u7BA1\u7406\u5458"]]]):_("",!0),g("a",{onClick:j=>f(u).push({name:"projectDetail",query:{id:l.row.projectId}})},"\u8BE6\u60C5",8,ut)],64)):_("",!0),m.value==="03"?(d(),k(T,{key:3},[l.row.status===10010?W((d(),k("a",{key:0,onClick:j=>q(l.row)},e[29]||(e[29]=[v("\u7F16\u8F91")]),8,dt)),[[B,["\u8D85\u7EA7\u7BA1\u7406\u5458"]]]):_("",!0),g("a",{onClick:j=>f(u).push({name:"projectDetail",query:{id:l.row.projectId}})},"\u8BE6\u60C5",8,pt)],64)):_("",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1}),t(Fe,{visible:V.visible,title:V.title,data:V.rowData,onClose:be},null,8,["visible","title","data"]),t(qe,{visible:G.visible,data:G.rowData,onClose:pe},null,8,["visible","data"]),t(ze,{visible:$.visible,data:$.rowData,onClose:F,onExportProject:ce},null,8,["visible","data"]),t(He,{modelValue:z.value,"onUpdate:modelValue":e[16]||(e[16]=l=>z.value=l),"select-project-list":N.value,"onUpdate:selectProjectList":e[17]||(e[17]=l=>N.value=l),onRelevanceSuccess:ge},null,8,["modelValue","select-project-list"])],64)}}});export{xt as default};