修复一些错误

This commit is contained in:
liu
2026-08-14 22:20:13 +08:00
parent 228212f8e3
commit 4bdaf2a219
12 changed files with 454 additions and 37 deletions
+38
View File
@@ -38,6 +38,42 @@ export interface IStoreOrderItemUpdate {
remark: string;
}
/** 订单关联账单(列表附带摘要、详情附带完整字段;pay_state 由后端推导) */
export interface IStoreOrderBill {
id: number;
bill_no: string;
bill_date?: string;
/** 商品金额 */
product_amount?: string;
/** 配送费 */
delivery_fee?: string;
box_num?: number;
tray_num?: number;
box_price?: string;
tray_price?: string;
/** 附加金额 = 筐×筐单价 + 托盘×托盘单价 */
added_amount?: string;
/** 账单总金额 */
total_amount: string;
/** 支付状态:0未支付 1已支付 */
status: number;
/** 关联支付记录ID(0=未发起支付) */
payment_id?: number;
/** 支付进度:0待支付 1审核中 2已支付 */
pay_state?: number;
pay_state_name?: string;
paid_at?: string | null;
pay_remark?: string;
created_at?: string;
}
/** 账单支付进度映射(与小程序端口径一致) */
export const BILL_PAY_STATE_MAP: Record<number, { text: string; color: string }> = {
0: { text: '待支付', color: 'warning' },
1: { text: '审核中', color: 'processing' },
2: { text: '已支付', color: 'success' },
};
/** 门店订单 */
export default interface IStoreOrder {
id?: number;
@@ -46,6 +82,8 @@ export default interface IStoreOrder {
purchase_id?: number;
/** 关联账单ID(采购单完成后按门店生成账单时回写) */
bill_id?: number;
/** 关联账单(生成账单后由接口附带) */
bill?: IStoreOrderBill | null;
store?: {
id: number;
name: string;