diff --git a/src/api/wms/transaction/index.ts b/src/api/wms/transaction/index.ts index 1581755c6..739473073 100644 --- a/src/api/wms/transaction/index.ts +++ b/src/api/wms/transaction/index.ts @@ -60,6 +60,17 @@ export const deleteTransaction = async (id: number) => { return await request.delete({ url: `/wms/transaction/delete?id=` + id }) } +// 导出库存事务 Excel +export const checkExportTransaction = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/transaction/export-excel-senior-checkCnt', data }) + } else { + return await request.get({ url: `/wms/transaction/export-excel-checkCnt`, params }) + } +} + // 导出库存事务 Excel export const exportTransaction = async (params) => { if (params.isSearch) { diff --git a/src/views/wms/inventoryManage/transaction/index.vue b/src/views/wms/inventoryManage/transaction/index.vue index 9b50aa1b5..34540dd98 100644 --- a/src/views/wms/inventoryManage/transaction/index.vue +++ b/src/views/wms/inventoryManage/transaction/index.vue @@ -182,6 +182,10 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) + + const checkData = await TransactionApi.checkExportTransaction(tableObject.params) + console.log('checkData',checkData) + const data = await TransactionApi.exportTransaction(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch {