import{d as E,r as T,G as x,g as p,J as G,c,k as l,K as H,e as i,z as C,w as o,b as t,x as s,H as r,l as J,L as K,t as u,_ as W}from"./index-CUnFTKV2.js";import{O as z,P}from"./order-BSmesayL.js";const $={class:"order-table"},q={class:"order-num"},Q={class:"user-info"},R={class:"nickname"},X={class:"uid"},Y={key:0,class:"mobile"},Z={class:"goods-info"},w={class:"image-error"},ee={class:"goods-detail"},te={class:"goods-title"},se={class:"goods-meta"},ae={class:"money-info"},ne={class:"money"},ie={key:0},oe={class:"discount"},le={class:"money"},de={class:"lottery-info"},ce={class:"count"},re={class:"prize-count"},ue={class:"pay-info"},pe={key:0},_e={key:1},me={key:2},ge={key:3},ye={key:4},ve={class:"pay-type"},he={class:"time-info"},fe={key:0},be=E({__name:"OrderListTable",props:{data:{},loading:{type:Boolean},total:{},page:{},pageSize:{}},emits:["page-change","size-change","view-detail"],setup(y,{emit:N}){const v=y,h=N,f=T(v.page),b=T(v.pageSize);x(()=>v.page,n=>{f.value=n}),x(()=>v.pageSize,n=>{b.value=n});const S=n=>{switch(n){case z.Paid:return"success";case z.Unpaid:return"warning";case z.Cancelled:return"info";default:return"info"}},U=n=>{switch(n){case P.WeChat:return"success";case P.Alipay:return"primary";case P.Unpaid:return"warning";default:return"info"}},F=n=>({1:"一番赏",2:"无限赏",3:"擂台赏",4:"抽卡机",5:"福袋",6:"盲盒",7:"连击赏",8:"打打乐",9:"其他"})[n]||"未知",I=n=>{h("page-change",n)},B=n=>{h("size-change",n)},D=n=>{h("view-detail",n)};return(n,a)=>{const d=p("el-table-column"),O=p("el-icon"),V=p("el-image"),k=p("el-tag"),M=p("el-button"),L=p("el-table"),A=p("el-pagination"),j=G("loading");return l(),c("div",$,[H((l(),C(L,{data:y.data,border:"",stripe:""},{default:o(()=>[i(d,{prop:"orderNum",label:"订单号","min-width":"180",fixed:"left"},{default:o(({row:e})=>[t("span",q,s(e.orderNum),1)]),_:1}),i(d,{label:"用户信息","min-width":"160"},{default:o(({row:e})=>[t("div",Q,[t("div",R,s(e.userNickname||"-"),1),t("div",X,"UID: "+s(e.userId),1),e.userMobile?(l(),c("div",Y,s(e.userMobile),1)):r("",!0)])]),_:1}),i(d,{label:"盒子详情","min-width":"200"},{default:o(({row:e})=>[t("div",Z,[e.goodsImgUrl?(l(),C(V,{key:0,src:e.goodsImgUrl,"preview-src-list":[e.goodsImgUrl],fit:"cover",class:"goods-img",lazy:""},{error:o(()=>[t("div",w,[i(O,null,{default:o(()=>[i(J(K))]),_:1})])]),_:1},8,["src","preview-src-list"])):r("",!0),t("div",ee,[t("div",te,s(e.goodsTitle||"-"),1),t("div",se,[t("span",null,"类型: "+s(F(e.orderType)),1)])])])]),_:1}),i(d,{label:"金额详情","min-width":"180"},{default:o(({row:e})=>{var _,m,g;return[t("div",ae,[t("div",null,[a[2]||(a[2]=u("订单金额: ",-1)),t("span",ne,"¥"+s(((_=e.orderTotal)==null?void 0:_.toFixed(2))||"0.00"),1)]),e.discount>0?(l(),c("div",ie,[a[3]||(a[3]=u("折扣: ",-1)),t("span",oe,"-¥"+s((m=e.discount)==null?void 0:m.toFixed(2)),1)])):r("",!0),t("div",null,[a[4]||(a[4]=u("实付金额: ",-1)),t("span",le,"¥"+s(((g=e.discountTotal)==null?void 0:g.toFixed(2))||"0.00"),1)])])]}),_:1}),i(d,{label:"抽奖情况","min-width":"120"},{default:o(({row:e})=>[t("div",de,[t("div",null,[a[5]||(a[5]=u("抽奖次数: ",-1)),t("span",ce,s(e.num),1)]),t("div",null,[a[6]||(a[6]=u("中奖数: ",-1)),t("span",re,s(e.prizeNum),1)])])]),_:1}),i(d,{label:"支付信息","min-width":"160"},{default:o(({row:e})=>{var _,m,g;return[t("div",ue,[e.weChatPayment>0?(l(),c("div",pe,"微信: ¥"+s((_=e.weChatPayment)==null?void 0:_.toFixed(2)),1)):r("",!0),e.balancePayment>0?(l(),c("div",_e,"余额: ¥"+s((m=e.balancePayment)==null?void 0:m.toFixed(2)),1)):r("",!0),e.integralPayment>0?(l(),c("div",me,"积分: "+s(e.integralPayment),1)):r("",!0),e.scorePayment>0?(l(),c("div",ge,"评分: "+s(e.scorePayment),1)):r("",!0),e.couponPayment&&e.couponPayment>0?(l(),c("div",ye,"优惠券: ¥"+s((g=e.couponPayment)==null?void 0:g.toFixed(2)),1)):r("",!0),t("div",ve,[i(k,{size:"small",type:U(e.payType)},{default:o(()=>[u(s(e.payTypeName),1)]),_:2},1032,["type"])])])]}),_:1}),i(d,{label:"状态",width:"100",align:"center"},{default:o(({row:e})=>[i(k,{type:S(e.status),size:"small"},{default:o(()=>[u(s(e.statusName),1)]),_:2},1032,["type"])]),_:1}),i(d,{label:"时间","min-width":"160"},{default:o(({row:e})=>[t("div",he,[t("div",null,"下单: "+s(e.createdAt),1),e.payTime?(l(),c("div",fe,"支付: "+s(e.payTime),1)):r("",!0)])]),_:1}),i(d,{label:"操作",width:"120",fixed:"right",align:"center"},{default:o(({row:e})=>[i(M,{type:"primary",link:"",onClick:_=>D(e)},{default:o(()=>[...a[7]||(a[7]=[u(" 查看详情 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[j,y.loading]]),i(A,{"current-page":f.value,"onUpdate:currentPage":a[0]||(a[0]=e=>f.value=e),"page-size":b.value,"onUpdate:pageSize":a[1]||(a[1]=e=>b.value=e),"page-sizes":[10,20,50,100],total:y.total,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:B,onCurrentChange:I,class:"pagination"},null,8,["current-page","page-size","total"])])}}}),ke=W(be,[["__scopeId","data-v-04d5ae83"]]);export{ke as default};
