From 0558f330f7e3781b91d00ed4a12e60d9fa469d87 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 17 九月 2026 13:11:12 +0800
Subject: [PATCH] feat(mes): 增加质检指标层级结构与多批次录入功能
---
src/views/mes/qc/template/modules/indicator-list.vue | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/src/views/mes/qc/template/modules/indicator-list.vue b/src/views/mes/qc/template/modules/indicator-list.vue
index 3b9790a..6ad5681 100644
--- a/src/views/mes/qc/template/modules/indicator-list.vue
+++ b/src/views/mes/qc/template/modules/indicator-list.vue
@@ -4,12 +4,13 @@
import { useVbenModal } from '@vben/common-ui';
-import { message } from 'ant-design-vue';
+import { message, Switch } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
deleteTemplateIndicator,
getTemplateIndicatorPage,
+ updateTemplateIndicator,
} from '#/api/mes/qc/template/indicator';
import { $t } from '#/locales';
@@ -39,6 +40,16 @@
/** 缂栬緫鎸囨爣椤� */
function handleEdit(row: MesQcTemplateIndicatorApi.TemplateIndicator) {
formModalApi.setData({ ...row, templateId: props.templateId }).open();
+}
+
+/** 鍒囨崲鏄惁鍙備笌鍒ゅ畾 */
+async function handleJudgeFlagChange(
+ row: MesQcTemplateIndicatorApi.TemplateIndicator,
+ checked: boolean,
+) {
+ await updateTemplateIndicator({ ...row, judgeFlag: checked });
+ message.success(`妫�娴嬮」[${row.indicatorName}]宸�${checked ? '鍙備笌' : '涓嶅弬涓�'}鍒ゅ畾`);
+ handleRefresh();
}
/** 鍒犻櫎鎸囨爣椤� */
@@ -100,6 +111,17 @@
]"
/>
</template>
+ <template #judgeFlag="{ row }">
+ <Switch
+ :checked="row.judgeFlag !== false"
+ :disabled="readonly"
+ checked-children="鏄�"
+ un-checked-children="鍚�"
+ @change="
+ (checked: boolean) => handleJudgeFlagChange(row, checked)
+ "
+ />
+ </template>
<template #actions="{ row }">
<TableAction
:actions="[
--
Gitblit v1.9.3