feat(client): 商品详情升级富数据版(KPI + 仓库分布 + 流水)
接后端新能力:listInventory 加 productId 透传;详情异步拉本商品库存+流水(失败 静默不阻塞主数据),渲染原型富数据三件套: - 3 KPI 卡(当前库存 / 库存货值=库存×进价 / 近30天出库=出库流水30天聚合) - 各仓库库存分布(按仓库分组 数量+货值) - 近期流水(StatusPill 入/出 + 增减量,最近 8 条) 价格历史待后端第二步。整屏 golden ×三主题入回归闸。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
@@ -11,6 +11,7 @@ class InventoryRepository {
|
||||
|
||||
Future<PageResult<Inventory>> listInventory({
|
||||
int? warehouseId,
|
||||
int? productId,
|
||||
String? keyword,
|
||||
List<String>? series,
|
||||
List<String>? spec,
|
||||
@@ -22,6 +23,7 @@ class InventoryRepository {
|
||||
'page': page,
|
||||
'page_size': pageSize,
|
||||
if (warehouseId != null) 'warehouse_id': warehouseId,
|
||||
if (productId != null) 'product_id': productId,
|
||||
if (keyword != null && keyword.isNotEmpty) 'keyword': keyword,
|
||||
if (series != null && series.isNotEmpty) 'series': series.join(','),
|
||||
if (spec != null && spec.isNotEmpty) 'spec': spec.join(','),
|
||||
|
||||
Reference in New Issue
Block a user