押金解冻天数可配置与待解冻押金扣减,超时订单保留记录
This commit is contained in:
@@ -40,6 +40,7 @@ import { formatDateTime } from '@/utils/date-time'
|
||||
|
||||
const STATUS_OPTIONS = [
|
||||
{ value: '', label: '全部订单' },
|
||||
{ value: 'open', label: '已超时' },
|
||||
{ value: 'in_progress', label: '代练中' },
|
||||
{ value: 'pending_acceptance', label: '待验收' },
|
||||
{ value: 'problem', label: '问题单' },
|
||||
@@ -52,6 +53,7 @@ const STATUS_SUMMARY_ITEMS = [
|
||||
{ key: 'in_progress', label: '代练中', note: '正在执行中的订单' },
|
||||
{ key: 'pending_acceptance', label: '待验收', note: '已提交,等待审核' },
|
||||
{ key: 'problem', label: '问题单', note: '需要补充或重新处理' },
|
||||
{ key: 'open', label: '已超时', note: '超时被系统退回的订单数' },
|
||||
{ key: 'accepted', label: '已验收', note: '已完成并结算的订单' },
|
||||
{ key: 'cancelled', label: '已取消', note: '已结束且不再继续' },
|
||||
] as const
|
||||
@@ -730,6 +732,7 @@ function formatMoney(value: number | undefined) {
|
||||
|
||||
function formatStatus(status: string) {
|
||||
const labels: Record<string, string> = {
|
||||
open: '已超时',
|
||||
in_progress: '代练中',
|
||||
pending_acceptance: '待验收',
|
||||
problem: '问题单',
|
||||
@@ -741,6 +744,7 @@ function formatStatus(status: string) {
|
||||
|
||||
function getStatusHint(status: string) {
|
||||
const hints: Record<string, string> = {
|
||||
open: '任务已超时被系统判定失败,如需继续可前往大厅重新抢单。',
|
||||
in_progress: '订单进行中,完成后请及时提交验收资料。',
|
||||
pending_acceptance: '已提交验收,等待后台审核。',
|
||||
problem: '后台已标记问题,请根据备注调整后重新提交。',
|
||||
@@ -755,6 +759,7 @@ function resolveStatusColor(status: string) {
|
||||
if (status === 'cancelled') return 'default'
|
||||
if (status === 'problem') return 'red'
|
||||
if (status === 'pending_acceptance') return 'gold'
|
||||
if (status === 'open') return 'red'
|
||||
return 'blue'
|
||||
}
|
||||
|
||||
|
||||
@@ -653,6 +653,8 @@ export default function WorkerProfilePage() {
|
||||
{ value: 'withdraw_paid', label: '提现打款' },
|
||||
{ value: 'deposit_freeze', label: '冻结押金' },
|
||||
{ value: 'deposit_release', label: '释放押金' },
|
||||
{ value: 'deposit_pending_unfreeze', label: '押金待解冻' },
|
||||
{ value: 'deposit_unfreeze', label: '押金已解冻' },
|
||||
{ value: 'deposit_deduction', label: '扣除押金' },
|
||||
{ value: 'reward_settlement', label: '结算报酬' },
|
||||
]}
|
||||
@@ -904,6 +906,14 @@ export default function WorkerProfilePage() {
|
||||
style={{ marginBottom: 16 }}
|
||||
/>
|
||||
) : null}
|
||||
<Alert
|
||||
showIcon
|
||||
type="warning"
|
||||
message={`每天限提现 1 次;有押金的工单验收通过后,押金需 ${Number(
|
||||
financeConfig?.depositUnfreezeDays ?? 3,
|
||||
)} 天解冻到账后方可提现。`}
|
||||
style={{ marginBottom: 16 }}
|
||||
/>
|
||||
<Form.Item label="可提现余额">
|
||||
<Typography.Text strong>
|
||||
{formatMoney(resolveAvailableForWithdraw(worker, summary))}
|
||||
@@ -1057,7 +1067,14 @@ function buildMetricCards(worker: WorkerUser, summary?: WorkerProfileSummary): M
|
||||
{
|
||||
label: '冻结押金',
|
||||
value: toYuan(worker.wallet.frozenDepositAmount),
|
||||
note: '抢单后冻结,验收通过会自动释放',
|
||||
note: '抢单后冻结,验收通过后 3 天自动解冻',
|
||||
prefix: '¥',
|
||||
precision: 2,
|
||||
},
|
||||
{
|
||||
label: '待解冻押金',
|
||||
value: toYuan(worker.wallet.pendingUnfreezeAmount),
|
||||
note: '验收通过后待 3 天解冻到账的押金',
|
||||
prefix: '¥',
|
||||
precision: 2,
|
||||
},
|
||||
@@ -1146,6 +1163,8 @@ function formatLedgerType(ledgerType: string) {
|
||||
withdraw_paid: '提现打款',
|
||||
deposit_freeze: '冻结押金',
|
||||
deposit_release: '释放押金',
|
||||
deposit_pending_unfreeze: '押金待解冻',
|
||||
deposit_unfreeze: '押金已解冻',
|
||||
deposit_deduction: '扣除押金',
|
||||
reward_settlement: '结算报酬',
|
||||
}
|
||||
@@ -1157,6 +1176,8 @@ function resolveLedgerTagColor(ledgerType: string) {
|
||||
if (ledgerType === 'withdraw_paid') return 'purple'
|
||||
if (ledgerType === 'deposit_freeze') return 'gold'
|
||||
if (ledgerType === 'deposit_release') return 'green'
|
||||
if (ledgerType === 'deposit_pending_unfreeze') return 'orange'
|
||||
if (ledgerType === 'deposit_unfreeze') return 'green'
|
||||
if (ledgerType === 'deposit_deduction') return 'red'
|
||||
if (ledgerType === 'reward_settlement') return 'cyan'
|
||||
return 'default'
|
||||
|
||||
Reference in New Issue
Block a user