优化
This commit is contained in:
@@ -4,7 +4,8 @@ import { normalizeOverseasPage, type OverseasPagePayload } from './lastMileOrder
|
||||
import type { DeliveryOrderRow } from './deliveryOrders'
|
||||
|
||||
export interface OutboundRow { id: string; outboundNo: string; dispatchNo?: string | null; overseasWarehouseId?: string | null; lxCodes?: string | null; status?: string | null; palletCount?: number | null; packageCount?: number | null; createdAt?: string | null }
|
||||
export interface OutboundDetail { outbound: OutboundRow; delivery?: DeliveryOrderRow | null }
|
||||
export interface OutboundPalletRow { id: string; palletNo?: string | null; cartonMarks?: string | null; skuCode?: string | null; inboundCode?: string | null; packageCount?: number | null; pickedPackageCount?: number | null; status?: string | null }
|
||||
export interface OutboundDetail { outbound: OutboundRow; delivery?: DeliveryOrderRow | null; pallets?: OutboundPalletRow[] }
|
||||
export interface OutboundQuery { page: number; size: number; documentNo?: string; lxCode?: string; warehouseId?: string; status?: string }
|
||||
export async function listOutbounds(query: OutboundQuery) {
|
||||
const response = await overseasHttp.get<ApiEnvelope<OverseasPagePayload<OutboundRow>>, ApiEnvelope<OverseasPagePayload<OutboundRow>>>('/platform/v1/last-leg/outbound-orders', { params: query })
|
||||
@@ -14,7 +15,7 @@ export async function getOutbound(outboundNo: string) {
|
||||
const response = await overseasHttp.get<ApiEnvelope<OutboundDetail>, ApiEnvelope<OutboundDetail>>(`/platform/v1/last-leg/outbound-orders/${encodeURIComponent(outboundNo)}`)
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
export async function createOneClickDropshipOutbound(customerId: string, payload: { recipient: string; items: Array<{ inventoryPositionId: string; packages: number; sku?: string }>; remark?: string; idempotencyKey: string }) {
|
||||
export async function createOneClickDropshipOutbound(customerId: string, payload: { recipient: string; items: Array<{ inventoryPositionId: string; packages: number; sku?: string; cartonMarks?: string[] }>; remark?: string; idempotencyKey: string }) {
|
||||
const response = await overseasHttp.post<ApiEnvelope<OutboundRow>, ApiEnvelope<OutboundRow>>('/platform/v1/last-leg/outbound-orders/one-click-dropship', payload, { params: { customerId } })
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user