From c2d05ed9285742036818cbd9e12e78da72e6899e Mon Sep 17 00:00:00 2001 From: hwj Date: Wed, 4 Feb 2026 15:46:33 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=A4=87=E4=BB=B6=E4=BF=A1?= =?UTF-8?q?=E6=81=AF-=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=85=A5=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/product/product/index.ts | 10 ++ src/views/erp/component/product/index.vue | 111 +++++++++++++++++++++- 2 files changed, 119 insertions(+), 2 deletions(-) diff --git a/src/api/erp/product/product/index.ts b/src/api/erp/product/product/index.ts index 6726d1d3..d77b8829 100644 --- a/src/api/erp/product/product/index.ts +++ b/src/api/erp/product/product/index.ts @@ -71,5 +71,15 @@ export const ProductApi = { // 导出产品 Excel exportProduct: async (params) => { return await request.download({ url: `/erp/product/export-excel`, params }) + }, + + // 下载产品导入模板 + importProductTemplate: async () => { + return await request.download({ url: `/erp/product/get-import-template` }) + }, + + // 导入产品 + importProduct: async (data: FormData) => { + return await request.upload({ url: `/erp/product/import`, data }) } } diff --git a/src/views/erp/component/product/index.vue b/src/views/erp/component/product/index.vue index 0632343e..83f5218d 100644 --- a/src/views/erp/component/product/index.vue +++ b/src/views/erp/component/product/index.vue @@ -31,6 +31,14 @@ > {{ t('action.add') }} + + {{ t('action.import') }} + + + + + +
+ 将文件拖到此处,或点击上传 +
+ +
+ +