diff --git a/src/app/(main)/comparison-records/page.tsx b/src/app/(main)/comparison-records/page.tsx index a5311ac..a7dc9f4 100644 --- a/src/app/(main)/comparison-records/page.tsx +++ b/src/app/(main)/comparison-records/page.tsx @@ -4,8 +4,9 @@ import { useEffect, useState } from 'react'; import type { CSSProperties, ReactNode } from 'react'; import { App, Button, Card, Col, Collapse, DatePicker, Descriptions, Divider, Drawer, Input, InputNumber, - Row, Select, Space, Spin, Statistic, Table, Tag, Typography, + Row, Select, Space, Spin, Statistic, Table, Tag, Tooltip, Typography, } from 'antd'; +import { ExclamationCircleOutlined } from '@ant-design/icons'; import type { ColumnsType } from 'antd/es/table'; import dayjs, { type Dayjs } from 'dayjs'; import { api, errMsg } from '@/lib/api'; @@ -19,28 +20,16 @@ import type { const { RangePicker } = DatePicker; -// 主状态只对外呈现生命周期口径;below_minimum/store_closed 是迁移前历史兼容值。 +// admin_status 只有四个生命周期值;外部缺失由 outcome_hint(感叹号)承载。 const STATUS_COLOR: Record = { success: 'green', - below_minimum: 'green', failed: 'red', - store_closed: 'red', - store_not_found: 'red', - items_not_found: 'red', - no_delivery: 'red', - unsupported: 'red', cancelled: 'default', running: 'blue', }; const STATUS_LABEL: Record = { success: '成功', - below_minimum: '成功', failed: '失败', - store_closed: '失败', - store_not_found: '失败', - items_not_found: '失败', - no_delivery: '失败', - unsupported: '失败', cancelled: '中途退出', running: '进行中', }; @@ -413,7 +402,16 @@ export default function ComparisonRecordsPage() { ), }, - { title: '状态', dataIndex: 'status', width: 72, render: (s: string) => {STATUS_LABEL[s] || s} }, + { title: '状态', dataIndex: 'admin_status', width: 88, render: (_: string, r) => ( + + {STATUS_LABEL[r.admin_status] || r.admin_status} + {r.outcome_hint && ( + + + + )} + + ) }, // 产品文档指定展示“原平台”;字段名仍沿用后端 source_platform_name。 { title: '原平台', dataIndex: 'source_platform_name', width: 90, render: (v) => v || '-' }, { @@ -624,7 +622,10 @@ export default function ComparisonRecordsPage() { {detail.phone || (detail.user_id != null ? `#${detail.user_id}` : '匿名')}{detail.nickname ? `(${detail.nickname})` : ''} - {STATUS_LABEL[detail.status] || detail.status} + + {STATUS_LABEL[detail.admin_status] || detail.admin_status} + {detail.outcome_hint && } + {detail.business_type} {fmtMs(detail.total_ms)} {detail.step_count ?? '-'}