|
|
@@ -7,18 +7,28 @@
|
|
|
<text>请填写本人的银行卡信息</text>
|
|
|
</view>
|
|
|
<view class="formInfo">
|
|
|
- <u-field v-if='userInfo.sysUser.managementSource=="2"' @blur="phoneNoCard" v-model="phoneNo" :field-style="{textAlign:'right'}" label="手机号" placeholder="输入手机号">
|
|
|
- </u-field>
|
|
|
- <u-field v-else v-model="realUserName" :field-style="{textAlign:'right'}" label="本人姓名" placeholder="输入真实姓名">
|
|
|
- </u-field>
|
|
|
- <u-field v-model="accountno" @blur="validateBankCard" :field-style="{textAlign:'right'}" label="银行卡"
|
|
|
- placeholder="请输入银行卡卡号">
|
|
|
- </u-field>
|
|
|
- <u-field @click="showAction" v-model="bankname" :field-style="{textAlign:'right'}" label="选择银行"
|
|
|
- placeholder="点击选择银行">
|
|
|
- </u-field>
|
|
|
- <u-field v-model="bankAddress" :field-style="{textAlign:'right'}" label="开户行" placeholder="输入开户行">
|
|
|
- </u-field>
|
|
|
+ <u-form :model="bankform" ref="uForm" label-width="150">
|
|
|
+ <u-form-item v-if='userInfo.sysUser.managementSource=="2"' label="手机号">
|
|
|
+ <u-input placeholder="输入手机号" v-model="bankform.phoneNo" @blur="phoneNoCard" type="text"
|
|
|
+ placeholder-style="color: grey;"></u-input>
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item label="本人姓名">
|
|
|
+ <u-input placeholder="输入真实姓名" v-model="bankform.realUserName" type="text"
|
|
|
+ placeholder-style="color: grey;"></u-input>
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item label="银行卡">
|
|
|
+ <u-input placeholder="请输入银行卡卡号" @blur="validateBankCard" v-model="bankform.accountno"
|
|
|
+ type="text" placeholder-style="color: grey;"></u-input>
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item label="选择银行">
|
|
|
+ <u-input type="select" :select-open="show" v-model="bankform.bankname" placeholder="点击选择银行"
|
|
|
+ @click="show = true" placeholder-style="color: grey;"></u-input>
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item label="开户行">
|
|
|
+ <u-input placeholder="输入开户行" v-model="bankform.bankAddress" dis type="text"
|
|
|
+ placeholder-style="color: grey;"></u-input>
|
|
|
+ </u-form-item>
|
|
|
+ </u-form>
|
|
|
</view>
|
|
|
<u-button class="mt-5" type="primary" style="background-color:#0052FF ;font-weight: bold;width: 100%;"
|
|
|
@tap="submit">
|
|
|
@@ -45,16 +55,21 @@
|
|
|
mapMutations
|
|
|
} from "vuex"
|
|
|
import bankBin from "@/common/bankcardinfo.js"
|
|
|
-import { log } from "util";
|
|
|
+ import {
|
|
|
+ log
|
|
|
+ } from "util";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ bankform: {
|
|
|
+ bankname: "", //银行名称
|
|
|
+ accountno: "", //银行卡账号
|
|
|
+ bankAddress: "", //开户行
|
|
|
+ realUserName: "", //真实姓名
|
|
|
+ phoneNo: "", //手机号
|
|
|
+ },
|
|
|
promptShow: false,
|
|
|
- bankname: "", //银行名称
|
|
|
- accountno: "", //银行卡账号
|
|
|
- bankAddress: "", //开户行
|
|
|
- realUserName: "", //真实姓名
|
|
|
- phoneNo:"",//手机号
|
|
|
+
|
|
|
disabled: true,
|
|
|
show: false,
|
|
|
list: [{
|
|
|
@@ -165,23 +180,20 @@ import { log } from "util";
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
methods: {
|
|
|
...mapMutations(['setUserModules']),
|
|
|
// 改变按钮状态
|
|
|
confirm(e) {
|
|
|
- this.bankname = e[0].label;
|
|
|
- },
|
|
|
- showAction() {
|
|
|
- this.show = true;
|
|
|
+ this.bankform.bankname = e[0].label;
|
|
|
},
|
|
|
// 验证银行卡
|
|
|
async validateBankCard() {
|
|
|
var that = this;
|
|
|
- that.bankname = "";
|
|
|
- await bankBin.getBankBin(this.accountno)
|
|
|
+ that.bankform.bankname = "";
|
|
|
+ await bankBin.getBankBin(this.bankform.accountno)
|
|
|
.then((data) => {
|
|
|
- that.bankname = data.bankName;
|
|
|
+ that.bankform.bankname = data.bankName;
|
|
|
that.validateBankCardStatus = true;
|
|
|
return true;
|
|
|
})
|
|
|
@@ -194,7 +206,7 @@ import { log } from "util";
|
|
|
})
|
|
|
},
|
|
|
async phoneNoCard() {
|
|
|
- if (!this.$base.phoneRegular.test(this.phone)) {
|
|
|
+ if (!this.$base.phoneRegular.test(this.bankform.phoneNo)) {
|
|
|
return uni.showToast({
|
|
|
title: '请输入正确的手机号码',
|
|
|
icon: 'none'
|
|
|
@@ -202,8 +214,12 @@ import { log } from "util";
|
|
|
}
|
|
|
},
|
|
|
async submit() {
|
|
|
- if ((this.userInfo.sysUser.managementSource=="2" && !this.phoneNo|| !this.bankname || !this.accountno || !this.bankAddress) ||
|
|
|
- (this.userInfo.sysUser.managementSource!=="2" && !this.realUserName|| !this.bankname || !this.accountno || !this.bankAddress)
|
|
|
+ if ((this.userInfo.sysUser.managementSource == "2" && !this.bankform.phoneNo || !this.bankform
|
|
|
+ .bankname || !this
|
|
|
+ .bankform.accountno || !this.bankform.bankAddress) ||
|
|
|
+ (this.userInfo.sysUser.managementSource !== "2" && !this.bankform.realUserName || !this.bankform
|
|
|
+ .bankname || !this
|
|
|
+ .bankform.accountno || !this.bankform.bankAddress)
|
|
|
) {
|
|
|
return uni.showToast({
|
|
|
title: '信息不完整',
|
|
|
@@ -212,11 +228,11 @@ import { log } from "util";
|
|
|
});
|
|
|
}
|
|
|
var params = {
|
|
|
- "bankNumber": this.accountno,
|
|
|
- "realUserName": this.realUserName,
|
|
|
- "phoneNo":this.phoneNo,
|
|
|
- "bankAccount": this.bankname,
|
|
|
- "bankAddress": this.bankAddress,
|
|
|
+ "bankNumber": this.bankform.accountno,
|
|
|
+ "realUserName": this.bankform.realUserName,
|
|
|
+ "phoneNo": this.bankform.phoneNo,
|
|
|
+ "bankAccount": this.bankform.bankname,
|
|
|
+ "bankAddress": this.bankform.bankAddress,
|
|
|
"isDefault": 0,
|
|
|
"userId": this.userInfo.sysUser.id,
|
|
|
"userName": this.userInfo.sysUser.name
|
|
|
@@ -295,4 +311,15 @@ import { log } from "util";
|
|
|
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /deep/ {
|
|
|
+ .u-input {
|
|
|
+ text-align: right !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .u-form-item {
|
|
|
+ padding: 6px 14px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
</style>
|