优化待解冻, 平台杂项配置优化
This commit is contained in:
@@ -727,64 +727,8 @@ function ScheduledJobCard({
|
||||
}
|
||||
|
||||
if (job.type === 'deposit_unfreeze' || job.id === 'deposit-unfreeze') {
|
||||
return (
|
||||
<Card
|
||||
size="small"
|
||||
title={
|
||||
<Space wrap>
|
||||
<Switch
|
||||
checked={job.enabled !== false}
|
||||
onChange={(enabled) => onChange({ ...job, enabled })}
|
||||
/>
|
||||
<span>{formatScheduledJobTitle(job)}</span>
|
||||
<Tag color={job.enabled ? 'green' : 'default'}>{job.enabled ? '已启用' : '已停用'}</Tag>
|
||||
</Space>
|
||||
}
|
||||
extra={
|
||||
<Button icon={<ReloadOutlined />} loading={running} onClick={onRun}>
|
||||
立即解冻
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
<Typography.Paragraph type="secondary" style={{ marginBottom: 12 }}>
|
||||
将验收报酬与押金一起进入待解冻,在到期后自动转入可用余额(默认验收后 3 天到账)。
|
||||
</Typography.Paragraph>
|
||||
<div className="platform-form-grid">
|
||||
<NumberField
|
||||
label="执行间隔(秒)"
|
||||
value={job.intervalSeconds}
|
||||
min={1}
|
||||
onChange={(intervalSeconds) => onChange({ ...job, intervalSeconds })}
|
||||
/>
|
||||
<NumberField
|
||||
label="每次解冻数量"
|
||||
value={Number(job.config?.scanLimit ?? 100)}
|
||||
min={1}
|
||||
onChange={(scanLimit) => onChange({ ...job, config: { ...job.config, scanLimit } })}
|
||||
/>
|
||||
</div>
|
||||
{runtime ? (
|
||||
<Alert
|
||||
className="platform-section-gap"
|
||||
type={
|
||||
runtime.lastStatus === 'ok' || runtime.lastStatus === 'success'
|
||||
? 'success'
|
||||
: runtime.lastStatus
|
||||
? 'warning'
|
||||
: 'info'
|
||||
}
|
||||
showIcon
|
||||
message={runtime.lastMessage || '尚未运行'}
|
||||
description={[
|
||||
`扫描 ${runtime.lastCheckedCount ?? 0}`,
|
||||
`解冻 ${runtime.lastAsset ?? 0}`,
|
||||
`上次:${formatAdminDateTime(runtime.lastFinishedAt || runtime.lastRunAt)}`,
|
||||
`下次:${formatAdminDateTime(runtime.nextRunAt)}`,
|
||||
].join(' · ')}
|
||||
/>
|
||||
) : null}
|
||||
</Card>
|
||||
)
|
||||
// 押金到期解冻配置已迁至 接单平台 → 杂项配置,这里不再渲染。
|
||||
return null
|
||||
}
|
||||
const accounts = job.config?.accounts || []
|
||||
const defaultThreshold = Number(job.config?.assetThreshold ?? 500)
|
||||
@@ -1021,9 +965,6 @@ function formatScheduledJobTitle(job: AdminScheduledJobItem) {
|
||||
if (job.type === 'work_order_timeout' || job.id === 'work-order-timeout') {
|
||||
return '接单工单超时扫描'
|
||||
}
|
||||
if (job.type === 'deposit_unfreeze' || job.id === 'deposit-unfreeze') {
|
||||
return '押金到期解冻'
|
||||
}
|
||||
return job.id || job.type || '定时任务'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user