diff --git a/other-module/canteen-device/canteen-nutrition-scale/04-settings.html b/other-module/canteen-device/canteen-nutrition-scale/04-settings.html
index 83428aa..7dd1f03 100644
--- a/other-module/canteen-device/canteen-nutrition-scale/04-settings.html
+++ b/other-module/canteen-device/canteen-nutrition-scale/04-settings.html
@@ -61,11 +61,14 @@
display: flex;
flex-direction: column;
align-items: center;
- justify-content: center;
+ justify-content: flex-start;
height: calc(100% - 44px);
gap: 24px;
padding: 24px;
+ overflow-y: auto;
+ scrollbar-width: none;
}
+ .main-content::-webkit-scrollbar { display: none; }
/* ---- 按钮卡片 ---- */
.settings-card {
@@ -177,6 +180,36 @@
color: #fff;
}
+ /* ===== 闭餐弹窗 — 处理方式选择 ===== */
+ .disposal-option-group { display: flex; flex-direction: column; gap: 10px; }
+ .disposal-option {
+ display: flex; align-items: center; gap: 12px;
+ padding: 12px 16px; border-radius: 8px;
+ border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03);
+ cursor: pointer; transition: all 0.2s;
+ }
+ .disposal-option:hover { border-color: rgba(74,144,217,0.3); background: rgba(74,144,217,0.05); }
+ .disposal-option.active { border-color: #4a90d9; background: rgba(74,144,217,0.1); }
+ .disposal-option__radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
+ .disposal-option.active .disposal-option__radio { border-color: #4a90d9; }
+ .disposal-option.active .disposal-option__radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #4a90d9; }
+ .disposal-option__icon { font-size: 22px; flex-shrink: 0; }
+ .disposal-option__label { font-size: 14px; color: rgba(255,255,255,0.85); font-weight: 500; }
+ .disposal-option__hint { font-size: 11px; color: rgba(255,255,255,0.35); }
+
+ /* 确认/取消按钮 */
+ .modal-actions { display: flex; gap: 12px; margin-top: 0; }
+ .btn-confirm-danger {
+ flex: 1; padding: 12px; background: rgba(255,77,79,0.8); color: #fff;
+ border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
+ }
+ .btn-confirm-danger:hover { background: #ff4d4f; }
+
+ /* 系统状态标识 */
+ .status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 4px; }
+ .status-dot--open { background: #52c41a; }
+ .status-dot--closed { background: rgba(255,255,255,0.3); }
+
/* ===== 减重弹窗 — 秤体重量显示 ===== */
.tare-weight-display {
background: rgba(255, 255, 255, 0.03);
@@ -318,6 +351,16 @@
›
+
+
+
@@ -364,6 +407,63 @@
+
+
+
+
🛑 闭餐 - 选择处理方式
+
+
+ 请选择剩余餐品的处理方式:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -521,6 +621,81 @@
spoonTareModal.addEventListener('click', function(e) {
if (e.target === spoonTareModal) closeSpoonTareModal();
});
+
+ /* ===== 闭餐逻辑 ===== */
+ var isMealOpen = true;
+ var selectedDisposal = 'donate';
+ var closeMealModal = document.getElementById('closeMealModal');
+
+ function updateCloseMealStatus() {
+ var descEl = document.getElementById('closeMealStatusDesc');
+ if (isMealOpen) {
+ descEl.innerHTML = '当前状态:开餐中';
+ } else {
+ descEl.innerHTML = '当前状态:已闭餐';
+ }
+ }
+
+ function handleCloseMeal() {
+ if (!isMealOpen) {
+ showToast('未开餐设备不能执行闭餐操作');
+ return;
+ }
+ selectedDisposal = 'donate';
+ document.querySelectorAll('#disposalGroup .disposal-option').forEach(function(opt) { opt.classList.remove('active'); });
+ var firstOpt = document.querySelector('#disposalGroup .disposal-option[data-disposal="donate"]');
+ if (firstOpt) firstOpt.classList.add('active');
+ closeMealModal.classList.add('active');
+ }
+
+ function closeCloseMealModal() {
+ closeMealModal.classList.remove('active');
+ document.getElementById('closeMealRemark').value = '';
+ }
+
+ function selectDisposal(method, el) {
+ selectedDisposal = method;
+ document.querySelectorAll('#disposalGroup .disposal-option').forEach(function(opt) { opt.classList.remove('active'); });
+ el.classList.add('active');
+ }
+
+ function confirmCloseMeal() {
+ var disposalLabels = { donate: '捐赠', welfare: '员工福利', discard: '废弃', reprocess: '加工再利用' };
+ var label = disposalLabels[selectedDisposal] || selectedDisposal;
+ var remark = document.getElementById('closeMealRemark').value.trim();
+ isMealOpen = false;
+ updateCloseMealStatus();
+ closeCloseMealModal();
+ var msg = '闭餐成功 - 处理方式:' + label;
+ if (remark) msg += ',备注:' + remark;
+ showToast(msg);
+ }
+
+ closeMealModal.addEventListener('click', function(e) {
+ if (e.target === closeMealModal) closeCloseMealModal();
+ });
+
+ /* 开始开餐时恢复开餐状态 */
+ (function() {
+ var startCard = document.querySelector('.settings-card[href="01-meal-start.html"]');
+ if (startCard) {
+ startCard.addEventListener('click', function() {
+ isMealOpen = true;
+ updateCloseMealStatus();
+ /* 用 localStorage 跨页面传递状态 */
+ localStorage.setItem('mealOpen', 'true');
+ });
+ }
+ })();
+
+ /* 页面加载时从 localStorage 恢复状态 */
+ (function() {
+ var saved = localStorage.getItem('mealOpen');
+ if (saved === 'false') {
+ isMealOpen = false;
+ updateCloseMealStatus();
+ }
+ })();
@@ -115,7 +153,8 @@
待包装 0
-
已包装 0
+
待发货 0
+
已发货 0
@@ -124,6 +163,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+