You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/public/assets/pages-dealer-withdraw-apply...

1 lines
5.9 KiB

import{o as e,c as a,w as l,e as t,i as s,a as i,f as d,t as n,b as o,d as c,F as u,g as f,k as _,I as r,V as m,a4 as y,j as p}from"./index-ae8bbb19.js";import{u as b}from"./index.035f5770.js";import{P as h,s as v}from"./ApplyStatus.0b84b76d.js";import{S as x}from"./Setting.5e5ad8a5.js";import{_ as g}from"./_plugin-vue_export-helper.1b428a4d.js";const w=g({data:()=>({PayTypeEnum:h,isLoading:!0,dealer:void 0,payment:void 0,settlement:void 0,words:void 0,background:void 0,disabled:!1}),onLoad(e){this.getSetting(),this.getDealer()},methods:{getSetting(){const e=this;x.data().then((a=>{e.payment=a.settlement.pay_type[0],e.settlement=a.settlement,e.words=a.words.withdraw_apply.words,e.background=a.background.withdraw_apply,e.setPageTitle(a.words.withdraw_apply.title)}))},getDealer(){const e=this;e.isLoading=!0,b().then((a=>e.dealer=a.data.dealer)).finally((()=>e.isLoading=!1))},setPageTitle(e){uni.setNavigationBarTitle({title:e.value})},handleChecked(e){this.payment=e},handleSubmit({detail:e}){const a=this;if(!a.onValidation(e.value))return!1;uni.showModal({title:"友情提示",content:"确定提交提现申请吗?请确认填写无误",showCancel:!0,success(l){l.confirm?a.onSubmit(e.value):l.cancel&&(a.disabled=!1)}})},onSubmit(e){const a=this;a.disabled=!0,e.pay_type=a.payment,v({form:e}).then((e=>{a.$toast(e.message),setTimeout((()=>uni.navigateBack()),1200)})).finally((()=>a.disabled=!1))},onValidation(e){const a=this,l=a.words;return a.dealer.money<=0?(a.$error("当前没有"+l.capital.value),!1):!(!e.money||e.money.length<1)||(a.$error("请填写"+l.money.value),!1)}}},[["render",function(b,h,v,x,g,w){const A=f,T=s,k=_,P=r,E=m,C=y;return g.isLoading?t("",!0):(e(),a(T,{key:0,class:"container b-f"},{default:l((()=>[i(T,{class:"dealer-bg"},{default:l((()=>[i(A,{class:"image",mode:"widthFix",src:g.background},null,8,["src"])])),_:1}),i(T,{class:"widget-body"},{default:l((()=>[i(C,{onSubmit:w.handleSubmit},{default:l((()=>[i(T,{class:"widget widget__capital m-top20 b-f dis-flex flex-dir-column"},{default:l((()=>[i(T,{class:"capital__item dis-flex flex-x-between flex-y-center"},{default:l((()=>[i(T,{class:"item__left"},{default:l((()=>[d(n(g.words.capital.value)+":",1)])),_:1}),i(T,{class:"item__right c-violet"},{default:l((()=>[i(k,{class:"f-24"},{default:l((()=>[d("¥")])),_:1}),i(k,{class:"f-34"},{default:l((()=>[d(n(g.dealer.money),1)])),_:1})])),_:1})])),_:1}),i(T,{class:"capital__item dis-flex flex-y-center"},{default:l((()=>[i(T,{class:"item__left"},{default:l((()=>[d(n(g.words.money.value)+":",1)])),_:1}),i(T,{class:"item__right flex-box"},{default:l((()=>[i(P,{class:"input",name:"money",placeholder:g.words.money_placeholder.value},null,8,["placeholder"])])),_:1})])),_:1})])),_:1}),i(T,{class:"capital__lowest m-top20 col-7 t-r"},{default:l((()=>[d(n(g.words.min_money.value)+n(g.settlement.min_money)+"元 ",1)])),_:1}),i(T,{class:"widget widget__form m-top20 b-f dis-flex flex-dir-column"},{default:l((()=>[i(T,{class:"form__title f-28"},{default:l((()=>[d("提现方式")])),_:1}),i(T,{class:"form__box"},{default:l((()=>[(e(!0),o(u,null,c(g.settlement.pay_type,((s,c)=>(e(),o(u,{key:c},[s==g.PayTypeEnum.WECHAT.value?(e(),a(T,{key:0,class:"form__field dis-flex flex-y-center"},{default:l((()=>[i(T,{class:"form__radio dis-flex flex-y-center",onClick:h[0]||(h[0]=e=>w.handleChecked(g.PayTypeEnum.WECHAT.value))},{default:l((()=>[i(k,{class:p(["radio__icon iconfont icon-radio",[g.payment==g.PayTypeEnum.WECHAT.value?"c-violet":"col-bb"]])},null,8,["class"]),i(k,{class:"f-28"},{default:l((()=>[d(n(g.PayTypeEnum.WECHAT.name),1)])),_:1})])),_:1})])),_:1})):t("",!0),s==g.PayTypeEnum.ALIPAY.value?(e(),o(u,{key:1},[i(T,{class:"form__field dis-flex flex-y-center"},{default:l((()=>[i(T,{class:"form__radio dis-flex flex-y-center",onClick:h[1]||(h[1]=e=>w.handleChecked(g.PayTypeEnum.ALIPAY.value))},{default:l((()=>[i(k,{class:p(["radio__icon iconfont icon-radio",[g.payment==g.PayTypeEnum.ALIPAY.value?"c-violet":"col-bb"]])},null,8,["class"]),i(k,{class:"f-28"},{default:l((()=>[d(n(g.PayTypeEnum.ALIPAY.name),1)])),_:1})])),_:1})])),_:1}),g.payment==g.PayTypeEnum.ALIPAY.value?(e(),o(u,{key:0},[i(T,{class:"form__field"},{default:l((()=>[i(T,{class:"field-input"},{default:l((()=>[i(P,{class:"input",name:"alipay_name",placeholder:"请输入真实姓名"})])),_:1})])),_:1}),i(T,{class:"form__field"},{default:l((()=>[i(T,{class:"field-input"},{default:l((()=>[i(P,{class:"input",name:"alipay_account",placeholder:"请输入支付宝账号"})])),_:1})])),_:1})],64)):t("",!0)],64)):t("",!0),s==g.PayTypeEnum.BANK_CARD.value?(e(),o(u,{key:2},[i(T,{class:"form__field dis-flex flex-y-center"},{default:l((()=>[i(T,{class:"form__radio dis-flex flex-y-center",onClick:h[2]||(h[2]=e=>w.handleChecked(g.PayTypeEnum.BANK_CARD.value))},{default:l((()=>[i(k,{class:p(["radio__icon iconfont icon-radio",[g.payment==g.PayTypeEnum.BANK_CARD.value?"c-violet":"col-bb"]])},null,8,["class"]),i(k,{class:"f-28"},{default:l((()=>[d(n(g.PayTypeEnum.BANK_CARD.name),1)])),_:1})])),_:1})])),_:1}),g.payment==g.PayTypeEnum.BANK_CARD.value?(e(),o(u,{key:0},[i(T,{class:"form__field"},{default:l((()=>[i(T,{class:"field-input"},{default:l((()=>[i(P,{class:"input",name:"bank_name",placeholder:"请输入真实姓名"})])),_:1})])),_:1}),i(T,{class:"form__field"},{default:l((()=>[i(T,{class:"field-input"},{default:l((()=>[i(P,{class:"input",name:"bank_account",placeholder:"请输入开户行名称/地址"})])),_:1})])),_:1}),i(T,{class:"form__field"},{default:l((()=>[i(T,{class:"field-input"},{default:l((()=>[i(P,{class:"input",name:"bank_card",placeholder:"请输入银行卡号"})])),_:1})])),_:1})],64)):t("",!0)],64)):t("",!0)],64)))),128))])),_:1})])),_:1}),i(T,{class:"form-submit dis-flex flex-x-center"},{default:l((()=>[i(E,{formType:"submit",disabled:g.disabled},{default:l((()=>[d(n(g.words.submit.value),1)])),_:1},8,["disabled"])])),_:1})])),_:1},8,["onSubmit"])])),_:1})])),_:1}))}],["__scopeId","data-v-87b0d9bb"]]);export{w as default};