feat: add warehouse type definitions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
42
types/warehouse.ts
Normal file
42
types/warehouse.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
export interface WarehouseRow {
|
||||
paichan: string; // 排产号 (source: 车间号)
|
||||
zongpai: string; // 总排号
|
||||
workshop: string; // 车间 (mapped from code to name)
|
||||
model: string; // 产品型号
|
||||
range: string; // 量程
|
||||
qty: number | null; // 数量
|
||||
boxNo: string; // 箱号
|
||||
boxQty: number | null; // 装箱数量
|
||||
workOrder: string; // 工令号
|
||||
shelf: string; // 货架
|
||||
handler: string; // 经办人
|
||||
orderNo: string; // 订单号
|
||||
inbound: string; // 入库时间 (formatted yyyy/MM/dd)
|
||||
status: "IN" | "WAIT"; // 派生状态
|
||||
}
|
||||
|
||||
export interface QueryParams {
|
||||
search?: string;
|
||||
workshop?: string; // 车间 code or "ALL"
|
||||
handler?: string; // 经办人 or "ALL"
|
||||
status?: "ALL" | "IN" | "WAIT";
|
||||
dateFrom?: string; // yyyy-MM-dd
|
||||
dateTo?: string; // yyyy-MM-dd
|
||||
sortKey?: string; // column key
|
||||
sortDir?: "asc" | "desc";
|
||||
page?: number; // 1-based
|
||||
pageSize?: number; // 10, 20, 50
|
||||
}
|
||||
|
||||
export interface QueryResult {
|
||||
rows: WarehouseRow[];
|
||||
total: number;
|
||||
page: number;
|
||||
pageSize: number;
|
||||
totalPages: number;
|
||||
}
|
||||
|
||||
export interface FilterOptions {
|
||||
workshops: { code: string; name: string }[];
|
||||
handlers: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user