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

  1. import{a as G}from"./index.8a59d8d8.js";import{d as S,y as I,B as W,b as Y,Z as D,r as g,o as Z,c as r,e as c,f as y,h as t,i as l,F as M,H as J,u as v,G as K,g as f,j as k,k as N}from"./index.55251523.js";import{u as Q}from"./useExportExc.02b9d09e.js";import{a as X}from"./purchaseResults.c08b93dd.js";import ee from"./implementPlanDialog.a97929d9.js";import"./projectStore.aceb2df8.js";const te={class:"flex"},ae={class:"flex justify-between"},le=["onClick"],oe=["onClick"],ne=["onClick"],se=S({name:"purchaseResults"}),fe=Object.assign(se,{setup(re){const h=I(),{statusOptions:_,projectTypeOptions:T}=W.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:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"\u9879\u76EE\u7C7B\u578B",key:"projectTypeName",prop:"projectTypeName",width:"80"},{label:"\u6279\u590D\u91D1\u989D\uFF08\u4E07\u5143\uFF09",key:"approvedAmount",prop:"approvedAmount",width:"150"},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear",width:80},{label:"\u6279\u590D\u65F6\u95F4",key:"approvalDate",prop:"approvalDate",width:"200"},{label:"\u9879\u76EE\u72B6\u6001",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:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"200"},{label:"\u64CD\u4F5C",slot:"action",width:"180",fixed:"right"}]),w=g([]),b=g(),i=async(o=b.value.pageParams)=>{var d,s;const e=await X({...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=g(2),P=()=>{i()},$=()=>{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:B,exportData:E}=Q(),H=()=>{E(()=>{var o,e;return G(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}),L=o=>{u.visible=!0,u.data=o},U=o=>{u.visible=!1,o&&i()};return Z(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:"\u9879\u76EE\u540D\u79F0"},{default:l(()=>[t(d,{modelValue:a.projectName,"onUpdate:modelValue":e[0]||(e[0]=n=>a.projectName=n),maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(p,{span:8},{default:l(()=>[t(s,{label:"\u9879\u76EE\u7C7B\u578B"},{default:l(()=>[t(F,{modelValue:a.projectType,"onUpdate:modelValue":e[1]||(e[1]=n=>a.projectType=n),placeholder:"\u5168\u90E8",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:"\u9884\u7B97\u5E74\u5EA6"},{default:l(()=>[t(V,{modelValue:a.projectYear,"onUpdate:modelValue":e[2]||(e[2]=n=>a.projectYear=n),type:"year",placeholder:"\u8BF7\u9009\u62E9",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:"\u521B\u5EFA\u65F6\u95F4"},{default:l(()=>[t(V,{modelValue:a.times,"onUpdate:modelValue":e[3]||(e[3]=n=>a.times=n),type:"datetimerange","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4",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:P},{default:l(()=>e[4]||(e[4]=[k("\u67E5\u8BE2")])),_:1}),t(j,{onClick:$},{default:l(()=>e[5]||(e[5]=[k("\u91CD\u7F6E")])),_: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,"\u5217\u8868",-1)),f("div",null,[t(j,{type:"primary",size:"small",plain:"",loading:v(B),onClick:H},{default:l(()=>e[6]||(e[6]=[k(" \u5BFC\u51FA ")])),_: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}})},"\u586B\u5199\u91C7\u8D2D\u7ED3\u679C",8,le)):N("",!0),n.row.status===20006?(c(),y("a",{key:1,onClick:m=>L(n.row)},"\u586B\u5199\u5B9E\u65BD\u8BA1\u5212",8,oe)):N("",!0),f("a",{onClick:m=>v(h).push({name:"purchasingResultDetail",query:{id:n.row.id}})},"\u8BE6\u60C5",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};