From 18c174490b5778a652c10a3b57509ff61e743dd4 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期五, 06 十一月 2026 15:32:30 +0800
Subject: [PATCH] 完善设备监测、安全管理及采购业务页面
---
src/views/mes/pro/task/index.vue | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/src/views/mes/pro/task/index.vue b/src/views/mes/pro/task/index.vue
index 9621fdc..f6877ba 100644
--- a/src/views/mes/pro/task/index.vue
+++ b/src/views/mes/pro/task/index.vue
@@ -100,19 +100,12 @@
}
/**
- * 宸插畬鎴愮被鍨嬭鐨勨�滃畬鎴愭�佲�濆厹搴曞睍绀猴細
- * 宸茬敓浜ф暟閲忔寜璁㈠崟鏁伴噺灞曠ず锛堣嫢浣庝簬璁㈠崟鏁伴噺锛夛紝浣垮畬鎴愯繘搴︽樉绀轰负 100%銆�
- * 浠呬綔鐢ㄤ簬鏈〉鍒楄〃灞曠ず锛屼笉淇敼鍚庣鏁版嵁锛屼笉褰卞搷搴撳瓨/鎶ュ伐/瀵煎嚭绛夌湡瀹炲彛寰勩��
+ * 宸插畬鎴愬伐鍗曠殑鐘舵�佽繘搴︽寜瀹屾垚鐘舵�佸睍绀猴紱瀹為檯鎶ュ伐鏁伴噺淇濈暀鎺ュ彛鍘熷�笺��
*/
function normalizeCompletionDisplay(row: MesProWorkOrderApi.WorkOrder): void {
- if (!isCompletedWorkOrder(row)) {
- return;
- }
const quantity = row.quantity ?? 0;
const produced = row.quantityProduced ?? 0;
- if (produced < quantity) {
- row.quantityProduced = quantity;
- }
+ Object.assign(row, { completionProgressQuantity: isCompletedWorkOrder(row) ? Math.max(produced, quantity) : produced });
}
const [Grid, gridApi] = useVbenVxeGrid({
@@ -146,7 +139,7 @@
type: MesProWorkOrderTypeEnum.SELF,
...formValues,
});
- // 宸插畬鎴愮被鍨嬭锛氬凡鐢熶骇鏁伴噺/瀹屾垚杩涘害鍋氣�滃畬鎴愭�佲�濆厹搴曞睍绀猴紙浠呮湰椤靛睍绀猴紝涓嶆敼搴擄級
+ // 鐘舵�佽繘搴︿笌瀹為檯鎶ュ伐鏁伴噺鍒嗗埆灞曠ず銆�
if (res?.list) {
res.list.forEach(normalizeCompletionDisplay);
}
@@ -223,7 +216,7 @@
</template>
<template #progressPercent="{ row }">
<Progress
- :percent="Math.min(100, Math.round((row.quantity ? ((row.quantityProduced || 0) / row.quantity) * 100 : 0)))"
+ :percent="Math.min(100, Math.round((row.quantity ? ((row.completionProgressQuantity || 0) / row.quantity) * 100 : 0)))"
size="small"
/>
</template>
--
Gitblit v1.9.3