import{l as h}from"./order-236db475.js";import{f as S}from"./date-20546ee0.js";import{O as k}from"./index-11dbf61f.js";import{T as y,a0 as b,a as x,b as P,v as V,w as T}from"./ui-ba7aaa7e.js";import{e as w,r as _,P as s,a3 as l,a4 as e,f as u,I as c,H as n,a9 as f,ab as N}from"./vue-bf422dc1.js";const E=w({__name:"OrderList",setup(O){const i=_([]),a=_({defaultPageSize:10,total:0,defaultCurrent:1}),d=async()=>{const m={limit:a.value.defaultPageSize,page:a.value.defaultCurrent},{data:o}=await h(m);i.value=o.list,a.value.total=o.total};return d(),(m,o)=>{const r=y,p=b,g=x,v=P,z=V,C=T;return s(),l(C,{gutter:[16,16]},{default:e(()=>[u(z,{xs:12,xl:12},{default:e(()=>[u(v,{title:"最新订单",class:"dashboard-rank-card",bordered:!1},{default:e(()=>[u(g,{data:i.value,columns:c(k),"row-key":"trade_no","max-height":"600"},{status:e(({row:t})=>[t.status===0?(s(),l(r,{key:0,variant:"light",theme:"danger",size:"small"},{default:e(()=>[n("未付款")]),_:1})):t.status===1?(s(),l(r,{key:1,variant:"light",theme:"success",size:"small"},{default:e(()=>[n("已付款")]),_:1})):t.status===2?(s(),l(r,{key:2,variant:"light",theme:"danger",size:"small"},{default:e(()=>[n("已关闭")]),_:1})):t.status===3?(s(),l(r,{key:3,variant:"light",theme:"danger",size:"small"},{default:e(()=>[n("已退款")]),_:1})):f("",!0)]),create_at:e(({row:t})=>[n(N(c(S)(t.create_at)),1)]),bottomContent:e(()=>[a.value.total>a.value.defaultPageSize?(s(),l(p,{key:0,modelValue:a.value.defaultCurrent,"onUpdate:modelValue":o[0]||(o[0]=t=>a.value.defaultCurrent=t),pageSize:a.value.defaultPageSize,"onUpdate:pageSize":o[1]||(o[1]=t=>a.value.defaultPageSize=t),total:a.value.total,"show-page-size":!1,"total-content":!1,style:{"margin-top":"10px"},onCurrentChange:d},null,8,["modelValue","pageSize","total"])):f("",!0)]),_:1},8,["data","columns"])]),_:1})]),_:1})]),_:1})}}});export{E as _};
