Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

2 linhas
6.2KB

  1. import{y as Q,E as X,a as C,r as v,$ as j,o as Z,b as s,c as u,L as b,h as a,u as p,f as e,j as k,d as g,F as G,H as M,e as f,i as E,k as ee,s as ae}from"./index-dd5fae99.js";import{E as te}from"./index-29b4120c.js";import{r as le,a as oe,c as ne}from"./renewalProjectTreasury-fd1e2d66.js";import{u as re}from"./useExportExc-f315048b.js";import{g as N,a as se}from"./getIsShowRegionTree-21a24141.js";const de={class:"flex"},ue={class:"flex justify-between"},pe=["onClick"],ie=["onClick"],me=["onClick"],ce=ee({name:"projectStore"}),Ne=Object.assign(ce,{setup(fe){const{proxy:P}=ae(),T=Q(),{reAuditStatusOptions:O,projectTypeOptions:A}=X.dictStore.globalDicts||{},t=C({projectName:void 0,projectType:void 0,approvalStatus:void 0,year:void 0,times:void 0}),c=v(),R=v(0),Y=C([{label:"序号",type:"index",width:"60"},{label:"项目名称",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"申报单位",key:"buildOrgName",prop:"buildOrgName",minWidth:"150",showOverflowTooltip:!0},{label:"项目类型",key:"projectType",prop:"projectType",minWidth:"80",render:o=>j("span",A[o.projectType]||"-")},{label:"预算年度",key:"projectYear",prop:"projectYear",width:"80"},{label:"下一年度支付金额(万元)",key:"annualPaymentAmount",prop:"annualPaymentAmount",width:"200"},{label:"项目状态",key:"approvalStatus",prop:"approvalStatus",width:"180",render:o=>[j("span",{class:["dot mr-4",`bg-${o.approvalStatus==="PENDING"?"warning":o.approvalStatus==="PASS"?"success":"danger"}`]}),j("span",{class:`text-${o.approvalStatus==="PENDING"?"warning":o.approvalStatus==="PASS"?"success":"danger"}`},o.approvalStatus==="PENDING"?"待审核":o.approvalStatus==="PASS"?"审核通过":"审核不通过")]},{label:"创建时间",key:"createOn",prop:"createOn",width:"180"},{label:"操作",slot:"action",width:"160",fixed:"right"}]),x=v([]),S=v(),U=o=>{S.value=o.regionLevel===3?o.regionCode:void 0,c.value.pageParams.pageNumber=1,i()},i=async(o=c.value.pageParams)=>{var r,_;const l=await le({...o,...t,year:t.year*1||void 0,startTime:((r=t.times)==null?void 0:r[0])||void 0,endTime:((_=t.times)==null?void 0:_[1])||void 0,regionCode:S.value||void 0,times:void 0});x.value=l.data.records,R.value=l.data.total},$=()=>{i()},L=()=>{t.projectName=void 0,t.projectType=void 0,t.approvalStatus=void 0,t.year=void 0,t.times=void 0,c.value.pageParams.pageNumber=1,c.value.pageParams.pageSize=10,i()},B=o=>{T.push({name:"renewalProjectAsscess",query:{projectRenewalId:o.id}})},H=o=>{P.$messageBox.confirm("确定要删除该项吗?","提示!",{type:"warning"}).then(async()=>{await oe({projectRenewalId:o.id}),P.$message.success("删除成功!"),i()})},z=o=>{T.push({name:"projectTreasuryDetail",query:{projectRenewalId:o.id}})},{exportLoading:F,exportData:W}=re(),q=()=>{W(()=>{var o,l;return ne({...t,startTime:((o=t.times)==null?void 0:o[0])||void 0,endTime:((l=t.times)==null?void 0:l[1])||void 0,year:t.year*1||void 0,regionCode:S.value||void 0,times:void 0})})};return Z(async()=>{N(["SUPER_ADMIN","REGION_MANAGER"])||i()}),(o,l)=>{const r=s("el-col"),_=s("el-input"),m=s("el-form-item"),D=s("el-option"),I=s("el-select"),y=s("el-row"),h=s("el-date-picker"),w=s("el-button"),J=s("el-form"),V=s("el-card"),K=s("table-list");return u(),b(y,null,{default:a(()=>[p(N)(["SUPER_ADMIN","REGION_MANAGER"])?(u(),b(r,{key:0,span:4,class:"pr-16"},{default:a(()=>[e(te,{params:p(se)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:U},null,8,["params"])]),_:1})):k("",!0),e(r,{span:p(N)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:a(()=>[e(V,{class:"w-full search"},{default:a(()=>[e(J,{model:t,size:"small","label-suffix":":"},{default:a(()=>[e(y,{gutter:16,class:"mb-16"},{default:a(()=>[e(r,{span:8},{default:a(()=>[e(m,{label:"项目名称"},{default:a(()=>[e(_,{modelValue:t.projectName,"onUpdate:modelValue":l[0]||(l[0]=n=>t.projectName=n),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:8},{default:a(()=>[e(m,{label:"项目类型"},{default:a(()=>[e(I,{modelValue:t.projectType,"onUpdate:modelValue":l[1]||(l[1]=n=>t.projectType=n),placeholder:"全部",class:"w-full"},{default:a(()=>[(u(!0),g(G,null,M(p(A),(n,d)=>(u(),b(D,{key:d,label:n,value:d},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(r,{span:8},{default:a(()=>[e(m,{label:"项目状态"},{default:a(()=>[e(I,{modelValue:t.approvalStatus,"onUpdate:modelValue":l[2]||(l[2]=n=>t.approvalStatus=n),placeholder:"全部",class:"w-full"},{default:a(()=>[(u(!0),g(G,null,M(p(O),(n,d)=>(u(),b(D,{key:d,label:n,value:d},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(y,{gutter:16,class:"mb-16"},{default:a(()=>[e(r,{span:8},{default:a(()=>[e(m,{label:"预算年度"},{default:a(()=>[e(h,{modelValue:t.year,"onUpdate:modelValue":l[3]||(l[3]=n=>t.year=n),type:"year","value-format":"YYYY",placeholder:"请选择"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:16},{default:a(()=>[e(m,{label:"创建时间"},{default:a(()=>[e(h,{modelValue:t.times,"onUpdate:modelValue":l[4]||(l[4]=n=>t.times=n),type:"datetimerange",editable:!1,format:"YYYY-MM-DD HH:mm","value-format":"YYYY-MM-DD HH:mm","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(y,null,{default:a(()=>[e(r,{span:24},{default:a(()=>[e(m,{class:"btn"},{default:a(()=>[f("div",de,[e(w,{type:"primary",onClick:$},{default:a(()=>l[5]||(l[5]=[E("查询")])),_:1}),e(w,{onClick:L},{default:a(()=>l[6]||(l[6]=[E("重置")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(V,{class:"w-full mt-8"},{header:a(()=>[f("div",ue,[l[8]||(l[8]=f("span",null,"列表",-1)),f("div",null,[e(w,{type:"primary",plain:"",size:"small","export-loading":p(F),onClick:q},{default:a(()=>l[7]||(l[7]=[E("导出")])),_:1},8,["export-loading"])])])]),default:a(()=>[e(K,{ref_key:"tableListRef",ref:c,column:Y,data:x.value,total:R.value,onGetTableData:i},{action:a(({scope:n})=>[n.row.approvalStatus==="PENDING"?(u(),g("a",{key:0,onClick:d=>B(n.row)},"审核",8,pe)):k("",!0),f("a",{onClick:d=>z(n.row)},"详情",8,ie),p(N)(["SUPER_ADMIN","REGION_MANAGER"])&&n.row.approvalStatus==="NOT_PASS"?(u(),g("a",{key:1,class:"text-danger",onClick:d=>H(n.row)},"删除",8,me)):k("",!0)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1})}}});export{Ne as default};