From 0f3566f99066f7c3c970e419a90187aa5c7adbf3 Mon Sep 17 00:00:00 2001 From: zhangyan Date: Wed, 17 Jun 2026 17:10:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=85=8D=E6=AF=94=E7=A7=A4=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=AE=A2=E5=8D=95=E7=B1=BB=E5=9E=8B=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=EF=BC=8C=E5=8A=A0=E5=B7=A5=E7=A7=A4=E5=8E=BB=E6=8E=89=E5=86=97?= =?UTF-8?q?=E4=BD=99=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ratio-scale/01: 新增内供/外售订单类型标签(蓝/橙),移除任务号及每份用量列(8→7列) - clean-veg-ratio-scale/01: 去掉刷新、保存、保存并继续按钮及相关逻辑 Co-Authored-By: Claude Opus 4.6 --- .../clean-veg-ratio-scale/01-accept.html | 71 ------------------- .../clean-veg-ratio-scale/doc/CHANGELOG.md | 8 +++ .../ratio-scale/01-packing-tasks.html | 24 ++++--- .../ratio-scale/doc/CHANGELOG.md | 11 +++ 4 files changed, 35 insertions(+), 79 deletions(-) diff --git a/other-module/canteen-device/clean-veg-ratio-scale/01-accept.html b/other-module/canteen-device/clean-veg-ratio-scale/01-accept.html index 17ef34d..cdeaa06 100644 --- a/other-module/canteen-device/clean-veg-ratio-scale/01-accept.html +++ b/other-module/canteen-device/clean-veg-ratio-scale/01-accept.html @@ -24,13 +24,6 @@ .page-title { font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.85); } - .refresh-btn { - margin-left: 16px; padding: 5px 12px; font-size: 11px; - background: rgba(74,144,217,0.1); border: 1px solid rgba(74,144,217,0.25); - border-radius: 6px; color: #4a90d9; cursor: pointer; - transition: all 0.2s; font-family: inherit; display: flex; align-items: center; gap: 4px; - } - .refresh-btn:hover { background: rgba(74,144,217,0.2); border-color: #4a90d9; } .user-info { margin-left: auto; font-size: 12px; color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 6px; } @@ -197,23 +190,6 @@ } .fetch-task-btn:hover { background: rgba(74,144,217,0.12); border-color: #4a90d9; } - .bottom-bar { - display: flex; align-items: center; justify-content: flex-end; gap: 12px; - padding: 10px 0; flex-shrink: 0; - } - .bottom-bar__btn { - padding: 9px 24px; border-radius: 8px; font-size: 13px; font-weight: 600; - cursor: pointer; transition: all 0.2s; font-family: inherit; border: none; - } - .bottom-bar__btn--save { - background: rgba(74,144,217,0.12); color: #4a90d9; - border: 1px solid rgba(74,144,217,0.25); - } - .bottom-bar__btn--save:hover { background: rgba(74,144,217,0.2); border-color: #4a90d9; } - .bottom-bar__btn--continue { - background: #4a90d9; color: #fff; - } - .bottom-bar__btn--continue:hover { background: #5ba0e9; } /* 搜索区 */ .search-section { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; } @@ -310,7 +286,6 @@
◀ 返回 净菜加工 -
@@ -549,26 +519,6 @@ }, 5000); } - // ---- 刷新:模拟获取加工任务最新重量 ----(顶部刷新按钮) - function handleRefresh() { - showToast('正在获取加工数据...', 800); - setTimeout(function() { - if (acceptedFoods.length === 0) { - // 无数据时重新初始化 - acceptedFoods = mockFoods.map(function(f) { - foodIdCounter++; - return { id: foodIdCounter, name: f.name, size: f.size, shape: f.shape, blade: f.blade, target: f.target, processed: f.processed, arrivalTime: f.arrivalTime, icon: f.icon }; - }); - renderFoodCards(); - showToast('加工任务已刷新', 1200); - return; - } - var f = acceptedFoods[Math.floor(Math.random() * acceptedFoods.length)]; - var detectedWeight = parseFloat((Math.random() * 2 + 0.3).toFixed(1)); - showWeightModal(f, detectedWeight); - }, 800); - } - // ---- 模拟识别(AI识别 → 弹窗确认重量) ---- function simulateRecognize() { var statusDot = document.querySelector('.status-dot'); @@ -716,27 +666,6 @@ closeWeightModal(); } - // ---- 保存(跳转菜单页) ---- - function handleSave() { - window.location.href = '01-menu.html?user=' + encodeURIComponent(currentUser.name) + '&uid=' + currentUser.id; - } - - // ---- 保存并继续(重置为初始数据) ---- - function handleSaveContinue() { - showToast('保存成功', 1500); - acceptedFoods = mockFoods.map(function(f) { - foodIdCounter++; - return { id: foodIdCounter, name: f.name, size: f.size, shape: f.shape, blade: f.blade, target: f.target, processed: f.processed, arrivalTime: f.arrivalTime, icon: f.icon }; - }); - renderFoodCards(); - document.getElementById('candidateEmpty').style.display = 'flex'; - document.getElementById('candidateList').innerHTML = ''; - document.getElementById('searchInput').value = ''; - document.getElementById('searchResults').innerHTML = ''; - document.getElementById('foodStatusText').textContent = '就绪,等待净菜放置'; - document.querySelector('.status-dot').className = 'status-dot status-dot--ready'; - } - // ---- 退出登录 ---- function handleLogout() { window.location.href = '00-welcome.html'; diff --git a/other-module/canteen-device/clean-veg-ratio-scale/doc/CHANGELOG.md b/other-module/canteen-device/clean-veg-ratio-scale/doc/CHANGELOG.md index a50c66a..32ba946 100644 --- a/other-module/canteen-device/clean-veg-ratio-scale/doc/CHANGELOG.md +++ b/other-module/canteen-device/clean-veg-ratio-scale/doc/CHANGELOG.md @@ -1,5 +1,13 @@ # 净菜加工秤 CHANGELOG +## [2026-06-17] refactor: 去掉保存/保存并继续/刷新按钮 + +### 删除 +- **01-accept.html**:移除顶部「刷新」按钮、底部「保存」及「保存并继续」按钮及相关 CSS/JS 逻辑 +- 删除 `handleRefresh()`、`handleSave()`、`handleSaveContinue()` 三个函数 + +--- + ## [2026-06-16] refactor: 模块整体重构,聚焦净菜验收单一功能 ### 变更 diff --git a/other-module/canteen-device/ratio-scale/01-packing-tasks.html b/other-module/canteen-device/ratio-scale/01-packing-tasks.html index c6e379e..48fd23a 100644 --- a/other-module/canteen-device/ratio-scale/01-packing-tasks.html +++ b/other-module/canteen-device/ratio-scale/01-packing-tasks.html @@ -59,16 +59,16 @@ .task-card__pack-btn:hover { background: #5ba0e9; } .task-card__pack-btn:disabled { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); cursor: not-allowed; } - /* 表格头(8列) */ + /* 表格头(7列) */ .item-table__head { - display: grid; grid-template-columns: 1fr 0.6fr 0.55fr 0.6fr 0.5fr 0.65fr 0.6fr 50px; gap: 8px; + display: grid; grid-template-columns: 1fr 0.65fr 0.6fr 0.5fr 0.65fr 0.6fr 50px; gap: 8px; padding: 6px 16px; background: rgba(0,0,0,0.2); font-size: 11px; color: rgba(255,255,255,0.4); font-weight: 500; } .item-table__body { display: flex; flex-direction: column; } /* 餐品净菜包主行 */ .item-parent-row { - display: grid; grid-template-columns: 1fr 0.6fr 0.55fr 0.6fr 0.5fr 0.65fr 0.6fr 50px; gap: 8px; + display: grid; grid-template-columns: 1fr 0.65fr 0.6fr 0.5fr 0.65fr 0.6fr 50px; gap: 8px; padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.04); align-items: center; background: rgba(74,144,217,0.06); } @@ -88,7 +88,7 @@ /* 食材子行 */ .item-child-row { - display: grid; grid-template-columns: 1fr 0.6fr 0.55fr 0.6fr 0.5fr 0.65fr 0.6fr 50px; gap: 8px; + display: grid; grid-template-columns: 1fr 0.65fr 0.6fr 0.5fr 0.65fr 0.6fr 50px; gap: 8px; padding: 8px 16px 8px 48px; border-top: 1px solid rgba(255,255,255,0.03); align-items: center; transition: background 0.2s; } @@ -116,6 +116,9 @@ .status-badge { font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 500; display: inline-block; } .status-badge--pending { background: rgba(250,173,22,0.15); color: #faad16; } .status-badge--done { background: rgba(82,196,26,0.15); color: #52c41a; } + .order-type-tag { font-size: 10px; padding: 2px 6px; border-radius: 3px; font-weight: 500; white-space: nowrap; } + .order-type-tag--internal { background: rgba(74,144,217,0.15); color: #4a90d9; } + .order-type-tag--external { background: rgba(250,140,22,0.15); color: #fa8c16; } .status-tag { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; } @@ -170,6 +173,7 @@ var mockData = [ { orderNo: 'PO-20260616-001', + orderType: 'internal', expectedArrival: '11:30', taskNo: 'T-001', mealPacks: [ @@ -186,6 +190,7 @@ }, { orderNo: 'PO-20260616-002', + orderType: 'external', expectedArrival: '12:00', taskNo: 'T-002', mealPacks: [ @@ -199,6 +204,7 @@ }, { orderNo: 'PO-20260616-003', + orderType: 'internal', expectedArrival: '14:30', taskNo: 'T-003', mealPacks: [ @@ -209,6 +215,7 @@ }, { orderNo: 'PO-20260616-004', + orderType: 'external', expectedArrival: '16:00', taskNo: 'T-004', mealPacks: [ @@ -255,9 +262,11 @@ /* 合并行:订单号 + 任务号 + 期望到货 + 状态 + 去配比 */ var header = document.createElement('div'); header.className = 'task-card__header'; + var orderTypeLabel = order.orderType === 'internal' ? '内供订单' : '外售订单'; + var orderTypeCls = order.orderType === 'internal' ? 'order-type-tag--internal' : 'order-type-tag--external'; header.innerHTML = '订单号:' + order.orderNo + '' + - '任务号:' + order.taskNo + '' + + '' + orderTypeLabel + '' + '⏰ 期望到货:' + order.expectedArrival + '' + '' + (orderAllDone ? '已完成' : '待配比') + '' + (orderAllDone @@ -265,10 +274,10 @@ : ''); taskCard.appendChild(header); - /* 表格头(8列) */ + /* 表格头(7列) */ var tableHead = document.createElement('div'); tableHead.className = 'item-table__head'; - tableHead.innerHTML = '
名称
净菜/餐品
包装规格
每份用量
打包份数
所需总重
已称
状态
'; + tableHead.innerHTML = '
名称
净菜/餐品
包装规格
打包份数
所需总重
已称
状态
'; taskCard.appendChild(tableHead); /* 表格体 */ @@ -294,7 +303,6 @@ '
📦
' + pack.packName + '
' + '
' + pack.type + '
' + '
' + (pack.packSpec || '—') + '
' + - '
' + (pack.type === '餐品净菜包' ? '—' : pack.ingredients[0].weightPerPack + ' 克') + '
' + '
' + pack.packSize + '
' + '
需 ' + totalNeed + ' 克
' + '
已 ' + totalWeighed + ' 克
' + diff --git a/other-module/canteen-device/ratio-scale/doc/CHANGELOG.md b/other-module/canteen-device/ratio-scale/doc/CHANGELOG.md index f608ff3..a387cdb 100644 --- a/other-module/canteen-device/ratio-scale/doc/CHANGELOG.md +++ b/other-module/canteen-device/ratio-scale/doc/CHANGELOG.md @@ -1,5 +1,16 @@ # 净菜配比秤 CHANGELOG +## [1.3.1] - 2026-06-17 + +### 新增 +- **订单类型标签**:任务卡片头新增「内供订单」/「外售订单」标签(蓝色/橙色区分) + +### 调整 +- **列表页(01)**:卡片头移除「任务号」字段,改为订单类型标签 +- **列表页(01)**:表格移除「每份用量」列,8列→7列;列宽重新分配 + +--- + ## [1.3.0] - 2026-06-17 ### 重构