|
|
@@ -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;
|