Files
jiu/client/lib/widgets/ds/status_icon_map.dart
T
wangjia be9afcf68d feat(client): 移动壳基建——底部 5 tab + 我的 hub + 统一底部 sheet + 移动组件四件套
对齐移动原型体系(m-*.html)的 Stage 0 共享基建,桌面形态零改动:

- 导航:router 新增 branch 9(/me 我的 + /me/license 授权屏);窄屏 tab 根
  (库存/入库/出库/财务/我的)出底部 MTabBar,二级屏隐藏 tabbar + 顶栏返回箭头
  (PopScope 拦系统返回键防退 app);窄屏 Drawer/汉堡删除;窄屏顶栏对齐 m-top
  (标题 + 主题/通知铃/头像→我的)
- sheet:showMSheet(grip/标题/86vh/键盘避让)+ showAdaptiveSheet;六个共享
  弹层呈现函数加窄屏 sheet 分支(订单/往来/财务往来/商品编辑抽屉 + 退单/登记收支
  dialog 的 asSheet 形态)
- 徽章:DsBadge/StatusPill/StatusBadge 加图标变体(默认圆点零漂移)+
  status_icon_map 转录原型 BADGE_ICON 28 词
- 组件:MKpiGrid(2×2 可点 KPI)/ MSearchRow(搜索+状态钮+详搜钮)/
  MHubGroup(hub 入口组)/ showThemeSheet(主题外观 sheet)
- 授权:_LicensePanel/_SettingsCard 抽取为公共 LicensePanel/SettingsCard,
  窄屏授权跳转 /me/license
- golden:app_shell_mobile + me 各三主题(390×844@2x);全量 259 测试绿,
  check_ds_code / check-l1-sync 闸过

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 11:56:04 +08:00

51 lines
2.0 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// widgets/ds/status_icon_map.dart — 状态词 → 徽章图标映射。
// 单一真相源镜像:原型 icons.js 的 BADGE_ICON2026-07-04 拍板:全系统圆点→代表图标),
// 逐词转录为 LucideIcons。新增状态先在原型 icons.js 登记,再同步到此表。
import 'package:flutter/widgets.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
const Map<String, IconData> kStatusIcons = {
// 库存状态
'在售': LucideIcons.shoppingCart, // i-cart
'预警': LucideIcons.triangleAlert, // i-alert
'缺货': LucideIcons.x, // i-close
// 单据状态
'草稿': LucideIcons.fileText, // i-ic06
'待审核': LucideIcons.clock, // i-ic04
'已审核': LucideIcons.check, // i-check
'已拒绝': LucideIcons.x, // i-close
'已通过': LucideIcons.check, // i-check
'已驳回': LucideIcons.x, // i-close
'部分退单': LucideIcons.undo2, // i-undo
'已退单': LucideIcons.undo2, // i-undo
'待定价': LucideIcons.japaneseYen, // i-yen
// 通用启停 / 往来类型
'启用': LucideIcons.check, // i-check
'停用': LucideIcons.x, // i-close
'供应商': LucideIcons.box, // i-box
'客户': LucideIcons.user, // i-ic37
'两者': LucideIcons.refreshCw, // i-refresh
// 角色
'管理员': LucideIcons.shield, // i-shield-2
'普通': LucideIcons.user, // i-ic37
'只读': LucideIcons.eye, // i-eye
// 设备 / 会话
'在线': LucideIcons.wifi, // i-wifi
'离线': LucideIcons.wifiOff, // i-wifi-off
// 盘点
'进行中': LucideIcons.clock, // i-ic04
'已完成': LucideIcons.check, // i-check
// 兑换券
'未使用': LucideIcons.tag, // i-tag
'已兑换': LucideIcons.check, // i-check
'作废': LucideIcons.x, // i-close
// 财务
'未结清': LucideIcons.clock, // i-ic04
'已结清': LucideIcons.check, // i-check
'收款': LucideIcons.download, // i-download
'付款': LucideIcons.upload, // i-upload
};
/// 查状态词对应图标;未登记返回 null(调用方回退圆点形态)。
IconData? statusIcon(String label) => kStatusIcons[label];