瀏覽代碼

工分、工时

ouyj 4 月之前
父節點
當前提交
e69f6827d2
共有 2 個文件被更改,包括 132 次插入2 次删除
  1. 63 1
      pages/score/index.uvue
  2. 69 1
      pages/worktime/index.uvue

+ 63 - 1
pages/score/index.uvue

@@ -125,7 +125,8 @@
           <view class="item-container">
             <view class="item-header">
               <text class="item-title">{{ getPropertyValue(item, 'workOrderProjectNo') }}-风机编号{{ getPropertyValue(item, 'pcsDeviceName') }}的{{ getWorkOrderTypeText(getPropertyValue(item, 'orderType')) }}</text>
-              <text class="info-value">{{ getScoringStatus(item) }}</text>
+              <!-- <text class="info-value">{{ getScoringStatus(item) }}</text> -->
+			  <text class="status-tag" :class="getStatusClass(item)">{{ getScoringStatus(item) }}</text>
             </view>
             <view class="info-row">
               <view class="info-label">
@@ -621,6 +622,14 @@
       return value.toFixed(2)
     }
     
+	// 获取工单评分状态样式类
+	function getStatusClass(item: any | null): string {
+	    if (item == null) return ''
+	    const rawStatus = getPropertyValue(item, 'scoringStatus')
+	    if (rawStatus == null || rawStatus == '') return ''
+	    return `status-${rawStatus}`
+	}
+	
     // 生命周期
     onMounted(() => {
       loadStatusDictList()
@@ -930,4 +939,57 @@
 .list-with-padding {
   padding-bottom: 40rpx;
 }
+
+/* 工单评分状态标签样式 */
+.status-tag {
+  padding: 8rpx 20rpx;
+  border-radius: 20rpx;
+  font-size: 24rpx;
+  white-space: nowrap;
+  margin-left: 70rpx;
+  border: 1rpx solid;
+}
+
+/* 待自评 */
+.status-to_self {
+  background-color: #fff7e6;
+  color: #fa8c16;
+  border-color: #ffd591;
+}
+
+/* 待复评 */
+.status-to_re {
+  background-color: #ebf5ff;
+  color: #409eff;
+  border-color: #d8ebff;
+} 
+
+/* 待确认 */
+.status-to_confirm {
+  background-color: #f0f9eb;
+  color: #5cb87a;
+  border-color: #c2e7b0;
+}
+
+
+/* 待终评 */
+.status-to_final {
+  background-color: #ebf5ff;
+  color: #409eff;
+  border-color: #d8ebff;
+} 
+
+/* 待归档 */
+.status-to_archive {
+  background-color: #f0f9eb;
+  color: #5cb87a;
+  border-color: #c2e7b0;
+}
+
+/* 已归档 */
+.status-archived {
+  background-color: #f0f9eb;
+  color: #5cb87a;
+  border-color: #c2e7b0;
+}
 </style>

+ 69 - 1
pages/worktime/index.uvue

@@ -111,7 +111,7 @@
           <view class="item-container">
             <view class="item-header">
               <text class="item-title">{{ getPropertyValue(item, 'workOrderProjectNo') }}-风机编号{{ getPropertyValue(item, 'pcsDeviceName') }}的{{ getWorkOrderTypeText(getPropertyValue(item, 'orderType')) }}</text>
-              <text class="info-value">{{ getWorkOrderStatus(item) }}</text>
+              <text class="status-tag" :class="getStatusClass(item)">{{ getWorkOrderStatus(item) }}</text>
             </view>
 			<view class="info-row">
 			  <view class="info-label">
@@ -399,6 +399,14 @@ function getWorkOrderStatus(item: any | null): string | null {
     return dictItem != null ? dictItem.dictLabel : rawStatus
 }
 
+// 获取工单状态样式类
+function getStatusClass(item: any | null): string {
+    if (item == null) return ''
+    const rawStatus = getPropertyValue(item, 'workOrderStatus')
+    if (rawStatus == null || rawStatus == '') return ''
+    return `status-${rawStatus}`
+}
+
 // 获取统计数据
 function getStatistics() {
   const params: UTSJSONObject = {
@@ -897,6 +905,66 @@ onMounted(() => {
   font-size: 26rpx;
   color: #666;
 }
+
+/* 工单状态标签样式 */
+.status-tag {
+  padding: 8rpx 20rpx;
+  border-radius: 20rpx;
+  font-size: 24rpx;
+  white-space: nowrap;
+  margin-left: 70rpx;
+  border: 1rpx solid;
+}
+
+/* 待接单 */
+.status-assigned {
+  background-color: #ebf5ff;
+  color: #409eff;
+  border-color: #d8ebff;
+}
+
+/* 待结单 */
+.status-to_finish {
+  background-color: #fff7e6;
+  color: #fa8c16;
+  border-color: #ffd591;
+}
+
+/* 待审批 */
+.status-to_approve {
+  background-color: #fff7e6;
+  color: #fa8c16;
+  border-color: #ffd591;
+}
+
+/* 已挂起 */
+.status-suspended {
+  background-color: #fff2f0;
+  color: #ff4d4f;
+  border-color: #ffccc7;
+}
+
+/* 已完成 */
+.status-completed {
+  background-color: #f0f9eb;
+  color: #5cb87a;
+  border-color: #c2e7b0;
+}
+
+/* 待下发 */
+.status-to_issue {
+  background-color: #f4f4f5;
+  color: #909399;
+  border-color: #e9e9eb;
+}
+
+/* 已归档 */
+.status-archived {
+  background-color: #f0f9eb;
+  color: #5cb87a;
+  border-color: #c2e7b0;
+}
+
 /* 日期选择弹窗 */
 .date-picker-popup {
   background-color: white;