HD_wangm 4 bulan lalu
induk
melakukan
4542e0a0f3

+ 33 - 15
pages/order/detail/acceptIndex.uvue

@@ -112,19 +112,26 @@
 						</view>
 					</view>
 			        <scroll-view class="modal-body" scroll-y="true">
-			            <view
-			                v-for="(option, index) in teamLeaderList"
-			                :key="index"
-			                class="picker-option"
-			                :class="{ 'selected': index === selectedTeamLeaderIndex }"
-			                @click="selectLeaderManually(index)"
-			            >
-							<!-- <text class="option-text">{{ option.label }}</text>
-							<text class="option-text">{{ option.value }}</text> -->
-			                <text class="option-text">{{ option.nickName }}</text>
-							<text class="option-text">{{ option.deptName }}</text>
-			                <text v-if="index === selectedTeamLeaderIndex" class="option-check">✓</text>
-			            </view>
+						<!-- 有数据时显示列表 -->
+						<view v-if="teamLeaderList.length > 0">
+							<view
+								v-for="(option, index) in teamLeaderList"
+								:key="index"
+								class="picker-option"
+								:class="{ 'selected': index === selectedTeamLeaderIndex }"
+								@click="selectLeaderManually(index)"
+							>
+								<!-- <text class="option-text">{{ option.label }}</text>
+								<text class="option-text">{{ option.value }}</text> -->
+								<text class="option-text">{{ option.nickName }}</text>
+								<text class="option-text">{{ option.deptName }}</text>
+								<text v-if="index === selectedTeamLeaderIndex" class="option-check">✓</text>
+							</view>
+						</view>
+						<!-- 无数据时显示提示 -->
+						<view v-else class="empty-tip">
+						    <text>未找到匹配的人员</text>
+						</view>
 			        </scroll-view>
 			    </view>
 			</view>
@@ -747,7 +754,7 @@
 	    background-color: #ffffff;
 	    border-top-left-radius: 16rpx;
 	    border-top-right-radius: 16rpx;
-	    max-height: 700rpx;
+	    max-height: 1000rpx;
 	}
 
 	.modal-header {
@@ -770,7 +777,8 @@
 	}
 
 	.modal-body {
-	    max-height: 600rpx;
+	    // max-height: 800rpx;
+		min-height: 800rpx;
 	}
 
 	.picker-option {
@@ -852,5 +860,15 @@
 			color: #999999;
 		}
 	}
+
+	.empty-tip {
+	    justify-content: space-between;
+	    // text-align: center;
+	    padding: 24rpx 30rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		color: #999;
+	}
 </style>
 

+ 14 - 10
pages/order/detail/index.uvue

@@ -77,7 +77,7 @@
 	const statusDictList = ref<SysDictData[]>([]) // 工单状态字典列表
 	// 添加字典加载状态
 	const dictLoaded = ref<boolean>(false)
-	
+
 	const formatDate = (dateString: string): string => {
 	  if (dateString == '' || dateString == null) return ''
 	  const date = new Date(dateString)
@@ -88,11 +88,11 @@
 	  const minutes = date.getMinutes().toString().padStart(2, '0')
 	  return `${year}-${month}-${day} ${hours}:${minutes}`
 	}
-	
+
 	// 根据状态显示不同的时间label
 	const getLabel = (item : acceptOrderInfo): string|null => {
 		if (item == null) return null
-	
+
 		// 如果是"待接单"状态,显示派单时间
 		if (item.workOrderStatus == 'assigned') {
 			return '下发时间'
@@ -112,16 +112,16 @@
 		} else if(item.workOrderStatus == "archived") {
 			return '归档时间'
 		}
-	
+
 		// 默认显示创建时间
 		return '创建时间'
 	}
-	
+
 	// 根据状态显示不同的时间
 	const getDisplayTime = (item : acceptOrderInfo): string|null => {
 		if (item == null) return null
 		let showTime = ref<string|null>('')
-	
+
 		// 如果是"待接单"状态,显示派单时间
 		if (item.workOrderStatus == 'assigned') {
 			showTime.value = item.assignTime
@@ -138,12 +138,16 @@
 		} else if(item.workOrderStatus == "archived") {
 			showTime.value = item.updateTime
 		} else {
-			showTime.value = item.createTime 
+			if (item.createTime != null && item.createTime.length >= 3) {
+			  showTime.value = item.createTime.slice(0, -3);
+			} else {
+			  showTime.value = item.createTime != null ? item.createTime : '';
+			}
 		}
-	
-    return formatDate(showTime.value ?? '')
+		return showTime.value
+    // return formatDate(showTime.value ?? '')
 	}
-	
+
 	// 获取工单状态字典列表
 	const loadStatusDictList = async (): Promise<void> => {
 	    try {

+ 16 - 9
pages/order/detail/resumeIndex.uvue

@@ -146,16 +146,23 @@
 	const selectedTeamLeaderIndex = ref<number>(-1)
 	const teamLeaderNameOptions = ref<PickerOption[]>([])
 	const showLeaderPicker = ref<boolean>(false)
-	
+
 	const formatDate = (dateString: string): string => {
-	  if (dateString == '' || dateString == null) return ''
-	  const date = new Date(dateString)
-	  const year = date.getFullYear()
-	  const month = (date.getMonth() + 1).toString().padStart(2, '0')
-	  const day = date.getDate().toString().padStart(2, '0')
-	  const hours = date.getHours().toString().padStart(2, '0')
-	  const minutes = date.getMinutes().toString().padStart(2, '0')
-	  return `${year}-${month}-${day} ${hours}:${minutes}`
+		if (dateString != null && dateString.length >= 3) {
+			dateString = dateString.slice(0, -3);
+		} else {
+			dateString = dateString
+		}
+		return dateString
+	  // if (dateString == '' || dateString == null) return ''
+	  // const date = new Date(dateString)
+	  // const year = date.getFullYear()
+	  // const month = (date.getMonth() + 1).toString().padStart(2, '0')
+	  // const day = date.getDate().toString().padStart(2, '0')
+	  // const hours = date.getHours().toString().padStart(2, '0')
+	  // const minutes = date.getMinutes().toString().padStart(2, '0')
+	  // return `${year}-${month}-${day} ${hours}:${minutes}`
+
 	}
 
 	// 获取负责人列表(使用用户列表接口)

+ 13 - 2
pages/order/index.uvue

@@ -200,8 +200,12 @@ const statusConfig: StatusItem[] = [
 	  return 'all' // fallback,理论上不会走到这里
 	}
 
+	let loadCount = 0
     // 加载列表数据
     const loadData = async (isRefresh: boolean | null): Promise<void> => {
+		const id = ++loadCount
+		console.log(`【loadData #${id}】开始, isRefresh=${isRefresh}`)
+
         if (loading.value) {
             // 如果正在加载,直接重置刷新状态
             refreshing.value = false
@@ -731,9 +735,8 @@ const statusConfig: StatusItem[] = [
 	padding: 8rpx 20rpx;
 	border-radius: 20rpx;
 	font-size: 24rpx;
-	// font-weight: 50rpx;
 	white-space: nowrap;
-	margin-left: 20rpx;
+	margin-left: 50rpx;
 	border: 1rpx solid;
 }
 
@@ -801,6 +804,14 @@ const statusConfig: StatusItem[] = [
 	border-color: #ffccc7;
 }
 
+/* 作废 */
+.status-invalid {
+	background-color: #fff2f0;
+	color: #ff4d4f;
+	border-color: #ffccc7;
+}
+
+
 .scroll-view_H {
 	width: 100%;
 	flex-direction: row;

+ 1 - 1
pages/worktime/index.uvue

@@ -121,7 +121,7 @@
 			</view>
             <view class="info-row">
               <view class="info-label">
-                <text class="text-gray">下发时间: {{ formatDate(getPropertyValue(item, 'assignTime')) }}</text>
+                <text class="text-gray">下发时间: {{ getPropertyValue(item, 'assignTime') }}</text>
               </view>
               <view class="info-value">
                 <text class="text-gray">处理时长: {{ formatNumber(parseFloat(getPropertyValue(item, 'handleHour'))) }}小时</text>