Browse Source

解决时间选择器被阻挡问题、外委人员数输入验证

HD_wangm 2 months ago
parent
commit
b9b7550b70

+ 0 - 20
pages/order/detail/resetIndex.uvue

@@ -39,28 +39,8 @@
 					    <text class="info-label">接单时间</text>
 					    <text class="info-value">{{ acceptTime ?? '' }}</text>
 					</view>
-					<!-- <view class="info-item">
-					    <text class="info-label">挂起原因</text>
-					    <view class="form-picker" @click="showReasonPicker = true">
-					        <view class="picker-display">
-					            <text v-if="suspendReason" class="selected-value">{{ suspendReason }}</text>
-					            <text v-else class="placeholder">请选择挂起原因</text>
-					            <text class="arrow">▼</text>
-					        </view>
-					    </view>
-					</view> -->
                 </view>
             </view>
-			<!-- <view class="info-section">
-				<view class="section-title">
-					<text class="section-title-text">工作负责人</text>
-				</view>
-				<view class="info-card">
-					<view class="info-item">
-						<input class="input" type="text" placeholder="请输入工作负责人" v-model="teamLeaderName" />
-					</view>
-				</view>
-			</view> -->
 			<!-- 工作负责人选择 -->
 			<view class="info-section">
 			    <!-- <view class="section-title">

+ 1 - 1
pages/order/detail/restartIndex.uvue

@@ -46,7 +46,7 @@
 								    class="input-field"
 								    placeholder="请选择恢复运行时间"
 								    v-model="restartTime"
-									readonly
+									:disabled="true"
 								/>
 						    </view>
 						</view>

+ 1 - 1
pages/order/detail/shutdownIndex.uvue

@@ -46,7 +46,7 @@
 								    class="input-field"
 								    placeholder="请选择停机时间"
 								    v-model="pauseTime"
-									readonly
+									:disabled="true"
 								/>
 						    </view>
 						</view>

+ 20 - 1
pages/order/detail/wbBackfillFinalize.uvue

@@ -63,6 +63,7 @@
 								    class="input-field"
 								    placeholder="请选择开始时间"
 								    v-model="realStartTime"
+									:disabled="true"
 								/>
                             </view>
                         </view>
@@ -79,6 +80,7 @@
 								    class="input-field"
 								    placeholder="请选择结束时间"
 								    v-model="realEndTime"
+									:disabled="true"
 								/>
                             </view>
                         </view>
@@ -95,6 +97,7 @@
                                 class="input-field"
                                 placeholder="请输入外委人员数"
                                 v-model="wwryNum"
+                                @input="onWwryNumInput"
                             />
                         </view>
                     </view>
@@ -110,6 +113,7 @@
                                 class="input-field"
                                 placeholder="请输入外来人员数"
                                 v-model="wlryNum"
+                                @input="onWlryNumInput"
                             />
                         </view>
                     </view>
@@ -354,6 +358,22 @@
         }
     };
 
+    // 外委人员数输入处理
+    const onWwryNumInput = (): void => {
+		let value = wwryNum.value;
+        // 移除非数字字符,包括负号和小数点
+        value = value.replace(/[^0-9]/g, '');
+        wwryNum.value = value;
+    };
+
+    // 外来人员数输入处理
+    const onWlryNumInput = (): void => {
+		let value = wlryNum.value;
+        // 移除非数字字符,包括负号和小数点
+        value = value.replace(/[^0-9]/g, '');
+        wlryNum.value = value;
+    };
+
     // 验证和提交
     const submitLoading = ref<boolean>(false)
 
@@ -528,7 +548,6 @@
             return false;
         }
 		
-		
 		// if (infoEntry.value == '2' && (workGroupMemberName.value == '' || selectedUsers.value.length == 0)) {
 		//     uni.showToast({
 		//         title: '请选择工作班成员',

+ 20 - 2
pages/order/detail/wbFinalize.uvue

@@ -110,7 +110,7 @@
 								    class="input-field"
 								    placeholder="请选择开始时间"
 								    v-model="realStartTime"
-									readonly
+									:disabled="true"
 								/>
                             </view>
                         </view>
@@ -127,7 +127,7 @@
 								    class="input-field"
 								    placeholder="请选择结束时间"
 								    v-model="realEndTime"
-									readonly
+									:disabled="true"
 								/>
                             </view>
                         </view>
@@ -144,6 +144,7 @@
                                 class="input-field"
                                 placeholder="请输入外委人员数"
                                 v-model="wwryNum"
+                                @input="onWwryNumInput"
                             />
                         </view>
                     </view>
@@ -159,6 +160,7 @@
                                 class="input-field"
                                 placeholder="请输入外来人员数"
                                 v-model="wlryNum"
+                                @input="onWlryNumInput"
                             />
                         </view>
                     </view>
@@ -553,6 +555,22 @@
         }
     };
 
+    // 外委人员数输入处理
+    const onWwryNumInput = (): void => {
+		let value = wwryNum.value;
+        // 移除非数字字符,包括负号和小数点
+        value = value.replace(/[^0-9]/g, '');
+        wwryNum.value = value;
+    };
+
+    // 外来人员数输入处理
+    const onWlryNumInput = (): void => {
+		let value = wlryNum.value;
+        // 移除非数字字符,包括负号和小数点
+        value = value.replace(/[^0-9]/g, '');
+        wlryNum.value = value;
+    };
+
     // 验证和提交
     const submitLoading = ref<boolean>(false)
 

+ 27 - 4
pages/order/detail/wxFinalize.uvue

@@ -122,7 +122,8 @@
 								    class="input-field"
 								    placeholder="请选择开始时间"
 								    v-model="realStartTime"
-									readonly
+									:disabled="true"
+									style="pointer-events: none;"
 								/>
                             </view>
                         </view>
@@ -139,8 +140,12 @@
 								    class="input-field"
 								    placeholder="请选择结束时间"
 								    v-model="realEndTime"
-									readonly
+									:disabled="true"
+									
 								/>
+								<!-- <text class="input-field">
+									{{ realEndTime != '' ? realEndTime : '请选择结束时间' }}
+								</text> -->
                             </view>
                         </view>
                     </view>
@@ -173,6 +178,7 @@
                                 class="input-field"
                                 placeholder="请输入外委人员数"
                                 v-model="wwryNum"
+                                @input="onWwryNumInput"
                             />
                         </view>
                     </view>
@@ -188,6 +194,7 @@
                                 class="input-field"
                                 placeholder="请输入外来人员数"
                                 v-model="wlryNum"
+                                @input="onWlryNumInput"
                             />
                         </view>
                     </view>
@@ -265,7 +272,7 @@
 
             <!-- 时间选择器弹窗 -->
 			<!-- Start Date Picker -->
-			<l-popup v-model="showStartTimePicker" position="bottom">
+			<l-popup v-model="showStartTimePicker" position="bottom" :safe-area-inset-bottom="true" :z-index="10000">
 				<l-date-time-picker
 					title="选择开始时间"
 					:mode="1 | 2 | 4 | 8 | 16"
@@ -279,7 +286,7 @@
 			</l-popup>
 
 			<!-- End Date Picker -->
-			<l-popup v-model="showEndTimePicker" position="bottom">
+			<l-popup v-model="showEndTimePicker" position="bottom" :safe-area-inset-bottom="true" :z-index="10000">
 				<l-date-time-picker
 					title="选择结束时间"
 					:mode="31"
@@ -650,6 +657,22 @@
         }
     };
 
+    // 外委人员数输入处理
+    const onWwryNumInput = (): void => {
+		let value = wwryNum.value;
+        // 移除非数字字符,包括负号和小数点
+        value = value.replace(/[^0-9]/g, '');
+        wwryNum.value = value;
+    };
+
+    // 外来人员数输入处理
+    const onWlryNumInput = (): void => {
+		let value = wlryNum.value;
+        // 移除非数字字符,包括负号和小数点
+        value = value.replace(/[^0-9]/g, '');
+        wlryNum.value = value;
+    };
+
     // 验证和提交
     const submitLoading = ref<boolean>(false)