feat(exc): 专长交易 read-only monitoring pages
New nav group with four pages against the Exc admin API: - /exc/demands — status/mode filters, detail sheet with related services, quotes and dispatch rounds - /exc/dispatches — status/round filters - /exc/orders — status/payment filters, detail sheet with items and 状态流转 audit trail - /exc/providers — status/verified filters, detail sheet with dispatch settings and status logs Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
@@ -351,3 +351,187 @@ export interface RetranslateResult {
|
||||
translation_version_id: number
|
||||
queued_blocks: number
|
||||
}
|
||||
|
||||
// --- Exc 专长交易(只读监控)---
|
||||
|
||||
export interface ExcUser {
|
||||
uid: string
|
||||
display_name?: string | null
|
||||
}
|
||||
|
||||
export type ExcDemandStatus =
|
||||
| 'draft'
|
||||
| 'open'
|
||||
| 'quotation_closed'
|
||||
| 'order_placed'
|
||||
| 'fulfilled'
|
||||
| 'broadcasting'
|
||||
| 'matched'
|
||||
| 'converted'
|
||||
| 'expired'
|
||||
| 'canceled'
|
||||
|
||||
export type ExcDispatchMode = 'instant_accept' | 'quote' | 'scheduled_booking' | 'manual_selection'
|
||||
|
||||
export interface ExcDemand {
|
||||
kind?: string
|
||||
id: number
|
||||
title?: string | null
|
||||
status: ExcDemandStatus
|
||||
dispatch_mode?: ExcDispatchMode | null
|
||||
service_type?: string | null
|
||||
buyer?: ExcUser | null
|
||||
category_id?: string | null
|
||||
currency_code?: string | null
|
||||
ref_amount?: number | null
|
||||
matched_provider_uid?: string | null
|
||||
matched_at?: string | null
|
||||
quotes_count: number
|
||||
dispatches_count: number
|
||||
required_at?: string | null
|
||||
published_at?: string | null
|
||||
created_at?: string
|
||||
// detail-only
|
||||
summary?: string | null
|
||||
content?: string | null
|
||||
address?: unknown
|
||||
quote_deadline?: string | null
|
||||
related_services?: Array<{ id: number; title?: string | null; category_name?: string | null }>
|
||||
quotes?: Array<{
|
||||
id: number
|
||||
user_uid: string
|
||||
price: number
|
||||
currency_code?: string
|
||||
message?: string | null
|
||||
user?: ExcUser | null
|
||||
created_at?: string
|
||||
}>
|
||||
dispatches?: ExcDemandDispatchRow[]
|
||||
}
|
||||
|
||||
export interface ExcDemandDispatchRow {
|
||||
id: number
|
||||
provider?: ExcUser | null
|
||||
round_no: number
|
||||
status: ExcDispatchStatus
|
||||
score?: number | null
|
||||
distance_meters?: number | null
|
||||
eta_minutes?: number | null
|
||||
responded_at?: string | null
|
||||
}
|
||||
|
||||
export type ExcDispatchStatus =
|
||||
| 'sent'
|
||||
| 'delivered'
|
||||
| 'viewed'
|
||||
| 'accepted'
|
||||
| 'rejected'
|
||||
| 'ignored'
|
||||
| 'expired'
|
||||
| 'taken_by_other'
|
||||
|
||||
export interface ExcDispatch {
|
||||
kind?: string
|
||||
id: number
|
||||
demand?: { id: number; title?: string | null } | null
|
||||
provider?: ExcUser | null
|
||||
round_no: number
|
||||
status: ExcDispatchStatus
|
||||
score?: number | null
|
||||
similarity?: number | null
|
||||
distance_meters?: number | null
|
||||
eta_minutes?: number | null
|
||||
auto_grab_eligible: boolean
|
||||
sent_at?: string | null
|
||||
viewed_at?: string | null
|
||||
responded_at?: string | null
|
||||
expires_at?: string | null
|
||||
}
|
||||
|
||||
export type ExcOrderStatus =
|
||||
| 'created'
|
||||
| 'confirmed'
|
||||
| 'started'
|
||||
| 'consumed'
|
||||
| 'paid'
|
||||
| 'fulfilled'
|
||||
| 'canceled'
|
||||
|
||||
export interface ExcOrder {
|
||||
kind?: string
|
||||
id: number
|
||||
title?: string | null
|
||||
status: ExcOrderStatus
|
||||
payment_status?: 'UNPAID' | 'PAID' | null
|
||||
buyer?: ExcUser | null
|
||||
provider?: ExcUser | null
|
||||
currency_code?: string | null
|
||||
total_amount?: number | null
|
||||
actual_total_amount?: number | null
|
||||
platform_fee_amount?: number | null
|
||||
provider_net_amount?: number | null
|
||||
commission_rate?: number | null
|
||||
cancellation_fee_amount?: number | null
|
||||
paid_at?: string | null
|
||||
settled_at?: string | null
|
||||
escrow_release_at?: string | null
|
||||
escrow_released_at?: string | null
|
||||
order_date?: string | null
|
||||
created_at?: string
|
||||
// detail-only
|
||||
buyer_remarks?: string | null
|
||||
pay_order_no?: string | null
|
||||
paid_channel?: string | null
|
||||
items?: Array<{
|
||||
id: number
|
||||
name?: string | null
|
||||
status?: string
|
||||
price?: number
|
||||
quantity?: number
|
||||
line_total?: number
|
||||
service_type?: string
|
||||
}>
|
||||
transactions?: Array<{
|
||||
id: number
|
||||
previous_status?: string | null
|
||||
new_status?: string
|
||||
changed_by?: string | null
|
||||
changed_by_type?: string | null
|
||||
reason?: string | null
|
||||
changed_at?: string
|
||||
}>
|
||||
}
|
||||
|
||||
export type ExcProviderStatus = 'offline' | 'online' | 'inactive' | 'busy'
|
||||
|
||||
export interface ExcProvider {
|
||||
kind?: string
|
||||
user?: ExcUser | null
|
||||
user_uid: string
|
||||
status: ExcProviderStatus
|
||||
is_disabled: boolean
|
||||
is_verified: boolean
|
||||
rating?: number | null
|
||||
completed_jobs?: number | null
|
||||
online_at?: string | null
|
||||
offline_at?: string | null
|
||||
last_location_at?: string | null
|
||||
current_service_order_id?: number | null
|
||||
created_at?: string
|
||||
// detail-only
|
||||
dispatch_setting?: {
|
||||
auto_grab_enabled?: boolean
|
||||
service_whitelist?: string[]
|
||||
min_price?: number | null
|
||||
max_radius_meters?: number | null
|
||||
max_eta_minutes?: number | null
|
||||
daily_accept_cap?: number | null
|
||||
accepted_today?: number
|
||||
} | null
|
||||
status_logs?: Array<{
|
||||
from_status?: string | null
|
||||
to_status?: string
|
||||
reason?: string | null
|
||||
created_at?: string
|
||||
}>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user