2 lines
7.5 KiB
JavaScript
2 lines
7.5 KiB
JavaScript
|
import{aQ as e,ag as a,r as l,b6 as t,bN as o,bW as r,c as n,e as d,l as s,N as i,t as p,g as u,w as c,n as g,an as _,O as m,R as b,m as v,bY as w,bZ as h}from"./index.DMuoDWpw.js";import{_ as y}from"./index.D46A469w.js";import{getWithdrawalLsit as f,addMerchantWithdraw as F}from"./merchant.DSQ2-L1R.js";import{j as x,k as D,l as j}from"./commonOptions.C0oUFUc2.js";import"./el-col.COx331AE.js";import"./deposit.DMB3rnDP.js";import"./service.BSqHl6ja.js";import"./account.sIIG5F8j.js";const q={style:{padding:"10px 15px 0 15px"}},U={style:{"font-size":"30px"}},A={__name:"balance-withdrawal",setup(A){var L,R,k,E,T,O,W,z,I,N;const S=e();let V=[],C=[],G=[];const Q=a({columns:[{prop:"id",label:"ID",width:80,align:"center"},{prop:"merchant",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:V},{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_min",type:"number",value:"",disabled:!0},{label:"最高提现金额",prop:"withdraw_max",type:"number",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==(R=null==(L=S.user)?void 0:L.info)?void 0:R.name,withdraw_min:null==(E=null==(k=S.user)?void 0:k.info)?void 0:E.withdraw_min,withdraw_max:null==(O=null==(T=S.user)?void 0:T.info)?void 0:O.withdraw_max,withdraw_fee:null==(z=null==(W=S.user)?void 0:W.info)?void 0:z.withdraw_fee,balance:(null==(N=null==(I=S.user)?void 0:I.info)?void 0:N.balance)||0,amount:"",account_id:"",pay_password:"",google_code:""}},btnLoading:!1,showAddDialog:!1}),Y=(e,a)=>{let l="";return(0===a?V:C).some(a=>{if(a.value==e)return l=a.label,!0}),l},Z=()=>{Q.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),K()},B=l(null),H=w(async()=>{B.value&&B.value.hasValid&&B.value.hasValid().validate(e=>{e&&(Q.btnLoading=!0,"申请提现"==Q.addForm.title&&F(Q.addForm.values).then(e=>{K(),Q.showAddDialog=!1,Q.btnLoading=!1,S.getUserInfo()}).catch(()=>{Q.btnLoading=!1}))})},300),J=(e,a)=>{var l,t,o,r,n,d,s,i,p,u;j().then(e=>{Q.addForm.fields.forEach(a=>{"account_id"===a.prop&&(a.options=G=e)})}).catch(()=>{item.options=G=[]}),Q.addForm={title:"申请提现",fields:[{label:"商户名称",prop:"name",type:"input",value:"",disabled:!0},{label:"最低提现金额",prop:"withdraw_min",type:"number",value:"",disabled:!0},{label:"最高提现金额",prop:"withdraw_max",type:"number",value:"",disabled:!0},{label:"手续费",prop:"withdraw_fee",type:"numbe
|