This commit is contained in:
2026-11-06 13:33:21 +08:00
parent d409094226
commit 97bc66f28c
8 changed files with 60 additions and 26 deletions
+2 -2
View File
@@ -2,9 +2,9 @@ import { apiRequest } from '@/api/http'
export interface BudgetResult { status: string; usable: boolean; amountCny: number | string; message: string; orderNo: string | null }
const base = '/merchant/v1/last-leg/order-budgets'
// 创建订单时后端在同一事务记录冻结请求,客户端只在详情核对状态和重试明确失败。
export function readOrderFunding(kind: 'procurement' | 'trucking', orderNo: string) {
export function readOrderFunding(kind: 'procurement' | 'trucking' | 'looseboard', orderNo: string) {
return apiRequest<BudgetResult>({ method: 'GET', url: base + '/' + kind + '/orders/' + encodeURIComponent(orderNo) })
}
export function retryOrderFunding(kind: 'procurement' | 'trucking', orderNo: string) {
export function retryOrderFunding(kind: 'procurement' | 'trucking' | 'looseboard', orderNo: string) {
return apiRequest<BudgetResult>({ method: 'POST', url: base + '/' + kind + '/orders/' + encodeURIComponent(orderNo) + '/retry' })
}