Files
client-web/src/modules/cross-border/api/orderBudgets.ts
T

11 lines
773 B
TypeScript
Raw Normal View History

2026-10-29 13:37:28 +08:00
import { apiRequest } from '@/api/http'
2026-10-30 17:59:48 +08:00
export interface BudgetResult { status: string; usable: boolean; amountCny: number | string; message: string; orderNo: string | null }
2026-10-29 13:37:28 +08:00
const base = '/merchant/v1/last-leg/order-budgets'
2026-10-30 17:59:48 +08:00
// 创建订单时后端在同一事务记录冻结请求,客户端只在详情核对状态和重试明确失败。
export function readOrderFunding(kind: 'procurement' | 'trucking', orderNo: string) {
return apiRequest<BudgetResult>({ method: 'GET', url: base + '/' + kind + '/orders/' + encodeURIComponent(orderNo) })
}
export function retryOrderFunding(kind: 'procurement' | 'trucking', orderNo: string) {
return apiRequest<BudgetResult>({ method: 'POST', url: base + '/' + kind + '/orders/' + encodeURIComponent(orderNo) + '/retry' })
2026-10-29 13:37:28 +08:00
}