2026-08-24 15:25:36 +08:00
|
|
|
import { overseasRequest, overseasUpload } from '@/api/overseas.js'
|
|
|
|
|
|
2026-08-24 19:23:23 +08:00
|
|
|
const RECEIVING_BASE = '/pda/v1/last-leg/receiving-containers'
|
|
|
|
|
const current = (suffix = '') => `${RECEIVING_BASE}/current${suffix}`
|
2026-08-24 15:25:36 +08:00
|
|
|
|
2026-08-24 19:23:23 +08:00
|
|
|
export const listReceivingCandidates = () => overseasRequest('GET', `${RECEIVING_BASE}/candidates`)
|
|
|
|
|
export const getReceivingContainer = (containerNo) => overseasRequest('GET', `${RECEIVING_BASE}/${encodeURIComponent(containerNo)}`)
|
|
|
|
|
export const prepareReceivingContainer = (containerNo, request) => overseasRequest('POST', `${RECEIVING_BASE}/${encodeURIComponent(containerNo)}/prepare`, request)
|
|
|
|
|
export const uploadCurrentUnloadPhoto = (filePath) => overseasUpload(current('/unload-photos/files'), filePath)
|
|
|
|
|
export const signCurrentReceiving = (request) => overseasRequest('POST', current('/sign'), request)
|
|
|
|
|
export const getCurrentReceiving = () => overseasRequest('GET', current())
|
|
|
|
|
export const resolveCurrentCarton = (cartonMark) => overseasRequest('POST', current('/cartons/resolve'), { cartonMark })
|
|
|
|
|
export const resolveCurrentSku = (skuCode) => overseasRequest('POST', current('/skus/resolve'), { skuCode })
|
|
|
|
|
export const resolveCurrentPallet = (palletCode, inboundCode) => overseasRequest('POST', current('/pallets/resolve'), { palletCode, inboundCode })
|
|
|
|
|
export const receiveCurrentBulk = (request) => overseasRequest('POST', current('/receipts/bulk'), request)
|
|
|
|
|
export const receiveCurrentCarton = (request) => overseasRequest('POST', current('/receipts/carton'), request)
|
|
|
|
|
export const completeCurrentReceiving = (request) => overseasRequest('POST', current('/complete'), request)
|