22e07613a1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
57 lines
2.4 KiB
Dart
57 lines
2.4 KiB
Dart
// widgets/ds/status_icon_map.dart — 状态词 → 徽章图标映射。
|
||
// 单一真相源镜像:原型 icons.js 的 BADGE_ICON(2026-07-04 拍板:全系统圆点→代表图标),
|
||
// 逐词转录为 LucideIcons。新增状态先在原型 icons.js 登记,再同步到此表。
|
||
import 'package:flutter/widgets.dart';
|
||
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
||
|
||
const Map<String, IconData> kStatusIcons = {
|
||
// 库存状态(三态落库 2026-07-07:在售/库存/已售;预警/缺货为数量派生提示)
|
||
'在售': LucideIcons.shoppingCart, // i-cart
|
||
'库存': LucideIcons.box, // i-box
|
||
'已售': LucideIcons.check, // i-check
|
||
'预警': 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
|
||
// 授权购买订单(license_purchases,2026-07-10 登记)
|
||
'待支付': LucideIcons.clock, // i-ic04
|
||
'已支付': LucideIcons.check, // i-check
|
||
'已关闭': LucideIcons.x, // i-close
|
||
};
|
||
|
||
/// 查状态词对应图标;未登记返回 null(调用方回退圆点形态)。
|
||
IconData? statusIcon(String label) => kStatusIcons[label];
|