解决海外仓前端提交冲突

This commit is contained in:
2026-08-28 14:41:40 +08:00
13 changed files with 122 additions and 71 deletions
@@ -1,5 +1,6 @@
import { overseasHttp } from '@/shared/api/overseasHttp'
import { unwrapApiResponse, type ApiEnvelope } from '@/shared/api/http'
import { listSharedReceivingOverseasWarehouseOptions } from '@/modules/iam'
import { normalizeOverseasPage, type OverseasPagePayload } from './lastMileOrders'
export interface RelabelOrderQuery {
@@ -106,12 +107,16 @@ export async function getRelabelOrder(relabelNo: string) {
return unwrapApiResponse(response)
}
export async function listRelabelWarehouseOptions(customerId: string) {
const response = await overseasHttp.get<ApiEnvelope<OverseasPagePayload<RelabelWarehouseOptionDto>>, ApiEnvelope<OverseasPagePayload<RelabelWarehouseOptionDto>>>(
'/platform/v1/warehouse-admin',
{ params: { customerId, page: 1, size: 200, status: 'ACTIVE' } },
)
return normalizeOverseasPage(unwrapApiResponse(response))
export async function listRelabelWarehouseOptions() {
const records: RelabelWarehouseOptionDto[] = (await listSharedReceivingOverseasWarehouseOptions()).map((warehouse) => ({
id: warehouse.id,
customerId: '0',
warehouseCode: warehouse.warehouseCode,
warehouseName: warehouse.warehouseName,
warehouseType: 'OVERSEAS',
status: 'ACTIVE',
}))
return { records, page: 1, size: 200, total: records.length, pages: records.length ? 1 : 0 }
}
export async function createRelabelOrder(customerId: string, payload: CreateRelabelPayload) {