完善订单交接结账流程留痕

This commit is contained in:
yml2213
2026-08-28 23:48:32 +08:00
parent a9a9127076
commit c87883cc65
27 changed files with 915 additions and 5 deletions
@@ -46,6 +46,8 @@ export interface Order {
growth_points_awarded?: number
growth_points_awarded_at?: string
account_snapshot?: Record<string, unknown>
account_source?: 'internal' | 'external' | string
source_channel?: string
listing_snapshot?: string
checkout_info?: string
counter_info?: string
@@ -149,6 +151,27 @@ export interface HandoffRecord {
created_at: string
}
export interface ProcessEvent {
id: number
business_type: string
business_id: number
stage: string
action: string
actor_type: 'user' | 'admin' | 'system' | string
actor_id: number
actor_name: string
target_type: string
target_id?: number
target_name: string
content: string
reason: string
payload: Record<string, unknown>
attachment_urls: string[]
state_before: Record<string, unknown>
state_after: Record<string, unknown>
created_at: string
}
export interface PaymentOrder {
id: number
payment_no: string
@@ -288,6 +311,13 @@ export async function fetchHandoffRecords(id: string | number) {
return Array.isArray(data.data?.items) ? data.data.items : []
}
export async function fetchAdminOrderProcessEvents(id: string | number) {
const { data } = await apiClient.get<ApiResponse<{ items: ProcessEvent[] }>>(
`/admin/orders/${id}/process-events`
)
return Array.isArray(data.data?.items) ? data.data.items : []
}
export async function confirmReceive(id: number) {
const { data } = await apiClient.post<ApiResponse<{ confirmed: boolean }>>(
`/orders/${id}/confirm-receive`