chunk-91948754.c318a67b.js 17 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-91948754","chunk-d79015d6"],{3402:function(e,t,a){},"9d1c":function(e,t,a){"use strict";a.r(t);var o=a("7a23");const n=Object(o["withScopeId"])("data-v-7c43349d");Object(o["pushScopeId"])("data-v-7c43349d");const c={class:"ele-body ele-body-card"},r={class:"page-title-wrap"},i={class:"page-title-left"},s=Object(o["createVNode"])("div",{class:"title-left-info"},"账户金额(元)",-1),d={class:"title-left-content"},l={class:"left-data"},b={class:"left-data-desc"},m=Object(o["createTextVNode"])("提现"),u={class:"page-title-right"},p={class:"page-right-data"},h={class:"page-right-data"},f={class:"right-data"},O=Object(o["createVNode"])("div",{class:"right-data-desc"},"累计收入",-1),j={class:"page-right-data"},_={class:"right-data"},k=Object(o["createVNode"])("div",{class:"right-data-desc"},"累计提现",-1),g={key:0},w={key:1,class:"ele-text-warning"},v=Object(o["createTextVNode"])("请添加"),y=Object(o["createVNode"])("div",{class:"item-tips"},"说明:提现人姓名如错误,请联系上级修改",-1),N={class:"item-tips tipsBetween"},I={key:0},V={style:{width:"100%",display:"flex","justify-content":"space-between"}},C={class:"item-tips"},x=Object(o["createTextVNode"])("确定"),B=Object(o["createTextVNode"])("取消");Object(o["popScopeId"])();const D=n((e,t,a,D,M,S)=>{const $=Object(o["resolveComponent"])("a-button"),L=Object(o["resolveComponent"])("a-divider"),F=Object(o["resolveComponent"])("IdcardOutlined"),T=Object(o["resolveComponent"])("EditOutlined"),U=Object(o["resolveComponent"])("a-space"),A=Object(o["resolveComponent"])("a-card"),K=Object(o["resolveComponent"])("recordLog"),R=Object(o["resolveComponent"])("a-input"),Y=Object(o["resolveComponent"])("a-form-item"),W=Object(o["resolveComponent"])("a-select"),z=Object(o["resolveComponent"])("a-form"),E=Object(o["resolveComponent"])("a-modal"),q=Object(o["resolveComponent"])("a-input-number");return Object(o["openBlock"])(),Object(o["createBlock"])("div",c,[Object(o["createVNode"])(A,{bordered:!1},{default:n(()=>[Object(o["createVNode"])("div",r,[Object(o["createVNode"])("div",i,[s,Object(o["createVNode"])("div",d,[Object(o["createVNode"])("div",l,Object(o["toDisplayString"])(M.baseInfo.money),1),Object(o["createVNode"])("div",b,[Object(o["createVNode"])($,{type:"primary",size:"small",onClick:S.openWithdrawModal},{default:n(()=>[m]),_:1},8,["onClick"])])])]),Object(o["createVNode"])("div",u,[Object(o["createVNode"])("div",p,[Object(o["createVNode"])(L,{type:"vertical",style:{height:"60px"}})]),Object(o["createVNode"])("div",h,[Object(o["createVNode"])("div",f,Object(o["toDisplayString"])(M.baseInfo.total_income),1),O]),Object(o["createVNode"])("div",j,[Object(o["createVNode"])("div",_,Object(o["toDisplayString"])(M.baseInfo.withdrawn_money),1),k])])]),Object(o["createVNode"])(U,{class:"page-bank-wrap"},{default:n(()=>[Object(o["createVNode"])(F),M.bankInfo.id?(Object(o["openBlock"])(),Object(o["createBlock"])("span",g,"提现账号:"+Object(o["toDisplayString"])(M.bankInfo.username)+" "+Object(o["toDisplayString"])(M.bankInfo.bank_name)+" "+Object(o["toDisplayString"])(M.bankInfo.account),1)):(Object(o["openBlock"])(),Object(o["createBlock"])("span",w,"您还未添加提现银行卡")),M.bankInfo.id?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createBlock"])($,{key:2,type:"link",onClick:t[1]||(t[1]=e=>S.openModal())},{default:n(()=>[v]),_:1})),M.bankInfo.id?(Object(o["openBlock"])(),Object(o["createBlock"])("span",{key:3,class:"ele-text-primary bank-edit-icon",onClick:t[2]||(t[2]=e=>S.openModal())},[Object(o["createVNode"])(T)])):Object(o["createCommentVNode"])("",!0)]),_:1})]),_:1}),Object(o["createVNode"])(A,{bordered:!1},{default:n(()=>[Object(o["createVNode"])(K)]),_:1}),Object(o["createVNode"])(E,{"wrap-class-name":"ele-modal-movable ele-modal-resizable ele-modal-resizable",visible:M.visible,"onUpdate:visible":t[8]||(t[8]=e=>M.visible=e),width:500,title:"设置提现银行卡",onOk:S.submit,confirmLoading:M.loading},{default:n(()=>[Object(o["createVNode"])(z,{ref:"form",model:M.bankInfo,"label-col":{span:4},"wrapper-col":{span:20}},{default:n(()=>[Object(o["createVNode"])(Y,{label:"账户姓名:",name:"settle_account_name"},{default:n(()=>[Object(o["createVNode"])(R,{value:M.form.username,"onUpdate:value":t[3]||(t[3]=e=>M.form.username=e),disabled:!0},null,8,["value"]),y]),_:1}),Object(o["createVNode"])(Y,{label:"银行名称:",name:"bank_type"},{default:n(()=>[Object(o["createVNode"])(W,{value:M.bank_type,"onUpdate:value":t[4]||(t[4]=e=>M.bank_type=e),options:M.bankList,onChange:t[5]||(t[5]=e=>S.bankChange())},null,8,["value","options"])]),_:1}),"其他银行"==M.bank_type?(Object(o["openBlock"])(),Object(o["createBlock"])(Y,{key:0,label:"所属支行:",name:"bank_name"},{default:n(()=>[Object(o["createVNode"])(R,{value:M.form.bank_name,"onUpdate:value":t[6]||(t[6]=e=>M.form.bank_name=e),placeholder:"请填写开户支行名称","allow-clear":""},null,8,["value"])]),_:1})):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(Y,{label:"银行卡号:",name:"card_no"},{default:n(()=>[Object(o["createVNode"])(R,{value:M.form.account,"onUpdate:value":t[7]||(t[7]=e=>M.form.account=e),placeholder:"请填写银行卡号","allow-clear":""},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["visible","onOk","confirmLoading"]),Object(o["createVNode"])(E,{"wrap-class-name":"ele-modal-movable ele-modal-resizable ele-modal-resizable",visible:M.withdrawModal.visible,"onUpdate:visible":t[12]||(t[12]=e=>M.withdrawModal.visible=e),title:"提现申请",onOk:S.toApplyWithdraw,confirmLoading:M.withdrawLoading},{footer:n(()=>[Object(o["createVNode"])("div",V,[Object(o["createVNode"])("div",C,Object(o["toDisplayString"])(S.amountInfo||""),1),Object(o["createVNode"])("div",null,[Object(o["createVNode"])($,{key:"submit",type:"primary",loading:M.loading,onClick:S.toApplyWithdraw},{default:n(()=>[x]),_:1},8,["loading","onClick"]),Object(o["createVNode"])($,{key:"back",onClick:t[11]||(t[11]=e=>M.withdrawModal.visible=!1)},{default:n(()=>[B]),_:1})])])]),default:n(()=>[Object(o["createVNode"])(z,{ref:"withdrowForm",model:M.withdrawModal.form,rules:M.rules,"label-col":{md:{span:4},sm:{span:24}},"wrapper-col":{md:{span:20},sm:{span:24}}},{default:n(()=>[Object(o["createVNode"])(Y,{label:"提现账户:",name:"account_type"},{default:n(()=>[Object(o["createVNode"])(W,{value:M.withdrawModal.form.account_type,"onUpdate:value":t[9]||(t[9]=e=>M.withdrawModal.form.account_type=e),placeholder:"请选择级别",options:M.withdrawAccountType,"allow-clear":""},null,8,["value","options"])]),_:1}),Object(o["createVNode"])(Y,{label:"提现金额:",name:"amount"},{default:n(()=>[Object(o["createVNode"])(q,{class:"ele-fluid",value:M.withdrawModal.form.amount,"onUpdate:value":t[10]||(t[10]=e=>M.withdrawModal.form.amount=e),min:Number(M.baseInfo.saas_withdraw_min_money||1),max:Number(M.baseInfo.money)},null,8,["value","min","max"]),Object(o["createVNode"])("div",N,[Object(o["createVNode"])("span",null,"说明:提现金额最低"+Object(o["toDisplayString"])(Number(M.baseInfo.saas_withdraw_min_money||1))+"元。",1),S.feeInfo?(Object(o["openBlock"])(),Object(o["createBlock"])("span",I,Object(o["toDisplayString"])(S.feeInfo),1)):Object(o["createCommentVNode"])("",!0)])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["visible","onOk","confirmLoading"])])});var M=a("76ee"),S=a("ba98"),$=a("d065"),L={components:{IdcardOutlined:M["a"],EditOutlined:S["a"],recordLog:$["default"]},data(){return{withdrawLoading:!1,withdrawModal:{visible:!1,loading:!1,form:{account_type:"",amount:"",remark:""}},rules:{account_type:[{required:!0,message:"请选择提现账户",trigger:"change"}],amount:[{required:!0,message:"请输入提现金额",type:"number",trigger:"blur"}]},withdrawAccountType:[],visible:!1,loading:!1,baseInfo:{money:0,total_income:0,withdrawn_money:0},settleName:"郭志新",bankInfo:{id:"",username:"",account:"",bank_name:"",settle_account_name:""},form:{id:"",username:"",account:"",bank_name:"",settle_account_name:""},bank_type:"",bankList:[]}},computed:{feeInfo(){if(this.withdrawModal.form.amount&&this.baseInfo.saas_handingfee_bili){let e=parseFloat(Number(this.withdrawModal.form.amount)*Number(this.baseInfo.saas_handingfee_bili)/100).toFixed(2);return`手续费:${e}元 (${Number(this.baseInfo.saas_handingfee_bili)}%)`}return!1},amountInfo(){if(this.withdrawModal.form.amount&&this.baseInfo.saas_handingfee_bili){let e=parseFloat(Number(this.withdrawModal.form.amount)*Number(this.baseInfo.saas_handingfee_bili)/100).toFixed(2),t=parseFloat(Number(this.withdrawModal.form.amount)-Number(e)).toFixed(2);return`实际到账:${t}元`}return!1}},created(){this.getBaseInfo(),this.getBankList()},methods:{toApplyWithdraw(){this.$refs.withdrowForm.validate().then(()=>{let e={type:"bank",origin_money:this.withdrawModal.form.amount+"",withdraw_account_id:this.withdrawModal.form.account_type};this.withdrawModal.loading=!0,this.withdrawLoading=!0,this.$post("/manager/userCenter/withdraw",e,!0).then(()=>{this.withdrawModal.visible=!1,this.getBaseInfo()}).finally(()=>{setTimeout(()=>{this.withdrawLoading=!1},600)})})},openWithdrawModal(){return this.bankInfo.id?this.baseInfo.money<=0?this.$message.warning("余额不足!"):(this.$refs.withdrowForm&&this.$refs.withdrowForm.clearValidate(),this.withdrawModal.form={account_type:"",amount:"",remark:""},void(this.withdrawModal.visible=!0)):this.$message.warning("请设置提现银行账户!")},getBaseInfo(){this.$post("/manager/userCenter/baseInfo",{}).then(e=>{this.baseInfo=e}),this.$post("/manager/userCenter/getWithdrawAccountList",{}).then(e=>{if(console.log(0==e.data.length),0==e.data.length)this.bankInfo={id:void 0,username:"",account:"",bank_name:"",bank_code:""};else{this.bankInfo=e.data[0];const t={value:String(this.bankInfo.id),label:`${this.bankInfo.username}(${this.bankInfo.bank_name}${this.bankInfo.dim_account})`};this.withdrawAccountType=[t]}console.log("提现基础信息res: ",this.bankInfo)})},getBankList(){this.$post("/manager/userCenter/getBankList",{}).then(e=>{this.bankList=e.map(e=>({label:e.bank_name,value:e.bank_name}))})},openModal(){if(0==this.bankList.length&&this.getBankList(),this.bankInfo.username=this.baseInfo.settle_account_name,this.form=Object.assign({},this.bankInfo),this.form.bank_name){let e=!1;this.bankList.forEach(t=>{if(t.label==this.form.bank_name)return e=!0,!1}),this.bank_type=e?this.form.bank_name:"其他银行"}this.visible=!0},bankChange(){this.form.bank_name="其他银行"==this.bank_type?"":this.bank_type},submit(){this.form.bank_name||this.$message.info("请选择银行"),"其他银行"!=this.form.bank_name||this.form.bank_name||this.$message.info("请填写开户支行"),this.form.account||this.$message.info("请填写银行卡号"),this.loading=!0;let e="/manager/userCenter/addBankAccount";this.form.id&&(e="/manager/userCenter/editBankAccount"),this.$post(e,this.form).then(()=>{this.getBaseInfo(),this.visible=!1}).catch(()=>{this.$message.error("系统错误!")}).finally(()=>{this.loading=!1})}}},F=(a("ad6c"),a("6b0d")),T=a.n(F);const U=T()(L,[["render",D],["__scopeId","data-v-7c43349d"]]);t["default"]=U},ad6c:function(e,t,a){"use strict";a("d5a0")},ba8e:function(e,t,a){"use strict";a("3402")},d065:function(e,t,a){"use strict";a.r(t);var o=a("7a23");const n=Object(o["withScopeId"])("data-v-831edaf4");Object(o["pushScopeId"])("data-v-831edaf4");const c=Object(o["createTextVNode"])("今日"),r=Object(o["createTextVNode"])("近7日"),i=Object(o["createTextVNode"])("近30天"),s={key:1},d={key:0,class:"ele-text-success"},l={key:1,class:"ele-text-primary"},b={key:2,class:"ele-text-danger"},m={key:3},u={key:0},p={key:1};Object(o["popScopeId"])();const h=n((e,t,a,h,f,O)=>{const j=Object(o["resolveComponent"])("a-radio-button"),_=Object(o["resolveComponent"])("a-radio-group"),k=Object(o["resolveComponent"])("calendar-outlined"),g=Object(o["resolveComponent"])("a-range-picker"),w=Object(o["resolveComponent"])("a-space"),v=Object(o["resolveComponent"])("ele-pro-table"),y=Object(o["resolveComponent"])("a-tab-pane"),N=Object(o["resolveComponent"])("a-tooltip"),I=Object(o["resolveComponent"])("a-tabs");return Object(o["openBlock"])(),Object(o["createBlock"])(I,{activeKey:f.activeKey,"onUpdate:activeKey":t[5]||(t[5]=e=>f.activeKey=e)},{tabBarExtraContent:n(()=>[Object(o["createVNode"])(w,{size:"middle",class:"analysis-tabs-extra"},{default:n(()=>[Object(o["createVNode"])(_,{value:f.whereFormData.time_type,"onUpdate:value":t[1]||(t[1]=e=>f.whereFormData.time_type=e),buttonStyle:"outline",onChange:t[2]||(t[2]=e=>O.timeChange(1))},{default:n(()=>[Object(o["createVNode"])(j,{value:"day_1"},{default:n(()=>[c]),_:1}),Object(o["createVNode"])(j,{style:{"margin-left":"10px"},value:"day_7"},{default:n(()=>[r]),_:1}),Object(o["createVNode"])(j,{style:{"margin-left":"10px"},value:"day_30"},{default:n(()=>[i]),_:1})]),_:1},8,["value"]),Object(o["createVNode"])(g,{value:f.datetime,"onUpdate:value":t[3]||(t[3]=e=>f.datetime=e),style:{width:"230px"},onChange:t[4]||(t[4]=e=>O.timeChange(2))},{suffixIcon:n(()=>[Object(o["createVNode"])(k)]),_:1},8,["value"])]),_:1})]),default:n(()=>[Object(o["createVNode"])(y,{key:1,tab:"佣金明细"},{default:n(()=>[Object(o["createVNode"])(v,{method:"post",parseData:O.parseData,ref:"table1","row-key":"id",datasource:f.url1,columns:f.columns1,toolbar:null,where:f.whereFormData},{success_time:n(({record:e})=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(f.toDateString(e.success_time)),1)]),_:1},8,["parseData","datasource","columns","where"])]),_:1}),Object(o["createVNode"])(y,{key:2,tab:"提现明细","force-render":""},{default:n(()=>[Object(o["createVNode"])(v,{method:"post",parseData:O.parseData,ref:"table2","row-key":"id",datasource:f.url2,columns:f.columns2,toolbar:null,where:f.whereFormData},{origin_money:n(({record:e})=>[e.memo?(Object(o["openBlock"])(),Object(o["createBlock"])(N,{key:0},{title:n(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.memo),1)]),default:n(()=>[Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.origin_money)+" 元 ",1)]),_:2},1024)):(Object(o["openBlock"])(),Object(o["createBlock"])("div",s,Object(o["toDisplayString"])(e.origin_money)+" 元",1))]),status:n(({record:e})=>["20"==e.status?(Object(o["openBlock"])(),Object(o["createBlock"])("div",d,"提现成功")):"10"==e.status?(Object(o["openBlock"])(),Object(o["createBlock"])("div",l,"提现中")):"30"==e.status?(Object(o["openBlock"])(),Object(o["createBlock"])("div",b,"提现失败")):(Object(o["openBlock"])(),Object(o["createBlock"])("div",m,"--"))]),account_type:n(({record:e})=>["bank"==e.account_type?(Object(o["openBlock"])(),Object(o["createBlock"])("div",u," 银行卡("+Object(o["toDisplayString"])(`${e.bank_name}\n\t\t\t\t\t\t\t\t\t\t\t${e.account.replace(/(?:\d+)(.{4})$/,"**** $1")}`)+") ",1)):(Object(o["openBlock"])(),Object(o["createBlock"])("div",p,Object(o["toDisplayString"])(e.account),1))]),_:1},8,["parseData","datasource","columns","where"])]),_:1})]),_:1},8,["activeKey"])});var f=a("f007"),O=a("2c2a"),j=a("5502"),_={computed:{...Object(j["b"])(["userInfo"])},name:"recordLog",components:{CalendarOutlined:f["a"]},data(){return{toDateString:O["toDateString"],activeKey:1,whereFormData:{time_type:"day_1"},url1:"/manager/userCenter/getIncomeLog",url2:"/manager/userCenter/getWithdrawLog",datetime:[],columns1:[{title:"结算时间",dataIndex:"success_time",slots:{customRender:"success_time"}},{title:"订单编号",dataIndex:"order_no"},{title:"返佣总额",dataIndex:"partner_total_commission"},{title:"我的佣金",dataIndex:"partner_commission"},{title:"下单时间",dataIndex:"submit_time",customRender:({text:e})=>Object(O["toDateString"])(e)},{title:"卡密",dataIndex:"card",customRender:({text:e})=>e.card_no},{title:"代理人",dataIndex:"agent",customRender:({text:e})=>e?e.name:"--"}],columns2:[{title:"提现单号",dataIndex:"out_trade_no"},{title:"提现金额",dataIndex:"origin_money",slots:{customRender:"origin_money"}},{title:"提现账号",dataIndex:"account",slots:{customRender:"account_type"}},{title:"提现时间",dataIndex:"createtime",customRender:({text:e})=>Object(O["toDateString"])(e)},{title:"提现状态",dataIndex:"status",slots:{customRender:"status"}},{title:"原因说明",dataIndex:"reasons"}]}},created(){"agent"==this.userInfo.adminable_type&&(this.columns1=this.columns1.filter(e=>"partner_total_commission"!==e.dataIndex),this.columns1.forEach(e=>{"partner_commission"==e.dataIndex&&(e.dataIndex="agent_commission")}))},methods:{timeChange(e){1==e?(this.whereFormData.start_time="",this.whereFormData.end_time=""):2==e&&(this.whereFormData.time_type="day_1",this.whereFormData.start_date=this.datetime[0].format("YYYY-MM-DD"),this.whereFormData.end_date=this.datetime[1].format("YYYY-MM-DD")),this.reloadTable()},reloadTable(){1==this.activeKey?this.$nextTick(()=>{this.$refs.table1.reload({page:1})}):2==this.activeKey&&this.$nextTick(()=>{this.$refs.table2.reload({page:1})})},parseData(e){return{code:1==e.code?0:e.code,data:e.data.data,count:e.data.total,msg:e.msg}}}},k=(a("ba8e"),a("6b0d")),g=a.n(k);const w=g()(_,[["render",h],["__scopeId","data-v-831edaf4"]]);t["default"]=w},d5a0:function(e,t,a){}}]);