From 558ff9f8dd81de724c6b1dd615556d9347cb8bf9 Mon Sep 17 00:00:00 2001 From: zhangyan Date: Tue, 4 Aug 2026 14:05:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=90=A5=E5=85=BB=E7=94=A8=E9=A4=90?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=8F=E8=90=A5=E5=88=86=E6=9E=90/?= =?UTF-8?q?=E9=A4=90=E5=93=81=E5=88=86=E6=9E=90=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E5=B0=8F=E7=A5=A8=E5=B0=8F=E8=AE=A1=E6=8C=89=E5=85=8B=E9=87=8D?= =?UTF-8?q?=C3=97100g=E5=8D=95=E4=BB=B7=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 din-biz-analysis.html(经营分析):营业日期筛选、数据总览4KPI、交易分析宽表、餐次/订单/支付/异常四面板 - 新增 din-meal-analysis.html(餐品分析):查询日期+餐次筛选、数据总览5KPI(含开餐总重量)、营养秤/档口秤多卡片11列明细表 - 营养用餐29个页面侧边栏新增「数据分析」子菜单,index.html SITE_MAP 同步 - 小票小计改为 克重÷100×单价(100g) 实时计算,金额重新核算 - 餐卡余额仅会员支付订单展示 --- index.html | 2 + .../checkout-device/02-print-receipt.html | 70 ++-- .../checkout-device/doc/CHANGELOG.md | 6 + web-admin/nutrition/din-algo-population.html | 10 + web-admin/nutrition/din-algo-vip.html | 10 + web-admin/nutrition/din-biz-analysis.html | 296 ++++++++++++++ web-admin/nutrition/din-canteen-add.html | 10 + web-admin/nutrition/din-canteen-line.html | 10 + web-admin/nutrition/din-canteen.html | 10 + web-admin/nutrition/din-content-center.html | 10 + web-admin/nutrition/din-data-benefit.html | 10 + web-admin/nutrition/din-data-consume.html | 10 + web-admin/nutrition/din-data-nutri.html | 10 + web-admin/nutrition/din-dict-config.html | 10 + web-admin/nutrition/din-dict-mgmt.html | 10 + web-admin/nutrition/din-dish-add.html | 10 + web-admin/nutrition/din-dish-all.html | 10 + web-admin/nutrition/din-dish-own.html | 10 + web-admin/nutrition/din-ingredient-add.html | 10 + web-admin/nutrition/din-ingredient.html | 10 + web-admin/nutrition/din-innovation.html | 10 + web-admin/nutrition/din-meal-analysis.html | 363 ++++++++++++++++++ web-admin/nutrition/din-model-llm.html | 10 + web-admin/nutrition/din-model-small.html | 10 + web-admin/nutrition/din-order-line.html | 10 + web-admin/nutrition/din-order-meal.html | 10 + web-admin/nutrition/din-order-pickup.html | 10 + web-admin/nutrition/din-recipe-mgmt.html | 10 + web-admin/nutrition/din-terminal.html | 10 + web-admin/nutrition/din-user-account.html | 10 + web-admin/nutrition/din-user-mgmt.html | 10 + web-admin/nutrition/doc/CHANGELOG.md | 7 + .../nutrition/prod-qc-nutrition-add.html | 10 + .../nutrition/prod-qc-nutrition-sync.html | 10 + web-admin/nutrition/prod-qc-nutrition.html | 10 + 35 files changed, 1002 insertions(+), 32 deletions(-) create mode 100644 web-admin/nutrition/din-biz-analysis.html create mode 100644 web-admin/nutrition/din-meal-analysis.html 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 += '【' + zoneName + '】'; 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;} 💳消费管理 📊营养管理 📈餐材效益 +