fix(client): rebase 到 main 后适配打印线与 token 体系
main 的打印代码引用了分支已删除的 AppTheme(app_theme.dart)。按「冲突以 main 逻辑为准」
保留 main 的打印预览流程,把三处 AppTheme.* 颜色迁移到分支 token 体系:
- stock_in/out_list 单据详情顶栏:brand50/border/primaryDark → context.tokens.*
- order_print_preview_dialog:import 换 context_tokens,primary/textSecondary → tokens.primary/muted
form 屏改用 main 的 showStock{In,Out}OrderPrint 打印预览入口,随之刷新 12 张 form golden 基线。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1072,26 +1072,29 @@ class _StockInDetailDialogState extends ConsumerState<_StockInDetailDialog> {
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
|
||||
decoration: const BoxDecoration(
|
||||
color: AppTheme.brand50,
|
||||
border: Border(bottom: BorderSide(color: AppTheme.border)),
|
||||
decoration: BoxDecoration(
|
||||
color: context.tokens.brand50,
|
||||
border: Border(
|
||||
bottom: BorderSide(color: context.tokens.border)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: AppTheme.primaryDark),
|
||||
icon: Icon(Icons.arrow_back,
|
||||
color: context.tokens.primaryDark),
|
||||
tooltip: '返回',
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
const Text('入库单详情',
|
||||
Text('入库单详情',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppTheme.primaryDark)),
|
||||
color: context.tokens.primaryDark)),
|
||||
const Spacer(),
|
||||
if (_loadedOrder != null)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.print_outlined, color: AppTheme.primaryDark),
|
||||
icon: Icon(Icons.print_outlined,
|
||||
color: context.tokens.primaryDark),
|
||||
tooltip: '打印',
|
||||
onPressed: () => showStockInOrderPrint(context, ref, _loadedOrder!),
|
||||
),
|
||||
|
||||
@@ -983,26 +983,29 @@ class _StockOutDetailDialogState extends ConsumerState<_StockOutDetailDialog> {
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
|
||||
decoration: const BoxDecoration(
|
||||
color: AppTheme.brand50,
|
||||
border: Border(bottom: BorderSide(color: AppTheme.border)),
|
||||
decoration: BoxDecoration(
|
||||
color: context.tokens.brand50,
|
||||
border: Border(
|
||||
bottom: BorderSide(color: context.tokens.border)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: AppTheme.primaryDark),
|
||||
icon: Icon(Icons.arrow_back,
|
||||
color: context.tokens.primaryDark),
|
||||
tooltip: '返回',
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
const Text('出库单详情',
|
||||
Text('出库单详情',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppTheme.primaryDark)),
|
||||
color: context.tokens.primaryDark)),
|
||||
const Spacer(),
|
||||
if (_loadedOrder != null)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.print_outlined, color: AppTheme.primaryDark),
|
||||
icon: Icon(Icons.print_outlined,
|
||||
color: context.tokens.primaryDark),
|
||||
tooltip: '打印',
|
||||
onPressed: () => showStockOutOrderPrint(context, ref, _loadedOrder!),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user