This commit is contained in:
2026-09-11 11:51:35 +08:00
parent f8ebbd9610
commit 138ab6405a
18 changed files with 209 additions and 97 deletions
+12 -1
View File
@@ -28,6 +28,15 @@ function debugLog(event, payload = {}) {
const request = apiRequest
export function listPdaWarehouses() {
return request({ url: '/first-leg/pda-loading/warehouses', method: 'GET' }).then((records) =>
(Array.isArray(records) ? records : []).map((warehouse) => ({
id: String(warehouse.id),
warehouseCode: String(warehouse.warehouseCode || ''),
warehouseName: String(warehouse.warehouseName || '')
})))
}
function stableIdempotencyKey(operationId, suffix = '') {
const raw = `pda-${operationId}${suffix ? `-${suffix}` : ''}`
let hash = 2166136261
@@ -120,8 +129,10 @@ export async function submitContainerPickingBatch(task, actions, { warehouseId,
})
}
export function listLoadingOrders({ page = 1, size = 50, keyword = '' } = {}) {
export function listLoadingOrders({ page = 1, size = 50, keyword = '', warehouseId } = {}) {
if (!warehouseId) throw new Error('请先选择作业仓库')
const query = []
query.push(`warehouseId=${encodeURIComponent(warehouseId)}`)
if (keyword) query.push(`keyword=${encodeURIComponent(keyword)}`)
const suffix = query.length ? `?${query.join('&')}` : ''
return request({ url: `/first-leg/pda-loading/tasks/pending${suffix}`, method: 'GET' }).then((data) => ({