|
- var Ae=Object.defineProperty,we=Object.defineProperties;var je=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var xe=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var X=(m,r,i)=>r in m?Ae(m,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):m[r]=i,j=(m,r)=>{for(var i in r||(r={}))xe.call(r,i)&&X(m,i,r[i]);if(Q)for(var i of Q(r))Me.call(r,i)&&X(m,i,r[i]);return m},I=(m,r)=>we(m,je(r));var g=(m,r,i)=>new Promise((P,y)=>{var R=d=>{try{e(i.next(d))}catch(M){y(M)}},$=d=>{try{e(i.throw(d))}catch(M){y(M)}},e=d=>d.done?P(d.value):Promise.resolve(d.value).then(R,$);e((i=i.apply(m,r)).next())});import{_ as De,d as he,A as Ve,D as Ne,b as E,r as V,a3 as H,L as ke,o as Ee,e as p,f as x,g as Y,k as a,l,j as f,I as Z,i as N,F as ee,J as Ye,h as v,Y as U,m as _,t as Pe,p as Ce}from"./index.62a6dd28.js";import{E as Te}from"./index.816e0068.js";import{h as Oe,i as Se,f as Ie}from"./uploadAction.f72555df.js";import{l as Ue,s as Re,p as $e,e as Le,d as Fe}from"./annualPlanStore.b8fb58a5.js";import Ge from"./approvalDialog.d6ee23fb.js";import ze from"./importProjectDialog.73f5e887.js";import Be from"./exportFieldDialog.f78ca413.js";import{u as He}from"./useExportExc.18067739.js";import{g as q,a as qe}from"./getIsShowRegionTree.98cc3e04.js";const Je={class:"flex"},We={class:"flex"},Ke={class:"flex"},Qe={class:"flex"},Xe={class:"flex justify-between items-center"},Ze={class:"flex items-center"},ea=v("span",{class:"mr-24"},"\u5217\u8868",-1),aa={class:"flex items-center relative"},ta=["onClick"],la=["onClick"],oa=["onClick"],na=["onClick"],sa=he({name:"planList"}),ra=Object.assign(sa,{props:{isTemporaryAugment:{type:Number,default:0}},setup(m){const{proxy:r}=Ce(),i=m,P=Ve(),{statusOptions:y,statusOptionsCascader:R,projectTypeOptions:$}=Ne.dictStore.globalDicts||{},e=E({projectName:void 0,buildOrg:void 0,projectType:void 0,status:void 0,declareAmountMin:void 0,declareAmountMax:void 0,approveAmountMin:void 0,approveAmountMax:void 0,projectYearStart:new Date().getFullYear()+"",projectYearEnd:new Date().getFullYear()+"",times:void 0}),d=V(),M=V(0),ae=E([{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=>H("span",o.isStartDeclaredProject?"\u662F":"\u5426")},{label:"\u9879\u76EE\u72B6\u6001",key:"status",prop:"status",width:"180",render:o=>{var t,s,c,u;return[H("span",{class:["dot mr-4",`bg-${(t=y[o.status])==null?void 0:t.color}`]}),H("span",{class:`text-${(s=y[o.status])==null?void 0:s.color}`},o.status&&((c=y[o.stage])==null?void 0:c.name)+"-"+((u=y[o.status])==null?void 0:u.name))]}},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"200",fixed:"right"}]),J=V([]),C=V({}),A=V(),te=o=>{A.value=o.regionLevel===3?o.regionCode:void 0,d.value.pageParams.pageNumber=1,b()},b=(...t)=>g(this,[...t],function*(o=d.value.pageParams){var c,u,O;const s=yield Ue(I(j(j({},o),e),{status:(c=e.status)==null?void 0:c[e.status.length-1],projectYearStart:e.projectYearStart*1||void 0,projectYearEnd:e.projectYearEnd*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:((u=e.times)==null?void 0:u[0])||void 0,createOnMax:((O=e.times)==null?void 0:O[1])||void 0,regionCode:A.value||void 0,isTemporaryAugment:i.isTemporaryAugment,times:void 0}));J.value=s.data.records,M.value=s.data.total}),le=(o,t)=>!o.isStartDeclaredProject,L=()=>{b()},oe=()=>{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.projectYearStart=void 0,e.projectYearEnd=void 0,e.times=void 0,d.value.pageParams.pageNumber=1,d.value.pageParams.pageSize=10,b()},F=V([]),ne=o=>{F.value=o},se=()=>{if(!F.value.length){r.$message.warning("\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u9879\u76EE");return}r.$messageBox.confirm(`\u662F\u5426${A.value==="331181"?"\u5217\u5165\u5E74\u5EA6\u8BA1\u5212":"\u5F00\u542F\u65B9\u6848\u7533\u62A5"}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(()=>g(this,null,function*(){yield Re({projectIds:F.value.map(o=>o.projectId)}),r.$message.success(`${A.value==="331181"?"\u5217\u5165":"\u5F00\u542F"}\u6210\u529F\uFF01`),b()}))},G=E({visible:!1}),re=()=>{G.visible=!1},T=E({visible:!1}),ie=o=>{T.visible=!0},z=()=>{T.visible=!1},{exportData:W}=He(),de=o=>g(this,null,function*(){yield W(()=>{var t,s,c;return $e(I(j(j({},d.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:((c=e.times)==null?void 0:c[1])||void 0,regionCode:A.value||void 0,isTemporaryAugment:i.isTemporaryAugment,times:void 0,exportOptionList:o}))}),z()}),ue=()=>g(this,null,function*(){yield W(()=>{var o,t,s;return Le(I(j(j({},d.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:A.value||void 0,times:void 0,isTemporaryAugment:i.isTemporaryAugment}))}),z()}),pe=o=>{P.push({name:"planEdit",query:{id:o.projectId}})},me=o=>{r.$messageBox.confirm(`\u662F\u5426\u6682\u7F13\u3010${o.projectName}\u3011?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(()=>g(this,null,function*(){yield Fe({projectId:o.projectId}),r.$message.success("\u6682\u7F13\u6210\u529F\uFF01"),b()}))},w=E({visible:!1,title:void 0,rowData:void 0}),ce=o=>{w.visible=!0,w.title=`\u7ACB\u9879\u6279\u590D-${o.projectName}`,w.rowData=o},fe=o=>{w.visible=!1,o&&b()};return ke(()=>C.value.file,o=>g(this,null,function*(){L()})),Ee(()=>g(this,null,function*(){q(["SUPER_ADMIN","REGION_MANAGER"])||b()})),(o,t)=>{const s=p("el-col"),c=p("el-input"),u=p("el-form-item"),O=p("el-option"),_e=p("el-select"),k=p("el-row"),ve=p("el-cascader"),S=p("el-input-number"),B=p("el-date-picker"),D=p("el-button"),be=p("el-form"),K=p("el-card"),ge=p("el-upload"),ye=p("table-list");return x(),Y(ee,null,[a(k,null,{default:l(()=>[f(q)(["SUPER_ADMIN","REGION_MANAGER"])?(x(),Z(s,{key:0,span:4,class:"pr-16"},{default:l(()=>[a(Te,{params:f(qe)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:te},null,8,["params"])]),_:1})):N("v-if",!0),a(s,{span:f(q)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:l(()=>[a(K,{class:"w-full search"},{default:l(()=>[a(be,{model:e,size:"small","label-suffix":":"},{default:l(()=>[a(k,{gutter:16,class:"mb-16"},{default:l(()=>[a(s,{span:8},{default:l(()=>[a(u,{label:"\u9879\u76EE\u540D\u79F0"},{default:l(()=>[a(c,{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(u,{label:"\u7533\u62A5\u5355\u4F4D"},{default:l(()=>[a(c,{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(u,{label:"\u9879\u76EE\u7C7B\u578B"},{default:l(()=>[a(_e,{modelValue:e.projectType,"onUpdate:modelValue":t[2]||(t[2]=n=>e.projectType=n),placeholder:"\u5168\u90E8",class:"w-full"},{default:l(()=>[(x(!0),Y(ee,null,Ye(f($),(n,h)=>(x(),Z(O,{key:h,label:n,value:h},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(k,{gutter:16,class:"mb-16"},{default:l(()=>[a(s,{span:8},{default:l(()=>[a(u,{label:"\u9879\u76EE\u72B6\u6001"},{default:l(()=>[a(ve,{modelValue:e.status,"onUpdate:modelValue":t[3]||(t[3]=n=>e.status=n),class:"w-full",props:{label:"name",value:"code"},options:f(R)},null,8,["modelValue","options"])]),_:1})]),_:1}),a(s,{span:8},{default:l(()=>[a(u,{class:"whitespace-nowrap",label:"\u7533\u62A5\u8D44\u91D1(\u4E07\u5143)"},{default:l(()=>[v("div",Je,[a(S,{modelValue:e.declareAmountMin,"onUpdate:modelValue":t[4]||(t[4]=n=>e.declareAmountMin=n),clearable:"",controls:!1,onMousewheel:t[5]||(t[5]=U(()=>{},["prevent"]))},null,8,["modelValue"]),_(" \xA0\u81F3\xA0 "),a(S,{modelValue:e.declareAmountMax,"onUpdate:modelValue":t[6]||(t[6]=n=>e.declareAmountMax=n),clearable:"",controls:!1,onMousewheel:t[7]||(t[7]=U(()=>{},["prevent"]))},null,8,["modelValue"])])]),_:1})]),_:1}),a(s,{span:8},{default:l(()=>[a(u,{class:"whitespace-nowrap",label:"\u6279\u590D\u8D44\u91D1(\u4E07\u5143)"},{default:l(()=>[v("div",We,[a(S,{modelValue:e.approveAmountMin,"onUpdate:modelValue":t[8]||(t[8]=n=>e.approveAmountMin=n),controls:!1,clearable:"",onMousewheel:t[9]||(t[9]=U(()=>{},["prevent"]))},null,8,["modelValue"]),_(" \xA0\u81F3\xA0 "),a(S,{modelValue:e.approveAmountMax,"onUpdate:modelValue":t[10]||(t[10]=n=>e.approveAmountMax=n),controls:!1,clearable:"",onMousewheel:t[11]||(t[11]=U(()=>{},["prevent"]))},null,8,["modelValue"])])]),_:1})]),_:1})]),_:1}),a(k,{gutter:16,class:"mb-16"},{default:l(()=>[a(s,{span:8},{default:l(()=>[a(u,{label:"\u9884\u7B97\u5E74\u5EA6"},{default:l(()=>[v("div",Ke,[a(B,{modelValue:e.projectYearStart,"onUpdate:modelValue":t[12]||(t[12]=n=>e.projectYearStart=n),type:"year","value-format":"YYYY",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"]),_("\u81F3 "),a(B,{modelValue:e.projectYearEnd,"onUpdate:modelValue":t[13]||(t[13]=n=>e.projectYearEnd=n),type:"year","value-format":"YYYY",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])])]),_:1})]),_:1}),a(s,{span:16},{default:l(()=>[a(u,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:l(()=>[a(B,{modelValue:e.times,"onUpdate:modelValue":t[14]||(t[14]=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(k,null,{default:l(()=>[a(s,{span:24},{default:l(()=>[a(u,{class:"btn"},{default:l(()=>[v("div",Qe,[a(D,{type:"primary",onClick:L},{default:l(()=>[_("\u67E5\u8BE2")]),_:1}),a(D,{onClick:oe},{default:l(()=>[_("\u91CD\u7F6E")]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(K,{class:"w-full mt-8"},{header:l(()=>[v("div",Xe,[v("div",Ze,[ea,a(D,{type:"primary",size:"small",onClick:se},{default:l(()=>[_(Pe(A.value==="331181"?"\u5217\u5165\u5E74\u5EA6\u8BA1\u5212":"\u5F00\u542F\u65B9\u6848\u7533\u62A5"),1)]),_:1})]),v("div",aa,[N(` <el-button
- type="primary"
- plain
- size="small"
- @click="showImportProjectDialog"
- >\u5BFC\u5165</el-button> `),a(ge,{"file-list":C.value.file,"onUpdate:fileList":t[15]||(t[15]=n=>C.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=>f(Oe)(n,C.value.file,!0,L),"on-error":f(Se),limit:1,"before-upload":n=>f(Ie)(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(D,{type:"primary",plain:"",size:"small"},{default:l(()=>[_("\u5BFC\u5165")]),_:1}),N(` <template #tip>
- <div class="el-upload__tip">\u652F\u6301.xlsx\u3001.xls</div>
- </template> `)]),_:1},8,["file-list","data","on-success","on-error","before-upload"]),a(D,{type:"primary",class:"ml-10",plain:"",size:"small",onClick:ue},{default:l(()=>[_("\u5BFC\u51FA\u7F16\u8F91\u8868")]),_:1}),a(D,{type:"primary",plain:"",size:"small",onClick:ie},{default:l(()=>[_("\u5BFC\u51FA")]),_:1})])])]),default:l(()=>[a(ye,{ref_key:"tableListRef",ref:d,column:ae,data:J.value,total:M.value,selectable:le,onSelectionChange:ne,onGetTableData:b},{action:l(({scope:n})=>[n.row.status===10010?(x(),Y("a",{key:0,onClick:h=>pe(n.row)},"\u7F16\u8F91",8,ta)):N("v-if",!0),n.row.status===10010?(x(),Y("a",{key:1,onClick:h=>me(n.row)},"\u6682\u7F13",8,la)):N("v-if",!0),n.row.status===10014?(x(),Y("a",{key:2,onClick:h=>ce(n.row)},"\u7ACB\u9879\u6279\u590D",8,oa)):N("v-if",!0),v("a",{onClick:h=>f(P).push({name:"projectDetail",query:{id:n.row.projectId}})},"\u8BE6\u60C5",8,na)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1}),a(Ge,{visible:w.visible,title:w.title,data:w.rowData,onClose:fe},null,8,["visible","title","data"]),a(ze,{visible:G.visible,data:G.rowData,onClose:re},null,8,["visible","data"]),a(Be,{visible:T.visible,data:T.rowData,onClose:z,onExportProject:de},null,8,["visible","data"])],64)}}}),ga=De(ra,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/projectStoreManage/components/planList.vue"]]);export{ga as default};
|