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

  1. import{B as le,Z as h,d as je,y as xe,b as Y,r as _,J as Ae,o as Ne,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 I,H as ee,g as A,T as U,j as C,t as Ve,q as Me}from"./index.e8b71da7.js";import{E as Pe}from"./index.492a43bb.js";import"./uploadAction.65e21f3b.js";import{o as De,l as Ce,s as Te,p as Oe,e as Ee}from"./annualPlanStore.e306db95.js";import Se from"./approvalDialog.798add2e.js";import $e from"./importProjectDialog.65432595.js";import Ye from"./exportFieldDialog.a4d9b73a.js";import{u as Ie}from"./useExportExc.bad9edde.js";import{g as G,a as Ue}from"./getIsShowRegionTree.648871ed.js";import Re from"./operationDialog.4e92e449.js";import"./index.dd00bdfc.js";const{statusOptions:f}=le.dictStore.globalDicts||{},oe={type:"selection",width:"50"},ae=[{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:n=>h("span",n.isStartDeclaredProject?"\u662F":"\u5426")},{label:"\u9879\u76EE\u72B6\u6001",key:"status",prop:"status",width:"180",render:n=>{var p,b,c,v;return[h("span",{class:["dot mr-4",`bg-${(p=f[n.status])==null?void 0:p.color}`]}),h("span",{class:`text-${(b=f[n.status])==null?void 0:b.color}`},n.status&&((c=f[n.stage])==null?void 0:c.name)+"-"+((v=f[n.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"}],Le=[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:n=>h("span",n.isStartDeclaredProject?"\u662F":"\u5426")},{label:"\u9879\u76EE\u72B6\u6001",key:"status",prop:"status",width:"180",render:n=>{var p,b,c,v;return[h("span",{class:["dot mr-4",`bg-${(p=f[n.status])==null?void 0:p.color}`]}),h("span",{class:`text-${(b=f[n.status])==null?void 0:b.color}`},n.status&&((c=f[n.stage])==null?void 0:c.name)+"-"+((v=f[n.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"}],Fe=[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:"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:n=>h("span",n.isStartDeclaredProject?"\u662F":"\u5426")},{label:"\u9879\u76EE\u72B6\u6001",key:"status",prop:"status",width:"180",render:n=>{var p,b,c,v;return[h("span",{class:["dot mr-4",`bg-${(p=f[n.status])==null?void 0:p.color}`]}),h("span",{class:`text-${(b=f[n.status])==null?void 0:b.color}`},n.status&&((c=f[n.stage])==null?void 0:c.name)+"-"+((v=f[n.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"}],te={"00":ae,"01":Le,"02":Fe,"03":ae},Ge={class:"flex"},Be={class:"flex"},qe={class:"flex"},ze={class:"flex justify-between items-center"},We={class:"flex justify-between items-center mb-20"},He={class:"flex items-center"};const Je=["onClick"],Ze=["onClick"],Ke=["onClick"],Qe=["onClick"],Xe=["onClick"],ea=je({name:"planList"}),ya=Object.assign(ea,{props:{isTemporaryAugment:{type:Number,default:0}},setup(n){const{proxy:p}=Me(),b=n,c=xe(),{statusOptionsCascader:v,projectTypeOptions:ne}=le.dictStore.globalDicts||{},a=Y({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"),N=_(),B=_(0),q=_(te[u.value]),z=_([]),re=_({}),V=_(),se=r=>{V.value=r.regionLevel===3?r.regionCode:void 0,N.value.pageParams.pageNumber=1,g()},g=async(r=N.value.pageParams)=>{var s,j,m;u.value!=="02"&&(a.operationPackageId=void 0);const e=await Ce({...r,...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:V.value||void 0,times:void 0});z.value=e.data.records,B.value=e.data.total},ie=(r,e)=>u.value==="01"?!r.isStartDeclaredProject:!0,W=()=>{g()},ue=()=>{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,N.value.pageParams.pageNumber=1,N.value.pageParams.pageSize=10,g()},M=_([]),de=r=>{M.value=r},pe=()=>{if(!M.value.length){p.$message.warning("\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u9879\u76EE");return}p.$messageBox.confirm(`\u662F\u5426${V.value==="331181"?"\u5217\u5165\u5E74\u5EA6\u8BA1\u5212":"\u5F00\u542F\u65B9\u6848\u7533\u62A5"}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await Te({projectIds:M.value.map(r=>r.projectId)}),p.$message.success(`${V.value==="331181"?"\u5217\u5165":"\u5F00\u542F"}\u6210\u529F\uFF01`),g()})},R=Y({visible:!1}),ce=()=>{R.visible=!1},O=Y({visible:!1}),aa=r=>{O.visible=!0},L=()=>{O.visible=!1},{exportData:H}=Ie(),me=async r=>{await H(()=>{var e,s,j;return Oe({...N.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:V.value||void 0,isTemporaryAugment:b.isTemporaryAugment,times:void 0,exportOptionList:r})}),L()},ta=async()=>{await H(()=>{var r,e,s;return Ee({...N.value.pageParams,...a,status:(r=a.status)==null?void 0:r[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:V.value||void 0,times:void 0,isTemporaryAugment:b.isTemporaryAugment})}),L()},P=Y({visible:!1,title:void 0,rowData:void 0}),fe=r=>{P.visible=!0,P.title=`\u7ACB\u9879\u6279\u590D-${r.projectName}`,P.rowData=r},be=r=>{P.visible=!1,r&&g()};Ae(()=>re.value.file,async r=>{W()});const J=_([]);Ne(async()=>{G(["SUPER_ADMIN","REGION_MANAGER"])||g();const r=await De();J.value=r.data});function ve(){g(),q.value=te[u.value],M.value=[]}const F=_(!1);function _e(){if(!M.value.length){p.$message.warning("\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u9879\u76EE");return}F.value=!0}function ye(){g()}return(r,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"),ge=i("el-cascader"),E=i("el-input-number"),Q=i("el-date-picker"),S=i("el-button"),we=i("el-form"),X=i("el-card"),$=i("el-tab-pane"),ke=i("el-tabs"),la=i("el-upload"),he=i("table-list");return d(),x(I,null,[t(T,null,{default:o(()=>[k(G)(["SUPER_ADMIN","REGION_MANAGER"])?(d(),D(s,{key:0,span:4,class:"pr-16"},{default:o(()=>[t(Pe,{params:k(Ue)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:se},null,8,["params"])]),_:1})):y("",!0),t(s,{span:k(G)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:o(()=>[t(X,{class:"w-full search"},{default:o(()=>[t(we,{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(I,null,ee(k(ne),(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(ge,{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",Ge,[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",Be,[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"},{default:o(()=>[(d(!0),x(I,null,ee(J.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",qe,[t(S,{type:"primary",onClick:W},{default:o(()=>e[21]||(e[21]=[C("\u67E5\u8BE2 ")])),_:1}),t(S,{onClick:ue},{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",ze,[t(ke,{modelValue:u.value,"onUpdate:modelValue":e[15]||(e[15]=l=>u.value=l),onTabChange:ve},{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",We,[A("div",He,[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:pe},{default:o(()=>[C(Ve(V.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:_e},{default:o(()=>e[23]||(e[23]=[C("\u5173\u8054\u8FD0\u7EF4\u5305 ")])),_:1})):y("",!0)]),y("",!0)]),t(he,{ref_key:"tableListRef",ref:N,column:q.value,data:z.value,total:B.value,selectable:ie,onSelectionChange:de,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,Je)):y("",!0),u.value==="01"?(d(),x(I,{key:1},[l.row.status===10014?(d(),x("a",{key:0,onClick:w=>fe(l.row)},"\u7ACB\u9879\u6279\u590D",8,Ze)):y("",!0),A("a",{onClick:w=>k(c).push({name:"projectDetail",query:{id:l.row.projectId}})},"\u8BE6\u60C5",8,Ke)],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,Qe)):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,Xe)):y("",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1}),t(Se,{visible:P.visible,title:P.title,data:P.rowData,onClose:be},null,8,["visible","title","data"]),t($e,{visible:R.visible,data:R.rowData,onClose:ce},null,8,["visible","data"]),t(Ye,{visible:O.visible,data:O.rowData,onClose:L,onExportProject:me},null,8,["visible","data"]),t(Re,{modelValue:F.value,"onUpdate:modelValue":e[17]||(e[17]=l=>F.value=l),"select-project-list":M.value,"onUpdate:selectProjectList":e[18]||(e[18]=l=>M.value=l),onRelevanceSuccess:ye},null,8,["modelValue","select-project-list"])],64)}}});export{ya as default};