feat: 订餐终端设备概览弹窗 + 会员权益/采购库存抵扣/追溯多锅次分支 + 设备端统计与验收改造
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
b4dfe31b25
commit
792567ac03
@@ -1102,6 +1102,7 @@
|
||||
.mh-dmethod-card--donate { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.2); }
|
||||
.mh-dmethod-card--waste { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.2); }
|
||||
.mh-dmethod-card--reprocess { background: rgba(168, 85, 247, 0.08); border-color: rgba(168, 85, 247, 0.2); }
|
||||
.mh-dmethod-card--cabinet { background: rgba(34, 211, 238, 0.08); border-color: rgba(34, 211, 238, 0.2); }
|
||||
.mh-dmethod-card__label { font-size: 10px; color: rgba(255, 255, 255, 0.55); }
|
||||
.mh-dmethod-card__value { font-size: 20px; font-weight: 700; color: #fff; }
|
||||
.mh-dmethod-card__count { font-size: 10px; color: rgba(255, 255, 255, 0.45); }
|
||||
@@ -1109,6 +1110,7 @@
|
||||
.mh-dmethod-card--donate .mh-dmethod-card__value { color: #4ade80; }
|
||||
.mh-dmethod-card--waste .mh-dmethod-card__value { color: #ef4444; }
|
||||
.mh-dmethod-card--reprocess .mh-dmethod-card__value { color: #c084fc; }
|
||||
.mh-dmethod-card--cabinet .mh-dmethod-card__value { color: #22d3ee; }
|
||||
|
||||
/* 筛选 tab */
|
||||
.mh-filter-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
|
||||
@@ -1142,6 +1144,7 @@
|
||||
.mh-method-badge--donate { background: rgba(74, 222, 128, 0.18); color: #4ade80; }
|
||||
.mh-method-badge--waste { background: rgba(239, 68, 68, 0.18); color: #ef4444; }
|
||||
.mh-method-badge--reprocess { background: rgba(168, 85, 247, 0.18); color: #c084fc; }
|
||||
.mh-method-badge--cabinet { background: rgba(34, 211, 238, 0.18); color: #22d3ee; }
|
||||
|
||||
/* 节点卡片内的处置方式紧凑网格 */
|
||||
.mh-dispose-compact {
|
||||
@@ -1741,7 +1744,7 @@
|
||||
var MH_NODE_TYPES = {
|
||||
start: { dotCls: 'mh-tl-node__dot--start', dotIcon: '▶', badgeCls: 'mh-detail-subhead__badge--start', label: '开餐' },
|
||||
add: { dotCls: 'mh-tl-node__dot--add', dotIcon: '➕', badgeCls: 'mh-detail-subhead__badge--add', label: '补餐' },
|
||||
close: { dotCls: 'mh-tl-node__dot--close', dotIcon: '✕', badgeCls: 'mh-detail-subhead__badge--close', label: '闭餐' },
|
||||
close: { dotCls: 'mh-tl-node__dot--close', dotIcon: '✕', badgeCls: 'mh-detail-subhead__badge--close', label: '收餐' },
|
||||
dispose: { dotCls: 'mh-tl-node__dot--dispose', dotIcon: '♻', badgeCls: 'mh-detail-subhead__badge--dispose', label: '余量处置' }
|
||||
};
|
||||
|
||||
@@ -1749,7 +1752,8 @@
|
||||
welfare: { label: '员工福利', cls: 'mh-method-badge--welfare', cardCls: 'mh-dmethod-card--welfare' },
|
||||
donate: { label: '捐赠', cls: 'mh-method-badge--donate', cardCls: 'mh-dmethod-card--donate' },
|
||||
waste: { label: '废弃', cls: 'mh-method-badge--waste', cardCls: 'mh-dmethod-card--waste' },
|
||||
reprocess: { label: '加工再利用', cls: 'mh-method-badge--reprocess', cardCls: 'mh-dmethod-card--reprocess' }
|
||||
reprocess: { label: '加工再利用', cls: 'mh-method-badge--reprocess', cardCls: 'mh-dmethod-card--reprocess' },
|
||||
cabinet: { label: '存入智能货柜', cls: 'mh-method-badge--cabinet', cardCls: 'mh-dmethod-card--cabinet' }
|
||||
};
|
||||
|
||||
var MH_MEAL_HISTORY = [
|
||||
@@ -1762,8 +1766,7 @@
|
||||
{ type: 'start', time: '11:00:23', title: '开餐', desc: '操作人 <strong>张三 · CS001</strong> 开启<strong>午餐</strong>餐次,涉及 <strong>28 道菜</strong>', tags: [{ cls: 'mh-tl-tag--green', text: '28 道菜' }], detail: { firstOrder: { time: '11:32:10', line: 'A', customer: '张*明', amount: 27.50 }, dishes: [{ name: '宫保鸡丁', line: 'A', serveTime: '11:01:12', maker: '王师傅', operator: '张三', planned: 8.5, sold: 7.8 }, { name: '鱼香肉丝', line: 'A', serveTime: '11:01:18', maker: '王师傅', operator: '张三', planned: 7.0, sold: 6.2 }, { name: '番茄炒蛋', line: 'B', serveTime: '11:00:45', maker: '李师傅', operator: '张三', planned: 6.0, sold: 4.5 }, { name: '白米饭', line: 'A', serveTime: '11:00:30', maker: '赵师傅', operator: '张三', planned: 15.0, sold: 12.0 }, { name: '清炒西兰花', line: 'B', serveTime: '11:01:05', maker: '李师傅', operator: '张三', planned: 5.0, sold: 4.0 }, { name: '红烧肉', line: 'A', serveTime: '11:01:22', maker: '王师傅', operator: '张三', planned: 6.5, sold: 5.8 }, { name: '麻婆豆腐', line: 'B', serveTime: '11:01:30', maker: '李师傅', operator: '张三', planned: 4.5, sold: 3.9 }, { name: '糖醋排骨', line: 'A', serveTime: '11:02:00', maker: '王师傅', operator: '张三', planned: 5.0, sold: 4.2 }, { name: '酸辣土豆丝', line: 'B', serveTime: '11:02:10', maker: '李师傅', operator: '张三', planned: 4.0, sold: 3.3 }, { name: '回锅肉', line: 'C', serveTime: '11:00:55', maker: '陈师傅', operator: '张三', planned: 5.5, sold: 4.8 }, { name: '水煮鱼', line: 'A', serveTime: '11:02:20', maker: '王师傅', operator: '张三', planned: 4.0, sold: 3.2 }, { name: '干煸豆角', line: 'C', serveTime: '11:01:40', maker: '陈师傅', operator: '张三', planned: 3.5, sold: 2.8 }, { name: '蒜蓉生菜', line: 'B', serveTime: '11:01:50', maker: '李师傅', operator: '张三', planned: 4.0, sold: 3.1 }, { name: '紫菜蛋花汤', line: 'A', serveTime: '11:00:40', maker: '王师傅', operator: '张三', planned: 10.0, sold: 8.0 }] } },
|
||||
{ type: 'add', time: '12:05:45', title: '补餐 · 番茄炒蛋', desc: '<strong>番茄炒蛋</strong> 余量降至 0.8kg(预警阈值),后厨补做 <strong>3.0kg</strong>', tags: [{ cls: 'mh-tl-tag--gold', text: '自动预警' }, { cls: 'mh-tl-tag--green', text: '已通知后厨' }], supply: { dish: '番茄炒蛋', line: 'B', dishEmoji: '🍳', triggerLeftover: 0.8, addAmount: 3.0, reason: '自动预警', operator: '张三', status: '已补做' } },
|
||||
{ type: 'add', time: '12:48:20', title: '补餐 · 白米饭', desc: '<strong>白米饭</strong> 余量降至 3.0kg,后厨补做 <strong>5.0kg</strong>', tags: [{ cls: 'mh-tl-tag--gold', text: '手动通知' }, { cls: 'mh-tl-tag--green', text: '已通知后厨' }], supply: { dish: '白米饭', line: 'A', dishEmoji: '🍚', triggerLeftover: 3.0, addAmount: 5.0, reason: '手动通知', operator: '张三', status: '已补做' } },
|
||||
{ type: 'close', time: '13:15:00', title: '闭餐', desc: '停止取餐', tags: [{ cls: 'mh-tl-tag--gray', text: '闭餐' }], closeDetail: { lines: [{ line: 'B', name: 'B 区中餐线', closeTime: '13:15:00', orders: 32, revenue: 870.00, avgPer: 27.19 }] } },
|
||||
{ type: 'close', time: '13:45:30', title: '闭餐', desc: '停止取餐', tags: [{ cls: 'mh-tl-tag--gray', text: '闭餐' }], closeDetail: { lines: [{ line: 'A', name: 'A 区中餐线', closeTime: '13:45:30', orders: 41, revenue: 1130.50, avgPer: 27.57 }] } }
|
||||
{ type: 'close', time: '13:45:30', title: '收餐', desc: '部分餐线已收餐,进入员工餐时段', tags: [{ cls: 'mh-tl-tag--gray', text: '部分收餐' }], closeDetail: { operator: '张三', closeTime: '13:45:30', method: 'staff_meal', methodLabel: '进入员工餐时段', orders: 73, revenue: 2000.50, avgPer: 27.40, surplus: '5.0' } }
|
||||
],
|
||||
footer: { totalOrders: 96, totalRevenue: 2614.50, avgPer: 27.23, surplus: '进行中' }
|
||||
},
|
||||
@@ -1775,8 +1778,8 @@
|
||||
nodes: [
|
||||
{ type: 'start', time: '06:30:00', title: '开餐', desc: '操作人 <strong>李四 · CS002</strong> 开启<strong>早餐</strong>餐次,涉及 <strong>14 道菜</strong>', tags: [{ cls: 'mh-tl-tag--green', text: '14 道菜' }], detail: { firstOrder: { time: '06:48:15', line: 'A', customer: '王*强', amount: 12.50 }, dishes: [{ name: '豆浆', line: 'A', serveTime: '06:30:10', maker: '孙师傅', operator: '李四', planned: 8.0, sold: 6.5 }, { name: '油条', line: 'A', serveTime: '06:30:20', maker: '孙师傅', operator: '李四', planned: 5.0, sold: 4.2 }, { name: '鲜肉包', line: 'B', serveTime: '06:30:05', maker: '周师傅', operator: '李四', planned: 6.0, sold: 5.0 }, { name: '鸡蛋饼', line: 'A', serveTime: '06:30:35', maker: '孙师傅', operator: '李四', planned: 4.0, sold: 3.3 }, { name: '小米粥', line: 'B', serveTime: '06:30:15', maker: '周师傅', operator: '李四', planned: 6.0, sold: 5.1 }, { name: '馒头', line: 'B', serveTime: '06:30:25', maker: '周师傅', operator: '李四', planned: 5.0, sold: 4.0 }, { name: '花卷', line: 'A', serveTime: '06:30:45', maker: '孙师傅', operator: '李四', planned: 3.5, sold: 2.8 }, { name: '茶叶蛋', line: 'A', serveTime: '06:30:08', maker: '孙师傅', operator: '李四', planned: 4.0, sold: 3.5 }] } },
|
||||
{ type: 'add', time: '07:25:30', title: '补餐 · 豆浆', desc: '<strong>豆浆</strong> 余量降至 1.2kg,后厨补做 <strong>3.0kg</strong>', tags: [{ cls: 'mh-tl-tag--gold', text: '自动预警' }, { cls: 'mh-tl-tag--green', text: '已通知后厨' }], supply: { dish: '豆浆', line: 'A', dishEmoji: '🥛', triggerLeftover: 1.2, addAmount: 3.0, reason: '自动预警', operator: '李四', status: '已补做' } },
|
||||
{ type: 'close', time: '08:50:00', title: '闭餐', desc: '停止取餐', tags: [{ cls: 'mh-tl-tag--gray', text: '全部闭餐' }], closeDetail: { lines: [{ line: 'A', name: 'A 区早餐线', closeTime: '08:50:00', orders: 78, revenue: 995.00, avgPer: 12.76 }, { line: 'B', name: 'B 区早餐线', closeTime: '08:50:00', orders: 64, revenue: 825.00, avgPer: 12.89 }] } },
|
||||
{ type: 'dispose', time: '09:32:18', title: '余量处置完成', desc: '本餐次共处置余量 <strong>12.4kg</strong>,操作人 <strong>李四</strong>', tags: [{ cls: 'mh-tl-tag--purple', text: '处置完成' }, { cls: 'mh-tl-tag--green', text: '交叉核对正常' }], dispose: { total: 12.4, operator: '李四', methods: [{ key: 'welfare', label: '员工福利', amount: 5.2, count: 3 }, { key: 'donate', label: '捐赠', amount: 4.8, count: 2 }, { key: 'waste', label: '废弃', amount: 1.4, count: 2 }, { key: 'reprocess', label: '加工再利用', amount: 1.0, count: 1 }], records: [{ time: '09:33:10', dish: '油条', line: 'A', method: 'welfare', amount: 2.0, receiver: '员工 · 王建国', operator: '李四', note: '加班餐' }, { time: '09:34:05', dish: '鲜肉包', line: 'B', method: 'welfare', amount: 1.8, receiver: '员工 · 陈小红', operator: '李四', note: '值班餐' }, { time: '09:35:20', dish: '鸡蛋饼', line: 'A', method: 'welfare', amount: 1.4, receiver: '员工 · 赵大鹏', operator: '李四', note: '' }, { time: '09:36:45', dish: '小米粥', line: 'B', method: 'donate', amount: 3.0, receiver: '浐灞社区服务站', operator: '李四', note: '捐赠凭证已上传' }, { time: '09:37:30', dish: '馒头', line: 'B', method: 'donate', amount: 1.8, receiver: '浐灞社区服务站', operator: '李四', note: '' }, { time: '09:38:15', dish: '花卷', line: 'A', method: 'waste', amount: 0.9, receiver: '—', operator: '李四', note: '临期食品' }, { time: '09:39:00', dish: '茶叶蛋', line: 'A', method: 'waste', amount: 0.5, receiver: '—', operator: '李四', note: '破壳损耗' }, { time: '09:40:10', dish: '豆浆', line: 'A', method: 'reprocess', amount: 1.0, receiver: '后厨 · 孙师傅', operator: '李四', note: '员工餐再利用' }] } }
|
||||
{ type: 'close', time: '08:50:00', title: '收餐', desc: '全部餐线收餐完成,进入员工餐时段', tags: [{ cls: 'mh-tl-tag--gray', text: '全部收餐' }], closeDetail: { operator: '李四', closeTime: '08:50:00', method: 'staff_meal', methodLabel: '进入员工餐时段', orders: 142, revenue: 1820.00, avgPer: 12.82, surplus: '12.4' } },
|
||||
{ type: 'dispose', time: '09:32:18', title: '余量处置', desc: '本餐次共处置余量 <strong>12.9kg</strong>,操作人 <strong>李四</strong>', tags: [{ cls: 'mh-tl-tag--purple', text: '处置完成' }, { cls: 'mh-tl-tag--green', text: '交叉核对正常' }], dispose: { total: 12.9, operator: '李四', methods: [{ key: 'welfare', label: '员工福利', amount: 5.2, count: 3 }, { key: 'donate', label: '捐赠', amount: 4.8, count: 2 }, { key: 'waste', label: '废弃', amount: 1.4, count: 2 }, { key: 'reprocess', label: '加工再利用', amount: 1.0, count: 1 }, { key: 'cabinet', label: '存入智能货柜', amount: 0.5, count: 1 }], records: [{ time: '09:33:10', dish: '油条', line: 'A', method: 'welfare', amount: 2.0, receiver: '员工 · 王建国', operator: '李四', note: '加班餐' }, { time: '09:34:05', dish: '鲜肉包', line: 'B', method: 'welfare', amount: 1.8, receiver: '员工 · 陈小红', operator: '李四', note: '值班餐' }, { time: '09:35:20', dish: '鸡蛋饼', line: 'A', method: 'welfare', amount: 1.4, receiver: '员工 · 赵大鹏', operator: '李四', note: '' }, { time: '09:36:45', dish: '小米粥', line: 'B', method: 'donate', amount: 3.0, receiver: '浐灞社区服务站', operator: '李四', note: '捐赠凭证已上传' }, { time: '09:37:30', dish: '馒头', line: 'B', method: 'donate', amount: 1.8, receiver: '浐灞社区服务站', operator: '李四', note: '' }, { time: '09:38:15', dish: '花卷', line: 'A', method: 'waste', amount: 0.9, receiver: '—', operator: '李四', reason: '临期食品', note: '' }, { time: '09:39:00', dish: '茶叶蛋', line: 'A', method: 'waste', amount: 0.5, receiver: '—', operator: '李四', reason: '破壳损耗', note: '' }, { time: '09:40:10', dish: '豆浆', line: 'A', method: 'reprocess', amount: 1.0, receiver: '后厨 · 孙师傅', operator: '李四', processing: '员工餐再利用', note: '' }, { time: '09:42:00', dish: '鸡蛋饼', line: 'A', method: 'cabinet', amount: 0.5, cabinetId: 'SCG-01-03', operator: '李四', note: '保鲜盒存储' }] } }
|
||||
],
|
||||
footer: { totalOrders: 142, totalRevenue: 1820.00, avgPer: 12.82, surplus: '12.4 kg' }
|
||||
},
|
||||
@@ -1788,8 +1791,8 @@
|
||||
nodes: [
|
||||
{ type: 'start', time: '17:00:00', title: '开餐', desc: '操作人 <strong>张三 · CS001</strong> 开启<strong>晚餐</strong>餐次,涉及 <strong>24 道菜</strong>', tags: [{ cls: 'mh-tl-tag--green', text: '24 道菜' }], detail: { firstOrder: { time: '17:21:50', line: 'C', customer: '陈*芳', amount: 8.50 }, dishes: [{ name: '宫保鸡丁', line: 'A', serveTime: '17:00:30', maker: '王师傅', operator: '张三', planned: 7.0, sold: 6.3 }, { name: '鱼香肉丝', line: 'A', serveTime: '17:00:45', maker: '王师傅', operator: '张三', planned: 6.5, sold: 5.7 }, { name: '番茄炒蛋', line: 'B', serveTime: '17:00:20', maker: '李师傅', operator: '张三', planned: 6.0, sold: 5.0 }, { name: '白米饭', line: 'A', serveTime: '17:00:10', maker: '赵师傅', operator: '张三', planned: 12.0, sold: 10.5 }, { name: '红烧肉', line: 'A', serveTime: '17:01:00', maker: '王师傅', operator: '张三', planned: 5.5, sold: 4.8 }, { name: '牛肉面', line: 'C', serveTime: '17:00:50', maker: '陈师傅', operator: '张三', planned: 8.0, sold: 6.5 }, { name: '酸辣粉', line: 'C', serveTime: '17:01:10', maker: '陈师傅', operator: '张三', planned: 5.0, sold: 4.2 }, { name: '蛋炒饭', line: 'C', serveTime: '17:00:35', maker: '陈师傅', operator: '张三', planned: 4.5, sold: 3.8 }, { name: '清炒西兰花', line: 'B', serveTime: '17:01:20', maker: '李师傅', operator: '张三', planned: 4.0, sold: 3.2 }, { name: '麻婆豆腐', line: 'B', serveTime: '17:01:30', maker: '李师傅', operator: '张三', planned: 4.0, sold: 3.5 }] } },
|
||||
{ type: 'add', time: '18:15:22', title: '补餐 · 牛肉面', desc: '<strong>牛肉面</strong> 余量降至 0.5kg(预警阈值),后厨补做 <strong>2.5kg</strong>', tags: [{ cls: 'mh-tl-tag--gold', text: '自动预警' }, { cls: 'mh-tl-tag--green', text: '已通知后厨' }], supply: { dish: '牛肉面', line: 'C', dishEmoji: '🍜', triggerLeftover: 0.5, addAmount: 2.5, reason: '自动预警', operator: '张三', status: '已补做' } },
|
||||
{ type: 'close', time: '19:30:00', title: '闭餐', desc: '停止取餐', tags: [{ cls: 'mh-tl-tag--gray', text: '全部闭餐' }], closeDetail: { lines: [{ line: 'A', name: 'A 区中餐线', closeTime: '19:30:00', orders: 58, revenue: 1340.00, avgPer: 23.10 }, { line: 'B', name: 'B 区中餐线', closeTime: '19:30:00', orders: 49, revenue: 1150.00, avgPer: 23.47 }, { line: 'C', name: 'C 区快餐线', closeTime: '19:30:00', orders: 61, revenue: 1360.00, avgPer: 22.30 }] } },
|
||||
{ type: 'dispose', time: '20:25:10', title: '余量处置完成', desc: '本餐次共处置余量 <strong>22.6kg</strong>,操作人 <strong>张三</strong>', tags: [{ cls: 'mh-tl-tag--purple', text: '处置完成' }, { cls: 'mh-tl-tag--red', text: '损耗超标 5.1kg' }], dispose: { total: 22.6, operator: '张三', methods: [{ key: 'welfare', label: '员工福利', amount: 8.0, count: 4 }, { key: 'donate', label: '捐赠', amount: 6.5, count: 3 }, { key: 'waste', label: '废弃', amount: 5.1, count: 4 }, { key: 'reprocess', label: '加工再利用', amount: 3.0, count: 2 }], records: [{ time: '20:26:10', dish: '宫保鸡丁', line: 'A', method: 'welfare', amount: 2.5, receiver: '员工 · 王建国', operator: '张三', note: '加班餐' }, { time: '20:27:00', dish: '鱼香肉丝', line: 'A', method: 'welfare', amount: 2.0, receiver: '员工 · 李小红', operator: '张三', note: '' }, { time: '20:27:50', dish: '白米饭', line: 'A', method: 'welfare', amount: 2.0, receiver: '员工 · 赵大鹏', operator: '张三', note: '' }, { time: '20:28:40', dish: '清炒西兰花', line: 'B', method: 'donate', amount: 2.5, receiver: '浐灞社区服务站', operator: '李四', note: '捐赠凭证已上传' }, { time: '20:29:15', dish: '番茄炒蛋', line: 'B', method: 'donate', amount: 2.2, receiver: '浐灞社区服务站', operator: '李四', note: '' }, { time: '20:29:50', dish: '麻婆豆腐', line: 'B', method: 'donate', amount: 1.8, receiver: '爱心食堂', operator: '李四', note: '' }, { time: '20:30:05', dish: '酸辣粉', line: 'C', method: 'waste', amount: 2.1, receiver: '—', operator: '张三', note: '临期食品' }, { time: '20:30:40', dish: '蛋炒饭', line: 'C', method: 'waste', amount: 1.5, receiver: '—', operator: '张三', note: '' }, { time: '20:31:10', dish: '红烧肉', line: 'A', method: 'waste', amount: 0.8, receiver: '—', operator: '张三', note: '过夜损耗' }, { time: '20:31:45', dish: '牛肉面', line: 'C', method: 'waste', amount: 0.7, receiver: '—', operator: '张三', note: '' }, { time: '20:32:30', dish: '番茄炒蛋', line: 'B', method: 'reprocess', amount: 1.5, receiver: '后厨 · 李师傅', operator: '李四', note: '次日员工餐' }, { time: '20:33:10', dish: '白米饭', line: 'A', method: 'reprocess', amount: 1.5, receiver: '后厨 · 赵师傅', operator: '张三', note: '员工餐再利用' }, { time: '20:34:00', dish: '鱼香肉丝', line: 'A', method: 'welfare', amount: 1.5, receiver: '员工 · 张伟', operator: '张三', note: '' }] } }
|
||||
{ type: 'close', time: '19:30:00', title: '收餐', desc: '全部餐线收餐完成,进入余量处置流程', tags: [{ cls: 'mh-tl-tag--gray', text: '全部收餐' }], closeDetail: { operator: '张三', closeTime: '19:30:00', method: 'surplus_dispose', methodLabel: '余量处置', orders: 168, revenue: 3850.00, avgPer: 22.92, surplus: '22.6' } },
|
||||
{ type: 'dispose', time: '20:25:10', title: '余量处置', desc: '本餐次共处置余量 <strong>24.1kg</strong>,操作人 <strong>张三</strong>', tags: [{ cls: 'mh-tl-tag--purple', text: '处置完成' }], dispose: { total: 24.1, operator: '张三', methods: [{ key: 'welfare', label: '员工福利', amount: 8.0, count: 4 }, { key: 'donate', label: '捐赠', amount: 6.5, count: 3 }, { key: 'waste', label: '废弃', amount: 5.1, count: 4 }, { key: 'reprocess', label: '加工再利用', amount: 3.0, count: 2 }, { key: 'cabinet', label: '存入智能货柜', amount: 1.5, count: 2 }], records: [{ time: '20:26:10', dish: '宫保鸡丁', line: 'A', method: 'welfare', amount: 2.5, receiver: '员工 · 王建国', operator: '张三', note: '加班餐' }, { time: '20:27:00', dish: '鱼香肉丝', line: 'A', method: 'welfare', amount: 2.0, receiver: '员工 · 李小红', operator: '张三', note: '' }, { time: '20:27:50', dish: '白米饭', line: 'A', method: 'welfare', amount: 2.0, receiver: '员工 · 赵大鹏', operator: '张三', note: '' }, { time: '20:28:40', dish: '清炒西兰花', line: 'B', method: 'donate', amount: 2.5, receiver: '浐灞社区服务站', operator: '李四', note: '捐赠凭证已上传' }, { time: '20:29:15', dish: '番茄炒蛋', line: 'B', method: 'donate', amount: 2.2, receiver: '浐灞社区服务站', operator: '李四', note: '' }, { time: '20:29:50', dish: '麻婆豆腐', line: 'B', method: 'donate', amount: 1.8, receiver: '爱心食堂', operator: '李四', note: '' }, { time: '20:30:05', dish: '酸辣粉', line: 'C', method: 'waste', amount: 2.1, receiver: '—', operator: '张三', reason: '临期食品', note: '' }, { time: '20:30:40', dish: '蛋炒饭', line: 'C', method: 'waste', amount: 1.5, receiver: '—', operator: '张三', reason: '剩余变质', note: '' }, { time: '20:31:10', dish: '红烧肉', line: 'A', method: 'waste', amount: 0.8, receiver: '—', operator: '张三', reason: '过夜损耗', note: '' }, { time: '20:31:45', dish: '牛肉面', line: 'C', method: 'waste', amount: 0.7, receiver: '—', operator: '张三', reason: '剩余变质', note: '' }, { time: '20:32:30', dish: '番茄炒蛋', line: 'B', method: 'reprocess', amount: 1.5, receiver: '后厨 · 李师傅', operator: '李四', processing: '次日员工餐', note: '' }, { time: '20:33:10', dish: '白米饭', line: 'A', method: 'reprocess', amount: 1.5, receiver: '后厨 · 赵师傅', operator: '张三', processing: '员工餐再利用', note: '' }, { time: '20:34:00', dish: '鱼香肉丝', line: 'A', method: 'welfare', amount: 1.5, receiver: '员工 · 张伟', operator: '张三', note: '' }, { time: '20:35:00', dish: '宫保鸡丁', line: 'A', method: 'cabinet', amount: 1.0, cabinetId: 'SCG-02-05', operator: '张三', note: '次日复热' }, { time: '20:35:40', dish: '鱼香肉丝', line: 'A', method: 'cabinet', amount: 0.5, cabinetId: 'SCG-02-06', operator: '张三', note: '' }] } }
|
||||
],
|
||||
footer: { totalOrders: 168, totalRevenue: 3850.00, avgPer: 22.92, surplus: '22.6 kg' }
|
||||
},
|
||||
@@ -1800,7 +1803,8 @@
|
||||
timeRange: '11:00:00 - 14:05:20', endTime: '14:05:20',
|
||||
nodes: [
|
||||
{ type: 'start', time: '11:00:00', title: '开餐', desc: '操作人 <strong>李四 · CS002</strong> 开启<strong>午餐</strong>餐次,涉及 <strong>28 道菜</strong>', tags: [{ cls: 'mh-tl-tag--green', text: '28 道菜' }], detail: { firstOrder: { time: '11:25:10', line: 'A', customer: '刘*华', amount: 32.50 }, dishes: [{ name: '宫保鸡丁', line: 'A', serveTime: '11:00:30', maker: '王师傅', operator: '李四', planned: 8.0, sold: 7.5 }, { name: '糖醋排骨', line: 'A', serveTime: '11:00:50', maker: '王师傅', operator: '李四', planned: 6.0, sold: 5.2 }, { name: '红烧狮子头', line: 'B', serveTime: '11:01:10', maker: '李师傅', operator: '李四', planned: 5.0, sold: 4.3 }, { name: '番茄炒蛋', line: 'B', serveTime: '11:00:40', maker: '李师傅', operator: '李四', planned: 7.0, sold: 6.0 }, { name: '白米饭', line: 'A', serveTime: '11:00:15', maker: '赵师傅', operator: '李四', planned: 14.0, sold: 12.0 }, { name: '葱爆羊肉', line: 'C', serveTime: '11:01:25', maker: '陈师傅', operator: '李四', planned: 4.5, sold: 3.8 }, { name: '蚝油生菜', line: 'C', serveTime: '11:01:40', maker: '陈师傅', operator: '李四', planned: 3.5, sold: 2.9 }, { name: '辣子鸡', line: 'C', serveTime: '11:02:00', maker: '陈师傅', operator: '李四', planned: 5.0, sold: 4.1 }, { name: '麻婆豆腐', line: 'B', serveTime: '11:01:55', maker: '李师傅', operator: '李四', planned: 4.0, sold: 3.4 }, { name: '紫菜蛋花汤', line: 'A', serveTime: '11:00:20', maker: '王师傅', operator: '李四', planned: 8.0, sold: 7.0 }] } },
|
||||
{ type: 'dispose', time: '14:28:42', title: '余量处置完成', desc: '本餐次共处置余量 <strong>28.6kg</strong>,操作人 <strong>李四</strong>', tags: [{ cls: 'mh-tl-tag--purple', text: '处置完成' }, { cls: 'mh-tl-tag--green', text: '交叉核对正常' }], dispose: { total: 28.6, operator: '李四', methods: [{ key: 'welfare', label: '员工福利', amount: 10.0, count: 5 }, { key: 'donate', label: '捐赠', amount: 8.5, count: 3 }, { key: 'waste', label: '废弃', amount: 6.6, count: 4 }, { key: 'reprocess', label: '加工再利用', amount: 3.5, count: 2 }], records: [{ time: '14:29:10', dish: '宫保鸡丁', line: 'A', method: 'welfare', amount: 3.0, receiver: '员工 · 王建国', operator: '李四', note: '加班餐' }, { time: '14:29:50', dish: '糖醋排骨', line: 'A', method: 'welfare', amount: 2.5, receiver: '员工 · 陈小红', operator: '李四', note: '' }, { time: '14:30:30', dish: '番茄炒蛋', line: 'B', method: 'welfare', amount: 2.0, receiver: '员工 · 赵大鹏', operator: '李四', note: '' }, { time: '14:31:10', dish: '白米饭', line: 'A', method: 'welfare', amount: 1.5, receiver: '员工 · 张伟', operator: '李四', note: '' }, { time: '14:32:00', dish: '麻婆豆腐', line: 'B', method: 'welfare', amount: 1.0, receiver: '员工 · 刘洋', operator: '李四', note: '' }, { time: '14:33:20', dish: '红烧狮子头', line: 'B', method: 'donate', amount: 3.5, receiver: '浐灞社区服务站', operator: '李四', note: '捐赠凭证已上传' }, { time: '14:34:00', dish: '辣子鸡', line: 'C', method: 'donate', amount: 3.0, receiver: '爱心食堂', operator: '李四', note: '' }, { time: '14:34:40', dish: '蚝油生菜', line: 'C', method: 'donate', amount: 2.0, receiver: '爱心食堂', operator: '李四', note: '' }, { time: '14:35:30', dish: '葱爆羊肉', line: 'C', method: 'waste', amount: 2.5, receiver: '—', operator: '李四', note: '临期食品' }, { time: '14:36:10', dish: '紫菜蛋花汤', line: 'A', method: 'waste', amount: 2.1, receiver: '—', operator: '李四', note: '' }, { time: '14:36:50', dish: '白米饭', line: 'A', method: 'waste', amount: 1.2, receiver: '—', operator: '李四', note: '' }, { time: '14:37:30', dish: '番茄炒蛋', line: 'B', method: 'waste', amount: 0.8, receiver: '—', operator: '李四', note: '' }, { time: '14:38:20', dish: '白米饭', line: 'A', method: 'reprocess', amount: 2.0, receiver: '后厨 · 赵师傅', operator: '李四', note: '员工餐' }, { time: '14:39:00', dish: '宫保鸡丁', line: 'A', method: 'reprocess', amount: 1.5, receiver: '后厨 · 王师傅', operator: '李四', note: '' }] } }
|
||||
{ type: 'close', time: '14:05:20', title: '收餐', desc: '全部餐线收餐完成,进入余量处置流程', tags: [{ cls: 'mh-tl-tag--gray', text: '全部收餐' }], closeDetail: { operator: '李四', closeTime: '14:05:20', method: 'surplus_dispose', methodLabel: '余量处置', orders: 132, revenue: 3050.00, avgPer: 23.10, surplus: '28.6' } },
|
||||
{ type: 'dispose', time: '14:28:42', title: '余量处置', desc: '本餐次共处置余量 <strong>30.6kg</strong>,操作人 <strong>李四</strong>', tags: [{ cls: 'mh-tl-tag--purple', text: '处置完成' }, { cls: 'mh-tl-tag--green', text: '交叉核对正常' }], dispose: { total: 30.6, operator: '李四', methods: [{ key: 'welfare', label: '员工福利', amount: 10.0, count: 5 }, { key: 'donate', label: '捐赠', amount: 8.5, count: 3 }, { key: 'waste', label: '废弃', amount: 6.6, count: 4 }, { key: 'reprocess', label: '加工再利用', amount: 3.5, count: 2 }, { key: 'cabinet', label: '存入智能货柜', amount: 2.0, count: 2 }], records: [{ time: '14:29:10', dish: '宫保鸡丁', line: 'A', method: 'welfare', amount: 3.0, receiver: '员工 · 王建国', operator: '李四', note: '加班餐' }, { time: '14:29:50', dish: '糖醋排骨', line: 'A', method: 'welfare', amount: 2.5, receiver: '员工 · 陈小红', operator: '李四', note: '' }, { time: '14:30:30', dish: '番茄炒蛋', line: 'B', method: 'welfare', amount: 2.0, receiver: '员工 · 赵大鹏', operator: '李四', note: '' }, { time: '14:31:10', dish: '白米饭', line: 'A', method: 'welfare', amount: 1.5, receiver: '员工 · 张伟', operator: '李四', note: '' }, { time: '14:32:00', dish: '麻婆豆腐', line: 'B', method: 'welfare', amount: 1.0, receiver: '员工 · 刘洋', operator: '李四', note: '' }, { time: '14:33:20', dish: '红烧狮子头', line: 'B', method: 'donate', amount: 3.5, receiver: '浐灞社区服务站', operator: '李四', note: '捐赠凭证已上传' }, { time: '14:34:00', dish: '辣子鸡', line: 'C', method: 'donate', amount: 3.0, receiver: '爱心食堂', operator: '李四', note: '' }, { time: '14:34:40', dish: '蚝油生菜', line: 'C', method: 'donate', amount: 2.0, receiver: '爱心食堂', operator: '李四', note: '' }, { time: '14:35:30', dish: '葱爆羊肉', line: 'C', method: 'waste', amount: 2.5, receiver: '—', operator: '李四', reason: '临期食品', note: '' }, { time: '14:36:10', dish: '紫菜蛋花汤', line: 'A', method: 'waste', amount: 2.1, receiver: '—', operator: '李四', reason: '剩余变质', note: '' }, { time: '14:36:50', dish: '白米饭', line: 'A', method: 'waste', amount: 1.2, receiver: '—', operator: '李四', reason: '剩余变质', note: '' }, { time: '14:37:30', dish: '番茄炒蛋', line: 'B', method: 'waste', amount: 0.8, receiver: '—', operator: '李四', reason: '外观不佳', note: '' }, { time: '14:38:20', dish: '白米饭', line: 'A', method: 'reprocess', amount: 2.0, receiver: '后厨 · 赵师傅', operator: '李四', processing: '员工餐', note: '' }, { time: '14:39:00', dish: '宫保鸡丁', line: 'A', method: 'reprocess', amount: 1.5, receiver: '后厨 · 王师傅', operator: '李四', processing: '员工餐再利用', note: '' }, { time: '14:40:00', dish: '紫菜蛋花汤', line: 'A', method: 'cabinet', amount: 1.2, cabinetId: 'SCG-01-08', operator: '李四', note: '冷藏保存' }, { time: '14:40:30', dish: '麻婆豆腐', line: 'B', method: 'cabinet', amount: 0.8, cabinetId: 'SCG-01-09', operator: '李四', note: '' }] } }
|
||||
],
|
||||
footer: { totalOrders: 132, totalRevenue: 3050.00, avgPer: 23.10, surplus: '28.6 kg' }
|
||||
},
|
||||
@@ -1811,7 +1815,8 @@
|
||||
timeRange: '06:30:00 - 09:18:00', endTime: '09:18:00',
|
||||
nodes: [
|
||||
{ type: 'start', time: '06:30:00', title: '开餐', desc: '操作人 <strong>王五 · CS003</strong> 开启<strong>早餐</strong>餐次,涉及 <strong>12 道菜</strong>', tags: [{ cls: 'mh-tl-tag--green', text: '12 道菜' }], detail: { dishes: [{ name: '豆浆', line: 'A', serveTime: '06:30:10', maker: '孙师傅', operator: '王五', planned: 6.0, sold: 5.2 }, { name: '油条', line: 'A', serveTime: '06:30:25', maker: '孙师傅', operator: '王五', planned: 4.0, sold: 3.5 }, { name: '鲜肉包', line: 'B', serveTime: '06:30:05', maker: '周师傅', operator: '王五', planned: 5.0, sold: 4.2 }, { name: '鸡蛋饼', line: 'A', serveTime: '06:30:40', maker: '孙师傅', operator: '王五', planned: 3.5, sold: 2.8 }, { name: '小米粥', line: 'B', serveTime: '06:30:15', maker: '周师傅', operator: '王五', planned: 5.0, sold: 4.5 }, { name: '馒头', line: 'B', serveTime: '06:30:30', maker: '周师傅', operator: '王五', planned: 4.0, sold: 3.3 }, { name: '花卷', line: 'A', serveTime: '06:30:50', maker: '孙师傅', operator: '王五', planned: 3.0, sold: 2.4 }, { name: '茶叶蛋', line: 'A', serveTime: '06:30:08', maker: '孙师傅', operator: '王五', planned: 3.5, sold: 2.9 }] } },
|
||||
{ type: 'dispose', time: '09:35:24', title: '余量处置完成', desc: '本餐次共处置余量 <strong>8.4kg</strong>,操作人 <strong>王五</strong>', tags: [{ cls: 'mh-tl-tag--purple', text: '处置完成' }], dispose: { total: 8.4, operator: '王五', methods: [{ key: 'welfare', label: '员工福利', amount: 4.0, count: 2 }, { key: 'donate', label: '捐赠', amount: 2.4, count: 2 }, { key: 'waste', label: '废弃', amount: 1.0, count: 2 }, { key: 'reprocess', label: '加工再利用', amount: 1.0, count: 1 }], records: [{ time: '09:36:10', dish: '豆浆', line: 'A', method: 'welfare', amount: 2.5, receiver: '员工 · 王建国', operator: '王五', note: '加班餐' }, { time: '09:37:00', dish: '鲜肉包', line: 'B', method: 'welfare', amount: 1.5, receiver: '员工 · 陈小红', operator: '王五', note: '' }, { time: '09:38:20', dish: '小米粥', line: 'B', method: 'donate', amount: 1.5, receiver: '浐灞社区服务站', operator: '王五', note: '捐赠凭证已上传' }, { time: '09:39:00', dish: '馒头', line: 'B', method: 'donate', amount: 0.9, receiver: '浐灞社区服务站', operator: '王五', note: '' }, { time: '09:40:10', dish: '油条', line: 'A', method: 'waste', amount: 0.6, receiver: '—', operator: '王五', note: '临期' }, { time: '09:40:50', dish: '花卷', line: 'A', method: 'waste', amount: 0.4, receiver: '—', operator: '王五', note: '' }, { time: '09:41:30', dish: '鸡蛋饼', line: 'A', method: 'reprocess', amount: 1.0, receiver: '后厨 · 孙师傅', operator: '王五', note: '员工餐' }] } }
|
||||
{ type: 'close', time: '09:18:00', title: '收餐', desc: '全部餐线收餐完成,进入员工餐时段', tags: [{ cls: 'mh-tl-tag--gray', text: '全部收餐' }], closeDetail: { operator: '王五', closeTime: '09:18:00', method: 'staff_meal', methodLabel: '进入员工餐时段', orders: 98, revenue: 1250.00, avgPer: 12.76, surplus: '8.4' } },
|
||||
{ type: 'dispose', time: '09:35:24', title: '余量处置', desc: '本餐次共处置余量 <strong>9.0kg</strong>,操作人 <strong>王五</strong>', tags: [{ cls: 'mh-tl-tag--purple', text: '处置完成' }], dispose: { total: 9.0, operator: '王五', methods: [{ key: 'welfare', label: '员工福利', amount: 4.0, count: 2 }, { key: 'donate', label: '捐赠', amount: 2.4, count: 2 }, { key: 'waste', label: '废弃', amount: 1.0, count: 2 }, { key: 'reprocess', label: '加工再利用', amount: 1.0, count: 1 }, { key: 'cabinet', label: '存入智能货柜', amount: 0.6, count: 1 }], records: [{ time: '09:36:10', dish: '豆浆', line: 'A', method: 'welfare', amount: 2.5, receiver: '员工 · 王建国', operator: '王五', note: '加班餐' }, { time: '09:37:00', dish: '鲜肉包', line: 'B', method: 'welfare', amount: 1.5, receiver: '员工 · 陈小红', operator: '王五', note: '' }, { time: '09:38:20', dish: '小米粥', line: 'B', method: 'donate', amount: 1.5, receiver: '浐灞社区服务站', operator: '王五', note: '捐赠凭证已上传' }, { time: '09:39:00', dish: '馒头', line: 'B', method: 'donate', amount: 0.9, receiver: '浐灞社区服务站', operator: '王五', note: '' }, { time: '09:40:10', dish: '油条', line: 'A', method: 'waste', amount: 0.6, receiver: '—', operator: '王五', reason: '临期', note: '' }, { time: '09:40:50', dish: '花卷', line: 'A', method: 'waste', amount: 0.4, receiver: '—', operator: '王五', reason: '剩余变质', note: '' }, { time: '09:41:30', dish: '鸡蛋饼', line: 'A', method: 'reprocess', amount: 1.0, receiver: '后厨 · 孙师傅', operator: '王五', processing: '员工餐', note: '' }, { time: '09:42:00', dish: '豆浆', line: 'A', method: 'cabinet', amount: 0.6, cabinetId: 'SCG-01-02', operator: '王五', note: '保鲜存储' }] } }
|
||||
],
|
||||
footer: { totalOrders: 98, totalRevenue: 1250.00, avgPer: 12.76, surplus: '8.4 kg' }
|
||||
}
|
||||
@@ -1820,7 +1825,7 @@
|
||||
var mhCurrentMealId = null;
|
||||
var mhCurrentView = 'timeline';
|
||||
var mhViewNodeType = null;
|
||||
var mhDisposeFilter = 'all';
|
||||
var mhDisposeFilter = 'welfare';
|
||||
|
||||
function mhRenderMealList(filterDate) {
|
||||
var groups = {};
|
||||
@@ -1881,7 +1886,7 @@
|
||||
mhCurrentMealId = mealId;
|
||||
mhCurrentView = 'timeline';
|
||||
mhViewNodeType = null;
|
||||
mhDisposeFilter = 'all';
|
||||
mhDisposeFilter = 'welfare';
|
||||
document.querySelectorAll('.mh-meal-item').forEach(function (el) {
|
||||
el.classList.toggle('is-active', el.getAttribute('data-id') === mealId);
|
||||
});
|
||||
@@ -1904,7 +1909,6 @@
|
||||
+ '<span class="mh-detail-header__pill ' + pillCls + '">' + meal.statusLabel + '</span>'
|
||||
+ '<div class="mh-detail-header__spacer"></div>'
|
||||
+ '<div class="mh-detail-header__info">'
|
||||
+ ' <div class="mh-detail-header__info-item">操作人 <strong>' + meal.operator + '</strong></div>'
|
||||
+ ' <div class="mh-detail-header__info-item">餐厅 <strong>' + meal.restaurant + '</strong></div>'
|
||||
+ ' <div class="mh-detail-header__info-item">' + meal.timeRange + '</div>'
|
||||
+ '</div>';
|
||||
@@ -1922,7 +1926,7 @@
|
||||
|
||||
var html = '<div class="mh-timeline">';
|
||||
|
||||
// 固定四阶段:开餐 → 补餐 → 闭餐 → 余量处置
|
||||
// 固定四阶段:开餐 → 补餐 → 收餐 → 余量处置
|
||||
|
||||
// 1. 开餐
|
||||
if (startNode) {
|
||||
@@ -1941,27 +1945,19 @@
|
||||
html += mhBuildTlCard('add', lastAddTime, '补餐 · ' + addNodes.length + ' 次', addDesc, addTags, true, 'mhOpenNodeDetail(\'add\')');
|
||||
}
|
||||
|
||||
// 3. 闭餐(汇总视图)
|
||||
// 3. 收餐
|
||||
if (closeNodes.length > 0) {
|
||||
var lastCloseTime = closeNodes[closeNodes.length - 1].time;
|
||||
var closeDesc = '本餐次共 <strong>' + closeNodes.length + ' 次闭餐</strong>';
|
||||
var closeDesc = '本餐次共 <strong>' + closeNodes.length + ' 次收餐</strong>';
|
||||
var closeTags = [
|
||||
{ cls: 'mh-tl-tag--gray', text: closeNodes.length + ' 次闭餐' }
|
||||
{ cls: 'mh-tl-tag--gray', text: closeNodes.length + ' 次收餐' }
|
||||
];
|
||||
html += mhBuildTlCard('close', lastCloseTime, '闭餐 · ' + closeNodes.length + ' 次', closeDesc, closeTags, true, 'mhOpenNodeDetail(\'close\')');
|
||||
html += mhBuildTlCard('close', lastCloseTime, '收餐 · ' + closeNodes.length + ' 次', closeDesc, closeTags, true, 'mhOpenNodeDetail(\'close\')');
|
||||
}
|
||||
|
||||
// 4. 余量处置
|
||||
if (disposeNode) {
|
||||
var disposeCompactHtml = '';
|
||||
if (disposeNode.dispose && disposeNode.dispose.methods) {
|
||||
var items = disposeNode.dispose.methods.map(function (d) {
|
||||
return '<div class="mh-dispose-compact__item"><span class="mh-dispose-compact__label">' + d.label + '</span>'
|
||||
+ '<span class="mh-dispose-compact__value">' + d.amount + ' kg</span></div>';
|
||||
}).join('');
|
||||
disposeCompactHtml = '<div class="mh-dispose-compact">' + items + '</div>';
|
||||
}
|
||||
html += mhBuildTlCard('dispose', disposeNode.time, disposeNode.title, disposeNode.desc, disposeNode.tags, true, 'mhOpenNodeDetail(\'dispose\')', disposeCompactHtml);
|
||||
html += mhBuildTlCard('dispose', disposeNode.time, disposeNode.title, disposeNode.desc, disposeNode.tags, true, 'mhOpenNodeDetail(\'dispose\')');
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
@@ -2014,7 +2010,7 @@
|
||||
if (!meal) return;
|
||||
mhViewNodeType = nodeType;
|
||||
mhCurrentView = 'detail';
|
||||
mhDisposeFilter = 'all';
|
||||
mhDisposeFilter = 'welfare';
|
||||
var typeInfo = MH_NODE_TYPES[nodeType] || MH_NODE_TYPES.start;
|
||||
var subhead = document.getElementById('mhDetailSubhead');
|
||||
subhead.classList.add('mh-detail-subhead--show');
|
||||
@@ -2032,7 +2028,7 @@
|
||||
document.getElementById('mhSubheadTime').textContent = addNodes.length > 0 ? addNodes[addNodes.length - 1].time : '';
|
||||
} else if (nodeType === 'close') {
|
||||
var clNodes = meal.nodes.filter(function(n) { return n.type === 'close'; });
|
||||
document.getElementById('mhSubheadTitle').textContent = '闭餐 · ' + clNodes.length + ' 次';
|
||||
document.getElementById('mhSubheadTitle').textContent = '收餐';
|
||||
document.getElementById('mhSubheadTime').textContent = clNodes.length > 0 ? clNodes[clNodes.length - 1].time : '';
|
||||
} else if (nodeType === 'dispose') {
|
||||
var dn = meal.nodes.find(function(n) { return n.type === 'dispose'; });
|
||||
@@ -2057,7 +2053,7 @@
|
||||
var meal = mhGetMeal();
|
||||
if (!meal) return;
|
||||
mhCurrentView = 'timeline';
|
||||
mhDisposeFilter = 'all';
|
||||
mhDisposeFilter = 'welfare';
|
||||
document.getElementById('mhDetailSubhead').classList.remove('mh-detail-subhead--show');
|
||||
mhRenderTimeline(meal);
|
||||
document.querySelector('.mh-timeline-wrap').scrollTop = 0;
|
||||
@@ -2068,30 +2064,39 @@
|
||||
if (!node) return '<div style="padding:20px;color:rgba(255,255,255,0.5)">暂无开餐数据</div>';
|
||||
var d = node.detail || {};
|
||||
var dishes = d.dishes || [];
|
||||
var fo = d.firstOrder;
|
||||
// 收集本餐次所有补餐量,按菜品名分组(用于反推初始上餐量)
|
||||
var supplyMap = {};
|
||||
meal.nodes.forEach(function (n) {
|
||||
if (n.type === 'add' && n.supply) {
|
||||
var dn = n.supply.dish;
|
||||
supplyMap[dn] = (supplyMap[dn] || 0) + n.supply.addAmount;
|
||||
}
|
||||
});
|
||||
// 计算总制作量(累计上餐量之和)
|
||||
var totalMade = 0;
|
||||
dishes.forEach(function (it) { totalMade += (it.planned || 0); });
|
||||
var html = '<div class="mh-detail-summary">';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">开餐时间</span><span class="mh-ds-card__value">' + node.time + '</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">菜品数</span><span class="mh-ds-card__value mh-ds-card__value--green">' + dishes.length + ' 道</span></div>';
|
||||
if (fo) {
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">首单 · ' + fo.time + '</span>'
|
||||
+ '<span class="mh-ds-card__value mh-ds-card__value--gold">¥' + fo.amount.toFixed(2)
|
||||
+ ' <span style="font-size:10px;font-weight:400;color:rgba(255,255,255,0.5)">' + fo.customer + '</span></span></div>';
|
||||
} else {
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">首单</span><span class="mh-ds-card__value" style="color:rgba(255,255,255,0.35)">—</span></div>';
|
||||
}
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">总制作量</span><span class="mh-ds-card__value mh-ds-card__value--gold">' + totalMade.toFixed(1) + ' kg</span></div>';
|
||||
html += '</div>';
|
||||
html += '<div class="mh-detail-table-wrap"><table class="mh-detail-table">';
|
||||
html += '<colgroup><col style="width:18%"><col style="width:15%"><col style="width:12%"><col style="width:13%"><col style="width:21%"><col style="width:21%"></colgroup>';
|
||||
html += '<thead><tr><th>菜品</th><th>上餐时间</th><th>制作人</th><th>操作人</th><th class="mh-col-num">计划量 (kg)</th><th class="mh-col-num">已售 (kg)</th></tr></thead>';
|
||||
html += '<colgroup><col style="width:16%"><col style="width:14%"><col style="width:11%"><col style="width:11%"><col style="width:16%"><col style="width:16%"><col style="width:16%"></colgroup>';
|
||||
html += '<thead><tr><th>菜品</th><th>上餐时间</th><th>制作人</th><th>操作人</th><th class="mh-col-num">初始上餐量 (kg)</th><th class="mh-col-num">累计上餐量 (kg)</th><th class="mh-col-num">已售 (kg)</th></tr></thead>';
|
||||
html += '<tbody>';
|
||||
dishes.forEach(function (d) {
|
||||
// 累计上餐量=planned;初始上餐量=planned − 该菜品补餐总量
|
||||
var accumulated = d.planned || 0;
|
||||
var addAmount = supplyMap[d.name] || 0;
|
||||
var initial = +(accumulated - addAmount).toFixed(1);
|
||||
html += '<tr>'
|
||||
+ '<td>' + d.name + '</td>'
|
||||
+ '<td>' + d.serveTime + '</td>'
|
||||
+ '<td>' + d.maker + '</td>'
|
||||
+ '<td>' + d.operator + '</td>'
|
||||
+ '<td class="mh-col-num">' + d.planned.toFixed(1) + '</td>'
|
||||
+ '<td class="mh-col-num">' + d.sold.toFixed(1) + '</td>'
|
||||
+ '<td class="mh-col-num">' + initial.toFixed(1) + '</td>'
|
||||
+ '<td class="mh-col-num">' + accumulated.toFixed(1) + '</td>'
|
||||
+ '<td class="mh-col-num">' + (d.sold || 0).toFixed(1) + '</td>'
|
||||
+ '</tr>';
|
||||
});
|
||||
html += '</tbody></table></div>';
|
||||
@@ -2103,31 +2108,31 @@
|
||||
var supplies = [];
|
||||
addNodes.forEach(function (n) { if (n.supply) supplies.push(n.supply); });
|
||||
if (supplies.length === 0) return '<div style="padding:20px;color:rgba(255,255,255,0.5)">暂无补餐记录</div>';
|
||||
var totalAmount = 0, autoCount = 0, manualCount = 0;
|
||||
var totalAmount = 0;
|
||||
var dishSet = {};
|
||||
supplies.forEach(function (s) {
|
||||
totalAmount += s.addAmount;
|
||||
if (s.reason === '自动预警') autoCount++;
|
||||
else manualCount++;
|
||||
dishSet[s.dish] = (dishSet[s.dish] || 0) + 1;
|
||||
});
|
||||
var dishCount = Object.keys(dishSet).length;
|
||||
var html = '<div class="mh-detail-summary">';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">补餐次数</span><span class="mh-ds-card__value mh-ds-card__value--blue">' + supplies.length + ' 次</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">累计补做量</span><span class="mh-ds-card__value mh-ds-card__value--gold">' + totalAmount.toFixed(1) + ' kg</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">自动预警</span><span class="mh-ds-card__value mh-ds-card__value--green">' + autoCount + ' 次</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">手动通知</span><span class="mh-ds-card__value">' + manualCount + ' 次</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">补餐菜品数</span><span class="mh-ds-card__value mh-ds-card__value--blue">' + dishCount + ' 种</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">补餐次数</span><span class="mh-ds-card__value mh-ds-card__value--green">' + supplies.length + ' 次</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">补餐总量</span><span class="mh-ds-card__value mh-ds-card__value--gold">' + totalAmount.toFixed(1) + ' kg</span></div>';
|
||||
html += '</div>';
|
||||
html += '<div class="mh-detail-table-wrap"><table class="mh-detail-table">';
|
||||
html += '<colgroup><col style="width:14%"><col style="width:18%"><col style="width:16%" class="mh-col-num"><col style="width:14%" class="mh-col-num"><col style="width:13%"><col style="width:12%"><col style="width:13%"></colgroup>';
|
||||
html += '<thead><tr><th>时间</th><th>餐品</th><th class="mh-col-num">触发余量 (kg)</th><th class="mh-col-num">补做量 (kg)</th><th>原因</th><th>操作人</th><th>状态</th></tr></thead>';
|
||||
html += '<colgroup><col style="width:14%"><col style="width:18%"><col style="width:13%" class="mh-col-num"><col style="width:14%" class="mh-col-num"><col style="width:14%" class="mh-col-num"><col style="width:12%"><col style="width:15%"></colgroup>';
|
||||
html += '<thead><tr><th>补餐时间</th><th>餐品</th><th class="mh-col-num">补餐量 (kg)</th><th class="mh-col-num">补餐前余量 (kg)</th><th class="mh-col-num">补餐后余量 (kg)</th><th>操作人</th><th>状态</th></tr></thead>';
|
||||
html += '<tbody>';
|
||||
supplies.forEach(function (s, i) {
|
||||
var reasonCls = s.reason === '自动预警' ? 'mh-tl-tag--gold' : 'mh-tl-tag--gray';
|
||||
var statusCls = s.status === '已补做' ? 'mh-tl-tag--green' : 'mh-tl-tag--gold';
|
||||
var afterLeftover = +(s.triggerLeftover + s.addAmount).toFixed(1);
|
||||
html += '<tr>'
|
||||
+ '<td>' + (addNodes[i] ? addNodes[i].time : '—') + '</td>'
|
||||
+ '<td>' + (s.dishEmoji || '') + ' ' + s.dish + '</td>'
|
||||
+ '<td class="mh-col-num">' + s.triggerLeftover.toFixed(1) + '</td>'
|
||||
+ '<td class="mh-col-num">' + s.addAmount.toFixed(1) + '</td>'
|
||||
+ '<td><span class="mh-tl-tag ' + reasonCls + '">' + s.reason + '</span></td>'
|
||||
+ '<td class="mh-col-num">' + s.triggerLeftover.toFixed(1) + '</td>'
|
||||
+ '<td class="mh-col-num">' + afterLeftover.toFixed(1) + '</td>'
|
||||
+ '<td>' + s.operator + '</td>'
|
||||
+ '<td><span class="mh-tl-tag ' + statusCls + '">' + s.status + '</span></td>'
|
||||
+ '</tr>';
|
||||
@@ -2138,50 +2143,25 @@
|
||||
|
||||
function mhRenderCloseDetail(meal) {
|
||||
var closeNodes = meal.nodes.filter(function (n) { return n.type === 'close'; });
|
||||
if (closeNodes.length === 0) return '<div style="padding:20px;color:rgba(255,255,255,0.5)">暂无闭餐记录</div>';
|
||||
|
||||
// 汇总各闭餐事件的订单与营收
|
||||
var closeEvents = closeNodes.map(function (cn) {
|
||||
var orders = 0, revenue = 0;
|
||||
if (cn.closeDetail && cn.closeDetail.lines) {
|
||||
cn.closeDetail.lines.forEach(function (l) { orders += l.orders; revenue += l.revenue; });
|
||||
}
|
||||
return { time: cn.time, orders: orders, revenue: revenue, avgPer: orders > 0 ? (revenue / orders) : 0 };
|
||||
});
|
||||
|
||||
var totalOrders = 0, totalRevenue = 0;
|
||||
closeEvents.forEach(function (e) { totalOrders += e.orders; totalRevenue += e.revenue; });
|
||||
var overallAvg = totalOrders > 0 ? (totalRevenue / totalOrders) : 0;
|
||||
|
||||
var endInfo = meal.endTime
|
||||
? ('<span class="mh-ds-card__value" style="font-size:13px">' + meal.endTime + ' <span style="font-size:10px;font-weight:400;color:rgba(255,255,255,0.5)">· ' + meal.operator + '</span></span>')
|
||||
: '<span class="mh-ds-card__value mh-ds-card__value--gold">进行中</span>';
|
||||
|
||||
if (closeNodes.length === 0) return '<div style="padding:20px;color:rgba(255,255,255,0.5)">暂无收餐记录</div>';
|
||||
// 收餐是一次性动作,取最新一条作为收餐事件
|
||||
var last = closeNodes[closeNodes.length - 1];
|
||||
var cd = last.closeDetail || {};
|
||||
var methodLabel = cd.methodLabel || '—';
|
||||
var methodCls = cd.method === 'staff_meal' ? 'mh-tl-tag--blue' : 'mh-tl-tag--purple';
|
||||
// 第一组:收餐主信息(3 卡片)
|
||||
var html = '<div class="mh-detail-summary">';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">结束用餐</span>' + endInfo + '</div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">闭餐次数</span><span class="mh-ds-card__value mh-ds-card__value--blue">' + closeEvents.length + ' 次</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">总订单</span><span class="mh-ds-card__value">' + totalOrders + ' 单</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">总营收</span><span class="mh-ds-card__value mh-ds-card__value--green">¥' + totalRevenue.toFixed(2) + '</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">收餐时间</span><span class="mh-ds-card__value">' + (cd.closeTime || last.time) + '</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">收餐人</span><span class="mh-ds-card__value mh-ds-card__value--blue">' + (cd.operator || '—') + '</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">收餐方式</span><span class="mh-ds-card__value"><span class="mh-tl-tag ' + methodCls + '">' + methodLabel + '</span></span></div>';
|
||||
html += '</div>';
|
||||
// 第二组:截止收餐时主要统计数据(4 卡片)
|
||||
html += '<div class="mh-detail-summary" style="margin-top:10px">';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">截止收餐订单数</span><span class="mh-ds-card__value">' + (cd.orders || 0) + ' 单</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">截止收餐营收</span><span class="mh-ds-card__value mh-ds-card__value--green">¥' + (cd.revenue || 0).toFixed(2) + '</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">客单价</span><span class="mh-ds-card__value mh-ds-card__value--gold">¥' + (cd.avgPer || 0).toFixed(2) + '</span></div>';
|
||||
html += '<div class="mh-ds-card"><span class="mh-ds-card__label">截止收餐余量</span><span class="mh-ds-card__value">' + (cd.surplus || '—') + ' kg</span></div>';
|
||||
html += '</div>';
|
||||
html += '<div class="mh-detail-table-wrap"><table class="mh-detail-table">';
|
||||
html += '<colgroup><col style="width:30%"><col style="width:23%"><col style="width:23%"><col style="width:24%"></colgroup>';
|
||||
html += '<thead><tr><th>闭餐时间</th><th class="mh-col-num">订单数</th><th class="mh-col-num">营收</th><th class="mh-col-num">客单价</th></tr></thead>';
|
||||
html += '<tbody>';
|
||||
closeEvents.forEach(function (e) {
|
||||
html += '<tr>'
|
||||
+ '<td>' + e.time + '</td>'
|
||||
+ '<td class="mh-col-num">' + e.orders + '</td>'
|
||||
+ '<td class="mh-col-num">¥' + e.revenue.toFixed(2) + '</td>'
|
||||
+ '<td class="mh-col-num">¥' + e.avgPer.toFixed(2) + '</td>'
|
||||
+ '</tr>';
|
||||
});
|
||||
html += '<tr class="mh-detail-table__total">'
|
||||
+ '<td>合计 · ' + closeEvents.length + ' 次闭餐</td>'
|
||||
+ '<td class="mh-col-num">' + totalOrders + '</td>'
|
||||
+ '<td class="mh-col-num">¥' + totalRevenue.toFixed(2) + '</td>'
|
||||
+ '<td class="mh-col-num">¥' + overallAvg.toFixed(2) + '</td>'
|
||||
+ '</tr>';
|
||||
html += '</tbody></table></div>';
|
||||
return html;
|
||||
}
|
||||
|
||||
@@ -2191,6 +2171,7 @@
|
||||
var d = node.dispose;
|
||||
if (!d) return '<div style="padding:20px;color:rgba(255,255,255,0.5)">暂无处置记录</div>';
|
||||
var html = '';
|
||||
// 处置方式统计卡片(5种方式)
|
||||
html += '<div class="mh-dmethod-grid">';
|
||||
(d.methods || []).forEach(function (m) {
|
||||
var mInfo = MH_METHOD_MAP[m.key] || {};
|
||||
@@ -2206,41 +2187,131 @@
|
||||
+ '<span class="mh-dmethod-card__count">操作人 · ' + d.operator + '</span>'
|
||||
+ '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="mh-filter-tabs">';
|
||||
// 5 种方式过滤 Tab(无"全部",每种方式独立查看)
|
||||
var allRecords = d.records || [];
|
||||
var filters = [
|
||||
{ key: 'all', label: '全部 (' + (d.records || []).length + ')' },
|
||||
{ key: 'welfare', label: '员工福利' },
|
||||
{ key: 'donate', label: '捐赠' },
|
||||
{ key: 'waste', label: '废弃' },
|
||||
{ key: 'reprocess', label: '加工再利用' }
|
||||
{ key: 'welfare', label: '员工福利' },
|
||||
{ key: 'donate', label: '捐赠' },
|
||||
{ key: 'waste', label: '废弃' },
|
||||
{ key: 'reprocess', label: '加工再利用' },
|
||||
{ key: 'cabinet', label: '存入智能货柜' }
|
||||
];
|
||||
html += '<div class="mh-filter-tabs">';
|
||||
filters.forEach(function (f) {
|
||||
html += '<span class="mh-filter-tab' + (mhDisposeFilter === f.key ? ' is-active' : '') + '" onclick="mhSetDisposeFilter(\'' + f.key + '\')">' + f.label + '</span>';
|
||||
var count = allRecords.filter(function (r) { return r.method === f.key; }).length;
|
||||
html += '<span class="mh-filter-tab' + (mhDisposeFilter === f.key ? ' is-active' : '') + '" onclick="mhSetDisposeFilter(\'' + f.key + '\')">' + f.label + ' (' + count + ')</span>';
|
||||
});
|
||||
html += '</div>';
|
||||
var records = d.records || [];
|
||||
if (mhDisposeFilter !== 'all') records = records.filter(function (r) { return r.method === mhDisposeFilter; });
|
||||
html += '<div class="mh-detail-table-wrap"><table class="mh-detail-table">';
|
||||
html += '<colgroup><col style="width:13%"><col style="width:15%"><col style="width:13%"><col style="width:12%" class="mh-col-num"><col style="width:18%"><col style="width:11%"><col style="width:18%"></colgroup>';
|
||||
html += '<thead><tr><th>时间</th><th>餐品</th><th>处置方式</th><th class="mh-col-num">处置量 (kg)</th><th>接收方 · 领用人</th><th>操作人</th><th>备注</th></tr></thead>';
|
||||
html += '<tbody>';
|
||||
if (records.length === 0) {
|
||||
html += '<tr><td colspan="7" style="text-align:center;color:rgba(255,255,255,0.4);padding:20px">暂无该类型的处置记录</td></tr>';
|
||||
} else {
|
||||
records.forEach(function (r) {
|
||||
var mInfo = MH_METHOD_MAP[r.method] || {};
|
||||
html += '<tr>'
|
||||
+ '<td>' + r.time + '</td>'
|
||||
+ '<td>' + r.dish + '</td>'
|
||||
+ '<td><span class="mh-method-badge ' + (mInfo.cls || '') + '">' + (mInfo.label || r.method) + '</span></td>'
|
||||
+ '<td class="mh-col-num">' + r.amount.toFixed(1) + '</td>'
|
||||
+ '<td>' + r.receiver + '</td>'
|
||||
+ '<td>' + r.operator + '</td>'
|
||||
+ '<td>' + (r.note || '—') + '</td>'
|
||||
+ '</tr>';
|
||||
});
|
||||
// 当前方式的记录
|
||||
var records = allRecords.filter(function (r) { return r.method === mhDisposeFilter; });
|
||||
// 按方式渲染独立列结构
|
||||
if (mhDisposeFilter === 'welfare') {
|
||||
// 员工福利: 时间/餐品/处置量/领用人/操作人/备注
|
||||
html += '<div class="mh-detail-table-wrap"><table class="mh-detail-table">';
|
||||
html += '<colgroup><col style="width:13%"><col style="width:18%"><col style="width:12%" class="mh-col-num"><col style="width:20%"><col style="width:12%"><col style="width:25%"></colgroup>';
|
||||
html += '<thead><tr><th>时间</th><th>餐品</th><th class="mh-col-num">处置量 (kg)</th><th>领用人</th><th>操作人</th><th>备注</th></tr></thead>';
|
||||
html += '<tbody>';
|
||||
if (records.length === 0) {
|
||||
html += '<tr><td colspan="6" style="text-align:center;color:rgba(255,255,255,0.4);padding:20px">暂无员工福利处置记录</td></tr>';
|
||||
} else {
|
||||
records.forEach(function (r) {
|
||||
html += '<tr>'
|
||||
+ '<td>' + r.time + '</td>'
|
||||
+ '<td>' + r.dish + '</td>'
|
||||
+ '<td class="mh-col-num">' + r.amount.toFixed(1) + '</td>'
|
||||
+ '<td>' + (r.receiver || '—') + '</td>'
|
||||
+ '<td>' + r.operator + '</td>'
|
||||
+ '<td>' + (r.note || '—') + '</td>'
|
||||
+ '</tr>';
|
||||
});
|
||||
}
|
||||
html += '</tbody></table></div>';
|
||||
} else if (mhDisposeFilter === 'donate') {
|
||||
// 捐赠: 时间/餐品/处置量/接收机构/操作人/备注
|
||||
html += '<div class="mh-detail-table-wrap"><table class="mh-detail-table">';
|
||||
html += '<colgroup><col style="width:13%"><col style="width:18%"><col style="width:12%" class="mh-col-num"><col style="width:20%"><col style="width:12%"><col style="width:25%"></colgroup>';
|
||||
html += '<thead><tr><th>时间</th><th>餐品</th><th class="mh-col-num">处置量 (kg)</th><th>接收机构</th><th>操作人</th><th>备注</th></tr></thead>';
|
||||
html += '<tbody>';
|
||||
if (records.length === 0) {
|
||||
html += '<tr><td colspan="6" style="text-align:center;color:rgba(255,255,255,0.4);padding:20px">暂无捐赠处置记录</td></tr>';
|
||||
} else {
|
||||
records.forEach(function (r) {
|
||||
html += '<tr>'
|
||||
+ '<td>' + r.time + '</td>'
|
||||
+ '<td>' + r.dish + '</td>'
|
||||
+ '<td class="mh-col-num">' + r.amount.toFixed(1) + '</td>'
|
||||
+ '<td>' + (r.receiver || '—') + '</td>'
|
||||
+ '<td>' + r.operator + '</td>'
|
||||
+ '<td>' + (r.note || '—') + '</td>'
|
||||
+ '</tr>';
|
||||
});
|
||||
}
|
||||
html += '</tbody></table></div>';
|
||||
} else if (mhDisposeFilter === 'waste') {
|
||||
// 废弃: 时间/餐品/处置量/废弃原因/操作人/备注
|
||||
html += '<div class="mh-detail-table-wrap"><table class="mh-detail-table">';
|
||||
html += '<colgroup><col style="width:13%"><col style="width:18%"><col style="width:12%" class="mh-col-num"><col style="width:20%"><col style="width:12%"><col style="width:25%"></colgroup>';
|
||||
html += '<thead><tr><th>时间</th><th>餐品</th><th class="mh-col-num">处置量 (kg)</th><th>废弃原因</th><th>操作人</th><th>备注</th></tr></thead>';
|
||||
html += '<tbody>';
|
||||
if (records.length === 0) {
|
||||
html += '<tr><td colspan="6" style="text-align:center;color:rgba(255,255,255,0.4);padding:20px">暂无废弃处置记录</td></tr>';
|
||||
} else {
|
||||
records.forEach(function (r) {
|
||||
html += '<tr>'
|
||||
+ '<td>' + r.time + '</td>'
|
||||
+ '<td>' + r.dish + '</td>'
|
||||
+ '<td class="mh-col-num">' + r.amount.toFixed(1) + '</td>'
|
||||
+ '<td>' + (r.reason || '—') + '</td>'
|
||||
+ '<td>' + r.operator + '</td>'
|
||||
+ '<td>' + (r.note || '—') + '</td>'
|
||||
+ '</tr>';
|
||||
});
|
||||
}
|
||||
html += '</tbody></table></div>';
|
||||
} else if (mhDisposeFilter === 'reprocess') {
|
||||
// 加工再利用: 时间/餐品/处置量/加工用途/接收人/操作人/备注
|
||||
html += '<div class="mh-detail-table-wrap"><table class="mh-detail-table">';
|
||||
html += '<colgroup><col style="width:13%"><col style="width:15%"><col style="width:10%" class="mh-col-num"><col style="width:18%"><col style="width:17%"><col style="width:12%"><col style="width:15%"></colgroup>';
|
||||
html += '<thead><tr><th>时间</th><th>餐品</th><th class="mh-col-num">处置量 (kg)</th><th>加工用途</th><th>接收人</th><th>操作人</th><th>备注</th></tr></thead>';
|
||||
html += '<tbody>';
|
||||
if (records.length === 0) {
|
||||
html += '<tr><td colspan="7" style="text-align:center;color:rgba(255,255,255,0.4);padding:20px">暂无加工再利用处置记录</td></tr>';
|
||||
} else {
|
||||
records.forEach(function (r) {
|
||||
html += '<tr>'
|
||||
+ '<td>' + r.time + '</td>'
|
||||
+ '<td>' + r.dish + '</td>'
|
||||
+ '<td class="mh-col-num">' + r.amount.toFixed(1) + '</td>'
|
||||
+ '<td>' + (r.processing || '—') + '</td>'
|
||||
+ '<td>' + (r.receiver || '—') + '</td>'
|
||||
+ '<td>' + r.operator + '</td>'
|
||||
+ '<td>' + (r.note || '—') + '</td>'
|
||||
+ '</tr>';
|
||||
});
|
||||
}
|
||||
html += '</tbody></table></div>';
|
||||
} else if (mhDisposeFilter === 'cabinet') {
|
||||
// 存入智能货柜: 时间/餐品/处置量/货柜编号/操作人/备注
|
||||
html += '<div class="mh-detail-table-wrap"><table class="mh-detail-table">';
|
||||
html += '<colgroup><col style="width:13%"><col style="width:18%"><col style="width:12%" class="mh-col-num"><col style="width:20%"><col style="width:12%"><col style="width:25%"></colgroup>';
|
||||
html += '<thead><tr><th>时间</th><th>餐品</th><th class="mh-col-num">处置量 (kg)</th><th>货柜编号</th><th>操作人</th><th>备注</th></tr></thead>';
|
||||
html += '<tbody>';
|
||||
if (records.length === 0) {
|
||||
html += '<tr><td colspan="6" style="text-align:center;color:rgba(255,255,255,0.4);padding:20px">暂无存入智能货柜处置记录</td></tr>';
|
||||
} else {
|
||||
records.forEach(function (r) {
|
||||
html += '<tr>'
|
||||
+ '<td>' + r.time + '</td>'
|
||||
+ '<td>' + r.dish + '</td>'
|
||||
+ '<td class="mh-col-num">' + r.amount.toFixed(1) + '</td>'
|
||||
+ '<td>' + (r.cabinetId || '—') + '</td>'
|
||||
+ '<td>' + r.operator + '</td>'
|
||||
+ '<td>' + (r.note || '—') + '</td>'
|
||||
+ '</tr>';
|
||||
});
|
||||
}
|
||||
html += '</tbody></table></div>';
|
||||
}
|
||||
html += '</tbody></table></div>';
|
||||
return html;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# 餐厅终端设备模块变更日志
|
||||
|
||||
## 2026-08-18 · 结算设备统计页收餐记录 + 毛菜验收秤实收规格可编辑
|
||||
|
||||
### 变更一:结算设备统计页收餐与余量处置记录(`checkout-device/07-statistics.html`)
|
||||
- 新增收餐记录:全部收餐/全部餐线收餐完成事件,取最新一条作为收餐时间基准
|
||||
- 新增余量处置记录:临期食品·冷藏保存·加工再利用·值班餐/加班餐等处置方式
|
||||
- 各记录弹窗明细含原因/用途/接收人/操作人/备注等字段,初始上餐量·制作人·上餐时间展示
|
||||
|
||||
### 变更二:毛菜验收秤实收规格增强(`raw-veg-inspection-scale/01-verify-inspection.html`)
|
||||
- 实收规格列拆分为「克重 + 单位」组合编辑:单位组合字符串展示,支持分类过滤(叶菜类等)
|
||||
- 采购单价为数据字典值只读展示(灰字),实收量/实收单价/实收金额可编辑
|
||||
- 编辑时仅持久化到本次订单,输入不重渲染避免光标丢失
|
||||
|
||||
## 2026-08-14 · 毛菜验收秤 PAD 外壳改造 + 后厨补餐屏首版设计
|
||||
|
||||
### 变更一:毛菜验收秤全页面 PAD 居中外壳改造(`raw-veg-inspection-scale/` 全部 9 页)
|
||||
|
||||
@@ -308,6 +308,33 @@
|
||||
}
|
||||
.food-row__spec-select:focus { border-color: #4a90d9; background: rgba(74,144,217,0.08); color: #fff; }
|
||||
.food-row__spec-select option { background: #1a2b4a; color: #fff; }
|
||||
/* 采购规格列(只读):克重+单位组合字符串展示,不可编辑 */
|
||||
.food-row__spec-readonly {
|
||||
display: inline-block; padding: 2px 6px; border-radius: 4px;
|
||||
background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.55);
|
||||
font-size: 11px; font-weight: 500; white-space: nowrap;
|
||||
}
|
||||
/* 实收规格列:克重 input + 单位 select 连体容器(参考 sup-in-raw.html 的 .spec-input-group) */
|
||||
.food-row__spec-input-group { display: flex; align-items: stretch; width: 100%; height: 24px; }
|
||||
.food-row__spec-input-group input {
|
||||
flex: 1; min-width: 0; padding: 0 4px;
|
||||
background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
|
||||
border-radius: 4px 0 0 4px; border-right: none;
|
||||
color: rgba(255,255,255,0.85); font-size: 11px; text-align: center;
|
||||
outline: none; -moz-appearance: textfield;
|
||||
}
|
||||
.food-row__spec-input-group input::-webkit-outer-spin-button,
|
||||
.food-row__spec-input-group input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
|
||||
.food-row__spec-input-group input:focus { border-color: #4a90d9; background: rgba(74,144,217,0.08); color: #fff; }
|
||||
.food-row__spec-input-group input::placeholder { color: rgba(255,255,255,0.25); }
|
||||
.food-row__spec-input-group select {
|
||||
width: 44px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
|
||||
border-radius: 0 4px 4px 0; padding: 2px 2px;
|
||||
color: rgba(255,255,255,0.7); font-size: 11px; text-align: center;
|
||||
outline: none; appearance: auto; cursor: pointer;
|
||||
}
|
||||
.food-row__spec-input-group select:focus { border-color: #4a90d9; background: rgba(74,144,217,0.08); color: #fff; }
|
||||
.food-row__spec-input-group select option { background: #1a2b4a; color: #fff; }
|
||||
.food-row__amount { font-size: 12px; color: #faad14; font-weight: 500; }
|
||||
.food-row__actual { color: #4a90d9; font-weight: 600; }
|
||||
.food-row__status { font-size: 11px; }
|
||||
@@ -1035,39 +1062,39 @@
|
||||
/* ===== 食材目录(称重验收,存储单位克,展示层用 formatGramForCanteen 还原"斤") ===== */
|
||||
/* verifyType:'weight' 表示称重验收,可用 ['斤','公斤','克','千克'] */
|
||||
var FOOD_CATALOG = {
|
||||
'大白菜': { price: 3.5, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC001', verifyType: 'weight' },
|
||||
'圆白菜': { price: 4.0, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC002', verifyType: 'weight' },
|
||||
'菠菜': { price: 6.0, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC003', verifyType: 'weight' },
|
||||
'油菜': { price: 4.5, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC004', verifyType: 'weight' },
|
||||
'生菜': { price: 5.5, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC005', verifyType: 'weight' },
|
||||
'芹菜': { price: 5.0, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC006', verifyType: 'weight' },
|
||||
'西兰花': { price: 8.0, unit: '斤', catLabel: '花菜类', traceCode: 'TRC260601-HC001', verifyType: 'weight' },
|
||||
'花菜': { price: 7.0, unit: '斤', catLabel: '花菜类', traceCode: 'TRC260601-HC002', verifyType: 'weight' },
|
||||
'黄瓜': { price: 5.0, unit: '斤', catLabel: '瓜果类', traceCode: 'TRC260601-GG001', verifyType: 'weight' },
|
||||
'西红柿': { price: 6.5, unit: '斤', catLabel: '瓜果类', traceCode: 'TRC260601-GG002', verifyType: 'weight' },
|
||||
'茄子': { price: 5.0, unit: '斤', catLabel: '瓜果类', traceCode: 'TRC260601-GG003', verifyType: 'weight' },
|
||||
'青椒': { price: 6.0, unit: '斤', catLabel: '瓜果类', traceCode: 'TRC260601-GG004', verifyType: 'weight' },
|
||||
'豆角': { price: 7.5, unit: '斤', catLabel: '瓜果类', traceCode: 'TRC260601-GG005', verifyType: 'weight' },
|
||||
'土豆': { price: 3.0, unit: '斤', catLabel: '根茎类', traceCode: 'TRC260601-GJ001', verifyType: 'weight' },
|
||||
'胡萝卜': { price: 4.0, unit: '斤', catLabel: '根茎类', traceCode: 'TRC260601-GJ002', verifyType: 'weight' },
|
||||
'白菜': { price: 3.5, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC007', verifyType: 'weight' },
|
||||
'猪里脊': { price: 18.0, unit: '斤', catLabel: '肉禽类', traceCode: 'TRC260601-RQ001', verifyType: 'weight' },
|
||||
'五花肉': { price: 16.0, unit: '斤', catLabel: '肉禽类', traceCode: 'TRC260601-RQ002', verifyType: 'weight' },
|
||||
'草鱼': { price: 14.0, unit: '斤', catLabel: '水产类', traceCode: 'TRC260601-SC001', verifyType: 'weight' },
|
||||
'虾仁': { price: 35.0, unit: '斤', catLabel: '水产类', traceCode: 'TRC260601-SC002', verifyType: 'weight' }
|
||||
'大白菜': { price: 3.5, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC001', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'圆白菜': { price: 4.0, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC002', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'菠菜': { price: 6.0, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC003', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'油菜': { price: 4.5, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC004', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'生菜': { price: 5.5, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC005', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'芹菜': { price: 5.0, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC006', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'西兰花': { price: 8.0, unit: '斤', catLabel: '花菜类', traceCode: 'TRC260601-HC001', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'花菜': { price: 7.0, unit: '斤', catLabel: '花菜类', traceCode: 'TRC260601-HC002', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'黄瓜': { price: 5.0, unit: '斤', catLabel: '瓜果类', traceCode: 'TRC260601-GG001', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'西红柿': { price: 6.5, unit: '斤', catLabel: '瓜果类', traceCode: 'TRC260601-GG002', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'茄子': { price: 5.0, unit: '斤', catLabel: '瓜果类', traceCode: 'TRC260601-GG003', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'青椒': { price: 6.0, unit: '斤', catLabel: '瓜果类', traceCode: 'TRC260601-GG004', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'豆角': { price: 7.5, unit: '斤', catLabel: '瓜果类', traceCode: 'TRC260601-GG005', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'土豆': { price: 3.0, unit: '斤', catLabel: '根茎类', traceCode: 'TRC260601-GJ001', verifyType: 'weight', specGram: 1000, specUnit: '袋' },
|
||||
'胡萝卜': { price: 4.0, unit: '斤', catLabel: '根茎类', traceCode: 'TRC260601-GJ002', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'白菜': { price: 3.5, unit: '斤', catLabel: '叶菜类', traceCode: 'TRC260601-YC007', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'猪里脊': { price: 18.0, unit: '斤', catLabel: '肉禽类', traceCode: 'TRC260601-RQ001', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'五花肉': { price: 16.0, unit: '斤', catLabel: '肉禽类', traceCode: 'TRC260601-RQ002', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'草鱼': { price: 14.0, unit: '斤', catLabel: '水产类', traceCode: 'TRC260601-SC001', verifyType: 'weight', specGram: 500, specUnit: '袋' },
|
||||
'虾仁': { price: 35.0, unit: '斤', catLabel: '水产类', traceCode: 'TRC260601-SC002', verifyType: 'weight', specGram: 250, specUnit: '袋' }
|
||||
};
|
||||
|
||||
/* ===== 调料目录(点收验收,按规格/数量验收) ===== */
|
||||
/* verifyType:'count' 表示点收验收,可用 ['袋','瓶','箱','桶','罐','份','个','只','条','把'] */
|
||||
var SPICE_CATALOG = {
|
||||
'酱油': { price: 12.0, unit: '瓶', spec: '500ml/瓶', catLabel: '调料', traceCode: 'TRC260601-TL001', verifyType: 'count' },
|
||||
'醋': { price: 8.0, unit: '瓶', spec: '500ml/瓶', catLabel: '调料', traceCode: 'TRC260601-TL002', verifyType: 'count' },
|
||||
'料酒': { price: 10.0, unit: '瓶', spec: '500ml/瓶', catLabel: '调料', traceCode: 'TRC260601-TL003', verifyType: 'count' },
|
||||
'盐': { price: 3.0, unit: '袋', spec: '500g/袋', catLabel: '调料', traceCode: 'TRC260601-TL004', verifyType: 'count' },
|
||||
'白糖': { price: 6.0, unit: '袋', spec: '1kg/袋', catLabel: '调料', traceCode: 'TRC260601-TL005', verifyType: 'count' },
|
||||
'鸡精': { price: 8.0, unit: '罐', spec: '200g/罐', catLabel: '调料', traceCode: 'TRC260601-TL006', verifyType: 'count' },
|
||||
'食用油': { price: 45.0, unit: '桶', spec: '5L/桶', catLabel: '调料', traceCode: 'TRC260601-TL007', verifyType: 'count' },
|
||||
'花椒': { price: 25.0, unit: '袋', spec: '100g/袋', catLabel: '调料', traceCode: 'TRC260601-TL008', verifyType: 'count' }
|
||||
'酱油': { price: 12.0, unit: '瓶', spec: '500ml/瓶', catLabel: '调料', traceCode: 'TRC260601-TL001', verifyType: 'count', specGram: 500, specUnit: '瓶' },
|
||||
'醋': { price: 8.0, unit: '瓶', spec: '500ml/瓶', catLabel: '调料', traceCode: 'TRC260601-TL002', verifyType: 'count', specGram: 500, specUnit: '瓶' },
|
||||
'料酒': { price: 10.0, unit: '瓶', spec: '500ml/瓶', catLabel: '调料', traceCode: 'TRC260601-TL003', verifyType: 'count', specGram: 500, specUnit: '瓶' },
|
||||
'盐': { price: 3.0, unit: '袋', spec: '500g/袋', catLabel: '调料', traceCode: 'TRC260601-TL004', verifyType: 'count', specGram: 500, specUnit: '袋' },
|
||||
'白糖': { price: 6.0, unit: '袋', spec: '1kg/袋', catLabel: '调料', traceCode: 'TRC260601-TL005', verifyType: 'count', specGram: 1000, specUnit: '袋' },
|
||||
'鸡精': { price: 8.0, unit: '罐', spec: '200g/罐', catLabel: '调料', traceCode: 'TRC260601-TL006', verifyType: 'count', specGram: 200, specUnit: '罐' },
|
||||
'食用油': { price: 45.0, unit: '桶', spec: '5L/桶', catLabel: '调料', traceCode: 'TRC260601-TL007', verifyType: 'count', specGram: 5000, specUnit: '桶' },
|
||||
'花椒': { price: 25.0, unit: '袋', spec: '100g/袋', catLabel: '调料', traceCode: 'TRC260601-TL008', verifyType: 'count', specGram: 100, specUnit: '袋' }
|
||||
};
|
||||
|
||||
/* 判断食材是否为调料(按规格验收) */
|
||||
@@ -1442,12 +1469,12 @@
|
||||
|
||||
var isDirect = !!selectedOrder._direct;
|
||||
/* 列宽(单位 px,首列 1fr 自适应)
|
||||
* 有订单(10列): 食材/采购规格/采购量/采购单价/采购单金额/实收规格/实收量/实收单价/实收总价/操作
|
||||
* 无订单(6列): 食材/实收规格/实收量/实收单价/实收总价/操作
|
||||
* 有订单(10列): 食材/采购规格(只读)/采购量/采购单价/采购单金额/实收规格(input+select)/实收量/实收单价/实收总价/操作
|
||||
* 无订单(6列): 食材/实收规格(input+select)/实收量/实收单价/实收总价/操作
|
||||
*/
|
||||
var gridCols = isDirect
|
||||
? '1fr 50px 50px 56px 60px 52px'
|
||||
: '1fr 56px 50px 56px 60px 50px 50px 56px 60px 52px';
|
||||
? '1fr 96px 50px 56px 60px 52px'
|
||||
: '1fr 60px 50px 56px 60px 96px 50px 56px 60px 52px';
|
||||
headEl.style.gridTemplateColumns = gridCols;
|
||||
/* 表头文字 */
|
||||
headEl.innerHTML = isDirect
|
||||
@@ -1493,22 +1520,31 @@
|
||||
? '<span class="food-row__weight" style="color:rgba(255,255,255,0.25);">--</span>'
|
||||
: '<span class="food-row__weight">' + (spice ? orderQty : orderQty.toFixed(1)) + '</span>';
|
||||
|
||||
/* 规格下拉选项(按 verifyType 分类过滤) */
|
||||
/* 规格单位下拉选项(按 verifyType 分类过滤,用于实收规格单位 select) */
|
||||
var UNIT_OPTIONS_WEIGHT = ['斤','公斤','克','千克'];
|
||||
var UNIT_OPTIONS_COUNT = ['袋','瓶','箱','桶','罐','份','个','只','条','把'];
|
||||
var verifyType = info.verifyType || 'weight';
|
||||
var UNIT_OPTIONS = (verifyType === 'count') ? UNIT_OPTIONS_COUNT : UNIT_OPTIONS_WEIGHT;
|
||||
var currentUnit = (f._customUnit !== undefined) ? f._customUnit : info.unit;
|
||||
var actualUnit = (f._actualUnit !== undefined) ? f._actualUnit : currentUnit;
|
||||
function buildUnitSelect(selected, onChangeFn) {
|
||||
var opts = '';
|
||||
for (var u = 0; u < UNIT_OPTIONS.length; u++) {
|
||||
var unit = UNIT_OPTIONS[u];
|
||||
opts += '<option value="' + unit + '"' + (unit === selected ? ' selected' : '') + '>' + unit + '</option>';
|
||||
}
|
||||
return '<select class="food-row__spec-select" onclick="event.stopPropagation()" onchange="' + onChangeFn + '">' + opts + '</select>';
|
||||
/* 采购规格克重/单位(数据字典值,只读展示;格式 "500g/袋") */
|
||||
var specGram = info.specGram || 0;
|
||||
var specUnit = info.specUnit || info.unit || '';
|
||||
/* 采购规格列(只读):克重+单位组合字符串 */
|
||||
var specHtml = '<span class="food-row__spec-readonly">' + specGram + 'g/' + specUnit + '</span>';
|
||||
/* 实收规格:默认代入采购规格数据(克重/单位),用户可编辑 */
|
||||
var actualSpecGram = (f._actualSpecGram !== undefined) ? f._actualSpecGram : specGram;
|
||||
var actualSpecUnit = (f._actualSpecUnit !== undefined) ? f._actualSpecUnit : specUnit;
|
||||
var unitOpts = '';
|
||||
for (var u = 0; u < UNIT_OPTIONS.length; u++) {
|
||||
var unit = UNIT_OPTIONS[u];
|
||||
unitOpts += '<option value="' + unit + '"' + (unit === actualSpecUnit ? ' selected' : '') + '>' + unit + '</option>';
|
||||
}
|
||||
var specHtml = buildUnitSelect(currentUnit, 'updateFoodUnit(' + i + ', this.value)');
|
||||
var actualSpecHtml = '<div class="food-row__spec-input-group">'
|
||||
+ '<input type="number" min="0" step="0.01" value="' + actualSpecGram + '" placeholder="0" '
|
||||
+ 'onclick="event.stopPropagation()" '
|
||||
+ 'oninput="updateActualSpecGram(' + i + ', this.value)" '
|
||||
+ 'title="实收规格克重">'
|
||||
+ '<select onclick="event.stopPropagation()" onchange="updateActualUnit(' + i + ', this.value)" title="实收规格单位">' + unitOpts + '</select>'
|
||||
+ '</div>';
|
||||
|
||||
/* 采购单价列(只读) + 采购单金额列(只读,= 采购单价 × 采购量) */
|
||||
var priceReadOnlyHtml = '<span class="food-row__price-readonly">¥' + currentPrice.toFixed(1) + '</span>';
|
||||
@@ -1571,8 +1607,6 @@
|
||||
+ '</div>';
|
||||
|
||||
var isCurrent = (i === currentFoodIdx) ? ' current' : '';
|
||||
/* 实收规格列(下拉可选,默认跟随采购规格) */
|
||||
var actualSpecHtml = buildUnitSelect(actualUnit, 'updateActualUnit(' + i + ', this.value)');
|
||||
|
||||
/* 组装行(按订单类型选不同列顺序) */
|
||||
var rowHtml = '<div class="food-row' + isCurrent + '" data-idx="' + i + '" style="grid-template-columns:' + gridCols + ';">'
|
||||
@@ -1638,20 +1672,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* 更新食材规格/单位(用户编辑) */
|
||||
function updateFoodUnit(idx, newUnit) {
|
||||
/* 更新实收规格克重(用户编辑) — 仅持久化到本次订单的食材状态,不重渲染避免光标丢失 */
|
||||
function updateActualSpecGram(idx, newVal) {
|
||||
if (!selectedOrder || idx < 0) return;
|
||||
var unit = (newUnit || '').trim();
|
||||
if (!unit) return;
|
||||
selectedOrder.foods[idx]._customUnit = unit;
|
||||
var gram = parseFloat(newVal);
|
||||
if (isNaN(gram) || gram < 0) gram = 0;
|
||||
selectedOrder.foods[idx]._actualSpecGram = gram;
|
||||
}
|
||||
|
||||
/* 更新实收规格(用户在下拉中切换) */
|
||||
/* 更新实收规格单位(用户在下拉中切换) */
|
||||
function updateActualUnit(idx, newUnit) {
|
||||
if (!selectedOrder || idx < 0) return;
|
||||
var unit = (newUnit || '').trim();
|
||||
if (!unit) return;
|
||||
selectedOrder.foods[idx]._actualUnit = unit;
|
||||
selectedOrder.foods[idx]._actualSpecUnit = unit;
|
||||
}
|
||||
|
||||
/* 验收不通过(从操作列触发) */
|
||||
@@ -2343,7 +2377,7 @@
|
||||
var orderQty = spice ? (food._orderQty || food.weight) : food.weight;
|
||||
var refundQty = (ngScope === 'full') ? orderQty : Math.ceil(orderQty / 2);
|
||||
var refundAmount = currentPrice * refundQty;
|
||||
var unitLabel = food._customUnit || (spice ? findFoodInfo(food.name).unit : '斤');
|
||||
var unitLabel = spice ? findFoodInfo(food.name).unit : '斤';
|
||||
|
||||
var refundDisplay = document.getElementById('ngRefundAmountDisplay');
|
||||
var refundInput = document.getElementById('ngRefundAmountInput');
|
||||
|
||||
Reference in New Issue
Block a user