优化
This commit is contained in:
@@ -45,7 +45,7 @@ function contextFixture({ tenants = [{ id: '10001', status: 'ACTIVE' }], warehou
|
||||
if (requestPath.includes('/inventory/balances?')) return response(page([{ id: '60001', customerId: '10001', skuCode: 'SKU-1', totalPackages: 10, availablePackages: 10, updatedAt: '2026-08-21T10:00:00' }]))
|
||||
if (requestPath.includes('/inventory/balances/60001/positions?')) return response([{ id: '61001', balanceId: '60001', totalPackages: 10 }])
|
||||
if (requestPath.includes('/inventory/ledger?')) return response(page([{ id: '62001', customerId: '10001', businessType: 'STOCK_IN', beforePackages: 0, deltaPackages: 10, afterPackages: 10, occurredAt: '2026-08-21T10:00:00' }]))
|
||||
if (requestPath.endsWith('/warehouse-admin/20001/locations?page=1&size=20')) return response(page([{ id: '72001', customerId: '0', warehouseId: '20001', zoneCode: 'A', locationCode: 'A-01', locationType: 'STORAGE', maxLoadKg: 1000, status: 'ACTIVE' }]))
|
||||
if (requestPath.endsWith('/warehouse-admin/20001/locations?page=1&size=20')) return response(page([{ id: '72001', customerId: '0', warehouseId: '20001', locationCode: 'A-01', locationType: 'STORAGE', maxLoadKg: 1000, status: 'ACTIVE' }]))
|
||||
if (requestPath.endsWith('/warehouse-admin/20001/locations/72001')) return response({ id: '72001', customerId: '0', warehouseId: '20001', locationCode: 'A-01', status: 'ACTIVE' })
|
||||
if (requestPath.endsWith('/warehouse-admin/20001/locations/72002')) return createdLocation == null
|
||||
? response(undefined, 'A0404') : response(createdLocation)
|
||||
|
||||
@@ -210,7 +210,7 @@ async function verifyLocationLifecycle(context, warehouseId) {
|
||||
try {
|
||||
const created = await overseasMutation(context, 'POST', '创建本轮公共库位',
|
||||
`/api/platform/v1/warehouse-admin/${encodeURIComponent(warehouseId)}/locations`, {
|
||||
zoneCode: 'ACC', locationCode, locationType: 'STORAGE', maxLoadKg: 1000,
|
||||
locationCode, locationType: 'STORAGE', maxLoadKg: 1000,
|
||||
status: 'ACTIVE', remark: context.marker,
|
||||
})
|
||||
locationId = id(created.data)
|
||||
@@ -225,7 +225,7 @@ async function verifyLocationLifecycle(context, warehouseId) {
|
||||
&& detail.data?.locationCode === locationCode && detail.data?.remark === context.marker,
|
||||
`locationId=${id(detail.data?.id) || 'missing'}, code=${detail.data?.locationCode || 'missing'}; ${trace(detail.response)}`, OPTIONS)
|
||||
const updated = await overseasMutation(context, 'PUT', '编辑本轮公共库位', detailPath, {
|
||||
zoneCode: 'ACC', locationCode, locationType: 'STORAGE', maxLoadKg: 1200,
|
||||
locationCode, locationType: 'STORAGE', maxLoadKg: 1200,
|
||||
status: 'ACTIVE', remark: `${context.marker}-edited`,
|
||||
})
|
||||
context.assert(MODULE, '公共库位编辑成功', updated.response, voidMutationSucceeded(updated),
|
||||
|
||||
Reference in New Issue
Block a user