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

  1. import{B as oe,Z as h,d as Ae,y as Ve,b as I,r as _,J as Ne,o as Me,c as i,e as d,f as x,h as t,i as o,u as k,G as D,k as y,F as Y,H as ee,g as A,T as U,j as C,t as Pe,q as De}from"./index.0018c8ef.js";import{E as Ce}from"./index.640deec7.js";import"./uploadAction.60337e0f.js";import{o as ae,l as Te,s as Oe,p as Ee,e as Se}from"./annualPlanStore.7d9de8ad.js";import $e from"./approvalDialog.e027d1d2.js";import Ie from"./importProjectDialog.73ab7f7e.js";import Ye from"./exportFieldDialog.4b335e62.js";import{u as Ue}from"./useExportExc.1e55871e.js";import{g as B,a as Re}from"./getIsShowRegionTree.7b9f4043.js";import Le from"./operationDialog.b7e22fd6.js";import"./index.ae9e1952.js";const{statusOptions:f}=oe.dictStore.globalDicts||{},ne={type:"selection",width:"50",reserveSelection:!0},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,b,c,v;return[h("span",{class:["dot mr-4",`bg-${(p=f[r.status])==null?void 0:p.color}`]}),h("span",{class:`text-${(b=f[r.status])==null?void 0:b.color}`},r.status&&((c=f[r.stage])==null?void 0:c.name)+"-"+((v=f[r.status])==null?void 0:v.name))]}},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"120",fixed:"right"}],Fe=[ne,{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,b,c,v;return[h("span",{class:["dot mr-4",`bg-${(p=f[r.status])==null?void 0:p.color}`]}),h("span",{class:`text-${(b=f[r.status])==null?void 0:b.color}`},r.status&&((c=f[r.stage])==null?void 0:c.name)+"-"+((v=f[r.status])==null?void 0:v.name))]}},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"180",fixed:"right"}],Ge=[ne,{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:"operationPackageName",prop:"operationPackageName",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,b,c,v;return[h("span",{class:["dot mr-4",`bg-${(p=f[r.status])==null?void 0:p.color}`]}),h("span",{class:`text-${(b=f[r.status])==null?void 0:b.color}`},r.status&&((c=f[r.stage])==null?void 0:c.name)+"-"+((v=f[r.status])==null?void 0:v.name))]}},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"150",fixed:"right"}],le={"00":te,"01":Fe,"02":Ge,"03":te},Be={class:"flex"},qe={class:"flex"},ze={class:"flex"},We={class:"flex justify-between items-center"},He={class:"flex justify-between items-center mb-20"},Je={class:"flex items-center"};const Ze=["onClick"],Ke=["onClick"],Qe=["onClick"],Xe=["onClick"],ea=["onClick"],aa=Ae({name:"planList"}),ga=Object.assign(aa,{props:{isTemporaryAugment:{type:Number,default:0}},setup(r){const{proxy:p}=De(),b=r,c=Ve(),{statusOptionsCascader:v,projectTypeOptions:re}=oe.dictStore.globalDicts||{},a=I({projectName:void 0,buildOrg:void 0,projectType:void 0,operationPackageId:void 0,status:void 0,declareAmountMin:void 0,declareAmountMax:void 0,approveAmountMin:void 0,approveAmountMax:void 0,projectYear:void 0,times:void 0}),u=_("00"),V=_(),q=_(0),z=_(le[u.value]),W=_([]),se=_({}),N=_(),ie=n=>{N.value=n.regionLevel===3?n.regionCode:void 0,V.value.pageParams.pageNumber=1,g()},g=async(n=V.value.pageParams)=>{var s,j,m;u.value!=="02"&&(a.operationPackageId=void 0);const e=await Te({...n,...a,queryProjectType:u.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:((j=a.times)==null?void 0:j[0])||void 0,createOnMax:((m=a.times)==null?void 0:m[1])||void 0,regionCode:N.value||void 0,times:void 0});W.value=e.data.records,q.value=e.data.total},ue=(n,e)=>u.value==="01"?!n.isStartDeclaredProject:!0,H=()=>{g()},de=()=>{a.projectName=void 0,a.buildOrg=void 0,a.operationPackageId=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,V.value.pageParams.pageNumber=1,V.value.pageParams.pageSize=10,g()},M=_([]),pe=n=>{M.value=n},ce=()=>{if(!M.value.length){p.$message.warning("\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u9879\u76EE");return}p.$messageBox.confirm(`\u662F\u5426${N.value==="331181"?"\u5217\u5165\u5E74\u5EA6\u8BA1\u5212":"\u5F00\u542F\u65B9\u6848\u7533\u62A5"}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await Oe({projectIds:M.value.map(n=>n.projectId)}),p.$message.success(`${N.value==="331181"?"\u5217\u5165":"\u5F00\u542F"}\u6210\u529F\uFF01`),g()})},R=I({visible:!1}),me=()=>{R.visible=!1},O=I({visible:!1}),ta=n=>{O.visible=!0},L=()=>{O.visible=!1},{exportData:J}=Ue(),fe=async n=>{await J(()=>{var e,s,j;return Ee({...V.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:((j=a.times)==null?void 0:j[1])||void 0,regionCode:N.value||void 0,isTemporaryAugment:b.isTemporaryAugment,times:void 0,exportOptionList:n})}),L()},la=async()=>{await J(()=>{var n,e,s;return Se({...V.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:N.value||void 0,times:void 0,isTemporaryAugment:b.isTemporaryAugment})}),L()},P=I({visible:!1,title:void 0,rowData:void 0}),be=n=>{P.visible=!0,P.title=`\u7ACB\u9879\u6279\u590D-${n.projectName}`,P.rowData=n},ve=n=>{P.visible=!1,n&&g()};Ne(()=>se.value.file,async n=>{H()});const F=_([]);Me(async()=>{B(["SUPER_ADMIN","REGION_MANAGER"])||g();const n=await ae();F.value=n.data});function _e(){g(),z.value=le[u.value],M.value=[]}const G=_(!1);function ye(){if(!M.value.length){p.$message.warning("\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u9879\u76EE");return}G.value=!0}function ge(){g()}async function we(){const n=await ae();F.value=n.data}return(n,e)=>{const s=i("el-col"),j=i("el-input"),m=i("el-form-item"),Z=i("el-option"),K=i("el-select"),T=i("el-row"),ke=i("el-cascader"),E=i("el-input-number"),Q=i("el-date-picker"),S=i("el-button"),he=i("el-form"),X=i("el-card"),$=i("el-tab-pane"),je=i("el-tabs"),oa=i("el-upload"),xe=i("table-list");return d(),x(Y,null,[t(T,null,{default:o(()=>[k(B)(["SUPER_ADMIN","REGION_MANAGER"])?(d(),D(s,{key:0,span:4,class:"pr-16"},{default:o(()=>[t(Ce,{params:k(Re)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:ie},null,8,["params"])]),_:1})):y("",!0),t(s,{span:k(B)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:o(()=>[t(X,{class:"w-full search"},{default:o(()=>[t(he,{model:a,size:"small","label-suffix":":"},{default:o(()=>[t(T,{gutter:16,class:"mb-16"},{default:o(()=>[t(s,{span:8},{default:o(()=>[t(m,{label:"\u9879\u76EE\u540D\u79F0"},{default:o(()=>[t(j,{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(m,{label:"\u7533\u62A5\u5355\u4F4D"},{default:o(()=>[t(j,{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(m,{label:"\u9879\u76EE\u7C7B\u578B"},{default:o(()=>[t(K,{modelValue:a.projectType,"onUpdate:modelValue":e[2]||(e[2]=l=>a.projectType=l),placeholder:"\u5168\u90E8",class:"w-full"},{default:o(()=>[(d(!0),x(Y,null,ee(k(re),(l,w)=>(d(),D(Z,{key:w,label:l,value:w},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),t(T,{gutter:16,class:"mb-16"},{default:o(()=>[t(s,{span:8},{default:o(()=>[t(m,{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:k(v)},null,8,["modelValue","options"])]),_:1})]),_:1}),t(s,{span:8},{default:o(()=>[t(m,{class:"whitespace-nowrap",label:"\u7533\u62A5\u8D44\u91D1(\u4E07\u5143)"},{default:o(()=>[A("div",Be,[t(E,{modelValue:a.declareAmountMin,"onUpdate:modelValue":e[4]||(e[4]=l=>a.declareAmountMin=l),clearable:"",controls:!1,onMousewheel:e[5]||(e[5]=U(()=>{},["prevent"]))},null,8,["modelValue"]),e[19]||(e[19]=C(" \xA0\u81F3\xA0 ")),t(E,{modelValue:a.declareAmountMax,"onUpdate:modelValue":e[6]||(e[6]=l=>a.declareAmountMax=l),clearable:"",controls:!1,onMousewheel:e[7]||(e[7]=U(()=>{},["prevent"]))},null,8,["modelValue"])])]),_:1})]),_:1}),t(s,{span:8},{default:o(()=>[t(m,{class:"whitespace-nowrap",label:"\u6279\u590D\u8D44\u91D1(\u4E07\u5143)"},{default:o(()=>[A("div",qe,[t(E,{modelValue:a.approveAmountMin,"onUpdate:modelValue":e[8]||(e[8]=l=>a.approveAmountMin=l),controls:!1,clearable:"",onMousewheel:e[9]||(e[9]=U(()=>{},["prevent"]))},null,8,["modelValue"]),e[20]||(e[20]=C(" \xA0\u81F3\xA0 ")),t(E,{modelValue:a.approveAmountMax,"onUpdate:modelValue":e[10]||(e[10]=l=>a.approveAmountMax=l),controls:!1,clearable:"",onMousewheel:e[11]||(e[11]=U(()=>{},["prevent"]))},null,8,["modelValue"])])]),_:1})]),_:1})]),_:1}),t(T,{gutter:16,class:"mb-16"},{default:o(()=>[t(s,{span:8},{default:o(()=>[t(m,{label:"\u9884\u7B97\u5E74\u5EA6"},{default:o(()=>[t(Q,{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(m,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:o(()=>[t(Q,{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}),u.value==="02"?(d(),D(s,{key:0,span:8},{default:o(()=>[t(m,{label:"\u8FD0\u7EF4\u5305"},{default:o(()=>[t(K,{modelValue:a.operationPackageId,"onUpdate:modelValue":e[14]||(e[14]=l=>a.operationPackageId=l),"reserve-keyword":"",filterable:"",placeholder:"\u5168\u90E8",class:"w-full",onVisibleChange:we},{default:o(()=>[(d(!0),x(Y,null,ee(F.value,(l,w)=>(d(),D(Z,{key:w,label:l.operationPackageName,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):y("",!0),t(T,null,{default:o(()=>[t(s,{span:24},{default:o(()=>[t(m,{class:"btn"},{default:o(()=>[A("div",ze,[t(S,{type:"primary",onClick:H},{default:o(()=>e[21]||(e[21]=[C("\u67E5\u8BE2 ")])),_:1}),t(S,{onClick:de},{default:o(()=>e[22]||(e[22]=[C("\u91CD\u7F6E ")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(X,{class:"w-full mt-8 tab-card"},{header:o(()=>[A("div",We,[t(je,{modelValue:u.value,"onUpdate:modelValue":e[15]||(e[15]=l=>u.value=l),onTabChange:_e},{default:o(()=>[t($,{label:"\u6240\u6709\u9879\u76EE",name:"00"}),t($,{label:"\u5EFA\u8BBE\u7C7B\u9879\u76EE",name:"01"}),t($,{label:"\u8FD0\u7EF4\u7C7B\u9879\u76EE",name:"02"}),t($,{label:"\u8DE8\u5E74\u5EA6\u9879\u76EE",name:"03"})]),_:1},8,["modelValue"])])]),default:o(()=>[A("div",He,[A("div",Je,[e[24]||(e[24]=A("span",{class:"mr-24"},"\u5217\u8868",-1)),u.value==="01"?(d(),D(S,{key:0,type:"primary",size:"small",onClick:ce},{default:o(()=>[C(Pe(N.value==="331181"?"\u5217\u5165\u5E74\u5EA6\u8BA1\u5212":"\u5F00\u542F\u65B9\u6848\u7533\u62A5"),1)]),_:1})):y("",!0),u.value==="02"?(d(),D(S,{key:1,type:"primary",size:"small",onClick:ye},{default:o(()=>e[23]||(e[23]=[C("\u5173\u8054\u8FD0\u7EF4\u5305 ")])),_:1})):y("",!0)]),y("",!0)]),t(xe,{ref_key:"tableListRef",ref:V,column:z.value,data:W.value,total:q.value,"row-key":"projectId",selectable:ue,onSelectionChange:pe,onGetTableData:g},{action:o(({scope:l})=>[u.value==="00"?(d(),x("a",{key:0,onClick:w=>k(c).push({name:"projectDetail",query:{id:l.row.projectId}})},"\u8BE6\u60C5",8,Ze)):y("",!0),u.value==="01"?(d(),x(Y,{key:1},[l.row.status===10014?(d(),x("a",{key:0,onClick:w=>be(l.row)},"\u7ACB\u9879\u6279\u590D",8,Ke)):y("",!0),A("a",{onClick:w=>k(c).push({name:"projectDetail",query:{id:l.row.projectId}})},"\u8BE6\u60C5",8,Qe)],64)):y("",!0),u.value==="02"?(d(),x("a",{key:2,onClick:w=>k(c).push({name:"projectDetail",query:{id:l.row.projectId}})},"\u8BE6\u60C5",8,Xe)):y("",!0),u.value==="03"?(d(),x("a",{key:3,onClick:w=>k(c).push({name:"projectDetail",query:{id:l.row.projectId}})},"\u8BE6\u60C5",8,ea)):y("",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1}),t($e,{visible:P.visible,title:P.title,data:P.rowData,onClose:ve},null,8,["visible","title","data"]),t(Ie,{visible:R.visible,data:R.rowData,onClose:me},null,8,["visible","data"]),t(Ye,{visible:O.visible,data:O.rowData,onClose:L,onExportProject:fe},null,8,["visible","data"]),t(Le,{modelValue:G.value,"onUpdate:modelValue":e[17]||(e[17]=l=>G.value=l),"select-project-list":M.value,"onUpdate:selectProjectList":e[18]||(e[18]=l=>M.value=l),onRelevanceSuccess:ge},null,8,["modelValue","select-project-list"])],64)}}});export{ga as default};