test_lgq/niucloud/public/admin/assets/commission-51875f9a.js
2024-01-24 17:36:08 +08:00

2 lines
7.4 KiB
JavaScript

import{d as O,O as A,n as H,r as g,f as q,h as p,c as u,e,w as s,a as l,t as r,u as a,N as i,F as G,G as J,I as T,i as f,y as K,R as W,cJ as X,an as Q,ao as Z,$ as ee,W as te,X as ae,as as oe,aF as se,cK as le,E as ie,Y as ne,ah as re,aj as me,at as ce,a0 as de}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{_ as pe}from"./default_headimg-a897263d.js";import{f as _e,n as ue,o as fe}from"./member-97cfd04b.js";import{_ as he}from"./member-commission-info.vue_vue_type_script_setup_true_lang-8429de3e.js";/* empty css */const be={class:"main-container"},ve={class:"flex justify-between items-center mb-[5px]"},ge={class:"text-[20px]"},xe={class:"statistic-card"},we={class:"statistic-footer"},ye={class:"footer-item text-[14px] text-[#666]"},ke={class:"statistic-card"},Ce={class:"statistic-footer"},Fe={class:"footer-item text-[14px] text-[#666]"},Ee={class:"statistic-card"},De={class:"statistic-footer"},Pe={class:"footer-item text-[14px] text-[#666]"},Te={class:"statistic-card"},Ve={class:"statistic-footer"},Ie={class:"footer-item text-[14px] text-[#666]"},Le={class:"mt-[10px]"},Ne=["onClick"],$e=["src"],Se={key:1,class:"w-[50px] h-[50px] mr-[10px]",src:pe,alt:""},ze={class:"flex flex flex-col"},Re={class:""},Be={key:0},Ue={key:1},Ye={class:"mt-[16px] flex justify-end"},_t=O({__name:"commission",setup(je){const C=A(),F=parseInt(C.query.id||0),V=C.meta.title,o=H({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{keywords:"",from_type:"",create_time:"",mobile:"",member_id:F}}),E=g([]);(async()=>{E.value=await(await _e("commission")).data})();const c=g([]);(()=>{ue({member_id:F}).then(m=>{c.value=m.data})})();const D=g(),I=m=>{m&&(m.resetFields(),_())},_=(m=1)=>{o.loading=!0,o.page=m,fe({page:o.page,limit:o.limit,...o.searchParam}).then(n=>{o.loading=!1,o.data=n.data.data,o.total=n.data.total}).catch(()=>{o.loading=!1})};_();const x=g(null),L=m=>{x.value.setFormData(m),x.value.showDialog=!0},N=q(),$=m=>{N.push(`/member/detail?id=${m}`)};return(m,n)=>{const h=X,b=Q,S=Z,w=ee,z=te,v=ae,P=oe,R=se,B=le,y=ie,U=ne,d=re,Y=me,j=ce,M=de;return p(),u("div",be,[e(w,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[l("div",ve,[l("span",ge,r(a(V)),1)]),e(w,{class:"box-card !border-none base-bg !px-[35px]",shadow:"never"},{default:s(()=>[e(S,{class:"flex"},{default:s(()=>[e(b,{span:6,class:"min-w-[100px]"},{default:s(()=>[l("div",xe,[e(h,{value:c.value.total_commission?Number.parseFloat(c.value.total_commission).toFixed(2):"0.00"},null,8,["value"]),l("div",we,[l("div",ye,[l("span",null,r(a(i)("totalCommission")),1)])])])]),_:1}),e(b,{span:6,class:"min-w-[100px]"},{default:s(()=>[l("div",ke,[e(h,{value:c.value.commission?Number.parseFloat(c.value.commission).toFixed(2):"0.00"},null,8,["value"]),l("div",Ce,[l("div",Fe,[l("span",null,r(a(i)("commission")),1)])])])]),_:1}),e(b,{span:6,class:"min-w-[100px]"},{default:s(()=>[l("div",Ee,[e(h,{value:c.value.withdrawn_commission?Number.parseFloat(c.value.withdrawn_commission).toFixed(2):"0.00"},null,8,["value"]),l("div",De,[l("div",Pe,[l("span",null,r(a(i)("withdrawnCommission")),1)])])])]),_:1}),e(b,{span:6,class:"min-w-[100px]"},{default:s(()=>[l("div",Te,[e(h,{value:c.value.commission_cash_outing?Number.parseFloat(c.value.commission_cash_outing).toFixed(2):"0.00"},null,8,["value"]),l("div",Ve,[l("div",Ie,[l("span",null,r(a(i)("cashOutingCommission")),1)])])])]),_:1})]),_:1})]),_:1}),e(w,{class:"box-card !border-none mb-[10px] table-search-wrap",shadow:"never"},{default:s(()=>[e(U,{inline:!0,model:o.searchParam,ref_key:"searchFormRef",ref:D},{default:s(()=>[e(v,{label:a(i)("memberInfo"),prop:"keywords"},{default:s(()=>[e(z,{modelValue:o.searchParam.keywords,"onUpdate:modelValue":n[0]||(n[0]=t=>o.searchParam.keywords=t),class:"w-[240px]",placeholder:a(i)("memberInfoPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e(v,{label:a(i)("fromType"),prop:"from_type"},{default:s(()=>[e(R,{modelValue:o.searchParam.from_type,"onUpdate:modelValue":n[1]||(n[1]=t=>o.searchParam.from_type=t),clearable:"",placeholder:a(i)("fromTypePlaceholder"),class:"input-width"},{default:s(()=>[e(P,{label:a(i)("selectPlaceholder"),value:""},null,8,["label"]),(p(!0),u(G,null,J(E.value,(t,k)=>(p(),T(P,{label:t.name,value:k},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e(v,{label:a(i)("createTime"),prop:"create_time"},{default:s(()=>[e(B,{modelValue:o.searchParam.create_time,"onUpdate:modelValue":n[2]||(n[2]=t=>o.searchParam.create_time=t),type:"datetimerange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":a(i)("startDate"),"end-placeholder":a(i)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),e(v,null,{default:s(()=>[e(y,{type:"primary",onClick:n[3]||(n[3]=t=>_())},{default:s(()=>[f(r(a(i)("search")),1)]),_:1}),e(y,{onClick:n[4]||(n[4]=t=>I(D.value))},{default:s(()=>[f(r(a(i)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),l("div",Le,[K((p(),T(Y,{data:o.data,size:"large"},{empty:s(()=>[l("span",null,r(o.loading?"":a(i)("emptyData")),1)]),default:s(()=>[e(d,{prop:"member_id",label:a(i)("memberId"),"min-width":"80","show-overflow-tooltip":!0},{default:s(({row:t})=>[f(r(t.member.member_no),1)]),_:1},8,["label"]),e(d,{label:a(i)("memberInfo"),"min-width":"150","show-overflow-tooltip":!0},{default:s(({row:t})=>[l("div",{class:"flex items-center cursor-pointer",onClick:k=>$(t.member_id)},[t.member.headimg?(p(),u("img",{key:0,class:"w-[50px] h-[50px] mr-[10px]",src:a(W)(t.member.headimg),alt:""},null,8,$e)):(p(),u("img",Se)),l("div",ze,[l("span",Re,r(t.member.nickname||""),1)])],8,Ne)]),_:1},8,["label"]),e(d,{prop:"mobile",label:a(i)("mobile"),"min-width":"100"},{default:s(({row:t})=>[f(r(t.member.mobile||""),1)]),_:1},8,["label"]),e(d,{prop:"account_data",label:a(i)("accountData"),"min-width":"80",align:"right"},{default:s(({row:t})=>[t.account_data>=0?(p(),u("span",Be,"+"+r(t.account_data),1)):(p(),u("span",Ue,r(t.account_data),1))]),_:1},8,["label"]),e(d,{prop:"account_sum",label:a(i)("accountSum"),"min-width":"120",align:"right"},null,8,["label"]),e(d,{prop:"from_type_name",label:a(i)("fromType"),"min-width":"180",align:"center"},null,8,["label"]),e(d,{prop:"create_time","show-overflow-tooltip":!0,label:a(i)("createTime"),"min-width":"150"},null,8,["label"]),e(d,{label:a(i)("operation"),align:"right",fixed:"right",width:"100"},{default:s(({row:t})=>[e(y,{type:"primary",link:"",onClick:k=>L(t)},{default:s(()=>[f(r(a(i)("info")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[M,o.loading]]),l("div",Ye,[e(j,{"current-page":o.page,"onUpdate:current-page":n[5]||(n[5]=t=>o.page=t),"page-size":o.limit,"onUpdate:page-size":n[6]||(n[6]=t=>o.limit=t),layout:"total, sizes, prev, pager, next, jumper",total:o.total,onSizeChange:n[7]||(n[7]=t=>_()),onCurrentChange:_},null,8,["current-page","page-size","total"])])])]),_:1}),e(he,{ref_key:"moneyDialog",ref:x,onComplete:_},null,512)])}}});export{_t as default};