优化
This commit is contained in:
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { overseasDownload, overseasRequest, overseasUpload } from '@/api/overseas.js'
|
||||
import { normalizeReceivingCandidate, normalizeReceivingSession } from '@/api/receiving-adapter.js'
|
||||
import { normalizeReceivingCandidate, normalizeReceivingSession, normalizeReceivingWarehouseProfile } from '@/api/receiving-adapter.js'
|
||||
|
||||
const RECEIVING_BASE = '/pda/v1/last-leg/receiving-containers'
|
||||
const current = (suffix = '') => `${RECEIVING_BASE}/current${suffix}`
|
||||
|
||||
export const listReceivingCandidates = async () => (await overseasRequest('GET', `${RECEIVING_BASE}/candidates`)).map(normalizeReceivingCandidate)
|
||||
export const getCurrentWarehouseProfile = () => overseasRequest('GET', `${RECEIVING_BASE}/warehouse-profile`)
|
||||
export const getCurrentWarehouseProfile = async () => normalizeReceivingWarehouseProfile(await overseasRequest('GET', `${RECEIVING_BASE}/warehouse-profile`))
|
||||
export const getReceivingContainer = async (containerNo) => normalizeReceivingSession(await overseasRequest('GET', `${RECEIVING_BASE}/${encodeURIComponent(containerNo)}`))
|
||||
export const prepareReceivingContainer = async (containerNo, request) => normalizeReceivingSession(await overseasRequest('POST', `${RECEIVING_BASE}/${encodeURIComponent(containerNo)}/prepare`, request))
|
||||
export const uploadCurrentUnloadPhoto = (filePath) => overseasUpload(current('/unload-photos/files'), filePath)
|
||||
|
||||
Reference in New Issue
Block a user