From 966fbd188010c004cf626345b84192ac9103185c Mon Sep 17 00:00:00 2001 From: liuyihe <2513762445@qq.com> Date: Tue, 25 Aug 2026 20:57:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/navigation/adminNavigation.ts | 1 + .../overseas-warehouse/api/dispatches.ts | 8 +++++++ .../overseas-warehouse/api/outbounds.ts | 14 +++++++++++ .../pages/DispatchesView.vue | 13 ++++++---- .../pages/OutboundsView.vue | 24 +++++++++++++++++++ src/modules/overseas-warehouse/permissions.ts | 2 ++ src/modules/overseas-warehouse/routes.ts | 6 +++++ 7 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 src/modules/overseas-warehouse/api/outbounds.ts create mode 100644 src/modules/overseas-warehouse/pages/OutboundsView.vue diff --git a/src/core/navigation/adminNavigation.ts b/src/core/navigation/adminNavigation.ts index f4ee803c..4493ff34 100644 --- a/src/core/navigation/adminNavigation.ts +++ b/src/core/navigation/adminNavigation.ts @@ -123,6 +123,7 @@ export const adminNavigation: AdminNavigationNode[] = [ { key: 'last-mile-orders', title: '尾程订单', icon: ClipboardList, path: '/overseas-warehouse/last-mile-orders', permission: 'platform:overseas-warehouse:last-mile-order:list' }, { key: 'fba-inbound-order', title: '入库单', icon: ClipboardList, path: '/overseas-warehouse/inbound-orders', permission: 'platform:overseas-warehouse:inbound-order:list' }, { key: 'fba-dispatch', title: '排车列表', icon: Truck, path: '/overseas-warehouse/dispatches', permission: 'platform:overseas-warehouse:dispatch:list' }, + { key: 'fba-outbound', title: '出库单', icon: ClipboardList, path: '/overseas-warehouse/outbounds', permission: 'platform:overseas-warehouse:outbound:list' }, { key: 'fba-relabel-order', title: '换标单', icon: ClipboardList, path: '/overseas-warehouse/relabel-orders', permission: 'platform:overseas-warehouse:relabel-order:list' }, { key: 'fba-pallet', title: '托盘管理', icon: WarehouseIcon, path: '/overseas-warehouse/pallets', permission: 'platform:overseas-warehouse:pallet:list' }, { key: 'overseas-inventory-list', title: '库存管理', icon: WarehouseIcon, path: '/overseas-warehouse/inventory', permission: 'platform:overseas-warehouse:inventory:list' }, diff --git a/src/modules/overseas-warehouse/api/dispatches.ts b/src/modules/overseas-warehouse/api/dispatches.ts index 82b7c9b3..ffd6158f 100644 --- a/src/modules/overseas-warehouse/api/dispatches.ts +++ b/src/modules/overseas-warehouse/api/dispatches.ts @@ -169,3 +169,11 @@ export async function releaseDispatchDraft(draftToken: string) { ) return unwrapApiResponse(response) } + +export interface TransferDeliveryResult { dispatchNo: string; outboundNo: string; outboundStatus: string; deliveryNo: string; deliveryStatus: string; palletCount: number; packageCount: number; replayed: boolean } +export async function transferDispatchToDelivery(dispatchNo: string, payload: { idempotencyKey: string; remark?: string }) { + const response = await overseasHttp.post, ApiEnvelope>( + `/platform/v1/last-leg/dispatches/${encodeURIComponent(dispatchNo)}/transfer-delivery`, payload, + ) + return unwrapApiResponse(response) +} diff --git a/src/modules/overseas-warehouse/api/outbounds.ts b/src/modules/overseas-warehouse/api/outbounds.ts new file mode 100644 index 00000000..a1dd16f3 --- /dev/null +++ b/src/modules/overseas-warehouse/api/outbounds.ts @@ -0,0 +1,14 @@ +import { overseasHttp } from '@/shared/api/overseasHttp' +import { unwrapApiResponse, type ApiEnvelope } from '@/shared/api/http' +import { normalizeOverseasPage, type OverseasPagePayload } from './lastMileOrders' + +export interface OutboundRow { id: string; outboundNo: string; dispatchNo?: string | null; overseasWarehouseId?: string | null; status?: string | null; palletCount?: number | null; packageCount?: number | null; createdAt?: string | null } +export interface OutboundQuery { page: number; size: number; documentNo?: string; warehouseId?: string; status?: string } +export async function listOutbounds(query: OutboundQuery) { + const response = await overseasHttp.get>, ApiEnvelope>>('/platform/v1/last-leg/outbound-orders', { params: query }) + return normalizeOverseasPage(unwrapApiResponse(response)) +} +export async function createOneClickDropshipOutbound(customerId: string, payload: { recipient: string; items: Array<{ inventoryPositionId: string; packages: number; sku?: string }>; remark?: string; idempotencyKey: string }) { + const response = await overseasHttp.post, ApiEnvelope>('/platform/v1/last-leg/outbound-orders/one-click-dropship', payload, { params: { customerId } }) + return unwrapApiResponse(response) +} diff --git a/src/modules/overseas-warehouse/pages/DispatchesView.vue b/src/modules/overseas-warehouse/pages/DispatchesView.vue index 9af87749..d04449e5 100644 --- a/src/modules/overseas-warehouse/pages/DispatchesView.vue +++ b/src/modules/overseas-warehouse/pages/DispatchesView.vue @@ -1,6 +1,7 @@ @@ -147,9 +152,9 @@ onMounted(load)
- +
- + diff --git a/src/modules/overseas-warehouse/pages/OutboundsView.vue b/src/modules/overseas-warehouse/pages/OutboundsView.vue new file mode 100644 index 00000000..68cc7d03 --- /dev/null +++ b/src/modules/overseas-warehouse/pages/OutboundsView.vue @@ -0,0 +1,24 @@ + + diff --git a/src/modules/overseas-warehouse/permissions.ts b/src/modules/overseas-warehouse/permissions.ts index d1b596d9..22ade117 100644 --- a/src/modules/overseas-warehouse/permissions.ts +++ b/src/modules/overseas-warehouse/permissions.ts @@ -8,6 +8,8 @@ export const overseasWarehousePermissions = { inboundOrderAppointment: 'platform:overseas-warehouse:inbound-order:fba-appointment', inboundOrderSmartDispatch: 'platform:overseas-warehouse:inbound-order:smart-dispatch', dispatchList: 'platform:overseas-warehouse:dispatch:list', + outboundList: 'platform:overseas-warehouse:outbound:list', + outboundCreate: 'platform:overseas-warehouse:outbound:create', inventoryList: 'platform:overseas-warehouse:inventory:list', inventoryExport: 'platform:overseas-warehouse:inventory:export', inventoryEdit: 'platform:overseas-warehouse:inventory:edit', diff --git a/src/modules/overseas-warehouse/routes.ts b/src/modules/overseas-warehouse/routes.ts index aca6eaf0..fe3e9e0d 100644 --- a/src/modules/overseas-warehouse/routes.ts +++ b/src/modules/overseas-warehouse/routes.ts @@ -38,6 +38,12 @@ export const overseasWarehouseRoutes = [ component: () => import('./pages/DispatchDetailView.vue'), meta: { title: '排车详情', description: '查看排车、车辆和关联订单明细', permission: permission.dispatchList, showPageHeading: false }, }, + { + path: 'overseas-warehouse/outbounds', + name: 'overseas-outbounds', + component: () => import('./pages/OutboundsView.vue'), + meta: { title: '出库单', description: '查询海外仓出库单并创建一件代发出库', permission: permission.outboundList }, + }, { path: 'overseas-warehouse/inventory', name: 'overseas-inventory',