解决海外仓前端提交冲突
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
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 CustomerWarehouseDto {
|
||||
export interface ReceivingOverseasWarehouseDto {
|
||||
id: string
|
||||
customerId: string
|
||||
warehouseCode: string
|
||||
@@ -43,12 +44,16 @@ export interface UpdatePalletPayload extends SavePalletPayload {
|
||||
version: number
|
||||
}
|
||||
|
||||
export async function listCustomerWarehouses() {
|
||||
const response = await overseasHttp.get<ApiEnvelope<OverseasPagePayload<CustomerWarehouseDto>>, ApiEnvelope<OverseasPagePayload<CustomerWarehouseDto>>>(
|
||||
'/platform/v1/warehouse-admin',
|
||||
{ params: { page: 1, size: 200 } },
|
||||
)
|
||||
return normalizeOverseasPage(unwrapApiResponse(response))
|
||||
export async function listReceivingOverseasWarehouses() {
|
||||
const records: ReceivingOverseasWarehouseDto[] = (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 listPallets(warehouseId: string | undefined, query: { page: number; size: number; keyword?: string; palletType?: string; status?: string }) {
|
||||
|
||||
Reference in New Issue
Block a user