feat(client): 库存/盘点/财务窄屏对齐移动原型(KPI 网格/卡片流/图标徽章/sheet)
- 库存列表:窄屏隐藏页内大标题头;KPI 2×2 MKpiGrid(缺货卡 warn+点击筛选); MSearchRow(详搜钮开筛选 sheet:状态/规格/系列);卡片徽章换图标变体 - 库存盘点:窄屏卡片流(单号/范围·项数/进行中徽章带图标/差异/日期)+ 详情 sheet(drow 键值行)+ 底部操作条;DateTime.now→appNow 可注入时钟 - 财务:窄屏隐藏大标题头;KPI 2×2(收入 up 绿/支出 down 红/应收 warn); DsSeg 应收/应付/流水三分段 + 卡片流(类型徽章带图标、金额正负色) - golden:新增 m_inventory / m_inventory_check / m_finance 三屏×三主题 (390×844@2x);重生成既有 inventory_list_mobile / finance_mobile 基准 (桌面 golden 零改动) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:jiu_client/core/utils/clock.dart';
|
||||
import 'package:jiu_client/models/warehouse.dart';
|
||||
import 'package:jiu_client/providers/warehouse_provider.dart';
|
||||
import 'package:jiu_client/screens/inventory/inventory_check_screen.dart';
|
||||
|
||||
import '../support/golden_harness.dart';
|
||||
|
||||
/// 库存盘点 窄屏形态 golden × 三主题(390×844 @2x)——对齐原型 m-inventory-check.html
|
||||
/// 粒度:基本信息卡 + 「盘点单」卡片流(单号/范围·项数/进行中徽章带图标/差异/日期)
|
||||
/// + 底部操作条(取消/提交盘点)。时钟冻结保证单号/日期确定化。
|
||||
/// 更新基准:flutter test --update-goldens test/golden/inventory_check_mobile_golden_test.dart
|
||||
|
||||
const _warehouses = [
|
||||
Warehouse(id: 1, name: '主仓', isDefault: true),
|
||||
Warehouse(id: 2, name: '东库', isDefault: false),
|
||||
];
|
||||
|
||||
class _FakeWarehouses extends WarehouseListNotifier {
|
||||
@override
|
||||
Future<List<Warehouse>> build() async => _warehouses;
|
||||
}
|
||||
|
||||
List<Override> _overrides() => [
|
||||
warehouseListProvider.overrideWith(() => _FakeWarehouses()),
|
||||
];
|
||||
|
||||
void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
appClock = () => DateTime(2026, 6, 20, 9, 30, 15);
|
||||
|
||||
goldenAcrossThemes(
|
||||
'inventory check 窄屏(m-inventory-check)',
|
||||
goldenPrefix: 'm_inventory_check',
|
||||
child: () => const InventoryCheckScreen(),
|
||||
overrides: _overrides,
|
||||
logical: const Size(390, 844),
|
||||
dpr: 2,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user