feat(rock): 关联业务工单升级为双单号清晰展示(系统工单号 + 创建商户单号)

1. 后端批量反查商户单号:在 RockService.ListTokens 中支持批量反查关联订单创建时由调用方传入的 ClientOrderNo(商户单号),并拓展支持通过商户单号进行全局关键词模糊搜索;
2. 管理后台双单号排版升级:在 Rock 管理表格中将「关联业务工单」升级为双行呈现——第一行高亮展示内部统一系统工单号 (FO2026...),第二行辅助展示外部电商/商户原始单号 (如 test4 / 拼多多单号),两行均支持一键独立复制;
3. 单元测试全覆盖:补充商户单号自动挂载关联与按商户单号模糊检索的自动化单测,确保对单溯源精准无误。
This commit is contained in:
yml2213
2026-10-05 19:18:52 +08:00
parent 262376e603
commit 9e260059ee
5 changed files with 104 additions and 11 deletions
+1
View File
@@ -301,6 +301,7 @@ export interface RockTokenItem {
region: string
status: string
assigned_order_no?: string
client_order_no?: string
expected_uid?: string
actual_role_name?: string
actual_role_id?: string
+35 -9
View File
@@ -357,15 +357,41 @@ export default function PlatformRock() {
{
title: '关联业务工单',
dataIndex: 'assigned_order_no',
width: 190,
render: (orderNo) =>
orderNo ? (
<Text code copyable={{ text: orderNo }} style={{ fontWeight: 600, color: '#1d4ed8' }}>
{orderNo}
</Text>
) : (
<Text type="secondary">-</Text>
),
width: 220,
render: (orderNo, record) => {
if (!orderNo) {
return <Text type="secondary">-</Text>
}
return (
<Space direction="vertical" size={3}>
{/* 系统履约工单号 */}
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
<Text
code
copyable={{ text: orderNo }}
style={{ fontWeight: 600, color: '#1d4ed8', fontSize: 12 }}
title="系统履约工单号"
>
{orderNo}
</Text>
</div>
{/* 创建订单时的商户单号 */}
{record.client_order_no ? (
<div style={{ display: 'flex', alignItems: 'center', gap: 4, fontSize: 12 }}>
<span style={{ color: '#64748b' }}>商户:</span>
<Text
copyable={{ text: record.client_order_no }}
type="secondary"
style={{ fontFamily: 'monospace', fontSize: 12 }}
title="创建订单时的商户单号 (ClientOrderNo)"
>
{record.client_order_no}
</Text>
</div>
) : null}
</Space>
)
},
},
{
title: '预期 UID vs 扫码角色 (风控门禁)',