|
- import{a as S}from"./index-b6aa4cff.js";import{y as G,E as I,a as Y,$ as D,r as k,o as W,b as r,c,d as y,f as t,h as l,F as M,H as J,u as v,L as K,e as f,i as g,j as N,k as Q}from"./index-dd5fae99.js";import{u as X}from"./useExportExc-f315048b.js";import{a as Z}from"./purchaseResults-13fe4d1d.js";import ee from"./implementPlanDialog-0b14c2a8.js";import"./projectStore-30136ff6.js";const te={class:"flex"},ae={class:"flex justify-between"},le=["onClick"],oe=["onClick"],ne=["onClick"],se=Q({name:"purchaseResults"}),fe=Object.assign(se,{setup(re){const h=G(),{statusOptions:_,projectTypeOptions:T}=I.dictStore.globalDicts||{},a=Y({projectType:void 0,status:void 0,projectYear:void 0,projectName:void 0,createOnMin:void 0,createOnMax:void 0,times:[]}),R=Y([{label:"序号",type:"index",width:"80"},{label:"项目名称",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"项目类型",key:"projectTypeName",prop:"projectTypeName",width:"80"},{label:"批复金额(万元)",key:"approvedAmount",prop:"approvedAmount",width:"150"},{label:"预算年度",key:"projectYear",prop:"projectYear",width:80},{label:"批复时间",key:"approvalDate",prop:"approvalDate",width:"200"},{label:"项目状态",key:"status",prop:"status",showOverflowTooltip:!0,width:"180",render:o=>{var e,d,s;return[D("span",{class:["dot mr-4",`bg-${_[o.status].color}`]}),D("span",{class:`text-${(e=_[o.status])==null?void 0:e.color}`},o.status&&((d=_[o.stage])==null?void 0:d.name)+"-"+((s=_[o.status])==null?void 0:s.name))]}},{label:"创建时间",key:"createOn",prop:"createOn",width:"200"},{label:"操作",slot:"action",width:"180",fixed:"right"}]),w=k([]),b=k(),i=async(o=b.value.pageParams)=>{var d,s;const e=await Z({...o,...a,createOnMin:(d=a.times)==null?void 0:d[0],createOnMax:(s=a.times)==null?void 0:s[1],projectYear:a.projectYear*1||void 0,times:void 0});w.value=e.data.records,x.value=e.data.total},x=k(2),$=()=>{i()},E=()=>{a.projectYear=void 0,a.projectName=void 0,a.projectType=void 0,a.createOnMin=void 0,a.createOnMax=void 0,a.times=void 0,b.value.pageParams.pageNumber=1,b.value.pageParams.pageSize=10,i()},{exportLoading:L,exportData:P}=X(),H=()=>{P(()=>{var o,e;return S(6,{...a,createOnMin:(o=a.times)==null?void 0:o[0],createOnMax:(e=a.times)==null?void 0:e[1],projectYear:a.projectYear*1||void 0,times:void 0})})},u=Y({visible:!1,data:void 0}),B=o=>{u.visible=!0,u.data=o},U=o=>{u.visible=!1,o&&i()};return W(async()=>{i()}),(o,e)=>{const d=r("el-input"),s=r("el-form-item"),p=r("el-col"),z=r("el-option"),F=r("el-select"),V=r("el-date-picker"),O=r("el-row"),j=r("el-button"),q=r("el-form"),C=r("el-card"),A=r("table-list");return c(),y(M,null,[t(C,{class:"w-full search"},{default:l(()=>[t(q,{model:a,size:"small","label-suffix":":"},{default:l(()=>[t(O,{gutter:16,class:"mb-16"},{default:l(()=>[t(p,{span:8},{default:l(()=>[t(s,{label:"项目名称"},{default:l(()=>[t(d,{modelValue:a.projectName,"onUpdate:modelValue":e[0]||(e[0]=n=>a.projectName=n),maxlength:"50",placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),t(p,{span:8},{default:l(()=>[t(s,{label:"项目类型"},{default:l(()=>[t(F,{modelValue:a.projectType,"onUpdate:modelValue":e[1]||(e[1]=n=>a.projectType=n),placeholder:"全部",class:"w-full"},{default:l(()=>[(c(!0),y(M,null,J(v(T),(n,m)=>(c(),K(z,{key:m,label:n,value:m},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(p,{span:8},{default:l(()=>[t(s,{label:"预算年度"},{default:l(()=>[t(V,{modelValue:a.projectYear,"onUpdate:modelValue":e[2]||(e[2]=n=>a.projectYear=n),type:"year",placeholder:"请选择",format:"YYYY","value-format":"YYYY"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),t(O,{gutter:24},{default:l(()=>[t(p,{span:12},{default:l(()=>[t(s,{label:"创建时间"},{default:l(()=>[t(V,{modelValue:a.times,"onUpdate:modelValue":e[3]||(e[3]=n=>a.times=n),type:"datetimerange","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间",format:"YYYY-MM-DD HH:mm","value-format":"YYYY-MM-DD HH:mm"},null,8,["modelValue"])]),_:1})]),_:1}),t(p,{span:12},{default:l(()=>[t(s,{class:"btn"},{default:l(()=>[f("div",te,[t(j,{type:"primary",onClick:$},{default:l(()=>e[4]||(e[4]=[g("查询")])),_:1}),t(j,{onClick:E},{default:l(()=>e[5]||(e[5]=[g("重置")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(C,{class:"w-full mt-8"},{header:l(()=>[f("div",ae,[e[7]||(e[7]=f("span",null,"列表",-1)),f("div",null,[t(j,{type:"primary",size:"small",plain:"",loading:v(L),onClick:H},{default:l(()=>e[6]||(e[6]=[g(" 导出 ")])),_:1},8,["loading"])])])]),default:l(()=>[t(A,{ref_key:"tableListRef",ref:b,column:R,data:w.value,total:x.value,onGetTableData:i},{action:l(({scope:n})=>[n.row.status===20001?(c(),y("a",{key:0,onClick:m=>v(h).push({name:"fillPurchasingResult",query:{id:n.row.id}})},"填写采购结果",8,le)):N("",!0),n.row.status===20006?(c(),y("a",{key:1,onClick:m=>B(n.row)},"填写实施计划",8,oe)):N("",!0),f("a",{onClick:m=>v(h).push({name:"purchasingResultDetail",query:{id:n.row.id}})},"详情",8,ne)]),_:1},8,["column","data","total"])]),_:1}),t(ee,{visible:u.visible,data:u.data,onClose:U},null,8,["visible","data"])],64)}}});export{fe as default};
|