优化
This commit is contained in:
@@ -74,3 +74,6 @@ export const convertDispatchDraft = (body: ConvertDraft) => { versioned(body); r
|
||||
export interface BatchDispatchCandidate { planPalletId: string; palletNo: string; planId: string; planNo: string; customerId: string; sourceStage: string; packageCount: number | null; allocations: DispatchBatchAllocation[]; blockReasons: string[] }
|
||||
export interface BatchDispatchCandidates { batchKey: string; version: number; candidates: BatchDispatchCandidate[]; blockReasons: string[] }
|
||||
export const getBatchDispatchCandidates = (key: string) => get<BatchDispatchCandidates>(`/platform/v1/last-leg/appointment-planning/batches/${encodeURIComponent(key)}/dispatch-candidates`).then(value => { requireBatchVersions(value.candidates.flatMap(row => row.allocations)); return value })
|
||||
|
||||
/** 退回货物仅使用当前排车服务端给出的原出库候选。 */
|
||||
export const getDispatchReturnOptions = (no: string) => get<import('../dispatchContracts').DispatchReturnCandidate[]>( `${path(no)}/exception-return-options`)
|
||||
|
||||
@@ -18,7 +18,7 @@ export interface ExceptionReturnSource extends ReturnSourceIdentity { outboundPa
|
||||
export interface ExceptionRelatedDelivery { deliveryNo: string; status: string }
|
||||
export interface ExceptionRedispatch { dispatchNo: string; status: string; selectedPackages: number; pickedPackages: number; deliveries: ExceptionRelatedDelivery[] }
|
||||
export interface ExceptionReturnReceipt { receiptNo: string; receivedPackages: number; receivedAt: string; redispatches: ExceptionRedispatch[] }
|
||||
export interface ExceptionDetail { order: ExceptionOrderRow; returnSources: ExceptionReturnSource[]; returnReceipts: ExceptionReturnReceipt[] }
|
||||
export interface ExceptionDetail { order: ExceptionOrderRow; returnSources: ExceptionReturnSource[]; returnReceipts: ExceptionReturnReceipt[]; returnOrderNo?: string | null }
|
||||
export interface ExceptionReceipt extends ReturnSourceIdentity { outboundPalletItemId: string; receivedPackages: number; targetPalletId: string; targetPalletNo: string; targetLocationId: string; targetLocationCode: string }
|
||||
export interface ExceptionCommand { expectedVersion: number; idempotencyKey: string; handlingAction?: string; reason?: string; handlingResult?: string; evidenceFileIds?: string[]; receipts?: ExceptionReceipt[] }
|
||||
export type ExceptionAction = 'start-processing' | 'complete' | 'cancel'
|
||||
@@ -68,3 +68,9 @@ export async function createExceptionOrder(payload: CreateExceptionOrderPayload)
|
||||
const response = await http.post<ApiEnvelope<{ id: string; exceptionNo: string; status: string }>, ApiEnvelope<{ id: string; exceptionNo: string; status: string }>>('/platform/v1/last-leg/exception-orders', payload)
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
/** 异常单生成关联原单的退回尾程单,现场从PDA列表点单实收。 */
|
||||
export async function generateExceptionReturn(customerId: string, number: string, expectedVersion: number) {
|
||||
return unwrapApiResponse(await http.post<ApiEnvelope<{ orderNo: string }>, ApiEnvelope<{ orderNo: string }>>(`${exceptionPath(number)}/generate-return-inbound`,
|
||||
{ expectedVersion, idempotencyKey: crypto.randomUUID() }, { params: { customerId } }))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user