|
- import{a as A}from"./index.101b6644.js";import{d as G,B as I,y as S,b as N,r as b,o as W,c as n,e as m,f as y,h as e,i as l,F as T,H as J,u as f,G as K,g as v,j as k,k as M}from"./index.2dada31c.js";import{u as Q}from"./useExportExc.b55a841f.js";import{l as X}from"./contractRecord.50201ede.js";const Z={class:"flex"},ee={class:"flex justify-between items-center"},te=["onClick"],ae=["onClick"],le=["onClick"],oe=G({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:"\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:"\u6210\u4EA4\u91D1\u989D\uFF08\u4E07\u5143\uFF09",key:"transactionAmount",prop:"transactionAmount",width:"150"},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear",width:80},{label:"\u6210\u4EA4\u65F6\u95F4",key:"transactionTime",prop:"transactionTime",width:"120"},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"200"},{label:"\u64CD\u4F5C",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()},B=()=>{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()},E=d=>{s.value=d,u()},{exportLoading:H,exportData:U}=Q(),L=()=>{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 W(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:"\u9879\u76EE\u540D\u79F0"},{default:l(()=>[e(_,{modelValue:t.projectName,"onUpdate:modelValue":a[0]||(a[0]=o=>t.projectName=o),maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(p,{span:8},{default:l(()=>[e(r,{label:"\u9879\u76EE\u7C7B\u578B"},{default:l(()=>[e(q,{modelValue:t.projectType,"onUpdate:modelValue":a[1]||(a[1]=o=>t.projectType=o),placeholder:"\u5168\u90E8",class:"w-full"},{default:l(()=>[(m(!0),y(T,null,J(f(O),(o,c)=>(m(),K(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:"\u9884\u7B97\u5E74\u5EA6"},{default:l(()=>[e(x,{modelValue:t.projectYear,"onUpdate:modelValue":a[2]||(a[2]=o=>t.projectYear=o),type:"year",placeholder:"\u8BF7\u9009\u62E9",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:"\u521B\u5EFA\u65F6\u95F4"},{default:l(()=>[e(x,{modelValue:t.times,"onUpdate:modelValue":a[3]||(a[3]=o=>t.times=o),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}),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("\u67E5\u8BE2")])),_:1}),e(Y,{onClick:B},{default:l(()=>a[6]||(a[6]=[k("\u91CD\u7F6E")])),_: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:E},{default:l(()=>[e(C,{label:"\u5F85\u5B8C\u5584\u5408\u540C\u4FE1\u606F",name:"1"}),e(C,{label:"\u5DF2\u5B8C\u5584\u5408\u540C\u4FE1\u606F",name:"2"})]),_:1},8,["modelValue"]),v("div",null,[e(Y,{type:"primary",size:"small",plain:"",loading:f(H),onClick:L},{default:l(()=>a[7]||(a[7]=[k(" \u5BFC\u51FA ")])),_: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}})},"\u586B\u5199\u5408\u540C\u4FE1\u606F",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}})},"\u8865\u5145\u5B9E\u9645\u4ED8\u6B3E\u91D1\u989D",8,ae)):M("",!0),v("a",{onClick:c=>f(j).push({name:"contractRecordDetail",query:{id:o.row.id}})},"\u8BE6\u60C5",8,le)]),_:1},8,["column","data","total"])]),_:1})],64)}}});export{ue as default};
|