feat(client): 库存查询新增规格/系列/入库时间;筛选组件支持搜索+滚动+标签
- 库存查询加规格、系列服务端筛选(后端 IN 条件,前端从 product-options API 加载全量选项) - 库存查询新增「入库时间」列,导出 Excel 同步带上 - 入库单商品明细:隐藏商品编码列,生产日期从选填折叠区移至主行常显 - 筛选弹窗重构:顶部搜索框实时过滤 + 滚动列表(ConstrainedBox maxHeight)根治溢出 - 已选项以 Chip 标签置顶展示,每个标签带 × 可单独取消 - FilterableColumnHeader 筛选图标改为常驻,不再需要 hover 才显示 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,8 @@ class InventoryListNotifier extends AsyncNotifier<PageResult<Inventory>> {
|
||||
int _pageSize = 20;
|
||||
int? _warehouseId;
|
||||
String _keyword = '';
|
||||
List<String> _series = [];
|
||||
List<String> _spec = [];
|
||||
PageResult<Inventory>? _cache;
|
||||
|
||||
@override
|
||||
@@ -40,6 +42,8 @@ class InventoryListNotifier extends AsyncNotifier<PageResult<Inventory>> {
|
||||
return ref.read(inventoryRepositoryProvider).listInventory(
|
||||
warehouseId: _warehouseId,
|
||||
keyword: _keyword.isEmpty ? null : _keyword,
|
||||
series: _series.isEmpty ? null : _series,
|
||||
spec: _spec.isEmpty ? null : _spec,
|
||||
page: _page,
|
||||
pageSize: _pageSize,
|
||||
);
|
||||
@@ -68,6 +72,18 @@ class InventoryListNotifier extends AsyncNotifier<PageResult<Inventory>> {
|
||||
reload();
|
||||
}
|
||||
|
||||
void setSeries(List<String> series) {
|
||||
_series = series;
|
||||
_page = 1;
|
||||
reload();
|
||||
}
|
||||
|
||||
void setSpec(List<String> spec) {
|
||||
_spec = spec;
|
||||
_page = 1;
|
||||
reload();
|
||||
}
|
||||
|
||||
void reload() {
|
||||
state = const AsyncValue.loading();
|
||||
_fetch().then((result) {
|
||||
|
||||
Reference in New Issue
Block a user