"use strict";const e=require("../../common/vendor.js"),a=require("../../common/assets.js"),o=require("../../api/index.js"),t=require("../../store/index.js"),n=require("../../utils/fun.js");if(!Array){(e.resolveComponent("wd-navbar")+e.resolveComponent("wd-picker")+e.resolveComponent("z-paging"))()}Math||((()=>"../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js")+(()=>"../../uni_modules/wot-design-uni/components/wd-picker/wd-picker.js")+(()=>"../../uni_modules/z-paging/components/z-paging/z-paging.js"))();const r=e.defineComponent({__name:"wallet",setup(r){const l=e.ref({}),u=t.Store(),s=e.ref(null),i=e.ref([]),p=e.ref([]),c=e.ref(!0),m=e.ref(""),v=e.ref(!1),d=e.ref({bizType:""}),f=e.computed((()=>u.userInfo||{inviteCode:"",nickname:"",mobile:"",avatar:"",paywallet:{balance:0}}));e.onShow((async()=>{f.value.branchCompany&&o.api.rewardReport().then((e=>{l.value=e}))}));const _=(e,a)=>{o.api.moneyRecord({pageNo:e,pageSize:a,...d.value}).then((e=>{p.value=Object.entries(e.bizType).map((([e,a])=>({value:e,label:a}))),p.value.unshift({label:"全部",value:""}),s.value.complete(e.list)})).catch((e=>{s.value.complete(!1)}))},b=e=>{e.value?m.value=e.selectedItems.label:m.value="",s.value.reload()},w=()=>{e.index.navigateBack()},y=()=>{e.index.showModal({title:"提示",content:"每月初结算上月业绩，“团队补货”为团队补货回款，例：本月整个团队总补货回款为20W，则月度团队补货收益为20W×12%=24000元",showCancel:!1})},g=()=>{v.value=!v.value},h=()=>{e.index.navigateTo({url:"/pages/wallet/zhaun"})};return(o,t)=>e.e({a:e.o(w),b:e.p({title:"钱包",bordered:!1,"left-arrow":!0,"custom-style":"background-color: transparent !important;",safeAreaInsetTop:!0}),c:a._imports_0$9,d:a._imports_1$7,e:e.o(g),f:`/static/icons/yan${v.value?"s":""}.png`,g:e.t(v.value?"****":f.value.money),h:a._imports_2$3,i:e.o(h),j:e.t(f.value.performanceReward||0),k:e.t(f.value.directReferralReward||0),l:e.t(f.value.indirectReferralReward||0),m:e.t(f.value.specialReward||0),n:f.value.branchCompany},f.value.branchCompany?{o:a._imports_3$2,p:e.o(y),q:e.t(l.value.total_monthly_performance),r:e.f(l.value.money_count,((a,o,t)=>({a:e.t(a.money||0),b:e.t(a.name),c:e.t(a.count||0),d:o}))),s:e.t(l.value.restock_reward||0)}:{},{t:a._imports_0$8,v:e.t(m.value||"筛选"),w:a._imports_1$6,x:e.o((e=>c.value=!0)),y:e.o((e=>c.value=!1)),z:e.o(b),A:e.o((e=>d.value.bizType=e)),B:e.p({columns:p.value,"use-default-slot":!0,modelValue:d.value.bizType}),C:e.f(i.value,((a,o,t)=>({a:e.t(a.title),b:e.t(e.unref(n.timeFormat)(a.createTime,"yyyy-MM-dd hh:mm:ss")),c:e.t(a.money),d:o}))),D:e.sr(s,"52fa05db-0",{k:"paging"}),E:e.o(_),F:e.o((e=>i.value=e)),G:e.p({"refresher-enabled":c.value,modelValue:i.value})})}}),l=e._export_sfc(r,[["__scopeId","data-v-52fa05db"]]);wx.createPage(l);
