优化
This commit is contained in:
@@ -17,8 +17,9 @@ export interface OutboundPalletRow {
|
||||
status?: string | null
|
||||
}
|
||||
export interface OutboundDetail { outbound: OutboundRow; pallets?: OutboundPalletRow[]; delivery?: DeliveryOrderRow | null }
|
||||
export interface OutboundQuery { page: number; size: number; documentNo?: string; lxCode?: string; warehouseId?: string; status?: string }
|
||||
export interface OutboundQuery { page: number; size: number; documentNo?: string; lxCode?: string; warehouseId?: string; status?: string; outboundType?: string }
|
||||
export interface ReturnOutboundCandidate { returnNo?: string | null; overseasWarehouseId?: string | null; cartonMark?: string | null; fbaCartonMark?: string | null; destinationWarehouseCode?: string | null; destinationWarehouseName?: string | null; totalQuantity?: number | null; status?: string | null }
|
||||
export interface OneClickOutboundCandidate { inventoryPositionId: string; orderNo?: string | null; customerId?: string | null; customerName?: string | null; overseasWarehouseId?: string | null; overseasWarehouseName?: string | null; palletNo?: string | null; inboundCode?: string | null; skuCode?: string | null; productName?: string | null; availablePackages: number }
|
||||
export async function listOutbounds(query: OutboundQuery) {
|
||||
const response = await overseasHttp.get<ApiEnvelope<OverseasPagePayload<OutboundRow>>, ApiEnvelope<OverseasPagePayload<OutboundRow>>>('/platform/v1/last-leg/outbound-orders', { params: query })
|
||||
return normalizeOverseasPage(unwrapApiResponse(response))
|
||||
@@ -31,6 +32,10 @@ export async function createOneClickDropshipOutbound(customerId: string, payload
|
||||
const response = await overseasHttp.post<ApiEnvelope<OutboundRow>, ApiEnvelope<OutboundRow>>('/platform/v1/last-leg/outbound-orders/one-click-dropship', payload, { params: { customerId } })
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
export async function listOneClickOutboundCandidates(customerId?: string, query: { warehouseId?: string } = {}) {
|
||||
const response = await overseasHttp.get<ApiEnvelope<OneClickOutboundCandidate[]>, ApiEnvelope<OneClickOutboundCandidate[]>>('/platform/v1/last-leg/outbound-orders/one-click-dropship/candidates', { params: { customerId, ...query } })
|
||||
return unwrapApiResponse(response).map((item) => ({ ...item, inventoryPositionId: String(item.inventoryPositionId), availablePackages: Number(item.availablePackages || 0) }))
|
||||
}
|
||||
export async function listReturnOutboundCandidates(customerId: string, warehouseId: string) {
|
||||
const response = await overseasHttp.get<ApiEnvelope<ReturnOutboundCandidate[]>, ApiEnvelope<ReturnOutboundCandidate[]>>('/platform/v1/last-leg/outbound-orders/return/candidates', { params: { customerId, warehouseId } })
|
||||
return unwrapApiResponse(response)
|
||||
|
||||
@@ -71,6 +71,13 @@ export interface RelabelSummaryDto {
|
||||
chargeCurrency?: string | null
|
||||
walletStatus?: string | null
|
||||
walletErrorMessage?: string | null
|
||||
deliveryMethod?: string | null
|
||||
printShippingLabel?: boolean | null
|
||||
shippingLabelFileId?: string | null
|
||||
shippingLabelFileName?: string | null
|
||||
fulfillmentStatus?: string | null
|
||||
outboundOrderNo?: string | null
|
||||
customerConfirmedAt?: string | null
|
||||
createdAt?: string | null
|
||||
}
|
||||
|
||||
@@ -106,6 +113,7 @@ export interface RelabelDetailDto {
|
||||
remark?: string | null
|
||||
items: RelabelItemDto[]
|
||||
history: RelabelHistoryDto[]
|
||||
completionEvidence?: { taskId: string; photoFileIds: string[]; completionRemark?: string | null; reviewerName?: string | null; reviewRemark?: string | null; completedAt?: string | null } | null
|
||||
}
|
||||
|
||||
export async function listRelabelOrders(query: RelabelOrderQuery) {
|
||||
@@ -165,3 +173,10 @@ export async function downloadRelabelPdf(relabelNo: string, fileId: string, scop
|
||||
{ params: { scope, itemId }, responseType: 'blob' },
|
||||
)
|
||||
}
|
||||
|
||||
export async function downloadRelabelCompletionPhoto(relabelNo: string, fileId: string) {
|
||||
return overseasHttp.get<Blob, Blob>(
|
||||
`/platform/v1/last-leg/relabel-applications/${encodeURIComponent(relabelNo)}/completion-photos/${encodeURIComponent(fileId)}/download`,
|
||||
{ responseType: 'blob' },
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user