采购单优化

This commit is contained in:
liu
2026-08-13 00:11:44 +08:00
parent 0211e5e98d
commit 6c794d0732
6 changed files with 362 additions and 19 deletions
+22
View File
@@ -84,6 +84,28 @@ export interface IPurchaseCell {
items: IPurchaseCellItem[];
}
/** 门店购买详情行(门店采购汇总,按商品聚合) */
export interface IPurchaseStoreItem {
product_id: number;
product_name: string;
/** 规格/包规 */
product_spec: string;
unit: string;
/** 单价(每包;多笔单价时为加权平均,保证 单价×数量=预计金额) */
price: string;
/** 数量(包数) */
quantity: number;
/** 预计金额 = Σ 明细 amount */
amount: string;
weight: string;
}
/** 门店购买详情(采购单内某门店的采购汇总) */
export interface IPurchaseStoreSummary {
store: { id: number; name: string } | null;
items: IPurchaseStoreItem[];
}
export const PURCHASE_STATUS_MAP: Record<number, { text: string; color: string }> = {
0: { text: '进行中', color: 'processing' },
3: { text: '已完成', color: 'success' },