Browse Source

前端小程序 sdy

zhongtianhaoyuan 3 years ago
parent
commit
d3f39e2659

+ 0 - 2
pageB/contract/look.vue

@@ -71,12 +71,10 @@
 			</view>
 		</view>
 		<view class="c-list">
-			
 				<button class=" btn btns" style="background-color: #FFFFFF; "
 					@click="commit1(goods)">
 					<image src="../../static/img/jiaoyi/ic_fabu@2x.png" style="width: 24px; height: 24px;top: 7px;"></image>
 					添加发车信息</button>
-
 				<button class=" btn btns" style="background-color: #22C572; color: #FFFFFF ; "
 					@click="confirmunload(item)" >确认卸货</button>
 			

+ 140 - 131
pageD/identity/companyIdentityThree.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="center">
 		<view>
-		
+
 			<view style="margin: 0 auto;height: 240px;" v-if="bank1 != ''" @click="bankUp()">
 				<image v-bind:src="bank1" class="picture"></image>
 				<view class="floats" v-if="certificates == true">
@@ -12,7 +12,7 @@
 					</view>
 				</view>
 			</view>
-		
+
 			<view style="margin: 0 auto;height: 240px;" v-if="bank2 != ''" @click="bankLow()">
 				<image v-bind:src="bank2" class="picture"></image>
 				<view class="floats" v-if="certificatesTwo == true">
@@ -37,12 +37,6 @@
 			</view>
 		</view>
 		<view class="c-row b-b">
-			<!-- <text class="tit">开户支行</text>
-			<picker @change="bankChange" :value="bankIndex" :range="bankType" class="con-list">
-				<view class="con-list">
-					{{bankIndex>-1?bankType[bankIndex]:'请选择开户支行'}}
-				</view>
-			</picker> -->
 			<text class="tit">开户支行</text>
 			<view v-if="zhihangStatus" class="con-list">
 				<picker @change="bankChange" :value="bankIndex" :range="bankType" class="con-list">
@@ -77,8 +71,7 @@
 			</view>
 		</view>
 		<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
-			<button :class='codestatus&&!sendDisabled?"active":""' @click='obtain'
-				class='getcode'>{{sendText}}</button>
+			<button :class='codestatus&&!sendDisabled?"active":""' @click='obtain' class='getcode'>{{sendText}}</button>
 			<view style='width:70%;position:relative;margin-left: 200px;'>
 				<input v-model='verifyCode' placeholder="请输入验证码" type="number">
 			</view>
@@ -122,10 +115,10 @@
 				bankImgs1: {},
 				bankIndex: -1,
 				bankType: [],
-				certificates:true,
-				certificatesTwo:true,
-				zhihangStatus:true,
-				verification:true,
+				certificates: true,
+				certificatesTwo: true,
+				zhihangStatus: true,
+				verification: true,
 			}
 		},
 		computed: {
@@ -133,15 +126,15 @@
 		},
 		onLoad(options) {
 			this.identityAuthenticationInfo = JSON.parse(options.identityAuthenticationInfo)
-			if(this.identityAuthenticationInfo.customerTypeFlag == 1){
+			if (this.identityAuthenticationInfo.customerTypeFlag == 1) {
 				this.identityAuthenticationInfo.payeeName = this.identityAuthenticationInfo.customerName
 				this.identityAuthenticationInfo.payeeNumberCard = this.identityAuthenticationInfo.customerNumberCard
 			}
 		},
 		methods: {
-			obtain(){
-				if(this.sendText == "获取验证码")
-				this.getcode()
+			obtain() {
+				if (this.sendText == "获取验证码")
+					this.getcode()
 			},
 			bankUp() {
 				var that = this
@@ -158,19 +151,22 @@
 								that.bank1 = strToObj.url
 								that.certificates = false
 								that.bankImgs1.bankImg = strToObj.url
-								that.$api.doRequest('get', '/driverViewInfo/bankShibie', that.bankImgs1).then(res => {
-									if(res.data.data.bankNo != null){
-										if(res.data.data.bankNo != ""){
-											that.$set(that.identityAuthenticationInfo, 'bankCard', res.data.data.bankNo)
+								that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
+									.bankImgs1).then(res => {
+									if (res.data.data.bankNo != null) {
+										if (res.data.data.bankNo != "") {
+											that.$set(that.identityAuthenticationInfo,
+												'bankCard', res.data.data.bankNo)
 										}
 									}
-									if(res.data.data.bankName != null ){
-										if(res.data.data.bankName != "") {
-											that.$set(that.identityAuthenticationInfo, 'bankDeposit',res.data.data.bankName)
+									if (res.data.data.bankName != null) {
+										if (res.data.data.bankName != "") {
+											that.$set(that.identityAuthenticationInfo,
+												'bankDeposit', res.data.data.bankName)
 										}
 									}
-									if(res.data.data.bankNameZhihang.length != 0){
-											that.bankType = res.data.data.bankNameZhihang
+									if (res.data.data.bankNameZhihang.length != 0) {
+										that.bankType = res.data.data.bankNameZhihang
 									}
 								}).catch(res => {
 									uni.showToast({
@@ -199,19 +195,22 @@
 								that.bank2 = strToObj.url
 								that.certificatesTwo = false
 								that.bankImgs1.bankImg = strToObj.url
-								that.$api.doRequest('get', '/driverViewInfo/bankShibie', that.bankImgs1).then(res => {
-									if(res.data.data.bankNo != null){
-										if(res.data.data.bankNo != ""){
-											that.$set(that.identityAuthenticationInfo, 'bankCard', res.data.data.bankNo)
+								that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
+									.bankImgs1).then(res => {
+									if (res.data.data.bankNo != null) {
+										if (res.data.data.bankNo != "") {
+											that.$set(that.identityAuthenticationInfo,
+												'bankCard', res.data.data.bankNo)
 										}
 									}
-									if(res.data.data.bankName != null ){
-										if(res.data.data.bankName != "") {
-											that.$set(that.identityAuthenticationInfo, 'bankDeposit',res.data.data.bankName)
+									if (res.data.data.bankName != null) {
+										if (res.data.data.bankName != "") {
+											that.$set(that.identityAuthenticationInfo,
+												'bankDeposit', res.data.data.bankName)
 										}
 									}
-									if(res.data.data.bankNameZhihang != null){
-											that.bankType = res.data.data.bankNameZhihang
+									if (res.data.data.bankNameZhihang != null) {
+										that.bankType = res.data.data.bankNameZhihang
 									}
 								}).catch(res => {
 									uni.showToast({
@@ -220,7 +219,7 @@
 										duration: 2000
 									})
 								})
-								
+
 							}
 						})
 					}
@@ -231,11 +230,11 @@
 				this.Model = this.bankType[this.bankIndex];
 				this.identityAuthenticationInfo.bankDepositBranch = this.bankType[this.bankIndex];
 			},
-			changeZhihang(){
+			changeZhihang() {
 				this.zhihangStatus = !this.zhihangStatus
 			},
 			commit() {
-				var that=this
+				var that = this
 				if (this.bankid[0] == '' || this.bankid[0] == null) {
 					this.$api.msg('请上传银行卡正面')
 					return
@@ -248,7 +247,8 @@
 					this.$api.msg('银行卡号不能为空')
 					return
 				}
-				if (this.identityAuthenticationInfo.bankCard.length < 16 || this.identityAuthenticationInfo.bankCard.length > 19 ) {
+				if (this.identityAuthenticationInfo.bankCard.length < 16 || this.identityAuthenticationInfo.bankCard
+					.length > 19) {
 					this.$api.msg('银行卡号输入错误')
 					return
 				}
@@ -256,7 +256,8 @@
 					this.$api.msg('开户行不能为空')
 					return
 				}
-				if (this.identityAuthenticationInfo.bankDeposit.length < 4 || this.identityAuthenticationInfo.bankDeposit.length > 15) {
+				if (this.identityAuthenticationInfo.bankDeposit.length < 4 || this.identityAuthenticationInfo.bankDeposit
+					.length > 15) {
 					this.$api.msg('开户行输入错误')
 					return
 				}
@@ -264,7 +265,8 @@
 					this.$api.msg('开户支行不能为空')
 					return
 				}
-				if (this.identityAuthenticationInfo.bankDepositBranch.length < 4 || this.identityAuthenticationInfo.bankDepositBranch.length > 30) {
+				if (this.identityAuthenticationInfo.bankDepositBranch.length < 4 || this.identityAuthenticationInfo
+					.bankDepositBranch.length > 30) {
 					this.$api.msg('开户支行输入错误')
 					return
 				}
@@ -276,12 +278,12 @@
 					this.$api.msg('手机号填写不正确')
 					return
 				}
-				if(this.identityAuthenticationInfo.customerTypeFlag == 1){
+				if (this.identityAuthenticationInfo.customerTypeFlag == 1) {
 					if (!this.identityAuthenticationInfo.payeeName) {
 						this.$api.msg('收款人姓名不能为空')
 						return
 					}
-					if (this.identityAuthenticationInfo.payeeName < 2 || this.identityAuthenticationInfo.payeeName > 10 ) {
+					if (this.identityAuthenticationInfo.payeeName < 2 || this.identityAuthenticationInfo.payeeName > 10) {
 						this.$api.msg('收款人姓名输入错误')
 						return
 					}
@@ -297,113 +299,117 @@
 						this.$api.msg('联系地址不能为空')
 						return
 					}
-					if (this.identityAuthenticationInfo.compAddress.length < 2 || this.identityAuthenticationInfo.compAddress.length > 20) {
+					if (this.identityAuthenticationInfo.compAddress.length < 2 || this.identityAuthenticationInfo
+						.compAddress.length > 20) {
 						this.$api.msg('联系地址输入错误')
 						return
 					}
-				}else if(this.identityAuthenticationInfo.customerTypeFlag == 2){
+				} else if (this.identityAuthenticationInfo.customerTypeFlag == 2) {
 					if (!this.identityAuthenticationInfo.compAddress) {
 						this.$api.msg('公司地址不能为空')
 						return
-					}  
-					if (this.identityAuthenticationInfo.compAddress.length < 2 || this.identityAuthenticationInfo.compAddress.length > 20) {
+					}
+					if (this.identityAuthenticationInfo.compAddress.length < 2 || this.identityAuthenticationInfo
+						.compAddress.length > 20) {
 						this.$api.msg('公司地址输入错误')
 						return
-					}  
-				}
-			
-				this.identityAuthenticationInfo.commonId = this.userInfo.id
-				this.identityAuthenticationInfo.payeeAddressUrl = this.bankid.toString()
-				this.identityAuthenticationInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
-				if(this.amendprice() == false){
-					this.$api.msg('验证码输入有误!')
-					return
+					}
 				}
-				this.$api.doRequest('post', '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this
-						.identityAuthenticationInfo)
-					.then(res => {
-						if(res.data.code=='11018'){
-							uni.showModal({
-								title: '提示',
-								content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
-								success: function (res) {
-									if (res.confirm) {
-										that.identityAuthenticationInfo.cover=1
-											that.$api.doRequest('post', '/identityAuthenticationInfo/api/editIdentityAuthenticationInfo', that.identityAuthenticationInfo).then(res => {
-												uni.showToast({
-													title: '提交成功',
-													icon: 'none',
-													duration: 2000
-												})
-												uni.navigateTo({
-														url: `/pages/attestation/indexTwo` ,
-													})
-											}).catch(res => {
-												uni.showToast({
-													title: res.data.message,
-													icon: 'none',
-													duration: 2000
-												})
-											})
-								        } else if (res.cancel) {
-								          uni.showToast({
-								          	title: '提交失败',
-								          	icon: 'none',
-								          	duration: 2000
-								          })
-								        }
-								    }
-								});
-						}else if(res.data.code==200){
-							uni.showToast({
-								title: '提交成功',
-								icon: 'none',
-								duration: 2000
-							})
-							uni.navigateTo({
-									url: `/pages/attestation/indexTwo` ,
-								})
-						}else{
-							uni.showToast({
-								title: res.data.message,
-								icon: 'none',
-								duration: 2000
-							})
-						}
-						
-					}).catch(res => {
-						uni.showToast({
-							title: res.data.message,
-							icon: 'none',
-							duration: 2000
-						})
-					})
+				this.amendprice()
+
+
 			},
-			phoneinput(e){
-				if(e.detail.value.length==11){
-					this.codestatus=true
+			phoneinput(e) {
+				if (e.detail.value.length == 11) {
+					this.codestatus = true
 				}
 			},
-			amendprice(item) {
+			amendprice() {
 				var that = this
 				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
 						phone: this.identityAuthenticationInfo.customerPhone,
 						verifyCode: this.verifyCode
 					}).then(res => {
 						if (res.data.code == 200) {
-						
+							this.identityAuthenticationInfo.commonId = this.userInfo.id
+							this.identityAuthenticationInfo.payeeAddressUrl = this.bankid.toString()
+							this.identityAuthenticationInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
+							this.$api.doRequest('post',
+									'/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this
+									.identityAuthenticationInfo)
+								.then(res => {
+									if (res.data.code == '11018') {
+										uni.showModal({
+											title: '提示',
+											content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
+											success: function(res) {
+												if (res.confirm) {
+													that.identityAuthenticationInfo.cover = 1
+													that.$api.doRequest('post',
+														'/identityAuthenticationInfo/api/editIdentityAuthenticationInfo',
+														that.identityAuthenticationInfo).then(
+														res => {
+															uni.showToast({
+																title: '提交成功',
+																icon: 'none',
+																duration: 2000
+															})
+															uni.navigateTo({
+																url: `/pages/attestation/indexTwo`,
+															})
+														}).catch(res => {
+														uni.showToast({
+															title: res.data.message,
+															icon: 'none',
+															duration: 2000
+														})
+													})
+												} else if (res.cancel) {
+													uni.showToast({
+														title: '提交失败',
+														icon: 'none',
+														duration: 2000
+													})
+												}
+											}
+										});
+									} else if (res.data.code == 200) {
+										uni.showToast({
+											title: '提交成功',
+											icon: 'none',
+											duration: 2000
+										})
+										uni.navigateTo({
+											url: `/pages/attestation/indexTwo`,
+										})
+									} else {
+										uni.showToast({
+											title: res.data.message,
+											icon: 'none',
+											duration: 2000
+										})
+									}
+
+								}).catch(res => {
+									uni.showToast({
+										title: res.data.message,
+										icon: 'none',
+										duration: 2000
+									})
+								})
+
 						} else {
 							that.verification = false
 							uni.showToast({
 								title: res.data.message,
 								icon: 'none',
 								duration: 2000
-							})	
+							})
 							return false
 						}
 					})
 					.catch(res => {
-							that.verification = false
+						that.verification = false
 						uni.showToast({
 							title: res.data.message,
 							icon: 'none',
@@ -511,6 +517,7 @@
 		text-align: center;
 		margin-top: 10px;
 	}
+
 	.getcode {
 		font-size: 14px;
 		position: absolute;
@@ -521,18 +528,20 @@
 		height: 30px;
 		line-height: 30px;
 	}
+
 	.getcode.active {
 		border: none;
 	}
-	.words{
+
+	.words {
 		font-size: 18px;
 		font-weight: 600;
 		color: #617E8B;
-		}
-		.floats{
-			position: relative;
-			top: -150px;
-			text-align: center;
-		}
-	
+	}
+
+	.floats {
+		position: relative;
+		top: -150px;
+		text-align: center;
+	}
 </style>

+ 19 - 18
pageD/identity/driverIdentity.vue

@@ -161,20 +161,23 @@
 					this.$api.msg('手机号不能为空')
 					return
 				}
-				if (!this.DriverViewInfo.residentCityProvincial) {
-					this.$api.msg('常住城市不能为空')
+				if (this.DriverViewInfo.driverPhone.length != 11) {
+					this.$api.msg('手机号输入错误')
 					return
 				}
-				
-				if(this.amendprice() == false){
-					this.$api.msg('验证码输入有误!')
+				if(!this.verifyCode){
+					this.$api.msg('验证码不能为空')
 					return
 				}
-				this.DriverViewInfo.cardAddressUrl = this.id.toString()
-				var model = JSON.stringify(this.DriverViewInfo);
-				uni.navigateTo({
-					url: `/pageD/identity/driverIdentityTwo?DriverViewInfo=` + model,
-				})
+				if(this.verifyCode.length != 6){
+					this.$api.msg('验证码输入错误')
+					return
+				}
+				if (!this.DriverViewInfo.residentCityProvincial) {
+					this.$api.msg('常住城市不能为空')
+					return
+				}
+				this.amendprice()
 			},
 			async amendprice() {
 				var that = this
@@ -183,27 +186,25 @@
 						verifyCode: this.verifyCode
 					}).then(res => {
 						if (res.data.code == 200) {
-							
+							that.DriverViewInfo.cardAddressUrl = that.id.toString()
+							var model = JSON.stringify(that.DriverViewInfo);
+							uni.navigateTo({
+								url: `/pageD/identity/driverIdentityTwo?DriverViewInfo=` + model,
+							})
 						} else {
-							that.verification = false
-							console.log(that.verification,"1")
-							uni.showToast({
+							uni.showToast({		
 								title: res.data.message,
 								icon: 'none',
 								duration: 2000
 							})
-							return false
 						}
 					})
 					.catch(res => {
-						that.verification = false
-						console.log(that.verification,"2")
 						uni.showToast({
 							title: res.data.message,
 							icon: 'none',
 							duration: 2000
 						})
-						return false
 					});
 			},
 			getcode() {

+ 8 - 1
pageD/identity/driverIdentityThree.vue

@@ -97,7 +97,8 @@
 				this.DriverViewInfo.commonId = this.userInfo.id
 				this.DriverViewInfo.pcFlag = 0
 				this.DriverViewInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
-				console.log(this.DriverViewInfo,"司机对象")
+				this.DriverViewInfo.numberCard="210804199909162525"
+				this.DriverViewInfo.driverPhone="15842688524"
 				this.$api.doRequest('post', '/driverViewInfo/api/addInfo', this.DriverViewInfo).then(res => {
 					if(res.data.code=='ERROR001'){
 						uni.showModal({
@@ -113,6 +114,9 @@
 												icon: 'none',
 												duration: 2000
 											})
+											uni.navigateTo({
+												url: `/pages/attestation/indexThree` 
+											})
 										})
 							        } else if (res.cancel) {
 							          uni.showToast({
@@ -129,6 +133,9 @@
 							icon: 'none',
 							duration: 2000
 						})
+						uni.navigateTo({
+							url: `/pages/attestation/indexThree` 
+						})
 					}
 					
 				}).catch(res => {

+ 158 - 112
pageD/identity/driverIdentityTwo.vue

@@ -5,7 +5,7 @@
 			<view class="c-row">
 				<text class="tit">货车信息</text>
 				<view class="con-list">
-					<image v-bind:src="opencar" class="open" opencarboolean @click="opencarclick" ></image>
+					<image v-bind:src="opencar" class="open" opencarboolean @click="opencarclick"></image>
 				</view>
 			</view>
 		</view>
@@ -14,7 +14,8 @@
 			<view class="c-row ">
 				<text class="tit">车辆 -{{index+1}}</text>
 				<view class="con-list">
-					<image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate" @click="carDel(index)" ></image>
+					<image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate" @click="carDel(index)">
+					</image>
 				</view>
 			</view>
 			<view class="c-row b-b">
@@ -25,20 +26,25 @@
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">车型</text>
-				<picker @change="ModelChange" :value="ModelIndex" :range="ModelType" class="con-list">
+				<picker @change="ModelChange($event,index)" :value="ModelIndex" :range="ModelType" class="con-list">
 					<view class="picker " v-model="item.carModel">
-						{{ModelIndex>-1?ModelType[ModelIndex]:'请选择车型'}}
+						{{carModelType[index] != null?carModelType[index]:'请选择车型'}}
 					</view>
 				</picker>
-				<!-- </view> -->
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">不含车头车长(米)</text>
-				<picker @change="carLongChange" :value="carLongIndex" :range="carLongType" class="con-list">
+				<picker v-if="carchength" @change="carLongChange($event,index)" :value="carLongIndex"
+					:range="carLongType" class="con-list">
 					<view class="picker" v-model="item.carLength">
-						{{carLongIndex>-1?carLongType[carLongIndex]:'请选择车长'}}
+						{{carLengtharr[index] != null?carLengtharr[index]:'请选择车长'}}
 					</view>
 				</picker>
+				<view v-else class="con-list">
+					<input placeholder="请填写车长(米)" name="input" v-model="item.carLength"></input>
+				</view>
+				<button v-if="carchength" class='cu-btn bg-green shadow' @click="changeCarChength">填写</button>
+				<button v-else class='cu-btn bg-green shadow' @click="changeCarChength">选择</button>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">载重(吨)</text>
@@ -49,14 +55,16 @@
 			<view class="c-row ">
 				<text class="tit">出厂年份</text>
 				<view class="con-list">
-					<input placeholder="请填写出厂年份" name="input" v-model="item.yearManufacture"></input>
+					<view @click='yearchange'>{{year[index] == null?"请填写出厂年份":year[index]}}</view>
+					<u-picker :params='params' @confirm='yearpicker($event,index)' v-model="show" mode="time">
+					</u-picker>
 				</view>
 			</view>
 		</view>
 		<button class="btn" v-if="opencarboolean == true" @click="carAdd">
-				 <image src="../../static/img/jiaoyi/ic_fabu@3x.png" class="add" style="top: 8px;"></image> 
-				 <texe>添加车辆</texe>
-				 </button>
+			<image src="../../static/img/jiaoyi/ic_fabu@3x.png" class="add" style="top: 8px;"></image>
+			<texe>添加车辆</texe>
+		</button>
 		<!-- 账户信息 -->
 		<view class="information">
 			<view class="c-row">
@@ -69,33 +77,29 @@
 
 		<view class="informations" v-if="openuserboolean == true" v-for="(items , index) in driverPayeeInfoList"
 			:Key="index">
-			<!-- <view class="labels"> 账户 -?</view> -->
 			<view class="c-row ">
 				<text class="tit">账户 -{{index+1}}</text>
 				<view class="con-list">
-					<image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate" @click="userDel(index)"></image>
+					<image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate" @click="userDel(index)">
+					</image>
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">账户类型</text>
-				<!-- <view class="con-list">
-					<input placeholder="请填写账户类型" name="input" v-model="items.accountType"></input>
-					
-				</view> -->	
-				<picker @change="accountChange($event,index)" :value="accountarr[index]" :range="accountType" class="con-list">
+				<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]:'请填写账户类型'}}
+						{{accountarr[index] != null ? accountarr[index]:'个人账户'}}
 					</view>
 				</picker>
 			</view>
-			<view class="c-row b-b"> 
+			<view class="c-row b-b">
 				<text class="tit">银行卡照片(可选)</text>
 				<view class="con-list">
-					<view  v-if="bankimg[index] == null"  @click="bankimgs(index)">请上传照片</view>
-					<view  v-if="bankimg[index] != null" @click="bankimgs(index)">
+					<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>
 			</view>
 			<view class="c-row b-b">
@@ -106,40 +110,49 @@
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">开户行</text>
-				
 				<view class="con-list">
 					<input placeholder="请输入开户行" name="input" v-model="items.bankDeposit"></input>
 				</view>
-			
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">开户支行</text>
-				<picker @change="bankChange($event,index)" :value="bankarr[index]" :range="bankType[index]" class="con-list">
-				<view class="con-list">
-					{{bankarr[index] != null?bankarr[index]:'请选择开户支行'}}
+				<picker v-if="subBranch" @change="bankChange($event,index)" :value="bankarr[index]" :range="bankType[index]"
+					class="con-list">
+					<view class="con-list">
+						{{bankarr[index] != null?bankarr[index]:'请选择开户支行'}}
+					</view>
+				</picker>
+				<view v-else class="con-list">
+					<input placeholder="请填写开户支行" name="input" v-model="items.bankDepositBranch"></input>
 				</view>
-					</picker>
+				<button v-if="subBranch" class='cu-btn bg-green shadow' @click="subBranchChength">填写</button>
+				<button v-else class='cu-btn bg-green shadow' @click="subBranchChength">识别</button>
 			</view>
-			<view class="c-row b-b">
+			<view class="c-row b-b" v-if="items.accountType == '个人账户'"> 
 				<text class="tit">收款人姓名</text>
 				<view class="con-list">
 					<input placeholder="请输入收款人姓名" name="input" v-model="items.payeeName"></input>
 				</view>
 			</view>
-			<view class="c-row b-b">
+			<view class="c-row " v-if="items.accountType == '个人账户'">
 				<text class="tit">收款人身份证号</text>
 				<view class="con-list">
 					<input placeholder="请输入收款人身份证号" name="input" v-model="items.payeeNumberCard"></input>
 				</view>
+			</view>	
+			<view class="c-row " v-if="items.accountType == '企业账户'">
+				<text class="tit">企业名称</text>
+				<view class="con-list">
+					<input placeholder="请输入企业名称" name="input" v-model="items.compName"></input>
+				</view>
 			</view>
 		</view>
-		<button class="btn" v-if="openuserboolean == true" @click="userAdd()">
-			 <image src="../../static/img/jiaoyi/ic_fabu@3x.png" class="add" style="top: 8px;"></image> 
+		<button class="btn" v-if="openuserboolean == true && this.driverPayeeInfoList.length < 10" @click="userAdd()" >
+			<image src="../../static/img/jiaoyi/ic_fabu@3x.png" class="add" style="top: 8px;"></image>
 			<text style="margin-top: -2px;">添加账户</text>
-			</button>
-		 <button class="btns btn"  @click="jumpUrl">下一步</button>
+		</button>
+		<button class="btns btn" @click="jumpUrl">下一步</button>
 	</view>
-	   
 	</view>
 </template>
 
@@ -161,46 +174,68 @@
 					carLoad: "",
 					yearManufacture: "",
 				}],
-				driverPayeeInfoList: [
-					{
-						accountType:"",
-						accountIndex:'0',
-						binkindex:0,
-						cardAddressUrl:"",
-						bankCard:"",
-						bankDeposit:"",
-						bankDepositBranch:"",
-						payeeName:"",
-						payeeNumberCard:"",
-					}
-				],
+				driverPayeeInfoList: [{
+					accountType: "个人账户",
+					accountIndex: '0',
+					binkindex: 0,
+					cardAddressUrl: "",
+					bankCard: "",
+					bankDeposit: "",
+					bankDepositBranch: "",
+					payeeName: "",
+					payeeNumberCard: "",
+				}],
 				ModelIndex: 0,
 				Model: '',
 				ModelType: ["高栏", "集装箱", "自卸车"],
 				carLong: '',
 				carLongIndex: 0,
 				carLongType: ['13', '9.6', '8.2', '8.7', '11.7', '12.5', '13.7', '15', '16', '17.5'],
-				DriverViewInfo:{},
-				bankimg:[],
-				bankImgs1:{},
-				bankIndex:-1,
-				bankType:[],
-				accountType:["个人账户","企业账户"],
-				accountarr:[],
-				bankarr:[],
+				DriverViewInfo: {},
+				bankimg: [],
+				bankImgs1: {},
+				bankIndex: -1,
+				bankType: [],
+				accountType: ["个人账户", "企业账户"],
+				accountarr: [],
+				bankarr: [],
+				show: false,
+				carchength: true,
+				subBranch:true,
+				params: {
+					year: true,
+					month: false,
+					day: false,
+				},
+				year: [],
+				carModelType: [],
+				carLengtharr: [],
 			}
 		},
-		onLoad(options){
+		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];
+			subBranchChength(){
+				this.subBranch = !this.subBranch
+			},
+			changeCarChength() {
+				this.carchength = !this.carchength
+			},
+			yearchange() {
+				this.show = true
+			},
+			yearpicker(e, index) {
+				this.year[index] = e.year
+				this.driverCarInfoList[index].yearManufacture = e.year
+			},
+			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)
+			bankimgs(items) {
 				var that = this
 				wx.chooseImage({
 					success: function(res) {
@@ -213,14 +248,15 @@
 								var strToObj = JSON.parse(data)
 								// that.id[0] = 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.bankImgs1.bankImg = strToObj.url
+								that.driverPayeeInfoList[items].cardAddressUrl = strToObj.url
+								that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
+									.bankImgs1).then(res => {
+									that.$set(that.driverPayeeInfoList[items], 'bankCard', res
+										.data.data.bankNo)
+									that.$set(that.driverPayeeInfoList[items], 'bankDeposit',
+										res.data.data.bankName)
 									that.bankType[items] = res.data.data.bankNameZhihang
-									console.log(that.bankType,"支行数组")
 								}).catch(res => {
 									uni.showToast({
 										title: res.data.message,
@@ -231,10 +267,10 @@
 							}
 						})
 					}
-				})	
+				})
 			},
-			jumpUrl(){
-				for(var i = 0 ; i < this.driverCarInfoList.length ; i++){
+			jumpUrl() {
+				for (var i = 0; i < this.driverCarInfoList.length; i++) {
 					if (!this.driverCarInfoList[i].carNumber) {
 						this.$api.msg('车牌号不能为空')
 						return
@@ -251,11 +287,21 @@
 						this.$api.msg('车长不能为空')
 						return
 					}
+					if (this.driverCarInfoList[i].carLength > 50) {
+						this.$api.msg('车长输入错误')
+						return
+					}
+					if (this.driverCarInfoList[i].carLength.indexOf('.') != -1) {
+						if (this.driverCarInfoList[i].carLength.split('.')[1].length > 1) {
+							this.$api.msg('车长输入错误')
+							return
+						}
+					}
 					if (!this.driverCarInfoList[i].carLoad) {
 						this.$api.msg('载重不能为空')
 						return
 					}
-					if (this.driverCarInfoList[i].carLoad > 50 ) {
+					if (this.driverCarInfoList[i].carLoad > 50) {
 						this.$api.msg('载重输入错误')
 						return
 					}
@@ -270,7 +316,7 @@
 						return
 					}
 				}
-				for(var i = 0 ; i < this.driverPayeeInfoList.length ; i++){
+				for (var i = 0; i < this.driverPayeeInfoList.length; i++) {
 					if (!this.driverPayeeInfoList[i].accountType) {
 						this.$api.msg('账户类型不能为空')
 						return
@@ -282,7 +328,8 @@
 						this.$api.msg('银行卡号不能为空')
 						return
 					}
-					if (this.driverPayeeInfoList[i].bankCard.length < 16 || this.driverPayeeInfoList[i].bankCard.length > 19) {
+					if (this.driverPayeeInfoList[i].bankCard.length < 16 || this.driverPayeeInfoList[i].bankCard.length >
+						19) {
 						this.$api.msg('银行卡号输入错误')
 						return
 					}
@@ -290,7 +337,8 @@
 						this.$api.msg('开户行不能为空')
 						return
 					}
-					if (this.driverPayeeInfoList[i].bankDeposit.length < 4 || this.driverPayeeInfoList[i].bankDeposit.length > 15) {
+					if (this.driverPayeeInfoList[i].bankDeposit.length < 4 || this.driverPayeeInfoList[i].bankDeposit
+						.length > 15) {
 						this.$api.msg('开户行输入错误')
 						return
 					}
@@ -298,7 +346,8 @@
 						this.$api.msg('开户支行不能为空')
 						return
 					}
-					if (this.driverPayeeInfoList[i].bankDepositBranch.length < 4 || this.driverPayeeInfoList[i].bankDepositBranch.length > 30 ) {
+					if (this.driverPayeeInfoList[i].bankDepositBranch.length < 4 || this.driverPayeeInfoList[i]
+						.bankDepositBranch.length > 30) {
 						this.$api.msg('开户支行输入错误')
 						return
 					}
@@ -306,7 +355,8 @@
 						this.$api.msg('收款人姓名不能为空')
 						return
 					}
-					if (this.driverPayeeInfoList[i].payeeName.length < 2 || this.driverPayeeInfoList[i].payeeName.length > 10) {
+					if (this.driverPayeeInfoList[i].payeeName.length < 2 || this.driverPayeeInfoList[i].payeeName.length >
+						10) {
 						this.$api.msg('收款人姓名输入错误')
 						return
 					}
@@ -319,12 +369,10 @@
 						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);
+				this.DriverViewInfo.driverCarInfoList = this.driverCarInfoList
+				this.DriverViewInfo.driverPayeeInfoList = this.driverPayeeInfoList
+				this.DriverViewInfo.driverPayeeInfoList.payeeAddressUrl = this.bankimg
+				var model = JSON.stringify(this.DriverViewInfo);
 				uni.navigateTo({
 					url: `/pageD/identity/driverIdentityThree?DriverViewInfo=` + model
 				})
@@ -340,15 +388,15 @@
 			},
 			userAdd() {
 				this.driverPayeeInfoList.push({
-					accountType:"",
-					accountIndex:'0',
-					binkindex:0,
-					cardAddressUrl:"",
-					bankCard:"",
-					bankDeposit:"",
-					bankDepositBranch:"",
-					payeeName:"",
-					payeeNumberCard:"",
+					accountType: "个人账户",
+					accountIndex: '0',
+					binkindex: 0,
+					cardAddressUrl: "",
+					bankCard: "",
+					bankDeposit: "",
+					bankDepositBranch: "",
+					payeeName: "",
+					payeeNumberCard: "",
 				})
 			},
 			carDel(index) {
@@ -361,25 +409,21 @@
 					this.driverPayeeInfoList.splice(index, 1)
 				}
 			},
-			ModelChange(e) {
+			ModelChange(e, index) {
 				this.ModelIndex = e.detail.value
-				this.Model = this.ModelType[this.ModelIndex];
-				
-				this.driverCarInfoList[this.driverCarInfoList.length - 1].carModel = this.ModelType[this.ModelIndex];
+				this.driverCarInfoList[index].carModel = this.ModelType[this.ModelIndex];
+				this.carModelType[index] = this.ModelType[this.ModelIndex];
 			},
-			bankChange(e,index) {
-				this.driverPayeeInfoList[index].binkindex = e.detail.value 
-				this.bankIndex = e.detail.value
-				this.Model = 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],"支行")
+			bankChange(e, index) {
+				this.driverPayeeInfoList[index].binkindex = e.detail.value
+				this.$set(this.bankarr, index, this.bankType[index][this.driverPayeeInfoList[index].binkindex])
+				this.driverPayeeInfoList[index].bankDepositBranch = this.bankType[index][e.detail.value];
 			},
-			carLongChange(e) {
+			carLongChange(e, index) {
 				this.carLongIndex = e.detail.value
 				this.carLong = this.carLongType[this.carLongIndex];
-				this.driverCarInfoList[this.driverCarInfoList.length - 1].carLength = this.carLongType[this.carLongIndex];
+				this.driverCarInfoList[index].carLength = this.carLongType[this.carLongIndex];
+				this.carLengtharr[index] = this.carLongType[this.carLongIndex];
 			},
 			opencarclick() {
 				if (this.opencarboolean == false) {
@@ -467,10 +511,12 @@
 		border-radius: 25px;
 		border: none;
 	}
-	.btns{
+
+	.btns {
 		background-color: #22C572;
 	}
-	.add{
+
+	.add {
 		width: 26px;
 		height: 26px;
 
@@ -483,9 +529,9 @@
 		height: 20px;
 		float: right;
 	}
-	.bankImg{
+
+	.bankImg {
 		width: 20px;
 		height: 20px;
 	}
-
 </style>

+ 1 - 4
pageD/myRelease/buyGrain.vue

@@ -284,11 +284,9 @@
 						phone: this.deptList.buyerPhone,
 						verifyCode: this.verifyCode
 					}).then(res => {
-						if (res.data.code == 200) {
-							
+						if (res.data.code == 200) {	
 						} else {
 							that.verification = false
-							console.log(that.verification,"1")
 							uni.showToast({
 								title: res.data.message,
 								icon: 'none',
@@ -299,7 +297,6 @@
 					})
 					.catch(res => {
 						that.verification = false
-						console.log(that.verification,"2")
 						uni.showToast({
 							title: res.data.message,
 							icon: 'none',