From b034b3ca571447861a2c594c537eba59089fefcd Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期日, 02 七月 2023 09:51:05 +0800
Subject: [PATCH] 称重页面判断逻辑修改

---
 pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)

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 11cfd62..896b7fd 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
@@ -71,19 +71,19 @@
 				<view class="main-information">
 					<view class="prefix">鐨噸:</view>
 					<view class="suffix">
-						{{temporaryWeighObj.skin?temporaryWeighObj.skin:showWeigh.skin?showWeigh.skin:''}}
+						{{temporaryWeighObj.skin||''}}
 					</view>
 				</view>
 				<view class="main-information">
 					<view class="prefix">姣涢噸:</view>
 					<view class="suffix">
-						{{temporaryWeighObj.hair?temporaryWeighObj.hair:showWeigh.hair?showWeigh.hair:''}}
+						{{temporaryWeighObj.hair?temporaryWeighObj.hair:showWeigh.skin?(showWeigh.skin||''):(showWeigh.hair||'')}}
 					</view>
 				</view>
 				<view class="main-information">
 					<view class="prefix">鍑�閲�:</view>
 					<view class="suffix">
-						{{ temporaryWeighObj.clean?temporaryWeighObj.clean:showWeigh.clean?showWeigh.clean:'' }}
+						{{ temporaryWeighObj.clean||''}}
 					</view>
 				</view>
 				<view class="main-information">
@@ -253,7 +253,7 @@
 			realTimeWeigh(newV, oldV) {
 				if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢' || this.weighList.orderType ==
 					'杞嚭') {
-					if (this.showWeigh.skin == 0) {
+					if (!this.showWeigh.skin) {
 						this.temporaryWeighObj.skin = newV;
 					} else {
 						this.temporaryWeighObj.hair = newV;
@@ -263,13 +263,13 @@
 					}
 				} else if (this.weighList.orderType == '澶栬喘' || this.weighList.orderType == '鍐呰喘' || this.weighList
 					.orderType == '杞叆') {
-					if (this.showWeigh.hair == 0) {
+					if (!this.showWeigh.hair) {
 						this.temporaryWeighObj.hair = newV;
 					} else {
 						this.temporaryWeighObj.skin = newV;
-						this.temporaryWeighObj.clean = (this.showWeigh.hair - this.temporaryWeighObj.skin).toFixed(2);
+						this.temporaryWeighObj.clean = (this.showWeigh.skin - newV).toFixed(2);
 						this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this.temporaryWeighObj
-							.clean < 0 || this.showWeigh.skin < newV;
+							.clean < 0 || this.showWeigh.skin < newV && this.showWeigh.skin > 0;
 					}
 				}
 			},
@@ -316,10 +316,6 @@
 				return this.weighList.tmTaskCoalItems ? (this.weighList.tmTaskCoalItems[0] ? this
 					.weighList.tmTaskCoalItems[0] : {}) : {}
 			},
-			nextShowWeigh() {
-				return this.weighList.tmTaskCoalItems ? (this.weighList.tmTaskCoalItems[1] ? this
-					.weighList.tmTaskCoalItems[1] : {}) : {}
-			},
 			weighHistory() {
 				return this.weighList.tmTaskCoalItems ? this.weighList.tmTaskCoalItems : []
 			}
@@ -341,8 +337,6 @@
 						this.weighData.carNo = res.data.carNo;
 						this.weighData.tmCode = res.data.code;
 						this.weighData.filedId = res.data.filedId;
-						this.weighData.coalContactHair = res.data.hairTwo ? res.data.hairTwo : 0;
-						this.weighData.coalContactSkin = res.data.skinTwo ? res.data.skinTwo : 0;
 						this.outBuy = (this.weighList.orderType.indexOf('閿�') !== -1) && this.showWeigh.skin > 0;
 						// 缁х画鍗歌揣鍙湁澶栬喘绫诲瀷绗簩娆′細鏈�
 						this.canUnload = this.weighList.orderType === '澶栬喘' && this.showWeigh.hair > 0;

--
Gitblit v1.9.1