import"./base-a9e1396c.js";import{E as y}from"./el-card-8d51e25c.js";import{a as z}from"./el-select-448a2068.js";import"./el-input-03ddc19a.js";import{E as k,a as w}from"./el-table-column-434c4a4c.js";import{E as T}from"./el-button-4f2e1711.js";import{E as C}from"./el-page-header-98396acf.js";import{a as D,E as M}from"./el-breadcrumb-item-594a11b8.js";import{g as N,d as P}from"./affiliate-2786f83c.js";/* empty css                       */import"./el-overlay-27e164ea.js";/* empty css                   */import{E as S}from"./index-bf92c153.js";import{E as i}from"./index-bd490e64.js";import{m as r,s as V,v as A,y as e,w as t,x as c,o as I,z as m}from"./normalize-8daa80b1.js";import"./config-provider-ecb8405d.js";import"./aria-fbed35f0.js";import"./strings-4a84079a.js";import"./validator-9be52df0.js";import"./request-ce1488f3.js";import"./axios-4a70c6fc.js";import"./vnode-cca0b0eb.js";import"./index-6156c07c.js";const L={class:"main"},U=c("span",{class:"text-large font-600 mr-3"}," 推薦列表 ",-1),j=c("hr",null,null,-1),H={class:"pagination-block"},ue={__name:"Index",setup($){const u=r([]),_=r(0),s=r(1),p=r(10),d=async()=>{const a=await N({page:s.value,pageSize:p.value});a.code===200&&(u.value=a.data.data,_.value=a.data.total)};V(()=>{d()});const g=a=>{S.confirm("此操作將永久刪除該推薦記錄, 是否繼續?","提示",{confirmButtonText:"確定",cancelButtonText:"取消",type:"warning"}).then(async()=>{const o=await P(a.log_id);return o.code===200?(d(),i.success("刪除成功")):i.error(o.msg)}).catch(()=>{i({type:"info",message:"已取消刪除"})})};return(a,o)=>{const f=D,b=M,E=C,l=k,v=T,B=w,x=z,h=y;return I(),A("div",L,[e(E,{icon:null,title:" ",onBack:a.onBack},{breadcrumb:t(()=>[e(b,{separator:"/"},{default:t(()=>[e(f,null,{default:t(()=>[m(" 電商管理中心 ")]),_:1}),e(f,null,{default:t(()=>[m("推薦列表")]),_:1})]),_:1})]),content:t(()=>[U]),_:1},8,["onBack"]),j,e(h,null,{default:t(()=>[e(B,{data:u.value,style:{width:"100%"}},{default:t(()=>[e(l,{prop:"order_sn",label:"訂單號"}),e(l,{prop:"user_name",label:"會員名稱"}),e(l,{prop:"order_amount",label:"訂單金額"}),e(l,{prop:"money",label:"分潤金額"}),e(l,{prop:"time",label:"時間"}),e(l,{label:"操作",width:"100"},{default:t(n=>[e(v,{size:"small",type:"danger",onClick:q=>g(n.row)},{default:t(()=>[m("刪除")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),c("div",H,[e(x,{"current-page":s.value,"onUpdate:currentPage":o[0]||(o[0]=n=>s.value=n),"page-size":p.value,"onUpdate:pageSize":o[1]||(o[1]=n=>p.value=n),"page-sizes":[10,20,50,100],small:"small",layout:"->,total, sizes, prev, pager, next, jumper",total:_.value},null,8,["current-page","page-size","total"])])]),_:1})])}}};export{ue as default};
