From 029dd92e96bec1ca325e99f154c8a2188919e8d5 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期一, 26 六月 2023 08:49:56 +0800
Subject: [PATCH] 增加验质功能

---
 pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue |   36 +++++++++++++++++++++++++-----------
 1 files changed, 25 insertions(+), 11 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 6831ae7..f1e7407 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
@@ -18,11 +18,11 @@
 			<view class="block-information">
 				<view class="block-main">
 					<view class="basic">
-						<view class="coalName">{{ coalDetailsData.coalName }}</view>
+						<view class="coalName">{{ coalDetailsData.coalName||'' }}</view>
 						<view class="status-button"
 							style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/statusbutton.png') no-repeat;
 										background-size: cover;">
-							{{ coalStatus[coalDetailsData.status] || '' }}
+							{{ coalStatus[coalDetailsData.statusWeigh] || '' }}
 						</view>
 					</view>
 					<view class="time">
@@ -34,24 +34,29 @@
 					<view class="coal-code">鎻愮叅鍗曠紪鍙�:&nbsp;&nbsp;{{ coalDetailsData.code || '' }}</view>
 					<view class="order-code">
 						璁㈠崟缂栧彿:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ coalDetailsData.orderCode || '' }}</view>
+					<view class="coal-code"
+						@click="jumpWeighDetail"
+						style="color: rgb(73, 123, 251);">
+						鏌ョ湅鏄庣粏
+					</view>
 					<view class="weigh-item">
 						<view class="item">
 							<view class="concrete"
 								style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/skin.png') no-repeat;background-size: cover;">
 								鐨�</view>
-							<view class="num">{{ coalDetailsData.skin }}</view>
+							<view class="num">{{ showWeigh.skin }}</view>
 						</view>
 						<view class="item">
 							<view class="concrete"
 								style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/hair.png') no-repeat;background-size: cover;">
 								姣�</view>
-							<view class="num">{{ coalDetailsData.hair }}</view>
+							<view class="num">{{ showWeigh.hair }}</view>
 						</view>
 						<view class="item">
 							<view class="concrete"
 								style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clean.png') no-repeat;background-size: cover;">
 								鍑�</view>
-							<view class="num">{{ coalDetailsData.clean }}</view>
+							<view class="num">{{ showWeigh.clean }}</view>
 						</view>
 					</view>
 				</view>
@@ -174,9 +179,7 @@
 					openId: null,
 					openName: ''
 				},
-				coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
-					'杩涘叆鍦洪櫌'
-				], // 鐘舵��
+				coalStatus: ['鏈О閲�', '绉伴噸涓�', '楠岃川涓�', '绉伴噸瀹屾垚'], // 鐘舵��
 				weighHouseCode: '',
 				// 鏀剧┖寮圭獥鎺у埗鍙橀噺
 				evacuationModalShow: false,
@@ -243,6 +246,11 @@
 			},
 			isapproach() {
 				return this.currentPageCoalStatus !== 3;
+			},
+			// 灞曠ず鐨瘺鍑�
+			showWeigh() {
+				return this.coalDetailsData.tmTaskCoalItems ? (this.coalDetailsData.tmTaskCoalItems[0] ? this
+					.coalDetailsData.tmTaskCoalItems[0] : {}) : {}
 			}
 		},
 		methods: {
@@ -287,8 +295,8 @@
 					title: '鍔犺浇涓�'
 				});
 				this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
+					uni.hideLoading();
 					if (res.code == 0) {
-						uni.hideLoading();
 						console.log(res, '鎻愮叅鍗曡鎯�');
 						this.coalDetailsData = res.data;
 						this.orderType = this.coalDetailsData.orderType;
@@ -311,7 +319,7 @@
 						this.getServiceOpenid.deptId = this.coalDetailsData.deptId;
 						this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
 						// 鑾峰彇鎻愮叅鍗曠姸鎬�
-						this.currentPageCoalStatus = this.coalDetailsData.status;
+						this.currentPageCoalStatus = this.coalDetailsData.statusWeigh;
 						// 鑾峰彇鍘熷彂淇℃伅
 						this.primarySkin = this.coalDetailsData.skinTwo;
 						this.primaryHair = this.coalDetailsData.hairTwo;
@@ -356,7 +364,7 @@
 							});
 						}
 					});
-				}, 5000);
+				}, 10000);
 			},
 			// 灞曠ず鎻愮叅鍗曡鎯�
 			showCaolPickUpBill() {
@@ -493,6 +501,12 @@
 			completeOutSaleCancel() {
 				this.completeOutSaleShow = false
 			},
+			// 鏌ョ湅璐ㄩ噺鏄庣粏
+			jumpWeighDetail() {
+				uni.navigateTo({
+					url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${this.orderPlanId}`
+				})
+			}
 		}
 	};
 </script>

--
Gitblit v1.9.1