diff --git a/index.html b/index.html
index ff37d95..989be3b 100644
--- a/index.html
+++ b/index.html
@@ -318,6 +318,8 @@ const SITE_MAP = [
{ file:'din-data-nutri.html', label:'营养数据' },
{ file:'din-data-consume.html', label:'消费数据' },
{ file:'din-data-benefit.html', label:'效益数据' },
+ { file:'din-biz-analysis.html', label:'经营分析' },
+ { file:'din-meal-analysis.html', label:'餐品分析' },
{ file:'prod-recipe-plan.html', label:'食谱排期' },
{ file:'prod-clean-order.html', label:'净菜下单' },
{ file:'prod-proc-combo.html', label:'配菜组合' },
diff --git a/other-module/canteen-device/checkout-device/02-print-receipt.html b/other-module/canteen-device/checkout-device/02-print-receipt.html
index 576ce2e..770bb46 100644
--- a/other-module/canteen-device/checkout-device/02-print-receipt.html
+++ b/other-module/canteen-device/checkout-device/02-print-receipt.html
@@ -581,12 +581,13 @@
time: '2026-08-03 12:15:30',
payTime: '2026-08-03 12:15:35',
items: [
- { name: '宫保鸡丁', zone: '档口秤', weight: '200g', price: 18.00, qty: 1, subtotal: 18.00 },
- { name: '番茄炒蛋', zone: '营养秤', weight: '150g', price: 8.00, qty: 1, subtotal: 8.00 },
- { name: '米饭', zone: '营养秤', weight: '250g', price: 2.00, qty: 1, subtotal: 2.00 },
- { name: '紫菜蛋花汤', zone: '档口秤', weight: '300g', price: 5.00, qty: 1, subtotal: 5.00 }
+ /* 小计 = 克重 ÷ 100 × 单价(100g) */
+ { name: '宫保鸡丁', zone: '档口秤', weight: 200, price: 9.00, qty: 1 },
+ { name: '番茄炒蛋', zone: '营养秤', weight: 150, price: 5.00, qty: 1 },
+ { name: '米饭', zone: '营养秤', weight: 250, price: 1.60, qty: 1 },
+ { name: '紫菜蛋花汤', zone: '档口秤', weight: 300, price: 2.00, qty: 1 }
],
- total: 33.00, discount: 3.00, payable: 30.00, paid: 30.00,
+ total: 35.50, discount: 3.00, payable: 32.50, paid: 32.50,
payType: '会员支付', payMethod: '人脸支付', balance: 1280.50,
nutrition: { calories: 685, protein: 28, fat: 18, carb: 95, score: 82 },
printed: true
@@ -600,11 +601,11 @@
time: '2026-08-03 07:42:18',
payTime: '2026-08-03 07:42:23',
items: [
- { name: '豆浆', zone: '营养秤', weight: '300g', price: 3.00, qty: 1, subtotal: 3.00 },
- { name: '油条', zone: '档口秤', weight: '120g', price: 2.50, qty: 2, subtotal: 5.00 },
- { name: '茶叶蛋', zone: '营养秤', weight: '60g', price: 4.00, qty: 1, subtotal: 4.00 }
+ { name: '豆浆', zone: '营养秤', weight: 300, price: 1.00, qty: 1 },
+ { name: '油条', zone: '档口秤', weight: 240, price: 2.50, qty: 2 },
+ { name: '茶叶蛋', zone: '营养秤', weight: 60, price: 4.00, qty: 1 }
],
- total: 12.00, discount: 0, payable: 12.00, paid: 12.00,
+ total: 11.40, discount: 0, payable: 11.40, paid: 11.40,
payType: '会员支付', payMethod: '人脸支付', balance: 1292.50,
nutrition: { calories: 425, protein: 15, fat: 12, carb: 60, score: 75 },
printed: true
@@ -618,13 +619,13 @@
time: '2026-08-03 12:32:45',
payTime: '2026-08-03 12:32:50',
items: [
- { name: '红烧肉', zone: '档口秤', weight: '180g', price: 22.00, qty: 1, subtotal: 22.00 },
- { name: '清炒时蔬', zone: '营养秤', weight: '150g', price: 6.00, qty: 1, subtotal: 6.00 },
- { name: '鱼香肉丝', zone: '档口秤', weight: '160g', price: 12.00, qty: 1, subtotal: 12.00 },
- { name: '米饭', zone: '营养秤', weight: '250g', price: 2.00, qty: 1, subtotal: 2.00 },
- { name: '冬瓜排骨汤', zone: '档口秤', weight: '300g', price: 3.00, qty: 1, subtotal: 3.00 }
+ { name: '红烧肉', zone: '档口秤', weight: 180, price: 12.00, qty: 1 },
+ { name: '清炒时蔬', zone: '营养秤', weight: 150, price: 4.00, qty: 1 },
+ { name: '鱼香肉丝', zone: '档口秤', weight: 160, price: 7.50, qty: 1 },
+ { name: '米饭', zone: '营养秤', weight: 250, price: 1.60, qty: 1 },
+ { name: '冬瓜排骨汤', zone: '档口秤', weight: 300, price: 1.00, qty: 1 }
],
- total: 45.00, discount: 5.00, payable: 40.00, paid: 40.00,
+ total: 46.60, discount: 5.00, payable: 41.60, paid: 41.60,
payType: '会员支付', payMethod: '人脸支付', balance: 1240.50,
nutrition: { calories: 720, protein: 35, fat: 28, carb: 88, score: 88 },
printed: false
@@ -638,12 +639,12 @@
time: '2026-08-03 18:15:20',
payTime: '2026-08-03 18:15:25',
items: [
- { name: '清蒸鲈鱼', zone: '档口秤', weight: '200g', price: 25.00, qty: 1, subtotal: 25.00 },
- { name: '蒜蓉西兰花', zone: '营养秤', weight: '150g', price: 6.00, qty: 1, subtotal: 6.00 },
- { name: '紫米饭', zone: '营养秤', weight: '200g', price: 3.00, qty: 1, subtotal: 3.00 }
+ { name: '清蒸鲈鱼', zone: '档口秤', weight: 200, price: 12.50, qty: 1 },
+ { name: '蒜蓉西兰花', zone: '营养秤', weight: 150, price: 4.00, qty: 1 },
+ { name: '紫米饭', zone: '营养秤', weight: 200, price: 1.50, qty: 1 }
],
- total: 28.00, discount: 0, payable: 28.00, paid: 28.00,
- payType: '扫码支付', payMethod: '微信支付', balance: 1212.50,
+ total: 34.00, discount: 0, payable: 34.00, paid: 34.00,
+ payType: '扫码支付', payMethod: '微信支付',
nutrition: { calories: 510, protein: 32, fat: 14, carb: 65, score: 90 },
printed: false
},
@@ -656,12 +657,12 @@
time: '2026-08-03 12:48:10',
payTime: '2026-08-03 12:48:15',
items: [
- { name: '番茄炒蛋', zone: '营养秤', weight: '150g', price: 8.00, qty: 1, subtotal: 8.00 },
- { name: '麻婆豆腐', zone: '档口秤', weight: '180g', price: 10.00, qty: 1, subtotal: 10.00 },
- { name: '米饭', zone: '营养秤', weight: '250g', price: 2.00, qty: 1, subtotal: 2.00 },
- { name: '番茄蛋汤', zone: '档口秤', weight: '280g', price: 5.00, qty: 1, subtotal: 5.00 }
+ { name: '番茄炒蛋', zone: '营养秤', weight: 150, price: 5.00, qty: 1 },
+ { name: '麻婆豆腐', zone: '档口秤', weight: 180, price: 5.00, qty: 1 },
+ { name: '米饭', zone: '营养秤', weight: 250, price: 1.60, qty: 1 },
+ { name: '番茄蛋汤', zone: '档口秤', weight: 280, price: 1.50, qty: 1 }
],
- total: 25.00, discount: 0, payable: 25.00, paid: 25.00,
+ total: 24.70, discount: 0, payable: 24.70, paid: 24.70,
payType: '会员支付', payMethod: '人脸支付', balance: 1187.50,
nutrition: { calories: 480, protein: 22, fat: 15, carb: 70, score: 78 },
printed: false
@@ -675,11 +676,11 @@
time: '2026-08-03 08:15:30',
payTime: '2026-08-03 08:15:33',
items: [
- { name: '皮蛋瘦肉粥', zone: '档口秤', weight: '350g', price: 5.00, qty: 1, subtotal: 5.00 },
- { name: '鲜肉包子', zone: '营养秤', weight: '150g', price: 3.00, qty: 1, subtotal: 3.00 }
+ { name: '皮蛋瘦肉粥', zone: '档口秤', weight: 350, price: 1.40, qty: 1 },
+ { name: '鲜肉包子', zone: '营养秤', weight: 150, price: 2.00, qty: 1 }
],
- total: 8.00, discount: 0, payable: 8.00, paid: 8.00,
- payType: '扫码支付', payMethod: '支付宝支付', balance: 1195.50,
+ total: 7.90, discount: 0, payable: 7.90, paid: 7.90,
+ payType: '扫码支付', payMethod: '支付宝支付',
nutrition: { calories: 320, protein: 12, fat: 8, carb: 48, score: 70 },
printed: false
}
@@ -757,11 +758,13 @@
if (!zoneItems || zoneItems.length === 0) return;
itemsHtml += '
';
zoneItems.forEach(function(it) {
+ /* 小计 = 餐品克重 ÷ 100 × 单价(100g) */
+ var subtotal = it.weight / 100 * it.price;
itemsHtml += ''
- + '| ' + it.name + '(' + it.weight + ') | '
+ + '' + it.name + '(' + it.weight + 'g) | '
+ '' + it.price.toFixed(2) + ' | '
+ '' + it.qty + ' | '
- + '' + it.subtotal.toFixed(2) + ' | '
+ + '' + subtotal.toFixed(2) + ' | '
+ '
';
});
});
@@ -806,7 +809,10 @@
+ ''
+ '
支付类型' + order.payType + '
'
+ '
支付方式' + order.payMethod + '
'
- + '
餐卡余额¥' + order.balance.toFixed(2) + '
'
+ /* 仅会员支付订单展示餐卡余额 */
+ + (order.payType === '会员支付'
+ ? '
餐卡余额¥' + order.balance.toFixed(2) + '
'
+ : '')
+ '
'
+ ''
/* 营养摄入摘要 */
diff --git a/other-module/canteen-device/checkout-device/doc/CHANGELOG.md b/other-module/canteen-device/checkout-device/doc/CHANGELOG.md
index 15a9fe8..9a0dff2 100644
--- a/other-module/canteen-device/checkout-device/doc/CHANGELOG.md
+++ b/other-module/canteen-device/checkout-device/doc/CHANGELOG.md
@@ -1,5 +1,11 @@
# 结算设备 CHANGELOG
+## 2026-08-04 | 小票金额计算与支付信息优化
+
+### 变更
+- `02-print-receipt.html` 小计计算规则改为「餐品克重 ÷ 100 × 单价(100g)」,渲染时实时计算;Mock 数据 price 改为 100g 单价、weight 改为数值克重,移除硬编码 subtotal 字段,各订单合计/应付/实付重新核算
+- 餐卡余额行仅会员支付订单展示;扫码支付/现金支付订单不再显示餐卡余额,并移除两笔扫码支付订单的 balance 字段
+
## 2026-08-04 | 打印小票功能完善
### 新增
diff --git a/web-admin/nutrition/din-algo-population.html b/web-admin/nutrition/din-algo-population.html
index 0833e0c..263b537 100644
--- a/web-admin/nutrition/din-algo-population.html
+++ b/web-admin/nutrition/din-algo-population.html
@@ -170,6 +170,16 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
+