Преглед изворни кода

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-app

# Conflicts:
#	pages/order/confirmLoading.vue
ccj пре 2 година
родитељ
комит
85a79f88db

+ 16 - 8
App.vue

@@ -84,7 +84,7 @@
 								that.send()
 								let dateTtime = Number(shippingNoteInfos.interval + 60000)
 								console.log("开始定时", dateTtime)
-								that.timer = setInterval(() => {
+								that.timer = setTimeout(() => {
 									console.log("定时")
 									that.send()
 								}, dateTtime);
@@ -95,7 +95,7 @@
 							console.log(res)
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
-							that.timer = setInterval(() => { //失败也需要定时发送定位
+							that.timer = setTimeout(() => { //失败也需要定时发送定位
 								console.log("定时")
 								that.send()
 							}, 915204); //15分钟
@@ -116,7 +116,7 @@
 							if (shippingNoteInfos) {
 								let dateTime = Number(shippingNoteInfos.interval + 1000)
 								console.log("定时开始", dateTime)
-								that.timer = setInterval(() => {
+								that.timer = setTimeout(() => {
 									//TODO 
 									that.send()
 								}, dateTime);
@@ -127,7 +127,7 @@
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
 							console.log("定时开始", "915204")
-							that.timer = setInterval(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
+							that.timer = setTimeout(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
 								that.send()
 							}, 915204);
 						}
@@ -160,9 +160,6 @@
 						console.log("授权失败")
 						console.log(res)
 					}
-					// uni.showModal({
-					// 	content: JSON.stringify(res)
-					// });
 				});
 			},
 		},
@@ -303,7 +300,7 @@
 				this.$request.baseRequest('get', '/orderInfo/getData', {
 					commonId: uni.getStorageSync('userInfo').id,
 				}).then(res1 => {
-					console.log("/orderInfo/getData", res1.data)
+					console.log("/orderInfo/getData 查看该用户有多少订单", res1.data)
 					if (res1.data.length > 0) {
 						this.shippingNoteInfos[0].shippingNoteNumber = res1.data[0].orderNo //运单号
 						this.shippingNoteInfos[0].serialNumber = "0000" //分单号
@@ -517,7 +514,18 @@
 		},
 		onShow: function() {
 			console.log('App Show')
+		
 			// #ifdef APP-PLUS
+			var isContains = true;//隐私权政策是否包含高德开平隐私权政策  true是包含
+			var isShow = true;//隐私权政策是否弹窗展示告知用户 true是展示 
+			sdkwx.updatePrivacyShow(isContains, isShow);
+			
+			var isAgree = true;//隐私权政策是否取得用户同意  true是用户同意
+			sdkwx.updatePrivacyAgree(isAgree);
+			//检查定位权限
+			sdkwx.checkLocationPermission(function(res){
+				console.log(res);
+			});
 			getCurrentNo(res => {
 				// 进页面获取当前APP版本号(用于页面显示)
 				this.version = res.versionName;

+ 6 - 1
pages.json

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

+ 22 - 10
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,23 +41,29 @@
 		},
 		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 => {
 						if (res.code == 200) {
 							uni.hideLoading()
 							this.$refs.uToast.show({
 								type: 'success',
-								message: "绑定成功!",
+								message: "绑定成功,等待队长接受!",
 								complete() {
 									uni.navigateBack({
 										delta: 1
@@ -69,7 +81,7 @@
 					});
 			}
 		},
-		cancelClick(){
+		cancelClick() {
 			this.tipsShow = false
 		}
 	}

+ 40 - 18
pages/mine/fleet/bindingCarCaptain.vue

@@ -2,18 +2,22 @@
 <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.carCaptainName">{{fleetInfo.carCaptainName}}({{fleetInfo.carCaptainAccountNumber}})</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_css" v-if="fleetInfo.status != '待确认'">
+			<view class="btn_item" v-if="!fleetInfo.status||fleetInfo.status=='已拒绝'|| fleetInfo.status=='未绑定'">
 				<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>
 			
 		</view>
+		<view class="red_char">
+			注:绑定车队长后,运费将自动结算到车队长账户,不再对司机结算,如需对司机本人结算请先解绑车队长。
+		</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>
@@ -21,14 +25,13 @@
 </template>
 
 <script>
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
-				fleetInfo:{
-					name:"张三",
-					phone:"1301111111111",
-					status:"待确定"
-				},
+				fleetInfo:{},
 				tipsShow:false,
 				alertTitle:"确定解绑车队长?"
 			}
@@ -38,6 +41,9 @@
 		},
 		onShow() {
 
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
 			operation(){
@@ -53,23 +59,20 @@
 				this.tipsShow = false
 			},
 			confirmClick(){
+				let that = this
 				uni.showLoading({
 					mask: true,
 					title: '加载中'
 				})
 				this.tipsShow = false
-				this.$request.baseRequest('post', '', this.dataDetails).then(res => {
+				this.$request.baseRequest('post', '/hyBindCarCaptainInfo/api/unbinding', {id:this.fleetInfo.id}).then(res => {
 						if (res.code == 200) {
 							uni.hideLoading()
+							that.getInfo()
 							this.$refs.uToast.show({
 								type: 'success',
 								message: "解绑成功!",
-								complete() {
-									// uni.navigateBack({
-									// 	delta: 1
-									// });
-									this.getInfo()
-								}
+								complete() {}
 							})
 						} else {
 							uni.hideLoading()
@@ -82,7 +85,21 @@
 					});
 			},
 			getInfo(){
-				
+				this.$request.baseRequest('get', '/hyBindCarCaptainInfo/getBindCarCaptain', {
+					commonId:this.userInfo.id
+				}).then(res => {
+						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);
+					});
 			},
 		}
 	}
@@ -113,4 +130,9 @@
 			margin-right: 20rpx;
 		}
 	}
+	.red_char{
+		color: #f05458;
+		font-size: 28rpx;
+		margin-top: 30rpx;
+	}
 </style>

+ 332 - 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,36 @@
 					});
 			},
 			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) {
+				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 +457,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 +483,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 +551,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 +569,165 @@
 											.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: '加载中'
+				})
+				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 +970,7 @@
 		justify-content: center;
 		background: white;
 		padding: 40rpx 20rpx 50rpx 20rpx;
+
 		.next-btn {
 			background: rgb(39, 114, 251);
 			width: 90%;
@@ -953,20 +1005,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>

+ 134 - 1
pages/mine/fleet/fleetBill.vue

@@ -1,9 +1,142 @@
 //车队账单
 <template>
+	<view class="center">
+		<view class="list_css" v-for="(item,index) in dataList">
+			<view class="list_css_item_top">
+				<view class="list_css_left">{{index}}{{item.orderNo}}</view>
+				<view class="list_css_right">{{item.payeeName}} 承运</view>
+			</view>
+			<view class="list_css_item_middle">
+				<view class="list_css_left">{{item.paymentType}} {{item.amountMoney}}</view>
+				<view class="list_css_right">账号尾号 {{item.bankNo}}</view>
+			</view>
+			<view class="list_css_item_lower">
+				<view class="list_css_left">{{item.paymentDate}}</view>
+			</view>
+			<u-divider></u-divider>
+		</view>
+		<view>
+			<u-loadmore :status="loadStatus" />
+		</view>
+	</view>
 </template>
 
 <script>
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				//分页
+				currentPage: 1,
+				pageSize: 10,
+				dataList: [],
+				loadStatus: "",
+				isLoadMore: false
+			}
+		},
+		onLoad() {
+			this.getList()
+		},
+		onShow() {},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.currentPage = 1
+			this.isLoadMore = false
+			this.loadStatus = 'loading'
+			this.getList()
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		onReachBottom() { //上拉触底函数
+			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+				this.isLoadMore = true
+				this.currentPage += 1
+				this.getList()
+			}
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
+		},
+		methods: {
+			getList() {
+				uni.showLoading({
+					title: '加载中',
+					mask: true
+				})
+				this.$request.baseRequest('get', '/hyFreightSettlementInfo/selectFleetCaptainBill', {
+						carCaptainCommonId: this.userInfo.id,
+						pageSize: this.pageSize,
+						currentPage: this.currentPage
+					}).then(res => {
+						if (res.code == 200) {
+							if (res.data.records.length > 0) {
+								this.isLoadMore = false
+								this.loadStatus = 'loadmore'
+							} else {
+								this.isLoadMore = true
+								this.loadStatus = 'nomore'
+							}
+							if (this.currentPage == 1) {
+								this.dataList = res.data.records
+								if (res.data.records.length < 10) {
+									this.loadStatus = 'nomore'
+								}
+							} else {
+								this.dataList = this.dataList.concat(res.data.records)
+							}
+							if (this.dataList.length > 0) {
+								for (let i = 0; i < this.dataList.length; i++) {
+									if (this.dataList[i].bankCard) {
+										this.dataList[i].bankNo = this.dataList[i].bankCard.substr(this.dataList[i]
+											.bankCard.length - 4)
+									}
+								}
+							}
+
+
+							uni.hideLoading()
+						} else {
+							uni.hideLoading()
+							uni.$u.toast(res.message);
+						}
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.$u.toast(res.message);
+					});
+			},
+
+
+		}
+	}
 </script>
 
-<style>
+<style lang="scss" scoped>
+	.center {
+		padding: 20rpx 30rpx;
+
+	}
+
+	.list_css {
+		margin-top: 20rpx;
+
+		.list_css_item_middle,
+		.list_css_item_top,
+		.list_css_item_lower {
+			display: flex;
+			margin-bottom: 20rpx;
+		}
+
+		.list_css_right,
+		.list_css_left {
+			width: 50%;
+		}
+
+		.list_css_right {
+			text-align: right;
+		}
+	}
 </style>

+ 278 - 50
pages/mine/fleet/fleetManage.vue

@@ -3,116 +3,344 @@
 	<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.name">
+				<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="tips_info">
+			<span>绑定司机</span>
+			<image class='yanjingicon' @click="changeStatus(1)" v-if="isShow == 2" src="../../../static/yioncang.png">
+			</image>
+			<image class='yanjingicon' @click="changeStatus(2)" v-if="isShow == 1" src="../../../static/xianshi.png">
+			</image>
+			<!-- <u--image :showLoading="true" src="../../../static/yioncang.png" width="80px" height="80px" @click="click"></u--image> -->
+		</view>
+		<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 == '已解绑'||item.status == '已接受'||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>
+		<view>
+			<u-loadmore :status="loadStatus" />
 		</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:"确定解绑车队长?"
+				//分页
+				pageSize: 20,
+				currentPage: 1,
+				fleetInfo: {},
+				tipsShow: false,
+				alertTitle: "",
+				formList: [],
+				distinguish: "",
+				id: "",
+				sign: "",
+				isShow: 1,
+				isLoadMore: false, //是否加载中
+				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
 			}
 		},
 		onLoad() {
 			this.getInfo()
 		},
-		onShow() {
-
+		onShow() {},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.currentPage = 1
+			this.isLoadMore = false
+			this.loadStatus = 'loading'
+			this.nextGetInfo()
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		onReachBottom() { //上拉触底函数
+			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+				this.isLoadMore = true
+				this.currentPage += 1
+				this.nextGetInfo()
+			}
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
 		},
 		onNavigationBarButtonTap(e) {
-			this.$u.route("")
+			if (this.fleetInfo.name) { //判断是否有队长身份
+				this.$u.route("/pages/mine/fleet/fleetBill")
+			} else {
+				this.$refs.uToast.show({
+					type: 'error',
+					message: "您还没有认证车队长身份!",
+					complete() {
+						that.getInfo()
+					}
+				})
+			}
 		},
 		methods: {
-			operation(){
-				uni.$u.route('/pages/mine/fleet/carCaptainAuthentication');
-				// uni.$u.route('/pages/mine/fleet/addBinding', {
-				// 	data: JSON.stringify(this.dataDetails),
-				// });
+			changeStatus(val) {
+				this.isShow = val
+				if (val == 1) {
+					if (this.fleetInfo.name) { //判断是否有队长身份
+						this.currentPage = 1
+						this.nextGetInfo()
+					}
+				} else if (val == 2) {
+					this.formList = []
+				}
+			},
+			solution() {
+				let that = this
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				})
+				this.tipsShow = false
+				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);
+				});
 			},
-			leave(){
+			next(obj) {
 				this.tipsShow = true
+				this.alertTitle = "确定删除" + obj.driverName + "信息?"
+				this.id = obj.id
+				this.sign = "删除"
 			},
-			cancelClick(){
+			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(){
+			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 {
+								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.nextGetInfo()
+
+							}
+						} else {
+							uni.$u.toast(res.message);
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+
+			},
+			nextGetInfo() {
+				//车队人员
 				uni.showLoading({
-					mask: true,
-					title: '加载中'
+					title: '加载中',
+					mask: true
 				})
-				this.tipsShow = false
-				this.$request.baseRequest('post', '', this.dataDetails).then(res => {
+				this.$request.baseRequest('get', '/hyBindCarCaptainInfo/api/selectPage', {
+						carCaptainCommonId: this.userInfo.id,
+						pageSize: this.pageSize,
+						currentPage: this.currentPage
+					}).then(res => {
 						if (res.code == 200) {
-							uni.hideLoading()
-							this.$refs.uToast.show({
-								type: 'success',
-								message: "解绑成功!",
-								complete() {
-									// uni.navigateBack({
-									// 	delta: 1
-									// });
-									this.getInfo()
+							// this.formList = res.data.records
+							if (res.data.records.length > 0) {
+								this.isLoadMore = false
+								this.loadStatus = 'loadmore'
+							} else {
+								this.isLoadMore = true
+								this.loadStatus = 'nomore'
+							}
+							if (this.currentPage == 1) {
+								this.formList = res.data.records
+								if (res.data.records.length < 20) {
+									this.loadStatus = 'nomore'
 								}
-							})
+							} else {
+								this.formList = this.formList.concat(res.data.records)
+							}
+							uni.hideLoading()
 						} else {
 							uni.hideLoading()
-							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: 30rpx 0;
+
+		.list_left {
+			width: 50%;
+		}
+
+		.list_right {
+			display: flex;
+			justify-content: flex-end;
+			width: 50%;
+
+			.list_text {
+				margin: 0 10rpx;
+			}
+		}
+	}
+
+	.tips_info {
+		margin: 20rpx 0;
+
+		.yanjingicon {
+			margin: 0 20rpx;
+			width: 22px;
+			height: 22px;
+			top: 10rpx
+		}
+	}
 </style>

+ 13 - 20
pages/mine/index.vue

@@ -114,7 +114,7 @@
 					<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
 				</view>
 			</view>
-			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/set')">
+			<view class="flex flex-space-between">
 				<view class="flex align-center">
 					<image class="img" src="@/static/images/mine/appUpdate.png" mode='widthFix'>
 					</image>
@@ -137,8 +137,7 @@
 					<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
 				</view>
 			</view>
-			
-			<!-- <view class="flex flex-space-between" @click="goDetailPage('/pages/mine/index1')">
+			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/index1')">
 				<view class="flex align-center">
 					<image class="img" src="@/static/images/mine/set.png" mode='widthFix'>
 					</image>
@@ -147,8 +146,8 @@
 				<view>
 					<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
 				</view>
-			</view> -->
-			<!-- 	<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/evaluate')">
+			</view>
+			<!--<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/evaluate')">
 				<view class="flex align-center">
 					<image class="img" src="@/static/images/mine/set.png" mode='widthFix'>
 					</image>
@@ -294,8 +293,9 @@
 					},
 					method: 'GET',
 					success: (res) => {
-						if (this.version == res.data.data.version) {
-							this.version = "当前为最新版" + this.version
+						var versionNo = plus.runtime.version
+						if (versionNo == res.data.data.version) {
+							this.version = "当前为最新版" + res.data.data.version
 						} else {
 							this.version = "发现新版本,立即更新"
 						}
@@ -461,7 +461,6 @@
 				color: #8F97AB;
 			}
 		}
-
 	}
 
 	.content1 {
@@ -520,16 +519,10 @@
 		}
 	}
 
-	// .version_css {
-	// 	margin: 0 auto;
-	// 	bottom: 120rpx;
-	// 	color: #9D9D9D;
-	// 	font-size: 32rpx;
-	// 	// position:fixed;
-	// 	position: absolute;
-	// 	text-align: center;
-	// 	left: 0;
-	// 	right: 0;
-	// 	margin: 0 auto;
-	// }
+	.version_css {
+		// margin-right: 10rpx;
+		color: #9D9D9D;
+		font-size: 32rpx;
+		text-align: center;
+	}
 </style>

+ 57 - 24
pages/mine/index1.vue

@@ -17,24 +17,25 @@
 		data() {
 			return {
 				title: 'Hello',
-				vehicleNumber:"浙A8G93H",//车牌号
-				driverName:"师傅",//司机姓名
+				vehicleNumber:"辽A77777",//车牌号
+				driverName:"师傅",//司机姓名
 				remark:"测试",//备注
 				shippingNoteInfos:[{
-					shippingNoteNumber:"YD20211012",//运单号
+					shippingNoteNumber:"CY20221015674637",//运单号
 					serialNumber:"0000",//分单号
-					startCountrySubdivisionCode:"330108",//起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-					endCountrySubdivisionCode:"330205",//到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-					startLongitude:"120.152193",//起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					startLatitude:"30.281367",//起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					endLongitude:"121.552812",//到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					endLatitude:"29.885021",//到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					startLocationText:"杭州",//起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					endLocationText:"宁波",//到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					vehicleNumber:"浙A8G93H",//车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
-					driverName:"师傅",//司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+					startCountrySubdivisionCode:"210804",//起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					endCountrySubdivisionCode:"370202",//到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					startLongitude:"122.13266",//起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					startLatitude:"40.26865",//起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					endLongitude:"120.369557",//到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					endLatitude:"36.094406",//到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					startLocationText:"营口市",//起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					endLocationText:"青岛市",//到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					vehicleNumber:"辽A77777",//车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+					driverName:"师傅",//司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
 					interval:"5000"//请求时间间隔,SDK 回调返 回(单位 ms)				 
-				}]//运单信息列表,一辆车运单数最大支持数为 10
+				}],//运单信息列表,一辆车运单数最大支持数为 10
+				timer:""
 			}
 		},
 		onLoad() {
@@ -65,9 +66,10 @@
 				var enterpriseSenderCode = "23106960";//网络货运企业在省平台申请的企业发送代码
 				var environment = "debug";//环境:“debug”接入测试环境,“release”接入正式环境。
 				sdkwx.auth(appId, appSecurity, enterpriseSenderCode, environment, function(res) {
-					console.log(res,"成功");
+					console.log(res);
 					if (res.type == "onSuccess") {
 						//成功
+						console.log(res,"成功");
 					} else if (res.type == "onFailure"){
 						//失败
 						var errorCode = res.data.errorCode;//错误码
@@ -79,6 +81,7 @@
 				});
 			},
 			start(){
+				var that = this
 				//开启定位
 				var vehicleNumber= this.vehicleNumber;//车牌号
 				var driverName = this.driverName;//司机姓名
@@ -87,8 +90,19 @@
 				sdkwx.start(vehicleNumber, driverName, remark, shippingNoteInfos, function(res){
 					console.log(res);
 					if (res.type == "onSuccess") {
-						//成功
-						var shippingNoteInfos = res.data;//运单信息列表
+					//成功
+					console.log("开启定位成功!!!")
+					console.log(res)
+					var shippingNoteInfos = res.data[0]; //运单信息列表
+					console.log(shippingNoteInfos, "查看返回的时间")
+					if (shippingNoteInfos) {
+						let dateTtime = Number(shippingNoteInfos.interval + 60000)
+						console.log("开始定时", dateTtime)
+						that.timer = setTimeout(() => {
+							console.log("定时")
+							that.send()
+						}, dateTtime);
+					}
 					} else if (res.type == "onFailure"){
 						//失败
 						var errorCode = res.data.errorCode;//错误码
@@ -97,20 +111,35 @@
 				});			   
 			},
 			send(){
+				var that = this
 				//发送定位
 				var vehicleNumber= this.vehicleNumber;//车牌号
 				var driverName = this.driverName;//司机姓名
 				var remark = this.remark;//备注
 				var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
 				sdkwx.send(vehicleNumber, driverName, remark, shippingNoteInfos, function(res){
-					console.log(res);
+					var shippingNoteInfos = res.data[0]; //运单信息列表
 					if (res.type == "onSuccess") {
-						//成功
-						var shippingNoteInfos = res.data;//运单信息列表
-					} else if (res.type == "onFailure"){
-						//失败
-						var errorCode = res.data.errorCode;//错误码
-						var errorMsg = res.data.errorMsg;//错误描述
+						console.log("App.vue发送定位成功")
+						console.log(res);
+						console.log("查看返回的时间",shippingNoteInfos)
+						if (shippingNoteInfos) {
+							let dateTime = Number(shippingNoteInfos.interval + 1000)
+							console.log("定时开始", dateTime)
+							that.timer = setTimeout(() => {
+								//TODO 
+								that.send()
+							}, dateTime);
+						}
+					} else if (res.type == "onFailure") {//失败
+						console.log("App.vue发送定位失败", res)
+						var errorCode = res.data.errorCode; //错误码
+						var errorMsg = res.data.errorMsg; //错误描述
+						let dateTime1 = Number(shippingNoteInfos.interval + 1000)
+						console.log("定时开始", dateTime1)
+						that.timer = setTimeout(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
+							that.send()
+						}, dateTime1);
 					}
 				});	
 			},
@@ -139,6 +168,7 @@
 				var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
 				sdkwx.restart(vehicleNumber, driverName, remark, shippingNoteInfos, function(res) {
 					console.log(res);
+					
 					if (res.type == "onSuccess") {
 						//成功
 						var shippingNoteInfos = res.data;//运单信息列表
@@ -158,8 +188,11 @@
 				sdkwx.stop(vehicleNumber, driverName, remark, shippingNoteInfos, function(res) {
 					console.log(res);
 					if (res.type == "onSuccess") {
+						clearInterval(that.timer)
+						console.log("结束成功!!!",res)
 						//成功
 					} else if (res.type == "onFailure"){
+						console.log("结束失败!!!",res)
 						//失败
 						var errorCode = res.data.errorCode;//错误码
 						var errorMsg = res.data.errorMsg;//错误描述

+ 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',

+ 1 - 0
pages/order/confirmUnloading.vue

@@ -497,6 +497,7 @@
 				this.detailData.carrierInfo.statusFlag = this.detailData.statusFlag
 				this.detailData.carrierInfo.unloadingImg = this.imgList.toString()
 				this.detailData.carrierInfo.receiptImg = this.imgList1.toString()
+				this.detailData.carrierInfo.unloadingWeight = this.detailData.unloadingWeight
 				// if (!this.detailData.carrierInfo.totalFreight) {
 				// 	uni.showToast({
 				// 		title: '运费不能为空!',

+ 5 - 3
pages/order/signContract.vue

@@ -366,7 +366,9 @@
 				}
 			},
 			collection() {
-				uni.$u.route('/pages/order/bankCard');
+				if(!this.dataDetails.carCaptainCommonId){  //carCaptainCommonId没有值  证明他没有车队  可以选择收款账户
+					uni.$u.route('/pages/order/bankCard');
+				}
 			},
 			confirmBtn(e) {
 				this.dataDetails.carrierInfo.carNo = e.value[0]
@@ -520,8 +522,6 @@
 						})
 						return
 					}
-					
-					
 				}
 				_obj.trailerNumber = that.dataDetails.trailerNumber
 				_obj.tranStartDate = that.dataDetails.tranStartDate
@@ -540,6 +540,8 @@
 				_obj.payeeName = that.dataDetails.payeeName
 				_obj.id = that.dataDetails.id
 				_obj.typeFlag = 2
+				_obj.carCaptainAccountNumber = that.dataDetails.carCaptainAccountNumber
+				_obj.payeeIdCard = that.dataDetails.payeeIdCard
 				uni.canvasToTempFilePath({
 					canvasId: 'handWriting',
 					fileType: 'png',

+ 17 - 4
pages/public/login.vue

@@ -137,6 +137,19 @@
 			this.$api.logout()
 		},
 		onLoad(options) {
+			
+			// #ifdef APP-PLUS
+			var isContains = true;//隐私权政策是否包含高德开平隐私权政策  true是包含
+			var isShow = true;//隐私权政策是否弹窗展示告知用户 true是展示 
+			sdkwx.updatePrivacyShow(isContains, isShow);
+			
+			var isAgree = true;//隐私权政策是否取得用户同意  true是用户同意
+			sdkwx.updatePrivacyAgree(isAgree);
+			//检查定位权限
+			sdkwx.checkLocationPermission(function(res){
+				console.log(res);
+			});
+			// #endif
 
 			if (wx.getUserProfile) {
 				console.log('--check getUserProfile--OK');
@@ -170,7 +183,7 @@
 							if (shippingNoteInfos) {
 								let dateTtime = Number(shippingNoteInfos.interval + 60000)
 								console.log("开始定时", dateTtime)
-								that.timer = setInterval(() => {
+								that.timer = setTimeout(() => {
 									console.log("定时")
 									that.send()
 								}, dateTtime);
@@ -180,7 +193,7 @@
 							console.log("开启定位失败!!!",res)
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
-							that.timer = setInterval(() => { //失败也需要定时发送定位
+							that.timer = setTimeout(() => { //失败也需要定时发送定位
 								console.log("定时")
 								that.send()
 							}, 975204); //15分钟
@@ -200,7 +213,7 @@
 							if (shippingNoteInfos) {
 								let dateTime = Number(shippingNoteInfos.interval + 60000)
 								console.log("定时开始", dateTime)
-								that.timer = setInterval(() => {
+								that.timer = setTimeout(() => {
 									that.send()
 								}, dateTime);
 							}
@@ -209,7 +222,7 @@
 							//失败
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
-							that.timer = setInterval(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
+							that.timer = setTimeout(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
 								that.send()
 							}, 975204);
 						}

+ 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',