From 08b86cccfc8227ab065ee913f809609ef708486d Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期五, 21 八月 2026 09:59:21 +0800
Subject: [PATCH] 物料管理/物料分类/计量单位增加 Excel 导入功能

---
 src/views/mes/md/item/type/index.vue |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/src/views/mes/md/item/type/index.vue b/src/views/mes/md/item/type/index.vue
index 062b7d9..d3765d9 100644
--- a/src/views/mes/md/item/type/index.vue
+++ b/src/views/mes/md/item/type/index.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