From baddb052ccd4a91ef1881ba663e6a4e55b05f4fb Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 14 十月 2026 15:51:55 +0800
Subject: [PATCH] feat(hrm): 社保公积金方案表单加「适用部门」与默认缴费基数,修比例输入精度
---
src/views/mes/qc/template/modules/indicator-list.vue | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/views/mes/qc/template/modules/indicator-list.vue b/src/views/mes/qc/template/modules/indicator-list.vue
index 32f6194..6ad5681 100644
--- a/src/views/mes/qc/template/modules/indicator-list.vue
+++ b/src/views/mes/qc/template/modules/indicator-list.vue
@@ -2,14 +2,15 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesQcTemplateIndicatorApi } from '#/api/mes/qc/template/indicator';
-import { useVbenModal } from '..\..\..\..\..\packages\effects\common-ui\src';
+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