From 96db936c641b23897636ff6a15e31f8f87964342 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期三, 11 十月 2023 13:44:05 +0800
Subject: [PATCH] 确定装卸逻辑修改 增加称重时稳定态

---
 pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue |    4 +-
 pages/tabbar-page/index-tabbar/index-tabbar.vue                                         |    6 ++-
 pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue        |   24 ++++++++++--
 pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue                           |   23 ++++++++++-
 store/index.js                                                                          |   10 ++++-
 5 files changed, 54 insertions(+), 13 deletions(-)

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 f2c9577..e1334a8 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
@@ -175,13 +175,13 @@
 						:disabled="correctStatus>= 3"></u-button>
 				</view>
 				<view class="bottom-button">
-					<u-button text="鏀剧┖"
+					<!-- <u-button text="鏀剧┖"
 						type="primary"
 						plain
 						@click="evacuation"
 						throttleTime="500"
 						shape="circle"
-						:disabled="isEvacuation || isapproach"></u-button>
+						:disabled="isEvacuation || isapproach"></u-button> -->
 					<u-button text="鍛煎彨瀹㈡湇"
 						type="primary"
 						plain
@@ -1207,8 +1207,7 @@
 				width: 100%;
 				margin: 0 auto;
 
-				.top-button,
-				.bottom-button {
+				.top-button {
 					width: 100%;
 					height: vww(47);
 					@include flex;
@@ -1222,6 +1221,23 @@
 						border: 2px solid #3b56eb;
 					}
 				}
+
+				.bottom-button {
+					width: 40%;
+					height: vww(47);
+					padding-left: vww(18);
+					@include flex;
+					justify-content: flex-start;
+
+					.u-button {
+						width: 100%;
+						height: 60rpx;
+						font-size: 28rpx;
+						font-weight: 300;
+						color: #497bfb;
+						border: 2px solid #3b56eb;
+					}
+				}
 			}
 		}
 
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 9f8bb93..750e47f 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
@@ -194,7 +194,7 @@
 			<!-- 澶栭攢璁㈠崟绉扮毊鏃讹紝杩斿洖鍔犲噺鍚ㄦ寜閽疆鐏般�傜О姣涙椂鍙敤.澶栬喘璁㈠崟锛屼笉鍑虹幇杩斿洖鍔犲噺鍚ㄧ殑鎸夐挳 -->
 			<u-button type="primary"
 				text="纭畾绉伴噸"
-				:disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh ||!mergeState"
+				:disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh ||!mergeState||globalWarning"
 				:loading="isConfirmWeighLoading"
 				loadingText="纭"
 				@click="confirmWeigh"
@@ -453,7 +453,7 @@
 		},
 		computed: {
 			...mapState(['globalweigh', 'globalinfraredStatus', 'globalisconnect', 'globalisUploadimg', 'globalisLogin',
-				'is_open_socket', 'socketTask', 'confirmWeighVisiable', 'confirmWeighContent'
+				'is_open_socket', 'socketTask', 'confirmWeighVisiable', 'confirmWeighContent', 'globalWarning'
 			]),
 			coalContactClean() {
 				let xx = BigNumber(this.weighData.coalContactHair)
diff --git a/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue b/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue
index 8f58301..63bbf02 100644
--- a/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue
+++ b/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue
@@ -49,6 +49,10 @@
 						<view class="info code">
 							璁㈠崟缂栧彿:{{item.code}}
 						</view>
+						<view class="info confirmPeople"
+							v-if="item.confirmPeople">
+							瀹℃牳浜�:{{item.confirmPeople}}
+						</view>
 					</view>
 				</view>
 				<view class="confirm-button">
@@ -59,7 +63,7 @@
 						@click.stop="loadOrder(item.id)"
 						:loading="loading"
 						loadingText="纭"
-						v-if='!item.ableDischar'></u-button>
+						v-if='!item.ableDischar&&item.isContainLoginUser'></u-button>
 				</view>
 			</view>
 		</view>
@@ -87,6 +91,11 @@
 				], // 鐘舵��
 			}
 		},
+		computed: {
+			userId() {
+				return uni.getStorageSync('userId')
+			}
+		},
 		onLoad(params) {
 			this.name = params.coalName ? params.coalName : ''
 			this.init()
@@ -108,7 +117,10 @@
 							return {
 								...v,
 								ableDischar: v.skin === v.hair || v.hair === 0 && v.skin === 0 || v
-									.isPretendDischar !== 0 || errorStatusArr.indexOf(v.status) !== -1
+									.isPretendDischar !== 0 || errorStatusArr.indexOf(v.status) !== -1,
+								isContainLoginUser: v.confirmPeopleId ? v.confirmPeopleId.split(',')
+									.indexOf(this.userId) === -
+									1 : true
 							}
 						})
 					} else {
@@ -227,12 +239,17 @@
 				}
 
 				.createTime,
-				.code {
+				.code,
+				.confirmPeople {
 					width: 100%;
 					margin-left: vww(9);
 					display: flex;
 					justify-content: flex-start;
 				}
+
+				.confirmPeople {
+					margin-top: vww(24);
+				}
 			}
 
 
diff --git a/pages/tabbar-page/index-tabbar/index-tabbar.vue b/pages/tabbar-page/index-tabbar/index-tabbar.vue
index d6216d9..3dc9c8c 100644
--- a/pages/tabbar-page/index-tabbar/index-tabbar.vue
+++ b/pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -174,7 +174,8 @@
 					if (this.globalweighHouseCode && nowWeighObj.eqCode == this.globalweighHouseCode) {
 						this.changeWeigh(nowWeighObj.weigh);
 						this.changeinfraredStatus(!!nowWeighObj.eqInfraredStatus);
-						console.log(!!nowWeighObj.eqInfraredStatus, '绾㈠鐘舵��');
+						let warningState = nowWeighObj.warning == 1
+						this.changeWarning(warningState)
 					}
 				} else if (v.startsWith('msg')) {
 					function removeTags(str) {
@@ -204,7 +205,8 @@
 		},
 		methods: {
 			...mapMutations(['pushMessage', 'changeWeigh', 'changeinfraredStatus', 'changeisconnect', 'websocketInit',
-				'changewsgVisiable', 'changewsgContent', 'changeconfirmWeighVisiable', 'changeconfirmWeighContent'
+				'changewsgVisiable', 'changewsgContent', 'changeconfirmWeighVisiable', 'changeconfirmWeighContent',
+				'changeWarning'
 			]),
 			messagePage() {
 				uni.navigateTo({
diff --git a/store/index.js b/store/index.js
index fd6fdcb..9e1b08f 100644
--- a/store/index.js
+++ b/store/index.js
@@ -147,7 +147,9 @@
 		wsgContent: '',
 		globalIsFirstWeighing: 1, //鏄惁鏄涓�娆′笂纾�
 		confirmWeighVisiable: false, //纾呮埧绠$悊纭绉伴噸瀹屾垚鎻愮ず寮圭獥
-		confirmWeighContent: ''
+		confirmWeighContent: '',
+		// 绉伴噸绋冲畾鎬�  0/绋冲畾 1/闈炵ǔ瀹�  闈炵ǔ瀹氭�佷笉鑳界偣绉伴噸
+		globalWarning: false,
 	},
 	mutations: {
 		lengthchange(state, payload) {
@@ -244,7 +246,11 @@
 		},
 		changeconfirmWeighContent(state, payload) {
 			state.confirmWeighContent = payload
-		}
+		},
+		// 鏀瑰彉绋冲畾鎬�
+		changeWarning(state, payload) {
+			state.globalWarning = payload
+		},
 	},
 	actions: {
 		websocketInit({ state, dispatch, commit }) {

--
Gitblit v1.9.1