合并海外仓入库预约与真实接口改动
This commit is contained in:
@@ -43,12 +43,66 @@ export interface InventoryDashboardDto {
|
||||
procurementPackages: number
|
||||
}
|
||||
|
||||
export interface InventoryPositionDto {
|
||||
id: string
|
||||
balanceId: string
|
||||
customerId: string
|
||||
overseasWarehouseId?: string | null
|
||||
destinationWarehouseCode?: string | null
|
||||
inboundOrderId?: string | null
|
||||
inboundOrderNo?: string | null
|
||||
inboundCode?: string | null
|
||||
palletId?: string | null
|
||||
palletNo?: string | null
|
||||
batchNo?: string | null
|
||||
warehouseLocationId?: string | null
|
||||
warehouseLocationCode?: string | null
|
||||
totalPackages: number
|
||||
availablePackages: number
|
||||
holdPackages: number
|
||||
allocatedPackages: number
|
||||
pickedPackages: number
|
||||
receivingPackages: number
|
||||
status?: string | null
|
||||
updatedAt?: string | null
|
||||
}
|
||||
|
||||
export interface InventoryLedgerDto {
|
||||
id: string
|
||||
customerId: string
|
||||
overseasWarehouseId?: string | null
|
||||
destinationWarehouseCode?: string | null
|
||||
inboundOrderId?: string | null
|
||||
inboundOrderNo?: string | null
|
||||
inboundCode?: string | null
|
||||
palletNo?: string | null
|
||||
batchNo?: string | null
|
||||
warehouseLocationCode?: string | null
|
||||
skuCode?: string | null
|
||||
businessType?: string | null
|
||||
businessOrderNo?: string | null
|
||||
outboundOrderNo?: string | null
|
||||
statusFrom?: string | null
|
||||
statusTo?: string | null
|
||||
beforePackages: number
|
||||
deltaPackages: number
|
||||
afterPackages: number
|
||||
operatorId?: string | null
|
||||
remark?: string | null
|
||||
occurredAt?: string | null
|
||||
}
|
||||
|
||||
export interface InventoryBalanceQuery {
|
||||
customerId: string
|
||||
page: number
|
||||
size: number
|
||||
customerName?: string
|
||||
overseasWarehouseId?: string
|
||||
overseasWarehouseCode?: string
|
||||
destinationWarehouseCode?: string
|
||||
inboundOrderNo?: string
|
||||
inboundCode?: string
|
||||
businessOrderNo?: string
|
||||
skuCode?: string
|
||||
productName?: string
|
||||
batchNo?: string
|
||||
@@ -72,3 +126,42 @@ export async function getInventorySummary(query: InventoryBalanceQuery) {
|
||||
)
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
export async function listInventoryPositions(
|
||||
balanceId: string,
|
||||
customerId: string,
|
||||
query: { palletNo?: string; batchNo?: string; inventoryStatus?: string } = {},
|
||||
) {
|
||||
const response = await overseasHttp.get<ApiEnvelope<InventoryPositionDto[]>, ApiEnvelope<InventoryPositionDto[]>>(
|
||||
`/platform/v1/last-leg/inventory/balances/${encodeURIComponent(balanceId)}/positions`,
|
||||
{ params: { customerId, ...query } },
|
||||
)
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
export interface InventoryLedgerQuery {
|
||||
customerId: string
|
||||
page: number
|
||||
size: number
|
||||
overseasWarehouseId?: string
|
||||
destinationWarehouseCode?: string
|
||||
businessType?: string
|
||||
businessOrderNo?: string
|
||||
inboundOrderNo?: string
|
||||
inboundCode?: string
|
||||
outboundOrderNo?: string
|
||||
palletNo?: string
|
||||
batchNo?: string
|
||||
skuCode?: string
|
||||
warehouseLocationCode?: string
|
||||
occurredFrom?: string
|
||||
occurredTo?: string
|
||||
}
|
||||
|
||||
export async function listInventoryLedger(query: InventoryLedgerQuery) {
|
||||
const response = await overseasHttp.get<ApiEnvelope<OverseasPageResult<InventoryLedgerDto>>, ApiEnvelope<OverseasPageResult<InventoryLedgerDto>>>(
|
||||
'/platform/v1/last-leg/inventory/ledger',
|
||||
{ params: { ...query } },
|
||||
)
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user