Files
xin-procurement/web/domain/iReconciliation.ts
T
2026-08-12 14:38:20 +08:00

71 lines
1.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/** 对账明细 */
export interface IReconciliationItem {
id?: number;
recon_id?: number;
store_id?: number;
order_item_id?: number;
product_id?: number;
product_name?: string;
quantity?: string;
weight?: string;
/** 公布金额(订货金额) */
publish_amount?: string;
/** 实际金额(采购成本) */
actual_amount?: string;
/** 差额 = publish actual */
diff_amount?: string;
is_reconciled?: number;
store_remark?: string;
sort?: number;
store?: { id: number; name: string };
}
/** 对账单 */
export default interface IReconciliation {
id?: number;
recon_no?: string;
title?: string;
period_start?: string;
period_end?: string;
category_id?: number;
supplier_id?: number;
publish_amount?: string;
actual_amount?: string;
diff_amount?: string;
/** 0草稿 1对账中 2已结算 */
status?: number;
operator_id?: number;
operator?: { id: number; nickname: string };
remark?: string;
items?: IReconciliationItem[];
created_at?: string;
}
export const RECON_STATUS_MAP: Record<number, { text: string; color: string }> = {
0: { text: '草稿', color: 'default' },
1: { text: '对账中', color: 'processing' },
2: { text: '已结算', color: 'success' },
};
export const RECONCILED_MAP: Record<number, { text: string; color: string }> = {
0: { text: '未对账', color: 'warning' },
1: { text: '已对账', color: 'success' },
};
/** D5 差额对比视图 */
export interface IReconDiffRow {
store_id?: number;
store_name?: string;
product_id?: number;
product_name?: string;
publish: number;
actual: number;
diff: number;
}
export interface IReconDiff {
by_store: IReconDiffRow[];
by_product: IReconDiffRow[];
total: { publish: number; actual: number; diff: number };
}