账单生成
This commit is contained in:
+19
-13
@@ -1,6 +1,7 @@
|
||||
import createAxios from '@/utils/request';
|
||||
import { downloadBlob } from '@/api/common/download.ts';
|
||||
import type {
|
||||
IBillPrepare,
|
||||
IPurchaseCell,
|
||||
IPurchaseDetail,
|
||||
IPurchaseStoreSummary,
|
||||
@@ -23,9 +24,10 @@ export interface PurchaseCellUpdateParams {
|
||||
weight?: number;
|
||||
}
|
||||
|
||||
/** 采购单周转框/托盘合并记录修改:单笔订单的框/托盘数量 */
|
||||
export interface PurchaseContainerOrderParams {
|
||||
order_id: number;
|
||||
/** 生成账单:单个门店的配送费/周转筐/托盘数量 */
|
||||
export interface BillGenerateStoreParams {
|
||||
store_id: number;
|
||||
delivery_fee: number;
|
||||
box_num: number;
|
||||
tray_num: number;
|
||||
}
|
||||
@@ -84,16 +86,20 @@ export async function getPurchaseStoreSummary(purchaseId: number, storeId: numbe
|
||||
});
|
||||
}
|
||||
|
||||
/** 采购单周转框/托盘合并记录修改:按门店覆盖全部订单逐笔更新(自动重算附加金额与订单总金额) */
|
||||
export async function updatePurchaseContainer(
|
||||
purchaseId: number,
|
||||
storeId: number,
|
||||
orders: PurchaseContainerOrderParams[],
|
||||
) {
|
||||
return createAxios({
|
||||
url: `/purchase/order/${purchaseId}/container/${storeId}`,
|
||||
method: 'put',
|
||||
data: { orders },
|
||||
/** 账单生成预览:按门店汇总商品金额(金额只读) */
|
||||
export async function getBillPrepare(purchaseId: number) {
|
||||
return createAxios<IBillPrepare>({
|
||||
url: `/purchase/order/${purchaseId}/bill/prepare`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/** 生成账单:已完成采购单按门店各生成一张(关联采购单全部订单,金额由系统汇总不可修改) */
|
||||
export async function generateBill(purchaseId: number, stores: BillGenerateStoreParams[]) {
|
||||
return createAxios<{ count: number }>({
|
||||
url: `/purchase/order/${purchaseId}/bill`,
|
||||
method: 'post',
|
||||
data: { stores },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user