采购单优化
This commit is contained in:
@@ -50,6 +50,40 @@ export interface IPurchaseDetail {
|
||||
items: IPurchaseDetailRow[];
|
||||
}
|
||||
|
||||
/** 单元格下钻明细行(溯源订货单明细,附订单号/状态/可编辑标记) */
|
||||
export interface IPurchaseCellItem {
|
||||
id: number;
|
||||
order_id: number;
|
||||
order_no: string;
|
||||
order_date: string;
|
||||
/** 订货单状态:0待接单 1已接单 2采购中 3配送中 4已完成 9已取消 */
|
||||
order_status: number;
|
||||
product_name: string;
|
||||
product_spec: string;
|
||||
unit: string;
|
||||
supplier_id: number;
|
||||
supplier?: { id: number; name: string } | null;
|
||||
/** 等级单价 */
|
||||
price: string;
|
||||
cost_price: string;
|
||||
quantity: number;
|
||||
weight: string;
|
||||
/** 金额 = 数量×单价(整数金额返回 number) */
|
||||
amount: number | string;
|
||||
remark: string;
|
||||
/** 首图 */
|
||||
image?: string;
|
||||
/** 是否可编辑/同步(采购单进行中且订货单未锁定) */
|
||||
editable: boolean;
|
||||
}
|
||||
|
||||
/** 单元格下钻数据(门店 + 商品 + 全部订货明细) */
|
||||
export interface IPurchaseCell {
|
||||
store: { id: number; name: string } | null;
|
||||
product: { id: number; name: string } | null;
|
||||
items: IPurchaseCellItem[];
|
||||
}
|
||||
|
||||
export const PURCHASE_STATUS_MAP: Record<number, { text: string; color: string }> = {
|
||||
0: { text: '进行中', color: 'processing' },
|
||||
3: { text: '已完成', color: 'success' },
|
||||
|
||||
Reference in New Issue
Block a user