From 76a7460699861269561d715b0ea1eed026edb5b4 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期四, 03 八月 2023 08:15:59 +0800
Subject: [PATCH] 获取平均皮重参数修改

---
 pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 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 9f7d048..5ea444f 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
@@ -175,7 +175,8 @@
 				:disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh || !isInputOrigin"
 				:loading="isConfirmWeighLoading"
 				loadingText="纭"
-				@click="confirmWeigh"></u-button>
+				@click="confirmWeigh"
+				v-show="!historyBtn"></u-button>
 			<u-button type="primary"
 				text="杩斿洖鍔犲噺鍚�"
 				:disabled="addAndSubtractCoalDisabled"
@@ -184,7 +185,7 @@
 				v-if="outBuy"></u-button>
 		</view>
 		<view style="width: 200rpx;margin: auto;position: relative;"
-			v-if="historyBtn"><u-button type="primary"
+			v-if="!historyBtn"><u-button type="primary"
 				text="鏄剧ず鍘嗗彶鐨噸"
 				@click.stop="displayHistory"></u-button></view>
 		<Transition name="slide-fade">
@@ -339,8 +340,8 @@
 						.orderType ==
 						'杞嚭') {
 						if (this.weighList.skin == 0) {
-							this.getAverageSkin()
 							this.temporaryWeighObj.skin = newV;
+							this.getAverageSkin()
 							if (this.avgSkin < newV) {
 								this.abnormalModalShow = true
 								this.historyBtn = true
@@ -359,6 +360,11 @@
 							this.temporaryWeighObj.hair = newV;
 						} else {
 							this.temporaryWeighObj.skin = newV;
+							this.getAverageSkin()
+							if (this.avgSkin < newV) {
+								this.abnormalModalShow = true
+								this.historyBtn = true
+							}
 							this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(
 								2);
 							this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this
@@ -553,7 +559,7 @@
 				uni.showLoading({
 					title: "鍔犺浇涓�"
 				})
-				this.$reqGet('getAvgSkin').then(res => {
+				this.$reqGet('getAvgSkin', { xsUserId1: this.weighList.xsUserId1 }).then(res => {
 					if (res.code === 0) {
 						uni.hideLoading()
 						this.avgSkin = res.data.avgSkin

--
Gitblit v1.9.1