From 658b2e84cf102b41afbce0579d6b14bbc8ad72df Mon Sep 17 00:00:00 2001 From: liuyihe <2513762445@qq.com> Date: Sun, 6 Sep 2026 18:11:42 +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 --- .../api/warehouseServices.ts | 14 ++++++++++++- .../views/WarehouseServiceView.vue | 20 +++++++++++++++++-- .../views/relabelAttachments.test.mjs | 10 ++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/modules/overseas-warehouse/api/warehouseServices.ts b/src/modules/overseas-warehouse/api/warehouseServices.ts index fbbe245..6f1dba1 100644 --- a/src/modules/overseas-warehouse/api/warehouseServices.ts +++ b/src/modules/overseas-warehouse/api/warehouseServices.ts @@ -4,6 +4,18 @@ export interface PageResult { records: T[]; page: number; size: number; total export interface LastlegOrderSummary { id: string; orderNo: string; inboundCode: string; orderType: string; packageCount: number; overseasWarehouseId?: string } export interface TransferSummary { id: string; transferNo: string; inboundCode: string; lastlegOrderId: string; lastlegOrderNo: string; operatingWarehouseId: string; fbaWarehouseCode: string; packageCount: number; deliveryMethod: string; needRelabel: boolean; relabelNo?: string; status: string; estimatedArrivalAt: string; createdAt: string } export interface RelabelSummary { id: string; relabelNo: string; lastlegOrderId: string; lastlegOrderNo: string; customerOrderNo: string; overseasWarehouseId: string; status: string; itemCount: number; totalPackageCount: number; notifiedPackageCount: number; skuCodes: string; createdAt: string } +export interface RelabelItemDetail { + id: string; skuCode?: string; productNameZh: string; totalPackageCount: number; notifiedPackageCount: number + shipmentNo: string; trackingCode?: string; newSkuCode: string; labelRequirement?: string; remark?: string + relabelFileId?: string; relabelFileName?: string; relabelFileUrl?: string + cartonMark: string; fbaCartonMark: string; destinationWarehouseId: string +} +export interface RelabelDetail { + application: RelabelSummary & { labelDeadline?: string; contactName?: string; contactPhone?: string; chargeAmount?: number; chargeCurrency?: string; walletStatus?: string; walletErrorMessage?: string } + remark?: string; items: RelabelItemDetail[] + history: Array<{ fromStatus?: string; toStatus?: string; operatorId?: string; remark?: string; createdAt: string }> + tailOrders?: Array<{ id: string; orderNo: string; overseasWarehouseId: string; packageCount: number; status: string }> +} export interface DiscardSummary { id: string; discardNo: string; inboundCodes: string; overseasWarehouseId: string; overseasWarehouseName: string; totalPackages: number; totalFee: number; currency: string; status: string; createdAt: string } export interface DiscardCandidate { orderId: string; inboundCode: string; inboundOrderNo: string; overseasWarehouseId: string; overseasWarehouseName: string; availablePackages: number; skus: Array<{ skuCode: string; productName: string; availablePackages: number }> } @@ -36,7 +48,7 @@ export function listRelabels(params: Record) { return overseasApiRequest>({ method: 'GET', url: '/merchant/v1/last-leg/relabel-applications', params }) } export function getRelabel(relabelNo: string) { - return overseasApiRequest>({ method: 'GET', url: `/merchant/v1/last-leg/relabel-applications/${encodeURIComponent(relabelNo)}` }) + return overseasApiRequest({ method: 'GET', url: `/merchant/v1/last-leg/relabel-applications/${encodeURIComponent(relabelNo)}` }) } export function createRelabel(payload: RelabelCreate) { return overseasApiRequest>({ method: 'POST', url: '/merchant/v1/last-leg/relabel-applications', data: payload }) diff --git a/src/modules/overseas-warehouse/views/WarehouseServiceView.vue b/src/modules/overseas-warehouse/views/WarehouseServiceView.vue index 7aed178..5807c11 100644 --- a/src/modules/overseas-warehouse/views/WarehouseServiceView.vue +++ b/src/modules/overseas-warehouse/views/WarehouseServiceView.vue @@ -5,6 +5,7 @@ import { ArrowLeft, Download, Eye, Plus, Search, Trash2, Upload } from '@lucide/ import { createDiscard, createRelabel, createTransfer, getDiscard, getRelabel, getTransfer, listDiscardCandidates, listDiscards, listLastlegOrders, listRelabels, listTransfers, + type RelabelDetail, } from '../api/warehouseServices' type ServiceType = 'labeling' | 'transfer' | 'disposal' | 'relabel' @@ -31,6 +32,7 @@ const form = reactive({ customerNo: '', inboundNo: '', sourceWarehouse: '', ware const cargoRows = ref([]) const submittedRows = ref[]>([]) const selectedDetail = ref | null>(null) +const selectedRelabelDetail = ref(null) const discardCandidates = ref([]) const selectedDiscardOrderId = ref('') const discardCandidatesLoading = ref(false) @@ -188,7 +190,9 @@ async function submit() { async function openDetail(value: Record) { try { const detail = props.service === 'labeling' ? await getRelabel(value['0']) : props.service === 'disposal' ? await getDiscard(value['0']) : await getTransfer(value['0']) - selectedDetail.value = { ...value, raw: JSON.stringify(detail) }; mode.value = 'detail' + selectedDetail.value = value + selectedRelabelDetail.value = props.service === 'labeling' ? detail as RelabelDetail : null + mode.value = 'detail' } catch (error) { ElMessage.error(error instanceof Error ? error.message : '详情加载失败') } } @@ -253,11 +257,23 @@ async function openDetail(value: Record) { - + diff --git a/src/modules/overseas-warehouse/views/relabelAttachments.test.mjs b/src/modules/overseas-warehouse/views/relabelAttachments.test.mjs index 732311c..c351535 100644 --- a/src/modules/overseas-warehouse/views/relabelAttachments.test.mjs +++ b/src/modules/overseas-warehouse/views/relabelAttachments.test.mjs @@ -36,3 +36,13 @@ test('商品 SKU 在贴标模板和明细中为选填', () => { assert.match(view, /商品 SKU \*<\/span>/) assert.match(api, /skuCode\?: string; productNameZh/) }) + +test('贴标申请详情展示逐箱箱唛换标关系', () => { + assert.match(api, /export interface RelabelDetail/) + assert.match(api, /return overseasApiRequest/) + assert.match(view, /

箱唛换标明细<\/h3>/) + assert.match(view, /item\.cartonMark \|\| '—'/) + assert.match(view, /item\.fbaCartonMark \|\| '—'/) + assert.match(view, /item\.shipmentNo \|\| '—'/) + assert.match(view, /item\.newSkuCode \|\| '—'/) +})