import{d as C,r as l,z as E,c as B,a as t,w as s,a$ as k,B as T,q as z,b as g,aY as N,Z as V,b0 as D,h as v,t as i,b1 as L,b2 as P,bc as j,o as b}from"./index-DqVhJ65C.js";/* empty css                *//* empty css                      *//* empty css               *//* empty css                  *//* empty css                     *//* empty css                  *//* empty css                        *//* empty css                    */import"./el-tooltip-l0sNRNKZ.js";const q={class:"p-6"},M={class:"font-bold"},R={class:"mt-4 flex justify-end"},K=C({__name:"Records",setup(S){const c=l([]),n=l(!1),r=l(1),p=l(20),d=l(0),u=async()=>{n.value=!0;try{const o=await T.get("/admin/payment/records",{params:{page:r.value,limit:p.value}});o.code===0&&(c.value=o.data.data,d.value=o.data.total)}catch(o){console.error(o)}finally{n.value=!1}};return E(()=>{u()}),(o,_)=>{const a=D,f=L,h=P,w=j,y=k,x=N;return b(),B("div",q,[t(y,{shadow:"hover"},{default:s(()=>[z((b(),V(h,{data:c.value,stripe:"",border:""},{default:s(()=>[t(a,{prop:"order_no",label:"订单号",width:"200"}),t(a,{label:"用户",width:"120"},{default:s(({row:e})=>{var m;return[v(i((m=e.user)==null?void 0:m.username),1)]}),_:1}),t(a,{prop:"amount",label:"金额",width:"120"},{default:s(({row:e})=>[g("span",M,"¥"+i(e.amount),1)]),_:1}),t(a,{prop:"pay_method",label:"支付方式",width:"100"}),t(a,{prop:"status",label:"状态",width:"100"},{default:s(({row:e})=>[t(f,{type:e.status===1?"success":"warning"},{default:s(()=>[v(i(e.status===1?"已支付":"待支付"),1)]),_:2},1032,["type"])]),_:1}),t(a,{prop:"description",label:"描述","min-width":"200"}),t(a,{prop:"create_time",label:"创建时间",width:"180"})]),_:1},8,["data"])),[[x,n.value]]),g("div",R,[t(w,{background:"",layout:"prev, pager, next",total:d.value,"current-page":r.value,"onUpdate:currentPage":_[0]||(_[0]=e=>r.value=e),"page-size":p.value,onCurrentChange:u},null,8,["total","current-page","page-size"])])]),_:1})])}}});export{K as default};
