From e47bc9e53ed3d64016c1e0db67d280e63b367e07 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期五, 21 八月 2026 17:05:54 +0800
Subject: [PATCH] 导入模板下载 导入 计算迟到加班早退
---
src/views/mes/md/item/type/index.vue | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/views/mes/md/item/type/index.vue b/src/views/mes/md/item/type/index.vue
index 0634e13..d3765d9 100644
--- a/src/views/mes/md/item/type/index.vue
+++ b/src/views/mes/md/item/type/index.vue
@@ -4,7 +4,7 @@
import { ref } from 'vue';
-import { Page, useVbenModal } from '../../../../../packages/effects/common-ui/src';
+import { Page, useVbenModal } from '@vben/common-ui';
import { message } from 'ant-design-vue';
@@ -14,9 +14,15 @@
import { useGridColumns, useGridFormSchema } from './data';
import Form from './modules/form.vue';
+import ImportForm from './modules/import-form.vue';
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: Form,
+ destroyOnClose: true,
+});
+
+const [ImportModal, importModalApi] = useVbenModal({
+ connectedComponent: ImportForm,
destroyOnClose: true,
});
@@ -36,6 +42,11 @@
/** 鍒涘缓鍒嗙被 */
function handleCreate() {
formModalApi.setData(null).open();
+}
+
+/** 瀵煎叆鍒嗙被 */
+function handleImport() {
+ importModalApi.open();
}
/** 娣诲姞涓嬬骇鍒嗙被 */
@@ -101,7 +112,7 @@
</script>
<template>
- <Page auto-content-height><FormModal @success="handleRefresh" />
+ <Page auto-content-height><FormModal @success="handleRefresh" /><ImportModal @success="handleRefresh" />
<Grid table-title="鐗╂枡鍒嗙被鍒楄〃">
<template #toolbar-tools>
<TableAction
@@ -114,6 +125,13 @@
onClick: handleCreate,
},
{
+ label: $t('ui.actionTitle.import', ['鐗╂枡鍒嗙被']),
+ type: 'primary',
+ icon: ACTION_ICON.UPLOAD,
+ auth: ['mes:md-item-type:import'],
+ onClick: handleImport,
+ },
+ {
label: isExpanded ? '鏀剁缉' : '灞曞紑',
type: 'primary',
onClick: handleExpand,
--
Gitblit v1.9.3