import"./base-a3ee0d3b.js";import{E as y,a as z,b as k}from"./el-table-column-e794cc32.js";import{a as w}from"./el-select-41d99f87.js";import"./el-input-121264f0.js";import{E as T}from"./el-button-61655bf9.js";import{E as C}from"./el-page-header-38890eb0.js";import{a as D,E as M}from"./el-breadcrumb-item-57e26f3b.js";import{g as N,d as P}from"./affiliate-146e0c37.js";/* empty css                   *//* empty css                       */import"./el-overlay-711fbdc6.js";import{E as S}from"./index-09fdd624.js";import{E as i}from"./index-e20b0307.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-035cc755.js";import"./aria-c4f251c4.js";import"./config-provider-c5285acd.js";import"./strings-8d290902.js";import"./validator-077362c6.js";import"./request-ba216ded.js";import"./axios-4a70c6fc.js";import"./vnode-6505e0e6.js";import"./index-e156b27d.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"},ce={__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=z,v=T,B=k,x=w,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{ce as default};
