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:
wangjia
2026-07-03 14:31:50 +08:00
parent 4d1d69595b
commit 2bf5b98ba2
28 changed files with 132 additions and 35 deletions
+26 -11
View File
@@ -287,6 +287,9 @@ class _LinesTable extends StatelessWidget {
: Text(amountLabel,
textAlign: TextAlign.right, style: _hStyle(t)),
c6: _withProfit
? Text('总售价', textAlign: TextAlign.right, style: _hStyle(t))
: null,
c7: _withProfit
? Text('利润', textAlign: TextAlign.right, style: _hStyle(t))
: null,
),
@@ -344,6 +347,10 @@ class _LinesTable extends StatelessWidget {
: _priceCell(context, lines[i].amount, lines[i].pending,
accent: true),
c6: _withProfit
? _priceCell(context, lines[i].amount, lines[i].pending,
accent: true)
: null,
c7: _withProfit
? _profitCell(
context, lines[i].profit ?? '', lines[i].pending)
: null,
@@ -377,31 +384,38 @@ class _LinesTable extends StatelessWidget {
color: accent ? t.text : t.text));
}
// 5 列布局(对齐原型 grid 1fr 124 40 64 78);c6 非空时为出库 6 列形态
// (数量/成本价/售价/利润,数值列等宽收窄)。
// 5 列布局(对齐原型 grid 1fr 124 40 64 78);c6/c7 非空时为出库 7 列形态
// (数量/成本价/售价/总售价/利润,数值列等宽收窄)。
Widget _lineRow(BuildContext context,
{required Widget c1,
required Widget c2,
required Widget c3,
required Widget c4,
required Widget c5,
Widget? c6}) {
final six = c6 != null;
Widget? c6,
Widget? c7}) {
final wide = c6 != null;
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: c1),
const SizedBox(width: 8),
SizedBox(width: six ? 84 : 96, child: c2),
// 5 列(入库)时中间列加宽左移:商品列不再吃掉全部余宽,
// 「进价(单瓶)」表头一行放得下(2026-07-03 用户反馈)。
SizedBox(width: wide ? 100 : 124, child: c2),
const SizedBox(width: 8),
SizedBox(width: 34, child: c3),
SizedBox(width: wide ? 32 : 40, child: c3),
const SizedBox(width: 8),
SizedBox(width: six ? 56 : 60, child: c4),
SizedBox(width: wide ? 62 : 88, child: c4),
const SizedBox(width: 8),
SizedBox(width: six ? 56 : 72, child: c5),
if (six) ...[
SizedBox(width: wide ? 62 : 88, child: c5),
if (c6 != null) ...[
const SizedBox(width: 8),
SizedBox(width: 56, child: c6),
SizedBox(width: 62, child: c6),
],
if (c7 != null) ...[
const SizedBox(width: 8),
SizedBox(width: 62, child: c7),
],
],
);
@@ -421,7 +435,8 @@ class _LinesTable extends StatelessWidget {
return Text(text,
textAlign: TextAlign.right,
style: TextStyle(
fontSize: AppDims.fsBody,
// 明细数值列缩小一号(2026-07-03 用户反馈:列多时拥挤)
fontSize: AppDims.fsSm,
fontFamily: AppFonts.mono,
fontFamilyFallback: AppFonts.monoFallback,
fontWeight: FontWeight.w600,