From 311e19d93064bd892b7a34ae59fe982ae66d5967 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Fri, 19 Apr 2024 15:50:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/supplierinvoiceRequestMain/index.ts | 5 ++++ .../supplierinvoiceRequestMain/index.vue | 30 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/src/api/wms/supplierinvoiceRequestMain/index.ts b/src/api/wms/supplierinvoiceRequestMain/index.ts index 6309de4ca..e5e1d5e8c 100644 --- a/src/api/wms/supplierinvoiceRequestMain/index.ts +++ b/src/api/wms/supplierinvoiceRequestMain/index.ts @@ -110,6 +110,11 @@ export const exportSupplierinvoiceRequestMain = async (params) => { } } +// 导出供应商发票申请明细 Excel +export const exportSupplierinvoiceRequestDetail = async (params) => { + return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel-detail`, params }) +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' }) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 0f6e14c28..a6b533ffa 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -107,6 +107,15 @@ color: '', float:'left', hasPermi: '' + },{ + label: '导出明细', + name: 'export-detail', + hide: false, + type: 'primary', + // icon: 'ep:operation', + color: '', + float:'left', + hasPermi: '' }]" :buttondataTable = "[{ label: '打印', @@ -587,6 +596,8 @@ const handleImport = () => { } } + + /** * tableForm方法 */ @@ -656,6 +667,9 @@ const importSuccess = () => { }else if(val === 'printing-all'){ //打印全部发货单 + }else if(val === 'export-detail'){ + console.log("导出明细:",clicKRowId.value) + handleDetailExport() } } @@ -671,6 +685,22 @@ const importSuccess = () => { } } + /** 导出明细按钮操作 */ + const exportLoadingDetail = ref(false) // 导出的加载中 + const handleDetailExport = async (masterId) => { + try { + // 导出的二次确认 + await message.exportConfirm() + // 发起导出导出明细 + exportLoadingDetail.value = true + const data = await SupplierinvoiceRequestMainApi.exportSupplierinvoiceRequestDetail(masterId) + download.excel(data, '供应商发票申请明细.xlsx') + } catch { + } finally { + exportLoadingDetail.value = false + } + } + const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL //供应商发货单打印