2025-03-23 09:29:40 +08:00
|
|
|
|
<template>
|
2025-06-11 10:48:43 +08:00
|
|
|
|
<view class="content">
|
|
|
|
|
<view class="theform">
|
|
|
|
|
<u--form
|
|
|
|
|
labelPosition="left"
|
|
|
|
|
:model="dataForm"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
ref="uForm"
|
|
|
|
|
>
|
2025-07-15 15:51:03 +08:00
|
|
|
|
<!-- <u-form-item
|
2025-06-11 10:48:43 +08:00
|
|
|
|
label-width="200rpx"
|
|
|
|
|
:label="'银行卡号'"
|
|
|
|
|
prop="cardNumber"
|
|
|
|
|
borderBottom
|
|
|
|
|
ref="item1"
|
|
|
|
|
>
|
|
|
|
|
<u--input
|
|
|
|
|
v-if="bankData.cardNumber"
|
|
|
|
|
v-model="bankData.cardNumber"
|
|
|
|
|
disabled
|
|
|
|
|
disabledColor="#F5F5F5;"
|
|
|
|
|
border="none"
|
|
|
|
|
></u--input>
|
|
|
|
|
<view v-else style="color: red" @click="goBindbank">
|
|
|
|
|
{{ '请先绑定银行卡' }}
|
|
|
|
|
</view>
|
2025-07-15 15:51:03 +08:00
|
|
|
|
</u-form-item> -->
|
2025-06-11 10:48:43 +08:00
|
|
|
|
<u-form-item
|
|
|
|
|
label-width="200rpx"
|
|
|
|
|
:label="`${'提现金额'}(${isLocaled()})`"
|
|
|
|
|
prop="cashAmount"
|
|
|
|
|
borderBottom
|
|
|
|
|
ref="item1"
|
|
|
|
|
>
|
|
|
|
|
<u--input
|
|
|
|
|
type="number"
|
|
|
|
|
v-model="dataForm.cashAmount"
|
|
|
|
|
:placeholder="'请输入'"
|
|
|
|
|
border="none"
|
|
|
|
|
></u--input>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item
|
|
|
|
|
label-width="200rpx"
|
|
|
|
|
:label="'二级密码'"
|
|
|
|
|
prop="payPwd"
|
|
|
|
|
borderBottom
|
|
|
|
|
ref="item1"
|
|
|
|
|
>
|
|
|
|
|
<template v-if="!ifeye">
|
|
|
|
|
<u--input
|
|
|
|
|
type="password"
|
|
|
|
|
v-model="dataForm.payPwd"
|
|
|
|
|
:placeholder="'请输入'"
|
|
|
|
|
border="none"
|
|
|
|
|
></u--input>
|
|
|
|
|
<image
|
|
|
|
|
@click="ifeye = !ifeye"
|
|
|
|
|
slot="right"
|
|
|
|
|
style="width: 38rpx; height: 25rpx"
|
|
|
|
|
src="../../../static/images/my_eye.png"
|
|
|
|
|
mode=""
|
|
|
|
|
></image>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="ifeye">
|
|
|
|
|
<u--input
|
|
|
|
|
v-model="dataForm.payPwd"
|
|
|
|
|
:placeholder="'请输入'"
|
|
|
|
|
border="none"
|
|
|
|
|
></u--input>
|
|
|
|
|
<image
|
|
|
|
|
@click="ifeye = !ifeye"
|
|
|
|
|
slot="right"
|
|
|
|
|
style="width: 38rpx; height: 30rpx"
|
|
|
|
|
src="../../../static/images/my_eye2.png"
|
|
|
|
|
mode=""
|
|
|
|
|
></image>
|
|
|
|
|
</template>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item
|
|
|
|
|
label-width="200rpx"
|
|
|
|
|
:label="'备注'"
|
|
|
|
|
prop="remarks"
|
|
|
|
|
borderBottom
|
|
|
|
|
ref="item1"
|
|
|
|
|
>
|
|
|
|
|
<u--input v-model="dataForm.remarks" border="none"></u--input>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item
|
|
|
|
|
label-width="200rpx"
|
|
|
|
|
:label="'提现账户'"
|
|
|
|
|
prop="pkAccountName"
|
|
|
|
|
@click="showAmount = true"
|
|
|
|
|
ref="item1"
|
|
|
|
|
>
|
|
|
|
|
<u--input
|
|
|
|
|
v-model="dataForm.pkAccountName"
|
|
|
|
|
disabled
|
|
|
|
|
disabledColor="#ffffff"
|
|
|
|
|
:placeholder="'请选择'"
|
|
|
|
|
border="none"
|
|
|
|
|
></u--input>
|
|
|
|
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-picker
|
|
|
|
|
@cancel="showAmount = false"
|
|
|
|
|
:show="showAmount"
|
|
|
|
|
ref="uPicker"
|
|
|
|
|
:columns="pkBdAccountList"
|
|
|
|
|
@confirm="confirm"
|
|
|
|
|
keyName="accountName"
|
|
|
|
|
></u-picker>
|
|
|
|
|
</u--form>
|
2025-03-23 09:29:40 +08:00
|
|
|
|
|
2025-06-11 10:48:43 +08:00
|
|
|
|
<view class="contentbox">
|
|
|
|
|
<view class="linebox">
|
|
|
|
|
<view>{{ '可提现金额' }}(¥):</view>
|
|
|
|
|
<view>{{ widthDrwaData.amount || '0.00' }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="linebox">
|
|
|
|
|
<view>{{ '账户余额' }}(¥):</view>
|
|
|
|
|
<view>{{ widthDrwaData.balance || '0.00' }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="linebox">
|
|
|
|
|
<view>{{ '提现手续费' }}:</view>
|
|
|
|
|
<view>{{ widthDrwaData.srviceCharge || '0.00' }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="linebox">
|
|
|
|
|
<view>{{ '最低提现额度' }}(¥):</view>
|
|
|
|
|
<view>{{ widthDrwaData.minAmount || '0.00' }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="btnbox">
|
2025-07-15 15:51:03 +08:00
|
|
|
|
<u-button class="subbtn" @click="submit">{{ '提现' }}</u-button>
|
2025-06-11 10:48:43 +08:00
|
|
|
|
</view>
|
|
|
|
|
<u-toast ref="uToast"></u-toast>
|
2025-07-15 15:51:03 +08:00
|
|
|
|
|
|
|
|
|
<!-- 提现引导弹窗 -->
|
|
|
|
|
<WithdrawalGuide
|
|
|
|
|
:show="showWithdrawalGuide"
|
|
|
|
|
@confirm="onWithdrawalGuideConfirm"
|
|
|
|
|
/>
|
2025-06-11 10:48:43 +08:00
|
|
|
|
</view>
|
2025-03-23 09:29:40 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-06-11 10:48:43 +08:00
|
|
|
|
import * as bal from '@/config/balance.js'
|
|
|
|
|
import { isLocaled } from '@/util/numberToCurrency'
|
2025-07-15 15:51:03 +08:00
|
|
|
|
import WithdrawalGuide from '@/components/withdrawalGuide/index.vue'
|
|
|
|
|
|
2025-06-11 10:48:43 +08:00
|
|
|
|
export default {
|
2025-07-15 15:51:03 +08:00
|
|
|
|
components: {
|
|
|
|
|
WithdrawalGuide,
|
|
|
|
|
},
|
2025-06-11 10:48:43 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
showAmount: false,
|
|
|
|
|
dataForm: {
|
|
|
|
|
cardNumber: '',
|
|
|
|
|
cashAmount: '',
|
|
|
|
|
payPwd: '',
|
|
|
|
|
remarks: '',
|
|
|
|
|
pkAccountName: '',
|
|
|
|
|
pkAccount: '',
|
|
|
|
|
pkBank: '',
|
|
|
|
|
},
|
|
|
|
|
pkBdAccountList: [],
|
|
|
|
|
rules: {
|
|
|
|
|
cashAmount: [
|
|
|
|
|
{
|
|
|
|
|
type: 'string',
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: ['blur', 'change'],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
payPwd: [
|
|
|
|
|
{
|
|
|
|
|
type: 'string',
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: ['blur', 'change'],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
pkAccountName: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择',
|
|
|
|
|
trigger: ['change'],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
bankData: {},
|
2025-07-15 15:51:03 +08:00
|
|
|
|
widthDrwaData: {},
|
2025-06-11 10:48:43 +08:00
|
|
|
|
ifeye: false,
|
|
|
|
|
canbind: false,
|
2025-07-15 15:51:03 +08:00
|
|
|
|
showWithdrawalGuide: false,
|
2025-06-11 10:48:43 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
2025-07-15 15:51:03 +08:00
|
|
|
|
'dataForm.cashAmount': 'checkAccount',
|
2025-06-11 10:48:43 +08:00
|
|
|
|
},
|
|
|
|
|
onNavigationBarButtonTap() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/mine/balance/withdrawlDetail',
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
isLocaled,
|
|
|
|
|
//绑定银行卡
|
|
|
|
|
goBindbank() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/mine/bindBank/bindBank',
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getList() {
|
|
|
|
|
bal
|
|
|
|
|
.getPkBdAccountList({
|
|
|
|
|
accountProperty: 3,
|
|
|
|
|
})
|
|
|
|
|
.then(res => {
|
|
|
|
|
res.data.forEach(ele => {
|
|
|
|
|
ele.name = ele.accountName
|
|
|
|
|
})
|
|
|
|
|
this.pkBdAccountList = [res.data]
|
2025-03-23 09:29:40 +08:00
|
|
|
|
|
2025-06-11 10:48:43 +08:00
|
|
|
|
if (this.pkBdAccountList.length > 0) {
|
|
|
|
|
this.dataForm.pkAccountName = res.data[0].accountName
|
|
|
|
|
this.dataForm.pkAccount = res.data[0].pkId
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-09-01 10:17:07 +08:00
|
|
|
|
// bal.getDefaultBank().then(res => {
|
|
|
|
|
// this.bankData = res.data
|
|
|
|
|
// this.dataForm.pkBank = res.data.pkId
|
|
|
|
|
// })
|
|
|
|
|
// //校验是否绑定银行卡
|
|
|
|
|
// bal.checkIsbindBank().then(res => {
|
|
|
|
|
// if (res.flag == 'Y') {
|
|
|
|
|
// this.canbind = false
|
|
|
|
|
// } else if (res.flag == 'N') {
|
|
|
|
|
// this.canbind = true
|
|
|
|
|
// }
|
|
|
|
|
// })
|
2025-06-11 10:48:43 +08:00
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
this.$refs.uForm
|
|
|
|
|
.validate()
|
|
|
|
|
.then(res => {
|
|
|
|
|
bal.addWithdraw(this.dataForm).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
message: res.msg,
|
|
|
|
|
type: 'success',
|
|
|
|
|
})
|
2025-07-15 15:51:03 +08:00
|
|
|
|
// 显示提现引导弹窗
|
2025-06-11 10:48:43 +08:00
|
|
|
|
setTimeout(() => {
|
2025-07-15 15:51:03 +08:00
|
|
|
|
this.showWithdrawalGuide = true
|
|
|
|
|
}, 300)
|
2025-06-11 10:48:43 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
.catch(errors => {
|
|
|
|
|
uni.$u.toast('校验失败')
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
confirm(e) {
|
|
|
|
|
this.dataForm.pkAccountName = e.value[0].accountName
|
|
|
|
|
this.dataForm.pkAccount = e.value[0].pkId
|
|
|
|
|
this.showAmount = false
|
2025-07-15 15:51:03 +08:00
|
|
|
|
this.checkAccount()
|
2025-06-11 10:48:43 +08:00
|
|
|
|
},
|
2025-07-15 15:51:03 +08:00
|
|
|
|
checkAccount() {
|
|
|
|
|
if (!this.dataForm.cashAmount) {
|
2025-06-11 10:48:43 +08:00
|
|
|
|
uni.$u.toast('请先输入金额')
|
|
|
|
|
return
|
2025-07-15 15:51:03 +08:00
|
|
|
|
} else if (!this.dataForm.pkAccount) {
|
2025-06-11 10:48:43 +08:00
|
|
|
|
uni.$u.toast('请先选择账户')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
bal
|
|
|
|
|
.getWidthdrawShow({
|
2025-07-15 15:51:03 +08:00
|
|
|
|
pkAccount: this.dataForm.pkAccount,
|
|
|
|
|
cashAmount: this.dataForm.cashAmount,
|
2025-06-11 10:48:43 +08:00
|
|
|
|
})
|
|
|
|
|
.then(res => {
|
|
|
|
|
this.widthDrwaData = res.data
|
|
|
|
|
})
|
|
|
|
|
},
|
2025-07-15 15:51:03 +08:00
|
|
|
|
// 处理提现引导弹窗确认
|
|
|
|
|
onWithdrawalGuideConfirm() {
|
|
|
|
|
this.showWithdrawalGuide = false
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
},
|
2025-06-11 10:48:43 +08:00
|
|
|
|
},
|
|
|
|
|
}
|
2025-03-23 09:29:40 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-06-11 10:48:43 +08:00
|
|
|
|
.content {
|
|
|
|
|
background: #f2f2f2;
|
2025-03-23 09:29:40 +08:00
|
|
|
|
|
2025-06-11 10:48:43 +08:00
|
|
|
|
.theform {
|
|
|
|
|
margin-top: 6rpx;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
padding: 20rpx 23rpx 48rpx 23rpx;
|
2025-03-23 09:29:40 +08:00
|
|
|
|
|
2025-06-11 10:48:43 +08:00
|
|
|
|
.contentbox {
|
|
|
|
|
background: rgba(251, 48, 36, 0.15);
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
padding: 35rpx 20rpx;
|
|
|
|
|
margin-top: 20rpx;
|
2025-03-23 09:29:40 +08:00
|
|
|
|
|
2025-06-11 10:48:43 +08:00
|
|
|
|
.linebox {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
font-family: Source Han Sans CN;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #333333;
|
|
|
|
|
margin-top: 8rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-23 09:29:40 +08:00
|
|
|
|
|
2025-06-11 10:48:43 +08:00
|
|
|
|
.btnbox {
|
|
|
|
|
margin-top: 38rpx;
|
|
|
|
|
padding: 0 20rpx;
|
2025-03-23 09:29:40 +08:00
|
|
|
|
|
2025-06-11 10:48:43 +08:00
|
|
|
|
.subbtn {
|
|
|
|
|
background: #005bac;
|
|
|
|
|
border-radius: 46rpx;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-family: Source Han Sans CN;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|