From 728f04ea00752a9747e22f97ff681333b4b555d2 Mon Sep 17 00:00:00 2001
From: liuyihe <2513762445@qq.com>
Date: Thu, 17 Sep 2026 16:34:56 +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/pages/relabel/relabel.vue | 7 ++++---
tests/relabel-destination.test.mjs | 12 ++++++++++++
2 files changed, 16 insertions(+), 3 deletions(-)
create mode 100644 tests/relabel-destination.test.mjs
diff --git a/src/pages/relabel/relabel.vue b/src/pages/relabel/relabel.vue
index 711b9ca..ae78c6a 100644
--- a/src/pages/relabel/relabel.vue
+++ b/src/pages/relabel/relabel.vue
@@ -33,7 +33,8 @@
{{ row.sku.skuCode }} 换标 {{ row.sku.newSkuCode }}{{ row.item.cartonMark }} · {{ row.sku.quantity }} 件
- {{ item.cartonMark || '—' }} 换标 {{ item.fbaCartonMark || '—' }}
+ {{ item.cartonMark || '—' }} → {{ item.fbaCartonMark || '—' }}
+ FBA 目的仓:{{ item.destinationFbaWarehouseCode || '待维护' }}
@@ -202,11 +203,11 @@
this.applyCurrent(result)
releaseWarehouseKey('relabel', key.signature)
const confirmedItem = result.items.find((row) => row.itemId === item.itemId)
- this.lastCarton = { cartonMark: mark, fbaCartonMark: confirmedItem?.fbaCartonMark || item.fbaCartonMark }
+ this.lastCarton = { cartonMark: mark, fbaCartonMark: confirmedItem?.fbaCartonMark || item.fbaCartonMark, destinationFbaWarehouseCode: confirmedItem?.destinationFbaWarehouseCode || item.destinationFbaWarehouseCode }
this.quickCarton = ''
this.activeTarget = 'quick-carton'
this.successMessage = ''
- await new Promise((resolve) => uni.showModal({ title: '请粘贴对应箱唛', content: `仓库唛头:${mark}\n请贴 FBA 箱唛:${this.lastCarton.fbaCartonMark}`, showCancel: false, confirmText: '知道了', complete: resolve }))
+ await new Promise((resolve) => uni.showModal({ title: '请粘贴对应箱唛', content: `仓库唛头:${mark}\n请贴 FBA 箱唛:${this.lastCarton.fbaCartonMark}\nFBA 目的仓:${this.lastCarton.destinationFbaWarehouseCode || '待维护'}`, showCancel: false, confirmText: '知道了', complete: resolve }))
}, true, key)
},
removePhoto(index) { updateWarehouseWork('relabel', { photoFileIds: this.photoFileIds.filter((_, i) => i !== index), photoNames: this.photoNames.filter((_, i) => i !== index) }) },
diff --git a/tests/relabel-destination.test.mjs b/tests/relabel-destination.test.mjs
new file mode 100644
index 0000000..2884823
--- /dev/null
+++ b/tests/relabel-destination.test.mjs
@@ -0,0 +1,12 @@
+import assert from 'node:assert/strict'
+import { readFileSync } from 'node:fs'
+import test from 'node:test'
+
+const page = readFileSync(new URL('../src/pages/relabel/relabel.vue', import.meta.url), 'utf8')
+
+test('PDA 箱唛换标明确展示每箱的新标签和 FBA 目的仓', () => {
+ assert.match(page, /item\.cartonMark[^\n]+item\.fbaCartonMark/)
+ assert.match(page, /FBA 目的仓:\{\{ item\.destinationFbaWarehouseCode/)
+ assert.match(page, /confirmedItem\?\.destinationFbaWarehouseCode \|\| item\.destinationFbaWarehouseCode/)
+ assert.match(page, /请贴 FBA 箱唛[^`]+FBA 目的仓:\$\{this\.lastCarton\.destinationFbaWarehouseCode/s)
+})