Merge branch 'dev' of http://8.163.30.128:10082/html/admin-web into dev
This commit is contained in:
@@ -43,6 +43,12 @@ export async function listOverseasLocations(warehouseId: string, query: Overseas
|
||||
return normalizeOverseasPage(unwrapApiResponse(response))
|
||||
}
|
||||
|
||||
export async function listAllOverseasLocations(warehouseIds: string[], query: OverseasLocationQuery = {}) {
|
||||
const results = await Promise.all(warehouseIds.map((warehouseId) => listOverseasLocations(warehouseId, { ...query, page: 1, size: 200 })))
|
||||
const records = results.flatMap((result) => result.records)
|
||||
return { records, total: records.length }
|
||||
}
|
||||
|
||||
export async function createOverseasLocation(warehouseId: string, payload: SaveOverseasLocationPayload) {
|
||||
const response = await overseasHttp.post<ApiEnvelope<string>, ApiEnvelope<string>>(base(warehouseId), payload)
|
||||
return unwrapApiResponse(response)
|
||||
|
||||
Reference in New Issue
Block a user