Просмотр исходного кода

表单显示向左对齐、首页超时工单权限修改

HD_wangm 2 месяцев назад
Родитель
Сommit
e3302feeeb

+ 18 - 9
pages/index/index.uvue

@@ -634,11 +634,20 @@
 	const handleOverdueItemClick = (item: any, index: number): void => {
 		if (item == null) return
 		const orderItem = item as UTSJSONObject
+		const permit: string[] = orderItem['orderType'] == 2 ? ['gxt:maintenance:order:accept'] : ['gxt:repairOrder:accept']
+		const isPermit: boolean = checkPermi(permit)
 		try {
-			// 跳转到工单详情页
-			uni.navigateTo({
-				url: `/pages/order/detail/acceptIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
-			})
+			if(isPermit) {
+				// 跳转到工单接单页
+				uni.navigateTo({
+					url: `/pages/order/detail/acceptIndex?id=${orderItem['id']}&orderType=${orderItem['orderType']}`
+				})
+			} else {
+				// 跳转到工单详情页
+				uni.navigateTo({
+					url: `/pages/order/detail/index?id=${orderItem['id']}&orderType=${orderItem['orderType']}`
+				})
+			}
 		} catch (e) {
 			console.error('处理超时工单点击事件失败:', e)
 		}
@@ -837,7 +846,7 @@
 		// justify-content: space-around; /* 自动分配间距,避免挤压 */
 		align-items: center;
 		padding: 0 20rpx; // 可选:避免贴边
-		
+
 		.db-box {
 			background-color: #fff;
 			width: 216rpx;
@@ -849,13 +858,13 @@
 			border-radius: 5px;
 			padding: 30rpx 10rpx;   // 可选:增加内边距使内容不拥挤
 			position: relative;
-			
+
 			.db-text {
 				margin-top: 16rpx;   // 图标与文字间距
 				font-size: 24rpx;    // 建议用 rpx,10px 太小了
 				color: #333;
 			}
-			
+
 			.db-image{
 				width:100rpx;
 				height:100rpx;
@@ -879,14 +888,14 @@
 				box-sizing: border-box;  // 确保 padding 不影响整体尺寸
 				padding: 0 12rpx;
 				overflow: hidden;
-			
+
 				.count {
 					// line-height: 40rpx;
 					font-size: 26rpx;
 					// text-align: center;
 					color: #ffffff;
 				}
-			
+
 			}
 		}
 	}

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

@@ -602,7 +602,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;

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

@@ -602,7 +602,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;

+ 20 - 3
pages/order/detail/index.uvue

@@ -68,7 +68,7 @@
 					    <text class="info-label">维保内容</text>
 					    <text class="info-value">{{ detailData.content ?? '' }}</text>
 					</view>
-					<view class="info-item" v-if="detailData.orderType == 1">
+					<!-- <view class="info-item" v-if="detailData.orderType == 1">
 					    <text class="info-label">故障代码</text>
 					    <text class="info-value">{{ detailData.faultCode ?? '' }}</text>
 					</view>
@@ -79,6 +79,24 @@
 					<view class="info-item" v-if="detailData.orderType == 1">
 					    <text class="info-label">故障描述</text>
 					    <text class="info-value">{{ detailData.faultDesc ?? '' }}</text>
+					</view> -->
+					<view class="info-item" v-if="detailData.orderType == 1">
+						<text class="info-label">故障代码</text>
+						<view class="info-value">
+							<text class="inner-text">{{ detailData.faultCode ?? '' }}</text>
+						</view>
+					</view>
+					<view class="info-item" v-if="detailData.orderType == 1">
+						<text class="info-label">故障条文</text>
+						<view class="info-value">
+							<text class="inner-text">{{ detailData.faultBarcode ?? '' }}</text>
+						</view>
+					</view>
+					<view class="info-item" v-if="detailData.orderType == 1">
+						<text class="info-label">故障描述</text>
+						<view class="info-value">
+							<text class="inner-text">{{ detailData.faultDesc ?? '' }}</text>
+						</view>
 					</view>
                 </view>
             </view>
@@ -734,8 +752,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
-
+					
                     &.highlight {
                         color: #007aff;
                         font-weight: bold;

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

@@ -430,7 +430,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;

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

@@ -451,7 +451,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;

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

@@ -515,7 +515,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;

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

@@ -445,7 +445,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;

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

@@ -380,7 +380,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;

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

@@ -592,7 +592,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;

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

@@ -798,7 +798,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;

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

@@ -1361,7 +1361,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;

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

@@ -1500,7 +1500,7 @@
                     flex: 1;
                     font-size: 28rpx;
                     color: #333333;
-                    text-align: right;
+                    text-align: left;
 
                     &.highlight {
                         color: #007aff;