From 6eb2429eafd0ed40bf10df64258bc541d8b16512 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 24 三月 2026 14:06:29 +0800
Subject: [PATCH] 实际合格率低于【合格率】时,每个【生产工单】、【生产报工】台账需要标红显示
---
src/views/productionManagement/productionReporting/index.vue | 25 ++++++++++++++++++++++++-
src/views/productionManagement/workOrder/index.vue | 16 ++++++++++++++--
2 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index c0b5157..5c019b8 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/src/views/productionManagement/productionReporting/index.vue
@@ -43,6 +43,7 @@
@selection-change="handleSelectionChange"
:tableLoading="tableLoading"
@pagination="pagination"
+ :rowClassName="rowClassName"
:total="page.total">
<template #productNoSlot="{ row }">
<el-button
@@ -240,6 +241,16 @@
width: 120,
},
{
+ label: "鍚堟牸鐜�",
+ prop: "actualQualifiedRate",
+ width: 120,
+ },
+ {
+ label: "鏍囧噯鍚堟牸鐜�",
+ prop: "processQualifiedRate",
+ width: 120,
+ },
+ {
label: "鍗曚綅",
prop: "unit",
width: 120,
@@ -302,6 +313,14 @@
}
handleQuery();
};
+
+const rowClassName = ({row}) => {
+ if (Number(row.actualQualifiedRate) < Number(row.processQualifiedRate)) {
+ return 'danger-row';
+ }
+ return '';
+};
+
const deleteReport = row => {
ElMessageBox.confirm("纭畾鍒犻櫎璇ユ姤宸ュ悧锛�", "鎻愮ず", {
confirmButtonText: "纭畾",
@@ -476,4 +495,8 @@
});
</script>
-<style scoped></style>
+<style scoped>
+:deep(.danger-row td) {
+ color: #e95a66 !important;
+}
+</style>
diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index ee789d2..cc1d6e3 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -25,6 +25,7 @@
:tableData="tableData"
:page="page"
:tableLoading="tableLoading"
+ :rowClassName="rowClassName"
@pagination="pagination">
<template #completionStatus="{ row }">
<el-progress :percentage="toProgressPercentage(row?.completionStatus)"
@@ -289,7 +290,7 @@
// width: "80",
// },
{
- label: "宸ュ崟缂栧彿",
+ label: "宸ュ崟缂栧彿1",
prop: "workOrderNo",
width: "140",
},
@@ -458,6 +459,13 @@
scrapQty: [
{validator: validateScrapQty, trigger: 'blur'}
]
+};
+
+const rowClassName = ({row}) => {
+ if (Number(row.completionStatus) > 0 && Number(row.actualQualifiedRate) < Number(row.processQualifiedRate)) {
+ return 'danger-row';
+ }
+ return '';
};
// 澶勭悊鏈鐢熶骇鏁伴噺杈撳叆锛岄檺鍒跺繀椤诲ぇ浜庣瓑浜�1
@@ -875,7 +883,11 @@
}
</style>
-<style lang="scss">
+<style lang="scss" scoped>
+:deep(.danger-row td) {
+ color: #e95a66 !important;
+}
+
@media print {
@page {
size: landscape;
--
Gitblit v1.9.3