超市报表

This commit is contained in:
zjf committed 2025-10-21 20:48:54 +08:00
1 parent 08cf048bde
commit cf3aabbae1
1 file changed
+73
@@ -0,0 +1,73 @@
// 进销存报表相关类型定义
// 查询参数接口
export interface InventoryInOutQueryParams {
current?: number // 当前页码
size?: number // 每页记录数
startDate?: string // 开始日期 (yyyy-MM-dd)
endDate?: string // 结束日期 (yyyy-MM-dd)
startTime?: string // 开始时间 (yyyy-MM-dd HH:mm:ss)
endTime?: string // 结束时间 (yyyy-MM-dd HH:mm:ss)
productName?: string // 商品名称
productCode?: string // 商品编码
categoryId?: number // 分类ID
warehouseId?: string // 仓库ID
onlyChanged?: boolean // 是否仅显示有发生额的商品
topLimit?: number // 限制返回记录数
}
// 进销存报表数据项接口
export interface InventoryInOutItem {
productId: number // 商品ID
productCode: string // 商品编码
productName: string // 商品名称
categoryId: number // 分类ID
categoryName: string // 分类名称
unit: string // 基础单位
openingQty: number // 期初库存数量
inQty: number // 入库数量
outQty: number // 出库数量
closingQty: number // 期末库存数量
inAmount: number // 入库金额
outAmount: number // 出库金额
}
// 分页响应接口
export interface InventoryInOutPageResponse {
records: InventoryInOutItem[] // 数据列表
total: number // 总记录数
size: number // 每页记录数
current: number // 当前页码
pages: number // 总页数
}
// 汇总统计接口
export interface InventoryInOutSummary {
totalProducts: number // 统计商品总数
changedProducts: number // 有发生额的商品数量
totalOpeningQty: number // 总期初库存数量
totalInQty: number // 总入库数量
totalOutQty: number // 总出库数量
totalClosingQty: number // 总期末库存数量
totalInAmount: number // 总入库金额
totalOutAmount: number // 总出库金额
turnoverRate: number // 库存周转率
avgPrice: number // 平均单价
}
// API响应接口
export interface ApiResponse<T = any> {
code: number // 状态码
msg: string // 消息描述
data: T // 具体数据
}
// 分页查询响应
export type InventoryInOutPageApiResponse = ApiResponse<InventoryInOutPageResponse>
// 列表查询响应
export type InventoryInOutListApiResponse = ApiResponse<InventoryInOutItem[]>
// 汇总统计响应
export type InventoryInOutSummaryApiResponse = ApiResponse<InventoryInOutSummary>