import{P as B}from"./page.3b4d44cb.js";import{b7 as $,b as S,ar as F,N as D,E as P,_ as E,c as r,e as I,k as L,i as t,g as p,h as e,m as c,t as u}from"./index.0308b213.js";import{Y as N,Z as V}from"./storeActivity.634c4426.js";const j={components:{Page:B},setup(){const o=$(),n=S({loading:!1,delLoading:!1,tableData:[],selectIds:[]}),m=a=>{o.push({path:"/store/marketing/addSagawa",query:{id:a}})},w=a=>{n.selectIds=a.map(s=>s.id)},b=S({page:1,limit:10}),g=()=>{n.loading=!0,N(b).then(a=>{console.log("\u8BF7\u6C42\u7ED3\u679C\uFF1A",a),n.tableData=a.list}).finally(()=>{n.loading=!1})};g();const _=a=>{D.alert("\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F","\u63D0\u793A",{showCancelButton:!0}).then(s=>{!(a!=null&&a.length)&&(n.delLoading=!0),V({ids:a||n.selectIds}).then(h=>{P.success("\u5220\u9664\u6210\u529F"),g()}).finally(()=>{!(a!=null&&a.length)&&(n.delLoading=!1)})}).catch(s=>{})};return{...F(n),toAddSagawa:m,del:_,tableSelects:w}}};const M={class:"container"},R=c("\u521B\u5EFA\u7279\u4EF7\u6D3B\u52A8"),q=c("\u7F16\u8F91"),T=c("\u5220\u9664"),Y=c("\u5220\u9664");function Z(o,n,m,w,b,g){const _=r("el-button"),a=r("el-col"),s=r("el-row"),h=r("el-alert"),d=r("el-table-column"),f=r("el-tag"),v=r("el-table"),A=r("Page");return I(),L(A,{showBorder:!1,loading:o.loading},{main:t(()=>[p("div",M,[e(s,null,{default:t(()=>[e(a,null,{default:t(()=>[e(_,{type:"primary",onClick:n[0]||(n[0]=l=>o.toAddSagawa())},{default:t(()=>[R]),_:1})]),_:1})]),_:1}),e(s,null,{default:t(()=>[e(a,null,{default:t(()=>[e(h,{title:"\u6BCF\u4E2A\u95E8\u5E97\u6700\u591A\u652F\u6301\u4E0A\u67B6\u4E00\u4E2A\u7279\u4EF7\u6D3B\u52A8\u3002",type:"warning",closable:!1,"show-icon":""})]),_:1})]),_:1}),e(s,null,{default:t(()=>[e(a,null,{default:t(()=>[e(v,{border:"",data:o.tableData,style:{width:"100%"},onSelectionChange:o.tableSelects},{default:t(()=>[e(d,{align:"center",type:"selection"}),e(d,{align:"center",prop:"title",label:"\u6D3B\u52A8\u4E3B\u9898"}),e(d,{align:"center",label:"\u6BCF\u4EBA\u9650\u8D2D"},{default:t(l=>[e(s,{justify:"center"},{default:t(()=>[e(f,{effect:"dark",type:"success"},{default:t(()=>[c("\u6BCF\u4EBA\u6BCF\u5929\u9650\u8D2D"+u(l.row.order_limit)+"\u5355",1)]),_:2},1024)]),_:2},1024),e(s,{justify:"center"},{default:t(()=>[e(f,{effect:"dark",type:"danger"},{default:t(()=>[c("\u6BCF\u5355\u9650\u8D2D"+u(l.row.goods_limit)+"\u79CD\u5546\u54C1",1)]),_:2},1024)]),_:2},1024)]),_:1}),e(d,{align:"center",prop:"date",label:"\u6D3B\u52A8\u65E5\u671F"},{default:t(l=>[p("span",null,u(l.row.starttime)+" ~ "+u(l.row.endtime),1)]),_:1}),e(d,{align:"center",label:"\u62A2\u8D2D\u65F6\u6BB5"},{default:t(l=>[p("span",null,u(l.row.starthour)+"-"+u(l.row.endhour),1)]),_:1}),e(d,{align:"center",label:"\u72B6\u6001"},{default:t(l=>{var i,y;return[e(f,{effect:"dark",type:(y=(i=l.row)==null?void 0:i.bargain_status)==null?void 0:y.css},{default:t(()=>{var k,C;return[c(u((C=(k=l.row)==null?void 0:k.bargain_status)==null?void 0:C.text),1)]}),_:2},1032,["type"])]}),_:1}),e(d,{align:"center",label:"\u64CD\u4F5C"},{default:t(l=>[e(_,{onClick:i=>o.toAddSagawa(l.row.id)},{default:t(()=>[q]),_:2},1032,["onClick"]),e(_,{onClick:i=>o.del(l.row.id)},{default:t(()=>[T]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data","onSelectionChange"])]),_:1})]),_:1}),e(_,{type:"danger",loading:o.delLoading,onClick:n[1]||(n[1]=l=>o.del())},{default:t(()=>[Y]),_:1},8,["loading"])])]),_:1},8,["loading"])}const H=E(j,[["render",Z],["__scopeId","data-v-f75de658"]]);export{H as default};
