优化:已交付订单保留复制/打开发货链接,去掉作废操作
- 已交付订单仍可复用未过期链接查看兑换结果,但不再生成/续期新链接 - 商户后台已交付订单仅显示复制/打开,已作废/已过期单独标识 - 发货中/已取消订单不展示链接操作,避免无效按钮
This commit is contained in:
@@ -260,9 +260,29 @@ export function OrdersTab({
|
||||
key: 'delivery_link',
|
||||
width: 160,
|
||||
render: (_, record) => {
|
||||
// 非可发货状态不再展示链接作废等操作;已交付订单保留复制/打开,便于查看兑换结果。
|
||||
if (record.order_status === 'cancelled') {
|
||||
return <Typography.Text type="secondary">订单已取消</Typography.Text>
|
||||
}
|
||||
if (record.order_status === 'delivering') {
|
||||
return <Typography.Text type="secondary">发货中</Typography.Text>
|
||||
}
|
||||
if (record.order_status === 'delivered') {
|
||||
if (record.delivery_link_revoked_at) {
|
||||
return <Tag color="red">已作废</Tag>
|
||||
}
|
||||
const expired = !record.delivery_link_expires_at
|
||||
|| new Date(record.delivery_link_expires_at).getTime() < Date.now()
|
||||
if (expired) {
|
||||
return <Typography.Text type="secondary">已过期</Typography.Text>
|
||||
}
|
||||
return (
|
||||
<Space size={4} wrap>
|
||||
<Button type="link" size="small" onClick={() => onCopyLink(record.order_no)}>复制</Button>
|
||||
<Button type="link" size="small" onClick={() => onOpenLink(record.order_no)}>打开</Button>
|
||||
</Space>
|
||||
)
|
||||
}
|
||||
if (record.delivery_link_revoked_at) {
|
||||
return <Button type="link" size="small" onClick={() => onRestoreLink(record.order_no)}>恢复链接</Button>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user