From 1ddeee845f9c7e4917d5c991820ed4d1baddfeae Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期四, 06 四月 2023 08:12:17 +0800
Subject: [PATCH] 增加放空

---
 pages/public-page/forward/forward.vue                                                   |  156 +++++++++++++++++++++++-------
 api/publicInterface.js                                                                  |    5 
 pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue |   46 ++++++--
 pages/driver-page/appointment/appointment.vue                                           |    4 
 api/globalApi.js                                                                        |    4 
 api/request.js                                                                          |    7 
 pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue        |   18 ++-
 pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue          |   24 +++-
 pages/driver-page/driver-index/driver-index.vue                                         |    6 
 9 files changed, 195 insertions(+), 75 deletions(-)

diff --git a/api/globalApi.js b/api/globalApi.js
index 9c99255..f51a4c4 100644
--- a/api/globalApi.js
+++ b/api/globalApi.js
@@ -247,14 +247,14 @@
 	 */
 	getOneEvacuation: {
 		url: "/wrzs/userOperation/getOneEvacuation",
-		method: 'GET'
+		method: 'POST'
 	},
 	/**
 	 * @description 绗簩娆℃斁绌�
 	 */
 	getTwoEvacuation: {
 		url: "/wrzs/userOperation/getTwoEvacuation",
-		method: 'GET'
+		method: 'POST'
 	},
 	/**
 	 * @绉伴噸
diff --git a/api/publicInterface.js b/api/publicInterface.js
index e681a5d..856e250 100644
--- a/api/publicInterface.js
+++ b/api/publicInterface.js
@@ -1,12 +1,13 @@
 // import {resolve} from "../unpackage/dist/dev/mp-weixin/common/vendor";
 // import login from "../pages/login/login";
 
-// const BaseUrl = "http://192.168.3.159:9999/";
+
 import {
 	BaseUrl as wrBaseUrl
 } from '@/api/request.js'
+const BaseUrl = "http://192.168.0.110:9999";
 // const BaseUrl = "http://hesuancj.cn:9999"
-const BaseUrl = "https://hesuancj.cn:9095"
+// const BaseUrl = "https://hesuancj.cn:9095"
 // const BaseUrl = "http://192.168.3.119:9999"
 
 // 鐧诲綍
diff --git a/api/request.js b/api/request.js
index 058fc92..47a6779 100644
--- a/api/request.js
+++ b/api/request.js
@@ -82,12 +82,13 @@
 // const webSocketUrl = "ws://192.168.3.119:9997/wrzs/ws/info"
 
 // const BaseUrl = "http://192.168.3.119:9997";
-// const BaseUrl = "http://192.168.0.144:9997";
+const BaseUrl = "http://192.168.0.110:9997";
+const webSocketUrl = "ws://192.168.0.110:9997/wrzs/ws/info"
 // const BaseUrl = "http://hesuancj.cn:9997";
 // 绾夸笂
-const BaseUrl = "https://hesuancj.cn:9095";
+// const BaseUrl = "https://hesuancj.cn:9095";
+// const webSocketUrl = "wss://hesuancj.cn:9095/wrzs/ws/info"
 
-const webSocketUrl = "wss://hesuancj.cn:9095/wrzs/ws/info"
 // const webSocketUrl = "ws://hesuancj.cn:9997/wrzs/ws/info"
 // 璇锋眰鎷︽埅
 const fetch = (url, opt) => {
diff --git a/pages/driver-page/appointment/appointment.vue b/pages/driver-page/appointment/appointment.vue
index 791699b..cf74770 100644
--- a/pages/driver-page/appointment/appointment.vue
+++ b/pages/driver-page/appointment/appointment.vue
@@ -98,9 +98,9 @@
 					this.$u.toast('棰勭害鎴愬姛锛�');
 					uni.navigateBack({
 						delta: 1
-					})
+					});
 				} else {
-					this.$u.toast(res.data ? res.data : '棰勭害澶辫触');
+					this.$u.toast(res.msg ? res.msg : '棰勭害澶辫触');
 				}
 				setTimeout(() => {
 					this.yuYueList();
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
index cc668fc..f4a9bc0 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -100,7 +100,7 @@
 				sceneId: '',
 				gateCameraId: '',
 				equipmentCode: '',
-				weigh: 0
+				weigh: 30
 			}
 		};
 	},
@@ -248,7 +248,9 @@
 					uni.navigateTo({
 						url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${
 							res.data.id
-						}&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}`
+						}&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}&getWeightHouseObj=${JSON.stringify(
+							this.getWeightHouseObj
+						)}`
 					});
 				} else {
 					this.$u.toast('鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�');
@@ -286,11 +288,11 @@
 			});
 			socket.onClose(() => {
 				console.log('webSocketClose');
-				this.$u.toast('纾呮埧鎺ュ彛缁堢');
+				this.$u.toast('纾呮埧涓柇');
 			});
 			socket.onError(err => {
 				console.log('socket鎶ラ敊', err);
-				this.$u.toast('纾呮埧鎺ュ彛鏆傛椂涓嶈兘浣跨敤锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒');
+				this.$u.toast('鍑虹幇閿欒锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒');
 			});
 		},
 		// 鏀剧┖
@@ -302,7 +304,13 @@
 			let mix = Object.assign(this.weighData, this.getWeightHouseObj);
 			this.$reqPost('getOneEvacuation', mix, 'json').then(res => {
 				console.log(res, '绗竴娆℃斁绌�');
-				this.evacuationModalShow = false;
+				if (res.code == 0) {
+					this.$u.toast('宸叉斁绌�');
+					this.evacuationModalShow = false;
+				} else {
+					this.$u.toast('鏀剧┖澶辫触锛岃绋嶅悗閲嶈瘯');
+					this.evacuationModalShow = false;
+				}
 			});
 		},
 		// 鏀剧┖寮圭獥鍙栨秷
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
index f8b71d7..228ec16 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -34,7 +34,8 @@
 			<p>鐭垮満鍚嶇О锛歿{ weighList.filedName || '' }}</p>
 		</view>
 		<view class="three">
-			<u-button type="primary" text="鏀剧┖" plain @click="evacuation" throttleTime="500"></u-button>
+			<!-- 鏀剧┖ -->
+			<u-button type="primary" text="鏀剧┖" plain @click="evacuation" throttleTime="500" :disabled="isEvacuation"></u-button>
 			<!-- 澶栭攢璁㈠崟绉扮毊鏃讹紝杩斿洖鍔犲噺鍚ㄦ寜閽疆鐏般�傜О姣涙椂鍙敤.澶栬喘璁㈠崟锛屼笉鍑虹幇杩斿洖鍔犲噺鍚ㄧ殑鎸夐挳 -->
 			<u-button
 				type="primary"
@@ -44,9 +45,10 @@
 				loadingText="鍔犺浇涓�"
 				@click="confirmWeigh"
 			></u-button>
-			<u-button type="primary" text="杩斿洖鍔犲噺鍚�" :disabled="addAndSubtractCoalDisabled" v-if="weighList.orderTye == '澶栭攢'" @click="addAndSubtractCoal"></u-button>
+			<u-button type="primary" text="杩斿洖鍔犲噺鍚�" :disabled="addAndSubtractCoalDisabled" @click="addAndSubtractCoal" class="jiajian"></u-button>
 		</view>
 		<view class="four" v-if="weighList.orderTye == '澶栭攢'">濡傛偍闇�瑕佽皟鏁磋杞借揣鍝佸惃鏁帮紝璇风偣鍑昏繑鍥炲姞鍑忓惃</view>
+		<!-- 鏀剧┖寮圭獥 -->
 		<view class="evacuationModal">
 			<u-modal
 				:show="evacuationModalShow"
@@ -65,6 +67,7 @@
 import { webSocketUrl } from '@/api/request.js';
 export default {
 	onLoad(params) {
+		console.log(params, '绗簩娆℃斁绌哄弬鏁�');
 		this.takeCoalId = params.takeCoalId;
 		this.weighData.sceneId = params.sceneId;
 		this.weighData.gateCameraId = params.gateCameraId;
@@ -73,6 +76,8 @@
 	},
 	data() {
 		return {
+			// 鏄惁鍙偣鍑绘斁绌�
+			isEvacuation: false,
 			weighData: {
 				//纭绉伴噸鎺ュ彛鍙傛暟
 				deptId: '',
@@ -149,21 +154,16 @@
 					return false;
 				}
 			}
+		},
+		isEvacuation() {
+			if (this.weighList.hair == this.weighList.skin || this.temporaryWeighObj.skin == this.temporaryWeighObj.hair) {
+				return false;
+			} else {
+				return true;
+			}
 		}
 	},
 	methods: {
-		// 鏀剧┖
-		evacuation() {
-			this.evacuationModalShow = true;
-		},
-		// 鏀剧┖寮圭獥纭
-		evacuationConfirm() {
-			this.evacuationModalShow = false;
-		},
-		// 鏀剧┖寮圭獥鍙栨秷
-		evacuationCancel() {
-			this.evacuationModalShow = false;
-		},
 		init() {
 			// 鑾峰彇绉伴噸淇℃伅
 			this.$reqGet('weighList', { id: this.takeCoalId }).then(res => {
@@ -273,6 +273,21 @@
 				console.log('socket鎶ラ敊', err);
 				this.$u.toast('纾呮埧鎺ュ彛鏆傛椂涓嶈兘浣跨敤锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒');
 			});
+		},
+		// 鏀剧┖
+		evacuation() {
+			this.evacuationModalShow = true;
+		},
+		// 鏀剧┖寮圭獥纭
+		evacuationConfirm() {
+			this.$reqPost('getTwoEvacuation', this.weighData, 'json').then(res => {
+				console.log(res, '绗簩娆℃斁绌�');
+				this.evacuationModalShow = false;
+			});
+		},
+		// 鏀剧┖寮圭獥鍙栨秷
+		evacuationCancel() {
+			this.evacuationModalShow = false;
 		}
 	}
 };
@@ -335,6 +350,9 @@
 			&:nth-of-type(2) {
 				margin-left: vww(10);
 			}
+			&:nth-of-type(3) {
+				margin-left: vww(10);
+			}
 		}
 	}
 	.four {
diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue
index f45b708..e241d3e 100644
--- a/pages/driver-page/driver-index/driver-index.vue
+++ b/pages/driver-page/driver-index/driver-index.vue
@@ -16,7 +16,9 @@
 						<text>{{ item.carNum }}</text>
 						寮�
 					</view>
-					<view class="card-left__utils"><u-button @tap.stop="qiangDanBtn(item)" text="鎶㈠崟" type="primary" shape="circle"></u-button></view>
+					<view class="card-left__utils">
+						<u-button @tap.stop="qiangDanBtn(item)" text="鎶㈠崟" type="primary" shape="circle" v-if="item.carNum - item.taskNum !== 0"></u-button>
+					</view>
 				</template>
 				<template v-slot:right-top>
 					<view class="right-top">
@@ -118,7 +120,7 @@
 						<view>鎺掗槦鏁帮細鏆傛棤{{}}</view>
 					</view>
 					<view class="haveYuYueBottom">
-						<text>{{ item.yuYueTime || '鏃舵' }}</text>
+						<text>{{ item.yuYueSection || '鏃舵' }}</text>
 					</view>
 				</view>
 			</view>
diff --git a/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue b/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
index 084d23c..226a699 100644
--- a/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
+++ b/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -8,7 +8,9 @@
 						<text>{{ item.carNum }}</text>
 						寮�
 					</view>
-					<view class="card-left__utils"><u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle"></u-button></view>
+					<view class="card-left__utils">
+						<u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNumSurplusHuodai !== 0"></u-button>
+					</view>
 				</template>
 				<template v-slot:right-top>
 					<view class="right-top">
@@ -43,13 +45,13 @@
 						<uni-th align="center" width="80">鎻愮叅鍗曚釜鏁�</uni-th>
 					</uni-tr>
 					<uni-tr v-for="(item, index) in historyCoalData" :key="index">
-						<uni-td align="center">{{ item.sendDate }}</uni-td>
-						<uni-td align="left">{{ item.deptName }}</uni-td>
-						<uni-td align="center">{{ item.filedName }}</uni-td>
-						<uni-td align="center">{{ item.coalName }}</uni-td>
-						<uni-td align="center">{{ item.orderCode }}</uni-td>
-						<uni-td align="center">{{ item.carNumSurplus }}</uni-td>
-						<uni-td align="center">{{ item.tmCount }}</uni-td>
+						<uni-td align="center" @row-click="faYundetail(item)">{{ item.sendDate }}</uni-td>
+						<uni-td align="left" @row-click="faYundetail(item)">{{ item.deptName }}</uni-td>
+						<uni-td align="center" @row-click="faYundetail(item)">{{ item.filedName }}</uni-td>
+						<uni-td align="center" @row-click="faYundetail(item)">{{ item.coalName }}</uni-td>
+						<uni-td align="center" @row-click="faYundetail(item)">{{ item.orderCode }}</uni-td>
+						<uni-td align="center" @row-click="faYundetail(item)">{{ item.carNumSurplus }}</uni-td>
+						<uni-td align="center" @row-click="faYundetail(item)">{{ item.tmCount }}</uni-td>
 					</uni-tr>
 				</uni-table>
 				<view class="more_text" v-if="showMoreData && historyCoalData.length !== 0">娌℃湁鏁版嵁浜�...</view>
@@ -163,6 +165,12 @@
 			uni.navigateTo({
 				url: `/pages/public-page/forward/forward?orderPlanId=${value.orderPlanId}&carNumSurplusHuodai=${value.carNumSurplusHuodai}&carNum=${value.carNum}`
 			});
+		},
+		// 鐐瑰嚮鍘嗗彶鎻愮叅鍗曚竴琛岃幏鍙栬鎯�
+		faYundetail(v) {
+			uni.navigateTo({
+				url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}`
+			});
 		}
 	}
 };
diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue
index 5878218..70f2284 100644
--- a/pages/public-page/forward/forward.vue
+++ b/pages/public-page/forward/forward.vue
@@ -12,7 +12,7 @@
 					<view class="forward-card-amount">
 						<view class="forward-card-amount-input"><u--input v-model="val.carNum" placeholder="璇疯緭鍏ヨ浆鍙戞暟閲�"></u--input></view>
 						<u-checkbox-group v-model="val.checkboxValue1" placement="column" @change="v => checkboxChange(v, index)">
-							<u-checkbox :customStyle="{ marginBottom: '8px' }" size="30" labelSize="30" label="鍏ㄩ儴杞彂" name="鍏ㄩ儴杞彂"></u-checkbox>
+							<u-checkbox :customStyle="{ marginBottom: '8px' }" size="30" labelSize="30" label="鍏ㄩ儴杞彂" name="鍏ㄩ儴杞彂" :disabled="val.ischecked"></u-checkbox>
 						</u-checkbox-group>
 					</view>
 				</u-form-item>
@@ -32,14 +32,18 @@
 					<view class="" v-if="!tabHuoDai">
 						<u-cell-group>
 							<u-cell v-for="(item, index) in fleetData" :key="index" :title="item.name">
-								<view class="cell-util" slot="value"><u-button @click="forwardFleetObjectSelect(item)" text="閫夋嫨" type="primary" size="mini"></u-button></view>
+								<view class="cell-util" slot="value">
+									<u-button @click="forwardFleetObjectSelect(item, index)" text="閫夋嫨" type="primary" size="mini"></u-button>
+								</view>
 							</u-cell>
 						</u-cell-group>
 					</view>
 					<view class="" v-else-if="tabHuoDai">
 						<u-cell-group>
 							<u-cell v-for="(item, index) in huoDaiData" :key="index" :title="item.name">
-								<view class="cell-util" slot="value"><u-button @click="forwardHuoDaiObjectSelect(item)" text="閫夋嫨" type="primary" size="mini"></u-button></view>
+								<view class="cell-util" slot="value">
+									<u-button @click="forwardHuoDaiObjectSelect(item, index)" text="閫夋嫨" type="primary" size="mini"></u-button>
+								</view>
 							</u-cell>
 						</u-cell-group>
 					</view>
@@ -54,6 +58,7 @@
 
 export default {
 	onLoad(params) {
+		console.log(params, '杞彂椤甸潰鐨勫弬鏁�');
 		// 瀹㈡埛
 		this.cars2 = Number(params.cars2);
 		this.carNumSurplus1 = Number(params.carNumSurplus1);
@@ -169,66 +174,141 @@
 					break;
 			}
 		},
-		checkboxChange(value, index) {
-			console.log('澶嶉�夋鍙樺寲', value, index);
-			if (value.length != 0) {
-				console.log(this.forwardSurplus, '璐т唬杞彂鍏ㄩ儴鏁伴噺');
-				this.jhOrderPlanForwardList[index].carNum = this.forwardSurplus;
+		allrelay(x, y) {
+			let a = 0;
+			if (y != 0) {
+				a = x + y;
+				return a;
 			} else {
-				this.jhOrderPlanForwardList[index].carNum = null;
+				return x;
+			}
+		},
+		allrelayto(x, y) {
+			let a = 0;
+			if (y != 0) {
+				a = x - y;
+				return a;
+			} else {
+				return x;
+			}
+		},
+		checkboxChange(value, index) {
+			uni.setStorageSync('allrelay', this.jhOrderPlanForwardList[index].carNum);
+			this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map((v, i) => {
+				return {
+					...v,
+					ischecked: false
+				};
+			});
+			if (value.length != 0) {
+				let tempforwardSurplus = this.forwardSurplus;
+				let tempcarNumSurplus1 = this.carNumSurplus1;
+				// 璁$畻鍏ㄩ儴杞彂鏁�
+				// 瀹㈡埛
+				if (this.roleType == 1) {
+					this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.jhOrderPlanForwardList[index].carNum, tempcarNumSurplus1);
+				}
+				tempcarNumSurplus1 = 0;
+				// 璐т唬
+				if (this.roleType == 2) {
+					this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.jhOrderPlanForwardList[index].carNum, tempforwardSurplus);
+				}
+				tempforwardSurplus = 0;
+				// 閫夋嫨涓�涓悗鍏朵綑绂佹澶嶉��
+				this.jhOrderPlanForwardList.forEach((v, i) => {
+					if (i !== index) {
+						v.ischecked = true;
+					}
+				});
+			} else {
+				let tempforwardSurplus = this.forwardSurplus;
+				let tempcarNumSurplus1 = this.carNumSurplus1;
+				// 璐т唬
+				if (this.roleType == 2) {
+					this.jhOrderPlanForwardList[index].carNum = this.allrelayto(this.jhOrderPlanForwardList[index].carNum, this.forwardSurplus);
+				}
+				// 瀹㈡埛
+				if (this.roleType == 1) {
+					this.jhOrderPlanForwardList[index].carNum = this.allrelayto(this.jhOrderPlanForwardList[index].carNum, this.carNumSurplus1);
+				}
 			}
 		},
 		// 鑾峰彇璐т唬鍒楄〃
 		getAllHuoDaiByCustomerId() {
 			this.$reqGet('getAllHuoDaiByCustomerId').then(res => {
 				this.huoDaiData = res.data;
-				console.log('璐т唬鍒楄〃', res);
 			});
 		},
 		// 鑾峰彇杞﹂槦鍒楄〃
 		getFleet() {
 			this.$reqGet('getFleet').then(res => {
 				this.fleetData = res.data;
-				console.log('杞﹂槦鍒楄〃', res);
 			});
 		},
 		// 杞彂
 		forwardObjectClick(index) {
 			this.selectPopupShow = true;
 			this.index = index;
-			console.log(this.huoDaiData, this.fleetData, '杞彂');
 		},
 		selectPopupClose() {
 			this.selectPopupShow = false;
 		},
-		selectPopupOpen() {
-			console.log('寮瑰嚭妗嗘墦寮�浜�');
-		},
+		selectPopupOpen() {},
 		// 杞彂閫夋嫨璐т唬
-		forwardHuoDaiObjectSelect(item) {
-			this.selectPopupShow = false;
-			this.jhOrderPlanForwardList[this.index].xsUserId = item.userId;
-			this.jhOrderPlanForwardList[this.index].name = item.name;
-			this.jhOrderPlanForwardList[this.index].fleetId = 0;
-			console.log('璐т唬閫夋嫨', this.jhOrderPlanForwardList[this.index]);
+		forwardHuoDaiObjectSelect(item, index) {
+			this.$nextTick(() => {
+				let isableAdd = this.jhOrderPlanForwardList.filter(v => item.name === v.name);
+				if (isableAdd.length > 0) {
+					this.$u.toast('瀛樺湪閲嶅娣诲姞');
+					this.selectPopupShow = true;
+				} else {
+					this.selectPopupShow = false;
+					this.jhOrderPlanForwardList[this.index].xsUserId = item.userId;
+					this.jhOrderPlanForwardList[this.index].name = item.name;
+					this.jhOrderPlanForwardList[this.index].fleetId = 0;
+				}
+			});
 		},
 		// 杞彂閫夋嫨杞﹂槦
-		forwardFleetObjectSelect(item) {
-			this.selectPopupShow = false;
-			this.jhOrderPlanForwardList[this.index].fleetId = item.id;
-			this.jhOrderPlanForwardList[this.index].name = item.name;
-			this.jhOrderPlanForwardList[this.index].xsUserId = 0;
-			console.log('杞﹂槦閫夋嫨', this.jhOrderPlanForwardList[this.index]);
-		},
-		addForm() {
-			this.jhOrderPlanForwardList.push({
-				orderPlanId: this.orderPlanId,
-				name: '',
-				carNum: 0,
-				xsUserId: 0,
-				fleetId: 0,
-				checkboxValue1: ''
+		forwardFleetObjectSelect(item, index) {
+			this.$nextTick(() => {
+				let isableAdd = this.jhOrderPlanForwardList.filter(v => item.name === v.name);
+				if (isableAdd.length > 0) {
+					this.$u.toast('瀛樺湪閲嶅娣诲姞');
+					this.selectPopupShow = true;
+				} else {
+					this.selectPopupShow = false;
+					this.jhOrderPlanForwardList[this.index].fleetId = item.id;
+					this.jhOrderPlanForwardList[this.index].name = item.name;
+					this.jhOrderPlanForwardList[this.index].xsUserId = 0;
+				}
 			});
+		},
+		// 娣诲姞涓�缁勮〃鍗�
+		addForm() {
+			// 鍒ゆ柇鏄惁鏈変竴涓閫夛紝濡傛灉鏈夊垯绂佹鏂板姞鐨勫閫夛紝娌℃湁鍒欎笉绂佹
+			let ischeck = this.jhOrderPlanForwardList.some(v => v.ischecked == true);
+			if (!ischeck) {
+				this.jhOrderPlanForwardList.push({
+					orderPlanId: this.orderPlanId,
+					name: '',
+					carNum: 0,
+					xsUserId: 0,
+					fleetId: 0,
+					checkboxValue1: '',
+					ischecked: false
+				});
+			} else {
+				this.jhOrderPlanForwardList.push({
+					orderPlanId: this.orderPlanId,
+					name: '',
+					carNum: 0,
+					xsUserId: 0,
+					fleetId: 0,
+					checkboxValue1: '',
+					ischecked: true
+				});
+			}
 		},
 		// 鍒犻櫎涓�缁勮〃鍗�
 		deleteGroup(index, v) {
@@ -250,6 +330,9 @@
 		// 鎻愪氦
 		submitForm() {
 			let isPass = false;
+			if (this.jhOrderPlanForwardList.length === 0) {
+				this.$u.toast('璇疯嚦灏戦�夋嫨涓�缁勮浆鍙戝璞�');
+			}
 			this.jhOrderPlanForwardList.forEach(v => {
 				if (isNaN(Number(v.carNum)) || Number(v.carNum) <= 0) {
 					this.$u.toast('璇疯緭鍏ュ悎娉曟暟瀛�');
@@ -281,7 +364,6 @@
 			}
 		},
 		tabClick(item) {
-			console.log('tab鐐瑰嚮', item);
 			if (item.name == '璐т唬') {
 				this.tabHuoDai = true;
 			} else {

--
Gitblit v1.9.1