From 666e5b8508cdc443c8627c83b45bb086f35ac596 Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Sat, 10 May 2025 14:41:12 +0800 Subject: [PATCH] =?UTF-8?q?YT-2592=EF=BC=9ASCP=E3=80=8A=E5=BE=85=E5=BC=80?= =?UTF-8?q?=E7=A5=A8=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2-=E8=B4=A2?= =?UTF-8?q?=E5=8A=A1=E3=80=8B=E5=A2=9E=E5=8A=A0=E3=80=90=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E5=8D=95=E3=80=91=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/supplierinvoiceInvoiced/index.ts | 5 ++++ src/locales/en-US.ts | 1 + src/locales/zh-CN.ts | 3 ++- src/utils/disposition/defaultButtons.ts | 13 +++++++++ .../supplierinvoiceInvoiced/index.vue | 27 +++++++++++++++++++ 5 files changed, 48 insertions(+), 1 deletion(-) diff --git a/src/api/wms/supplierinvoiceInvoiced/index.ts b/src/api/wms/supplierinvoiceInvoiced/index.ts index 1a2a3fcde..cf5ef0126 100644 --- a/src/api/wms/supplierinvoiceInvoiced/index.ts +++ b/src/api/wms/supplierinvoiceInvoiced/index.ts @@ -58,6 +58,11 @@ export const deleteSupplierinvoiceInvoiced = async (id: number) => { export const exportSupplierinvoiceInvoiced = async (params) => { return await request.download({ url: `/wms/supplierinvoice-invoiced/export-excel`, params }) } + +// 导出对账单财务 Excel +export const exportExcelSheetStatement = async (params) => { + return await request.download({ url: `/wms/supplierinvoice-invoiced/export-excel—sheet-statement`, params }) +} // 导出待开票 Excel export const exportSupplierinvoiceInvoicedWork = async (params) => { return await request.download({ url: `/wms/supplierinvoice-invoiced/export-excel-work`, params }) diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index f0f471b00..dda4ee904 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1333,5 +1333,6 @@ export default { 更多:'More', 批量重试:'Batch retry', 全部重试:'All retry', + 导出对账单:'Export the statement of account', }, } diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 97dd8493b..18ed7ad66 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1331,7 +1331,8 @@ export default { 新增班次:'新增班次', 更多:'更多', 批量重试:'批量重试', - 全部重试:'全部重试' + 全部重试:'全部重试', + 导出对账单:'导出对账单', }, } diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 78e2826d3..47d704671 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -1558,6 +1558,19 @@ export function mainLisSelectiontTrialResultBtn(option: any) { hasPermi: '' }) } + +//待开票导出对账单按钮 +export function invoicedExportBtn(option: any) { + return __defaultBtnOption(option, { + label: t(`ts.导出对账单`).replace('ts.', ''), + name: 'exportStatement', + hide: false, + type: 'success', + icon: 'ep:download', + color: '', + hasPermi: '' + }) +} // 默认按钮规则 function __defaultBtnOption(option: any, specific: any) { return { diff --git a/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue b/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue index e80bb0129..d1d177bd3 100644 --- a/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue +++ b/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue @@ -121,6 +121,7 @@ if(routeName.value == 'SupplierinvoiceInvoiced'){ HeadButttondata.value = [ defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.mainListSelectionOrderPassBtn({hasPermi:'wms:supplierinvoice-invoiced:batchPass'}), //批量通过 + defaultButtons.invoicedExportBtn({hasPermi:'wms:supplierinvoice-invoiced:exportStatement'}), //导出对账单 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -146,6 +147,8 @@ const buttonBaseClick = (val, item) => { handleImport() } else if (val == 'export') { // 导出 handleExport() + } else if (val == 'exportStatement') { // 导出对账单 + handleExportStatement() } else if (val == 'refresh') { // 刷新 getList() } else if (val == 'filtrate') { // 筛选 @@ -310,6 +313,30 @@ const handleExport = async () => { loadDone() } } +//导出财务代开票对账单 +const handleExportStatement = async () => { + try { + // 导出的二次确认 + await message.exportConfirm() + // 发起导出 + loadStart() + const excelTitle = ref(route.meta.title) + if (routeName.value == 'SupplierinvoiceInvoiced') { + // 待开票数据查询-财务 + const data = await SupplierinvoiceInvoicedApi.exportExcelSheetStatement(tableObject.params) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) + } + + // else if (routeName.value == 'SupplierinvoiceInvoicedWork') { + // // 待开票数据查询-工务 + // const data = await SupplierinvoiceInvoicedApi.exportSupplierinvoiceInvoicedWork(tableObject.params) + // download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) + // } + } catch { + } finally { + loadDone() + } +} /** 导入 */ const importFormRef = ref()