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()