From 268b3e77f3beaba03a1273d643d8aa4fa5db1c10 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 16 十月 2026 13:08:27 +0800
Subject: [PATCH] feat: 全量列表页接入 Excel 导入按钮与共享弹窗
---
src/views/wls/warehouse/location/index.vue | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/src/views/wls/warehouse/location/index.vue b/src/views/wls/warehouse/location/index.vue
index 6542afb..fc87492 100644
--- a/src/views/wls/warehouse/location/index.vue
+++ b/src/views/wls/warehouse/location/index.vue
@@ -16,8 +16,12 @@
import {
deleteWarehouseLocation,
getWarehouseLocationPage,
+ importWarehouseLocation,
+ importWarehouseLocationTemplate,
} from '#/api/mes/wm/warehouse/location';
import { $t } from '#/locales';
+
+import ImportModalComponent from '#/components/import-modal';
import { BarcodeDetail } from '../../barcode/components';
import { useGridColumns, useGridFormSchema } from './data';
@@ -30,6 +34,11 @@
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: Form,
+ destroyOnClose: true,
+});
+
+const [ImportModal, importModalApi] = useVbenModal({
+ connectedComponent: ImportModalComponent,
destroyOnClose: true,
});
@@ -70,6 +79,18 @@
/** 鍒锋柊琛ㄦ牸 */
function handleRefresh() {
gridApi.query();
+}
+
+/** 瀵煎叆搴撳尯 */
+function handleImport() {
+ importModalApi
+ .setData({
+ title: $t('ui.actionTitle.import', ['搴撳尯']),
+ fileName: '搴撳尯瀵煎叆妯℃澘.xls',
+ importFn: importWarehouseLocation,
+ templateFn: importWarehouseLocationTemplate,
+ })
+ .open();
}
/** 鍒涘缓搴撳尯 */
@@ -159,6 +180,7 @@
<template>
<Page auto-content-height><FormModal @success="handleRefresh" />
+ <ImportModal @success="handleRefresh" />
<BarcodeDetail ref="barcodeDetailRef" />
<Alert
@@ -184,6 +206,13 @@
auth: ['mes:wm-warehouse:create'],
onClick: handleCreate,
},
+ {
+ label: $t('ui.actionTitle.import', ['搴撳尯']),
+ type: 'primary',
+ icon: ACTION_ICON.UPLOAD,
+ auth: ['mes:wm-warehouse:import'],
+ onClick: handleImport,
+ },
]"
/>
</template>
--
Gitblit v1.9.3