From 17efddc6a667670dca682bf36b51a43e99615e6d Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 16 十月 2024 15:59:38 +0800
Subject: [PATCH] 代码初始化

---
 h5/pages/driver/reserved.vue |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/h5/pages/driver/reserved.vue b/h5/pages/driver/reserved.vue
index 3477489..90f4ccd 100644
--- a/h5/pages/driver/reserved.vue
+++ b/h5/pages/driver/reserved.vue
@@ -7,8 +7,8 @@
 					<text>*</text>
 					<text>鍏ュ洯鍘熷洜</text>
 				</view>
-				<view class="value" @click="showReason = true">
-					<text class="mr6" :style="{ color: param.inReason ? '#000000' : '#999999' }">{{ param.inReason ? param.inReason : '璇烽�夋嫨' }}</text>
+				<view class="value" @click="reasonClick">
+					<text class="mr6" :class="{gray: param.id}" :style="{ color: param.inReason ? '#000000' : '#999999' }">{{ param.inReason ? param.inReason : '璇烽�夋嫨' }}</text>
 					<u-icon name="arrow-right" color="#CCCCCC" size="16"></u-icon>
 				</view>
 			</view>
@@ -105,7 +105,8 @@
 		</view>
 		
 		<!--  -->
-		<u-picker :show="showReason" keyName="reason" :columns="reasonList" @confirm="reasonConfirm"></u-picker>
+		<u-picker :show="showReason" keyName="reason" closeOnClickOverlay @close="showReason = false"
+			@cancel="showReason = false" :columns="reasonList" @confirm="reasonConfirm"></u-picker>
 		<u-datetime-picker
 			:show="showDatetime"
 			closeOnClickOverlay
@@ -149,6 +150,12 @@
 		this.initData()
 	},
 	methods: {
+		reasonClick() {
+			if(this.param.id){
+				return
+			}
+			this.showReason = true
+		},
 		onSubmit() {
 			const param = { ...this.param }
 			if (!param.arriveDate) return this.showToast('璇烽�夋嫨鍒板満鏃堕棿')
@@ -211,12 +218,14 @@
 			this.$forceUpdate();
 			this.closeInput();
 		},
+		closeInput() {
+			this.$refs.keyboard.close();
+		},
 		copy(){
 			if(this.param.carCodeFront){
 				this.$set(this.param, 'carCodeBack', this.param.carCodeFront)
 				this.showToast('澶嶅埗鎴愬姛');
 			}
-			
 		},
 		handleUpload() {
 			let token = uni.getStorageSync('token') || ''
@@ -260,9 +269,6 @@
 			  }
 			})
 		},
-		closeInput() {
-			this.$refs.keyboard.close();
-		}
 	}
 };
 </script>
@@ -298,6 +304,9 @@
 			display: flex;
 			align-items: center;
 			justify-content: flex-end;
+			.gray{
+				color: #999999 !important;
+			}
 			.btns {
 				display: flex;
 				align-items: center;

--
Gitblit v1.9.3