| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | <template> | 
					
						
							|  |  |  |  | 	<view class="content"> | 
					
						
							|  |  |  |  | 		<view class="theform"> | 
					
						
							|  |  |  |  | 			<u--form labelPosition="left" :model="dataForm" :rules="rules" ref="uForm"> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 				<u-form-item label-width="200rpx" :label="'银行卡号'" prop="cardNumber" borderBottom ref="item1"> | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					<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"> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 						{{'请先绑定银行卡'}} | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					</view> | 
					
						
							|  |  |  |  | 				</u-form-item> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 				<u-form-item label-width="200rpx" :label="`${'提现金额'}(${isLocaled()})`" prop="cashAmount" | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					borderBottom ref="item1"> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 					<u--input type='number' v-model="dataForm.cashAmount" :placeholder="'请输入'" | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 						border="none"></u--input> | 
					
						
							|  |  |  |  | 				</u-form-item> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 				<u-form-item label-width="200rpx" :label="'二级密码'" prop="payPwd" borderBottom ref="item1"> | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					<template v-if="!ifeye"> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 						<u--input type='password' v-model="dataForm.payPwd" :placeholder="'请输入'" | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 							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"> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 						<u--input v-model="dataForm.payPwd" :placeholder="'请输入'" border="none"></u--input> | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 						<image @click="ifeye=!ifeye" slot="right" style="width: 38rpx; | 
					
						
							|  |  |  |  | 								height: 30rpx;" src="../../../static/images/my_eye2.png" mode=""></image> | 
					
						
							|  |  |  |  | 					</template> | 
					
						
							|  |  |  |  | 				</u-form-item> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 				<u-form-item label-width="200rpx" :label="'备注'" prop="remarks" borderBottom ref="item1"> | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					<u--input v-model="dataForm.remarks" border="none"></u--input> | 
					
						
							|  |  |  |  | 				</u-form-item> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 				<u-form-item label-width="200rpx" :label="'提现账户'" prop="pkAccountName" | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					@click="showAmount = true; " ref="item1"> | 
					
						
							|  |  |  |  | 					<u--input v-model="dataForm.pkAccountName" disabled disabledColor="#ffffff" | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 						:placeholder="'请选择'" border="none"></u--input> | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					<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> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 			<view class="contentbox"> | 
					
						
							|  |  |  |  | 				<view class="linebox"> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 					<view>{{'可提现金额'}}(¥):</view> | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					<view>{{widthDrwaData.amount||'0.00'}}</view> | 
					
						
							|  |  |  |  | 				</view> | 
					
						
							|  |  |  |  | 				<view class="linebox"> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 					<view>{{'账户余额'}}(¥):</view> | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					<view>{{widthDrwaData.balance||'0.00'}}</view> | 
					
						
							|  |  |  |  | 				</view> | 
					
						
							|  |  |  |  | 				<view class="linebox"> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 					<view>{{'提现手续费'}}:</view> | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					<view>{{widthDrwaData.srviceCharge||'0.00'}}</view> | 
					
						
							|  |  |  |  | 				</view> | 
					
						
							|  |  |  |  | 				<view class="linebox"> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 					<view>{{'最低提现额度'}}(¥):</view> | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					<view>{{widthDrwaData.minAmount||'0.00'}}</view> | 
					
						
							|  |  |  |  | 				</view> | 
					
						
							|  |  |  |  | 			</view> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		</view> | 
					
						
							|  |  |  |  | 		<view class="btnbox"> | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 			<u-button :disabled="canbind" class="subbtn" @click="submit">{{'提现'}}</u-button> | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 		</view> | 
					
						
							|  |  |  |  | 		<u-toast ref="uToast"></u-toast> | 
					
						
							|  |  |  |  | 	</view> | 
					
						
							|  |  |  |  | </template> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <script> | 
					
						
							|  |  |  |  | 	import * as bal from "@/config/balance.js" | 
					
						
							|  |  |  |  | 	import { | 
					
						
							|  |  |  |  | 		isLocaled | 
					
						
							|  |  |  |  | 	} from '@/util/numberToCurrency' | 
					
						
							|  |  |  |  | 	export default { | 
					
						
							|  |  |  |  | 		data() { | 
					
						
							|  |  |  |  | 			return { | 
					
						
							|  |  |  |  | 				showAmount: false, | 
					
						
							|  |  |  |  | 				dataForm: { | 
					
						
							|  |  |  |  | 					cardNumber: "", | 
					
						
							|  |  |  |  | 					cashAmount: "", | 
					
						
							|  |  |  |  | 					payPwd: "", | 
					
						
							|  |  |  |  | 					remarks: "", | 
					
						
							|  |  |  |  | 					pkAccountName: "", | 
					
						
							|  |  |  |  | 					pkAccount: "", | 
					
						
							|  |  |  |  | 					pkBank: "" | 
					
						
							|  |  |  |  | 				}, | 
					
						
							|  |  |  |  | 				pkBdAccountList: [], | 
					
						
							|  |  |  |  | 				rules: { | 
					
						
							|  |  |  |  | 					cashAmount: [{ | 
					
						
							|  |  |  |  | 						type: 'string', | 
					
						
							|  |  |  |  | 						required: true, | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 						message: '请输入', | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 						trigger: ['blur', 'change'] | 
					
						
							|  |  |  |  | 					}], | 
					
						
							|  |  |  |  | 					payPwd: [{ | 
					
						
							|  |  |  |  | 						type: 'string', | 
					
						
							|  |  |  |  | 						required: true, | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 						message: '请输入', | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 						trigger: ['blur', 'change'] | 
					
						
							|  |  |  |  | 					}], | 
					
						
							|  |  |  |  | 					pkAccountName: [{ | 
					
						
							|  |  |  |  | 						required: true, | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 						message: '请选择', | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 						trigger: ['change'] | 
					
						
							|  |  |  |  | 					}], | 
					
						
							|  |  |  |  | 				}, | 
					
						
							|  |  |  |  | 				bankData: {}, | 
					
						
							|  |  |  |  | 				widthDrwaData: {}, | 
					
						
							|  |  |  |  | 				ifeye: false, | 
					
						
							|  |  |  |  | 				canbind:false | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 			} | 
					
						
							|  |  |  |  | 		}, | 
					
						
							|  |  |  |  | 		watch: { | 
					
						
							|  |  |  |  | 			'dataForm.cashAmount': 'checkAccount' | 
					
						
							|  |  |  |  | 		}, | 
					
						
							|  |  |  |  | 		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] | 
					
						
							|  |  |  |  | 					 | 
					
						
							|  |  |  |  | 					if(this.pkBdAccountList.length>0){ | 
					
						
							|  |  |  |  | 						this.dataForm.pkAccountName = res.data[0].accountName | 
					
						
							|  |  |  |  | 						this.dataForm.pkAccount =  res.data[0].pkId | 
					
						
							|  |  |  |  | 					} | 
					
						
							|  |  |  |  | 					 | 
					
						
							|  |  |  |  | 				}) | 
					
						
							|  |  |  |  | 				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 | 
					
						
							|  |  |  |  | 					} | 
					
						
							|  |  |  |  | 				}) | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 			}, | 
					
						
							|  |  |  |  | 			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' | 
					
						
							|  |  |  |  | 							}) | 
					
						
							|  |  |  |  | 							setTimeout(() => { | 
					
						
							|  |  |  |  | 								uni.navigateBack() | 
					
						
							|  |  |  |  | 							}, 1000); | 
					
						
							|  |  |  |  | 						} | 
					
						
							|  |  |  |  | 					}) | 
					
						
							|  |  |  |  | 					 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 				}).catch(errors => { | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 					uni.$u.toast('校验失败') | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 				}) | 
					
						
							|  |  |  |  | 			}, | 
					
						
							|  |  |  |  | 			confirm(e) { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 				this.dataForm.pkAccountName = e.value[0].accountName | 
					
						
							|  |  |  |  | 				this.dataForm.pkAccount = e.value[0].pkId | 
					
						
							|  |  |  |  | 				this.showAmount = false | 
					
						
							|  |  |  |  | 				this.checkAccount() | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 			}, | 
					
						
							|  |  |  |  | 			checkAccount() { | 
					
						
							|  |  |  |  | 				if (!this.dataForm.cashAmount) { | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 					uni.$u.toast('请先输入金额') | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					return | 
					
						
							|  |  |  |  | 				} else if (!this.dataForm.pkAccount) { | 
					
						
							| 
									
										
										
										
											2025-04-01 21:35:18 +08:00
										 |  |  |  | 					uni.$u.toast('请先选择账户') | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 					return | 
					
						
							|  |  |  |  | 				} | 
					
						
							|  |  |  |  | 				bal.getWidthdrawShow({ | 
					
						
							|  |  |  |  | 					pkAccount: this.dataForm.pkAccount, | 
					
						
							|  |  |  |  | 					cashAmount: this.dataForm.cashAmount, | 
					
						
							|  |  |  |  | 				}).then(res => { | 
					
						
							|  |  |  |  | 					this.widthDrwaData = res.data | 
					
						
							|  |  |  |  | 				}) | 
					
						
							|  |  |  |  | 			} | 
					
						
							|  |  |  |  | 		} | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | </script> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <style lang="scss" scoped> | 
					
						
							|  |  |  |  | 	.content { | 
					
						
							|  |  |  |  | 		background: #F2F2F2; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		.theform { | 
					
						
							|  |  |  |  | 			margin-top: 6rpx; | 
					
						
							|  |  |  |  | 			background: #FFFFFF; | 
					
						
							|  |  |  |  | 			padding: 20rpx 23rpx 48rpx 23rpx; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 			.contentbox { | 
					
						
							|  |  |  |  | 				background: rgba(251, 48, 36, 0.15); | 
					
						
							|  |  |  |  | 				border-radius: 20rpx; | 
					
						
							|  |  |  |  | 				padding: 35rpx 20rpx; | 
					
						
							|  |  |  |  | 				margin-top: 20rpx; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 				.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; | 
					
						
							|  |  |  |  | 				} | 
					
						
							|  |  |  |  | 			} | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		} | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		.btnbox { | 
					
						
							|  |  |  |  | 			margin-top: 38rpx; | 
					
						
							|  |  |  |  | 			padding: 0 20rpx; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 			.subbtn { | 
					
						
							| 
									
										
										
										
											2025-04-22 17:47:02 +08:00
										 |  |  |  | 				background: #005BAC; | 
					
						
							| 
									
										
										
										
											2025-03-23 09:29:40 +08:00
										 |  |  |  | 				border-radius: 46rpx; | 
					
						
							|  |  |  |  | 				font-size: 30rpx; | 
					
						
							|  |  |  |  | 				font-family: Source Han Sans CN; | 
					
						
							|  |  |  |  | 				font-weight: 400; | 
					
						
							|  |  |  |  | 				color: #FFFFFF; | 
					
						
							|  |  |  |  | 			} | 
					
						
							|  |  |  |  | 		} | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | </style> |