1 |
- import{z as e,m as a,n as s,f as t,g as l,w as o,k as c,u as n,l as u,F as r,r as d,x as i,s as f,v as p,I as m,j as b,y,K as _,L as I,ap as h,J as w,c as x,O as g,an as k,bT as v,B as V,i as B,ab as C,ac as U,H as T,P as j}from"./index-a116b7fa.js";import{_ as $,a as N}from"./phone-international-input.b9f6c8e6.js";import{_ as P}from"./s-uploader.e282ad6a.js";import{_ as z}from"./s-layout.4ae51839.js";import{_ as M}from"./_plugin-vue_export-helper.1b428a4d.js";import{f as S}from"./useGoods.6b315a78.js";const A=M({__name:"account-type-select",props:{modelValue:{type:Object,default(){}},show:{type:Boolean,default:!1},methods:{type:Array,default:[]}},emits:["update:modelValue","change","close"],setup(x,{emit:g}){const k=g,v=e({currentValue:""}),V=[{title:"钱包余额",value:"1"},{icon:"/static/img/shop/pay/wechat.png",title:"微信零钱",value:"2"},{icon:"/static/img/shop/pay/alipay.png",title:"支付宝账户",value:"3"},{icon:"/static/img/shop/pay/bank.png",title:"银行卡转账",value:"4"}];function B(e){v.currentValue=e.detail.value}const C=async()=>{""!==v.currentValue?(k("update:modelValue",{type:v.currentValue}),k("close")):f.$helper.toast("请选择提现方式")},U=()=>{k("close")};return(e,g)=>{const k=m,T=b,j=y,N=_,P=I,z=h,M=w,S=a(s("su-popup"),$);return t(),l(S,{show:x.show,class:"ss-checkout-counter-wrap",onClose:U},{default:o((()=>[c(T,{class:"ss-modal-box bg-white ss-flex-col"},{default:o((()=>[c(T,{class:"modal-header ss-flex-col ss-col-left"},{default:o((()=>[c(k,{class:"modal-title ss-m-b-20"},{default:o((()=>[n("选择提现方式")])),_:1})])),_:1}),c(T,{class:"modal-content ss-flex-1 ss-p-b-100"},{default:o((()=>[c(z,{onChange:B},{default:o((()=>[(t(),u(r,null,d(V,((e,a)=>c(P,{class:"container-list ss-p-l-34 ss-p-r-24 ss-flex ss-col-center ss-row-center",key:a},{default:o((()=>[c(T,{class:"container-icon ss-flex ss-m-r-20"},{default:o((()=>[c(j,{src:i(f).$url.static(e.icon)},null,8,["src"])])),_:2},1024),c(T,{class:"ss-flex-1"},{default:o((()=>[n(p(e.title),1)])),_:2},1024),c(N,{value:e.value,color:"var(--ui-BG-Main)",checked:e.value===v.currentValue,disabled:!x.methods.includes(parseInt(e.value))},null,8,["value","checked","disabled"])])),_:2},1024))),64))])),_:1})])),_:1}),c(T,{class:"modal-footer ss-flex ss-row-center ss-col-center"},{default:o((()=>[c(M,{class:"ss-reset-button save-btn",onClick:C},{default:o((()=>[n("确定")])),_:1})])),_:1})])),_:1})])),_:1},8,["show"])}}},[["__scopeId","data-v-51f04ff9"]]),D=M({__name:"withdraw",setup(u){T((e=>({"74ffe326":i(r)})));const r=f.$url.css("/static/img/shop/user/withdraw_bg.png"),d=2*f.$platform.device.statusBarHeight,y=f.$store("user");x((()=>y.userInfo));const _=e({accountInfo:{type:void 0,accountNo:void 0,accountQrCodeUrl:void 0,name:void 0,bankName:void 0,bankAddress:void 0},accountSelect:!1,brokerageInfo:{},frozenDays:0,minPrice:0,withdrawTypes:[]}),I=e=>{_.accountSelect=e},h=async()=>{if(!_.accountInfo.price||_.accountInfo.price>_.brokerageInfo.price||_.accountInfo.price<=0)return void f.$helper.toast("请输入正确的提现金额");if(!_.accountInfo.type)return void f.$helper.toast("请选择提现方式");let{code:e}=await v.createBrokerageWithdraw({..._.accountInfo,price:100*_.accountInfo.price});0===e&&j({title:"操作成功",content:"您的提现申请已成功提交",cancelText:"继续提现",confirmText:"查看记录",success:e=>{e.confirm?f.$router.go("/pages/commission/wallet",{type:2}):($(),_.accountInfo={})}})};async function $(){const{data:e,code:a}=await v.getBrokerageUser();0===a&&(_.brokerageInfo=e)}return g((()=>{!async function(){let{code:e,data:a}=await k.getTradeConfig();0===e&&a&&(_.minPrice=a.brokerageWithdrawMinPrice||0,_.frozenDays=a.brokerageFrozenDays||0,_.withdrawTypes=a.brokerageWithdrawTypes)}(),$()})),(e,u)=>{const r=b,y=w,x=m,g=a(s("uni-easyinput"),N),k=a(s("s-uploader"),P),v=a(s("s-layout"),z);return t(),l(v,{title:"申请提现",class:"withdraw-wrap",navbar:"inner"},{default:o((()=>[c(r,{class:"page-bg"}),c(r,{class:"wallet-num-box ss-flex ss-col-center ss-row-between",style:V([{marginTop:"-"+Number(d+88)+"rpx",paddingTop:Number(d+108)+"rpx"}])},{default:o((()=>[c(r,{class:""},{default:o((()=>[c(r,{class:"num-title"},{default:o((()=>[n("可提现金额(元)")])),_:1}),c(r,{class:"wallet-num"},{default:o((()=>[n(p(i(S)(_.brokerageInfo.brokeragePrice)),1)])),_:1})])),_:1}),c(y,{class:"ss-reset-button log-btn",onClick:u[0]||(u[0]=e=>i(f).$router.go("/pages/commission/wallet",{type:2}))},{default:o((()=>[n(" 提现记录 ")])),_:1})])),_:1},8,["style"]),c(r,{class:"draw-card"},{default:o((()=>[c(r,{class:"bank-box ss-flex ss-col-center ss-row-between ss-m-b-30"},{default:o((()=>[c(r,{class:"name"},{default:o((()=>[n("提现至")])),_:1}),c(r,{class:"bank-list ss-flex ss-col-center",onClick:u[1]||(u[1]=e=>I(!0))},{default:o((()=>[_.accountInfo.type?B("",!0):(t(),l(r,{key:0,class:"empty-text"},{default:o((()=>[n("请选择提现方式")])),_:1})),"1"===_.accountInfo.type?(t(),l(r,{key:1,class:"empty-text"},{default:o((()=>[n("钱包余额")])),_:1})):B("",!0),"2"===_.accountInfo.type?(t(),l(r,{key:2,class:"empty-text"},{default:o((()=>[n("微信零钱")])),_:1})):B("",!0),"3"===_.accountInfo.type?(t(),l(r,{key:3,class:"empty-text"},{default:o((()=>[n("支付宝账户")])),_:1})):B("",!0),"4"===_.accountInfo.type?(t(),l(r,{key:4,class:"empty-text"},{default:o((()=>[n("银行卡转账")])),_:1})):B("",!0),c(x,{class:"cicon-forward"})])),_:1})])),_:1}),c(r,{class:"card-title"},{default:o((()=>[n("提现金额")])),_:1}),c(r,{class:"input-box ss-flex ss-col-center border-bottom"},{default:o((()=>[c(r,{class:"unit"},{default:o((()=>[n("¥")])),_:1}),c(g,{inputBorder:!1,class:"ss-flex-1 ss-p-l-10",modelValue:_.accountInfo.price,"onUpdate:modelValue":u[2]||(u[2]=e=>_.accountInfo.price=e),type:"number",placeholder:"请输入提现金额"},null,8,["modelValue"])])),_:1}),C(c(r,{class:"card-title"},{default:o((()=>[n(" 提现账号 ")])),_:1},512),[[U,["2","3","4"].includes(_.accountInfo.type)]]),C(c(r,{class:"input-box ss-flex ss-col-center border-bottom"},{default:o((()=>[c(r,{class:"unit"}),c(g,{inputBorder:!1,class:"ss-flex-1 ss-p-l-10",modelValue:_.accountInfo.accountNo,"onUpdate:modelValue":u[3]||(u[3]=e=>_.accountInfo.accountNo=e),placeholder:"请输入提现账号"},null,8,["modelValue"])])),_:1},512),[[U,["2","3","4"].includes(_.accountInfo.type)]]),C(c(r,{class:"card-title"},{default:o((()=>[n("收款码")])),_:1},512),[[U,["2","3"].includes(_.accountInfo.type)]]),C(c(r,{class:"input-box ss-flex ss-col-center"},{default:o((()=>[c(r,{class:"unit"}),c(r,{class:"upload-img"},{default:o((()=>[c(k,{url:_.accountInfo.accountQrCodeUrl,"onUpdate:url":u[4]||(u[4]=e=>_.accountInfo.accountQrCodeUrl=e),fileMediatype:"image",limit:"1",mode:"grid",imageStyles:{width:"168rpx",height:"168rpx"}},null,8,["url"])])),_:1})])),_:1},512),[[U,["2","3"].includes(_.accountInfo.type)]]),C(c(r,{class:"card-title"},{default:o((()=>[n("持卡人")])),_:1},512),[[U,"4"===_.accountInfo.type]]),C(c(r,{class:"input-box ss-flex ss-col-center border-bottom"},{default:o((()=>[c(r,{class:"unit"}),c(g,{inputBorder:!1,class:"ss-flex-1 ss-p-l-10",modelValue:_.accountInfo.name,"onUpdate:modelValue":u[5]||(u[5]=e=>_.accountInfo.name=e),placeholder:"请输入持卡人姓名"},null,8,["modelValue"])])),_:1},512),[[U,"4"===_.accountInfo.type]]),C(c(r,{class:"card-title"},{default:o((()=>[n("提现银行")])),_:1},512),[[U,"4"===_.accountInfo.type]]),C(c(r,{class:"input-box ss-flex ss-col-center border-bottom"},{default:o((()=>[c(r,{class:"unit"}),c(g,{inputBorder:!1,class:"ss-flex-1 ss-p-l-10",modelValue:_.accountInfo.bankName,"onUpdate:modelValue":u[6]||(u[6]=e=>_.accountInfo.bankName=e),placeholder:"请输入提现银行"},null,8,["modelValue"])])),_:1},512),[[U,"4"===_.accountInfo.type]]),C(c(r,{class:"card-title"},{default:o((()=>[n("开户地址")])),_:1},512),[[U,"4"===_.accountInfo.type]]),C(c(r,{class:"input-box ss-flex ss-col-center border-bottom"},{default:o((()=>[c(r,{class:"unit"}),c(g,{inputBorder:!1,class:"ss-flex-1 ss-p-l-10",modelValue:_.accountInfo.bankAddress,"onUpdate:modelValue":u[7]||(u[7]=e=>_.accountInfo.bankAddress=e),placeholder:"请输入开户地址"},null,8,["modelValue"])])),_:1},512),[[U,"4"===_.accountInfo.type]]),c(y,{class:"ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main",onClick:h},{default:o((()=>[n(" 确认提现 ")])),_:1})])),_:1}),c(r,{class:"draw-notice"},{default:o((()=>[c(r,{class:"title ss-m-b-30"},{default:o((()=>[n("提现说明")])),_:1}),c(r,{class:"draw-list"},{default:o((()=>[n(" 最低提现金额 "+p(i(S)(_.minPrice))+" 元 ",1)])),_:1}),c(r,{class:"draw-list"},{default:o((()=>[n(" 冻结佣金:"),c(x,null,{default:o((()=>[n("¥"+p(i(S)(_.brokerageInfo.frozenPrice)),1)])),_:1}),n(" (每笔佣金的冻结期为 "+p(_.frozenDays)+" 天,到期后可提现) ",1)])),_:1})])),_:1}),c(A,{show:_.accountSelect,onClose:u[8]||(u[8]=e=>I(!1)),round:"10",modelValue:_.accountInfo,"onUpdate:modelValue":u[9]||(u[9]=e=>_.accountInfo=e),methods:_.withdrawTypes},null,8,["show","modelValue","methods"])])),_:1})}}},[["__scopeId","data-v-428203f0"]]);export{D as default};
|