feat(client): 草稿 KPI 卡(暗黄)+ 出库详情总售价列 + 明细去¥缩号 + 建单默认值 + 若干列名
- 出入库列表加草稿 KPI 卡(DsKpiTone.warn 新档,审核卡后,点击筛选草稿) - 出库详情 7 列:售价后加总售价;明细行内价格去 ¥ 且缩一号(合计保留 ¥); 5/7 列宽重排(系列/数量左移、进价(单瓶)不折行) - 出库建单:数量默认=可用数量、售价默认=参考售价(product.sale_price) - 入库详情列名:进价(单瓶)/总价;库存列表「单价」→「总价」(库存×成本); 商品抽屉:成本价(单瓶)/总成本价 - 公开商品预览页加返回按钮(仅 App 内 canPop 时显示,扫码直达保持纯净) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
This commit is contained in:
@@ -498,6 +498,14 @@ class _StockInListScreenState extends ConsumerState<StockInListScreen> {
|
||||
: DsKpiDelta.neutral,
|
||||
onTap: () => _setStatus('pending'),
|
||||
),
|
||||
DsKpi(
|
||||
title: '草稿单数 · 点击筛选',
|
||||
value: '${summary?.draftCount ?? 0}',
|
||||
icon: LucideIcons.filePen,
|
||||
tone: DsKpiTone.warn, // 暗黄(用户拍板)
|
||||
delta: (summary?.draftCount ?? 0) > 0 ? '待提交审核' : '点击筛选',
|
||||
onTap: () => _setStatus('draft'),
|
||||
),
|
||||
];
|
||||
|
||||
final mobile = context.isMobile;
|
||||
@@ -861,6 +869,8 @@ class _StockInListScreenState extends ConsumerState<StockInListScreen> {
|
||||
|
||||
static final _money =
|
||||
NumberFormat.currency(locale: 'zh_CN', symbol: '¥', decimalDigits: 0);
|
||||
// 明细行内数字(去 ¥,符号只留在合计)
|
||||
static final _num = NumberFormat('#,##0');
|
||||
static String _fmtQty(double q) =>
|
||||
q == q.roundToDouble() ? q.toStringAsFixed(0) : q.toString();
|
||||
|
||||
@@ -896,13 +906,14 @@ class _StockInListScreenState extends ConsumerState<StockInListScreen> {
|
||||
series: it.productSeries ?? '—',
|
||||
spec: it.productSpec ?? '',
|
||||
qty: _fmtQty(it.quantity),
|
||||
price: it.costPrice == 0 ? '待定价' : _money.format(it.costPrice),
|
||||
amount:
|
||||
it.costAmount == 0 ? '待定价' : _money.format(it.costAmount),
|
||||
price: it.costPrice == 0 ? '待定价' : _num.format(it.costPrice),
|
||||
amount: it.costAmount == 0 ? '待定价' : _num.format(it.costAmount),
|
||||
pending: it.costPrice == 0,
|
||||
))
|
||||
.toList(),
|
||||
totalText: o.costTotal != null ? _money.format(o.costTotal) : '—',
|
||||
priceLabel: '进价(单瓶)',
|
||||
amountLabel: '总价',
|
||||
actionGroups: _detailActionGroups(o),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user