fix(admin): expose container customs downloads

This commit is contained in:
2026-08-29 10:19:35 +08:00
parent 5e617f0c16
commit aee562d998
4 changed files with 188 additions and 27 deletions
@@ -78,6 +78,14 @@ export async function getContainerCustoms(loadingPlanId: string) {
return normalize(unwrapApiResponse(response))
}
export function downloadContainerCustomsDocument(documentId: string) {
return http.get<Blob, Blob>(`${basePath}/documents/${encodeURIComponent(documentId)}/download`, { responseType: 'blob' })
}
export function downloadContainerCustomsCompletion(documentId: string) {
return http.get<Blob, Blob>(`${basePath}/documents/${encodeURIComponent(documentId)}/completion/download`, { responseType: 'blob' })
}
async function action(loadingPlanId: string, name: 'start' | 'complete-all-buy', expectedVersion: number, remark?: string) {
const response = await http.post<ApiEnvelope<RawContainerCustomsView>, ApiEnvelope<RawContainerCustomsView>>(
`${basePath}/${encodeURIComponent(loadingPlanId)}/${name}`,