
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * Gitee  https://gitee.com/hooray/fantastic-admin
 * Github https://github.com/hooray/fantastic-admin
 */
  
import{_ as R}from"./index-7911c6db.js";import{A as S}from"./sales-adbe4b7a.js";import{d as B,r as u,Q as q,x as N,o as h,c as j,e,f as t,k as m,b as _,w as $,I as F,a as M,t as z,h as a,X as Q,q as I}from"./index-4eef28ae.js";const T=["src"],X=B({__name:"records",setup(G){const v=u(),b=u(0),d=u(!1),n=q({orderPrice:null,orderId:null,page:1,size:10}),w=u([]);async function i(){try{d.value=!0;const s=await S.queryRecords(n);d.value=!1;const{rows:l,count:c}=s.data;b.value=c,w.value=l}catch{d.value=!1}}function V(s){s==null||s.resetFields(),i()}return N(()=>{i()}),(s,l)=>{const c=a("el-input"),f=a("el-form-item"),y=a("el-button"),k=a("el-form"),g=R,x=a("el-alert"),r=a("el-table-column"),C=a("el-tag"),P=a("el-table"),D=a("el-pagination"),A=a("el-row"),U=Q("loading");return h(),j("div",null,[e(g,null,{default:t(()=>[e(k,{ref_key:"formRef",ref:v,inline:!0,model:n},{default:t(()=>[e(f,{label:"工单状态",prop:"orderPrice"},{default:t(()=>[e(c,{modelValue:n.orderPrice,"onUpdate:modelValue":l[0]||(l[0]=o=>n.orderPrice=o),placeholder:"订单金额"},null,8,["modelValue"])]),_:1}),e(f,{label:"订单ID",prop:"orderId"},{default:t(()=>[e(c,{modelValue:n.orderId,"onUpdate:modelValue":l[1]||(l[1]=o=>n.orderId=o),placeholder:"订单ID、模糊搜索"},null,8,["modelValue"])]),_:1}),e(f,null,{default:t(()=>[e(y,{type:"primary",onClick:i},{default:t(()=>[m(" 查询 ")]),_:1}),e(y,{onClick:l[2]||(l[2]=o=>V(_(v)))},{default:t(()=>[m(" 重置 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(g,null,{default:t(()=>[e(x,{"show-icon":"",title:"分销佣金记录流水",description:"每单的佣金会和此用户当前的返佣比例确定、用户返佣比例是可以手动变更的、所以佣金非固定！",type:"success"})]),_:1}),e(g,{style:{width:"100%"}},{default:t(()=>[$((h(),F(P,{border:"",data:_(w),style:{width:"100%"},size:"large"},{default:t(()=>[e(r,{prop:"id",label:"ID",width:"50"}),e(r,{prop:"inviterAvatar",label:"邀请人头像",width:"120"},{default:t(o=>{var p;return[M("img",{src:(p=o.row)==null?void 0:p.inviterAvatar,style:{height:"50px"}},null,8,T)]}),_:1}),e(r,{prop:"inviterEmail",label:"邀请人邮箱",width:"200"}),e(r,{prop:"inviterUsername",label:"邀请人昵称",width:"200"}),e(r,{prop:"inviteeEmail",label:"被邀人邮箱",width:"200"}),e(r,{prop:"inviteeUsername",label:"邀请人昵称",width:"200"}),e(r,{prop:"orderPrice",align:"center",label:"订单金额"}),e(r,{prop:"commissionAmount",align:"center",label:"佣金金额"},{default:t(o=>[e(C,{type:"success"},{default:t(()=>{var p;return[m(" ￥"+z((p=o.row)==null?void 0:p.commissionAmount),1)]}),_:2},1024)]),_:1}),e(r,{prop:"commissionPercentage",align:"center",label:"佣金比例"},{default:t(o=>[m(z(`${o.row.commissionPercentage}%`),1)]),_:1})]),_:1},8,["data"])),[[U,_(d)]]),e(A,{class:"flex justify-end mt-5"},{default:t(()=>[e(D,{"current-page":n.page,"onUpdate:currentPage":l[3]||(l[3]=o=>n.page=o),"page-size":n.size,"onUpdate:pageSize":l[4]||(l[4]=o=>n.size=o),class:"mr-5","page-sizes":[10,20,30,50],layout:"total, sizes, prev, pager, next, jumper",total:_(b),onSizeChange:i,onCurrentChange:i},null,8,["current-page","page-size","total"])]),_:1})]),_:1})])}}});typeof I=="function"&&I(X);export{X as default};
