feat(client): 出库明细成本/售价/利润三列重设计 + 建单利润列 + 入库列头统一

- 出库详情抽屉(管理员):数量/成本价/售价/利润 + 合计金额/合计利润 双行;
  operator 见 售价/小计(服务端抹零+前端隐藏双保险);利润负数 danger
- 出库建单:商品名称下带编码(字体同系列列);金额列→利润列(实时);
  底栏合计利润(仅管理员);进价列仅管理员;提交发新 key(cost_price/sale_price)
- 入库建单列头:进价(单瓶)/ 参考售价 / 总进价
- 退单弹窗金额改售价口径(与冲应收一致);打印保留待定价回退成本兼容
- models 字段随后端消歧改名;golden 重打;新增抽屉双形态 widget 测试

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 12:44:22 +08:00
parent 4fd0bb8b83
commit 979ca3c83b
20 changed files with 400 additions and 145 deletions
@@ -32,6 +32,7 @@ class OrderFormShell extends StatelessWidget {
final Widget detail;
final String rowsLabel; // 明细 N 行
final String totalText; // 已格式化 ¥
final String? profitText; // 合计利润(出库·仅管理员;null 不渲染)
final bool loading;
const OrderFormShell({
@@ -45,6 +46,7 @@ class OrderFormShell extends StatelessWidget {
required this.detail,
required this.rowsLabel,
required this.totalText,
this.profitText,
this.statusBadge,
this.notice,
this.loading = false,
@@ -123,6 +125,20 @@ class OrderFormShell extends StatelessWidget {
Text(rowsLabel,
style: TextStyle(fontSize: AppDims.fsSm, color: t.muted)),
const Spacer(),
if (profitText != null) ...[
Text('合计利润 ',
style:
TextStyle(fontSize: AppDims.fsBody, color: t.muted)),
Text(profitText!,
style: TextStyle(
fontSize: AppDims.fsTitle,
color:
profitText!.contains('-') ? t.danger : t.success,
fontFamily: AppFonts.mono,
fontFamilyFallback: AppFonts.monoFallback,
fontWeight: FontWeight.w700)),
const SizedBox(width: 18),
],
Text('合计金额 ',
style: TextStyle(fontSize: AppDims.fsBody, color: t.muted)),
Text(totalText,