import{b7 as A,Q as D,aY as d,aT as l,aS as h,r as L,bf as B,bg as T,bh as N,a$ as a,b0 as r,ba as m,bQ as M,aX as I,O,as as V,u as z,X as R,bc as w,N as F,b_ as Q,c as S}from"./index-xnhGKCfe.js";import{L as U}from"./index-BCXnwPbG.js";import{c as b}from"./currency-DTUBf2lI.js";import{_ as j}from"./index.vue_vue_type_style_index_0_lang-9szultRB.js";import{u as P}from"./useAgentL3-BE3dvTAU.js";import{P as X}from"./index-97-mhYEo.js";import{d as Y}from"./index-C6fvmew2.js";import"./use-tab-status-C1dTAhJi.js";import"./pre-D84pmYLY.js";import"./useProtocol-DJp7lFWi.js";/* empty css              *//* empty css              */import"./index-Cg5w-ZTN.js";import"./utils-Di4DGPCO.js";import"./index-CsZS1eZr.js";import"./index-BPVaJMve.js";import"./use-route-ooe9RtXE.js";const q={class:"records-wrapper"},E={class:"f"},G={class:"s"},H={class:"t"},J=A({__name:"list",props:{params:{type:Object,default:()=>({})}},setup($){const{otherList:c,otherPage:f,otherTotal:v,getOtherList:i}=P(),s=$,p=L();function k(e){if(["bet","deposit"].includes(s.params.type))return e.userId;if(s.params.type==="task")return e.userCount;if(s.params.type==="invite")return e.subUserId}function u(e){if(s.params.type==="bet")return e.betCommissionAmount?b(e.betCommissionAmount):"";if(s.params.type==="deposit")return e.rechargeCommissionAmount?b(e.rechargeCommissionAmount):"";if(["invite","task"].includes(s.params.type))return e.rewardAmount?b(e.rewardAmount):""}const t=L(!0),_=L(!1),y=L(!1),x=async()=>{try{await i(s.params.type,{reportDate:`${s.params.time.join("-")}-01`})}catch{}finally{_.value=!1,c.value.length>=v.value?y.value=!0:f.value.pageNo++,t.value=c.value.length!==0}};function o(){v.value=0,f.value.pageNo=1,_.value=!1,y.value=!1,t.value=!0,c.value=[]}return D(()=>s.params,()=>{o()},{deep:!0}),(e,g)=>{const C=U;return l(),d("div",q,[t.value?(l(),h(C,{key:0,ref_key:"listRef",ref:p,class:"list-container",loading:_.value,"onUpdate:loading":g[0]||(g[0]=n=>_.value=n),finished:y.value,"loading-text":"loading","finished-text":e.$t("t550"),onLoad:x},{default:B(()=>[(l(!0),d(T,null,N(m(c),n=>(l(),d("div",{class:"table-tr",key:n},[a("div",E,r(m(M)(n.createTime)),1),a("div",G,r(k(n)),1),a("div",H,r(u(n)),1)]))),128))]),_:1},8,["loading","finished","finished-text"])):(l(),h(j,{key:1,text:e.$t("t781")},null,8,["text"]))])}}}),K=I(J,[["__scopeId","data-v-d4e51a4e"]]),W={key:0,class:"list-container"},Z={class:"f"},ee={class:"s"},te={class:"t"},ae=A({__name:"noPageList",props:{date:{type:Array,default:()=>[]}},setup($){const{commissionRecordList:c,getCommissionRecordList:f}=P(),v=["","","t712","t712"],i=$;function s(){f({reportDate:`${i.date.join("-")}-01`,pageNo:1,pageSize:15})}return O(()=>{s()}),D(()=>i.date,()=>{s()},{deep:!0}),(p,k)=>(l(),d("div",null,[m(c).length>0?(l(),d("div",W,[(l(!0),d(T,null,N(m(c),u=>(l(),d("div",{class:"table-tr",key:u},[a("div",Z,r(m(M)(u.createTime)),1),a("div",ee,r(m(b)(u.commission)),1),a("div",te,r(p.$t(v[u.state])),1)]))),128))])):(l(),h(j,{key:1,text:p.$t("t781")},null,8,["text"]))]))}}),se=I(ae,[["__scopeId","data-v-62e4b79b"]]),oe={class:"header"},ne=["onClick","name"],le={class:"filter flex flex-between"},re={class:"total"},ie=A({__name:"index",setup($){const c=V(),{commissionRecordTotal:f,otherCommissionTotal:v}=P(),{t:i}=z(),s=[{name:"all",label:i("t124"),value:"all",header:{m:"t714",l:"t715"}},{name:"bet",label:i("t226"),value:"bet",header:{m:"t419",l:"t714"}},{name:"deposit",label:i("t56"),value:"deposit",header:{m:"t419",l:"t714"}},{name:"task",label:i("t1047"),value:"task",header:{m:"t717",l:"t714"}},{name:"invite",label:i("t563"),value:"invite",header:{m:"t716",l:"t714"}}],p=S(()=>{const o=s.find(e=>e.value===t.type);return o==null?void 0:o.header}),k=S(()=>t.type==="all"?f.value||0:v.value||0),u=new Date,t=R({type:c.query.type||"all",time:[`${u.getFullYear()}`,`${(u.getMonth()+1).toString().padStart(2,"0")}`]}),_=R({columnsType:["year","month"],maxDate:u});function y(o){t.time=o}function x(o){t.type=o.value}return(o,e)=>(l(),h(X,{"is-overfllow":!1},{default:B(()=>{var g,C;return[a("div",{class:w({records:!0,isAll:t.type==="all"})},[a("div",oe,[(l(),d(T,null,N(s,n=>a("div",{onClick:()=>x(n),key:n.name,name:n.name,class:w({active:t.type===n.value})},r(n.label),11,ne)),64))]),a("div",le,[F(Y,{default:t.time,onConfirm:e[0]||(e[0]=n=>y(n)),config:_},null,8,["default","config"]),a("div",re,[Q(r(o.$t("t710")),1),a("span",null,r(m(b)(k.value)),1)])]),a("div",{class:w(["table-th",{notAll:t.type!=="all"}])},[a("div",null,r(o.$t("t59")),1),a("div",null,r(o.$t((g=p.value)==null?void 0:g.m)),1),a("div",null,r(o.$t((C=p.value)==null?void 0:C.l)),1)],2),t.type==="all"?(l(),h(se,{key:0,date:t.time},null,8,["date"])):(l(),h(K,{params:t,key:String(t.type)},null,8,["params"]))],2)]}),_:1}))}}),we=I(ie,[["__scopeId","data-v-b85271f5"]]);export{we as default};
