zhongtianhaoyuan 2 年之前
父節點
當前提交
f45ac2799b

+ 6 - 1
pages.json

@@ -454,7 +454,12 @@
 					}
 				}
 			}
-			
+		},{
+			"path": "pages/mine/fleet/fleetBill",
+			"style": {
+				"navigationBarTitleText": "账单",
+				"enablePullDownRefresh": false
+			}
 		},{
 			"path": "pages/mine/fleet/carCaptainAuthentication",
 			"style": {

+ 22 - 9
pages/mine/fleet/addBinding.vue

@@ -4,12 +4,14 @@
 		<view class="form_data">
 			<view class="flex row">
 				<view class="left-text">车队长名字</view>
-				<u--input placeholder="请输入车队长名字" inputAlign='right' border="none" v-model="fleet.name" maxlength="6">
+				<u--input placeholder="请输入车队长姓名" inputAlign='right' border="none" v-model="fleet.carCaptainName"
+					maxlength="6">
 				</u--input>
 			</view>
 			<view class="flex row">
 				<view class="left-text">车队长账号</view>
-				<u--input placeholder="请输入车队长账号" inputAlign='right' border="none" v-model="fleet.name" maxlength="11">
+				<u--input placeholder="请输入车队长账号" inputAlign='right' border="none"
+					v-model="fleet.carCaptainAccountNumber" maxlength="11">
 				</u--input>
 			</view>
 		</view>
@@ -18,16 +20,20 @@
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="tipsShow" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
-			confirmColor='#2772FB' @confirm="$u.throttle(confirmClick, 5000)" @close="cancelClick" @cancel="cancelClick"></u-modal>
+			confirmColor='#2772FB' @confirm="$u.throttle(confirmClick, 5000)" @close="cancelClick"
+			@cancel="cancelClick"></u-modal>
 	</view>
 </template>
 <script>
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
 				fleet: {},
-				tipsShow:false,
-				alertTitle:"确定绑定后请及时联系车队长接受绑定,避免造成您的财产损失"
+				tipsShow: false,
+				alertTitle: "确定绑定后请及时联系车队长接受绑定,避免造成您的财产损失"
 			}
 		},
 		onLoad() {
@@ -35,18 +41,25 @@
 		},
 		onShow() {
 
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication']),
 		},
 		methods: {
-			submit(){
+			submit() {
 				this.tipsShow = true
 			},
 			confirmClick() {
-				this.tipsShow =false
+				this.tipsShow = false
 				uni.showLoading({
 					mask: true,
 					title: '加载中'
 				})
-				this.$request.baseRequest('post', '', this.dataDetails).then(res => {
+				this.fleet.commonId = this.userInfo.id
+				this.fleet.driverName = this.firstAuthentication.driverName
+				this.fleet.accountNumber = this.userInfo.phone
+				this.$request.baseRequest('post', '/hyBindCarCaptainInfo/api/binding;', this.fleet).then(res => {
+						debugger
 						if (res.code == 200) {
 							uni.hideLoading()
 							this.$refs.uToast.show({
@@ -69,7 +82,7 @@
 					});
 			}
 		},
-		cancelClick(){
+		cancelClick() {
 			this.tipsShow = false
 		}
 	}

+ 28 - 10
pages/mine/fleet/bindingCarCaptain.vue

@@ -2,14 +2,15 @@
 <template>
 	<view class="center">
 		<view class="fleetInfo">
-			<view class="fleetInfo_name">{{fleetInfo.name}}({{fleetInfo.phone}})</view>
-			<view class="fleetInfo_phone">{{fleetInfo.status}}</view>
+			<view class="fleetInfo_name" v-if="fleetInfo.name">{{fleetInfo.name}}({{fleetInfo.phone}})</view>
+			<view class="fleetInfo_name" v-else>队长名称</view>
+			<view class="fleetInfo_phone">{{fleetInfo.status?fleetInfo.status:"未绑定"}}</view>
 		</view>
 		<view class="btn_css">
-			<view class="btn_item">
+			<view class="btn_item" v-if="!fleetInfo.name">
 				<u-button type="primary" text="去绑定" @click="operation"></u-button>
 			</view>
-			<view class="btn_item">
+			<view class="btn_item" v-else>
 				<u-button type="primary" text="解绑" @click="leave"></u-button>
 			</view>
 			
@@ -21,14 +22,13 @@
 </template>
 
 <script>
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
-				fleetInfo:{
-					name:"张三",
-					phone:"1301111111111",
-					status:"待确定"
-				},
+				fleetInfo:{},
 				tipsShow:false,
 				alertTitle:"确定解绑车队长?"
 			}
@@ -38,6 +38,9 @@
 		},
 		onShow() {
 
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
 			operation(){
@@ -82,7 +85,22 @@
 					});
 			},
 			getInfo(){
-				
+				this.$request.baseRequest('get', '/hyBindCarCaptainInfo/getBindCarCaptain', {
+					commonId:this.userInfo.id
+				}).then(res => {
+					debugger
+						if (res.code == 200) {
+							if(res.data){
+								this.fleetInfo = res.data
+							}
+						} else {
+							uni.$u.toast(res.message);
+						}
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.$u.toast(res.message);
+					});
 			},
 		}
 	}

+ 335 - 275
pages/mine/fleet/carCaptainAuthentication.vue

@@ -8,8 +8,7 @@
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
 					<view class="text">上传身份证人像面</view>
 				</view>
-				<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(1,1)"
-					class="preview-card-img picture">
+				<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(1,1)" class="preview-card-img picture">
 					<view @click.stop="delCard(1)">
 						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
 						</image>
@@ -32,68 +31,79 @@
 				</view>
 				<view class="flex row">
 					<view class="left-text">姓名</view>
-					<u--input placeholder="输入姓名" inputAlign='right' border="none" v-model="dataDetails.driverName">
+					<u--input placeholder="输入姓名" inputAlign='right' border="none" v-model="dataDetails.name">
 					</u--input>
 				</view>
 				<view class="flex row">
 					<view class="left-text">身份证号</view>
-					<u--input disabled placeholder="请输入身份证号" inputAlign='right' border="none" v-model="dataDetails.numberCard" maxlength="18">
+					<u--input disabled placeholder="请输入身份证号" inputAlign='right' border="none"
+						v-model="dataDetails.idCard" maxlength="18">
 					</u--input>
 				</view>
 
 				<view class="flex row flex-space-between">
 					<view class="left-text">身份证有效期</view>
-					<view class="" @click="selectValidityPeriod">
-						{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证截止日期>'}}
+					<!-- <view class="" @click="selectValidityPeriod(1)">
+						{{dataDetails.cardValidityStartDate?dataDetails.cardValidityStartDate:"选择身份证起始日期>"}}
+						{{dataDetails.cardValidityEndDate?dataDetails.cardValidityEndDate:'选择身份证截止日期>'}}
+					</view> -->
+					<view style='font-size:14px;' class="" @click="selectValidityPeriod(3)">
+						{{dataDetails.cardValidityStartDate?dataDetails.cardValidityStartDate:'起始时间'}}
+					</view>
+					<view>~</view>
+					<view style='font-size:14px;' class="" @click="selectValidityPeriod(1)">
+						{{dataDetails.cardValidityEndDate?dataDetails.cardValidityEndDate:'结束时间'}}
 					</view>
 				</view>
 			</view>
-			<view class="content3 flex s-row" v-for="(item,index) in dataDetails.hyDriverPayeeInfoList" :key='index'>
-				<view class="flex">
+			<!-- v-for="(item,index) in dataDetails.hyDriverPayeeInfoList" :key='index' -->
+			<view class="content3 flex s-row">
+				<!-- 	<view class="flex">
 					银行卡-{{index+1}}
-				</view>
-				<view @click="delBankNumber(dataDetails.hyDriverPayeeInfoList,index)" class="" v-if="index!=0">
+				</view> -->
+				<!-- <view class="">
 					<image class='del-bank' src="@/static/images/common/quxiao@2x.png">
 					</image>
-				</view>
+				</view> -->
 				<view class="title">上传银行卡卡号页</view>
-				<view @click="uploadImg(3,index)" class="picture picture3" v-if="!item.payeeAddressUrl">
+				<view @click="uploadImg(3)" class="picture picture3" v-if="!dataDetails.payeeAddressUrl">
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
 					<view class="text">上传银行卡卡号页</view>
 				</view>
-			
-				<view v-if="item.payeeAddressUrl" @click.stop="uploadImg(3,index)" class="preview-card-img picture">
+
+				<view v-if="dataDetails.payeeAddressUrl" @click.stop="uploadImg(3)" class="preview-card-img picture">
 					<!-- <image class="card-img" :src="dataDetails.cardAddressUrl"></image> -->
 					<view @click.stop="delCard(3)">
 						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
 						</image>
 					</view>
-					<image class="" :src="item.payeeAddressUrl" mode="aspectFit"></image>
+					<image class="" :src="dataDetails.payeeAddressUrl" mode="aspectFit"></image>
 				</view>
 				<view class="flex row flex-space-between">
 					<view class="left-text">银行卡卡号</view>
 					<view class="flex">
-						<u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="item.bankCard" maxlength="19">
+						<u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="dataDetails.bankCard"
+							maxlength="19">
 						</u--input>
 					</view>
 				</view>
 				<view class="flex row">
 					<view class="left-text">开户行</view>
-					<u--input placeholder="输入开户行" inputAlign='right' border="none" v-model="item.bankDeposit">
+					<u--input placeholder="输入开户行" inputAlign='right' border="none" v-model="dataDetails.bankDeposit">
 					</u--input>
 				</view>
 				<view class="flex row">
 					<view class="left-text khzh-styel">开户支行</view>
 					<view class="flex" v-if="isShowManualInput">
 						<u--input class="select-bankzh" placeholder="输入开户支行" inputAlign='right' border="none"
-							v-model="item.bankDepositBranch">
+							v-model="dataDetails.bankDepositBranch">
 						</u--input>
-						<view @click="manualInput(index)" class="type">选择支行</view>
+						<view @click="manualInput" class="type">选择支行</view>
 					</view>
 					<view class="flex align-center" v-if="!isShowManualInput">
-						<view 
-						 :style="{'color':item.bankDepositBranch?'#000':'#C6CBD5'}" style='font-size:15px;text-align:right;' class="select-bankzh point" @click="selectZhbank">
-							{{item.bankDepositBranch?item.bankDepositBranch:'选择开户支行'}}
+						<view :style="{'color':dataDetails.bankDepositBranch?'#000':'#C6CBD5'}"
+							style='font-size:15px;text-align:right;' class="select-bankzh point" @click="selectZhbank">
+							{{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
 						</view>
 						<view @click="manualInput" class="type">手动输入</view>
 					</view>
@@ -101,39 +111,43 @@
 				<view class="flex row flex-space-between">
 					<view class="left-text">收款人</view>
 					<view class="flex">
-						<u--input placeholder="自动获取,不可编辑" inputAlign='right' border="none" v-model="item.payeeName" readonly>
+						<u--input placeholder="自动获取,不可编辑" inputAlign='right' border="none"
+							v-model="dataDetails.payeeName" readonly>
 						</u--input>
 					</view>
 				</view>
-				<u-picker :show="isShowBank" :columns="bankType[index]" :closeOnClickOverlay='true' @close='zhBankClose'
+				<u-picker :show="isShowBank" :columns="bankType[0]" :closeOnClickOverlay='true' @close='zhBankClose'
 					@cancel='zhBankClose' @confirm='confirmBank'></u-picker>
 				</u-picker>
 			</view>
 			<view class="content3 flex s-row">
 				<view class="title">道路运输许可证</view>
-				<view @click="uploadImg(4)" class="picture picture8" v-if="!dataDetails.operationCertificate">
+				<view @click="uploadImg(4)" class="picture picture8" v-if="!dataDetails.roadTransportOperationLicense">
 					<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(4)" class="preview-card-img picture">
+				<view v-if="dataDetails.roadTransportOperationLicense" @click.stop="uploadImg(4)"
+					class="preview-card-img picture">
 					<view @click.stop="delCard(4)">
 						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
 						</image>
 					</view>
-					<image class="" :src="dataDetails.operationCertificate" mode="aspectFit"></image>
+					<image class="" :src="dataDetails.roadTransportOperationLicense" mode="aspectFit"></image>
 				</view>
 				<view class="flex row">
 					<view class="left-text">许可证编号</view>
-					<u--input maxlength='12' placeholder="输入许可证编号" inputAlign='right' border="none"
-						v-model="dataDetails.operationCertificateNumber">
+					<u--input maxlength='20' placeholder="输入许可证编号" inputAlign='right' border="none"
+						v-model="dataDetails.roadTransportOperationLicenseNo">
 					</u--input>
 				</view>
 				<view class="flex row flex-space-between">
 					<view class="left-text">许可证有效期</view>
-					<view class="" @click="selectValidityPeriod(4)">
-						<view :style="{'color':dataDetails.operationCertificateValidityDate?'#000':'rgb(192, 196, 204)'}">
-							{{dataDetails.operationCertificateValidityDate?dataDetails.operationCertificateValidityDate:'选择有效期'}}
-							<image v-if='!dataDetails.operationCertificateValidityDate' style='width:12px;height:12px;' src="../../../static/right.png" mode=""></image>
+					<view class="" @click="selectValidityPeriod(2)">
+						<view
+							:style="{'color':dataDetails.roadTransportOperationLicenseValidityDate?'#000':'rgb(192, 196, 204)'}">
+							{{dataDetails.roadTransportOperationLicenseValidityDate?dataDetails.roadTransportOperationLicenseValidityDate:'选择有效期'}}
+							<image v-if='!dataDetails.roadTransportOperationLicenseValidityDate'
+								style='width:12px;height:12px;' src="../../../static/right.png" mode=""></image>
 						</view>
 					</view>
 				</view>
@@ -142,15 +156,23 @@
 				@confirm="confirmValidityPeriod" @change="changeHandler" @cancel='isShowcardValidity= false'>
 			</u-picker>
 			<itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="status" :periodOfValidity="true"
-			 :checkYear="year" :checkMonth="month" :checkDay="day"
-			 ref="dateEl" :startYear="1999"  :futureYear="30" 
-			 @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+				:checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl" :startYear="1999" :futureYear="30"
+				@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+			<itmister-date-picker :overdueContent="'许可证已过期'" :dateStatus="status" :periodOfValidity="true"
+				:checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl1" :startYear="1999" :futureYear="30"
+				@dateConfirm="confirmValidityPeriod1"></itmister-date-picker>
+			<itmister-date-picker :dateStatus="0" :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl2"
+				:startYear="1980" :futureYear="30" @dateConfirm="confirmValidityPeriod2">
+			</itmister-date-picker>
 			<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 				@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
 				@close="isShowimgType=false">
 			</u-action-sheet>
 			<u-toast ref="uToast"></u-toast>
 		</view>
+		<u-modal :show="auditShow" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
+			confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
+		<u-toast ref="uToast"></u-toast>
 		<view class="content4">
 			<view class="next-btn" @click="next()">提交</view>
 		</view>
@@ -171,90 +193,64 @@
 		},
 		data() {
 			return {
-				canvasSiz: {
-					width: 188,
-					height: 273
-				},
-				status:1,
-				tips: '',
-				// refCode: null,
+				status: 1,
 				seconds: 30,
-				year:'',
-				month:'',
-				day:'',
-				radiolist1: [{
-						name: '男',
-						disabled: false
-					},
-					{
-						name: '女',
-						disabled: false
-					},
-
-				],
+				year: '',
+				month: '',
+				day: '',
 				validityPeriod: [],
 				isShowcardValidity: false,
 				uploadType: '',
 				isShowimgType: false,
 				dataDetails: {
 					commonId: '',
-					driverName: '',
-					driverSex: '',
-					driverCall: '',
-					driverPhone: '',
-					numberCard: '',
+					name: '',
+					idCard: '',
 					cardAddressUrl: '',
 					cardBackAddressUrl: '',
-					cardValidityDate: '',
-					driverType: '',
-					driverLicenseHomePage: '',
-					driverLicenseBackPage: '',
-					driverLicenseValidityDate: '',
-					drivingLicenseHomePage: '',
-					drivingLicenseBackPage: '',
-					drivingLicenseValidityDate: '',
-					trailerLicenseHomePage: '',
-					trailerLicenseBackPage: '',
-					trailerLicenseValidityDate: '',
-					qualificationCertificate: '',
-					qualificationCertificateValidityDate: '',
-					operationCertificate: '',
-					operationCertificateValidityDate: '',
-					trailerOperationCertificate: '',
-					trailerOperationCertificateValidityDate: '',
-					hyDriverPayeeInfoList: [{
-						payeeAddressUrl: '',
-						bankCard: '',
-						bankDeposit: '',
-						bankDepositBranch: '',
-						payeeName: '',
-					}],
-
+					cardValidityEndDate: '',
+					roadTransportOperationLicense: '',
+					roadTransportOperationLicenseValidityDate: "",
 				},
 				action: this.$helper.ossUploadUrl,
 				// maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				// isAdd: true,
 				imagesrc: null,
-				isShowBank:false,
+				isShowBank: false,
 				isShowManualInput: false,
 				bankType: [],
+				auditShow: false,
+				alertTitle: "",
+				checkType:"",
 			};
 		},
-		onLoad() {
+		onLoad(options) {
 			_this = this;
-			console.log(this.userInfo)
 			this.get_camera_permission()
-			// this.dataDetails.driverPhone = this.userInfo.phone
-			this.dataDetails.commonId = this.userInfo.id
-			//获取认证状态
-			this.getAuthenticationStatus()
+			if (options.data) { //编辑
+				this.dataDetails = JSON.parse(options.data)
+				this.checkType = "2" //编辑
+			} else {
+				//获取认证状态
+				this.getAuthenticationStatus()
+				this.dataDetails.commonId = this.userInfo.id
+				this.checkType = "1" //新增
+			}
+
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			cancelClick() {
+				this.auditShow = false
+			},
+			next() {
+				if (this.validate()) return
+				this.alertTitle = "确定提交认证信息?"
+				this.auditShow = true
+			},
 			confirmBank(e) {
-				console.log(e)
 				this.dataDetails.hyDriverPayeeInfoList[this.index].bankDepositBranch = e.value[0]
 				this.isShowBank = false
 			},
@@ -270,20 +266,20 @@
 					})
 					return true
 				}
-			
+
 				this.isShowBank = true
 			},
 			manualInput(val) {
 				this.index = val
 				if (this.isShowManualInput) {
-					if (!this.dataDetails.hyDriverPayeeInfoList[this.index].payeeAddressUrl) {
+					if (!this.dataDetails.payeeAddressUrl) {
 						this.$refs.uToast.show({
 							type: 'error',
 							message: "请先上传银行卡!",
 						})
 						return true
-					} else if (this.dataDetails.hyDriverPayeeInfoList[this.index].payeeAddressUrl && uni.$u.test.isEmpty(
-							this.bankType[this.index])) {
+					} else if (this.dataDetails.payeeAddressUrl && uni.$u.test.isEmpty(
+							this.bankType[0])) {
 						this.$refs.uToast.show({
 							type: 'error',
 							message: "请选择手动输入开户支行!",
@@ -297,20 +293,20 @@
 				this.isShowManualInput = !this.isShowManualInput
 			},
 			async get_camera_permission() {
-				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
-				if(photol == false){
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
 					uni.showModal({
 						title: '提示',
 						content: '您已经关闭相册权限,去设置',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 								permision.gotoAppPermissionSetting()
-									            // plus.runtime.openURL("app-settings:");
+								// plus.runtime.openURL("app-settings:");
 							} else if (res.cancel) {
 								console.log('用户点击取消');
 							}
 						}
-					});	
+					});
 				}
 			},
 			changeHandler(e) {
@@ -333,9 +329,6 @@
 				// 	}
 				// }
 			},
-			codeChange(text) {
-				this.tips = text;
-			},
 			getCode() {
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.dataDetails.driverPhone)) {
 					if (this.$refs.uCode.canGetCode) {
@@ -374,34 +367,25 @@
 			start() {
 				// uni.$u.toast('倒计时开始');
 			},
-
-			// 性别切换
-			radioChange(n) {
-				console.log('radioChange', n);
-				this.dataDetails.driverSex = n
-			},
 			//判断是否是初次认证
 			getAuthenticationStatus() {
 				this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
 						driverPhone: this.userInfo.phone,
 					}).then(res => {
 						if (res.code == 200) {
-							this.dataDetails = res.data
-							// this.dataDetails.hyDriverPayeeInfoList = [{
-							// 	payeeAddressUrl: '',
-							// 	bankCard: '',
-							// 	bankDeposit: '',
-							// 	bankDepositBranch: '',
-							// 	payeeName: '',
-							// }]
-							// this.dataDetails.driverName = res.data.driverName
-							// this.dataDetails.driverSex = res.data.driverSex
-							// this.dataDetails.driverCall = res.data.driverCall
-							// this.dataDetails.driverPhone = res.data.driverPhone
-							// this.dataDetails.cardAddressUrl = res.data.cardAddressUrl
-							// this.dataDetails.cardBackAddressUrl = res.data.cardBackAddressUrl
-							// this.dataDetails.numberCard = res.data.numberCard
-							// this.dataDetails.cardValidityDate = res.data.cardValidityDate
+							// this.dataDetails = res.data
+							this.dataDetails.accountNumber = res.data.accountNumber
+							this.dataDetails.cardAddressUrl = res.data.cardAddressUrl
+							this.dataDetails.cardBackAddressUrl = res.data.cardBackAddressUrl
+							this.dataDetails.name = res.data.driverName
+							this.dataDetails.idCard = res.data.numberCard
+							this.dataDetails.cardValidityStartDate = res.data.cardValidityStartDate
+							this.dataDetails.cardValidityEndDate = res.data.cardValidityDate
+							this.dataDetails.payeeAddressUrl = res.data.hyDriverPayeeInfoList[0].payeeAddressUrl
+							this.dataDetails.bankCard = res.data.hyDriverPayeeInfoList[0].bankCard
+							this.dataDetails.bankDeposit = res.data.hyDriverPayeeInfoList[0].bankDeposit
+							this.dataDetails.bankDepositBranch = res.data.hyDriverPayeeInfoList[0].bankDepositBranch
+							this.dataDetails.payeeName = res.data.hyDriverPayeeInfoList[0].payeeName
 						}
 					})
 					.catch(res => {
@@ -409,22 +393,37 @@
 					});
 			},
 			confirmValidityPeriod(date) {
-				console.log('confirm', date)
-				this.dataDetails.cardValidityDate = date.date
+				this.dataDetails.cardValidityEndDate = date.date
 			},
-			selectValidityPeriod() {
-				if(this.dataDetails.cardValidityDate!='长期'){
-					var arr=this.dataDetails.cardValidityDate.split('-')
-					this.year=arr[0]
-					this.month=arr[1]
-					this.day=arr[2]
-				}
-				if(this.dataDetails.cardValidityDate=='长期'){
-					this.year='长期'
-					this.month=''
-					this.day=''
+			confirmValidityPeriod1(date) {
+				this.dataDetails.roadTransportOperationLicenseValidityDate = date.date
+				this.$forceUpdate()
+			},
+			confirmValidityPeriod2(date) {
+				debugger
+				this.dataDetails.cardValidityStartDate = date.date
+				this.$forceUpdate()
+			},
+
+			selectValidityPeriod(num) {
+				if (num == 1) {
+					if (this.dataDetails.cardValidityEndDate && this.dataDetails.cardValidityEndDate != '长期') {
+						var arr = this.dataDetails.cardValidityEndDate.split('-')
+						this.year = arr[0]
+						this.month = arr[1]
+						this.day = arr[2]
+					}
+					if (this.dataDetails.cardValidityEndDate == '长期') {
+						this.year = '长期'
+						this.month = ''
+						this.day = ''
+					}
+					this.$refs.dateEl.show()
+				} else if (num == 2) {
+					this.$refs.dateEl1.show()
+				} else if (num == 3) {
+					this.$refs.dateEl2.show()
 				}
-				this.$refs.dateEl.show()
 			},
 			//设置图片
 			setImage(e) {
@@ -459,14 +458,25 @@
 
 			},
 			delCard(type) {
-				var _this=this
+				var _this = this
 				switch (type) {
 					case 1:
 						_this.dataDetails.cardAddressUrl = ""
 						break;
+
 					case 2:
 						_this.dataDetails.cardBackAddressUrl = ""
 						break;
+					case 3:
+						_this.dataDetails.payeeAddressUrl = ""
+						_this.dataDetails.bankCard = ""
+						_this.dataDetails.bankDeposit = ""
+						_this.dataDetails.bankDepositBranch = ""
+						_this.$forceUpdate()
+						break;
+					case 4:
+						_this.dataDetails.roadTransportOperationLicense = ""
+						break;
 				}
 			},
 			// 上传图片
@@ -474,58 +484,64 @@
 				// 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('image',res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功回调函数
-									console.log('图片地址', result)
-									switch (_this.uploadType) {
-										// 身份正面
-										case 1:
-											_this.dataDetails.cardAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get',
-													'/driverInfo/personShibie', {
-														personImg: result,
-														flag:1
-													}).then(res => {
-													if(res.data){
-														_this.dataDetails.cardAddress=res.data.recPersonAddr
-														// _this.dataDetails.numberCard = res.data.recPersonNo
-														if (res.data.recPerson) {
-															_this.dataDetails.driverName = res.data.recPerson
-															_this.dataDetails.driverCall = res.data.recPerson.substring(0,1)
-														}
-														_this.dataDetails.driverBirthday=res.data.recPersonBrithday
-													}
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											break
-											// 身份反面
-										case 2:
-											_this.dataDetails.cardBackAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get',
-													'/driverInfo/personShibie', {
-														personImg: result,
-														flag:2
-													}).then(res => {
-													if(res.data.idCardValidity){
-														let date = res.data.idCardValidity.split("-")[1]
-													    _this.dataDetails.cardValidityDate = date.replace('.', '-').replace('.', '-')
+				uni.chooseImage({
+					count: 1,
+					// sourceType: this.$helper.chooseImage.sourceType,
+					success: function(res) {
+						console.log(JSON.stringify(res.tempFilePaths));
+						uploadImage('image', res.tempFilePaths[0], 'appData/',
+							result => {
+								// 上传成功回调函数
+								console.log('图片地址', result)
+								switch (_this.uploadType) {
+									// 身份正面
+									case 1:
+										_this.dataDetails.cardAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get',
+												'/driverInfo/personShibie', {
+													personImg: result,
+													flag: 1
+												}).then(res => {
+												if (res.data) {
+													_this.dataDetails.cardAddress = res.data
+														.recPersonAddr
+													_this.dataDetails.idCard = res.data.recPersonNo
+													if (res.data.recPerson) {
+														_this.dataDetails.name = res.data
+															.recPerson
+														// _this.dataDetails.driverCall = res.data
+														// 	.recPerson.substring(0, 1)
 													}
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											break
-										case 3:
+													_this.dataDetails.driverBirthday = res.data
+														.recPersonBrithday
+												}
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break
+										// 身份反面
+									case 2:
+										_this.dataDetails.cardBackAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get',
+												'/driverInfo/personShibie', {
+													personImg: result,
+													flag: 2
+												}).then(res => {
+												if (res.data.idCardValidity) {
+													let date = res.data.idCardValidity.split("-")[1]
+													_this.dataDetails.cardValidityEndDate = date
+														.replace(
+															'.', '-').replace('.', '-')
+												}
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break
+									case 3:
 										_this.bankType[_this.index] = []
 										_this.$request.baseRequest('get',
 												'/driverInfo/bankShibie', {
@@ -536,7 +552,8 @@
 												if (res.data) {
 													if (res.data.bankNo) {
 														_this.dataDetails.hyDriverPayeeInfoList[_this
-															.index].bankCard = res.data.bankNo.replace(/\s*/g,"")
+																.index].bankCard = res.data.bankNo
+															.replace(/\s*/g, "")
 													}
 													if (res.data.bankName) {
 														_this.dataDetails.hyDriverPayeeInfoList[_this
@@ -553,130 +570,167 @@
 											.catch(res => {
 												uni.$u.toast(res.message);
 											});
-											break;
-											case 4:
-											_this.dataDetails.cardBackAddressUrl = result
-											
-											break;
-									}
+										break;
+									case 4:
+										_this.dataDetails.roadTransportOperationLicense = result
+										_this.$forceUpdate()
+										break;
 								}
-							)
-						}
-					});
-
-				// } else {
-				// 	switch (this.uploadType) {
-				// 		case 0:
-				// 			break
-				// 		case 1:
-				// 			uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=idcardface');
-				// 			console.log('身份正面')
-				// 			break
-				// 		case 2:
-				// 			uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=badge');
-				// 			console.log('身份反面')
-				// 			break
-				// 		case 3:
-				// 			break
-				// 		case 4:
-				// 	}
-				// }
-
-			},
-			next(val) {
-				if (this.validate()) return
-				uni.$u.route('/pages/mine/editDriverCertificationNext', {
-					data: JSON.stringify(this.dataDetails),
+							}
+						)
+					}
 				});
 			},
+			confirmClick(val) {
+				this.auditShow = false
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				})
+				debugger
+				console.log(this.checkType)
+				if (this.checkType == 1) {
+					this.$request.baseRequest('post', '/hyCarCaptainInfo/api/addCarCaptain', this.dataDetails).then(
+						res => {
+							if (res.code == 200) {
+								uni.hideLoading()
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "提交成功,待平台审核!",
+									complete() {
+										uni.navigateBack({
+											delta: 1
+										});
+									}
+								})
+								// uni.$u.route('/pages/mine/index');
+							} else {
+								uni.hideLoading()
+								uni.$u.toast(res.message);
+							}
+						}).catch(res => {
+						uni.$u.toast(res.message);
+					});
+				} else if (this.checkType == 2) {
+					this.$request.baseRequest('post', '/hyCarCaptainInfo/api/editCarCaptain', this.dataDetails).then(
+						res => {
+							if (res.code == 200) {
+								uni.hideLoading()
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "修改成功,待平台审核!",
+									complete() {
+										uni.navigateBack({
+											delta: 1
+										});
+									}
+								})
+							} else {
+								uni.hideLoading()
+								uni.$u.toast(res.message);
+							}
+						}).catch(res => {
+						uni.$u.toast(res.message);
+					});
+				}
+			},
 			validate() {
 				// true 为校验不通过
-				if (uni.$u.test.isEmpty(this.dataDetails.driverName)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.cardAddressUrl)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "司机姓名不能为空!",
+						message: "身份证人像页不能为空!",
 					})
 					return true
 				}
-				
-				if (!uni.$u.test.chinese(this.dataDetails.driverName)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.cardBackAddressUrl)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "姓名为汉字!",
+						message: "身份证国徽页不能为空!",
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.driverCall)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.name)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "司机称呼不能为空!",
+						message: "姓名不能为空!",
 					})
 					return true
 				}
-				if (!uni.$u.test.chinese(this.dataDetails.driverCall)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.idCard)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "称呼为汉字!",
+						message: "身份证号不能为空!",
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.driverPhone)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.cardValidityStartDate)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "联系电话不能为空!",
+						message: "身份证起始日期不能为空!",
 					})
 					return true
 				}
-				if (!uni.$u.test.mobile(this.dataDetails.driverPhone)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.cardValidityEndDate)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "电话号码格式错误!",
+						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.cardAddressUrl)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "身份证人像页不能为空!",
+						message: "请上传银行卡卡号页!",
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.cardBackAddressUrl)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.bankCard)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "身份证国徽页不能为空!",
+						message: "银行卡卡号不能为空!",
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.cardValidityDate)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.bankDeposit)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "身份证人有效截止日期不能为空!",
+						message: "开户行不能为空!",
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.cardAddress)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.bankDepositBranch)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "身份证地址为空!",
+						message: "开户支行不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.payeeName)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "收款人不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicense)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "道路运输许可证不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicenseNo)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "许可证编号不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicenseValidityDate)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "许可证有效期不能为空!",
 					})
 					return true
 				}
@@ -919,6 +973,7 @@
 		justify-content: center;
 		background: white;
 		padding: 40rpx 20rpx 50rpx 20rpx;
+
 		.next-btn {
 			background: rgb(39, 114, 251);
 			width: 90%;
@@ -953,20 +1008,25 @@
 		height: 80rpx;
 		z-index: 9;
 	}
-	/deep/.u-radio{
-		margin-left:10px;
+
+	/deep/.u-radio {
+		margin-left: 10px;
 	}
+
 	/deep/.uni-input-input:disabled {
 		background: #fff;
 	}
+
 	/deep/.u-radio-group--row {
-	    justify-content: flex-end;
+		justify-content: flex-end;
 	}
-	/deep/.u-textarea{
-		padding:9px 0;
+
+	/deep/.u-textarea {
+		padding: 9px 0;
 	}
-	/deep/.u-textarea__field{
-		color:#000;
-		text-align:right;
+
+	/deep/.u-textarea__field {
+		color: #000;
+		text-align: right;
 	}
 </style>

+ 192 - 51
pages/mine/fleet/fleetManage.vue

@@ -3,33 +3,51 @@
 	<view class="center">
 		<view class="fleetInfo">
 			<view class="fleetInfo_name">队长身份</view>
-			<view class="fleetInfo_phone">{{fleetInfo.status}}</view>
+			<view class="fleetInfo_phone" v-if="fleetInfo.status">{{fleetInfo.status}}</view>
+			<view class="fleetInfo_phone" v-else>去认证</view>
 		</view>
 		<view class="btn_css">
-			<view class="btn_item">
-				<u-button type="primary" text="去认证" @click="operation"></u-button>
+			<view class="btn_item" v-if="!fleetInfo">
+				<u-button type="primary" text="去认证" @click="operation(1)"></u-button>
 			</view>
-			<view class="btn_item">
-				<u-button type="primary" text="编辑" @click="operation"></u-button>
+			<view class="btn_item" v-else>
+				<u-button type="primary" text="编辑" @click="operation(2)"></u-button>
+			</view>
+		</view>
+		<u-divider></u-divider>
+		<view class="list_css" v-for="(item,index) in formList">
+			<view class="list_left">{{item.driverName}}({{item.accountNumber}})</view>
+			<view class="list_right">
+				<view class="list_text" v-if="item.status == '待确认'" @click="audit(item,1)">拒绝</view>
+				<view class="list_text" v-if="item.status == '待确认'" @click="audit(item,2)">接受</view>
+				<view class="list_text" v-if="item.status == '已绑定'">{{item.status}}</view>
+				<view class="list_text"
+					v-if="item.status == '已绑定'||item.status == '已解绑'||item.status == '已接受'||item.status == '已拒绝'"
+					@click="next(item)">删除</view>
 			</view>
-			
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="tipsShow" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
-			confirmColor='#2772FB' @confirm="$u.throttle(confirmClick, 5000)" @close="cancelClick" @cancel="cancelClick"></u-modal>
+			confirmColor='#2772FB' @confirm="$u.throttle(confirmClick, 5000)" @close="cancelClick"
+			@cancel="cancelClick"></u-modal>
+
 	</view>
 </template>
 
 <script>
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
-				fleetInfo:{
-					phone:"1301111111111",
-					status:"审核中"
-				},
-				tipsShow:false,
-				alertTitle:"确定解绑车队长?"
+				fleetInfo: {},
+				tipsShow: false,
+				alertTitle: "",
+				formList: [],
+				distinguish: "",
+				id: "",
+				sign:"",
 			}
 		},
 		onLoad() {
@@ -37,82 +55,205 @@
 		},
 		onShow() {
 
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
 		},
 		onNavigationBarButtonTap(e) {
-			this.$u.route("")
+			this.$u.route("/pages/mine/fleet/fleetBill")
 		},
 		methods: {
-			operation(){
-				uni.$u.route('/pages/mine/fleet/carCaptainAuthentication');
-				// uni.$u.route('/pages/mine/fleet/addBinding', {
-				// 	data: JSON.stringify(this.dataDetails),
-				// });
-			},
-			leave(){
-				this.tipsShow = true
-			},
-			cancelClick(){
-				this.tipsShow = false
-			},
-			confirmClick(){
+			solution() {
+				let that = this
 				uni.showLoading({
 					mask: true,
 					title: '加载中'
 				})
 				this.tipsShow = false
-				this.$request.baseRequest('post', '', this.dataDetails).then(res => {
-						if (res.code == 200) {
-							uni.hideLoading()
-							this.$refs.uToast.show({
-								type: 'success',
-								message: "解绑成功!",
-								complete() {
-									// uni.navigateBack({
-									// 	delta: 1
-									// });
-									this.getInfo()
+				this.$request.baseRequest('post', '/hyBindCarCaptainInfo/api/deleteBind', {
+					id: this.id
+				}).then(res => {
+					uni.hideLoading()
+					if (res.code == 200) {
+						this.$refs.uToast.show({
+							type: 'success',
+							message: "删除成功!",
+							complete() {
+								that.getInfo()
+							}
+						})
+					} else {
+						uni.hideLoading()
+						uni.$u.toast(res.message);
+					}
+				}).catch(res => {
+					uni.hideLoading()
+					uni.$u.toast(res.message);
+				});
+			},
+			next(obj) {
+				this.tipsShow = true
+				this.alertTitle = "确定删除" + obj.driverName + "信息?"
+				this.id = obj.id
+				this.sign="删除"
+			},
+			audit(obj, val) {
+				if (val == 1) {
+					this.alertTitle = "确定拒绝" + obj.driverName + "加入车队?"
+					this.distinguish = "2"
+				} else if (val == 2) {
+					this.alertTitle = "确定接受" + obj.driverName + "加入车队?"
+					this.distinguish = "1"
+				}
+				this.id = obj.id
+				this.tipsShow = true
+			},
+			operation(val) {
+				if (val == 1) {
+					uni.$u.route('/pages/mine/fleet/carCaptainAuthentication');
+				} else {
+					uni.$u.route('/pages/mine/fleet/carCaptainAuthentication', {
+						data: JSON.stringify(this.fleetInfo),
+					});
+				}
+			},
+			leave() {
+				this.tipsShow = true
+			},
+			cancelClick() {
+				this.tipsShow = false
+			},
+			confirmClick() {
+				let that = this
+				if(this.sign == "删除"){ //删除操作
+					this.solution()
+				}else{
+					uni.showLoading({
+						mask: true,
+						title: '加载中'
+					})
+					this.tipsShow = false
+					this.$request.baseRequest('post', '/hyBindCarCaptainInfo/api/examine', {
+							id: this.id,
+							examineFlag: this.distinguish
+						}).then(res => {
+							if (res.code == 200) {
+								uni.hideLoading()
+								if (this.distinguish == 1) {
+									this.$refs.uToast.show({
+										type: 'success',
+										message: "接受成功!",
+										complete() {
+											that.getInfo()
+										}
+									})
+								} else {
+									this.$refs.uToast.show({
+										type: 'success',
+										message: "拒绝成功!",
+										complete() {
+											that.getInfo()
+										}
+									})
 								}
-							})
-						} else {
+							} else {
+								uni.hideLoading()
+								uni.$u.toast(res.message);
+							}
+						})
+						.catch(res => {
 							uni.hideLoading()
 							uni.$u.toast(res.message);
+						});
+				}
+				
+			},
+			getInfo() {
+				this.$request.baseRequest('get', '/hyCarCaptainInfo/getCarCaptain', {
+						commonId: this.userInfo.id
+					}).then(res => {
+						if (res.code == 200) {
+							if (res.data) {
+								this.fleetInfo = res.data
+								//车队人员
+								this.$request.baseRequest('get', '/hyBindCarCaptainInfo/api/selectPage', {
+										carCaptainCommonId: this.fleetInfo.commonId,
+										pageSize: 10,
+										currentPage: 1
+									}).then(res => {
+										if (res.code == 200) {
+											this.formList = res.data.records
+											// if(res.data.total == 0){
+											// 	this.status = 'nomore'
+											// }else{
+											// 	this.status = 'loadmore'
+											// }
+										}
+									})
+									.catch(res => {
+										uni.$u.toast(res.message);
+									});
+							}
+						} else {
+							uni.$u.toast(res.message);
 						}
 					})
 					.catch(res => {
-						uni.hideLoading()
 						uni.$u.toast(res.message);
 					});
-			},
-			getInfo(){
-				
+
 			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.center{
+	.center {
 		padding: 20rpx 30rpx;
-		
+
 	}
-	.fleetInfo{
+
+	.fleetInfo {
 		display: flex;
 		width: 100%;
 		margin-top: 30rpx;
-		.fleetInfo_name{
+
+		.fleetInfo_name {
 			width: 50%;
 		}
-		.fleetInfo_phone{
+
+		.fleetInfo_phone {
 			width: 50%;
 			text-align: right;
 		}
 	}
-	.btn_css{
+
+	.btn_css {
 		display: flex;
 		margin-top: 30rpx;
-		.btn_item{
+
+		.btn_item {
 			width: 120rpx;
 			margin-right: 20rpx;
 		}
 	}
+
+	.list_css {
+		display: flex;
+		margin: 10rpx 0;
+
+		.list_left {
+			width: 50%;
+		}
+
+		.list_right {
+			display: flex;
+			justify-content: flex-end;
+			width: 50%;
+
+			.list_text {
+				margin: 0 10rpx;
+			}
+		}
+	}
 </style>

+ 14 - 0
pages/mine/manageVehicles/addVehicle.vue

@@ -347,6 +347,12 @@
 					<u--input placeholder="输入车主姓名" inputAlign='right' border="none" v-model="dataDetails.guaOwner">
 					</u--input>
 				</view>
+				<view class="flex row">
+					<view class="left-text">挂车总质量(千克)</view>
+					<u--input type='number' placeholder="输入挂车总质量" inputAlign='right' border="none"
+						v-model="dataDetails.carTotalWeight">
+					</u--input>
+				</view>
 				<view class="flex row">
 					<view class="left-text">挂车整备质量(千克)</view>
 					<u--input type='number' placeholder="输入整备质量" inputAlign='right' border="none"
@@ -767,6 +773,7 @@
 														if(res.data.approvedLoadMass.indexOf("kg") != -1){
 															res.data.approvedLoadMass = res.data.approvedLoadMass.slice(0, res.data.approvedLoadMass.length - 2)
 														}
+														_this.dataDetails.carTotalWeight = res.data.totalMass.split("kg").join("") //挂车总质量
 														_this.dataDetails.guaServicingWeight = res.data.servicingMass //总质量
 														_this.dataDetails.guaCarApprovedWeight = res.data.approvedLoadMass //核定载质量
 														if (res.data.size && res.data.size.indexOf(
@@ -1380,6 +1387,13 @@
 						})
 						return true
 					}    
+					if (uni.$u.test.isEmpty(this.dataDetails.carTotalWeight)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车总质量不能为空!",
+						})
+						return true
+					}
 					if (uni.$u.test.isEmpty(this.dataDetails.guaServicingWeight)) {
 						this.$refs.uToast.show({
 							type: 'error',

+ 17 - 3
pages/mine/manageVehicles/editVehicle.vue

@@ -306,15 +306,21 @@
 					<u--input placeholder="输入车主姓名" inputAlign='right' border="none" v-model="dataDetails.guaOwner">
 					</u--input>
 				</view>
+				<view class="flex row">
+					<view class="left-text">挂车总质量(千克)</view>
+					<u--input placeholder="输入挂车总质量" inputAlign='right' border="none"
+						v-model="dataDetails.carTotalWeight">
+					</u--input>
+				</view>
 				<view class="flex row">
 					<view class="left-text">挂车整备质量(千克)</view>
-					<u--input placeholder="输入总质量" inputAlign='right' border="none"
+					<u--input placeholder="输入挂车整备质量" inputAlign='right' border="none"
 						v-model="dataDetails.guaServicingWeight">
 					</u--input>
 				</view>
 				<view class="flex row">
 					<view style='width:180px' class="left-text">挂车核定载质量(千克)</view>
-					<u--input placeholder="输入核定载质量" inputAlign='right' border="none"
+					<u--input placeholder="输入挂车核定载质量" inputAlign='right' border="none"
 						v-model="dataDetails.guaCarApprovedWeight">
 					</u--input>
 				</view>
@@ -799,6 +805,7 @@
 																.approvedLoadMass.slice(0, res.data
 																	.approvedLoadMass.length - 2)
 														}
+														_this.dataDetails.carTotalWeight = res.data.totalMass.split("kg").join("") //挂车总质量
 														_this.dataDetails.guaServicingWeight = res.data
 															.servicingMass //总质量
 														_this.dataDetails.guaCarApprovedWeight = res
@@ -1297,7 +1304,14 @@
 							message: "车辆所属车主不能为空!",
 						})
 						return true
-					}    
+					}  
+					  if (uni.$u.test.isEmpty(this.dataDetails.carTotalWeight)) {
+					  	this.$refs.uToast.show({
+					  		type: 'error',
+					  		message: "挂车总质量不能为空!",
+					  	})
+					  	return true
+					  }
 					if (uni.$u.test.isEmpty(this.dataDetails.guaServicingWeight)) {
 						this.$refs.uToast.show({
 							type: 'error',

+ 0 - 1
util/request.js

@@ -43,7 +43,6 @@ const baseRequest = (method, url, data, header) => {
 				// 		})
 				uni.request(baseDefaultOpts).then(
 					(res) => {
-
 						uni.request({
 							method: 'POST',
 							url: 'https://2817a7b4-7e07-48f0-a7b5-764a65999735.bspapp.com/api',