zhongtianhaoyuan hace 3 años
padre
commit
138d775404

+ 4 - 0
.hbuilderx/debug.config.json

@@ -0,0 +1,4 @@
+{
+    "rootPathIndex": 1,
+    "webRoot": "${projectDir}"
+}

+ 39 - 41
pages/mine/driverCertification.vue

@@ -41,7 +41,7 @@
 
 			</view>
 			<view v-if="isFirstAuthentication" class="content1-car">
-				<view class="flex s-row carlist-item" v-for="(item,index) in dataDetails.driverCarInfoList"
+				<!--<view class="flex s-row carlist-item" v-for="(item,index) in dataDetails.hyDriverCarInfoList"
 					:key='index'>
 					<view class="flex row">
 						<view class="left left-text">
@@ -50,7 +50,7 @@
 						<view class="right flex">
 							<input class="car-uumber" v-model='item.carNumber' @click.stop="handleShowKeyboard(index)"
 								:disabled="true" placeholder="输入车牌号" name="input"></input>
-							<view @click="delCarNumber(dataDetails.driverCarInfoList,index)" class="" v-if="index!=0">
+							<view @click="delCarNumber(dataDetails.hyDriverCarInfoList,index)" class="" v-if="index!=0">
 								<image class='del-car' src="@/static/images/common/quxiao@2x.png">
 								</image>
 							</view>
@@ -122,15 +122,15 @@
 						</view> -->
 
 						<!-- <image class="preview-img" :src="item.addressUrl" v-if='item.addressUrl'></image> -->
-					</view>
-				</view>
+					<!--</view>
+				</view> -->
 			</view>
-			<view  v-if="isFirstAuthentication" @click="addCarNumber(dataDetails.driverCarInfoList)" class="add-car">
+		<!-- 	<view  v-if="isFirstAuthentication" @click="addCarNumber(dataDetails.hyDriverCarInfoList)" class="add-car">
 				<u-icon class="icon" name="plus-circle-fill" color="#2979ff" size="28"></u-icon>
 				<view class="car-text">
 					添加车辆
 				</view>
-			</view>
+			</view> -->
 
 			<view class="content2 content-other">
 				<view class="title">上传身份证人像面</view>
@@ -182,11 +182,11 @@
 					@confirm="confirmValidityPeriod" @change="changeHandler">
 				</u-picker>
 			</view>
-			<view class="content3 flex s-row" v-for="(item,index) in dataDetails.driverPayeeInfoList" :key='index'>
+			<view class="content3 flex s-row" v-for="(item,index) in dataDetails.hyDriverPayeeInfoList" :key='index'>
 				<view class="flex">
 					银行卡-{{index+1}}
 				</view>
-				<view @click="delBankNumber(dataDetails.driverPayeeInfoList,index)" class="" v-if="index!=0">
+				<view @click="delBankNumber(dataDetails.hyDriverPayeeInfoList,index)" class="" v-if="index!=0">
 					<image class='del-bank' src="@/static/images/common/quxiao@2x.png">
 					</image>
 				</view>
@@ -246,7 +246,7 @@
 				</u-picker>
 			</view>
 
-			<view @click="addBankNumber(dataDetails.driverPayeeInfoList)" class="add-car">
+			<view @click="addBankNumber(dataDetails.hyDriverPayeeInfoList)" class="add-car">
 				<u-icon class="icon" name="plus-circle-fill" color="#2979ff" size="28"></u-icon>
 				<view class="car-text">
 					添加银行卡
@@ -262,9 +262,7 @@
 			<u-toast ref="uToast"></u-toast>
 		</view>
 		<view class="content4">
-			<view class="next-btn" @click="next()">
-				下一步
-			</view>
+			<view class="next-btn" @click="next()">下一步</view>
 		</view>
 	</view>
 </template>
@@ -360,7 +358,7 @@
 					operationCertificateValidityDate: '',
 					trailerOperationCertificate: '',
 					trailerOperationCertificateValidityDate: '',
-					driverCarInfoList: [{
+					hyDriverCarInfoList: [{
 						carNumber: '',
 						addressUrl: '',
 						carNumberColour: '黄色',
@@ -372,7 +370,7 @@
 						carHeight: '',
 						fileList1: []
 					}],
-					driverPayeeInfoList: [{
+					hyDriverPayeeInfoList: [{
 						payeeAddressUrl: '',
 						bankCard: '',
 						bankDeposit: '',
@@ -421,7 +419,7 @@
 						break
 						// 银行卡
 					case 3:
-						_this.dataDetails.driverPayeeInfoList[_this.index].payeeAddressUrl = ''
+						_this.dataDetails.hyDriverPayeeInfoList[_this.index].payeeAddressUrl = ''
 						break;
 				}
 			},
@@ -598,7 +596,7 @@
 			},
 			confirmBank(e) {
 				console.log(e)
-				this.dataDetails.driverPayeeInfoList[this.index].bankDepositBranch = e.value[0]
+				this.dataDetails.hyDriverPayeeInfoList[this.index].bankDepositBranch = e.value[0]
 				this.isShowBank = false
 			},
 			manualInput() {
@@ -725,14 +723,14 @@
 														bankImg: result,
 													}).then(res => {
 													console.log(res)
-													_this.dataDetails.driverPayeeInfoList[_this.index]
+													_this.dataDetails.hyDriverPayeeInfoList[_this.index]
 														.payeeAddressUrl = result
 													if (res.data.bankNo) {
-														_this.dataDetails.driverPayeeInfoList[_this
+														_this.dataDetails.hyDriverPayeeInfoList[_this
 															.index].bankCard = res.data.bankNo
 													}
 													if (res.data.bankName) {
-														_this.dataDetails.driverPayeeInfoList[_this
+														_this.dataDetails.hyDriverPayeeInfoList[_this
 															.index].bankDeposit = res.data.bankName
 													}
 
@@ -781,14 +779,14 @@
 			//车牌号弹出键盘
 			handleClick(e) {
 				this.carNumber = e.value
-				this.dataDetails.driverCarInfoList[this.index].carNumber = e.value //键盘输入值
+				this.dataDetails.hyDriverCarInfoList[this.index].carNumber = e.value //键盘输入值
 			},
 			//车牌号弹出键盘
 			handleShowKeyboard(index) {
-				if (this.dataDetails.driverCarInfoList[index].carNumber == '') {
+				if (this.dataDetails.hyDriverCarInfoList[index].carNumber == '') {
 					this.carNumber = ''
 				} else {
-					this.carNumber = this.dataDetails.driverCarInfoList[index].carNumber
+					this.carNumber = this.dataDetails.hyDriverCarInfoList[index].carNumber
 				}
 				if (this.$refs.keyboard.open) {
 					this.$refs.keyboard.open(false) //true 键盘显示 false 键盘隐藏
@@ -892,23 +890,23 @@
 					})
 					return true
 				}
-				for (let i = 0; i < this.dataDetails.driverCarInfoList.length; i++) {
-					let _item = this.dataDetails.driverCarInfoList[i]
-					if (uni.$u.test.isEmpty(_item.carNumber)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "车牌号不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(_item.addressUrl)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "人车合影不能为空!",
-						})
-						return true
-					}
-				}
+				// for (let i = 0; i < this.dataDetails.hyDriverCarInfoList.length; i++) {
+				// 	let _item = this.dataDetails.hyDriverCarInfoList[i]
+				// 	if (uni.$u.test.isEmpty(_item.carNumber)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "车牌号不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(_item.fileList1)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "人车合影不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// }
 
 				if (uni.$u.test.isEmpty(this.dataDetails.driverPhone)) {
 					this.$refs.uToast.show({
@@ -932,8 +930,8 @@
 					return true
 				}
 
-				for (let i = 0; i < this.dataDetails.driverPayeeInfoList.length; i++) {
-					let _item = this.dataDetails.driverPayeeInfoList[i]
+				for (let i = 0; i < this.dataDetails.hyDriverPayeeInfoList.length; i++) {
+					let _item = this.dataDetails.hyDriverPayeeInfoList[i]
 					if (uni.$u.test.isEmpty(_item.payeeAddressUrl)) {
 						this.$refs.uToast.show({
 							type: 'error',

+ 121 - 114
pages/mine/driverCertificationNext.vue

@@ -2,11 +2,11 @@
 	<view class="content">
 		<view class="top-head"></view>
 		<view class="container">
-			<u-radio-group v-model="radiovalue" iconPlacement="row" class='radio-group'>
+			<!-- <u-radio-group v-model="radiovalue" iconPlacement="row" class='radio-group'>
 				<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist" :key="index"
 					:label="item.name" :name="item.name" @change="radioChange">
 				</u-radio>
-			</u-radio-group>
+			</u-radio-group> -->
 			<view class="level1-title">证件信息</view>
 			<view class="content1">
 				<view class="title">上传驾驶证主页</view>
@@ -41,7 +41,7 @@
 						{{dataDetails.driverLicenseValidityDate?dataDetails.driverLicenseValidityDate:'选择有效截止日期>'}}
 					</view>
 				</view>
-
+<!--
 				<view class="title">上传行驶证主页</view>
 				<view @click="uploadImg(3)" class="picture picture3" v-if="!dataDetails.drivingLicenseHomePage">
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
@@ -123,7 +123,7 @@
 					<view class="" @click="selectValidityPeriod(2)">
 						{{dataDetails.trailerLicenseValidityDate?dataDetails.trailerLicenseValidityDate:'选择有效截止日期>'}}
 					</view>
-				</view>
+				</view>-->
 
 				<view class="title">从业资格证</view>
 				<view @click="uploadImg(7)" class="picture picture7" v-if="!dataDetails.qualificationCertificate">
@@ -145,7 +145,7 @@
 						{{dataDetails.qualificationCertificateValidityDate?dataDetails.qualificationCertificateValidityDate:'选择有效期>'}}
 					</view>
 				</view>
-
+<!--
 				<view class="title">道路运输证</view>
 				<view @click="uploadImg(8)" class="picture picture8" v-if="!dataDetails.operationCertificate">
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
@@ -199,11 +199,14 @@
 						{{dataDetails.trailerOperationCertificateValidityDate?dataDetails.trailerOperationCertificateValidityDate:'选择有效期>'}}
 					</view>
 				</view>
+			
+				-->
 				<view class="flex row">
 					<view class="left-text">通讯地址</view>
 					<u--input placeholder="输入通讯地址" inputAlign='left' border="none" v-model="dataDetails.postalAddress"></u--input>
 				</view>
 			</view>
+			
 			<view class="flex service align-center">
 				<u--image @click='consent'
 					:src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
@@ -345,7 +348,7 @@
 						sourceType: this.$helper.chooseImage.sourceType,
 						success: function(res) {
 							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage(res.tempFilePaths[0], 'appData/',
+							uploadImage("images",res.tempFilePaths[0], 'appData/',
 								result => {
 									// 上传成功回调函数
 									console.log('图片地址-----', result)
@@ -387,12 +390,10 @@
 				} else {
 
 				}
-
 			},
 			uploadImg(type) {
 				this.uploadType = type
 				this.isShowimgType = true
-
 			},
 			validate() {
 				// true 为校验不通过
@@ -417,64 +418,64 @@
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseHomePage)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "行驶证主页不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "行驶证副页不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "行驶证有效期不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "行驶证档案编号不能为空!",
-					})
-					return true
-				}
-				if(this.radiovalue=='挂车司机'){
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车行驶证主页不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车行驶证副页不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车行驶证档案编号不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车行驶证有效期不能为空!",
-						})
-						return true
-					}
-				}
+				// if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseHomePage)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "行驶证主页不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "行驶证副页不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "行驶证有效期不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "行驶证档案编号不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if(this.radiovalue=='挂车司机'){
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车行驶证主页不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车行驶证副页不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车行驶证档案编号不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车行驶证有效期不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// }
 				
 				// if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
 				// 	this.$refs.uToast.show({
@@ -498,50 +499,50 @@
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "道路运输证不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateNumber)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "道路运输证号不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "道路运输证有效期不能为空!",
-					})
-					return true
-				}
-				if(this.radiovalue=='挂车司机'){
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车道路运输证不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车道路运输证号不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车道路运输证有效期不能为空!",
-						})
-						return true
-					}
-				}
+				// if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "道路运输证不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateNumber)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "道路运输证号不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "道路运输证有效期不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if(this.radiovalue=='挂车司机'){
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车道路运输证不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车道路运输证号不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车道路运输证有效期不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// }
 				if (uni.$u.test.isEmpty(this.dataDetails.postalAddress)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -552,8 +553,6 @@
 				return false
 			},
 			submit() {
-				
-			
 				// 校验
 				if (this.validate()) return
 				if(this.dataDetails.driverSex=='男'){
@@ -570,7 +569,16 @@
 				}
 				this.$request.baseRequest('post', '/driverInfo/api/addInfo', this.dataDetails).then(res => {
 						if(res.code==200){
-							uni.$u.route('/pages/mine/index');
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "提交成功,待平台审核!",
+								complete() {
+									uni.switchTab({
+										url: '/pages/mine/index'
+									})
+								}
+							})
+							// uni.$u.route('/pages/mine/index');
 						}else{
 							uni.$u.toast(res.message);
 						}
@@ -581,7 +589,6 @@
 					});
 			},
 			radioChange(n) {
-				console.log('radioChange', n);
 				if (n == '挂车司机') {
 					this.isGCar = true
 					this.dataDetails.driverType = 1

+ 101 - 99
pages/mine/editDriverCertificationNext.vue

@@ -41,7 +41,7 @@
 						{{dataDetails.driverLicenseValidityDate?dataDetails.driverLicenseValidityDate:'选择有效截止日期>'}}
 					</view>
 				</view>
-
+<!--
 				<view class="title">上传行驶证主页</view>
 				<view @click="uploadImg(3)" class="picture picture3" v-if="!dataDetails.drivingLicenseHomePage">
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
@@ -124,6 +124,7 @@
 						{{dataDetails.trailerLicenseValidityDate?dataDetails.trailerLicenseValidityDate:'选择有效截止日期>'}}
 					</view>
 				</view>
+				-->
 
 				<view class="title">从业资格证</view>
 				<view @click="uploadImg(7)" class="picture picture7" v-if="!dataDetails.qualificationCertificate">
@@ -145,6 +146,7 @@
 						{{dataDetails.qualificationCertificateValidityDate?dataDetails.qualificationCertificateValidityDate:'选择有效期>'}}
 					</view>
 				</view>
+				<!--
 
 				<view class="title">道路运输证</view>
 				<view @click="uploadImg(8)" class="picture picture8" v-if="!dataDetails.operationCertificate">
@@ -200,6 +202,8 @@
 						{{dataDetails.trailerOperationCertificateValidityDate?dataDetails.trailerOperationCertificateValidityDate:'选择有效期>'}}
 					</view>
 				</view>
+				
+				-->
 				<view class="flex row">
 					<view class="left-text">通讯地址</view>
 					<u--input placeholder="输入通讯地址" inputAlign='left' border="none" v-model="dataDetails.postalAddress"></u--input>
@@ -422,34 +426,34 @@
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseHomePage)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "行驶证主页不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "行驶证副页不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "行驶证有效期不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "行驶证档案编号不能为空!",
-					})
-					return true
-				}
+				// if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseHomePage)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "行驶证主页不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "行驶证副页不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "行驶证有效期不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "行驶证档案编号不能为空!",
+				// 	})
+				// 	return true
+				// }
 
 				if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificate)) {
 					this.$refs.uToast.show({
@@ -465,73 +469,73 @@
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "道路运输证不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "道路运输证有效期不能为空!",
-					})
-					return true
-				}
+				// if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "道路运输证不能为空!",
+				// 	})
+				// 	return true
+				// }
+				// if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "道路运输证有效期不能为空!",
+				// 	})
+				// 	return true
+				// }
 
 
-				if (this.radiovalue == '挂车司机') {
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车行驶证主页不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车行驶证副页不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车行驶证有效期不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车道路运输证不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车道路运输证有效期不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车道路运输证号不能为空!",
-						})
-						return true
-					}
-					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "挂车行驶证档案编号不能为空!",
-						})
-						return true
-					}
-				}
+				// if (this.radiovalue == '挂车司机') {
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车行驶证主页不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车行驶证副页不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车行驶证有效期不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车道路运输证不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车道路运输证有效期不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车道路运输证号不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "挂车行驶证档案编号不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// }
 				if (uni.$u.test.isEmpty(this.dataDetails.postalAddress)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -566,22 +570,20 @@
 				// 校验
 				if (this.validate()) return
 				this.delSubmitObj()
-
 				this.$request.baseRequest('post', '/driverInfo/api/editInfo', this.dataDetails).then(res => {
 						if (res.code == 200) {
 							this.$refs.uToast.show({
 								type: 'success',
-								message: "提交成功!",
+								message: "提交成功,待平台审核!",
 								complete() {
 									uni.switchTab({
 										url: '/pages/mine/index'
 									})
 								}
 							})
-
+						}else{
+							uni.$u.toast(res.message);
 						}
-
-
 					})
 					.catch(res => {
 						uni.$u.toast(res.message);

+ 494 - 28
pages/mine/manageVehicles/addVehicle.vue

@@ -22,7 +22,7 @@
 				<view class="color" @click="selectCarModel">{{dataDetails.carType}}</view>
 				<view>></view>
 				<u-picker :show="carModel" :columns="carModelColumns" :closeOnClickOverlay='true' @close='carModelClose'
-					@cancel='carModelClose' @confirm='confirmCarModel'  @change="changeCarModel"></u-picker>
+					@cancel='carModelClose' @confirm='confirmCarModel' @change="changeCarModel"></u-picker>
 			</view>
 			<view class="flex row">
 				<view class="left-text">车辆所属车主</view>
@@ -68,17 +68,158 @@
 					</view>
 				</view>
 			</view>
-			
+
 			<view class="flex row noborder s-row">
 				<view class="left-text" style="width: 100%;">人车合影(车头车牌号可见)</view>
 				<u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
 					name="1" multiple :maxCount="1"></u-upload>
 			</view>
+			<view class="level1-title">证件信息</view>
+			<view class="title">道路运输证</view>
+			<view @click="uploadImg(8)" class="picture picture8" v-if="!dataDetails.operationCertificate">
+				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+				<view class="text">上传道路运输证</view>
+			</view>
+			<view v-if="dataDetails.operationCertificate" @click.stop="uploadImg(1)" class="preview-card-img picture">
+				<view @click.stop="delCard(1)">
+					<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+					</image>
+				</view>
+				<image class="" :src="dataDetails.operationCertificate" mode="aspectFit"></image>
+			</view>
+			<view class="flex row">
+				<view class="left-text">道路运输证号</view>
+				<u--input placeholder="输入道路运输证号" inputAlign='right' border="none"
+					v-model="dataDetails.operationCertificateNumber">
+				</u--input>
+			</view>
+			<view class="flex row flex-space-between">
+				<view class="left-text">道路运输证有效期</view>
+				<view class="" @click="selectValidityPeriod(4)">
+					{{dataDetails.operationCertificateValidityDate?dataDetails.operationCertificateValidityDate:'选择有效期>'}}
+				</view>
+			</view>
+			<view v-if="sign == '挂车'">
+				<view class="title">挂车道路运输证</view>
+				<view @click="uploadImg(9)" class="picture picture9" v-if="!dataDetails.trailerOperationCertificate">
+					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+					<view class="text">上传挂车道路运输证</view>
+				</view>
+				<view v-if="dataDetails.trailerOperationCertificate" @click.stop="uploadImg(1)"
+					class="preview-card-img picture">
+					<view @click.stop="delCard(1)">
+						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+						</image>
+					</view>
+					<image class="" :src="dataDetails.trailerOperationCertificate" mode="aspectFit"></image>
+				</view>
+			</view>
+			<view class="flex row" v-if="sign == '挂车'">
+				<view class="left-text">挂车道路运输证号</view>
+				<u--input placeholder="输入挂车道路运输证号" inputAlign='right' border="none"
+					v-model="dataDetails.trailerOperationCertificateNumber">
+				</u--input>
+			</view>
+
+			<view class="flex row flex-space-between" v-if="sign == '挂车'">
+				<view class="left-text">挂车道路运输证有效期</view>
+				<view class="" @click="selectValidityPeriod(5)">
+					{{dataDetails.trailerOperationCertificateValidityDate?dataDetails.trailerOperationCertificateValidityDate:'选择有效期>'}}
+				</view>
+			</view>
+			<view class="title">上传行驶证主页</view>
+			<view @click="uploadImg(3)" class="picture picture3" v-if="!dataDetails.drivingLicenseHomePage">
+				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+				<view class="text">上传行驶证主页</view>
+			</view>
+			<view v-if="dataDetails.drivingLicenseHomePage" @click.stop="uploadImg(1)" class="preview-card-img picture">
+				<view @click.stop="delCard(1)">
+					<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+					</image>
+				</view>
+				<image class="" :src="dataDetails.drivingLicenseHomePage" mode="aspectFit"></image>
+			</view>
+			<view class="title">上传行驶证副页</view>
+			<view @click="uploadImg(4)" class="picture picture4" v-if="!dataDetails.drivingLicenseBackPage">
+				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+				<view class="text">上传行驶证副页</view>
+			</view>
+			<view v-if="dataDetails.drivingLicenseBackPage" @click.stop="uploadImg(1)" class="preview-card-img picture">
+				<view @click.stop="delCard(1)">
+					<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+					</image>
+				</view>
+				<image class="" :src="dataDetails.drivingLicenseBackPage" mode="aspectFit"></image>
+			</view>
+			<view class="flex row flex-space-between">
+				<view class="left-text">行驶证档案编号</view>
+				<u--input placeholder="输入行驶证档案编号" inputAlign='right' border="none"
+					v-model="dataDetails.drivingLicenseNumber">
+				</u--input>
+			</view>
+
+			<view class="flex row flex-space-between">
+				<view class="left-text">行驶证有效期</view>
+				<view class="" @click="selectValidityPeriod(1)">
+					{{dataDetails.drivingLicenseValidityDate?dataDetails.drivingLicenseValidityDate:'选择有效截止日期>'}}
+				</view>
+			</view>
+
+
+			<view class="" v-if="sign == '挂车'">
+				<view class="title">挂车行驶证主页</view>
+				<view @click="uploadImg(5)" class="picture picture5" v-if="!dataDetails.trailerLicenseHomePage">
+					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+					<view class="text">上传挂车行驶证主页</view>
+				</view>
+				<view v-if="dataDetails.trailerLicenseHomePage" @click.stop="uploadImg(1)"
+					class="preview-card-img picture">
+					<view @click.stop="delCard(1)">
+						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+						</image>
+					</view>
+					<image class="" :src="dataDetails.trailerLicenseHomePage" mode="aspectFit"></image>
+				</view>
+			</view>
+			<view v-if="sign == '挂车'">
+				<view class="title">挂车行驶证副页</view>
+				<view @click="uploadImg(6)" class="picture picture6" v-if="!dataDetails.trailerLicenseBackPage">
+					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+					<view class="text">上传挂车行驶证副页</view>
+				</view>
+				<view v-if="dataDetails.trailerLicenseBackPage" @click.stop="uploadImg(1)"
+					class="preview-card-img picture">
+					<view @click.stop="delCard(1)">
+						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+						</image>
+					</view>
+					<image class="" :src="dataDetails.trailerLicenseBackPage" mode="aspectFit"></image>
+				</view>
+			</view>
+			<view class="flex row">
+				<view class="left-text">挂车行驶证档案编号</view>
+				<u--input placeholder="输入挂车行驶证档案编号" inputAlign='right' border="none"
+					v-model="dataDetails.trailerLicenseNumber">
+				</u--input>
+			</view>
+
+			<view class="flex row flex-space-between" v-if="sign == '挂车'">
+				<view class="left-text">挂车行驶证有效期</view>
+				<view class="" @click="selectValidityPeriod(2)">
+					{{dataDetails.trailerLicenseValidityDate?dataDetails.trailerLicenseValidityDate:'选择有效截止日期>'}}
+				</view>
+			</view>
 		</view>
 		<view class="submit-btn" @click="submit">提交</view>
 		<master-keyboard ref="keyboard" keyboardtype="car" :show="keyShow" :randomNumber="true" :newCar="false"
 			:defaultValue="carNumber" @keyboardClick="handleClick"></master-keyboard>
 		<u-toast ref="uToast"></u-toast>
+		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
+			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
+		</u-action-sheet>
+		<u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
+		</u-picker>
 	</view>
 </template>
 
@@ -96,7 +237,7 @@
 				keyShow: false,
 				carNumber: '',
 				dataDetails: {
-					driverId:'',
+					driverId: '',
 					carNumber: '',
 					carNumberColour: '黄色',
 					carType: '挂车 高栏',
@@ -105,7 +246,7 @@
 					carLong: '',
 					carWidth: '',
 					carHeight: '',
-					addressUrl:''
+					addressUrl: ''
 
 				},
 				carModelColumns: [
@@ -121,17 +262,144 @@
 				],
 				carColor: false,
 				carModel: false,
-				fileList1: []
+				fileList1: [],
+				ValidityPeriodType: "",
+				validityPeriod: [],
+				isShowValidity: false,
+				uploadType: '',
+				isShowimgType: false,
+				sign: "挂车"
+
 			};
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo','firstAuthentication']),
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication']),
 		},
 		onLoad(options) {
 			_this = this;
 			this.dataDetails.driverId = this.userInfo.driverId
+			this.validityPeriod = this.$helper.makeValidityPeriod()
 		},
 		methods: {
+			delCard(type) {
+			switch (type) {
+				case 1:
+					_this.dataDetails.driverLicenseHomePage = ""
+					break;
+				case 2:
+					_this.dataDetails.driverLicenseBackPage = ""
+					break;
+				case 3:
+					_this.dataDetails.drivingLicenseHomePage = ""
+					break;
+				case 4:
+					_this.dataDetails.drivingLicenseBackPage = ""
+					break;
+				case 5:
+					_this.dataDetails.trailerLicenseHomePage = ""
+					break;
+				case 6:
+					_this.dataDetails.trailerLicenseBackPage = ""
+					break;
+				case 7:
+					_this.dataDetails.qualificationCertificate = ""
+					break;
+				case 8:
+					_this.dataDetails.operationCertificate = ""
+					break;
+				case 9:
+					_this.dataDetails.trailerOperationCertificate = ""
+					break;
+			}
+			},
+			uploadImg(type) {
+				this.uploadType = type
+				this.isShowimgType = true
+			},
+			selectValidityPeriod(type) {
+				this.ValidityPeriodType = type
+				this.isShowValidity = true
+			},
+			// 上传图片
+			imgTypeSelect(val) {
+				console.log(val)
+				console.log(this.uploadType)
+				if (val.name == '相册') {
+					uni.chooseImage({
+						count: 1,
+						sourceType: this.$helper.chooseImage.sourceType,
+						success: function(res) {
+							console.log(JSON.stringify(res.tempFilePaths));
+							uploadImage("images", res.tempFilePaths[0], 'appData/',
+								result => {
+									// 上传成功回调函数
+									console.log('图片地址-----', result)
+									switch (_this.uploadType) {
+										case 1:
+											_this.dataDetails.driverLicenseHomePage = result
+											break;
+										case 2:
+											_this.dataDetails.driverLicenseBackPage = result
+											break;
+										case 3:
+											_this.dataDetails.drivingLicenseHomePage = result
+											break;
+										case 4:
+											_this.dataDetails.drivingLicenseBackPage = result
+											break;
+										case 5:
+											_this.dataDetails.trailerLicenseHomePage = result
+											break;
+										case 6:
+											_this.dataDetails.trailerLicenseBackPage = result
+											break;
+										case 7:
+											_this.dataDetails.qualificationCertificate = result
+											break;
+										case 8:
+											_this.dataDetails.operationCertificate = result
+											break;
+										case 9:
+											_this.dataDetails.trailerOperationCertificate = result
+											break;
+									}
+									_this.$forceUpdate()
+								}
+							)
+						}
+					});
+
+				} else {
+
+				}
+			},
+			confirmValidityPeriod(e) {
+				console.log('confirm', e)
+				switch (this.ValidityPeriodType) {
+					case 0:
+						this.dataDetails.driverLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						break
+					case 1:
+						this.dataDetails.drivingLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						break
+					case 2:
+						this.dataDetails.trailerLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						break
+					case 3:
+						this.dataDetails.qualificationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
+							.value[2]
+						break
+					case 4:
+						this.dataDetails.operationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[
+							2]
+						break
+					case 5:
+						this.dataDetails.trailerOperationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
+							.value[2]
+						break
+				}
+				this.isShowValidity = false
+			},
 			// 车型切换
 			changeCarModel(e) {
 				const {
@@ -173,16 +441,16 @@
 				}
 			},
 			uploadFilePromise(url) {
-				uploadImage('image',url, 'appData/',
+				uploadImage('image', url, 'appData/',
 					result => {
 						// 上传成功回调函数
 						console.log('图片地址', result)
-						if(!this.dataDetails.addressUrl){
-								this.dataDetails.addressUrl = result
-						}else{
-							this.dataDetails.addressUrl = this.dataDetails.addressUrl+','+ result
+						if (!this.dataDetails.addressUrl) {
+							this.dataDetails.addressUrl = result
+						} else {
+							this.dataDetails.addressUrl = this.dataDetails.addressUrl + ',' + result
 						}
-						
+
 
 					}
 				)
@@ -222,6 +490,7 @@
 				this.carColor = true
 			},
 			confirmCarModel(val) {
+				this.sign = val.value[0]
 				this.dataDetails.carType = val.value[0] + ' ' + val.value[1]
 				this.carModel = false
 			},
@@ -239,7 +508,7 @@
 					count: 1,
 					success: function(res) {
 						console.log(JSON.stringify(res.tempFilePaths));
-						uploadImage('image',res.tempFilePaths[0], 'appData/',
+						uploadImage('image', res.tempFilePaths[0], 'appData/',
 							result => {
 								// 上传成功
 								console.log('图片地址', result)
@@ -271,36 +540,139 @@
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.carLong)&&uni.$u.test.isEmpty(this.dataDetails.caWidth)&&uni.$u.test.isEmpty(this.dataDetails.carHeight)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.carLong) && uni.$u.test.isEmpty(this.dataDetails.caWidth) && uni
+					.$u.test.isEmpty(this.dataDetails.carHeight)) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "外廓尺寸不能为空!",
 					})
 					return true
 				}
-				// if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
-				// 	this.$refs.uToast.show({
-				// 		type: 'error',
-				// 		message: "行驶证副页不能为空!",
-				// 	})
-				// 	return true
-				// }
-			
+				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "道路运输证不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateNumber)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "道路运输证号不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "道路运输证有效期不能为空!",
+					})
+					return true
+				}
+				if(this.sign == '挂车'){
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车道路运输证不能为空!",
+						})
+						return true
+					}
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车道路运输证号不能为空!",
+						})
+						return true
+					}
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车道路运输证有效期不能为空!",
+						})
+						return true
+					}
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseHomePage)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "行驶证主页不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "行驶证副页不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "行驶证档案编号不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "行驶证有效期不能为空!",
+					})
+					return true
+				}
+				
+				if (this.sign == '挂车') {
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车行驶证主页不能为空!",
+						})
+						return true
+					}
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车行驶证副页不能为空!",
+						})
+						return true
+					}
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车行驶证档案编号不能为空!",
+						})
+						return true
+					}
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车行驶证有效期不能为空!",
+						})
+						return true
+					}
+				}
 				return false
 			},
 			submit() {
+				this.dataDetails.driverId = uni.getStorageSync("firstAuthentication").id
 				// 校验
 				if (this.validate()) return
 				this.$request.baseRequest('post', '/driverCarInfo/api/addInfo', this.dataDetails).then(res => {
 						if (res.code == '200') {
-							let params = {
-								type: 'success',
-								message: "提交成功",
-							}
 							this.$refs.uToast.show({
-								...params
+								type: 'success',
+								message: "提交成功!",
+								complete() {
+									// uni.navigateBack({
+									// 	delta: 1
+									// });
+									uni.$u.route('/pages/mine/manageVehicles/index');
+								}
 							})
-							uni.$u.route('/pages/mine/manageVehicles/index');
+							// this.$refs.uToast.show({
+							// 	...params
+							// })
+							// uni.$u.route('/pages/mine/manageVehicles/index');
 
 						} else {
 							uni.$u.toast(res.message);
@@ -322,6 +694,7 @@
 		background: white;
 		padding: 0 20rpx;
 		border-radius: 20rpx;
+		padding-bottom: 200rpx;
 
 		.left-text {
 			// background: red;
@@ -343,6 +716,90 @@
 			padding-right: 250rpx;
 			box-sizing: border-box;
 		}
+
+		.row {
+			border-bottom: 1px solid #EEEEEE;
+			padding-bottom: 28rpx;
+			margin-top: 26rpx;
+
+		}
+
+		.left-text {
+			// background: red;
+			width: 320rpx;
+			color: #333333;
+			display: flex;
+			align-items: center;
+		}
+
+		.picture {
+			position: relative;
+			width: 100%;
+			height: 440rpx;
+			display: flex;
+			justify-content: center;
+			flex-direction: column;
+			align-items: center;
+
+			.text {
+				margin-top: 20rpx;
+			}
+		}
+
+		.picture1 {
+			background: url(../../../static/images/mine/jzz.png);
+			background-size: 100% 100%;
+		}
+
+		.picture2 {
+			background: url(../../../static/images/mine/jzf.png);
+			background-size: 100% 100%;
+		}
+
+		.picture3 {
+			background: url(../../../static/images/mine/xsz.png);
+			background-size: 100% 100%;
+		}
+
+		.picture4 {
+			background: url(../../../static/images/mine/xsf.png);
+			background-size: 100% 100%;
+		}
+
+		.picture5 {
+			background: url(../../../static/images/mine/gcxsz.png);
+			background-size: 100% 100%;
+		}
+
+		.picture6 {
+			background: url(../../../static/images/mine/gcxsf.png);
+			background-size: 100% 100%;
+		}
+
+		.picture7 {
+			background: url(../../../static/images/mine/cy.png);
+			background-size: 100% 100%;
+		}
+
+		.picture8 {
+			background: url(../../../static/images/mine/cy.png);
+			background-size: 100% 100%;
+		}
+
+		.picture9 {
+			background: url(../../../static/images/mine/cy.png);
+			background-size: 100% 100%;
+		}
+
+		.xj-image {
+			width: 100rpx;
+			height: 100rpx;
+		}
+
+		.title {
+			color: #999999;
+			margin: 20rpx 0;
+		}
 	}
 
 	.input-ckg {
@@ -404,4 +861,13 @@
 		padding: 30rpx 0;
 		border-radius: 50rpx;
 	}
+
+	.del-card {
+		position: absolute;
+		top: -10rpx;
+		right: -6rpx;
+		width: 80rpx;
+		height: 80rpx;
+		z-index: 9;
+	}
 </style>

+ 381 - 10
pages/mine/manageVehicles/editVehicle.vue

@@ -6,7 +6,7 @@
 				<view class="left left-text">车牌号</view>
 				<view class="right flex">
 					<input class="car-uumber" v-model='dataDetails.carNumber' @click.stop="handleShowKeyboard(index)"
-						:disabled="f" placeholder="输入车牌号" name="input" @focus='focus()' @blur='blur()'></input>
+						:disabled="true" placeholder="输入车牌号" name="input" @focus='focus()' @blur='blur()'></input>
 
 				</view>
 			</view>
@@ -78,11 +78,152 @@
 					:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
 					@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload> -->
 			</view>
+			<view class="level1-title">证件信息</view>
+			<view class="title">道路运输证</view>
+			<view @click="uploadImg(8)" class="picture picture8" v-if="!dataDetails.operationCertificate">
+				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+				<view class="text">上传道路运输证</view>
+			</view>
+			<view v-if="dataDetails.operationCertificate" @click.stop="uploadImg(1)" class="preview-card-img picture">
+				<view @click.stop="delCard(1)">
+					<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+					</image>
+				</view>
+				<image class="" :src="dataDetails.operationCertificate" mode="aspectFit"></image>
+			</view>
+			<view class="flex row">
+				<view class="left-text">道路运输证号</view>
+				<u--input placeholder="输入道路运输证号" inputAlign='right' border="none"
+					v-model="dataDetails.operationCertificateNumber">
+				</u--input>
+			</view>
+			<view class="flex row flex-space-between">
+				<view class="left-text">道路运输证有效期</view>
+				<view class="" @click="selectValidityPeriod(4)">
+					{{dataDetails.operationCertificateValidityDate?dataDetails.operationCertificateValidityDate:'选择有效期>'}}
+				</view>
+			</view>
+			<view v-if="sign == '挂车'">
+				<view class="title">挂车道路运输证</view>
+				<view @click="uploadImg(9)" class="picture picture9" v-if="!dataDetails.trailerOperationCertificate">
+					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+					<view class="text">上传挂车道路运输证</view>
+				</view>
+				<view v-if="dataDetails.trailerOperationCertificate" @click.stop="uploadImg(1)"
+					class="preview-card-img picture">
+					<view @click.stop="delCard(1)">
+						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+						</image>
+					</view>
+					<image class="" :src="dataDetails.trailerOperationCertificate" mode="aspectFit"></image>
+				</view>
+			</view>
+			<view class="flex row" v-if="sign == '挂车'">
+				<view class="left-text">挂车道路运输证号</view>
+				<u--input placeholder="输入挂车道路运输证号" inputAlign='right' border="none"
+					v-model="dataDetails.trailerOperationCertificateNumber">
+				</u--input>
+			</view>
+			
+			<view class="flex row flex-space-between" v-if="sign == '挂车'">
+				<view class="left-text">挂车道路运输证有效期</view>
+				<view class="" @click="selectValidityPeriod(5)">
+					{{dataDetails.trailerOperationCertificateValidityDate?dataDetails.trailerOperationCertificateValidityDate:'选择有效期>'}}
+				</view>
+			</view>
+			<view class="title">上传行驶证主页</view>
+			<view @click="uploadImg(3)" class="picture picture3" v-if="!dataDetails.drivingLicenseHomePage">
+				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+				<view class="text">上传行驶证主页</view>
+			</view>
+			<view v-if="dataDetails.drivingLicenseHomePage" @click.stop="uploadImg(1)" class="preview-card-img picture">
+				<view @click.stop="delCard(1)">
+					<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+					</image>
+				</view>
+				<image class="" :src="dataDetails.drivingLicenseHomePage" mode="aspectFit"></image>
+			</view>
+			<view class="title">上传行驶证副页</view>
+			<view @click="uploadImg(4)" class="picture picture4" v-if="!dataDetails.drivingLicenseBackPage">
+				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+				<view class="text">上传行驶证副页</view>
+			</view>
+			<view v-if="dataDetails.drivingLicenseBackPage" @click.stop="uploadImg(1)" class="preview-card-img picture">
+				<view @click.stop="delCard(1)">
+					<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+					</image>
+				</view>
+				<image class="" :src="dataDetails.drivingLicenseBackPage" mode="aspectFit"></image>
+			</view>
+			<view class="flex row flex-space-between">
+				<view class="left-text">行驶证档案编号</view>
+				<u--input placeholder="输入行驶证档案编号" inputAlign='right' border="none"
+					v-model="dataDetails.drivingLicenseNumber">
+				</u--input>
+			</view>
+			
+			<view class="flex row flex-space-between">
+				<view class="left-text">行驶证有效期</view>
+				<view class="" @click="selectValidityPeriod(1)">
+					{{dataDetails.drivingLicenseValidityDate?dataDetails.drivingLicenseValidityDate:'选择有效截止日期>'}}
+				</view>
+			</view>
+			
+			
+			<view class="" v-if="sign == '挂车'">
+				<view class="title">挂车行驶证主页</view>
+				<view @click="uploadImg(5)" class="picture picture5" v-if="!dataDetails.trailerLicenseHomePage">
+					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+					<view class="text">上传挂车行驶证主页</view>
+				</view>
+				<view v-if="dataDetails.trailerLicenseHomePage" @click.stop="uploadImg(1)"
+					class="preview-card-img picture">
+					<view @click.stop="delCard(1)">
+						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+						</image>
+					</view>
+					<image class="" :src="dataDetails.trailerLicenseHomePage" mode="aspectFit"></image>
+				</view>
+			</view>
+			<view v-if="sign == '挂车'">
+				<view class="title">挂车行驶证副页</view>
+				<view @click="uploadImg(6)" class="picture picture6" v-if="!dataDetails.trailerLicenseBackPage">
+					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+					<view class="text">上传挂车行驶证副页</view>
+				</view>
+				<view v-if="dataDetails.trailerLicenseBackPage" @click.stop="uploadImg(1)"
+					class="preview-card-img picture">
+					<view @click.stop="delCard(1)">
+						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+						</image>
+					</view>
+					<image class="" :src="dataDetails.trailerLicenseBackPage" mode="aspectFit"></image>
+				</view>
+			</view>
+			<view class="flex row">
+				<view class="left-text">挂车行驶证档案编号</view>
+				<u--input placeholder="输入挂车行驶证档案编号" inputAlign='right' border="none"
+					v-model="dataDetails.trailerLicenseNumber">
+				</u--input>
+			</view>
+			
+			<view class="flex row flex-space-between" v-if="sign == '挂车'">
+				<view class="left-text">挂车行驶证有效期</view>
+				<view class="" @click="selectValidityPeriod(2)">
+					{{dataDetails.trailerLicenseValidityDate?dataDetails.trailerLicenseValidityDate:'选择有效截止日期>'}}
+				</view>
+			</view>
 		</view>
 		<view class="submit-btn" @click="submit">提交</view>
 		<master-keyboard ref="keyboard" keyboardtype="car" :show="keyShow" :randomNumber="true" :newCar="false"
 			:defaultValue="carNumber" @keyboardClick="handleClick"></master-keyboard>
 		<u-toast ref="uToast"></u-toast>
+		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
+			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
+		</u-action-sheet>
+		<u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
+		</u-picker>
 	</view>
 </template>
 
@@ -110,18 +251,149 @@
 				],
 				carColor: false,
 				carModel: false,
-				fileList1:[]
+				fileList1:[],
+				sign: "挂车",
+				ValidityPeriodType: "",
+				validityPeriod: [],
+				isShowValidity: false,
+				uploadType: '',
+				isShowimgType: false,
 			};
 		},
 		onLoad(options) {
 			_this = this;
 			console.log(options)
 			this.dataDetails = options
+			if(this.dataDetails.carType.indexOf("挂车") != -1){
+				this.sign = "挂车"
+			}else{
+				this.sign = "非挂车"
+				}
 			this.fileList1 = [{
 				url:options.addressUrl
 			}]
+				this.validityPeriod = this.$helper.makeValidityPeriod()
 		},
 		methods: {
+			delCard(type) {
+			switch (type) {
+				case 1:
+					_this.dataDetails.driverLicenseHomePage = ""
+					break;
+				case 2:
+					_this.dataDetails.driverLicenseBackPage = ""
+					break;
+				case 3:
+					_this.dataDetails.drivingLicenseHomePage = ""
+					break;
+				case 4:
+					_this.dataDetails.drivingLicenseBackPage = ""
+					break;
+				case 5:
+					_this.dataDetails.trailerLicenseHomePage = ""
+					break;
+				case 6:
+					_this.dataDetails.trailerLicenseBackPage = ""
+					break;
+				case 7:
+					_this.dataDetails.qualificationCertificate = ""
+					break;
+				case 8:
+					_this.dataDetails.operationCertificate = ""
+					break;
+				case 9:
+					_this.dataDetails.trailerOperationCertificate = ""
+					break;
+			}
+			},
+			uploadImg(type) {
+				this.uploadType = type
+				this.isShowimgType = true
+			},
+			selectValidityPeriod(type) {
+				this.ValidityPeriodType = type
+				this.isShowValidity = true
+			},
+			// 上传图片
+			imgTypeSelect(val) {
+				console.log(val)
+				console.log(this.uploadType)
+				if (val.name == '相册') {
+					uni.chooseImage({
+						count: 1,
+						sourceType: this.$helper.chooseImage.sourceType,
+						success: function(res) {
+							console.log(JSON.stringify(res.tempFilePaths));
+							uploadImage("images", res.tempFilePaths[0], 'appData/',
+								result => {
+									// 上传成功回调函数
+									console.log('图片地址-----', result)
+									switch (_this.uploadType) {
+										case 1:
+											_this.dataDetails.driverLicenseHomePage = result
+											break;
+										case 2:
+											_this.dataDetails.driverLicenseBackPage = result
+											break;
+										case 3:
+											_this.dataDetails.drivingLicenseHomePage = result
+											break;
+										case 4:
+											_this.dataDetails.drivingLicenseBackPage = result
+											break;
+										case 5:
+											_this.dataDetails.trailerLicenseHomePage = result
+											break;
+										case 6:
+											_this.dataDetails.trailerLicenseBackPage = result
+											break;
+										case 7:
+											_this.dataDetails.qualificationCertificate = result
+											break;
+										case 8:
+											_this.dataDetails.operationCertificate = result
+											break;
+										case 9:
+											_this.dataDetails.trailerOperationCertificate = result
+											break;
+									}
+									_this.$forceUpdate()
+								}
+							)
+						}
+					});
+			
+				} else {
+			
+				}
+			},
+			confirmValidityPeriod(e) {
+				console.log('confirm', e)
+				switch (this.ValidityPeriodType) {
+					case 0:
+						this.dataDetails.driverLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						break
+					case 1:
+						this.dataDetails.drivingLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						break
+					case 2:
+						this.dataDetails.trailerLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						break
+					case 3:
+						this.dataDetails.qualificationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
+							.value[2]
+						break
+					case 4:
+						this.dataDetails.operationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[
+							2]
+						break
+					case 5:
+						this.dataDetails.trailerOperationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
+							.value[2]
+						break
+				}
+				this.isShowValidity = false
+			},
 			focus(e){
 				console.log('11111')
 				console.log(e)
@@ -243,14 +515,20 @@
 			submit() {
 				this.$request.baseRequest('post', '/driverCarInfo/api/editInfo', this.dataDetails).then(res => {
 						if (res.code == '200') {
-							let params = {
-								type: 'success',
-								message: "提交成功",
-							}
 							this.$refs.uToast.show({
-								...params
+								type: 'success',
+								message: "提交成功!",
+								complete() {
+									// uni.navigateBack({
+									// 	delta: 1
+									// });
+									uni.$u.route('/pages/mine/manageVehicles/index');
+								}
 							})
-							uni.$u.route('/pages/mine/manageVehicles/index');
+							// this.$refs.uToast.show({
+							// 	...params
+							// })
+							// uni.$u.route('/pages/mine/manageVehicles/index');
 							
 						}else{
 							uni.$u.toast(res.message);
@@ -272,6 +550,7 @@
 		background: white;
 		padding: 0 20rpx;
 		border-radius: 20rpx;
+		padding-bottom: 200rpx;
 
 		.left-text {
 			// background: red;
@@ -285,14 +564,98 @@
 			border-bottom: 1px solid #EEEEEE;
 			padding-bottom: 28rpx;
 			margin-top: 26rpx;
-
+		
 			.ch-style {}
 		}
-
+		
 		.row-ch {
 			padding-right: 250rpx;
 			box-sizing: border-box;
 		}
+		
+		.row {
+			border-bottom: 1px solid #EEEEEE;
+			padding-bottom: 28rpx;
+			margin-top: 26rpx;
+		
+		}
+		
+		.left-text {
+			// background: red;
+			width: 320rpx;
+			color: #333333;
+			display: flex;
+			align-items: center;
+		}
+		
+		.picture {
+			position: relative;
+			width: 100%;
+			height: 440rpx;
+			display: flex;
+			justify-content: center;
+			flex-direction: column;
+			align-items: center;
+		
+			.text {
+				margin-top: 20rpx;
+			}
+		}
+		
+		.picture1 {
+			background: url(../../../static/images/mine/jzz.png);
+			background-size: 100% 100%;
+		}
+		
+		.picture2 {
+			background: url(../../../static/images/mine/jzf.png);
+			background-size: 100% 100%;
+		}
+		
+		.picture3 {
+			background: url(../../../static/images/mine/xsz.png);
+			background-size: 100% 100%;
+		}
+		
+		.picture4 {
+			background: url(../../../static/images/mine/xsf.png);
+			background-size: 100% 100%;
+		}
+		
+		.picture5 {
+			background: url(../../../static/images/mine/gcxsz.png);
+			background-size: 100% 100%;
+		}
+		
+		.picture6 {
+			background: url(../../../static/images/mine/gcxsf.png);
+			background-size: 100% 100%;
+		}
+		
+		.picture7 {
+			background: url(../../../static/images/mine/cy.png);
+			background-size: 100% 100%;
+		}
+		
+		.picture8 {
+			background: url(../../../static/images/mine/cy.png);
+			background-size: 100% 100%;
+		}
+		
+		.picture9 {
+			background: url(../../../static/images/mine/cy.png);
+			background-size: 100% 100%;
+		}
+		
+		.xj-image {
+			width: 100rpx;
+			height: 100rpx;
+		}
+		
+		.title {
+			color: #999999;
+			margin: 20rpx 0;
+		}
 	}
 
 	.input-ckg {
@@ -354,4 +717,12 @@
 		padding: 30rpx 0;
 		border-radius: 50rpx;
 	}
+	.del-card {
+		position: absolute;
+		top: -10rpx;
+		right: -6rpx;
+		width: 80rpx;
+		height: 80rpx;
+		z-index: 9;
+	}
 </style>

+ 1 - 1
pages/mine/manageVehicles/index.vue

@@ -96,7 +96,7 @@
 			},
 			init() {
 				this.$request.baseRequest('get', '/driverCarInfo/selectDriverCar', {
-						driverId: this.userInfo.driverId,
+						driverId: this.firstAuthentication.id,
 						// driverId:this.firstAuthentication.id
 					}).then(res => {
 						if (res.code == '200') {

+ 35 - 3
pages/mine/often/oftenRoute.vue

@@ -16,16 +16,20 @@
 						{{item.unloadArea}}
 					</view>
 				</view>
-
 				<view class="flex btns">
 					<view class="btn_css" @click="addRoute(item)">修改</view>
 					<view class="btn_css" @click="del(item.id)">删除</view>
+					<view  @click="showChane(item)">
+						<!-- <img src="../../static/images/exhibit.png" alt=""> -->
+						<image src="../../../static/images/riders/exhibit.png" mode="" v-if="item.displayFlag == 1"
+						style="width: 40rpx;height: 40rpx;margin:14rpx 0 0 20rpx;"></image>
+						<image src="../../../static/images/riders/hide.png" mode="" v-else
+						style="width: 40rpx;height: 40rpx;margin:14rpx 0 0 20rpx;"></image>
+					</view>
 				</view>
 			</view>
 			<u-loadmore :status="status"  :nomore-text="nomoreText" />
 		</view>
-
-
 		<u-toast ref="uToast"></u-toast>
 		<view class="bottom_add">
 			<view class="add_btn" @click="addRoute(1)">添加常用路线</view>
@@ -88,6 +92,34 @@
 						uni.$u.toast(res.message);
 					});
 			},
+			showChane(item){
+				console.log(item)
+				if(item.displayFlag == 1){
+					item.displayFlag = 2
+				}else{
+					item.displayFlag = 1
+				} 
+				this.$request.baseRequest('post', '/commonRoute/api/edit', item).then(res => {
+						if (res.code == 200) {
+							if(item.displayFlag == 1){
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "路线展示中!",
+									
+								})
+							}else{
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "路线已隐藏!",
+									
+								})
+							}
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
 			addRoute(item) {
 				if (item == 1 && this.routeData.length == 50) {
 					this.$refs.uToast.show({

+ 8 - 1
pages/order/signContract.vue

@@ -67,7 +67,14 @@
 			<view class='row-between'>
 				<view class="gray">挂车号(选填)</view>
 				<view class="flex">
-					<u--input placeholder="请输入挂车号" border="none" v-model="dataDetails.trailerNumber" inputAlign='right'
+					<u--input placeholder="请输入挂车号" border="none" v-model="dataDetails.weight" inputAlign='right'
+						clearable></u--input>
+				</view>
+			</view>
+			<view class='row-between'>
+				<view class="gray">装车净重</view>
+				<view class="flex">
+					<u--input placeholder="请输入装车净重" border="none" v-model="dataDetails.trailerNumber" inputAlign='right'
 						clearable></u--input>
 				</view>
 			</view>

BIN
static/images/riders/exhibit.png


BIN
static/images/riders/hide.png