fix(after-sale): 订单详情弹窗不再渲染售后状态节点进程

订单详情弹窗的「售后记录」卡片把整条处理时间线铺在了卡片里,和点开
「查看详细」后的售后详细弹窗重复,卡片本身也被拉得很长。改为只保留状态
徽章 + 申请时间、原因/申请理由、退款金额与「查看详细」入口;完整处理记录
由售后详细弹窗独占呈现,信息不缺、入口也还在。

- 删掉卡片里的 orderDetailHandlingLogHtml(item.handling_log) 调用
- 连带删除随之无人调用的 orderDetailHandlingLogHtml / handlingEntryTitle /
  AFTER_SALE_STATUS_LABELS 三个助手
- recordPayload 仍带 handling_log,点开详情弹窗照旧能看到时间线
- modal-runtime.css 的时间线规则不动:售后详细弹窗还在用,无需重打包

验证:tests/widget-system/ 462 项、tests/admin/ 76 项通过;契约测试改为断言
订单详情弹窗不再出现 timeline 标记与三个助手,同时锁住「查看详细」载荷仍带
handling_log;node --check 通过。未做浏览器视觉验收。
This commit is contained in:
2026-10-09 18:12:48 +08:00
parent 039fa6d863
commit 36b3ba6f45
2 changed files with 8 additions and 38 deletions
@@ -529,13 +529,18 @@ test('frontend renders the handling log as a rope-knot timeline', () => {
assert.match(js, /'<div class="aksrt-after-sale-timeline__head">' \+/)
assert.match(js, /'<div class="aksrt-after-sale-timeline__body">';/)
// 订单详情弹窗:每条工单同样渲染时间线,载荷带上 handling_log
// 订单详情弹窗:不再渲染售后状态节点进程,只保留状态徽章 + 原因 + 金额 + 「查看详细」;
// 完整处理记录由点开的售后详细弹窗呈现,载荷仍带上 handling_log
assert.ok(!center.includes('gatewayResultText'), 'dead gateway-result renderer must be removed')
assert.ok(!center.includes('<dt>渠道结果</dt>'), 'dead 渠道结果 row must be removed')
assert.ok(!center.includes('<dt>处理备注</dt>'), 'single 处理备注 row must be removed')
assert.match(center, /function orderDetailHandlingLogHtml\(log\)/)
assert.match(center, /orderDetailHandlingLogHtml\(item\.handling_log\)/)
assert.ok(!center.includes('orderDetailHandlingLogHtml'), 'order detail modal must not render the timeline')
assert.ok(!center.includes('AFTER_SALE_STATUS_LABELS'), 'order detail modal must not carry timeline labels')
assert.ok(!center.includes('handlingEntryTitle'), 'order detail modal must not carry the timeline title helper')
assert.ok(!center.includes('aksrt-after-sale-timeline'), 'order detail modal must not emit timeline markup')
assert.match(center, /handling_log: Array\.isArray\(item\.handling_log\) \? item\.handling_log : \[\],/)
// 「查看详细」入口保留:处理记录从这里点开
assert.match(center, /data-aksrt-after-sale-detail="' \+ recordPayload \+ '"/)
// 时间线样式:竖线穿节点、末项不收口,左列固定宽度、右列自适应
const css = read('assets/css/frontend/modal-runtime.css')