feat: 入库单/商品详情展示产地保质期储存方式,商品详情显示建议零售价

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-08 07:57:10 +08:00
parent 1ec1d4209a
commit 4e64e5eb47
6 changed files with 87 additions and 3 deletions
@@ -813,13 +813,34 @@ class _StockInDetailDialogState extends ConsumerState<_StockInDetailDialog> {
...o.items.asMap().entries.map((e) {
final i = e.key;
final item = e.value;
// 产地/保质期/储存拼成一行辅助文本
final attrs = [
if (item.productOrigin?.isNotEmpty ?? false) item.productOrigin!,
if (item.productShelfLife?.isNotEmpty ?? false) item.productShelfLife!,
if (item.productStorage?.isNotEmpty ?? false) item.productStorage!,
].join(' · ');
return TableRow(
decoration: BoxDecoration(
color: i.isEven ? Colors.white : const Color(0xFFFAFAFA)),
children: [
_TableCell('${i + 1}'),
_TableCell(item.productCode ?? '-'),
_TableCell(item.productName ?? '-'),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(item.productName ?? '-',
style: const TextStyle(fontSize: 13)),
if (attrs.isNotEmpty)
Text(attrs,
style: const TextStyle(
fontSize: 11,
color: Color(0xFF888888))),
],
),
),
_TableCell(item.productSeries ?? '-'),
_TableCell(item.productSpec ?? '-'),
_TableCell(item.quantity.toStringAsFixed(3)),