1 |
- import{v as e,l as a,m as s,e as t,f as l,w as o,j as c,p as n,k as u,F as r,r as d,u as i,s as f,t as p,C as m,i as b,q as y,E as _,G as g,al as w,D as x,c as I,ae as h,y as k,g as v,aa as V,ab as B,B as C,M as U}from"./index-9880b451.js";import{d as j,g as T,_ as $}from"./s-layout.dfc5b0b5.js";import{_ as N}from"./s-uploader.5e1b0e5f.js";import{_ as M}from"./_plugin-vue_export-helper.1b428a4d.js";import{f as P}from"./useGoods.bdd1c2ea.js";import{T as z}from"./config.1b8276dc.js";import{B as D}from"./brokerage.b6c9045b.js";import"./index.df38848e.js";const G=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(I,{emit:h}){const k=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 V(e){k.currentValue=e.detail.value}const B=async()=>{""!==k.currentValue?(h("update:modelValue",{type:k.currentValue}),h("close")):f.$helper.toast("请选择提现方式")},C=()=>{h("close")};return(e,h)=>{const U=m,T=b,$=y,N=_,M=g,P=w,z=x,D=a(s("su-popup"),j);return t(),l(D,{show:I.show,class:"ss-checkout-counter-wrap",onClose:C},{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(U,{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(P,{onChange:V},{default:o((()=>[(t(),u(r,null,d(v,((e,a)=>c(M,{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($,{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===k.currentValue,disabled:!I.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(z,{class:"ss-reset-button save-btn",onClick:B},{default:o((()=>[n("确定")])),_:1})])),_:1})])),_:1})])),_:1},8,["show"])}}},[["__scopeId","data-v-aa5cec90"]]),S=M({__name:"withdraw",setup(u){C((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");I((()=>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:[]}),g=e=>{_.accountSelect=e},w=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 D.createBrokerageWithdraw({..._.accountInfo,price:100*_.accountInfo.price});0===e&&U({title:"操作成功",content:"您的提现申请已成功提交",cancelText:"继续提现",confirmText:"查看记录",success:e=>{e.confirm?f.$router.go("/pages/commission/wallet",{type:2}):(j(),_.accountInfo={})}})};async function j(){const{data:e,code:a}=await D.getBrokerageUser();0===a&&(_.brokerageInfo=e)}return h((()=>{!async function(){let{code:e,data:a}=await z.getTradeConfig();0===e&&a&&(_.minPrice=a.brokerageWithdrawMinPrice||0,_.frozenDays=a.brokerageFrozenDays||0,_.withdrawTypes=a.brokerageWithdrawTypes)}(),j()})),(e,u)=>{const r=b,y=x,I=m,h=a(s("uni-easyinput"),T),C=a(s("s-uploader"),N),U=a(s("s-layout"),$);return t(),l(U,{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:k([{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(P)(_.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=>g(!0))},{default:o((()=>[_.accountInfo.type?v("",!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})):v("",!0),"2"===_.accountInfo.type?(t(),l(r,{key:2,class:"empty-text"},{default:o((()=>[n("微信零钱")])),_:1})):v("",!0),"3"===_.accountInfo.type?(t(),l(r,{key:3,class:"empty-text"},{default:o((()=>[n("支付宝账户")])),_:1})):v("",!0),"4"===_.accountInfo.type?(t(),l(r,{key:4,class:"empty-text"},{default:o((()=>[n("银行卡转账")])),_:1})):v("",!0),c(I,{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(h,{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}),V(c(r,{class:"card-title"},{default:o((()=>[n(" 提现账号 ")])),_:1},512),[[B,["2","3","4"].includes(_.accountInfo.type)]]),V(c(r,{class:"input-box ss-flex ss-col-center border-bottom"},{default:o((()=>[c(r,{class:"unit"}),c(h,{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),[[B,["2","3","4"].includes(_.accountInfo.type)]]),V(c(r,{class:"card-title"},{default:o((()=>[n("收款码")])),_:1},512),[[B,["2","3"].includes(_.accountInfo.type)]]),V(c(r,{class:"input-box ss-flex ss-col-center"},{default:o((()=>[c(r,{class:"unit"}),c(r,{class:"upload-img"},{default:o((()=>[c(C,{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),[[B,["2","3"].includes(_.accountInfo.type)]]),V(c(r,{class:"card-title"},{default:o((()=>[n("持卡人")])),_:1},512),[[B,"4"===_.accountInfo.type]]),V(c(r,{class:"input-box ss-flex ss-col-center border-bottom"},{default:o((()=>[c(r,{class:"unit"}),c(h,{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),[[B,"4"===_.accountInfo.type]]),V(c(r,{class:"card-title"},{default:o((()=>[n("提现银行")])),_:1},512),[[B,"4"===_.accountInfo.type]]),V(c(r,{class:"input-box ss-flex ss-col-center border-bottom"},{default:o((()=>[c(r,{class:"unit"}),c(h,{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),[[B,"4"===_.accountInfo.type]]),V(c(r,{class:"card-title"},{default:o((()=>[n("开户地址")])),_:1},512),[[B,"4"===_.accountInfo.type]]),V(c(r,{class:"input-box ss-flex ss-col-center border-bottom"},{default:o((()=>[c(r,{class:"unit"}),c(h,{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),[[B,"4"===_.accountInfo.type]]),c(y,{class:"ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main",onClick:w},{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(P)(_.minPrice))+" 元 ",1)])),_:1}),c(r,{class:"draw-list"},{default:o((()=>[n(" 冻结佣金:"),c(I,null,{default:o((()=>[n("¥"+p(i(P)(_.brokerageInfo.frozenPrice)),1)])),_:1}),n(" (每笔佣金的冻结期为 "+p(_.frozenDays)+" 天,到期后可提现) ",1)])),_:1})])),_:1}),c(G,{show:_.accountSelect,onClose:u[8]||(u[8]=e=>g(!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{S as default};
|