import{r as e,b as a,ad as t,c as r,d as s,e as i,h as l,w as n,g as o,j as d,k as p,f as c,n as u,am as m,an as g,E as f,p as b}from"./index.286e9b79.js";import{v as y}from"./loading.c49775a6.js";import{E as h}from"./pagination.22bb50f6.js";import"./input.31de1b37.js";/* empty css            */import"./select.297a82d5.js";import{E as _,a as j}from"./table-column.7b4f59a2.js";import"./checkbox.f06171a4.js";import{E as v}from"./text.b43d8d63.js";import{g as w}from"./http.f588794f.js";import{f as z}from"./days.686d9566.js";import"./isEqual.57d72c4a.js";import"./_initCloneObject.fb8fbaea.js";import"./event.776e7e11.js";import"./index.ed3ed02e.js";import"./index.27150c7e.js";import"./token.34cb8214.js";import"./strings.8c60bfae.js";import"./scroll.a50153b5.js";import"./_baseIteratee.9ead53a1.js";import"./debounce.caafe00b.js";const x={class:"table-wrap"},k={class:"table-box"},E={class:"tabs-content"},C=l("span",{style:{"font-size":"14px","margin-left":"5px"}},"暂无数据",-1),I={key:0},S={key:1},U={class:"page"},q=l("div",{class:"l"},null,-1),D={class:"r"},O={__name:"receive",setup(O){const P=e([]);let W=e(!1);const A=a({current:1,size:10,total:0}),B=()=>{W.value=!0,w("promotion.coupon/receive",A).then((e=>{W.value=!1,e.code?(P.value=e.data.list,A.total=e.data.total):f.error(e.msg)})).catch((e=>{W.value=!1,f.error(e)}))};t((()=>{B()}));const F=e=>{A.size=e},G=e=>{A.current=e,B()};return(e,a)=>{const t=r("Warning"),f=b,w=_,O=v,B=j,H=h,J=y;return s(),i("div",null,[l("div",x,[l("div",k,[l("div",E,[n((s(),d(B,{data:o(P),size:"large",style:{width:"100%"},"max-height":"800"},{empty:p((()=>[c(f,{size:"18",style:{position:"relative",top:"4px"}},{default:p((()=>[c(t)])),_:1}),C])),default:p((()=>[c(w,{prop:"id",label:"ID","header-align":"center",align:"center",width:"100"}),c(w,{prop:"username",label:"会员信息","header-align":"center",align:"center",width:"130"}),c(w,{prop:"type",label:"类型","header-align":"center",align:"center",width:"120"},{default:p((e=>[l("div",null,[1==e.row.type?(s(),d(O,{key:0,type:"primary"},{default:p((()=>[u("满减券")])),_:1})):(s(),d(O,{key:1,type:"success"},{default:p((()=>[u("折扣券")])),_:1}))])])),_:1}),c(w,{prop:"name",label:"优惠券名称","header-align":"center",align:"center",width:"350"}),c(w,{prop:"name",label:"优惠方式","header-align":"center",align:"center",width:"150"},{default:p((e=>[1==e.row.type?(s(),i("div",I,[u("立减"),c(O,{type:"primary"},{default:p((()=>[u(m(e.row.reduce_price),1)])),_:2},1024),u("元")])):(s(),i("div",S,[c(O,{type:"primary"},{default:p((()=>[u(m(e.row.discount/100),1)])),_:2},1024),u("折扣")]))])),_:1}),c(w,{prop:"order_amount",label:"使用条件","header-align":"center",align:"center",width:"150"},{default:p((e=>[l("div",null,[u(" 订单满"),c(O,{type:"danger"},{default:p((()=>[u(m(e.row.order_amount||0),1)])),_:2},1024),u("元 ")])])),_:1}),c(w,{prop:"days",label:"有效期","header-align":"center",align:"center",width:"100"},{default:p((e=>[l("div",null,[c(O,{type:"primary"},{default:p((()=>[u(m(e.row.days),1)])),_:2},1024),u("天 ")])])),_:1}),c(w,{label:"状态","header-align":"center",align:"center",width:"80"},{default:p((e=>[l("div",null,[1==e.row.status?(s(),d(O,{key:0,type:"success"},{default:p((()=>[u("已使用")])),_:1})):g("",!0),0==e.row.status?(s(),d(O,{key:1,type:"primary"},{default:p((()=>[u("未使用")])),_:1})):g("",!0)])])),_:1}),c(w,{prop:"create_time",label:"领取时间","header-align":"center",align:"center",width:"180"},{default:p((e=>[u(m(o(z)(e.row.create_time)),1)])),_:1})])),_:1},8,["data"])),[[J,o(W)]])]),l("div",U,[q,l("div",D,[c(H,{"current-page":o(A).current,"onUpdate:currentPage":a[0]||(a[0]=e=>o(A).current=e),"page-size":o(A).size,"onUpdate:pageSize":a[1]||(a[1]=e=>o(A).size=e),small:!0,"page-sizes":[10,20,30,40,50,60,70,80,90,100],layout:"prev, pager, next, jumper, sizes, total",total:o(A).total,onSizeChange:F,onCurrentChange:G},null,8,["current-page","page-size","total"])])])])])])}}};export{O as default};
