import{r as T,u as S}from"./index-8db2df2c.js";import{R as P}from"./index-fb16f061.js";import{p as k}from"./global-0d825ba6.js";import{f as w}from"./date-20546ee0.js";import{A as z,T as B,a as K,b as N}from"./ui-ba7aaa7e.js";import{e as A,r as s,o as R,d as V,P as i,a3 as c,a4 as a,f as u,H as d,I as g,a7 as D,ab as m}from"./vue-bf422dc1.js";import"./libs-51817cd7.js";import"./plugins-ca970193.js";import"./others-9f318174.js";import"./echarts-bf9d612c.js";import"./icons-a8498fb6.js";import"./no-list-e2f85d5e.js";function I(p){return T.post({url:"/merchantapi/finance/money/log",data:p})}const L=[{width:200,colKey:"create_at",title:"时间",ellipsis:!0,cell:"create_at"},{width:120,colKey:"money",title:"变动金额"},{width:120,colKey:"balance",title:"变动后余额"},{colKey:"reason",title:"描述",cell:"reason",fixed:"right"}],M={name:"FinanceTranslist"},X=A({...M,setup(p){const h=S(),l=s([]),e=s({defaultPageSize:20,total:0,defaultCurrent:1}),r=s(!1),f=async()=>{r.value=!0;const t={page:e.value.defaultCurrent,limit:e.value.defaultPageSize},{data:n}=await I(t);l.value=n.list,e.value={...e.value,total:n.total},r.value=!1};R(()=>{f()});const v=(t,n)=>{e.value.defaultCurrent=t.current,e.value.defaultPageSize=t.pageSize,f()},y=V(()=>({offsetTop:h.isUseTabsRouter?48:0,container:`.${k}-layout`}));return(t,n)=>{const b=z,_=B,x=K,C=N;return i(),c(C,{title:"流水记录",class:"basic-container",bordered:!1},{default:a(()=>[u(b,null,{default:a(()=>[d(" 只保留显示最近30天的流水日志 ")]),_:1}),u(x,{data:l.value,columns:g(L),"row-key":"id","vertical-align":"middle",hover:l.value.length>0,"table-layout":"auto","max-height":"auto",pagination:e.value,"header-affixed-top":y.value,loading:r.value,onPageChange:v},{create_at:a(({row:o})=>[D("span",null,m(g(w)(o.create_at)),1)]),money:a(({row:o})=>[o.money<0?(i(),c(_,{key:0,theme:"danger",variant:"light"},{default:a(()=>[d(m(o.money),1)]),_:2},1024)):(i(),c(_,{key:1,theme:"success",variant:"light"},{default:a(()=>[d(m(o.money),1)]),_:2},1024))]),empty:a(()=>[u(P,{title:"",tip:"流水为空",type:"list"})]),_:1},8,["data","columns","hover","pagination","header-affixed-top","loading"])]),_:1})}}});export{X as default};
