超时订单按打手统计,抢单大厅标注限时任务
This commit is contained in:
@@ -196,6 +196,18 @@ export default function WorkersPanel() {
|
||||
width: 120,
|
||||
render: (_, row) => formatMoney(row.wallet.frozenDepositAmount),
|
||||
},
|
||||
{
|
||||
title: '超时订单',
|
||||
width: 110,
|
||||
render: (_, row) => {
|
||||
const count = Number(row.timeoutOrderCount || 0)
|
||||
return count > 0 ? (
|
||||
<Tag color="red">{count} 单</Tag>
|
||||
) : (
|
||||
<Typography.Text type="secondary">0</Typography.Text>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
width: 130,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EyeOutlined, ReloadOutlined, SearchOutlined } from '@ant-design/icons'
|
||||
import { ClockCircleOutlined, EyeOutlined, ReloadOutlined, SearchOutlined } from '@ant-design/icons'
|
||||
import { useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import {
|
||||
Alert,
|
||||
@@ -378,6 +378,14 @@ export default function WorkerHallPage() {
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{Number(order.timeoutMinutes || 0) > 0 ? (
|
||||
<div className="worker-hall-card-sharing">
|
||||
<Tag color="orange" icon={<ClockCircleOutlined />}>
|
||||
限时 {order.timeoutMinutes} 分钟
|
||||
</Tag>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<div className="worker-hall-card-amount-row">
|
||||
<div className="worker-hall-card-amount">
|
||||
{formatMoney(order.rewardAmount)}
|
||||
@@ -511,6 +519,15 @@ export default function WorkerHallPage() {
|
||||
<Descriptions.Item label="冻结押金">
|
||||
{formatMoney(detailOrder.freezeDepositAmount)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="任务时限">
|
||||
{Number(detailOrder.timeoutMinutes || 0) > 0 ? (
|
||||
<Tag color="orange" icon={<ClockCircleOutlined />}>
|
||||
限时 {detailOrder.timeoutMinutes} 分钟
|
||||
</Tag>
|
||||
) : (
|
||||
'不限时'
|
||||
)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="发布时间">
|
||||
{formatDateTime(resolvePublishedTime(detailOrder))}
|
||||
</Descriptions.Item>
|
||||
|
||||
@@ -87,6 +87,7 @@ type MetricCardItem = {
|
||||
prefix?: string
|
||||
suffix?: string
|
||||
precision?: number
|
||||
danger?: boolean
|
||||
}
|
||||
|
||||
export default function WorkerProfilePage() {
|
||||
@@ -519,6 +520,7 @@ export default function WorkerProfilePage() {
|
||||
prefix={item.prefix}
|
||||
suffix={item.suffix}
|
||||
precision={item.precision}
|
||||
valueStyle={item.danger ? { color: '#cf1322' } : undefined}
|
||||
/>
|
||||
<Typography.Text type="secondary">{item.note}</Typography.Text>
|
||||
</Card>
|
||||
@@ -1086,6 +1088,13 @@ function buildMetricCards(worker: WorkerUser, summary?: WorkerProfileSummary): M
|
||||
note: '已完成并验收通过的工单数量',
|
||||
suffix: '单',
|
||||
},
|
||||
{
|
||||
label: '超时订单',
|
||||
value: Number(summary?.timeoutOrderCount || 0),
|
||||
note: '因任务超时被系统判定失败的工单数量',
|
||||
suffix: '单',
|
||||
danger: Number(summary?.timeoutOrderCount || 0) > 0,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ export type WorkerUser = {
|
||||
totalCreditedAmount: number
|
||||
totalSettledAmount: number
|
||||
}
|
||||
timeoutOrderCount?: number
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
reviewedAt: string | null
|
||||
@@ -35,6 +36,7 @@ export type WorkerUser = {
|
||||
|
||||
export type WorkerProfileSummary = {
|
||||
acceptedOrderCount: number
|
||||
timeoutOrderCount: number
|
||||
pendingWithdrawAmount: number
|
||||
approvedWithdrawAmount: number
|
||||
pendingRechargeAmount: number
|
||||
|
||||
Reference in New Issue
Block a user