From 927e4a7caf46bd073c65ce3b8f14dc1f1582c519 Mon Sep 17 00:00:00 2001
From: wk
Date: 星期四, 14 十一月 2024 15:56:11 +0800
Subject: [PATCH] feat:车货总重最大载重增加判断

---
 pages/driver-page/appointment/appointment.vue |   57 +++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 45 insertions(+), 12 deletions(-)

diff --git a/pages/driver-page/appointment/appointment.vue b/pages/driver-page/appointment/appointment.vue
index 3c9cdd5..e11ebdb 100644
--- a/pages/driver-page/appointment/appointment.vue
+++ b/pages/driver-page/appointment/appointment.vue
@@ -1,5 +1,9 @@
 <template>
 	<view class="appointment">
+		<view class="appointment-description"
+			v-if="isRCSQ">
+			*鎮ㄥ綋鍓嶇殑棰勭害鏃堕棿娈�<text>{{yuYueSection}}</text>
+		</view>
 		<combined-title
 			:title="yuYueData.length != 0 ? yuYueData[0].filedName + '鈥斺��' + yuYueData[0].sendDate : '鏆傛棤棰勭害鍒楄〃'"></combined-title>
 		<view class="appointment-table">
@@ -19,7 +23,7 @@
 					<uni-td align="center">{{ item.carNum1 || '' }}</uni-td>
 					<uni-td><u-button text="閫夋嫨"
 							type="primary"
-							:disabled="item.carNum == item.carNum1"
+							:disabled="item.carNum == item.carNum1&&!isRCSQ"
 							@click="yuYueBtnClick(item)"></u-button></uni-td>
 				</uni-tr>
 			</uni-table>
@@ -54,19 +58,25 @@
 					yyId: '',
 					deptId: '',
 					filedId: '',
-					remark: ''
-				}
+				},
+				yuYueSection: '',
+				coalStatus: '',
+				tmId: ""
 			};
 		},
 		onLoad(params) {
 			if (params.type == '鍏ュ満鐢宠') {
 				this.isRCSQ = true;
 				this.rcsqData.originalYyId = params.yyId;
+				this.yuYueSection = params.yuYueSection
 			}
 			this.yuYuePostParams.takeCoalId = params.takeCoalId;
 			this.yuYueListParams.filedId = params.filedId;
 			this.yuYueListParams.deptId = params.deptId;
 			this.yuYueListParams.sendDate = params.sendDate;
+			this.yuYueListParams.coalName = params.coalName;
+			this.coalStatus = params.coalStatus;
+			this.tmId = params.tmId
 		},
 		onShow() {
 			this.init();
@@ -109,30 +119,40 @@
 						this.yuYueList();
 						this.$u.toast('棰勭害鎴愬姛');
 						let timer = setTimeout(() => {
-							uni.navigateBack({
-								delta: 1
-							});
-						}, 500);
+							uni.switchTab({
+								url: '/pages/tabbar-page/index-tabbar/index-tabbar'
+							})
+						}, 1500);
 					} else {
-						this.$u.toast(res.msg ? res.msg : '棰勭害澶辫触');
+						this.$u.toast(res.msg ? res.msg.replaceAll('<br/>',"\n").replaceAll(/\n/g, "\n").replaceAll(/\r/g, "\r") : '棰勭害澶辫触');
 					}
 				})
 			},
-			// 鍏ュ満鐢宠
+			// 鏇存崲棰勭害鏃堕棿娈�
 			saveRCSQ(value) {
 				this.rcsqData.yyId = value.id;
 				this.rcsqData.deptId = value.deptId;
 				this.rcsqData.filedId = value.filedId;
 				this.$reqPost('saveRCSQ', this.rcsqData, 'json').then(res => {
 					if (res.code == 0) {
-						this.$u.toast('鍏ュ満鐢宠鎴愬姛');
+						this.$u.toast('鏇存崲棰勭害鏃堕棿娈垫垚鍔�');
 						let timer = setTimeout(() => {
 							uni.switchTab({
 								url: '/pages/tabbar-page/index-tabbar/index-tabbar'
 							})
-						}, 500);
+						}, 1500);
+						//濡傛灉鏈鍒� 鍏堢鍒板啀鐢宠
+					} else if (res.code == 3) {
+						this.$u.toast('璇峰厛绛惧埌');
+						setTimeout(() => {
+							uni.navigateTo({
+								url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.yuYuePostParams.takeCoalId}&coalStatus=${
+								this.coalStatus}&tmId=${this.tmId}&yyId=${this.rcsqData.originalYyId}&filedId=${this.yuYueListParams.filedId}&deptId=${this.yuYueListParams.deptId}&sendDate=${this.yuYueListParams.sendDate}&yuYueSection=${this.yuYueSection}`
+							})
+						}, 1500)
+						return
 					} else {
-						this.$u.toast(res.msg ? res.msg : '鍏ュ満鐢宠澶辫触锛岃绋嶅悗閲嶈瘯');
+						this.$u.toast(res.msg ? res.msg : '鏇存崲棰勭害鏃堕棿娈靛け璐ワ紝璇风◢鍚庨噸璇�');
 					}
 				});
 			}
@@ -146,6 +166,19 @@
 		width: 94%;
 		margin: 0 auto;
 
+		// 棰勭害鐣岄潰鎻忚堪
+		.appointment-description {
+			margin: vww(8) 0;
+			color: #fd1446;
+
+			text {
+				font-weight: bold;
+				display: inline-block;
+				margin-left: vww(5);
+				color: #252525;
+			}
+		}
+
 		h1 {
 			font-size: vww(20);
 			text-align: center;

--
Gitblit v1.9.1