From d36eb757af8867278125c6999fcaa5bdb902151c Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期二, 21 三月 2023 17:38:45 +0800
Subject: [PATCH] 司机称重页面,签到页面

---
 pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue |   69 ++++++++++++++++++++++++----------
 1 files changed, 48 insertions(+), 21 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 27b78fa..42ae87c 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
@@ -11,7 +11,7 @@
 				<u-button text="鏀剧┖" type="primary" plain></u-button>
 				<u-button text="鍛煎彨瀹㈡湇" type="primary" plain></u-button>
 			</view>
-			<view class="utils_chil"><u-button text="灞曠ず鎻愮叅鍗�" @click="showCaolPickUpBill" type="primary" ></u-button></view>
+			<view class="utils_chil"><u-button text="灞曠ず鎻愮叅鍗�" @click="showCaolPickUpBill" type="primary"></u-button></view>
 			<view class="utils_chil"><u-button text="涓婄璁¢噺" @click="cengZhongClick" type="primary"></u-button></view>
 		</view>
 	</view>
@@ -30,29 +30,52 @@
 		return {
 			orderPlanId: null,
 			yyId: null,
-			dayRZ: []
+			dayRZ: [],
+			coalDetailsData: {}, // 鎻愮叅鍗曡鎯�
+			getWeightHouseObj: {
+				// 鑾峰彇鎵�鍦ㄧ鎴�
+				deptId: '',
+				filedId: '',
+				tmId: '',
+				tmCode: '',
+				carNo: ''
+			}
 		};
 	},
 	onShow() {
 		this.init();
 	},
-	computed:{
-		userName(){
-			return uni.getStorageSync('username')
+	computed: {
+		userName() {
+			return uni.getStorageSync('username');
 		},
-		openid(){
-			return uni.getStorageSync('openid')
+		openid() {
+			return uni.getStorageSync('openid');
 		}
 	},
 	methods: {
 		init() {
 			this.coalDayPage();
+			this.getTakeCoal();
+		},
+		// 鑾峰彇鎻愮叅鍗曡鎯�
+		getTakeCoal() {
+			this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
+				if (res.code == 0) {
+					this.coalDetailsData = res.data[0];
+					this.getWeightHouseObj.deptId = this.coalDetailsData.deptId;
+					this.getWeightHouseObj.filedId = this.coalDetailsData.filedId;
+					this.getWeightHouseObj.tmId = this.coalDetailsData.id;
+					this.getWeightHouseObj.tmCode = this.coalDetailsData.code;
+					this.getWeightHouseObj.carNo = this.coalDetailsData.carNo;
+				}
+			});
 		},
 		// 鏃ュ織鏌ヨ
 		coalDayPage() {
-			this.$reqGet('coalDayPage').then(res => {
+			this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => {
 				if (res.code == 0) {
-					this.dayRZ = res.data.records;
+					this.dayRZ = res.data;
 				}
 			});
 		},
@@ -64,8 +87,8 @@
 		},
 		// 绛惧埌
 		arriveClick() {
-			this.$reqPost('arrive', { id: this.orderPlanId }, 'params').then(res => {
-				console.log(res, '绛惧埌');
+			uni.navigateTo({
+				url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}`
 			});
 		},
 		// 鍏ュ満鐢宠
@@ -75,9 +98,9 @@
 			});
 		},
 		// 鍛煎彨瀹㈡湇
-		callCustomerService(){
+		callCustomerService() {
 			wx.join1v1Chat({
-				caller: { nickname:this.userName , openid: this.openid },
+				caller: { nickname: this.userName, openid: this.openid },
 				listener: { nickname: '瀹㈡湇', openid: 'orutI5YT0yEvARVngdsTmBpisWmw' }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid
 				backgroundType: 2,
 				roomType: 'voice'
@@ -85,13 +108,17 @@
 		},
 		// 绉伴噸
 		cengZhongClick() {
-			uni.navigateTo({
-				url:`/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}`
-			})
+			this.$reqGet('getWeighHouse', this.getWeightHouseObj).then(res => {
+				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.gateCameraId}&gateCameraCode=${res.data.gateCameraCode}&weighCode=${res.data.weighCode}`
+					});
+				}else{
+					this.$u.toast('鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�')
+				}
+			});
 		}
-		/**
-		 * @desc 绛夊緟鍙栫叅鍗曟帴鍙�
-		 * */
 	}
 };
 </script>
@@ -127,8 +154,8 @@
 		padding: vww(20);
 		box-sizing: border-box;
 		overflow-y: overlay; //琛屼负涓� auto 鐩稿悓锛屼絾鏄粴鍔ㄦ潯缁樺埗鍦ㄥ唴瀹逛箣涓婏紝鑰屼笉鏄崰鎹┖闂淬��
-		.u-text{
-			margin-bottom: vww(5)!important;
+		.u-text {
+			margin-bottom: vww(5) !important;
 		}
 	}
 	.utilsBox {

--
Gitblit v1.9.1