From 1cf5ac8cf9f940676aeef88fe68420c973579587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=9F=B5=E7=90=B4?= <757188142@qq.com> Date: Tue, 19 May 2026 20:34:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=90=A5=E5=85=BB=E7=94=A8=E9=A4=90?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=BA=A4=E4=BA=92=E5=A2=9E=E5=BC=BA=E2=80=94?= =?UTF-8?q?=E2=80=94=E8=AE=A2=E5=8D=95=E6=8E=92=E9=98=9F=E3=80=81=E9=A3=9F?= =?UTF-8?q?=E8=B0=B1=E7=AE=A1=E7=90=86=E3=80=81=E7=94=9F=E4=BA=A7=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E8=AF=A6=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- web-admin/nutrition/din-dish-all.html | 1 - web-admin/nutrition/din-ingredient.html | 1 - web-admin/nutrition/din-order-line.html | 364 ++++++-- web-admin/nutrition/din-order-pickup.html | 329 ++++++-- web-admin/nutrition/din-recipe-mgmt.html | 789 +++++++++++++++++- .../nutrition/prod-recipe-plan-create.html | 410 +++++++++ .../nutrition/prod-recipe-plan-detail.html | 250 ++++++ web-admin/nutrition/prod-recipe-plan.html | 254 ++++-- 8 files changed, 2201 insertions(+), 197 deletions(-) create mode 100644 web-admin/nutrition/prod-recipe-plan-create.html create mode 100644 web-admin/nutrition/prod-recipe-plan-detail.html diff --git a/web-admin/nutrition/din-dish-all.html b/web-admin/nutrition/din-dish-all.html index 96797c0..117215c 100644 --- a/web-admin/nutrition/din-dish-all.html +++ b/web-admin/nutrition/din-dish-all.html @@ -237,7 +237,6 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
➕ 新增餐品 -
diff --git a/web-admin/nutrition/din-ingredient.html b/web-admin/nutrition/din-ingredient.html index 27c0e22..ea2b70d 100644 --- a/web-admin/nutrition/din-ingredient.html +++ b/web-admin/nutrition/din-ingredient.html @@ -235,7 +235,6 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
➕ 新增食物 🖥 分类管理 -
diff --git a/web-admin/nutrition/din-order-line.html b/web-admin/nutrition/din-order-line.html index 3ff9b0f..224e8ad 100644 --- a/web-admin/nutrition/din-order-line.html +++ b/web-admin/nutrition/din-order-line.html @@ -100,9 +100,10 @@ tbody tr:hover{background:#F8FBFF;} .summary-row td{background:#FAFAFA;font-weight:600;} .action-bar{display:flex;align-items:center;gap:8px;margin-bottom:16px;} /* 操作列固定右侧 */ -thead th:last-child,tbody td.td-actions{position:sticky;right:0;background:#fff;box-shadow:-4px 0 8px rgba(0,0,0,0.04);z-index:2;white-space:nowrap;} -thead th:last-child{background:#FAFAFA;} -tbody tr:hover td.td-actions{background:#F8FBFF;} +thead th:last-child{position:sticky;right:0;background:#FAFAFA;box-shadow:-4px 0 8px rgba(0,0,0,0.04);z-index:2;white-space:nowrap;} +tbody td:last-child{position:sticky;right:0;background:#fff;box-shadow:-4px 0 8px rgba(0,0,0,0.04);z-index:2;white-space:nowrap;} +tbody tr:hover td:last-child{background:#F8FBFF;} +.summary-row td:last-child{background:#FAFAFA;} /* 弹窗样式 */ .modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.45);z-index:1000;display:flex;align-items:center;justify-content:center;animation:modalFadeIn .2s ease;} @@ -123,6 +124,26 @@ tbody tr:hover td.td-actions{background:#F8FBFF;} .modal-table tbody td{padding:10px 12px;border-bottom:1px solid var(--border);color:var(--text-primary);} .modal-table tbody tr:last-child td{border-bottom:none;} .modal-table tbody tr:hover{background:#F8FBFF;} + +/* 右侧抽屉 */ +.drawer-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.45);z-index:1000;animation:modalFadeIn .2s ease;} +.drawer-overlay.closing{animation:modalFadeOut .2s ease forwards;} +.drawer{position:fixed;top:0;right:0;bottom:0;width:520px;max-width:90vw;background:#fff;box-shadow:-6px 0 24px rgba(0,0,0,.12);display:flex;flex-direction:column;z-index:1001;animation:drawerSlideIn .25s ease;} +.drawer-overlay.closing .drawer{animation:drawerSlideOut .2s ease forwards;} +@keyframes drawerSlideIn{from{transform:translateX(100%)}to{transform:translateX(0)}} +@keyframes drawerSlideOut{from{transform:translateX(0)}to{transform:translateX(100%)}} +.drawer__header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;border-bottom:1px solid var(--border);flex-shrink:0;} +.drawer__title{font-size:var(--font-lg);font-weight:600;color:var(--text-primary);} +.drawer__close{width:32px;height:32px;border:none;background:none;font-size:20px;cursor:pointer;border-radius:var(--radius-sm);color:var(--text-secondary);display:flex;align-items:center;justify-content:center;} +.drawer__close:hover{background:#f5f5f5;color:var(--text-primary);} +.drawer__body{padding:0 24px 24px;overflow-y:auto;flex:1;} +.drawer-section{margin-top:20px;} +.drawer-section__title{font-size:var(--font-sm);font-weight:600;color:var(--text-primary);padding-bottom:8px;border-bottom:1px solid var(--border);margin-bottom:12px;display:flex;align-items:center;gap:6px;} +.drawer-section__title::before{content:'';display:inline-block;width:3px;height:14px;background:var(--primary);border-radius:2px;} +.drawer-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;} +.drawer-field{display:flex;flex-direction:column;gap:2px;} +.drawer-field__label{font-size:var(--font-xs);color:var(--text-placeholder);} +.drawer-field__value{font-size:var(--font-sm);color:var(--text-primary);font-weight:500;min-height:22px;} @@ -227,17 +248,18 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
📡 实时监控
-
📊 累计汇总
+
📊 累计汇总(按餐线)
⚖️ 累计汇总(按秤台)
-
-
-
-
+
+
+
+
+
@@ -253,15 +275,15 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
- + - - - - - - + + + + + +
秤台编号秤台状态秤台类型餐线编号餐次上餐类型开机时间上餐时间菜品名称菜品单价应收金额实时重量(kg)累计取餐重量累计上餐生重(kg)累计上餐重量最高温度最低温度保鲜时间取餐人次取餐视频上餐视频操作
日期食堂餐线名称餐次秤台编号秤台状态称台类型上餐类型开机时间上餐时间餐品名称餐品单价应收金额实时重量(kg)累计取餐重量累计上餐生重(kg)累计上餐重量最高温度最低温度保鲜时间取餐人次取餐视频上餐视频操作
00022号秤正常餐线秤A区早餐线早餐开餐06:5007:28小米粥¥5¥1,60012.69.8kg14.212.6kg68℃55℃09:30320人▶ 取餐▶ 上餐查看 编辑
00023号秤正常餐线秤B区早餐线早餐开餐06:5507:35燕麦粥¥4¥1,1448.46.2kg9.68.4kg65℃55℃09:30286人▶ 取餐▶ 上餐查看 编辑
00025号秤正常餐线秤A区中餐线午餐开餐10:3011:30宫保鸡丁¥14¥6,80438.231.6kg44.038.2kg75℃71℃13:30486人▶ 取餐▶ 上餐查看 编辑
00026号秤正常餐线秤B区中餐线午餐开餐10:3511:38红烧肉¥16¥6,59242.638.4kg48.542.6kg72℃68℃13:30412人▶ 取餐▶ 上餐查看 编辑
00027号秤无网络档口秤C区快餐线午餐加餐10:4012:12番茄炒蛋¥8¥1,02416.814.2kg18.616.8kg74℃70℃13:30128人▶ 取餐▶ 上餐查看 编辑
00028号秤未开机档口秤D区晚餐线晚餐待上餐19:30查看 编辑
2026-05-19一号食堂A区早餐线早餐00022号秤正常单称开餐06:5007:28小米粥¥5¥1,60012.69.8kg14.212.6kg68℃55℃09:30320人▶ 取餐▶ 上餐详情 编辑
2026-05-19二号食堂B区早餐线早餐00023号秤正常双称开餐06:5507:35燕麦粥¥4¥1,1448.46.2kg9.68.4kg65℃55℃09:30286人▶ 取餐▶ 上餐详情 编辑
2026-05-19一号食堂A区中餐线中餐00025号秤正常单称开餐10:3011:30宫保鸡丁¥14¥6,80438.231.6kg44.038.2kg75℃71℃13:30486人▶ 取餐▶ 上餐详情 编辑
2026-05-19一号食堂B区中餐线中餐00026号秤正常双称开餐10:3511:38红烧肉¥16¥6,59242.638.4kg48.542.6kg72℃68℃13:30412人▶ 取餐▶ 上餐详情 编辑
2026-05-19二号食堂C区快餐线中餐00027号秤无网络单称加餐10:4012:12番茄炒蛋¥8¥1,02416.814.2kg18.616.8kg74℃70℃13:30128人▶ 取餐▶ 上餐详情 编辑
2026-05-19三号食堂D区晚餐线晚餐00028号秤未开机双称待上餐19:30详情 编辑
@@ -279,9 +301,10 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
-
-
-
+
+
+
+
@@ -296,17 +319,17 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
- + - - - - - - - - + + + + + + + +
统计日期餐线编号餐次上餐菜品数累计取餐重量(kg)累计上餐重量(kg)累计应收金额取餐人次平均取餐重量(g/人)最高温度最低温度异常次数操作
统计日期食堂餐线名称餐次餐品数量累计取餐重量(kg)累计上餐重量(kg)累计应收金额取餐人次平均取餐重量(g/人)最高温度最低温度异常次数操作
汇总84道1,2861,540¥58,4205,612人229g3次查看 编辑
2026-04-28A区中餐线午餐12道256312¥14,2801,140人225g78℃68℃0次查看 编辑
2026-04-28B区中餐线午餐10道218268¥12,640980人222g76℃66℃1次查看 编辑
2026-04-28A区早餐线早餐8道148182¥7,400980人151g70℃55℃0次查看 编辑
2026-04-27A区中餐线午餐12道248304¥13,8601,100人226g77℃67℃0次查看 编辑
2026-04-27B区中餐线午餐10道210258¥12,180960人219g75℃65℃1次查看 编辑
2026-04-27A区早餐线早餐8道142176¥7,100920人154g69℃54℃0次查看 编辑
2026-04-26A区中餐线午餐11道212260¥11,860960人221g76℃66℃1次查看 编辑
汇总84道1,2861,540¥58,4205,612人229g3次
2026-05-19一号食堂A区中餐线中餐12道256312¥14,2801,140人225g78℃68℃0次详情 编辑
2026-05-19一号食堂B区中餐线中餐10道218268¥12,640980人222g76℃66℃1次详情 编辑
2026-05-19一号食堂A区早餐线早餐8道148182¥7,400980人151g70℃55℃0次详情 编辑
2026-05-18一号食堂A区中餐线中餐12道248304¥13,8601,100人226g77℃67℃0次详情 编辑
2026-05-18一号食堂B区中餐线中餐10道210258¥12,180960人219g75℃65℃1次详情 编辑
2026-05-18二号食堂B区早餐线早餐8道142176¥7,100920人154g69℃54℃0次详情 编辑
2026-05-17一号食堂A区中餐线中餐11道212260¥11,860960人221g76℃66℃1次详情 编辑
@@ -320,11 +343,11 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
-
-
-
-
-
+
+
+
+
+
@@ -339,16 +362,16 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
- + - - - - - - - + + + + + + +
秤台编号秤台状态秤台类型餐线编号餐次上餐类型上餐菜品数累计应收金额累计取餐重量(kg)累计上餐生重(kg)累计上餐重量(kg)最高温度最低温度取餐人次平均取餐重量(g/人)异常次数操作
日期食堂餐线名称餐次秤台编号秤台状态称台类型上餐类型餐品数量累计应收金额累计取餐重量(kg)累计上餐生重(kg)累计上餐重量(kg)最高温度最低温度取餐人次平均取餐重量(g/人)异常次数操作
汇总84道¥58,4201,2861,7201,5405,612人229g3次查看 编辑
00022号秤正常餐线秤A区早餐线早餐开餐8道¥7,40014818618270℃55℃980人151g0次查看 编辑
00023号秤正常餐线秤B区早餐线早餐开餐6道¥4,8609211810868℃54℃720人128g0次查看 编辑
00025号秤正常餐线秤A区中餐线午餐开餐12道¥14,28025634231278℃68℃1,140人225g0次查看 编辑
00026号秤正常餐线秤B区中餐线午餐开餐10道¥12,64021829426876℃66℃980人222g1次查看 编辑
00027号秤无网络档口秤C区快餐线午餐加餐6道¥4,8209212812074℃70℃516人178g2次查看 编辑
00028号秤未开机档口秤D区晚餐线晚餐待上餐0次查看 编辑
汇总84道¥58,4201,2861,7201,5405,612人229g3次
2026-05-19一号食堂A区早餐线早餐00022号秤正常单称开餐8道¥7,40014818618270℃55℃980人151g0次详情 编辑
2026-05-19二号食堂B区早餐线早餐00023号秤正常双称开餐6道¥4,8609211810868℃54℃720人128g0次详情 编辑
2026-05-19一号食堂A区中餐线中餐00025号秤正常单称开餐12道¥14,28025634231278℃68℃1,140人225g0次详情 编辑
2026-05-19一号食堂B区中餐线中餐00026号秤正常双称开餐10道¥12,64021829426876℃66℃980人222g1次详情 编辑
2026-05-19二号食堂C区快餐线中餐00027号秤无网络单称加餐6道¥4,8209212812074℃70℃516人178g2次详情 编辑
2026-05-19三号食堂D区晚餐线晚餐00028号秤未开机双称待上餐0次详情 编辑
@@ -374,6 +397,41 @@ function switchTab(idx){ document.querySelectorAll('.tab-panel').forEach(function(p,i){p.classList.toggle('active',i===idx);}); } +/* ========== 食堂→餐线联动 ========== */ +function updateLineOptions(){ + var canteenVal=document.getElementById('filterCanteen').value; + var lineSelect=document.getElementById('filterLine'); + var opts=lineSelect.querySelectorAll('option'); + opts.forEach(function(opt){ + if(!opt.value&&!opt.getAttribute('data-canteen')){opt.style.display='';return;} + if(!canteenVal){opt.style.display='';return;} + opt.style.display=opt.getAttribute('data-canteen')===canteenVal?'':'none'; + }); + lineSelect.value=''; +} +function updateLineOptions2(){ + var canteenVal=document.getElementById('filterCanteen2').value; + var lineSelect=document.getElementById('filterLine2'); + var opts=lineSelect.querySelectorAll('option'); + opts.forEach(function(opt){ + if(!opt.value&&!opt.getAttribute('data-canteen')){opt.style.display='';return;} + if(!canteenVal){opt.style.display='';return;} + opt.style.display=opt.getAttribute('data-canteen')===canteenVal?'':'none'; + }); + lineSelect.value=''; +} +function updateLineOptions3(){ + var canteenVal=document.getElementById('filterCanteen3').value; + var lineSelect=document.getElementById('filterLine3'); + var opts=lineSelect.querySelectorAll('option'); + opts.forEach(function(opt){ + if(!opt.value&&!opt.getAttribute('data-canteen')){opt.style.display='';return;} + if(!canteenVal){opt.style.display='';return;} + opt.style.display=opt.getAttribute('data-canteen')===canteenVal?'':'none'; + }); + lineSelect.value=''; +} + /* ========== 弹窗基础 ========== */ const Modal = { open(title, bodyHtml) { @@ -447,7 +505,7 @@ function showPickupDetail(scaleId) { pageBtns += ``; } return `${summaryHtml} - + ${tbody}
@@ -491,26 +549,236 @@ function showServingDetail(scaleId) { const rows = servingData[scaleId] || []; const tbody = rows.map(r => `${r.time}${r.batch}${r.type}${r.dish}${r.rawWeight}${r.servWeight}${r.chef}`).join(''); const html = ` - + ${tbody}`; Modal.open('上餐明细 — ' + scaleId, html); } /* ========== 事件绑定 ========== */ + +/* ========== 右侧抽屉 ========== */ +const Drawer = { + open(title, bodyHtml) { + this.close(); + const overlay = document.createElement('div'); + overlay.className = 'drawer-overlay'; + overlay.innerHTML = '
' + + '
' + title + '
' + + '
' + bodyHtml + '
' + + '
'; + overlay.addEventListener('click', function(e){ if(e.target===overlay) Drawer.close(); }); + document.body.appendChild(overlay); + }, + close() { + const o = document.querySelector('.drawer-overlay'); + if(!o) return; + o.classList.add('closing'); + setTimeout(function(){ o.remove(); }, 200); + } +}; + +function showScaleDetail(row) { + var cells = row.querySelectorAll('td'); + var get = function(i){ return cells[i] ? cells[i].innerHTML.trim() : '—'; }; + var getText = function(i){ return cells[i] ? cells[i].textContent.trim() : '—'; }; + + var html = '' + + '
' + + '
设备信息
' + + '
' + + '
日期' + getText(0) + '
' + + '
食堂' + getText(1) + '
' + + '
餐线名称' + getText(2) + '
' + + '
秤台编号' + getText(4) + '
' + + '
秤台状态' + get(5) + '
' + + '
称台类型' + get(6) + '
' + + '
' + + '
' + + '
' + + '
餐次与时间
' + + '
' + + '
餐次' + getText(3) + '
' + + '
上餐类型' + get(7) + '
' + + '
开机时间' + getText(8) + '
' + + '
上餐时间' + getText(9) + '
' + + '
保鲜时间' + getText(19) + '
' + + '
' + + '
' + + '
' + + '
餐品与计费
' + + '
' + + '
餐品名称' + getText(10) + '
' + + '
餐品单价' + getText(11) + '
' + + '
应收金额' + getText(12) + '
' + + '
取餐人次' + getText(20) + '
' + + '
' + + '
' + + '
' + + '
重量数据
' + + '
' + + '
实时重量(kg)' + getText(13) + '
' + + '
累计取餐重量' + getText(14) + '
' + + '
累计上餐生重(kg)' + getText(15) + '
' + + '
累计上餐重量' + getText(16) + '
' + + '
' + + '
' + + '
' + + '
温度监控
' + + '
' + + '
最高温度' + getText(17) + '
' + + '
最低温度' + getText(18) + '
' + + '
' + + '
'; + + Drawer.open('秤台详情 — ' + getText(4), html); +} + +/* ========== 累计汇总抽屉 ========== */ +function showSummaryDetail(row) { + var cells = row.querySelectorAll('td'); + var getText = function(i){ return cells[i] ? cells[i].textContent.trim() : '—'; }; + + var html = '' + + '
' + + '
基本信息
' + + '
' + + '
统计日期' + getText(0) + '
' + + '
食堂' + getText(1) + '
' + + '
餐线名称' + getText(2) + '
' + + '
餐次' + getText(3) + '
' + + '
' + + '
' + + '
' + + '
餐品与计费
' + + '
' + + '
餐品数量' + getText(4) + '
' + + '
累计应收金额' + getText(7) + '
' + + '
取餐人次' + getText(8) + '
' + + '
平均取餐重量(g/人)' + getText(9) + '
' + + '
' + + '
' + + '
' + + '
重量数据
' + + '
' + + '
累计取餐重量(kg)' + getText(5) + '
' + + '
累计上餐重量(kg)' + getText(6) + '
' + + '
' + + '
' + + '
' + + '
温度与异常
' + + '
' + + '
最高温度' + getText(10) + '
' + + '
最低温度' + getText(11) + '
' + + '
异常次数' + getText(12) + '
' + + '
' + + '
'; + + Drawer.open('累计汇总详情 — ' + getText(2) + ' ' + getText(0), html); +} + +/* ========== 绑定查看/取餐/上餐链接 ========== */ +// Tab1: 实时监控 (function bindDetailLinks() { const panel = document.querySelectorAll('.tab-panel')[0]; if (!panel) return; panel.querySelectorAll('tbody tr').forEach(row => { const cells = row.querySelectorAll('td'); - if (cells.length < 15) return; - const scaleId = cells[0].textContent.trim(); - // 累计取餐重量 — 第13列(index 12) - const pickupLink = cells[12] && cells[12].querySelector('.link'); + if (cells.length < 17) return; + const scaleId = cells[4].textContent.trim(); + // 累计取餐重量 — 第15列(index 14) + const pickupLink = cells[14] && cells[14].querySelector('.link'); if (pickupLink) pickupLink.addEventListener('click', () => showPickupDetail(scaleId)); - // 累计上餐重量 — 第15列(index 14) - const servingLink = cells[14] && cells[14].querySelector('.link'); + // 累计上餐重量 — 第17列(index 16) + const servingLink = cells[16] && cells[16].querySelector('.link'); if (servingLink) servingLink.addEventListener('click', () => showServingDetail(scaleId)); + // 操作列"查看"按钮 — 最后一列第一个 link + const actionsCell = row.querySelector('td.td-actions'); + if (actionsCell) { + const links = actionsCell.querySelectorAll('.link'); + if (links[0]) links[0].addEventListener('click', function(){ showScaleDetail(row); }); + } + }); +})(); + +// Tab2: 累计汇总 +(function bindSummaryLinks() { + const panel = document.querySelectorAll('.tab-panel')[1]; + if (!panel) return; + panel.querySelectorAll('tbody tr').forEach(row => { + if (row.classList.contains('summary-row')) return; + const actionsCell = row.querySelector('td.td-actions'); + if (actionsCell) { + const links = actionsCell.querySelectorAll('.link'); + if (links[0]) links[0].addEventListener('click', function(){ showSummaryDetail(row); }); + } + }); +})(); + +// Tab3: 累计汇总(按秤台) +function showScaleSummaryDetail(row) { + var cells = row.querySelectorAll('td'); + var get = function(i){ return cells[i] ? cells[i].innerHTML.trim() : '—'; }; + var getText = function(i){ return cells[i] ? cells[i].textContent.trim() : '—'; }; + + var html = '' + + '
' + + '
基本信息
' + + '
' + + '
日期' + getText(0) + '
' + + '
食堂' + getText(1) + '
' + + '
餐线名称' + getText(2) + '
' + + '
餐次' + getText(3) + '
' + + '
' + + '
' + + '
' + + '
设备信息
' + + '
' + + '
秤台编号' + getText(4) + '
' + + '
秤台状态' + get(5) + '
' + + '
称台类型' + get(6) + '
' + + '
上餐类型' + get(7) + '
' + + '
' + + '
' + + '
' + + '
餐品与计费
' + + '
' + + '
餐品数量' + getText(8) + '
' + + '
累计应收金额' + getText(9) + '
' + + '
取餐人次' + getText(15) + '
' + + '
平均取餐重量(g/人)' + getText(16) + '
' + + '
' + + '
' + + '
' + + '
重量数据
' + + '
' + + '
累计取餐重量(kg)' + getText(10) + '
' + + '
累计上餐生重(kg)' + getText(11) + '
' + + '
累计上餐重量(kg)' + getText(12) + '
' + + '
' + + '
' + + '
' + + '
温度与异常
' + + '
' + + '
最高温度' + getText(13) + '
' + + '
最低温度' + getText(14) + '
' + + '
异常次数' + getText(17) + '
' + + '
' + + '
'; + + Drawer.open('秤台汇总详情 — ' + getText(4), html); +} + +(function bindScaleSummaryLinks() { + const panel = document.querySelectorAll('.tab-panel')[2]; + if (!panel) return; + panel.querySelectorAll('tbody tr').forEach(row => { + if (row.classList.contains('summary-row')) return; + const actionsCell = row.querySelector('td.td-actions'); + if (actionsCell) { + const links = actionsCell.querySelectorAll('.link'); + if (links[0]) links[0].addEventListener('click', function(){ showScaleSummaryDetail(row); }); + } }); })(); diff --git a/web-admin/nutrition/din-order-pickup.html b/web-admin/nutrition/din-order-pickup.html index abb7dd4..26df32c 100644 --- a/web-admin/nutrition/din-order-pickup.html +++ b/web-admin/nutrition/din-order-pickup.html @@ -116,6 +116,65 @@ tbody tr:hover{background:#F8FBFF;} thead th:last-child,tbody td.td-actions{position:sticky;right:0;background:#fff;box-shadow:-4px 0 8px rgba(0,0,0,0.04);z-index:2;white-space:nowrap;} thead th:last-child{background:#FAFAFA;} tbody tr:hover td.td-actions{background:#F8FBFF;} + +/* 餐品详情弹窗 */ +.meal-section{margin-bottom:20px;} +.meal-section__title{font-size:var(--font-base);font-weight:600;color:var(--text-primary);padding-left:10px;border-left:3px solid var(--primary);margin-bottom:12px;} +.meal-info-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px 24px;margin-bottom:24px;} +.meal-info-item{display:flex;align-items:center;gap:8px;font-size:var(--font-sm);padding:8px 0;border-bottom:1px dashed #f0f0f0;} +.meal-info-item__label{color:var(--text-secondary);min-width:72px;flex-shrink:0;} +.meal-info-item__value{color:var(--text-primary);font-weight:500;} +.meal-table{width:100%;border-collapse:collapse;margin-top:8px;} +.meal-table thead th{background:#FAFAFA;padding:10px 16px;text-align:center;font-size:var(--font-sm);color:var(--text-secondary);font-weight:500;border-bottom:1px solid var(--border);} +.meal-table tbody td{padding:12px 16px;font-size:var(--font-sm);color:var(--text-primary);border-bottom:1px solid var(--border);text-align:center;} +.meal-table tbody tr:last-child td{border-bottom:none;font-weight:600;background:#FAFAFA;} +.meal-table .dish-name{color:var(--primary);cursor:pointer;font-weight:500;} +.meal-table .dish-name:hover{color:#40a9ff;} +.tag-scale{display:inline-block;padding:1px 6px;border-radius:3px;font-size:11px;background:#E6F7FF;color:var(--primary);border:1px solid #91D5FF;margin-left:6px;vertical-align:middle;} + +/* 历史用餐明细表格 */ +.meal-history-table{width:100%;border-collapse:collapse;font-size:var(--font-sm);} +.meal-history-table thead th{background:#FAFAFA;padding:10px 12px;text-align:left;color:var(--text-secondary);font-weight:500;border-bottom:1px solid var(--border);} +.meal-history-table tbody td{padding:12px;color:var(--text-primary);border-bottom:1px solid #f0f0f0;} +.meal-history-table tbody tr:last-child td{border-bottom:none;} +.meal-history-table tbody tr:hover{background:#F8FBFF;} +.score-tag{display:inline-block;padding:2px 8px;border-radius:4px;font-size:var(--font-sm);font-weight:600;} +.score-green{color:#52C41A;background:#F6FFED;} +.score-orange{color:#FA8C16;background:#FFF7E6;} + +/* 菜品偏好 */ +.dish-pref-section{display:flex;flex-direction:column;gap:12px;} +.dish-pref-item__label{font-size:var(--font-xs);color:var(--text-secondary);margin-bottom:6px;} +.dish-pref-item__tags{display:flex;gap:6px;flex-wrap:wrap;} +.dish-tag{display:inline-block;padding:2px 10px;border-radius:4px;font-size:var(--font-xs);color:#52C41A;background:#F6FFED;border:1px solid #B7EB8F;} +.dish-pref-item__value{font-size:var(--font-sm);color:var(--text-primary);} +.dish-pref-item__big{font-size:var(--font-base);font-weight:600;color:var(--text-primary);} + +/* 妈妈味道 */ +.mom-section{background:#FFF8F0;border-radius:var(--radius-md);padding:12px 16px;} +.mom-header{display:flex;align-items:center;gap:10px;margin-bottom:10px;} +.mom-header__icon{font-size:22px;} +.mom-header__title{font-size:var(--font-sm);font-weight:600;color:var(--text-primary);} +.mom-header__sub{font-size:var(--font-xs);color:#FA8C16;margin-top:2px;} +.mom-header__tags{display:flex;gap:6px;flex-wrap:wrap;} +.mom-tag{display:inline-block;padding:2px 10px;border-radius:4px;font-size:var(--font-xs);color:#FA8C16;background:#FFF7E6;border:1px solid #FFD591;} + +/* 个性模型 */ +.model-section{background:#E6F7FF;border-radius:var(--radius-md);padding:12px 16px;margin-bottom:16px;} +.model-header{display:flex;align-items:center;gap:10px;margin-bottom:10px;} +.model-header__icon{font-size:22px;} +.model-header__title{font-size:var(--font-sm);font-weight:600;color:var(--primary);} +.model-header__sub{font-size:var(--font-xs);color:var(--text-secondary);margin-top:2px;} +.model-header__tags{display:flex;gap:6px;flex-wrap:wrap;} +.model-tag{display:inline-block;padding:2px 10px;border-radius:4px;font-size:var(--font-xs);color:var(--primary);background:#fff;border:1px solid #91D5FF;} +.model-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px 20px;margin-bottom:16px;} +.model-item__label{font-size:var(--font-xs);color:var(--text-secondary);margin-bottom:4px;} +.model-item__big{font-size:var(--font-base);font-weight:600;color:var(--text-primary);} +.model-item__value{font-size:var(--font-sm);} +.risk-tag{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:4px;font-size:var(--font-xs);font-weight:500;} +.risk-safe{background:#F6FFED;color:#52C41A;border:1px solid #B7EB8F;} +.risk-warn{background:#FFF7E6;color:#FA8C16;border:1px solid #FFD591;} +.model-footer{font-size:var(--font-xs);color:var(--text-secondary);padding:10px 12px;background:#F5F7FA;border-radius:var(--radius-sm);} @@ -187,13 +246,15 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
-
-
-
+
+
+
+
+
-
+
@@ -202,7 +263,6 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
-
@@ -213,18 +273,18 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
- + - - - - - - - - - + + + + + + + + +
就餐记录号用户部门餐次取餐方式取餐类型人员类别取餐开始时间取餐结束时间取餐总数量营养评分操作
就餐记录号姓名员工编号单位部门餐次取餐方式取餐类型人员类别取餐开始时间取餐结束时间取餐总数量营养评分操作
M-20260428-001张伟(EMP001)研发部午餐点餐取餐正常取餐会员11:0211:083件88分查看用户信息
M-20260428-002李娜(EMP002)市场部午餐点餐取餐正常取餐会员11:0811:143件92分查看用户信息
M-20260428-003王磊(EMP003)运营部午餐餐线取餐正常取餐非会员11:1511:202件68分查看用户信息
M-20260428-004赵敏(EMP004)财务部午餐档口+餐线正常取餐会员11:2211:303件94分查看用户信息
M-20260428-005陈刚(EMP005)人事部早餐餐线取餐正常取餐非会员07:4807:553件85分查看用户信息
M-20260428-006刘芳(EMP006)市场部午餐外卖/外带正常取餐会员11:4511:482件90分查看用户信息
SP-001-001张运维(EMP101)运维部午餐余量取餐余量取餐员工14:0514:061件查看用户信息
SP-001-003王保安(EMP103)安保部午餐余量取餐余量取餐工作人员14:1014:111件查看用户信息
M-20260428-007林教授外部访客午餐点餐取餐正常取餐外部人员12:1012:183件86分查看用户信息
M-20260428-001张伟EMP001长庆油田研发部午餐点餐取餐正常取餐会员11:0211:083件88分查看用户信息
M-20260428-002李娜EMP002长庆油田市场部午餐点餐取餐正常取餐会员11:0811:143件92分查看用户信息
M-20260428-003王磊EMP003长庆油田运营部午餐餐线取餐正常取餐非会员11:1511:202件68分查看用户信息
M-20260428-004赵敏EMP004长庆油田财务部午餐档口+餐线正常取餐会员11:2211:303件94分查看用户信息
M-20260428-005陈刚EMP005长庆油田人事部早餐餐线取餐正常取餐非会员07:4807:553件85分查看用户信息
M-20260428-006刘芳EMP006长庆油田市场部午餐外卖/外带正常取餐会员11:4511:482件90分查看用户信息
SP-001-001张运维EMP101长庆油田运维部午餐余量取餐余量取餐员工14:0514:061件查看用户信息
SP-001-003王保安长庆油田安保部午餐余量取餐余量取餐工作人员14:1014:111件查看用户信息
M-20260428-007林教授外部单位外部访客午餐点餐取餐正常取餐外部人员12:1012:183件86分查看用户信息
@@ -274,20 +334,40 @@ const userProfiles = { taste:'偏辣', region:'川菜、湘菜', taboo:'无', allergy:'花生', exercise:'6000步/日', weightTrend:'稳定', bodyFat:'18%', heartRate:'68', sleep:'7.5h', stress:'低', source:'智能手环', - meals30:'58次', hotDish:'宫保鸡丁、番茄牛腩', avgCal:'680kcal', nutriRate:'88%', - favDish:'宫保鸡丁、清炒西兰花', recDish:'三文鱼沙拉', avoidDish:'油炸花生', topRate:'番茄牛腩(4.8)', repurchase:'宫保鸡丁', - hometown:'四川成都', momTag:'麻辣鲜香', momList:'回锅肉、麻婆豆腐', memory:'妈妈的回锅肉', recTry:'水煮鱼', - modelVer:'v2.3', modelTime:'2026-04-20', recCal:'2100kcal', nutriFocus:'蛋白质+膳食纤维', risk:'无', tags:'运动达人、川菜爱好者', confidence:'92%' }, + meals30:'86次', hotDish:'宫保鸡丁、番茄牛腩', avgCal:'2,186 kcal/天', nutriRate:'88%', + proteinRate:'92%', highFatRate:'8%', preferMeal:'午餐', lastMeal:'2026-04-28 午餐', + mealHistory:[ + {date:'2026-04-28',meal:'午餐',dishes:'清蒸鱼、炒西兰花、米饭、紫菜蛋花汤',cal:'832 kcal',score:95}, + {date:'2026-04-28',meal:'早餐',dishes:'小米粥、卤蛋、凉拌黄瓜',cal:'380 kcal',score:92}, + {date:'2026-04-27',meal:'午餐',dishes:'杂粮饭、清蒸鱼、蒜蓉菠菜',cal:'798 kcal',score:94}, + {date:'2026-04-26',meal:'午餐',dishes:'米饭、宫保鸡丁、炒西兰花、汤',cal:'906 kcal',score:86}, + {date:'2026-04-25',meal:'晚餐',dishes:'杂粮饭、清蒸鱼、炒时蔬',cal:'716 kcal',score:96}, + {date:'2026-04-25',meal:'午餐',dishes:'米饭、宫保鸡丁、番茄炒蛋',cal:'928 kcal',score:88}, + {date:'2026-04-24',meal:'午餐',dishes:'米饭、清蒸鱼、蒜蓉菠菜、番茄蛋花汤',cal:'768 kcal',score:95} + ], + favDish:'宫保鸡丁、清炒西兰花、杂粮饭', recDish:'三文鱼沙拉、蒜蓉菠菜', avoidDish:'油炸花生', topRate:'宫保鸡丁(94分)', repurchase:'宫保鸡丁(近30日18次)', + hometown:'四川成都', momTag:'麻辣、红油、鲜香', momList:'回锅肉、麻婆豆腐、水煮鱼', memory:'从小常吃妈妈做的回锅肉,奠定了麻辣口味偏好。', recTry:'川味水煮鱼套餐(已上架一号食堂)', + modelVer:'v2.3', modelTime:'2026-04-20', recCal:'2,250 kcal', nutriFocus:'蛋白质+膳食纤维', risk:'无风险', tags:'清淡偏好、中度活动、无慢病', confidence:'94%', nextUpdate:'2026-05-28' }, '李娜': { dept:'市场部', age:28, gender:'女', height:'163cm', weight:'52kg', bmi:'19.6', activity:'轻度', disease:'无', chronic:'无', medicine:'无', family:'糖尿病(母)', examDate:'2026-02-20', bp:'110/70', glucose:'4.8', lipid:'正常', uric:'290', liver:'正常', kidney:'正常', taste:'清淡', region:'粤菜、日料', taboo:'无', allergy:'海鲜(虾蟹)', exercise:'4000步/日', weightTrend:'稳定', bodyFat:'22%', heartRate:'72', sleep:'7h', stress:'中', source:'手机计步', - meals30:'52次', hotDish:'蒸鱼、蔬菜沙拉', avgCal:'520kcal', nutriRate:'92%', - favDish:'清蒸鲈鱼、藜麦沙拉', recDish:'牛油果吐司', avoidDish:'麻辣火锅', topRate:'藜麦沙拉(4.9)', repurchase:'清蒸鲈鱼', - hometown:'广东广州', momTag:'鲜甜清润', momList:'老火靓汤、白切鸡', memory:'周末的煲汤', recTry:'椰子鸡', - modelVer:'v2.3', modelTime:'2026-04-18', recCal:'1650kcal', nutriFocus:'钙+铁+维生素D', risk:'注意糖摄入', tags:'轻食主义、养生达人', confidence:'95%' } + meals30:'52次', hotDish:'清蒸鲈鱼、藜麦沙拉', avgCal:'1,650 kcal/天', nutriRate:'92%', + proteinRate:'95%', highFatRate:'5%', preferMeal:'午餐', lastMeal:'2026-04-28 午餐', + mealHistory:[ + {date:'2026-04-28',meal:'午餐',dishes:'藜麦沙拉、清蒸鲈鱼、蒜蓉西兰花',cal:'680 kcal',score:96}, + {date:'2026-04-28',meal:'早餐',dishes:'牛油果吐司、酸奶、水果',cal:'420 kcal',score:94}, + {date:'2026-04-27',meal:'午餐',dishes:'三文鱼沙拉、杂粮饭、蔬菜汤',cal:'720 kcal',score:97}, + {date:'2026-04-26',meal:'午餐',dishes:'清蒸鲈鱼、藜麦饭、凉拌木耳',cal:'650 kcal',score:95}, + {date:'2026-04-25',meal:'晚餐',dishes:'蔬菜沙拉、鸡胸肉、全麦面包',cal:'580 kcal',score:93}, + {date:'2026-04-25',meal:'午餐',dishes:'番茄鱼片、杂粮饭、炒时蔬',cal:'750 kcal',score:91}, + {date:'2026-04-24',meal:'午餐',dishes:'清蒸鲈鱼、藜麦沙拉、紫菜汤',cal:'690 kcal',score:96} + ], + favDish:'清蒸鲈鱼、藜麦沙拉、杂粮饭', recDish:'蒜蓉菠菜、紫菜蛋花汤', avoidDish:'暂无', topRate:'清蒸鱼(96分)', repurchase:'清蒸鱼(近30日21次)', + hometown:'广东广州', momTag:'清炖、甜咸适中、河鲜', momList:'松鼠桂鱼、响油鳝糊、腌笃鲜', memory:'从小常吃妈妈做的清炖鱼,奠定了清淡口味偏好。', recTry:'苏式清蒸鱼套餐(已上架二号食堂)', + modelVer:'v2.3', modelTime:'2026-04-18', recCal:'1,650 kcal', nutriFocus:'钙+铁+维生素D', risk:'注意糖摄入', tags:'轻食主义、养生达人、低糖饮食', confidence:'95%', nextUpdate:'2026-05-28' } }; /* 默认档案(其他用户) */ @@ -297,10 +377,20 @@ const defaultProfile = { dept:'—', age:30, gender:'—', height:'170cm', weigh taste:'适中', region:'不限', taboo:'无', allergy:'无', exercise:'5000步/日', weightTrend:'稳定', bodyFat:'20%', heartRate:'70', sleep:'7h', stress:'低', source:'手动录入', - meals30:'45次', hotDish:'家常菜', avgCal:'600kcal', nutriRate:'78%', - favDish:'红烧肉、西红柿炒蛋', recDish:'杂粮饭套餐', avoidDish:'无', topRate:'红烧肉(4.5)', repurchase:'西红柿炒蛋', - hometown:'—', momTag:'家常味', momList:'红烧肉', memory:'—', recTry:'—', - modelVer:'v2.3', modelTime:'2026-04-15', recCal:'1900kcal', nutriFocus:'均衡', risk:'无', tags:'普通用户', confidence:'80%' }; + meals30:'45次', hotDish:'家常菜', avgCal:'1,900 kcal/天', nutriRate:'78%', + proteinRate:'80%', highFatRate:'12%', preferMeal:'午餐', lastMeal:'2026-04-28 午餐', + mealHistory:[ + {date:'2026-04-28',meal:'午餐',dishes:'红烧肉、米饭、炒青菜、蛋花汤',cal:'856 kcal',score:82}, + {date:'2026-04-27',meal:'午餐',dishes:'西红柿炒蛋、米饭、紫菜汤',cal:'720 kcal',score:85}, + {date:'2026-04-26',meal:'午餐',dishes:'糖醋里脊、米饭、炒时蔬',cal:'880 kcal',score:80}, + {date:'2026-04-25',meal:'午餐',dishes:'红烧肉、杂粮饭、凉拌黄瓜',cal:'810 kcal',score:84}, + {date:'2026-04-25',meal:'早餐',dishes:'豆浆、油条、茶叶蛋',cal:'450 kcal',score:76}, + {date:'2026-04-24',meal:'午餐',dishes:'宫保鸡丁、米饭、番茄蛋汤',cal:'790 kcal',score:86}, + {date:'2026-04-23',meal:'午餐',dishes:'西红柿炒蛋、米饭、炒青菜',cal:'680 kcal',score:88} + ], + favDish:'红烧肉、西红柿炒蛋、炒青菜', recDish:'杂粮饭套餐、蒸南瓜', avoidDish:'暂无', topRate:'红烧肉(90分)', repurchase:'西红柿炒蛋(近30日15次)', + hometown:'—', momTag:'家常、咸鲜、炖煮', momList:'红烧肉、炖排骨、西红柿炒蛋', memory:'小时候最爱妈妈做的红烧肉,是家的味道。', recTry:'家常红烧肉套餐(已上架一号食堂)', + modelVer:'v2.3', modelTime:'2026-04-15', recCal:'1,900 kcal', nutriFocus:'均衡', risk:'无风险', tags:'家常口味、中度活动、无慢病', confidence:'80%', nextUpdate:'2026-05-28' }; const tabDefs = [ { key:'basic', label:'静态基础' }, @@ -360,34 +450,52 @@ function buildProfileHTML(name, p) {
数据来源${p.source}
`, meal: `
-
近30日就餐${p.meals30}
-
常点菜品${p.hotDish}
-
平均热量${p.avgCal}
-
营养达标率${p.nutriRate}
+
近30日就餐次数${p.meals30}
+
最常点菜品${p.hotDish}
+
平均热量摄入${p.avgCal}
+
蛋白质达标率${p.proteinRate}
+
高脂餐占比${p.highFatRate}
+
偏好餐次${p.preferMeal}
+
+
最近一次就餐${p.lastMeal}
+
📋 最近用餐明细(${p.mealHistory.length}条)
+ + + ${p.mealHistory.map(h => '').join('')} +
日期餐次菜品热量营养评分
'+h.date+''+h.meal+''+h.dishes+''+h.cal+''+h.score+'分
`, + dish: `
+
常点菜品
${p.favDish.split('、').map(d=>''+d+'').join('')}
+
系统推荐
${p.recDish.split('、').map(d=>''+d+'').join('')}
+
忌口菜品
${p.avoidDish||'暂无'}
+
评分最高
${p.topRate}
+
复购冠军
${p.repurchase}
`, - dish: `
-
常点菜品${p.favDish}
-
系统推荐${p.recDish}
-
忌口菜品${p.avoidDish}
-
评分最高${p.topRate}
-
复购冠军${p.repurchase}
+ mom: `
+
+
🐱
+
家乡:${p.hometown}
从童年记忆中沉淀的味觉偏好与情感连接
+
+
${p.momTag.split('、').map(t=>''+t+'').join('')}
+
+
+
思乡菜清单
${p.momList.split('、').map(d=>''+d+'').join('')}
+
关联记忆
${p.memory}
+
推荐尝试
${p.recTry}
`, - mom: `
-
家乡${p.hometown}
-
妈妈味道标签${p.momTag}
-
思乡菜清单${p.momList}
-
关联记忆${p.memory}
-
推荐尝试${p.recTry}
-
`, - model: `
-
模型版本${p.modelVer}
-
生成时间${p.modelTime}
-
推荐热量${p.recCal}
-
营养侧重${p.nutriFocus}
-
风险预警${p.risk}
-
个性标签${p.tags}
-
模型置信度${p.confidence}
-
` + model: `
+
+
🤖
+
${name} 的个性化营养模型
${p.modelVer} · 生成于 ${p.modelTime} · 置信度 ${p.confidence}
+
+
${p.tags.split('、').map(t=>''+t+'').join('')}
+
+
+
推荐每日热量
${p.recCal}
+
营养侧重
${p.nutriFocus}
+
风险预警
${p.risk==='无风险'?'✅ ':''} ${p.risk}
+
下次模型更新
${p.nextUpdate}
+
+ ` }; const tabs = tabDefs.map((t, i) => `
${t.label}
`).join(''); const panelsHtml = tabDefs.map((t, i) => `
${panels[t.key]}
`).join(''); @@ -416,6 +524,121 @@ document.querySelectorAll('tbody tr').forEach(row => { link.addEventListener('click', () => showUserProfile(nameCell.textContent)); } }); + +/* ========== 取餐详情弹窗 ========== */ +const mealData = { + 'M-20260428-001': [ + { name:'清炒生菜', type:'秤', weight:133.0, cal:24.6, carb:1.6, fat:1.4, protein:2.2 }, + { name:'西红柿鸡蛋', type:'秤', weight:114.0, cal:94.5, carb:4.7, fat:5.1, protein:8.4 }, + { name:'辣子鸡丁', type:'秤', weight:79.0, cal:92.5, carb:3.3, fat:4.6, protein:9.8 } + ], + 'M-20260428-002': [ + { name:'藜麦沙拉', type:'秤', weight:150.0, cal:68.0, carb:12.5, fat:1.8, protein:3.2 }, + { name:'清蒸鲈鱼', type:'秤', weight:120.0, cal:112.0, carb:0.5, fat:4.2, protein:18.6 }, + { name:'蒜蓉西兰花', type:'秤', weight:95.0, cal:32.0, carb:4.1, fat:1.2, protein:2.8 } + ], + 'M-20260428-003': [ + { name:'红烧肉', type:'秤', weight:85.0, cal:210.5, carb:5.2, fat:15.3, protein:12.1 }, + { name:'米饭', type:'秤', weight:200.0, cal:232.0, carb:50.8, fat:0.6, protein:4.6 } + ], + 'M-20260428-004': [ + { name:'宫保鸡丁', type:'秤', weight:110.0, cal:145.0, carb:8.2, fat:7.5, protein:12.3 }, + { name:'番茄牛腩', type:'秤', weight:130.0, cal:125.0, carb:6.8, fat:5.2, protein:14.5 }, + { name:'杂粮饭', type:'秤', weight:180.0, cal:198.0, carb:42.0, fat:1.2, protein:5.8 } + ], + 'M-20260428-005': [ + { name:'小米粥', type:'秤', weight:250.0, cal:115.0, carb:24.5, fat:0.8, protein:2.4 }, + { name:'煎蛋', type:'秤', weight:60.0, cal:90.0, carb:0.6, fat:7.0, protein:6.3 }, + { name:'全麦馒头', type:'秤', weight:80.0, cal:176.0, carb:35.2, fat:1.5, protein:6.8 } + ], + 'M-20260428-006': [ + { name:'鸡胸肉沙拉', type:'秤', weight:180.0, cal:145.0, carb:5.2, fat:3.8, protein:22.5 }, + { name:'玉米浓汤', type:'秤', weight:200.0, cal:88.0, carb:16.0, fat:2.1, protein:2.8 } + ], + 'SP-001-001': [ + { name:'余量套餐A', type:'秤', weight:220.0, cal:185.0, carb:28.0, fat:4.5, protein:9.2 } + ], + 'SP-001-003': [ + { name:'余量套餐B', type:'秤', weight:195.0, cal:168.0, carb:25.5, fat:3.8, protein:8.5 } + ], + 'M-20260428-007': [ + { name:'糖醋里脊', type:'秤', weight:95.0, cal:178.0, carb:14.2, fat:8.5, protein:11.8 }, + { name:'蛋花汤', type:'秤', weight:200.0, cal:35.0, carb:1.2, fat:1.5, protein:3.8 }, + { name:'米饭', type:'秤', weight:180.0, cal:208.8, carb:45.7, fat:0.5, protein:4.1 } + ] +}; + +function showMealDetail(row) { + const cells = row.querySelectorAll('td'); + const recordId = cells[0].textContent; + const name = cells[1].textContent; + const empNo = cells[2].textContent; + const unit = cells[3].textContent; + const dept = cells[4].textContent; + const mealTime = cells[5].textContent; + const pickupMethod = cells[6].textContent.trim(); + const pickupType = cells[7].textContent.trim(); + const startTime = cells[9].textContent; + const endTime = cells[10].textContent; + + const items = mealData[recordId] || []; + const totalWeight = items.reduce((s, i) => s + i.weight, 0); + const totalCal = items.reduce((s, i) => s + i.cal, 0); + const totalCarb = items.reduce((s, i) => s + i.carb, 0); + const totalFat = items.reduce((s, i) => s + i.fat, 0); + const totalProtein = items.reduce((s, i) => s + i.protein, 0); + + const infoHtml = `
+
基本信息
+
+
就餐记录号${recordId}
+
姓名${name}
+
员工编号${empNo}
+
单位${unit}
+
部门${dept}
+
餐次${mealTime}
+
取餐方式${pickupMethod}
+
取餐类型${pickupType}
+
取餐时间${startTime} ~ ${endTime}
+
+
`; + + const tableRows = items.map(i => ` + ${i.name} + ${i.weight.toFixed(1)} + ${i.cal.toFixed(1)} + ${i.carb.toFixed(1)} + ${i.fat.toFixed(1)} + ${i.protein.toFixed(1)} + `).join(''); + + const summaryRow = ` + 合计 + ${totalWeight.toFixed(1)}克 + ${totalCal.toFixed(1)}千卡 + ${totalCarb.toFixed(1)}克 + ${totalFat.toFixed(1)}克 + ${totalProtein.toFixed(1)}克 + `; + + const tableHtml = `
+
餐品列表
+ + + ${tableRows}${summaryRow} +
餐品名称重量(克)热量(千卡)碳水化合物(克)脂肪(克)蛋白质(克)
+
`; + + Modal.open('取餐详情 — ' + name, infoHtml + tableHtml); +} + +/* 绑定"取餐总数量"列点击事件 */ +document.querySelectorAll('tbody tr').forEach(row => { + const quantityLink = row.querySelector('td:nth-child(12) .link'); + if (quantityLink) { + quantityLink.addEventListener('click', () => showMealDetail(row)); + } +}); \ No newline at end of file diff --git a/web-admin/nutrition/din-recipe-mgmt.html b/web-admin/nutrition/din-recipe-mgmt.html index e39c13b..b630c8e 100644 --- a/web-admin/nutrition/din-recipe-mgmt.html +++ b/web-admin/nutrition/din-recipe-mgmt.html @@ -87,6 +87,133 @@ tbody tr:hover{background:#F8FBFF;} thead th:last-child,tbody td.td-actions{position:sticky;right:0;background:#fff;box-shadow:-4px 0 8px rgba(0,0,0,0.04);z-index:2;white-space:nowrap;} thead th:last-child{background:#FAFAFA;} tbody tr:hover td.td-actions{background:#F8FBFF;} + +/* ===== 周食谱日历 ===== */ +.recipe-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;} +.recipe-toolbar__left{display:flex;align-items:center;gap:16px;} +.recipe-toolbar__left label{font-size:var(--font-sm);color:var(--text-secondary);white-space:nowrap;} +.recipe-toolbar__right{display:flex;align-items:center;gap:8px;} +.btn-outline-danger{height:36px;padding:0 16px;border-radius:var(--radius-sm);font-size:var(--font-sm);cursor:pointer;border:1px solid var(--danger);color:var(--danger);background:#fff;display:inline-flex;align-items:center;gap:6px;transition:all .2s;} +.btn-outline-danger:hover{background:#FFF1F0;} +.btn-outline-primary{height:36px;padding:0 16px;border-radius:var(--radius-sm);font-size:var(--font-sm);cursor:pointer;border:1px solid var(--primary);color:var(--primary);background:#fff;display:inline-flex;align-items:center;gap:6px;transition:all .2s;} +.btn-outline-primary:hover{background:var(--primary-light);} + +.week-grid{background:#fff;border-radius:var(--radius-md);box-shadow:var(--shadow-sm);overflow:hidden;border:1px solid var(--border);} +.week-grid table{width:100%;border-collapse:collapse;table-layout:fixed;} +.week-grid thead th{background:#FAFAFA;padding:12px 8px;text-align:center;font-size:var(--font-sm);color:var(--text-secondary);font-weight:500;border:1px solid var(--border);} +.week-grid thead th .day-date{font-size:var(--font-base);font-weight:600;color:var(--text-primary);} +.week-grid thead th .day-name{font-size:var(--font-xs);color:var(--text-secondary);margin-top:2px;} +.week-grid thead th.today{background:#FFF7E6;} +.week-grid thead th.today .day-date{color:#E8740C;} +.week-grid tbody td{border:1px solid var(--border);padding:0;vertical-align:top;height:140px;} +.week-grid tbody td.meal-label{width:64px;background:#FAFAFA;text-align:center;vertical-align:middle;font-size:var(--font-sm);font-weight:600;color:#E8740C;padding:12px 8px;white-space:nowrap;} +.week-grid tbody td.meal-cell{cursor:pointer;transition:background .15s;position:relative;} +.week-grid tbody td.meal-cell:hover{background:#FAFBFF;} +.week-grid tbody td.meal-cell .cell-hint{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#ccc;font-size:24px;display:none;pointer-events:none;} +.week-grid tbody td.meal-cell:hover .cell-hint{display:block;} +.week-grid tbody td.today-col{background:#FFFCF5;} + +.recipe-footer{display:flex;justify-content:flex-end;margin-top:16px;} +.btn-save{height:40px;padding:0 24px;border-radius:var(--radius-sm);font-size:var(--font-base);cursor:pointer;border:none;background:#E8740C;color:#fff;display:inline-flex;align-items:center;gap:8px;font-weight:500;transition:all .2s;box-shadow:0 2px 6px rgba(232,116,12,0.3);} +.btn-save:hover{background:#D06000;} + +/* ===== 周日历选择器 ===== */ +.week-picker{position:relative;display:inline-block;} +.week-picker__trigger{height:36px;padding:0 32px 0 12px;border:1px solid var(--border);border-radius:var(--radius-sm);font-size:var(--font-sm);color:var(--text-primary);background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 10px center;cursor:pointer;white-space:nowrap;min-width:300px;text-align:left;display:flex;align-items:center;gap:6px;} +.week-picker__trigger:hover{border-color:var(--primary);} +.week-picker__trigger.open{border-color:var(--primary);box-shadow:0 0 0 2px rgba(24,144,255,0.15);} +.week-picker__trigger svg{flex-shrink:0;opacity:0.5;} +.week-picker__dropdown{position:absolute;top:calc(100% + 4px);left:0;z-index:50;background:#fff;border-radius:var(--radius-md);box-shadow:var(--shadow-md);border:1px solid var(--border);padding:12px;width:300px;display:none;} +.week-picker__dropdown.show{display:block;} +.wp-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;} +.wp-header__title{font-size:var(--font-base);font-weight:600;color:var(--text-primary);} +.wp-header__btn{width:28px;height:28px;border:none;background:none;cursor:pointer;border-radius:var(--radius-sm);font-size:16px;color:var(--text-secondary);display:flex;align-items:center;justify-content:center;transition:all .15s;} +.wp-header__btn:hover{background:#F0F0F0;color:var(--text-primary);} +.wp-weekdays{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;margin-bottom:4px;} +.wp-weekdays span{font-size:var(--font-xs);color:var(--text-placeholder);padding:4px 0;} +.wp-days{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;} +.wp-day{padding:6px 0;font-size:var(--font-sm);color:var(--text-primary);cursor:pointer;border-radius:0;transition:background .1s;position:relative;} +.wp-day.other-month{color:#ccc;} +.wp-day.today{font-weight:700;color:var(--primary);} +.wp-day:first-child{border-radius:var(--radius-sm) 0 0 var(--radius-sm);} +.wp-day:last-child,.wp-day:nth-child(7n){border-radius:0 var(--radius-sm) var(--radius-sm) 0;} +.wp-day:nth-child(7n+1){border-radius:var(--radius-sm) 0 0 var(--radius-sm);} +.wp-week-row:hover .wp-day:not(.other-month){background:#E6F7FF;} +.wp-week-row:hover .wp-day.other-month{background:#F5FBFF;} +.wp-week-row{display:contents;} +.wp-week-row.selected .wp-day{background:var(--primary);color:#fff;} +.wp-week-row.selected .wp-day.other-month{background:#69B8FF;color:rgba(255,255,255,0.7);} +.wp-week-row.selected .wp-day.today{color:#fff;} +.wp-today-btn{display:block;width:100%;margin-top:8px;padding:6px 0;border:1px solid var(--border);border-radius:var(--radius-sm);background:#fff;font-size:var(--font-sm);color:var(--primary);cursor:pointer;transition:all .15s;} +.wp-today-btn:hover{background:var(--primary-light);border-color:var(--primary);} + +/* ===== 餐品选择弹窗 ===== */ +.dish-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:200;display:none;align-items:center;justify-content:center;} +.dish-modal-overlay.show{display:flex;} +.dish-modal{background:#fff;border-radius:var(--radius-lg);width:480px;max-height:70vh;display:flex;flex-direction:column;box-shadow:0 8px 24px rgba(0,0,0,0.18);} +.dish-modal__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border);} +.dish-modal__title{font-size:var(--font-base);font-weight:600;color:var(--text-primary);} +.dish-modal__close{width:28px;height:28px;border:none;background:none;cursor:pointer;font-size:18px;color:var(--text-secondary);border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;} +.dish-modal__close:hover{background:#F0F0F0;color:var(--text-primary);} +.dish-modal__search{padding:12px 20px;border-bottom:1px solid var(--border);} +.dish-modal__search input{width:100%;height:36px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 12px 0 32px;font-size:var(--font-sm);outline:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none'%3E%3Ccircle cx='6' cy='6' r='4.5' stroke='%23999' stroke-width='1.2'/%3E%3Cpath d='M9.5 9.5L12.5 12.5' stroke='%23999' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center;} +.dish-modal__search input:focus{border-color:var(--primary);} +.dish-modal__list{flex:1;overflow-y:auto;padding:8px 0;} +.dish-item{display:flex;align-items:center;gap:10px;padding:10px 20px;cursor:pointer;transition:background .1s;} +.dish-item:hover{background:#F8FBFF;} +.dish-item.selected{background:var(--primary-light);} +.dish-item__check{width:18px;height:18px;border:1.5px solid var(--border);border-radius:3px;flex-shrink:0;display:flex;align-items:center;justify-content:center;transition:all .15s;} +.dish-item.selected .dish-item__check{background:var(--primary);border-color:var(--primary);} +.dish-item.selected .dish-item__check::after{content:'';display:block;width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg) translate(-1px,-1px);} +.dish-item__info{display:flex;flex-direction:column;gap:2px;} +.dish-item__name{font-size:var(--font-sm);color:var(--text-primary);} +.dish-item__cat{font-size:var(--font-xs);color:var(--text-placeholder);} +.dish-modal__footer{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;border-top:1px solid var(--border);} +.dish-modal__count{font-size:var(--font-sm);color:var(--text-secondary);} +.dish-modal__actions{display:flex;gap:8px;} +.dish-modal__actions .btn{min-width:72px;justify-content:center;} + +/* ===== 单元格内餐品标签 ===== */ +.cell-dishes{display:flex;flex-wrap:wrap;gap:4px;padding:6px 8px;} +.cell-dish-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;background:#F0F5FF;border:1px solid #D6E4FF;border-radius:10px;font-size:var(--font-xs);color:var(--primary);max-width:100%;white-space:nowrap;} +.cell-dish-tag__del{width:14px;height:14px;border-radius:50%;border:none;background:none;cursor:pointer;font-size:12px;color:var(--text-placeholder);display:inline-flex;align-items:center;justify-content:center;line-height:1;transition:all .1s;} +.cell-dish-tag__del:hover{color:var(--danger);background:#FFF1F0;} + +/* ===== 复用规划食谱弹窗 ===== */ +.reuse-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:200;display:none;align-items:center;justify-content:center;} +.reuse-overlay.show{display:flex;} +.reuse-modal{background:#fff;border-radius:var(--radius-lg);width:1100px;max-width:92vw;max-height:82vh;display:flex;flex-direction:column;box-shadow:0 8px 24px rgba(0,0,0,0.18);} +.reuse-modal__header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid var(--border);} +.reuse-modal__title{font-size:var(--font-lg);font-weight:600;color:var(--text-primary);} +.reuse-modal__close{width:32px;height:32px;border:none;background:none;cursor:pointer;font-size:20px;color:var(--text-secondary);border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;} +.reuse-modal__close:hover{background:#F5F5F5;color:var(--text-primary);} +.reuse-modal__body{display:flex;flex:1;overflow:hidden;} +.reuse-modal__left{width:360px;flex-shrink:0;border-right:1px solid var(--border);display:flex;flex-direction:column;} +.reuse-modal__search{padding:12px 16px;border-bottom:1px solid var(--border);} +.reuse-modal__search input{width:100%;height:36px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 12px 0 32px;font-size:var(--font-sm);outline:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none'%3E%3Ccircle cx='6' cy='6' r='4.5' stroke='%23999' stroke-width='1.2'/%3E%3Cpath d='M9.5 9.5L12.5 12.5' stroke='%23999' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center;} +.reuse-modal__search input:focus{border-color:var(--primary);} +.reuse-modal__list{flex:1;overflow-y:auto;padding:8px 0;} +.reuse-recipe-item{display:flex;align-items:flex-start;gap:10px;padding:12px 16px;cursor:pointer;transition:background .1s;border-bottom:1px solid #F5F5F5;} +.reuse-recipe-item:hover{background:#F8FBFF;} +.reuse-recipe-item.selected{background:var(--primary-light);} +.reuse-recipe-item__radio{width:18px;height:18px;border:1.5px solid var(--border);border-radius:50%;flex-shrink:0;margin-top:2px;display:flex;align-items:center;justify-content:center;transition:all .15s;} +.reuse-recipe-item.selected .reuse-recipe-item__radio{border-color:var(--primary);background:var(--primary);} +.reuse-recipe-item.selected .reuse-recipe-item__radio::after{content:'';display:block;width:6px;height:6px;border-radius:50%;background:#fff;} +.reuse-recipe-item__info{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;} +.reuse-recipe-item__name{font-size:var(--font-sm);font-weight:500;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} +.reuse-recipe-item__meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;} +.reuse-modal__right{flex:1;display:flex;flex-direction:column;overflow:hidden;} +.reuse-modal__preview-title{padding:12px 20px;font-size:var(--font-sm);color:var(--text-secondary);border-bottom:1px solid var(--border);flex-shrink:0;} +.reuse-modal__preview{flex:1;overflow:auto;padding:16px 20px;} +.reuse-modal__preview .week-grid{border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:none;} +.reuse-modal__preview .week-grid table{table-layout:fixed;} +.reuse-modal__preview .week-grid thead th{padding:10px 6px;font-size:var(--font-xs);} +.reuse-modal__preview .week-grid tbody td{height:100px;} +.reuse-modal__preview .week-grid .meal-label{width:50px;font-size:var(--font-xs);} +.reuse-modal__preview .cell-dishes{padding:4px 6px;gap:3px;} +.reuse-modal__preview .cell-dish-tag{font-size:10px;padding:1px 6px;} +.reuse-modal__empty{display:flex;align-items:center;justify-content:center;height:100%;color:var(--text-placeholder);font-size:var(--font-sm);} +.reuse-modal__footer{display:flex;justify-content:flex-end;gap:8px;padding:16px 24px;border-top:1px solid var(--border);} @@ -154,48 +281,642 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
- -
-
-
-
-
-
- - + +
+
+
+ + +
+
+ +
+ + +
+
+
+
+ + + +
- -
-
-
-
食谱管理
-
-
- - - - - - - -
食谱编号食谱名称生效周期适用食堂适用终端菜品数发布状态净菜订单状态成本评估最近发布时间发布人操作
RECIPE-015第15周营养食谱2026-04-14~20一号食堂/二号食堂食堂+小程序42道已发布已生成合理2026-04-13 18:30营养师李明编辑 详情 删除
RECIPE-014第14周营养食谱2026-04-07~13一号食堂食堂+小程序38道已发布已生成偏高2026-04-06 18:10营养师李明编辑 详情 删除
RECIPE-016第16周营养食谱2026-04-21~27一号食堂/三号食堂食堂+小程序40道待发布待生成待评估营养师李明编辑 详情 删除
-
- + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2026-05-18
星期一
2026-05-19
星期二
2026-05-20
星期三
2026-05-21
星期四
2026-05-22
星期五
2026-05-23
星期六
2026-05-24
星期日
早餐+++++++
午餐+++++++
晚餐+++++++
加餐+++++++
+
+ + +
+ +
+
+
+
复用规划食谱
+ +
+
+
+ +
+
+
+
一周菜谱预览
+
+
请从左侧选择一个食谱查看详情
+
+
+
+ +
+
+ + +
+
+
+ 选择餐品 + +
+ +
+ +
+
+ \ No newline at end of file diff --git a/web-admin/nutrition/prod-recipe-plan-create.html b/web-admin/nutrition/prod-recipe-plan-create.html new file mode 100644 index 0000000..7709132 --- /dev/null +++ b/web-admin/nutrition/prod-recipe-plan-create.html @@ -0,0 +1,410 @@ + + + + +新建食谱规划 | 健康长庆原型 + + + + +
+ + +
+ ← 返回首页 +
+ 系统管理员 ▾ +
+
+ + + +
+ + + + +
+
基本信息
+
+
+
+ + +
+
+ +
+
+ 请选择适应人群 +
+
+
普通成人
+
老年人
+
糖尿病人群
+
高血压人群
+
儿童
+
孕产妇
+
+
+
+
+ + +
+
+
+
+ + +
+
一周菜谱
+
+
+ + + + + + + + + + + + + + + + + + + +
周一
周二
周三
周四
周五
周六
周日
早餐+++++++
午餐+++++++
晚餐+++++++
加餐+++++++
+
+
+
+ + + +
+ + +
+
+
+ 选择餐品 + +
+ +
+ +
+
+ + + + diff --git a/web-admin/nutrition/prod-recipe-plan-detail.html b/web-admin/nutrition/prod-recipe-plan-detail.html new file mode 100644 index 0000000..55233ba --- /dev/null +++ b/web-admin/nutrition/prod-recipe-plan-detail.html @@ -0,0 +1,250 @@ + + + + +食谱规划详情 | 健康长庆原型 + + + + +
+ + +
+ ← 返回首页 +
+ 系统管理员 ▾ +
+
+ + + +
+ + + + +
+
基本信息
+
+
+
+ 餐谱名称 + 第21周标准营养食谱 +
+
+ 适应人群 + 普通成人 +
+
+ 营养达标评级 + +
+
+
+
+ 安全评估 + 通过 +
+
+ 创建人 + 张营养师 +
+
+ 创建时间 + 2026-05-12 09:30 +
+
+
+
+ 审核人 + 李主任 +
+
+ 审核时间 + 2026-05-12 14:00 +
+
+
+
+
+ + +
+
一周菜谱
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
周一
周二
周三
周四
周五
周六
周日
早餐
白米饭小米粥馒头
皮蛋瘦肉粥花卷
小米粥煎饺
杂粮饭馒头
皮蛋瘦肉粥煎饺花卷
午餐
红烧肉清炒时蔬紫菜蛋花汤
宫保鸡丁酸辣土豆丝白米饭
糖醋排骨麻婆豆腐冬瓜排骨汤
清蒸鲈鱼西红柿炒蛋白米饭
红烧肉凉拌黄瓜紫菜蛋花汤
晚餐
西红柿炒蛋酸辣土豆丝
麻婆豆腐清炒时蔬
宫保鸡丁凉拌黄瓜
清蒸鲈鱼清炒时蔬
加餐
水果拼盘
绿豆汤水果拼盘
+
+
+
+ + + +
+ + + + diff --git a/web-admin/nutrition/prod-recipe-plan.html b/web-admin/nutrition/prod-recipe-plan.html index 2af9344..20132a5 100644 --- a/web-admin/nutrition/prod-recipe-plan.html +++ b/web-admin/nutrition/prod-recipe-plan.html @@ -80,7 +80,8 @@ tbody tr:hover td.td-actions{background:#F8FBFF;} /* 页面内弹窗 */ .modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:200;align-items:center;justify-content:center;} -.modal{background:#fff;border-radius:var(--radius-lg);width:680px;max-width:90vw;box-shadow:var(--shadow-md);} +.modal-overlay.show{display:flex;} +.modal{background:#fff;border-radius:var(--radius-lg);width:420px;max-width:90vw;box-shadow:var(--shadow-md);} .modal__header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px 16px;border-bottom:1px solid var(--border);} .modal__title{font-size:var(--font-lg);font-weight:600;color:var(--text-primary);} .modal__close{width:32px;height:32px;border:none;background:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-sm);color:var(--text-placeholder);} @@ -90,12 +91,34 @@ tbody tr:hover td.td-actions{background:#F8FBFF;} .form-group{margin-bottom:20px;} .form-group label{display:block;font-size:var(--font-sm);color:var(--text-primary);margin-bottom:8px;font-weight:500;} .form-group .required{color:var(--danger);margin-left:2px;} +.audit-options{display:flex;gap:12px;margin-bottom:16px;} +.audit-opt{flex:1;padding:16px;border:2px solid var(--border);border-radius:var(--radius-md);cursor:pointer;text-align:center;transition:all .15s;} +.audit-opt:hover{border-color:var(--primary);background:#FAFBFF;} +.audit-opt.selected-pass{border-color:var(--success);background:#F6FFED;} +.audit-opt.selected-fail{border-color:var(--danger);background:#FFF1F0;} +.audit-opt__icon{font-size:24px;margin-bottom:6px;} +.audit-opt__label{font-size:var(--font-sm);font-weight:500;color:var(--text-primary);} +.form-textarea{width:100%;height:80px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 12px;font-size:var(--font-sm);outline:none;resize:vertical;font-family:inherit;} +.form-textarea:focus{border-color:var(--primary);} .form-input2{width:100%;height:36px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 12px;font-size:var(--font-sm);outline:none;} .form-input2:focus{border-color:var(--primary);} .form-select2{width:100%;height:36px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 12px;font-size:var(--font-sm);outline:none;appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;} .form-textarea2{width:100%;height:80px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 12px;font-size:var(--font-sm);outline:none;resize:vertical;font-family:inherit;} .form-textarea2:focus{border-color:var(--primary);} .form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;} + +/* 多选下拉 */ +.multi-select{position:relative;display:inline-block;min-width:160px;} +.multi-select__trigger{height:36px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 28px 0 12px;font-size:var(--font-sm);cursor:pointer;display:flex;align-items:center;gap:4px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 10px center;overflow:hidden;white-space:nowrap;} +.multi-select__trigger:hover{border-color:var(--primary);} +.multi-select__placeholder{color:var(--text-placeholder);font-size:var(--font-sm);} +.multi-select__tag{display:inline-flex;align-items:center;gap:2px;padding:1px 6px;background:var(--primary-light);border-radius:8px;font-size:var(--font-xs);color:var(--primary);flex-shrink:0;} +.multi-select__tag-del{cursor:pointer;font-size:11px;opacity:0.7;line-height:1;}.multi-select__tag-del:hover{opacity:1;} +.multi-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;min-width:100%;z-index:50;background:#fff;border:1px solid var(--border);border-radius:var(--radius-sm);box-shadow:var(--shadow-md);display:none;max-height:200px;overflow-y:auto;} +.multi-select__dropdown.show{display:block;} +.multi-select__option{padding:8px 12px;font-size:var(--font-sm);cursor:pointer;transition:background .1s;white-space:nowrap;} +.multi-select__option:hover{background:#F8FBFF;} +.multi-select__option.selected{background:var(--primary-light);color:var(--primary);} @@ -142,26 +165,42 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
- - + +
- - + +
+
+ 全部 +
+
+
普通成人
+
老年人
+
糖尿病人群
+
高血压人群
+
儿童
+
孕产妇
+
+
+
+
+ +
@@ -170,9 +209,8 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
- - - + 新建规划 +
@@ -180,37 +218,37 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
-
食谱规划
+
食谱规划列表
- + - + - + - + - + - +
日期餐次来源食谱主食荤菜素菜汤类热量(kcal)净菜需求量(kg)营养达标评级安全评估整改状态操作菜谱名称适应人群营养达标评级安全评估创建人创建时间审核人审核时间审核意见操作
2026-04-15(周三)早餐第15周营养食谱小米粥+馒头卤蛋凉拌黄瓜4868.6通过无需整改详情 编辑 删除第21周标准营养食谱普通成人通过张营养师2026-05-12 09:30李主任2026-05-12 14:00营养搭配均衡,符合标准要求详情 删除
2026-04-15(周三)午餐第15周营养食谱米饭红烧肉+清蒸鱼炒时蔬+豆腐番茄蛋汤85638.2通过建议优化详情 编辑 删除第21周老年营养食谱老年人通过王营养师2026-05-12 10:15李主任2026-05-13 09:00低盐低脂方案合理,建议增加钙质详情 删除
2026-04-15(周三)晚餐第15周营养食谱米饭+花卷宫保鸡丁蒜蓉菠菜紫菜汤72428.6通过无需整改详情 编辑 删除第21周糖尿病专用食谱糖尿病人群待审核张营养师2026-05-13 08:45详情 编辑 审核 删除
2026-04-16(周四)早餐第15周营养食谱燕麦粥+包子茶叶蛋拌菠菜5129.2通过无需整改详情 编辑 删除第20周标准营养食谱普通成人 高血压人群通过王营养师2026-05-05 09:00李主任2026-05-05 16:30整体达标,高血压方案控钠良好详情 删除
2026-04-16(周四)午餐第15周营养食谱米饭糖醋排骨+虾仁炒西兰花冬瓜汤89240.4待复核待整改详情 编辑 删除第20周儿童营养食谱儿童合格未通过赵营养师2026-05-06 11:20李主任2026-05-07 10:00蛋白质摄入不足,缺少奶制品类详情 删除
- -