From 37a0b120e66bcda386b0a8c256ca0fe9f09b29cb Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期四, 29 六月 2023 18:16:26 +0800
Subject: [PATCH] 司机首页添加状态,细节修改

---
 pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue |   69 +++++++++++++++++-----------------
 1 files changed, 35 insertions(+), 34 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 36b3c6a..ba94a84 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
@@ -185,11 +185,11 @@
 				:disabled="addAndSubtractCoalDisabled"
 				@click="addAndSubtractCoal"
 				class="jiajian"
-				v-if="outsourcing"></u-button>
+				v-if="outBuy"></u-button>
 			<u-button type="primary"
 				text="缁х画鍗歌揣"
 				@click="UnloadingAgainHandle"
-				v-if='outBuy'></u-button>
+				v-if='canUnload'></u-button>
 		</view>
 		<!-- <view class="four" v-if="weighList.orderType !== '澶栬喘'">濡傛偍闇�瑕佽皟鏁磋杞借揣鍝佸惃鏁帮紝璇风偣鍑昏繑鍥炲姞鍑忓惃</view> -->
 		<!-- 鏀剧┖寮圭獥 -->
@@ -280,8 +280,8 @@
 				isfocus2: false,
 				// 澶栬喘绫诲瀷
 				outBuy: true,
-				// 澶栭攢绫诲瀷
-				outsourcing: true
+				// 缁х画鍗歌揣鎸夐挳
+				canUnload: false
 			};
 		},
 		watch: {
@@ -290,7 +290,6 @@
 					'杞嚭') {
 					if (this.weighList.skin == 0) {
 						this.temporaryWeighObj.skin = newV;
-						this.isweigh = this.temporaryWeighObj.skin > this.weighList.orderSurplus;
 					} else {
 						this.temporaryWeighObj.hair = newV;
 						this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(2);
@@ -301,7 +300,6 @@
 					.orderType == '杞叆') {
 					if (this.weighList.hair == 0) {
 						this.temporaryWeighObj.hair = newV;
-						this.isweigh = this.temporaryWeighObj.hair > this.weighList.orderSurplus;
 					} else {
 						this.temporaryWeighObj.skin = newV;
 						this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(2);
@@ -373,19 +371,9 @@
 						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 == '澶栬喘' && this.weighList.hair > 0;
-						this.outsourcing = this.weighList.orderType == '澶栭攢' && this.weighList.hair > 0;
-						// if (this.weighList.orderType == '澶栬喘') {
-						// 	if (this.weighList.hair > 0) {
-						// 		this.outBuy = true
-						// 		this.outsourcing = false;
-						// 	}
-						// } else if (this.weighList.orderType == '澶栭攢') {
-						// 	if (this.weighList.hair > 0) {
-						// 		this.outsourcing = true;
-						// 		this.outBuy = false
-						// 	}
-						// }
+						this.outBuy = (this.weighList.orderType.indexOf('閿�') !== -1) && this.showWeigh.skin > 0;
+						// 缁х画鍗歌揣鍙湁澶栬喘绫诲瀷绗簩娆′細鏈�
+						this.canUnload = this.weighList.orderType === '澶栬喘' && this.showWeigh.hair > 0;
 					}
 				});
 			},
@@ -447,7 +435,8 @@
 					gateCameraId: this.weighData.gateCameraId,
 					equipmentCode: this.weighData.equipmentCode,
 					tmCode: this.weighData.tmCode,
-					sceneInOut: this.weighData.sceneInOut
+					sceneInOut: this.weighData.sceneInOut,
+					weigh: this.realTimeWeigh
 				}, 'json').then(res => {
 					if (res.code == 0) {
 						this.$u.toast('鎿嶄綔鎴愬姛锛屽嵆灏嗚繑鍥炰笂涓�椤�');
@@ -475,11 +464,16 @@
 					gateCameraId: this.weighData.gateCameraId,
 					equipmentCode: this.weighData.equipmentCode,
 					tmCode: this.weighData.tmCode,
-					sceneInOut: this.weighData.sceneInOut
+					sceneInOut: this.weighData.sceneInOut,
+					weigh: this.realTimeWeigh
 				}, 'json').then(res => {
 					if (res.code == 0) {
-						this.$u.toast('鎿嶄綔鎴愬姛');
-
+						this.$u.toast('鎿嶄綔鎴愬姛锛屽嵆灏嗚繑鍥炰笂涓�椤�');
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 1000);
 					} else {
 						this.$u.toast('鎿嶄綔澶辫触锛岃绋嶅�欓噸璇�');
 					}
@@ -698,7 +692,7 @@
 			width: calc(100% - 60rpx);
 			box-sizing: border-box;
 			height: 630rpx;
-			margin: 0 vww(15) vww(45) vww(15);
+			margin: 0 vww(15) vww(25) vww(15);
 			background: #ffffff;
 			box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
 			border-radius: 20rpx;
@@ -740,20 +734,27 @@
 		}
 
 		.three {
-			margin: 0 auto vww(20);
-			flex: 0.7;
-			display: flex;
+			margin: 0 auto vww(5);
+			width: 96%;
+			display: grid;
+			grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
+			justify-content: center;
+			gap: vww(10);
 			color: #939393;
 
 			.u-button {
-				&:nth-of-type(2) {
-					margin-left: vww(10);
-				}
-
-				&:nth-of-type(3) {
-					margin-left: vww(10);
-				}
+				width: vww(90);
 			}
+
+			// .u-button {
+			// 	&:nth-of-type(2) {
+			// 		margin-left: vww(10);
+			// 	}
+
+			// 	&:nth-of-type(3) {
+			// 		margin-left: vww(10);
+			// 	}
+			// }
 		}
 
 		.four {

--
Gitblit v1.9.1