fix(overseas): expose permission-gated cargo discard review

This commit is contained in:
2026-10-04 16:57:16 +08:00
parent 1d73a40a07
commit cc973c72c0
6 changed files with 152 additions and 1 deletions
@@ -365,6 +365,15 @@ export async function getLastMileOrder(orderId: string) {
return unwrapApiResponse(response)
}
export async function reviewCargoDiscard(discardNo: string, customerId: string, decision: 'APPROVE' | 'REJECT', remark?: string) {
const response = await http.post<ApiEnvelope<unknown>, ApiEnvelope<unknown>>(
`/platform/v1/last-leg/cargo-discards/${encodeURIComponent(discardNo)}/review`,
{ decision, remark: remark?.trim() || undefined },
{ params: { customerId } },
)
return unwrapApiResponse(response)
}
export async function reviewReturnOrder(returnNo: string, customerId: string, decision: 'APPROVE' | 'REJECT', remark?: string) {
const response = await http.post<ApiEnvelope<unknown>, ApiEnvelope<unknown>>(
`/platform/v1/last-leg/return-orders/${encodeURIComponent(returnNo)}/review`,