- 💡
- 点击格子配置调料名称和放置重量。配置完成后点击「保存」生效。
-
-
+
+
点击格子配置调料名称,重量由硬件自动反显,完成后点击「保存」生效
+
+
+
+ 📋 今日需求
+
-
-
-
+
diff --git a/other-module/canteen-device/ratio-scale/04-seasoning-settings.html b/other-module/canteen-device/ratio-scale/04-seasoning-settings.html index 3d501ed..1cb8c0e 100644 --- a/other-module/canteen-device/ratio-scale/04-seasoning-settings.html +++ b/other-module/canteen-device/ratio-scale/04-seasoning-settings.html @@ -13,196 +13,272 @@ display: flex; align-items: center; justify-content: center; padding: 20px; } - /* PAD 设备外壳 */ .device-frame { - width: 720px; height: 960px; - background: #0e1326; - border-radius: 24px; + width: 720px; height: 960px; background: #0b1020; + border-radius: 24px; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04); - overflow: hidden; - position: relative; display: flex; flex-direction: column; } - /* 顶部栏 */ - .top-bar { display: flex; align-items: center; height: 44px; background: #1a2b4a; padding: 0 20px; } - .back-btn { font-size: 14px; cursor: pointer; color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.2s; } - .back-btn:hover { color: #fff; } - .top-bar__title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.85); } - .top-bar__user { font-size: 12px; color: rgba(255,255,255,0.5); } - /* 主内容 */ - .main-content { flex: 1; padding: 20px 40px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; } + /* ===== 顶栏 ===== */ + .top-bar { + display: flex; align-items: center; height: 52px; + background: linear-gradient(180deg, #111d38 0%, #0e182c 100%); + padding: 0 20px; gap: 14px; + border-bottom: 1px solid rgba(255,255,255,0.04); + } + .top-bar__back { + font-size: 14px; color: rgba(255,255,255,0.55); cursor: pointer; + text-decoration: none; transition: color 0.2s; flex-shrink: 0; + } + .top-bar__back:hover { color: #fff; } + .top-bar__title { + font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.9); + letter-spacing: 0.5px; + } + .top-bar__spacer { flex: 1; } + .top-bar__btn { + padding: 5px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; + cursor: pointer; border: none; font-family: inherit; transition: all 0.2s; + } + .top-bar__btn--reset { + background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.5); + border: 1px solid rgba(255,255,255,0.08); + } + .top-bar__btn--reset:hover { background: rgba(255,255,255,0.1); color: #fff; } + .top-bar__btn--save { + background: #4a90d9; color: #fff; + } + .top-bar__btn--save:hover { background: #5ba0e9; } + .top-bar__btn--auto { + background: rgba(250,173,21,0.12); color: #faad14; + border: 1px solid rgba(250,173,21,0.2); + } + .top-bar__btn--auto:hover { background: rgba(250,173,21,0.22); } + .top-bar__btn:active { transform: scale(0.96); } + .top-bar__user { + font-size: 11px; color: rgba(255,255,255,0.35); + margin-left: 4px; flex-shrink: 0; + } - /* 说明栏 */ - .info-bar { - display: flex; align-items: center; gap: 12px; - background: rgba(74,144,217,0.08); border: 1px solid rgba(74,144,217,0.2); - border-radius: 10px; padding: 10px 16px; font-size: 12px; color: rgba(255,255,255,0.6); + /* ===== 主内容 ===== */ + .main-content { + flex: 1; padding: 12px 36px 16px; + display: flex; flex-direction: column; gap: 8px; overflow: hidden; } - .info-bar__icon { font-size: 16px; } - .info-bar__text { flex: 1; line-height: 1.5; } - .info-bar__save-btn { - padding: 6px 16px; border-radius: 6px; border: none; cursor: pointer; - background: #4a90d9; color: #fff; font-size: 13px; font-weight: 600; - transition: all 0.2s; flex-shrink: 0; - } - .info-bar__save-btn:hover { background: #5ba0e9; } - .info-bar__save-btn:active { transform: scale(0.97); } - .info-bar__reset-btn { - padding: 6px 14px; border-radius: 6px; cursor: pointer; - background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6); - border: 1px solid rgba(255,255,255,0.12); font-size: 13px; transition: all 0.2s; flex-shrink: 0; - } - .info-bar__reset-btn:hover { background: rgba(255,255,255,0.1); color: #fff; } - /* 调料秤网格 */ + /* ===== 提示条 ===== */ + .hint-bar { + font-size: 11px; color: rgba(255,255,255,0.28); + padding: 0 2px; line-height: 1; + } + + /* ===== 需求 Chip 条 ===== */ + .demand-strip { + display: flex; align-items: flex-start; gap: 8px; + padding: 8px 12px; border-radius: 10px; + background: rgba(250,173,21,0.03); border: 1px solid rgba(250,173,21,0.07); + } + .demand-strip__label { + font-size: 11px; font-weight: 600; color: #faad14; + flex-shrink: 0; padding-top: 3px; white-space: nowrap; + } + .demand-strip__chips { + display: flex; flex-wrap: wrap; gap: 5px; flex: 1; + } + .demand-chip { + display: inline-flex; align-items: center; gap: 4px; + padding: 3px 9px; border-radius: 14px; + font-size: 11px; font-weight: 600; + background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.65); + border: 1px solid rgba(255,255,255,0.06); + transition: all 0.25s; white-space: nowrap; + } + .demand-chip__name { color: rgba(255,255,255,0.8); } + .demand-chip__qty { color: rgba(255,255,255,0.4); font-weight: 500; } + .demand-chip__status { + font-size: 10px; margin-left: 2px; + } + .demand-chip__status--pending { color: rgba(255,255,255,0.25); } + .demand-chip__status--done { color: #52c41a; } + .demand-chip--placed { + opacity: 0.45; border-color: rgba(82,196,26,0.2); + } + .demand-chip--warning { + border-color: rgba(250,173,21,0.3); background: rgba(250,173,21,0.04); + } + .demand-chip__status--warning { color: #faad14; } + .demand-chip--toggle { + cursor: pointer; color: #4a90d9; border-color: rgba(74,144,217,0.25); + background: rgba(74,144,217,0.06); font-weight: 500; + } + .demand-chip--toggle:hover { + background: rgba(74,144,217,0.14); border-color: rgba(74,144,217,0.45); + } + + /* ===== 网格容器 ===== */ .grid-container { - flex: 1; display: flex; align-items: center; justify-content: center; + flex: 1; display: flex; align-items: flex-start; justify-content: center; } .seasoning-grid { display: grid; grid-template-columns: repeat(5, 1fr); - grid-template-rows: repeat(3, 100px); - gap: 5px; + gap: 8px; width: 100%; } - /* 调料格基类 */ + + /* ===== 单元格基类 ===== */ .seasoning-cell { - background: #1a2b4a; border: 1px solid rgba(255,255,255,0.06); - border-radius: 8px; padding: 4px 6px; + aspect-ratio: 1; + background: rgba(255,255,255,0.02); + border: 1px solid rgba(255,255,255,0.05); + border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; - font-size: 10px; color: rgba(255,255,255,0.5); transition: all 0.2s; position: relative; } - /* 信息格:位置0(油),2列×2行大格 */ + + /* 信息格:油 (0) — 2×2 */ .seasoning-cell--info { grid-column: 1 / span 2; grid-row: 1 / span 2; - background: rgba(250,173,21,0.08); border: 2px solid rgba(250,173,21,0.3); - padding: 8px 10px; gap: 4px; cursor: pointer; + background: linear-gradient(135deg, rgba(250,173,21,0.07) 0%, rgba(250,173,21,0.02) 100%); + border: 2px solid rgba(250,173,21,0.25); cursor: pointer; padding: 14px 16px; gap: 8px; } - .seasoning-cell--info:hover { border-color: rgba(250,173,21,0.5); background: rgba(250,173,21,0.12); } - .seasoning-cell--info .sea-name { - font-size: 18px; font-weight: 700; color: #faad14; line-height: 1.2; - display: flex; align-items: center; gap: 4px; margin-bottom: 6px; + .seasoning-cell--info:hover { + border-color: rgba(250,173,21,0.45); + background: linear-gradient(135deg, rgba(250,173,21,0.1) 0%, rgba(250,173,21,0.03) 100%); } - .seasoning-cell--info .sea-name-icon { font-size: 22px; } - .seasoning-cell--info .sea-fields { - display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; + .seasoning-cell--info .sc-name { + font-size: 22px; font-weight: 700; color: #faad14; + display: flex; align-items: center; gap: 8px; } - .seasoning-cell--info .sea-field { - display: flex; align-items: center; gap: 4px; font-size: 14px; + .seasoning-cell--info .sc-name em { font-style: normal; font-size: 26px; } + .seasoning-cell--info .sc-meta { + display: flex; gap: 24px; font-size: 15px; } - .seasoning-cell--info .sea-field__label { color: rgba(255,255,255,0.35); } - .seasoning-cell--info .sea-field__value { color: rgba(255,255,255,0.75); font-weight: 500; } - /* 调料格(位置1-11) */ - .seasoning-cell--slot { cursor: pointer; } - .seasoning-cell--slot:hover { border-color: rgba(74,144,217,0.3); background: rgba(74,144,217,0.06); } - .seasoning-cell--occupied { border-color: rgba(255,255,255,0.12); } - .sea-slot__name { - font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85); - line-height: 1.2; display: flex; align-items: center; gap: 4px; - margin-bottom: 4px; - } - .sea-slot__name-icon { font-size: 16px; } - .sea-slot__fields { - display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; - } - .sea-slot__field { - display: flex; gap: 3px; font-size: 11px; line-height: 1.4; - } - .sea-slot__field-label { color: rgba(255,255,255,0.35); } - .sea-slot__field-value { color: rgba(255,255,255,0.65); font-weight: 500; } - .sea-slot__empty { font-size: 11px; color: rgba(255,255,255,0.2); text-align: center; } + .seasoning-cell--info .sc-meta span { color: rgba(255,255,255,0.5); } + .seasoning-cell--info .sc-meta strong { color: rgba(255,255,255,0.8); font-weight: 600; } - /* 下拉选择浮层 */ + /* 调料格 (1-11) */ + .seasoning-cell--slot { cursor: pointer; } + .seasoning-cell--slot:hover { + border-color: rgba(74,144,217,0.25); background: rgba(74,144,217,0.04); + } + .seasoning-cell--occupied { + border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); + } + .sc-name { + font-size: 16px; font-weight: 600; color: rgba(255,255,255,0.85); + display: flex; align-items: center; gap: 6px; margin-bottom: 5px; + } + .sc-name em { font-style: normal; font-size: 18px; } + .sc-weight { + font-size: 13px; color: rgba(255,255,255,0.4); font-weight: 500; + } + + /* 格子状态标识 */ + .seasoning-cell--warning { + border-color: rgba(250,173,21,0.4) !important; + background: rgba(250,173,21,0.04) !important; + } + .seasoning-cell--warning .sc-weight { color: #faad14; } + .seasoning-cell--success { + border-color: rgba(82,196,26,0.3) !important; + background: rgba(82,196,26,0.03) !important; + } + .seasoning-cell--success .sc-weight { color: #52c41a; } + /* 信息格(油)的成功/警告状态 */ + .seasoning-cell--info.seasoning-cell--warning { + border-color: rgba(250,173,21,0.45) !important; + } + .seasoning-cell--info.seasoning-cell--success { + border-color: rgba(82,196,26,0.35) !important; + } + .sc-empty { + text-align: center; color: rgba(255,255,255,0.12); + } + .sc-empty__icon { font-size: 22px; margin-bottom: 2px; } + .sc-empty__text { font-size: 10px; } + + /* ===== 选择浮层 ===== */ .select-overlay { - position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; - display: none; align-items: center; justify-content: center; + position: fixed; inset: 0; background: rgba(0,0,0,0.55); + z-index: 100; display: none; align-items: center; justify-content: center; } .select-overlay.show { display: flex; } .select-panel { - background: #1a2b4a; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); - padding: 20px 24px; width: 420px; display: flex; flex-direction: column; gap: 14px; + background: #141f38; border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); + padding: 22px 26px; width: 420px; display: flex; flex-direction: column; gap: 14px; + box-shadow: 0 20px 48px rgba(0,0,0,0.5); } .select-panel__title { - font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85); - display: flex; align-items: center; gap: 8px; + font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.85); } - .select-panel__pos-tag { - font-size: 11px; padding: 2px 8px; border-radius: 4px; - background: rgba(74,144,217,0.15); color: #4a90d9; font-weight: 600; - } - /* 搜索框 */ - .select-panel__search-wrap { position: relative; flex: 1; } .select-panel__search-row { display: flex; gap: 8px; align-items: flex-start; } - .select-panel__btn--reset-inline { - padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; - cursor: pointer; transition: all 0.2s; border: none; font-family: inherit; flex-shrink: 0; - background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); - border: 1px solid rgba(255,255,255,0.1); - } - .select-panel__btn--reset-inline:hover { background: rgba(255,255,255,0.1); color: #fff; } + .select-panel__search-wrap { position: relative; flex: 1; } .select-panel__search-input { - width: 100%; padding: 10px 14px; background: #121832; - border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; - color: #fff; font-size: 14px; outline: none; transition: border-color 0.2s; - font-family: inherit; + width: 100%; padding: 10px 14px; background: #0d1529; + border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; + color: #fff; font-size: 14px; outline: none; font-family: inherit; + transition: border-color 0.2s; } .select-panel__search-input:focus { border-color: #4a90d9; } - /* 搜索结果列表 */ .select-panel__search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; - background: #121832; border: 1px solid rgba(255,255,255,0.1); - border-radius: 0 0 8px 8px; max-height: 180px; overflow-y: auto; - display: none; + background: #0d1529; border: 1px solid rgba(255,255,255,0.08); + border-radius: 0 0 8px 8px; max-height: 180px; overflow-y: auto; display: none; } .select-panel__search-results.show { display: block; } .select-panel__search-item { - padding: 10px 14px; cursor: pointer; font-size: 13px; color: rgba(255,255,255,0.8); - transition: background 0.15s; display: flex; align-items: center; gap: 8px; + padding: 10px 14px; cursor: pointer; font-size: 13px; color: rgba(255,255,255,0.75); + display: flex; align-items: center; gap: 8px; transition: background 0.15s; + } + .select-panel__search-item:hover { background: rgba(74,144,217,0.12); color: #fff; } + .select-panel__search-item--selected { background: rgba(74,144,217,0.18); color: #4a90d9; } + .select-panel__search-item--demand { background: rgba(250,173,21,0.05); } + .select-panel__search-item--demand:hover { background: rgba(250,173,21,0.12); } + .search-item__badge { + font-size: 10px; padding: 1px 6px; border-radius: 3px; + background: rgba(250,173,21,0.15); color: #faad14; + font-weight: 600; margin-left: auto; flex-shrink: 0; + } + .select-panel__search-divider { + padding: 5px 14px; font-size: 10px; color: rgba(255,255,255,0.2); + border-top: 1px solid rgba(255,255,255,0.05); pointer-events: none; } - .select-panel__search-item:hover { background: rgba(74,144,217,0.15); color: #fff; } - .select-panel__search-item--selected { background: rgba(74,144,217,0.2); color: #4a90d9; } .select-panel__search-empty { - padding: 16px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.3); - display: none; + padding: 16px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.25); display: none; } .select-panel__search-empty.show { display: block; } - /* 重量输入行 */ - .select-panel__weight-row { display: flex; align-items: center; gap: 10px; } - .select-panel__weight-label { font-size: 13px; color: rgba(255,255,255,0.6); flex-shrink: 0; } - .select-panel__weight-input { - flex: 1; padding: 10px 14px; background: #121832; - border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; - color: #fff; font-size: 14px; outline: none; transition: border-color 0.2s; - font-family: inherit; -moz-appearance: textfield; + .select-panel__btn--reset-inline { + padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; + cursor: pointer; border: none; font-family: inherit; flex-shrink: 0; + background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.4); + border: 1px solid rgba(255,255,255,0.08); transition: all 0.2s; } - .select-panel__weight-input:focus { border-color: #faad14; } - .select-panel__weight-input::-webkit-outer-spin-button, - .select-panel__weight-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } - .select-panel__weight-unit { font-size: 13px; color: rgba(255,255,255,0.4); } + .select-panel__btn--reset-inline:hover { background: rgba(255,255,255,0.08); color: #fff; } + .select-panel__actions { display: flex; gap: 10px; } .select-panel__btn { flex: 1; padding: 10px 0; border-radius: 8px; font-size: 13px; font-weight: 600; - cursor: pointer; transition: all 0.2s; border: none; font-family: inherit; + cursor: pointer; border: none; font-family: inherit; transition: all 0.2s; } .select-panel__btn--clear { - background: rgba(255,77,79,0.08); color: rgba(255,77,79,0.7); - border: 1px solid rgba(255,77,79,0.2); + background: rgba(255,77,79,0.06); color: rgba(255,77,79,0.6); + border: 1px solid rgba(255,77,79,0.15); } - .select-panel__btn--clear:hover { background: rgba(255,77,79,0.18); color: #ff4d4f; } + .select-panel__btn--clear:hover { background: rgba(255,77,79,0.15); color: #ff4d4f; } .select-panel__btn--cancel { - background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); + background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); } - .select-panel__btn--cancel:hover { background: rgba(255,255,255,0.12); color: #fff; } + .select-panel__btn--cancel:hover { background: rgba(255,255,255,0.1); color: #fff; } .select-panel__btn--confirm { background: #4a90d9; color: #fff; } .select-panel__btn--confirm:hover { background: #5ba0e9; } - /* Toast */ + /* ===== Toast ===== */ .toast { position: fixed; top: 60px; left: 50%; transform: translateX(-50%) translateY(-20px); - background: rgba(0,0,0,0.85); color: #fff; padding: 12px 28px; border-radius: 8px; + background: rgba(0,0,0,0.9); color: #fff; padding: 12px 28px; border-radius: 8px; font-size: 13px; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s, transform 0.3s, visibility 0.3s; white-space: nowrap; pointer-events: none; @@ -214,31 +290,35 @@