webGoodsSource-dist/js/balance-withdrawal.DcvgiZCl.js

2 lines
7.0 KiB
JavaScript
Raw Normal View History

2025-08-17 11:17:03 +08:00
import{aQ as e,ag as a,r as l,b6 as t,bo as o,bY as r,c as n,e as s,l as d,N as i,t as p,g as u,w as c,O as g,an as _,R as m,m as b,bZ as v,b_ as h}from"./index.CgUrhMi-.js";import{_ as w}from"./index.Dsu7cbNl.js";import{e as f,f as y}from"./service.D4jtoLKX.js";import{f as F,h as D,i as x}from"./commonOptions.Ag0Metzh.js";import"./el-col.Kqx4qMN2.js";import"./deposit.Bsh_76DW.js";import"./merchant.CyZlgVZS.js";const j={style:{padding:"20px 15px 0 15px"}},q={style:{"font-size":"30px"}},U={__name:"balance-withdrawal",setup(U){var A,L,R,k,E,T,O,z,I,S;const V=e();let W=[],C=[],G=[];const N=a({columns:[{prop:"id",label:"ID",width:80,align:"center"},{prop:"service",label:"服务商名称",align:"center",slot:"merchant_name_slot"},{prop:"withdraw_no",label:"提现单号",align:"center"},{prop:"amount",label:"提现金额",align:"center"},{prop:"fee",label:"手续费",align:"center"},{prop:"account_type",label:"提款账号类型",align:"center",slot:"account_type_slot"},{prop:"account_info",label:"提款账号信息",align:"center"},{prop:"created_at",label:"申请时间",align:"center"},{prop:"processed_at",label:"处理时间",align:"center"},{prop:"status",label:"状态",align:"center",slot:"status"}],tableData:[],searchFields:[{label:"提现单号",prop:"withdraw_no",type:"input",value:""},{label:"账号类型",type:"select",prop:"account_type",value:"",options:W},{label:"卡号/收款地址",prop:"card_no",type:"input",value:""},{label:"状态",type:"select",prop:"status",value:"",options:C},{prop:"created_at",label:"申请时间",type:"date",dateType:"datetimerange",value:[]},{prop:"processed_at",label:"处理时间",type:"date",dateType:"datetimerange",value:[]}],total:0,page:1,per_page:10,loading:!1,addForm:{title:"申请提现",fields:[{label:"服务商名称",prop:"name",type:"input",value:"",disabled:!0},{label:"手续费",prop:"withdraw_fee",type:"number",value:"",disabled:!0},{label:"佣金余额",prop:"balance",type:"number",value:"",disabled:!0},{label:"提现金额",prop:"amount",type:"number",value:""},{label:"提款账号",prop:"account_id",type:"select",options:G},{label:"支付密码",prop:"pay_password",type:"password",value:""},{label:"谷歌验证码",prop:"google_code",type:"input",value:""}],rules:{amount:[{required:!0,message:"请输入提现金额",trigger:"blur"}],account_id:[{required:!0,message:"请选择提款账号",trigger:"change"}],pay_password:[{required:!0,message:"请输入支付密码",trigger:"blur"}],google_code:[{required:!0,message:"请输入谷歌验证码",trigger:"blur"}]},values:{name:null==(L=null==(A=V.user)?void 0:A.info)?void 0:L.name,withdraw_min:null==(k=null==(R=V.user)?void 0:R.info)?void 0:k.withdraw_min,withdraw_max:null==(T=null==(E=V.user)?void 0:E.info)?void 0:T.withdraw_max,withdraw_fee:null==(z=null==(O=V.user)?void 0:O.info)?void 0:z.withdraw_fee,balance:(null==(S=null==(I=V.user)?void 0:I.info)?void 0:S.balance)||0,amount:"",account_id:"",pay_password:"",google_code:""}},btnLoading:!1,showAddDialog:!1}),Q=(e,a)=>{let l="";return(0===a?W:C).some(a=>{if(a.value==e)return l=a.label,!0}),l},Y=()=>{N.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),J()},Z=l(null),B=v(async()=>{Z.value&&Z.value.hasValid&&Z.value.hasValid().validate(e=>{e&&(N.btnLoading=!0,"申请提现"==N.addForm.title&&y(N.addForm.values).then(e=>{J(),N.showAddDialog=!1,N.btnLoading=!1,V.getUserInfo()}).catch(()=>{N.btnLoading=!1}))})},300),H=()=>{var e,a,l,t,o,r,n,s,d,i;x().then(e=>{N.addForm.fields.forEach(a=>{"account_id"===a.prop&&(a.options=G=e)})}).catch(()=>{item.options=G=[]}),N.addForm={title:"申请提现",fields:[{label:"服务商名称",prop:"name",type:"input",value:"",disabled:!0},{label:"手续费",prop:"withdraw_fee",type:"number",value:"",disabled:!0},{label:"佣金余额",prop:"balance",type:"number",value:"",disabled:!0},{label:"提现金额",prop:"amount",type:"number",value:""},{label:"提款账号",prop:"account_id",type:"select",options:G},{label:"支付密码",prop:"pay_password",type:"password",value:""},{label:"谷歌验证码",prop:"google_code",