var E=Object.defineProperty;var y=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var b=(a,e,t)=>e in a?E(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,w=(a,e)=>{for(var t in e||(e={}))S.call(e,t)&&b(a,t,e[t]);if(y)for(var t of y(e))V.call(e,t)&&b(a,t,e[t]);return a};var v=(a,e,t)=>new Promise((f,l)=>{var _=o=>{try{p(t.next(o))}catch(r){l(r)}},n=o=>{try{p(t.throw(o))}catch(r){l(r)}},p=o=>o.done?f(o.value):Promise.resolve(o.value).then(_,n);p((t=t.apply(a,e)).next())});import{_ as Y,u as z,f as L,g as I}from"./index-2a45336b.js";import{u as O}from"./usePagination-7442a465.js";import{a as j,b as s,o as C,c as F,w as i,e as m,K as D,u as d,k as H,G as M,d as q,i as G}from"./ant-design-vue-710243d9.js";import"./tinymce-3184e0f1.js";import"./echarts-ca5d9323.js";import"./cropper-47c8e461.js";import"./lodash-es-7cb071db.js";import"./qrcode-bec2257a.js";import"./jschardet-bd496279.js";const K={class:"exportExcel"},R=["href"],T={key:0},J=Object.assign({name:"lotteryOrders"},{__name:"index",setup(a){z();const e=[{title:"奖品名称",dataIndex:"productName"},{title:"所属规则",dataIndex:"raffleName",align:"center"},{title:"中奖人",dataIndex:"customerName",align:"center"},{title:"客户手机号",dataIndex:"customerPhone",align:"center"},{title:"中奖时间",dataIndex:"createdAt",width:180,align:"center"}],{listData:t,loading:f,showLoading:l,hideLoading:_,paginationState:n,resetPagination:p,searchFormData:o}=O();j(),r();function r(){return v(this,null,function*(){try{l();const{pageSize:c,current:u}=n,{success:g,data:x,total:h}=yield L.raffleProduct.getRaffleOrders(w({pageSize:c,current:u},o.value)).catch(()=>{throw new Error});_(),I("http.code.success")===g&&(t.value=x,n.total=h)}catch(c){_()}})}function N({current:c,pageSize:u}){n.current=c,n.pageSize=u,r()}return(c,u)=>{const g=s("a-button"),x=s("a-table"),h=s("a-card"),k=s("a-col"),B=s("a-row");return C(),F(B,{gutter:8,wrap:!1},{default:i(()=>[m(k,{flex:"auto"},{default:i(()=>[m(h,{type:"flex"},{default:i(()=>[D("div",K,[m(g,{type:"primary"},{default:i(()=>[D("a",{href:d(I)("http.apiBasic")+"/api/v1/apps/common/raffle/Atbrw2334D_FVadfyb435zr55q3"},"导出Excel",8,R)]),_:1})]),m(x,{columns:e,"data-source":d(t),bordered:"true",loading:d(f),pagination:d(n),scroll:{x:1e3},onChange:N},{bodyCell:i(({column:P,record:A})=>[P.dataIndex==="createdAt"?(C(),H("span",T,M(d(q)(A.createdAt).format("YYYY-MM-DD HH:mm")),1)):G("",!0)]),_:1},8,["data-source","loading","pagination"])]),_:1})]),_:1})]),_:1})}}}),nt=Y(J,[["__scopeId","data-v-f066da71"]]);export{nt as default};
