From 46acd5c32a3eb1bc64df27c85c5e656d737f81b0 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期一, 11 九月 2023 16:37:21 +0800
Subject: [PATCH] 增加皮重异常提示 修改隐私协议

---
 pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue |   35 ++++++++++++++++-
 pages/driver-page/drvier-my/drvier-my.vue                                               |   15 ++++++-
 pages/login/login.vue                                                                   |   38 ------------------
 pages/login/PrivacyAgreementText/PrivacyAgreementText.vue                               |   32 +++++++++++++++
 4 files changed, 77 insertions(+), 43 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 2f82a84..f86efe3 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
@@ -103,7 +103,10 @@
 			style="width: 100%;height: 40rpx;"></view>
 		<view class="history-utils">
 			<view class="history-utils_item">
-				骞冲潎鐨噸:{{avgSkin}}
+				<text>骞冲潎鐨噸:{{avgSkin}}</text>
+				<text style="color: #ff6363;font-weight: bold;font-size: 26rpx;"
+					class="error-tip"
+					v-if="errorTipShow">* 寮傚父</text>
 			</view>
 			<view class="history-utils_item btn">
 				<u-button plain
@@ -202,6 +205,9 @@
 				<view class="main-information">
 					<view class="prefix">璁㈠崟浣欓噺:</view>
 					<view class="suffix">{{ weighList.orderSurplus ||""  }}</view>
+					<text style="color: #ff6363;font-weight: bold;font-size: 26rpx;"
+						class="error-tip"
+						v-show="isweigh">* 璁㈠崟浣欓噺涓嶈冻</text>
 				</view>
 			</view>
 		</view>
@@ -287,6 +293,7 @@
 			this.init();
 			this.changeWeigh('')
 			this.realTimeWeigh = 0
+			console.log(this.abnormalModalShow);
 		},
 		components: {
 			combinedTitle
@@ -352,7 +359,8 @@
 				historyBtn: false,
 				historyShow: false,
 				// 鏄惁鍦ㄧО鐨噸锛岀偣鍑荤‘瀹氱О閲嶅垽鏂槸鍚﹀紓甯�
-				isSkinWeigh: false
+				isSkinWeigh: false,
+				errorTipShow: false
 			};
 		},
 		watch: {
@@ -370,6 +378,11 @@
 						if (this.weighList.skin == 0) {
 							this.isSkinWeigh = true
 							this.temporaryWeighObj.skin = newV;
+							let xx = new BigNumber(this.avgSkin)
+							let yy = new BigNumber(newV)
+							if (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) {
+								this.errorTipShow = true
+							}
 						} else {
 							this.isSkinWeigh = false;
 							this.temporaryWeighObj.hair = newV;
@@ -387,6 +400,11 @@
 						} else {
 							this.isSkinWeigh = true;
 							this.temporaryWeighObj.skin = newV;
+							let xx = new BigNumber(this.avgSkin)
+							let yy = new BigNumber(newV)
+							if (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) {
+								this.errorTipShow = true
+							}
 							this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(
 								2);
 							this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this
@@ -592,7 +610,7 @@
 						this.avgSkin = res.data.avgSkin
 						this.tmTaskCoalList = res.data.tmTaskCoalList
 						/**
-						 * @description true鐨勮瘽鏄笉寮傚父 false灏辨槸寮傚父 娌℃湁鍘嗗彶锛屽钩鍧囩毊閲嶄负0鏄涓�娆′篃鏄甯� */
+						 * @description true鐨勮瘽鏄涓�娆$О, false灏变笉鏄�,娌℃湁鍘嗗彶锛屽钩鍧囩毊閲嶄负0鏄涓�娆′篃鏄甯� */
 						this.isAbnormalAvgSkin = (Array.isArray(this.tmTaskCoalList) && this
 							.tmTaskCoalList.length === 0 || !this.tmTaskCoalList) && this.avgSkin == 0
 					} else {
@@ -845,6 +863,7 @@
 					@include flex;
 					justify-content: flex-start;
 					overflow: hidden;
+					position: relative;
 
 					.prefix {
 						min-width: vww(60);
@@ -854,6 +873,11 @@
 						flex: 1;
 						margin-left: vww(12);
 						text-align: left;
+					}
+
+					.error-tip {
+						position: absolute;
+						right: 200rpx;
 					}
 				}
 			}
@@ -894,6 +918,11 @@
 
 			&_item {
 				width: 50%;
+
+				.error-tip {
+					display: inline-block;
+					margin-left: 34rpx;
+				}
 			}
 
 			.btn {
diff --git a/pages/driver-page/drvier-my/drvier-my.vue b/pages/driver-page/drvier-my/drvier-my.vue
index 8420aa9..652a7c7 100644
--- a/pages/driver-page/drvier-my/drvier-my.vue
+++ b/pages/driver-page/drvier-my/drvier-my.vue
@@ -341,8 +341,19 @@
 					weight: {
 						type: 'number',
 						required: true,
-						message: '璇峰~鍐欎綋閲�',
-						trigger: ['blur', 'change']
+						trigger: ['blur', 'change'],
+						transform(value) {
+							return Number(value);
+						},
+						validator: (rule, value, callback) => {
+							if (!value) {
+								callback(new Error('璇峰~鍐欎綋閲�'))
+							} else if (value > 200) {
+								callback(new Error('璇峰~鍐欏悎鐞嗕綋閲�'))
+							} else {
+								callback()
+							}
+						}
 					},
 					carNo: [{
 							type: 'string',
diff --git a/pages/login/PrivacyAgreementText/PrivacyAgreementText.vue b/pages/login/PrivacyAgreementText/PrivacyAgreementText.vue
index 3256993..346768c 100644
--- a/pages/login/PrivacyAgreementText/PrivacyAgreementText.vue
+++ b/pages/login/PrivacyAgreementText/PrivacyAgreementText.vue
@@ -68,6 +68,10 @@
 				6.1&nbsp;&nbsp;濡傛灉鎮ㄥ鏈殣绉佹斂绛栨湁浠讳綍鐤戦棶鎴栨剰瑙侊紝璇烽�氳繃搴旂敤绋嬪簭鍐呯殑鑱旂郴鏂瑰紡涓庢垜浠仈绯汇�傛垜浠皢灏藉揩鍥炲鎮ㄥ苟瑙e喅鎮ㄧ殑闂銆�
 			</p>
 		</view>
+		<view class="use-button">
+			<button open-type="agreePrivacyAuthorization"
+				@click='agreeFile'>鎴戝凡鐭ユ檽骞跺悓鎰忔鍗忚</button>
+		</view>
 	</view>
 </template>
 
@@ -79,7 +83,11 @@
 			}
 		},
 		methods: {
-
+			agreeFile() {
+				uni.navigateTo({
+					url: '/pages/register/register'
+				});
+			},
 		}
 	}
 </script>
@@ -113,5 +121,27 @@
 		.section-detail {
 			color: rgb(83, 83, 83);
 		}
+
+		.use-button {
+			width: 98%;
+			height: vww(70);
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			/deep/ button {
+				width: 80%;
+				height: 40px;
+				line-height: 40px;
+				padding: 0 12px;
+				font-size: 28rpx;
+				font-weight: 300;
+				color: #ffffff;
+				background: #497bfb;
+				letter-spacing: 4rpx;
+				border-radius: 37rpx 37rpx 37rpx 37rpx;
+				box-shadow: 2rpx 3rpx 13rpx 0rpx rgba(43, 98, 239, 0.5), 0rpx 0rpx 9rpx 0rpx rgba(247, 250, 253, 0.29);
+			}
+		}
 	}
 </style>
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 30df810..aef23db 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -18,7 +18,7 @@
 				text="涓�閿粦瀹氭祴璇�"></u-button>
 		</view> -->
 		<view class="register"
-			@click="registerClick"><text>娉ㄥ唽</text></view>
+			@click="PrivacyAgreementHandle"><text>娉ㄥ唽</text></view>
 		<view class="login-bottom-box">
 			<view class="copyright">鍐�涓兘婧愭棤浜哄�煎畧寰俊灏忕▼搴�</view>
 			<view class="copyright">灏忕▼搴忎粎渚涘凡鎷ユ湁绯荤粺璐﹀彿鐗瑰畾鍐呴儴浜哄憳浣跨敤</view>
@@ -57,21 +57,6 @@
 				@confirm="bindWxConfirm"
 				@cancel="bindWxCancel"></u-modal>
 		</view>
-		<!-- 娉ㄥ唽鍚屾剰鑾峰彇闅愮淇℃伅 -->
-		<view class="privacy">
-			<u-modal :show="privacyShow"
-				:title="privacyTitle"
-				showCancelButton
-				@confirm="privacyConfirm"
-				@cancel="privacyCancel"
-				confirmText="鍚屾剰"
-				cancelText="涓嶅悓鎰�">
-				<view class="slot-content"
-					@click="PrivacyAgreementHandle">
-					<rich-text :nodes="PrivacyAgreement"></rich-text>
-				</view>
-			</u-modal>
-		</view>
 	</view>
 </template>
 
@@ -91,9 +76,6 @@
 				bindWxContent: '濡傛灉宸叉嫢鏈夌郴缁熻处鍙凤紝鍙互鐩存帴璺宠浆缁戝畾寰俊椤甸潰',
 				appid: "",
 				secret: "",
-				privacyShow: false,
-				privacyTitle: "娉ㄦ剰",
-				PrivacyAgreement: `<p>娉ㄥ唽鍗充唬琛ㄦ偍鍚屾剰鎴戜滑鐢ㄦ埛闅愮鍗忚</p><p  class='PrivacyAgreement'>鐐瑰嚮鏌ョ湅鐢ㄦ埛闅愮鍗忚</p>`
 			};
 		},
 		components: {
@@ -190,29 +172,11 @@
 			openPopup() {
 				console.log('鎵撳紑浜�');
 			},
-			privacyConfirm() {
-				this.loginPopupShow = false
-				uni.navigateTo({
-					url: '/pages/register/register'
-				});
-			},
-			privacyCancel() {
-				this.privacyShow = false
-			},
-			registerClick() {
-				this.privacyShow = true
-			},
 			PrivacyAgreementHandle() {
 				uni.navigateTo({
 					url: '/pages/login/PrivacyAgreementText/PrivacyAgreementText'
 				})
 			},
-			// 姝ゆ柟娉曞彧杩涜缁戝畾娴嬭瘯锛屽悗鏈熷凡閫氳繃鎵爜瑙e喅
-			jumpBindBack() {
-				uni.navigateTo({
-					url: '/pages/bindBackground/bindBackground'
-				})
-			}
 		}
 	};
 </script>

--
Gitblit v1.9.1