This commit is contained in:
2026-08-07 14:47:11 +08:00
parent e7cc0cf18b
commit 7ac173fac4
21 changed files with 1714 additions and 791 deletions
@@ -124,6 +124,7 @@ export interface UnifiedOrderResource {
expressTrackingNo?: string | null
remark?: string | null
customerRemark?: string | null
latestInternalNote?: string | null
internalRemark?: string | null
createdBy?: string | null
}
@@ -208,6 +209,36 @@ export interface UnifiedOrderDetailResource {
timeline: UnifiedOrderTimelineEvent[]
}
export interface UnifiedOrderFeeDetailResource {
id: number | string
inboundId: number | string
inboundCode: string | null
reviewStatus: string | null
direction: string | null
customerName: string | null
invoiceTitle: string | null
businessDate: string | null
channelName: string | null
destinationName: string | null
fbaNo?: string | null
packageCount: number | null
actualGrossWeightKg: number | null
actualVolumeCbm: number | null
feeTypeNameSnapshot: string | null
currency: string | null
amount: number | null
chargeableQuantity: number | null
chargeUnit: string | null
unitPrice: number | null
inboundedAt: string | null
outboundAt?: string | null
storageDays?: number | null
settlementIncluded: boolean | null
billNo?: string | null
settlementStartDate?: string | null
settlementEndDate?: string | null
}
export interface UnifiedOrderPageResource {
records: UnifiedOrderResource[]
page: number
@@ -327,14 +358,6 @@ export async function getPlatformUnifiedOrder(tenantId: string, orderId: string)
return { ...result, summary: normalizeRow(result.summary) }
}
export function assignPlatformUnifiedOrderCarrier(tenantId: string, orderId: string, carrierId: string) {
return http.put<ApiEnvelope<void>, ApiEnvelope<void>>(
`/platform/v1/orders/first-leg/${orderId}/carrier`,
{ carrierId },
{ params: { tenantId } },
).then(unwrapApiResponse)
}
export function approvePlatformUnifiedOrder(tenantId: string, orderId: string) {
return http.post<ApiEnvelope<void>, ApiEnvelope<void>>(
`/platform/v1/orders/first-leg/${orderId}/approve`,
@@ -351,6 +374,14 @@ export function addPlatformUnifiedOrderNote(tenantId: string, orderId: string, c
).then(unwrapApiResponse)
}
export async function listPlatformUnifiedOrderFeeDetails(accountId: string, inboundId: string) {
const response = await http.get<ApiEnvelope<UnifiedOrderFeeDetailResource[]>, ApiEnvelope<UnifiedOrderFeeDetailResource[]>>(
`/platform/v1/inbounds/${encodeURIComponent(inboundId)}/fee-details`,
{ params: { accountId } },
)
return unwrapApiResponse(response)
}
export function unifiedOrderStatusLabel(status: UnifiedOrderMainStatus) {
return unifiedOrderStatusOptions.find((item) => item.value === status)?.label || status
}