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 668dca2..576ce2e 100644 --- a/other-module/canteen-device/checkout-device/02-print-receipt.html +++ b/other-module/canteen-device/checkout-device/02-print-receipt.html @@ -312,7 +312,15 @@ .receipt-table td:nth-child(2), .receipt-table td:nth-child(3), .receipt-table td:nth-child(4) { text-align: right; } - .receipt-table td:nth-child(3) { color: #666; } + .receipt-table td:nth-child(2) { color: #666; } + .receipt-zone-header td { + font-size: 11px; + font-weight: 600; + color: #333; + padding: 6px 0 2px; + text-align: left; + border-bottom: 1px dotted #ccc; + } /* 金额汇总 */ .receipt-amount { @@ -328,7 +336,7 @@ .receipt-amount__paid { font-size: 12px; font-weight: 600; - color: #0a7c64; + color: #1a1a2e; } /* 营养摄入摘要 */ @@ -371,37 +379,50 @@ justify-content: space-between; align-items: center; padding: 6px 10px; - background: linear-gradient(90deg, #f0f7ff, #e6f4ff); + background: #f5f5f5; border-radius: 4px; - border: 1px solid #cce4ff; + border: 1px solid #ddd; } .receipt-score__label { font-size: 10px; - color: #4a90d9; + color: #333; font-weight: 600; } .receipt-score__value { font-size: 16px; font-weight: 700; - color: #2570c0; + color: #1a1a2e; } - /* 二维码 */ - .receipt-qr { + /* 双二维码并排 */ + .receipt-qr--dual { + display: flex; + gap: 12px; + justify-content: center; + padding: 6px 0; + } + .receipt-qr--dual .receipt-qr { + flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; - padding: 6px 0; } - .receipt-qr__img { - width: 84px; - height: 84px; + .receipt-qr--dual .receipt-qr__img { + width: 72px; + height: 72px; } - .receipt-qr__text { + .receipt-qr--dual .receipt-qr__text { font-size: 9px; color: #666; text-align: center; + font-weight: 600; + } + .receipt-qr--dual .receipt-qr__sub { + font-size: 8px; + color: #999; + text-align: center; + line-height: 1.3; } /* 底部提示 */ @@ -558,14 +579,15 @@ line: 'A 区 1 号餐线', cashier: '张三', time: '2026-08-03 12:15:30', + payTime: '2026-08-03 12:15:35', items: [ - { name: '宫保鸡丁', price: 18.00, qty: 1, subtotal: 18.00 }, - { name: '番茄炒蛋', price: 8.00, qty: 1, subtotal: 8.00 }, - { name: '米饭', price: 2.00, qty: 1, subtotal: 2.00 }, - { name: '紫菜蛋花汤', price: 5.00, qty: 1, subtotal: 5.00 } + { 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 } ], total: 33.00, discount: 3.00, payable: 30.00, paid: 30.00, - payMethod: '人脸支付', balance: 1280.50, + payType: '会员支付', payMethod: '人脸支付', balance: 1280.50, nutrition: { calories: 685, protein: 28, fat: 18, carb: 95, score: 82 }, printed: true }, @@ -576,13 +598,14 @@ line: 'A 区 1 号餐线', cashier: '张三', time: '2026-08-03 07:42:18', + payTime: '2026-08-03 07:42:23', items: [ - { name: '豆浆', price: 3.00, qty: 1, subtotal: 3.00 }, - { name: '油条', price: 2.50, qty: 2, subtotal: 5.00 }, - { name: '茶叶蛋', price: 4.00, qty: 1, subtotal: 4.00 } + { 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 } ], total: 12.00, discount: 0, payable: 12.00, paid: 12.00, - payMethod: '餐卡支付', balance: 1292.50, + payType: '会员支付', payMethod: '人脸支付', balance: 1292.50, nutrition: { calories: 425, protein: 15, fat: 12, carb: 60, score: 75 }, printed: true }, @@ -593,15 +616,16 @@ line: 'A 区 2 号餐线', cashier: '李四', time: '2026-08-03 12:32:45', + payTime: '2026-08-03 12:32:50', items: [ - { name: '红烧肉', price: 22.00, qty: 1, subtotal: 22.00 }, - { name: '清炒时蔬', price: 6.00, qty: 1, subtotal: 6.00 }, - { name: '鱼香肉丝', price: 12.00, qty: 1, subtotal: 12.00 }, - { name: '米饭', price: 2.00, qty: 1, subtotal: 2.00 }, - { name: '冬瓜排骨汤', price: 3.00, qty: 1, subtotal: 3.00 } + { 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 } ], total: 45.00, discount: 5.00, payable: 40.00, paid: 40.00, - payMethod: '人脸支付', balance: 1240.50, + payType: '会员支付', payMethod: '人脸支付', balance: 1240.50, nutrition: { calories: 720, protein: 35, fat: 28, carb: 88, score: 88 }, printed: false }, @@ -612,13 +636,14 @@ line: 'A 区 1 号餐线', cashier: '王五', time: '2026-08-03 18:15:20', + payTime: '2026-08-03 18:15:25', items: [ - { name: '清蒸鲈鱼', price: 25.00, qty: 1, subtotal: 25.00 }, - { name: '蒜蓉西兰花', price: 6.00, qty: 1, subtotal: 6.00 }, - { name: '紫米饭', price: 3.00, qty: 1, subtotal: 3.00 } + { 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 } ], total: 28.00, discount: 0, payable: 28.00, paid: 28.00, - payMethod: '扫码支付', balance: 1212.50, + payType: '扫码支付', payMethod: '微信支付', balance: 1212.50, nutrition: { calories: 510, protein: 32, fat: 14, carb: 65, score: 90 }, printed: false }, @@ -629,14 +654,15 @@ line: 'A 区 3 号餐线', cashier: '张三', time: '2026-08-03 12:48:10', + payTime: '2026-08-03 12:48:15', items: [ - { name: '番茄炒蛋', price: 8.00, qty: 1, subtotal: 8.00 }, - { name: '麻婆豆腐', price: 10.00, qty: 1, subtotal: 10.00 }, - { name: '米饭', price: 2.00, qty: 1, subtotal: 2.00 }, - { name: '番茄蛋汤', price: 5.00, qty: 1, subtotal: 5.00 } + { 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 } ], total: 25.00, discount: 0, payable: 25.00, paid: 25.00, - payMethod: '人脸支付', balance: 1187.50, + payType: '会员支付', payMethod: '人脸支付', balance: 1187.50, nutrition: { calories: 480, protein: 22, fat: 15, carb: 70, score: 78 }, printed: false }, @@ -647,12 +673,13 @@ line: 'A 区 2 号餐线', cashier: '李四', time: '2026-08-03 08:15:30', + payTime: '2026-08-03 08:15:33', items: [ - { name: '皮蛋瘦肉粥', price: 5.00, qty: 1, subtotal: 5.00 }, - { name: '鲜肉包子', price: 3.00, qty: 1, subtotal: 3.00 } + { name: '皮蛋瘦肉粥', zone: '档口秤', weight: '350g', price: 5.00, qty: 1, subtotal: 5.00 }, + { name: '鲜肉包子', zone: '营养秤', weight: '150g', price: 3.00, qty: 1, subtotal: 3.00 } ], total: 8.00, discount: 0, payable: 8.00, paid: 8.00, - payMethod: '餐卡支付', balance: 1195.50, + payType: '扫码支付', payMethod: '支付宝支付', balance: 1195.50, nutrition: { calories: 320, protein: 12, fat: 8, carb: 48, score: 70 }, printed: false } @@ -717,17 +744,30 @@ return; } - var itemsHtml = order.items.map(function(it) { - return '
| 餐品 | 单价 | 份数 | 小计 |
|---|---|---|---|
| 餐品 | 单价(100g) | 份数 | 小计 |