From dd0331bb98f64c321317148da39eb9825c647e7f Mon Sep 17 00:00:00 2001 From: fengpu <18691763612@163.com> Date: Thu, 20 Aug 2026 17:02:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=93=E7=AE=97=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=A4=8D=E7=A7=A4=E5=AF=B9=E8=B4=A6(03=E6=94=B6=E9=93=B6?= =?UTF-8?q?=E9=A1=B5=E5=AF=B9=E8=B4=A6=E6=9D=A1+08=E8=A1=A5=E9=BD=90?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E6=99=BA=E8=83=BD=E6=8E=A8=E8=8D=90)=20+=20?= =?UTF-8?q?=E8=90=A5=E5=85=BB=E7=AE=A1=E7=90=86=E7=AB=AF=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E4=B8=A4=E9=A1=B5=E9=9D=A2=E8=A1=A5=E9=BD=90?= =?UTF-8?q?(=E5=9C=BA=E6=89=80=E7=BB=8F=E8=90=A5=E5=88=86=E6=9E=90/?= =?UTF-8?q?=E5=9C=BA=E6=89=80=E7=9B=AE=E6=A0=87=E8=80=83=E6=A0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../checkout-device/03-checkout.html | 112 +++- .../checkout-device/08-reconcile.html | 320 ++++++++- .../checkout-device/doc/CHANGELOG.md | 29 + .../nutrition/din-place-biz-analysis.html | 608 +++++++++++++++++- web-admin/nutrition/din-place-goal.html | 492 +++++++++++++- web-admin/nutrition/doc/CHANGELOG.md | 14 + 6 files changed, 1549 insertions(+), 26 deletions(-) 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 @@ diff --git a/web-admin/nutrition/din-place-goal.html b/web-admin/nutrition/din-place-goal.html index 6099621..6f65038 100644 --- a/web-admin/nutrition/din-place-goal.html +++ b/web-admin/nutrition/din-place-goal.html @@ -2,6 +2,7 @@ + 营养管理 - 场所目标考核 | 健康CQ原型 @@ -142,17 +229,406 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
-
-
场所目标考核
-
页面功能待补充
+ +
+
本周目标考核总览按周统计各场所目标完成率 · 数据每周更新
+
+
+
本周就餐人数(人)
+
15,924
+
+
+
本周应付营收(元)
+
¥547,530.00
+
+
+
本周目标营收(元)
+
¥400,000.00
+
+
+
平均营收完成率
+
98.2%
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + + ~ + +
+
+ + + ~ + +
+
+ + + ~ + +
+ + +
+ + +
+ + +
+ + +
+
场所目标考核明细
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
统计周期场所名称就餐人数环比人数变动应付营收目标营收营收完成率结算率食材成本率毛利率翻台率经营小结操作
第34周(08-17~08-23)一场所(东区)5,214↑ +6.2%¥182,450.00¥180,000.00101.4%99.2%63.5%30.8%2.6午晚高峰翻台良好,营收超额达成考核审计
第34周(08-17~08-23)二场所(西区)6,128↓ -3.1%¥208,760.00¥220,000.0094.9%98.7%64.9%30.4%2.4受高温影响客流略降,营收缺口集中在晚餐考核审计
第34周(08-17~08-23)三场所(北区)4,582↑ +1.8%¥156,320.0099.5%62.8%31.5%2.1考核审计
+
+ + + + + + + + + + + +
+ diff --git a/web-admin/nutrition/doc/CHANGELOG.md b/web-admin/nutrition/doc/CHANGELOG.md index 29ad30a..04e9fd0 100644 --- a/web-admin/nutrition/doc/CHANGELOG.md +++ b/web-admin/nutrition/doc/CHANGELOG.md @@ -1,5 +1,19 @@ # 营养用餐管理端 CHANGELOG +## [2026-08-20] feat: 报表中心两页面补齐 — 场所经营分析 + 场所目标考核(`din-place-biz-analysis.html` / `din-place-goal.html`) + +- 原「场所经营分析」「场所目标考核」为占位页,本次补齐为完整报表页 +- `din-place-biz-analysis.html` 场所经营分析: + - 食堂切换区(当前场所下拉:全部 / 一场所东区 / 二场所西区 / 三场所北区) + - 搜索筛选区(统计日期 + 取餐总额 / 取餐笔数 / 实收金额范围筛选) + - 双表头表格(分组表头 + 子表头)+ 分页 + - 详情报表弹窗:正式报表样式(标题 / 元信息 / 分段表格 / 签字栏),支持打印(`@media print` 仅输出报表) +- `din-place-goal.html` 场所目标考核: + - 本周目标考核总览(4 个 KPI:就餐人数 / 应付营收 / 目标营收 / 平均完成率) + - 搜索筛选区(统计周期 + 场所名称) + - 明细表格(经营小结列省略号 + 点击查看全文、操作列固定右侧)+ 分页 + - 目标编辑弹窗(金额输入带 ¥ 前缀) + ## [2026-08-19] feat: 餐线管理重构 — 收费模式周设置矩阵 + 设备概况/详情弹窗(`din-canteen-line.html`) - 餐线列表新增结算方式(自动/手动)·状态(胶囊开关,点击启用/停用切换)两字段;收费模式因每天餐次可能不同,不在列表展示