This commit is contained in:
2026-10-19 10:23:38 +08:00
parent 4bb21641d9
commit 8ae1e5d0d4
18 changed files with 575 additions and 28 deletions
@@ -0,0 +1,15 @@
import { http, unwrapApiResponse, type ApiEnvelope } from '@/shared/api/http'
export interface PickupProgress {
status: string; tripNo: string | null; vehiclePlate: string | null; driverName: string | null; driverPhone: string | null
plannedDepartureAt: string | null; actualPackages: number | null; pickedAt: string | null; arrivedAt: string | null; remark: string | null
evidence: { fileId: string; fileName: string }[]
}
/** 原单详情只查询本票取货进度。 */
export async function getTransferPickupProgress(transferNo: string, customerId: string): Promise<PickupProgress | null> {
return unwrapApiResponse(await http.get<ApiEnvelope<PickupProgress | null>, ApiEnvelope<PickupProgress | null>>(`/platform/v1/last-leg/warehouse-transfers/${encodeURIComponent(transferNo)}/pickup-progress`, { params: { customerId } }))
}
/** 下载当前票确认的取货凭证。 */
export async function downloadTransferPickupEvidence(transferNo: string, customerId: string, fileId: string): Promise<Blob> {
return http.get<Blob, Blob>(`/platform/v1/last-leg/warehouse-transfers/${encodeURIComponent(transferNo)}/pickup-evidence/${encodeURIComponent(fileId)}`, { params: { customerId }, responseType: 'blob' })
}