导出
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import createAxios from '@/utils/request';
|
||||
import { downloadBlob } from '@/api/common/download.ts';
|
||||
import type {
|
||||
IPurchaseCell,
|
||||
IPurchaseDetail,
|
||||
IPurchaseStoreSummary,
|
||||
PurchaseExportType,
|
||||
} from '@/domain/iPurchaseOrder.ts';
|
||||
|
||||
/** 订单商品参数修改 */
|
||||
@@ -74,3 +76,12 @@ export async function getPurchaseStoreSummary(purchaseId: number, storeId: numbe
|
||||
params: { store_id: storeId },
|
||||
});
|
||||
}
|
||||
|
||||
/** C2/C3 导出采购单(Excel 表格):type=all 全品类 / category 仅蔬果分类 */
|
||||
export async function exportPurchase(id: number, type: PurchaseExportType = 'all') {
|
||||
return downloadBlob(
|
||||
`/purchase/order/${id}/export`,
|
||||
{ type },
|
||||
`采购单_${id}.xlsx`,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user