From 5c01be6370291febe52adfa74fad8101a197c388 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期二, 28 三月 2023 18:27:19 +0800
Subject: [PATCH] 微信绑定测试

---
 pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue |   71 ++++++++++++++++++++---------------
 1 files changed, 41 insertions(+), 30 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 0fbcc08..b4bcb74 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
@@ -2,23 +2,23 @@
 	<view class="bill-of-lading-details">
 		<view class="bangDanMessage">
 			<view class="">
-				<text>瀹㈡埛锛歿{ coalDetailsData.customerName }}</text>
-				<text>鐭垮巶锛歿{ coalDetailsData.deptName }}</text>
+				<text>瀹㈡埛锛歿{ coalDetailsData.customerName || '' }}</text>
+				<text>鐭垮巶锛歿{ coalDetailsData.deptName || '' }}</text>
 			</view>
 			<view class="">
-				<text>鐨噸锛歿{ coalDetailsData.skin }}</text>
-				<text>姣涢噸锛歿{ coalDetailsData.hair }}</text>
-				<text>鍑�閲嶏細{{ coalDetailsData.clean }}</text>
+				<text>鐨噸锛歿{ coalDetailsData.skin || '' }}</text>
+				<text>姣涢噸锛歿{ coalDetailsData.hair || '' }}</text>
+				<text>鍑�閲嶏細{{ coalDetailsData.clean || '' }}</text>
 			</view>
 			<view class="">
-				<text>纾呭崟绫诲瀷锛歿{ coalDetailsData.orderTye }}</text>
+				<text>纾呭崟绫诲瀷锛歿{ coalDetailsData.orderTye || '' }}</text>
 				<text>鐘舵�侊細{{ coalStatus[coalDetailsData.status] }}</text>
 			</view>
 			<view class="">
-				<text>鐓ゅ満锛歿{ coalDetailsData.filedName }}</text>
-				<text>鍙戣繍鏃堕棿锛歿{ coalDetailsData.sendDate }}</text>
-				<text>鎻愮叅鍗曠紪鍙凤細{{ coalDetailsData.code }}</text>
-				<text>璁㈠崟缂栧彿锛歿{ coalDetailsData.orderCode }}</text>
+				<text>鐓ゅ満锛歿{ coalDetailsData.filedName || '' }}</text>
+				<text>鍙戣繍鏃堕棿锛歿{ coalDetailsData.sendDate || '' }}</text>
+				<text>鎻愮叅鍗曠紪鍙凤細{{ coalDetailsData.code || '' }}</text>
+				<text>璁㈠崟缂栧彿锛歿{ coalDetailsData.orderCode || '' }}</text>
 			</view>
 		</view>
 		<view class="timeLine" style="font-size: 16rpx;">
@@ -52,6 +52,7 @@
 			yyId: null,
 			dayRZ: [],
 			coalDetailsData: {}, // 鎻愮叅鍗曡鎯�
+			currentPageCoalStatus: 0, // 褰撳墠椤甸潰鎻愮叅鍗曠姸鎬�
 			// 鑾峰彇鎵�鍦ㄧ鎴垮弬鏁�
 			getWeightHouseObj: {
 				deptId: '',
@@ -106,6 +107,8 @@
 					if (res.data.length > 0) {
 						this.serviceInfoObj.openId = res.data[0].openId;
 						this.serviceInfoObj.openName = res.data[0].openName;
+						uni.setStorageSync('customeropenId', this.serviceInfoObj.openId);
+						uni.setStorageSync('customerName', this.serviceInfoObj.openName);
 					}
 				}
 			});
@@ -128,6 +131,8 @@
 					// 鑾峰彇瀹㈡湇openId鍙傛暟璧嬪��
 					this.getServiceOpenid.deptId = this.coalDetailsData.deptId;
 					this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
+					// 鑾峰彇鎻愮叅鍗曠姸鎬�
+					this.currentPageCoalStatus = this.coalDetailsData.status;
 				}
 			});
 		},
@@ -148,7 +153,9 @@
 		// 绛惧埌
 		arriveClick() {
 			uni.navigateTo({
-				url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}`
+				url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}&coalStatus=${
+					this.currentPageCoalStatus
+				}&tmId=${this.getWeightHouseObj.tmId}`
 			});
 		},
 		// 鍏ュ満鐢宠
@@ -180,7 +187,7 @@
 					} else {
 						wx.join1v1Chat({
 							caller: { nickname: uni.getStorageSync('name'), openid: uni.getStorageSync('openid') },
-							listener: { nickname: '浠樺欢浣�', openid: 'oZjXk5e7G9uIvOzaTO6nFV51ALwk' }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid
+							listener: { nickname: uni.getStorageSync('customerName'), openid: uni.getStorageSync('customeropenId') }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid
 							backgroundType: 2,
 							roomType: 'voice',
 							success() {
@@ -211,9 +218,9 @@
 				console.log(res, '鑾峰彇纾呮埧');
 				if (res.code == 0) {
 					uni.navigateTo({
-						url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${res.data.id}&gateCameraId=${
-							res.data.lastEquipmentId
-						}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}`
+						url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${
+							res.data.id
+						}&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}`
 					});
 				} else {
 					this.$u.toast('鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�');
@@ -238,35 +245,39 @@
 		margin: vww(20);
 		margin-bottom: vww(10);
 		height: 40%;
-		font-size:vww(16);
-		font-weight: 500;
-		.u-text {
-			margin-bottom: vww(5) !important;
-		}
+		font-size: vww(18);
+		font-weight: 600;
 		view {
-			margin-bottom: vww(5);
+			margin-bottom: vww(10);
 		}
 		view:nth-of-type(1) {
 			display: flex;
-			text{
-				width:50%;
+			text {
+				width: 50%;
+				text-align: center;
 			}
 		}
 		view:nth-of-type(2) {
 			display: flex;
-			text{
-				width:33%;
+			text {
+				width: 33%;
+				text-align: center;
 			}
 		}
 		view:nth-of-type(3) {
 			display: flex;
-			text{
-				width:50%;
+			text {
+				width: 50%;
+				text-align: center;
 			}
 		}
-		view:nth-of-type(4){
-			display:flex;
+		view:nth-of-type(4) {
+			display: flex;
 			flex-direction: column;
+			text {
+				margin-bottom: vww(10);
+				text-align: center;
+			}
 		}
 	}
 	.timeLine {
@@ -284,7 +295,7 @@
 		}
 	}
 	.utilsBox {
-		padding: vww(20);
+		padding: vww(10) vww(20);
 		flex: 1;
 		display: flex;
 		flex-direction: column;

--
Gitblit v1.9.1