refactor: 毛菜验收秤—删除采样备注、验收溯源码、支付方式、历史详情抽屉
- 01-verify-inspection.html: 删除不合格处理说明文本域、食材行溯源标签、订单卡片付款模式徽章、汇总弹窗付款模式文字 - 03-verify-history.html: 删除验收详情抽屉(HTML/CSS/JS)、支付方式列、操作(详情)列 - index.html: 验收记录卡片描述更新 - CHANGELOG 同步 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3c50fa83a4
commit
f8af6b4747
@@ -915,10 +915,6 @@
|
||||
<option value="">请选择原因</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ng-type-group">
|
||||
<div class="ng-type-label">处理说明(可选)</div>
|
||||
<textarea class="ng-input" id="ngNote" rows="2" placeholder="补充说明..."></textarea>
|
||||
</div>
|
||||
<div class="ng-modal__footer">
|
||||
<button class="ng-modal__btn ng-modal__btn--cancel" onclick="closeNgModal()">取消</button>
|
||||
<button class="ng-modal__btn ng-modal__btn--confirm" id="ngConfirmBtn" onclick="confirmNgDispose()" disabled>确认处置</button>
|
||||
@@ -1234,7 +1230,6 @@
|
||||
if (liftDetectTimer) { clearInterval(liftDetectTimer); liftDetectTimer = null; }
|
||||
closeNgModal();
|
||||
document.getElementById('ngReason').value = '';
|
||||
document.getElementById('ngNote').value = '';
|
||||
document.getElementById('foodStatusText').textContent = '就绪,等待食材放置';
|
||||
// 隐藏进度条 + 重置提交按钮
|
||||
document.getElementById('verifyProgress').style.display = 'none';
|
||||
@@ -1311,12 +1306,9 @@
|
||||
+ '<span class="order-card-step1__shipping-code">' + typeLabel + ': ' + code + '</span>'
|
||||
+ '</div>';
|
||||
})()
|
||||
/* 底部:状态 + 付款类型 + 采购人 */
|
||||
/* 底部:状态 + 采购人 */
|
||||
+ '<div class="order-card-step1__bottom">'
|
||||
+ '<span class="order-card-step1__status">' + statusTag + '</span>'
|
||||
+ '<span class="order-card-step1__payment-mode" style="display:none;font-size:11px;padding:2px 8px;border-radius:4px;'
|
||||
+ (o.paymentMode === 'pre' ? 'background:rgba(82,196,26,0.15);color:#52c41a;border:1px solid rgba(82,196,26,0.25);' : 'background:rgba(250,173,22,0.15);color:#faad14;border:1px solid rgba(250,173,22,0.25);')
|
||||
+ '">' + (o.paymentMode === 'pre' ? '前置付款' : '后置付款') + '</span>'
|
||||
+ '<span class="order-card-step1__purchaser">采购人: <strong>' + (o.purchaser || '--') + '</strong></span>'
|
||||
+ '</div>'
|
||||
/* CTA 按钮 */
|
||||
@@ -1544,7 +1536,6 @@
|
||||
html += '<div class="food-row' + isCurrent + '" data-idx="' + i + '" style="grid-template-columns:' + gridCols + ';">'
|
||||
+ '<span class="food-row__name">' + f.name
|
||||
+ '<span class="food-row__cat-tag">' + info.catLabel + '</span>'
|
||||
+ (info.traceCode ? '<span class="food-row__trace">溯源: ' + info.traceCode + '</span>' : '')
|
||||
+ '</span>'
|
||||
+ specHtml
|
||||
+ orderQtyHtml
|
||||
@@ -1999,7 +1990,7 @@
|
||||
ngType: ngType,
|
||||
ngScope: ngScope,
|
||||
ngReason: document.getElementById('ngReason').value,
|
||||
ngNote: document.getElementById('ngNote').value,
|
||||
ngNote: '',
|
||||
actualWeight: accumulatedWeights[currentFoodIdx]
|
||||
};
|
||||
renderFoodList();
|
||||
@@ -2153,7 +2144,6 @@
|
||||
function openNgModal() {
|
||||
// 重置表单
|
||||
resetNgForm();
|
||||
document.getElementById('ngNote').value = '';
|
||||
// 填充不合格原因下拉菜单
|
||||
var reasonSel = document.getElementById('ngReason');
|
||||
reasonSel.innerHTML = '<option value="">请选择原因</option>';
|
||||
@@ -2237,7 +2227,7 @@
|
||||
ngType: ngType,
|
||||
ngScope: ngScope,
|
||||
ngReason: reason,
|
||||
ngNote: document.getElementById('ngNote').value.trim(),
|
||||
ngNote: '',
|
||||
refundAmount: refundAmount,
|
||||
refundMoney: customRefundMoney, // 前置付款时存储自定义金额
|
||||
refundQty: isSpice(selectedOrder.foods[currentFoodIdx].name) ? refundAmount : 0
|
||||
@@ -2515,9 +2505,7 @@
|
||||
var deductNum = parseFloat(deductAmt.replace('¥', '')) || 0;
|
||||
var finalAmt = '¥' + Math.max(0, baseNum - deductNum).toFixed(2);
|
||||
var deductVisible = document.getElementById('amountDeductRow').style.display !== 'none';
|
||||
var modeLabel = paymentMode === 'pre' ? '前置付款' : '后置付款';
|
||||
|
||||
document.getElementById('summaryInfo').textContent = selectedOrder.id + ' | ' + selectedOrder.supplier + ' | ' + modeLabel;
|
||||
document.getElementById('summaryInfo').textContent = selectedOrder.id + ' | ' + selectedOrder.supplier;
|
||||
document.getElementById('summaryPass').textContent = passCount;
|
||||
document.getElementById('summaryFail').textContent = failCount;
|
||||
|
||||
|
||||
@@ -206,12 +206,6 @@
|
||||
.logout-btn:hover { background: rgba(255,77,79,0.18); color: #ff6b6d; border-color: rgba(255,77,79,0.4); }
|
||||
.tag--orange { background: rgba(250,173,22,0.15); color: #faad14; }
|
||||
|
||||
.detail-link {
|
||||
color: #4a90d9; cursor: pointer; text-decoration: none; font-size: 13px;
|
||||
padding: 6px 12px; border-radius: 6px; transition: all 0.2s;
|
||||
}
|
||||
.detail-link:hover { background: rgba(74,144,217,0.15); color: #6db3f8; }
|
||||
|
||||
/* 底栏 */
|
||||
.table-footer {
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
@@ -227,37 +221,6 @@
|
||||
.empty-state.show { display: flex; }
|
||||
.empty-state__icon { font-size: 40px; opacity: 0.4; }
|
||||
|
||||
/* 右侧抽屉 */
|
||||
.drawer-mask {
|
||||
display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000;
|
||||
}
|
||||
.drawer-mask.show { display: block; }
|
||||
.drawer {
|
||||
position: fixed; top: 0; right: -520px; bottom: 0; width: 520px; background: #1a2b4a;
|
||||
z-index: 1001; transition: right 0.3s ease; box-shadow: -4px 0 20px rgba(0,0,0,0.3);
|
||||
display: flex; flex-direction: column;
|
||||
}
|
||||
.drawer.show { right: 0; }
|
||||
.drawer__header {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.08);
|
||||
}
|
||||
.drawer__title { font-size: 16px; font-weight: 600; }
|
||||
.drawer__close {
|
||||
width: 40px; height: 40px; font-size: 22px; cursor: pointer; color: rgba(255,255,255,0.5);
|
||||
background: rgba(255,255,255,0.06); border: none; border-radius: 8px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
}
|
||||
.drawer__close:hover { color: #fff; background: rgba(255,255,255,0.1); }
|
||||
.drawer__body { padding: 20px 24px; overflow-y: auto; flex: 1; }
|
||||
.drawer-section { margin-bottom: 20px; }
|
||||
.drawer-section__title {
|
||||
font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.6);
|
||||
padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.06);
|
||||
}
|
||||
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
|
||||
.drawer-cell__label { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 2px; }
|
||||
.drawer-cell__value { font-size: 14px; color: rgba(255,255,255,0.9); font-weight: 500; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -337,7 +300,7 @@
|
||||
<table>
|
||||
<thead><tr id="tableHead">
|
||||
<th>订单号</th><th>食材</th><th>供应商</th>
|
||||
<th>支付方式</th><th>配送方式</th><th>时间</th><th>验收结果</th><th>操作</th>
|
||||
<th>配送方式</th><th>时间</th><th>验收结果</th>
|
||||
</tr></thead>
|
||||
<tbody id="tableBody"></tbody>
|
||||
</table>
|
||||
@@ -349,16 +312,6 @@
|
||||
<div class="table-footer" id="tableFooter">共 0 条记录</div>
|
||||
</div>
|
||||
|
||||
<!-- 详情抽屉 -->
|
||||
<div class="drawer-mask" id="drawerMask" onclick="closeDrawer()"></div>
|
||||
<div class="drawer" id="drawer">
|
||||
<div class="drawer__header">
|
||||
<span class="drawer__title" id="drawerTitle">验收详情</span>
|
||||
<button class="drawer__close" onclick="closeDrawer()">×</button>
|
||||
</div>
|
||||
<div class="drawer__body" id="drawerBody"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
/* 退出登录 */
|
||||
function handleLogout() {
|
||||
@@ -521,49 +474,6 @@
|
||||
document.getElementById('statRate').textContent = rate + '%';
|
||||
}
|
||||
|
||||
// 打开详情抽屉
|
||||
function openDrawer(no) {
|
||||
var r = null;
|
||||
for (var i = 0; i < RECORDS.length; i++) { if (RECORDS[i].no === no) { r = RECORDS[i]; break; } }
|
||||
if (!r) return;
|
||||
|
||||
var html = '';
|
||||
html += '<div class="drawer-section"><div class="drawer-section__title">入库信息</div><div class="drawer-grid">'
|
||||
+ '<div><div class="drawer-cell__label">订单号</div><div class="drawer-cell__value">' + (r.orderId || '--') + '</div></div>'
|
||||
+ '<div><div class="drawer-cell__label">验收时间</div><div class="drawer-cell__value">' + r.time + '</div></div>'
|
||||
+ '<div><div class="drawer-cell__label">操作人</div><div class="drawer-cell__value">' + r.operator + '</div></div>'
|
||||
+ '<div><div class="drawer-cell__label">支付方式</div><div class="drawer-cell__value">' + (r.paymentMode === 'pre' ? '前置付款' : '后置付款') + '</div></div>'
|
||||
+ '<div><div class="drawer-cell__label">配送方式</div><div class="drawer-cell__value">' + (r.shippingType || '--') + '</div></div>'
|
||||
+ '</div></div>';
|
||||
|
||||
html += '<div class="drawer-section"><div class="drawer-section__title">食材信息</div><div class="drawer-grid">'
|
||||
+ '<div><div class="drawer-cell__label">食材名称</div><div class="drawer-cell__value">' + r.dish + '</div></div>'
|
||||
+ '<div><div class="drawer-cell__label">供应商</div><div class="drawer-cell__value">' + r.supplier + '</div></div>'
|
||||
+ '<div><div class="drawer-cell__label">订单重量</div><div class="drawer-cell__value">' + r.orderW + ' kg</div></div>'
|
||||
+ '<div><div class="drawer-cell__label">实际重量</div><div class="drawer-cell__value">' + r.actualW + ' kg</div></div>'
|
||||
+ '<div><div class="drawer-cell__label">偏差率</div><div class="drawer-cell__value" style="color:' + (r.result === 'pass' ? '#52c41a' : (r.result === 'pending' ? '#4a90d9' : '#ff4d4f')) + '">' + r.diffRate + '</div></div>'
|
||||
+ '<div><div class="drawer-cell__label">验收结果</div><div class="drawer-cell__value">' + (r.result === 'pass' ? '通过' : (r.result === 'pending' ? '待验收' : '不通过')) + '</div></div>'
|
||||
+ '</div></div>';
|
||||
|
||||
if (r.result === 'fail') {
|
||||
html += '<div class="drawer-section"><div class="drawer-section__title">不合格处置</div><div class="drawer-grid">'
|
||||
+ '<div><div class="drawer-cell__label">处理方式</div><div class="drawer-cell__value">' + r.ngType + '</div></div>'
|
||||
+ '<div><div class="drawer-cell__label">处理范围</div><div class="drawer-cell__value">' + r.ngScope + '</div></div>'
|
||||
+ '<div style="grid-column:1/-1"><div class="drawer-cell__label">不合格原因</div><div class="drawer-cell__value">' + r.reason + '</div></div>'
|
||||
+ '</div></div>';
|
||||
}
|
||||
|
||||
document.getElementById('drawerTitle').textContent = '验收详情 - ' + r.no;
|
||||
document.getElementById('drawerBody').innerHTML = html;
|
||||
document.getElementById('drawerMask').classList.add('show');
|
||||
document.getElementById('drawer').classList.add('show');
|
||||
}
|
||||
|
||||
function closeDrawer() {
|
||||
document.getElementById('drawerMask').classList.remove('show');
|
||||
document.getElementById('drawer').classList.remove('show');
|
||||
}
|
||||
|
||||
// 搜索输入处理
|
||||
function onSearchInput() {
|
||||
var val = document.getElementById('searchInput').value.trim();
|
||||
@@ -631,11 +541,11 @@
|
||||
if (viewMode === 'order') {
|
||||
// 订单维度表头
|
||||
thead.innerHTML = dateCol + '<th>订单号</th><th>食材数量</th><th>供应商</th>'
|
||||
+ '<th>支付方式</th><th>配送方式</th><th>时间</th><th>验收状态</th><th>操作</th>';
|
||||
+ '<th>配送方式</th><th>时间</th><th>验收状态</th>';
|
||||
} else {
|
||||
// 食材维度表头
|
||||
thead.innerHTML = dateCol + '<th>订单号</th><th>食材</th><th>供应商</th>'
|
||||
+ '<th>支付方式</th><th>配送方式</th><th>时间</th><th>验收结果</th><th>操作</th>';
|
||||
+ '<th>配送方式</th><th>时间</th><th>验收结果</th>';
|
||||
}
|
||||
|
||||
if (records.length === 0) {
|
||||
@@ -670,9 +580,6 @@
|
||||
var statusTag = allPass
|
||||
? '<span class="tag tag--green">验收完成</span>'
|
||||
: '<span class="tag tag--orange">待验收</span>';
|
||||
var payTag = first.paymentMode === 'pre'
|
||||
? '<span class="tag tag--green">前置</span>'
|
||||
: '<span class="tag tag--orange">后置</span>';
|
||||
var orderIdDisplay = first.orderId || '<span style="color:rgba(255,255,255,0.25)">--</span>';
|
||||
var timeShort = first.time.substring(11);
|
||||
|
||||
@@ -687,11 +594,9 @@
|
||||
cols += '<td>' + orderIdDisplay + '</td>'
|
||||
+ '<td style="text-align:center;">' + foodCount + ' 种</td>'
|
||||
+ '<td>' + first.supplier + '</td>'
|
||||
+ '<td>' + payTag + '</td>'
|
||||
+ '<td>' + (first.shippingType || '--') + '</td>'
|
||||
+ '<td>' + timeShort + '</td>'
|
||||
+ '<td>' + statusTag + '</td>'
|
||||
+ '<td><span class="detail-link" onclick="openDrawer(\'' + first.no + '\')">详情</span></td>';
|
||||
+ '<td>' + statusTag + '</td>';
|
||||
|
||||
return '<tr>' + cols + '</tr>';
|
||||
}).join('');
|
||||
@@ -702,9 +607,6 @@
|
||||
if (r.result === 'pass') resultTag = '<span class="tag tag--green">通过</span>';
|
||||
else if (r.result === 'pending') resultTag = '<span class="tag tag--blue">待验收</span>';
|
||||
else resultTag = '<span class="tag tag--red">不通过</span>';
|
||||
var payTag = r.paymentMode === 'pre'
|
||||
? '<span class="tag tag--green">前置</span>'
|
||||
: '<span class="tag tag--orange">后置</span>';
|
||||
var orderIdDisplay = r.orderId || '<span style="color:rgba(255,255,255,0.25)">--</span>';
|
||||
var timeShort = r.time.substring(11);
|
||||
|
||||
@@ -719,11 +621,9 @@
|
||||
cols += '<td>' + orderIdDisplay + '</td>'
|
||||
+ '<td>' + r.dish + '</td>'
|
||||
+ '<td>' + r.supplier + '</td>'
|
||||
+ '<td>' + payTag + '</td>'
|
||||
+ '<td>' + (r.shippingType || '--') + '</td>'
|
||||
+ '<td>' + timeShort + '</td>'
|
||||
+ '<td>' + resultTag + '</td>'
|
||||
+ '<td><span class="detail-link" onclick="openDrawer(\'' + r.no + '\')">详情</span></td>';
|
||||
+ '<td>' + resultTag + '</td>';
|
||||
|
||||
return '<tr>' + cols + '</tr>';
|
||||
}).join('');
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# 毛菜验收秤 - 变更记录
|
||||
|
||||
## [2026-06-15] refactor: 删除采样备注、验收溯源码显示、支付方式标签、验收历史详情抽屉
|
||||
|
||||
### 删除
|
||||
- **采样备注**(`01-verify-inspection.html`):不合格处置弹窗中"处理说明"文本域删除,相关 JS 引用改为空字符串
|
||||
- **验收溯源码**(`01-verify-inspection.html`):食材行中 `溯源: TRCxxx` 标签删除
|
||||
- **支付方式**(`01-verify-inspection.html`):订单卡片底部"前置/后置付款"徽章删除;验收汇总弹窗摘要信息中移除付款模式文字
|
||||
- **验收历史详情抽屉**(`03-verify-history.html`):右侧 520px 抽屉整体删除,含 openDrawer / closeDrawer 函数、抽屉 HTML 和 CSS;表格中"支付方式"列和"操作(详情)"列同步移除
|
||||
|
||||
### 变更
|
||||
- **`index.html`**:验收记录卡片描述从"查看详情"改为"查看与筛选"
|
||||
- **`00-login.html` / `00-welcome.html`**:登录/菜单页分离(已在上一提交完成)
|
||||
|
||||
---
|
||||
|
||||
## [2026-06-15] feat: 新增重新识别按钮 + 验收状态模型重构 + 暂时隐藏验收不通过逻辑
|
||||
|
||||
### 新增
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<span class="card__icon">📝</span>
|
||||
<div class="card__info">
|
||||
<div class="card__title">验收记录</div>
|
||||
<div class="card__desc">历史验收记录查看与详情</div>
|
||||
<div class="card__desc">历史验收记录查看与筛选</div>
|
||||
</div>
|
||||
<span class="card__arrow">›</span>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user