修复平台代管订单流程
This commit is contained in:
@@ -33,7 +33,15 @@ export interface Order {
|
||||
counter_info?: string
|
||||
status: OrderStatus
|
||||
handoff_status: HandoffStatus
|
||||
handoff_mode?: string
|
||||
settlement_mode?: string
|
||||
managed_admin_id?: number
|
||||
settlement_status: SettlementStatus
|
||||
offline_settlement_status?: string
|
||||
offline_settlement_amount_cent?: number
|
||||
offline_settlement_remark?: string
|
||||
offline_settled_by?: number
|
||||
offline_settled_at?: string
|
||||
refund_status?: string
|
||||
refund_amount_cent?: number
|
||||
deposit_hold_status?: string
|
||||
@@ -51,6 +59,11 @@ export interface Order {
|
||||
|
||||
export interface AdminActions {
|
||||
reset_handoff?: AdminAction
|
||||
platform_handoff?: AdminAction
|
||||
platform_checkout_confirm?: AdminAction
|
||||
platform_checkout_counter?: AdminAction
|
||||
platform_checkout_dispute?: AdminAction
|
||||
platform_offline_settlement?: AdminAction
|
||||
}
|
||||
|
||||
export interface AdminAction {
|
||||
@@ -373,6 +386,46 @@ export async function adminResetHandoff(id: number, reason: string) {
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adminPlatformHandoff(id: number, content: string, reason: string) {
|
||||
const { data } = await apiClient.post<ApiResponse<HandoffRecord>>(
|
||||
`/admin/orders/${id}/platform-handoff`,
|
||||
{ content, reason }
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adminPlatformCheckoutConfirm(id: number, reason: string) {
|
||||
const { data } = await apiClient.post<ApiResponse<{ confirmed: boolean }>>(
|
||||
`/admin/orders/${id}/platform-checkout/confirm`,
|
||||
{ reason }
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adminPlatformCheckoutCounter(id: number, payload: SubmitCheckoutPayload) {
|
||||
const { data } = await apiClient.post<ApiResponse<Checkout>>(
|
||||
`/admin/orders/${id}/platform-checkout/counter`,
|
||||
toCheckoutRequest(payload)
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adminPlatformCheckoutDispute(id: number, reason: string) {
|
||||
const { data } = await apiClient.post<ApiResponse<{ disputed: boolean }>>(
|
||||
`/admin/orders/${id}/platform-checkout/dispute`,
|
||||
{ reason }
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adminMarkOfflineSettlement(id: number, remark: string) {
|
||||
const { data } = await apiClient.post<ApiResponse<{ settled: boolean }>>(
|
||||
`/admin/orders/${id}/offline-settlement`,
|
||||
{ remark }
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adminRefundStatus(id: number) {
|
||||
const { data } = await apiClient.get<ApiResponse<RefundStatus>>(
|
||||
`/admin/orders/${id}/refund-status`
|
||||
|
||||
Reference in New Issue
Block a user