diff --git a/other-module/canteen-device/checkout-device/03-checkout.html b/other-module/canteen-device/checkout-device/03-checkout.html
index 64917f2..1e673a0 100644
--- a/other-module/canteen-device/checkout-device/03-checkout.html
+++ b/other-module/canteen-device/checkout-device/03-checkout.html
@@ -1107,6 +1107,54 @@
.toast--success { background: rgba(82, 196, 26, 0.92); }
.toast--warn { background: rgba(250, 173, 22, 0.92); }
.toast--error { background: rgba(245, 34, 45, 0.92); }
+
+ /* ============ 复秤对账条 ============ */
+ .weigh-check {
+ padding: 9px 24px;
+ background: rgba(82, 196, 26, 0.06);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+ flex-shrink: 0;
+ transition: background 0.25s, border-color 0.25s;
+ }
+ .weigh-check__row {
+ display: flex;
+ align-items: center;
+ gap: 20px;
+ font-size: 12px;
+ color: rgba(255, 255, 255, 0.7);
+ }
+ .weigh-check__item strong {
+ font-family: Menlo, Consolas, monospace;
+ font-size: 14px;
+ color: #fff;
+ margin-left: 6px;
+ }
+ .weigh-check__diff strong { color: #4ade80; }
+ .weigh-check__status {
+ margin-left: auto;
+ font-weight: 700;
+ color: #4ade80;
+ }
+ .weigh-check--warn {
+ background: rgba(251, 146, 60, 0.1);
+ border-bottom-color: rgba(251, 146, 60, 0.45);
+ }
+ .weigh-check--warn .weigh-check__diff strong { color: #fb923c; }
+ .weigh-check--warn .weigh-check__status {
+ color: #fb923c;
+ animation: weighBlink 1.2s infinite;
+ }
+ @keyframes weighBlink {
+ 0%, 100% { opacity: 1; }
+ 50% { opacity: 0.45; }
+ }
+ /* 补齐明细按钮警示呼吸态 */
+ .header-btn--warn {
+ background: rgba(251, 146, 60, 0.2) !important;
+ border-color: rgba(251, 146, 60, 0.6) !important;
+ color: #fb923c !important;
+ animation: weighBlink 1.2s infinite;
+ }
@@ -1124,6 +1172,7 @@
+
@@ -1160,12 +1209,22 @@
7 件
-
+
+
+
+ 📝 记录取餐 1240g
+ ⚖️ 实际复秤 1240g
+ 差额 0g
+ ✅ 核对通过
+
+
+
@@ -2031,8 +2090,59 @@
showToast('演示已重置', 'success');
}
+ /* ==================== 复秤对账 ==================== */
+ /* 记录取餐合计(与明细静态数据一致);复秤三态:正常/偏多(漏记)/偏少(多记) */
+ var RECORD_WEIGHT = 1240;
+ var WEIGH_MODES = [
+ { key: 'normal', label: '复秤正常', actual: 1240 },
+ { key: 'over', label: '漏记2条', actual: 1490 },
+ { key: 'under', label: '多记2条', actual: 1040 }
+ ];
+ var weighModeIdx = 0;
+
+ /* 循环切换复秤场景(演示自动读秤) */
+ function toggleWeighMode() {
+ weighModeIdx = (weighModeIdx + 1) % WEIGH_MODES.length;
+ var m = WEIGH_MODES[weighModeIdx];
+ var toggle = document.getElementById('weighToggle');
+ toggle.textContent = m.label;
+ toggle.classList.toggle('on', weighModeIdx !== 0);
+ refreshWeighCheck();
+ showToast('已切换复秤:' + m.label, weighModeIdx === 0 ? 'success' : 'warn');
+ }
+
+ /* 刷新复秤对账条:计算差额、判定阈值、联动警示与跳转 */
+ function refreshWeighCheck() {
+ var m = WEIGH_MODES[weighModeIdx];
+ var actual = m.actual;
+ var diff = actual - RECORD_WEIGHT;
+ var threshold = Math.max(50, RECORD_WEIGHT * 0.05);
+ var over = Math.abs(diff) > threshold;
+
+ document.getElementById('wcRecord').textContent = RECORD_WEIGHT + 'g';
+ document.getElementById('wcActual').textContent = actual + 'g';
+ document.getElementById('wcDiff').textContent = (diff > 0 ? '+' : '') + diff + 'g';
+
+ var box = document.getElementById('weighCheck');
+ var status = document.getElementById('wcStatus');
+ var btn = document.getElementById('reconcileBtn');
+
+ if (over) {
+ box.classList.add('weigh-check--warn');
+ status.innerHTML = (diff > 0) ? '⚠️ 疑似漏记,请补齐' : '⚠️ 疑似多记,请核对';
+ btn.classList.add('header-btn--warn');
+ } else {
+ box.classList.remove('weigh-check--warn');
+ status.innerHTML = '✅ 核对通过';
+ btn.classList.remove('header-btn--warn');
+ }
+ /* 跳转补齐明细时携带当前复秤值 */
+ btn.href = '08-reconcile.html?actual=' + actual;
+ }
+
/* 初始化 */
switchPay('online');
+ refreshWeighCheck();
diff --git a/other-module/canteen-device/checkout-device/08-reconcile.html b/other-module/canteen-device/checkout-device/08-reconcile.html
index b92201f..36c46fe 100644
--- a/other-module/canteen-device/checkout-device/08-reconcile.html
+++ b/other-module/canteen-device/checkout-device/08-reconcile.html
@@ -714,6 +714,105 @@
.toast--success { background: rgba(82, 196, 26, 0.92); }
.toast--warn { background: rgba(250, 173, 22, 0.92); }
.toast--error { background: rgba(245, 34, 45, 0.92); }
+
+ /* ============ 复秤对账横条 ============ */
+ .weigh-bar {
+ display: flex;
+ align-items: center;
+ gap: 22px;
+ padding: 9px 24px;
+ background: rgba(26, 43, 74, 0.4);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+ flex-shrink: 0;
+ font-size: 12px;
+ color: rgba(255, 255, 255, 0.7);
+ transition: background 0.25s, border-color 0.25s;
+ }
+ .weigh-bar__title { font-weight: 700; color: #fff; letter-spacing: 1px; }
+ .weigh-bar__item strong {
+ font-family: Menlo, Consolas, monospace;
+ font-size: 14px;
+ color: #fff;
+ margin-left: 6px;
+ }
+ .weigh-bar__diff strong { color: #4ade80; }
+ .weigh-bar__status { margin-left: auto; font-weight: 700; }
+ .weigh-bar--ok .weigh-bar__status { color: #4ade80; }
+ .weigh-bar--warn {
+ background: rgba(251, 146, 60, 0.1);
+ border-bottom-color: rgba(251, 146, 60, 0.45);
+ }
+ .weigh-bar--warn .weigh-bar__diff strong { color: #fb923c; }
+ .weigh-bar--warn .weigh-bar__status {
+ color: #fb923c;
+ animation: weighBlink 1.2s infinite;
+ }
+ @keyframes weighBlink {
+ 0%, 100% { opacity: 1; }
+ 50% { opacity: 0.45; }
+ }
+
+ /* ============ 智能推荐卡片 ============ */
+ .rec-card {
+ background: rgba(0, 0, 0, 0.22);
+ border: 1px solid rgba(251, 191, 36, 0.28);
+ border-radius: 8px;
+ padding: 10px 12px;
+ font-size: 12px;
+ }
+ .rec-head {
+ color: #fbbf24;
+ font-weight: 700;
+ margin-bottom: 6px;
+ line-height: 1.5;
+ }
+ .rec-item {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ padding: 6px 0;
+ border-top: 1px dashed rgba(255, 255, 255, 0.06);
+ }
+ .rec-item__rank {
+ width: 18px; height: 18px; border-radius: 50%;
+ background: rgba(251, 191, 36, 0.18);
+ color: #fbbf24; font-size: 10px; font-weight: 700;
+ display: flex; align-items: center; justify-content: center;
+ flex-shrink: 0;
+ }
+ .rec-item__body { flex: 1; min-width: 0; }
+ .rec-item__names {
+ color: #fff; font-weight: 600; line-height: 1.45;
+ overflow: hidden; display: -webkit-box;
+ -webkit-line-clamp: 2; -webkit-box-orient: vertical;
+ }
+ .rec-item__meta {
+ font-size: 10px; color: rgba(255, 255, 255, 0.5);
+ font-family: Menlo, Consolas, monospace; margin-top: 2px;
+ }
+ .rec-item__btn {
+ padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700;
+ cursor: pointer; border: 1px solid; font-family: inherit; flex-shrink: 0;
+ transition: all 0.15s;
+ }
+ .rec-item__btn--add {
+ background: rgba(82, 196, 26, 0.14);
+ border-color: rgba(82, 196, 26, 0.4); color: #4ade80;
+ }
+ .rec-item__btn--add:hover { background: rgba(82, 196, 26, 0.3); color: #fff; }
+ .rec-item__btn--remove {
+ background: rgba(245, 34, 45, 0.12);
+ border-color: rgba(245, 34, 45, 0.35); color: #ff6b6b;
+ }
+ .rec-item__btn--remove:hover { background: rgba(245, 34, 45, 0.28); color: #fff; }
+ .rec-empty { color: rgba(255, 255, 255, 0.4); text-align: center; padding: 8px 0; }
+ /* 推荐徽标(左列列表内) */
+ .rec-badge {
+ display: inline-block; padding: 1px 6px; border-radius: 7px;
+ background: rgba(251, 191, 36, 0.18); color: #fbbf24;
+ border: 1px solid rgba(251, 191, 36, 0.4);
+ font-size: 9px; font-weight: 700; letter-spacing: 0.5px; flex-shrink: 0;
+ }
@@ -727,6 +826,15 @@
订单 CO-20260806-031
+
+
+ ⚖️ 复秤对账
+ 实际称重 --
+ 记录合计 --
+ 差额 --
+
+
+
@@ -759,12 +867,18 @@
+
+
+
金额变化对比
原订单合计
- ¥46.60
+ ¥69.40
本次修正
@@ -778,7 +892,7 @@
应付金额
- ¥41.60
+ ¥64.40
@@ -810,20 +924,23 @@