|
@@ -78,17 +78,22 @@
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
|
<text class="tit">账户类型</text>
|
|
|
- <view class="con-list">
|
|
|
+ <!-- <view class="con-list">
|
|
|
<input placeholder="请填写账户类型" name="input" v-model="items.accountType"></input>
|
|
|
- </view>
|
|
|
+
|
|
|
+ </view> -->
|
|
|
+ <picker @change="accountChange($event,index)" :value="accountarr[index]" :range="accountType" class="con-list">
|
|
|
+ <view class="picker" v-model="items.accountType">
|
|
|
+ {{accountarr[index] != null ? accountarr[index]:'请填写账户类型'}}
|
|
|
+ </view>
|
|
|
+ </picker>
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
|
<text class="tit">银行卡照片(可选)</text>
|
|
|
<view class="con-list">
|
|
|
- <!-- <input placeholder="请上传照片" name="input" v-model="items.payeeAddressUrl" @clisk="bankimg(items)"></input> -->
|
|
|
- <view v-if="bankimg == ''" @click="bankimgs(index)">请上传照片</view>
|
|
|
- <view v-if="bankimg != ''" @click="bankimgs(index)">
|
|
|
- <image v-bind:src="bankimg" style="width: 40px; height: 40px;"></image>
|
|
|
+ <view v-if="bankimg[index] == null" @click="bankimgs(index)">请上传照片</view>
|
|
|
+ <view v-if="bankimg[index] != null" @click="bankimgs(index)">
|
|
|
+ <image v-bind:src="bankimg[index]" style="width: 40px; height: 40px;"></image>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -109,9 +114,9 @@
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
|
<text class="tit">开户支行</text>
|
|
|
- <picker @change="bankChange" :value="bankIndex" :range="bankType" class="con-list">
|
|
|
+ <picker @change="bankChange($event,index)" :value="bankarr[index]" :range="bankType[index]" class="con-list">
|
|
|
<view class="con-list">
|
|
|
- {{bankIndex>-1?bankType[bankIndex]:'请选择开户支行'}}
|
|
|
+ {{bankarr[index] != null?bankarr[index]:'请选择开户支行'}}
|
|
|
</view>
|
|
|
</picker>
|
|
|
</view>
|
|
@@ -159,6 +164,8 @@
|
|
|
driverPayeeInfoList: [
|
|
|
{
|
|
|
accountType:"",
|
|
|
+ accountIndex:'0',
|
|
|
+ binkindex:0,
|
|
|
cardAddressUrl:"",
|
|
|
bankCard:"",
|
|
|
bankDeposit:"",
|
|
@@ -174,16 +181,24 @@
|
|
|
carLongIndex: 0,
|
|
|
carLongType: ['13', '9.6', '8.2', '8.7', '11.7', '12.5', '13.7', '15', '16', '17.5'],
|
|
|
DriverViewInfo:{},
|
|
|
- bankimg:"",
|
|
|
+ bankimg:[],
|
|
|
bankImgs1:{},
|
|
|
bankIndex:-1,
|
|
|
bankType:[],
|
|
|
+ accountType:["个人账户","企业账户"],
|
|
|
+ accountarr:[],
|
|
|
+ bankarr:[],
|
|
|
}
|
|
|
},
|
|
|
onLoad(options){
|
|
|
this.DriverViewInfo = JSON.parse(options.DriverViewInfo)
|
|
|
},
|
|
|
methods: {
|
|
|
+ accountChange(e,index){
|
|
|
+ this.driverPayeeInfoList[index].accountIndex = e.detail.value
|
|
|
+ this.driverPayeeInfoList[index].accountType = this.accountType[this.driverPayeeInfoList[index].accountIndex];
|
|
|
+ this.accountarr[index] = this.accountType[e.detail.value];
|
|
|
+ },
|
|
|
bankimgs(items){
|
|
|
console.log(items)
|
|
|
var that = this
|
|
@@ -197,15 +212,15 @@
|
|
|
var data = res.data
|
|
|
var strToObj = JSON.parse(data)
|
|
|
// that.id[0] = strToObj.url
|
|
|
- that.bankimg = strToObj.url
|
|
|
+ that.bankimg[items] = strToObj.url
|
|
|
+ console.log(that.bankimg,"图片数组")
|
|
|
that.bankImgs1.bankImg = strToObj.url
|
|
|
that.$api.doRequest('get', '/driverViewInfo/bankShibie', that.bankImgs1).then(res => {
|
|
|
console.log(res)
|
|
|
that.$set(that.driverPayeeInfoList[items],'bankCard',res.data.data.bankNo)
|
|
|
that.$set(that.driverPayeeInfoList[items],'bankDeposit',res.data.data.bankName)
|
|
|
-
|
|
|
- that.bankType = res.data.data.bankNameZhihang
|
|
|
- console.log(that.ban)
|
|
|
+ that.bankType[items] = res.data.data.bankNameZhihang
|
|
|
+ console.log(that.bankType,"支行数组")
|
|
|
}).catch(res => {
|
|
|
uni.showToast({
|
|
|
title: res.data.message,
|
|
@@ -224,6 +239,10 @@
|
|
|
this.$api.msg('车牌号不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (this.driverCarInfoList[i].carNumber.toString().length != 7) {
|
|
|
+ this.$api.msg('车牌号输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.driverCarInfoList[i].carModel) {
|
|
|
this.$api.msg('车型不能为空')
|
|
|
return
|
|
@@ -236,6 +255,16 @@
|
|
|
this.$api.msg('载重不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (this.driverCarInfoList[i].carLoad > 50 ) {
|
|
|
+ this.$api.msg('载重输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.driverCarInfoList[i].carLoad.indexOf('.') != -1) {
|
|
|
+ if (this.driverCarInfoList[i].carLoad.split('.')[1].length > 1) {
|
|
|
+ this.$api.msg('载重输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!this.driverCarInfoList[i].yearManufacture) {
|
|
|
this.$api.msg('出厂年份不能为空')
|
|
|
return
|
|
@@ -248,32 +277,53 @@
|
|
|
}
|
|
|
// if (!this.driverCarInfoList[i].cardAddressUrl) {
|
|
|
// this.$api.msg('银行卡照片不能为空')
|
|
|
-
|
|
|
// }
|
|
|
if (!this.driverPayeeInfoList[i].bankCard) {
|
|
|
this.$api.msg('银行卡号不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (this.driverPayeeInfoList[i].bankCard.length < 16 || this.driverPayeeInfoList[i].bankCard.length > 19) {
|
|
|
+ this.$api.msg('银行卡号输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.driverPayeeInfoList[i].bankDeposit) {
|
|
|
this.$api.msg('开户行不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (this.driverPayeeInfoList[i].bankDeposit.length < 4 || this.driverPayeeInfoList[i].bankDeposit.length > 15) {
|
|
|
+ this.$api.msg('开户行输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.driverPayeeInfoList[i].bankDepositBranch) {
|
|
|
this.$api.msg('开户支行不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (this.driverPayeeInfoList[i].bankDepositBranch.length < 4 || this.driverPayeeInfoList[i].bankDepositBranch.length > 30 ) {
|
|
|
+ this.$api.msg('开户支行输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.driverPayeeInfoList[i].payeeName) {
|
|
|
this.$api.msg('收款人姓名不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (this.driverPayeeInfoList[i].payeeName.length < 2 || this.driverPayeeInfoList[i].payeeName.length > 10) {
|
|
|
+ this.$api.msg('收款人姓名输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.driverPayeeInfoList[i].payeeNumberCard) {
|
|
|
this.$api.msg('收款人身份证号不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (this.driverPayeeInfoList[i].payeeNumberCard.length != 18) {
|
|
|
+ this.$api.msg('收款人身份证号输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
this.DriverViewInfo.driverCarInfoList = this.driverCarInfoList
|
|
|
this.DriverViewInfo.driverPayeeInfoList = this.driverPayeeInfoList
|
|
|
this.DriverViewInfo.driverPayeeInfoList.payeeAddressUrl = this.bankimg
|
|
|
+ console.log(this.DriverViewInfo,"dsdsd")
|
|
|
+ return
|
|
|
var model = JSON.stringify(this.DriverViewInfo);
|
|
|
uni.navigateTo({
|
|
|
url: `/pageD/identity/driverIdentityThree?DriverViewInfo=` + model
|
|
@@ -291,6 +341,8 @@
|
|
|
userAdd() {
|
|
|
this.driverPayeeInfoList.push({
|
|
|
accountType:"",
|
|
|
+ accountIndex:'0',
|
|
|
+ binkindex:0,
|
|
|
cardAddressUrl:"",
|
|
|
bankCard:"",
|
|
|
bankDeposit:"",
|
|
@@ -315,10 +367,14 @@
|
|
|
|
|
|
this.driverCarInfoList[this.driverCarInfoList.length - 1].carModel = this.ModelType[this.ModelIndex];
|
|
|
},
|
|
|
- bankChange(e) {
|
|
|
+ bankChange(e,index) {
|
|
|
+ this.driverPayeeInfoList[index].binkindex = e.detail.value
|
|
|
this.bankIndex = e.detail.value
|
|
|
this.Model = this.bankType[this.bankIndex];
|
|
|
- this.driverPayeeInfoList[this.driverPayeeInfoList.length - 1].bankDepositBranch = this.bankType[this.bankIndex];
|
|
|
+ this.driverPayeeInfoList[index].bankDepositBranch = this.bankType[this.bankIndex];
|
|
|
+ this.bankarr[index] = this.bankType[index][this.driverPayeeInfoList[index].binkindex];
|
|
|
+
|
|
|
+ console.log(this.bankarr[index],"支行")
|
|
|
},
|
|
|
carLongChange(e) {
|
|
|
this.carLongIndex = e.detail.value
|