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

  1. import{a as A}from"./index-b6aa4cff.js";import{E as I,y as S,a as N,r as b,o as G,b as n,c as m,d as y,f as e,h as l,F as T,H as W,u as f,L as J,e as v,i as k,j as M,k as K}from"./index-dd5fae99.js";import{u as Q}from"./useExportExc-f315048b.js";import{l as X}from"./contractRecord-8df6539a.js";const Z={class:"flex"},ee={class:"flex justify-between items-center"},te=["onClick"],ae=["onClick"],le=["onClick"],oe=K({name:"contractRecord"}),ue=Object.assign(oe,{setup(ne){const{projectTypeOptions:O}=I.dictStore.globalDicts||{},j=S(),t=N({projectType:void 0,status:void 0,projectYear:void 0,projectName:void 0,createOnMin:void 0,createOnMax:void 0,times:[]}),s=b("1"),D=N([{label:"序号",type:"index",width:"80"},{label:"项目名称",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"项目类型",key:"projectTypeName",prop:"projectTypeName",width:"80"},{label:"成交金额(万元)",key:"transactionAmount",prop:"transactionAmount",width:"150"},{label:"预算年度",key:"projectYear",prop:"projectYear",width:80},{label:"成交时间",key:"transactionTime",prop:"transactionTime",width:"120"},{label:"创建时间",key:"createOn",prop:"createOn",width:"200"},{label:"操作",slot:"action",width:"190",fixed:"right"}]),g=b([]),i=b(),u=async(d=i.value.pageParams)=>{var _,r;const a=await X(s.value,{...d,...t,createOnMin:(_=t.times)==null?void 0:_[0],createOnMax:(r=t.times)==null?void 0:r[1],projectYear:t.projectYear*1||void 0,times:void 0});g.value=a.data.records,w.value=a.data.total},w=b(2),R=()=>{i.value.pageParams.pageNumber=1,u()},E=()=>{t.projectYear=void 0,t.projectName=void 0,t.projectType=void 0,t.createOnMin=void 0,t.createOnMax=void 0,t.times=void 0,i.value.pageParams.pageNumber=1,i.value.pageParams.pageSize=10,u()},H=d=>{s.value=d,u()},{exportLoading:L,exportData:U}=Q(),B=()=>{U(()=>{var d,a;return A(7,{...t,createOnMin:(d=t.times)==null?void 0:d[0],createOnMax:(a=t.times)==null?void 0:a[1],projectYear:t.projectYear*1||void 0,times:void 0})})};return G(async()=>{u()}),(d,a)=>{const _=n("el-input"),r=n("el-form-item"),p=n("el-col"),P=n("el-option"),q=n("el-select"),x=n("el-date-picker"),h=n("el-row"),Y=n("el-button"),z=n("el-form"),V=n("el-card"),C=n("el-tab-pane"),F=n("el-tabs"),$=n("table-list");return m(),y(T,null,[e(V,{class:"w-full search"},{default:l(()=>[e(z,{model:t,size:"small","label-suffix":":"},{default:l(()=>[e(h,{gutter:16,class:"mb-16"},{default:l(()=>[e(p,{span:8},{default:l(()=>[e(r,{label:"项目名称"},{default:l(()=>[e(_,{modelValue:t.projectName,"onUpdate:modelValue":a[0]||(a[0]=o=>t.projectName=o),maxlength:"50",placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),e(p,{span:8},{default:l(()=>[e(r,{label:"项目类型"},{default:l(()=>[e(q,{modelValue:t.projectType,"onUpdate:modelValue":a[1]||(a[1]=o=>t.projectType=o),placeholder:"全部",class:"w-full"},{default:l(()=>[(m(!0),y(T,null,W(f(O),(o,c)=>(m(),J(P,{key:c,label:o,value:c},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(p,{span:8},{default:l(()=>[e(r,{label:"预算年度"},{default:l(()=>[e(x,{modelValue:t.projectYear,"onUpdate:modelValue":a[2]||(a[2]=o=>t.projectYear=o),type:"year",placeholder:"请选择",format:"YYYY","value-format":"YYYY"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(h,{gutter:24},{default:l(()=>[e(p,{span:12},{default:l(()=>[e(r,{label:"创建时间"},{default:l(()=>[e(x,{modelValue:t.times,"onUpdate:modelValue":a[3]||(a[3]=o=>t.times=o),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}),e(p,{span:12},{default:l(()=>[e(r,{class:"btn"},{default:l(()=>[v("div",Z,[e(Y,{type:"primary",onClick:R},{default:l(()=>a[5]||(a[5]=[k("查询")])),_:1}),e(Y,{onClick:E},{default:l(()=>a[6]||(a[6]=[k("重置")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(V,{class:"w-full mt-8 tab-card"},{header:l(()=>[v("div",ee,[e(F,{modelValue:s.value,"onUpdate:modelValue":a[4]||(a[4]=o=>s.value=o),onTabChange:H},{default:l(()=>[e(C,{label:"待完善合同信息",name:"1"}),e(C,{label:"已完善合同信息",name:"2"})]),_:1},8,["modelValue"]),v("div",null,[e(Y,{type:"primary",size:"small",plain:"",loading:f(L),onClick:B},{default:l(()=>a[7]||(a[7]=[k(" 导出 ")])),_:1},8,["loading"])])])]),default:l(()=>[e($,{ref_key:"tableListRef",ref:i,column:D,data:g.value,total:w.value,onGetTableData:u},{action:l(({scope:o})=>[s.value==="1"?(m(),y("a",{key:0,onClick:c=>f(j).push({name:"fillContractInfo",query:{id:o.row.id}})},"填写合同信息",8,te)):M("",!0),s.value==="2"&&!o.row.supplemented?(m(),y("a",{key:1,onClick:c=>f(j).push({name:"fillContractInfo",query:{id:o.row.id,isReplenishment:!0}})},"补充实际付款金额",8,ae)):M("",!0),v("a",{onClick:c=>f(j).push({name:"contractRecordDetail",query:{id:o.row.id}})},"详情",8,le)]),_:1},8,["column","data","total"])]),_:1})],64)}}});export{ue as default};