优化提交

This commit is contained in:
2026-09-09 13:35:43 +08:00
parent d55cfb3737
commit 28d97d2221
6 changed files with 81 additions and 15 deletions
@@ -64,6 +64,9 @@ export interface RelabelSummaryDto {
totalPackageCount?: number | null
notifiedPackageCount?: number | null
skuCodes?: string | null
totalFileId?: string | null
totalFileName?: string | null
totalFileUrl?: string | null
chargeAmount?: number | string | null
chargeCurrency?: string | null
walletStatus?: string | null
@@ -79,6 +82,7 @@ export interface RelabelItemDto {
notifiedPackageCount?: number | null
newSkuCode?: string | null
labelRequirement?: string | null
relabelFileId?: string | null
relabelFileName?: string | null
relabelFileUrl?: string | null
shipmentNo?: string | null
@@ -144,3 +148,20 @@ export async function changeRelabelOrderStatus(relabelNo: string, status: string
)
return unwrapApiResponse(response)
}
export async function uploadRelabelPdf(relabelNo: string, file: File, scope: 'TOTAL' | 'ITEM', itemId?: string) {
const body = new FormData()
body.append('file', file)
const response = await overseasHttp.post<ApiEnvelope<RelabelDetailDto>, ApiEnvelope<RelabelDetailDto>>(
`/platform/v1/last-leg/relabel-applications/${encodeURIComponent(relabelNo)}/files`, body,
{ params: { scope, itemId }, headers: { 'Content-Type': 'multipart/form-data' } },
)
return unwrapApiResponse(response)
}
export async function downloadRelabelPdf(relabelNo: string, fileId: string, scope: 'TOTAL' | 'ITEM', itemId?: string) {
return overseasHttp.get<Blob, Blob>(
`/platform/v1/last-leg/relabel-applications/${encodeURIComponent(relabelNo)}/files/${encodeURIComponent(fileId)}/download`,
{ params: { scope, itemId }, responseType: 'blob' },
)
}