From 3bfe6c6a26a44ef5d77c0326e6a57838ff65eff4 Mon Sep 17 00:00:00 2001
From: zzh <1368735060@qq.com>
Date: Mon, 26 Oct 2026 12:19:47 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E7=99=BB=E5=BD=95=E9=A1=B5=E7=AD=BE?=
=?UTF-8?q?=E6=AE=8B=E7=95=99=E3=80=81=E8=A1=A8=E5=8D=95=E6=A0=A1=E9=AA=8C?=
=?UTF-8?q?=E8=84=B1=E8=8A=82=E4=B8=8E=E4=BB=93=E5=BA=93=E5=85=A5=E5=8F=A3?=
=?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
排除登录路由进页签;FormPro 内部 model 优先;侧栏仓库选择与地址弹窗合并并可切换。
Co-authored-by: Cursor
---
src/components/FormPro/index.vue | 2 +-
.../WarehouseAddressPeekModal.vue | 107 ++++++++++--
src/components/customer-side-rail/index.vue | 163 +++++++++---------
src/components/tab-bar/index.vue | 5 +-
src/locale/en-US.ts | 3 +
src/locale/zh-CN.ts | 3 +
src/router/index.ts | 6 +
src/store/modules/tab-bar/index.ts | 28 ++-
src/utils/enter-system.ts | 4 +-
.../components/ChangePostShipStatusModal.vue | 2 +-
10 files changed, 220 insertions(+), 103 deletions(-)
diff --git a/src/components/FormPro/index.vue b/src/components/FormPro/index.vue
index 7985f02..9a33452 100644
--- a/src/components/FormPro/index.vue
+++ b/src/components/FormPro/index.vue
@@ -223,6 +223,7 @@
row.id != null)
+ .map((row) => ({
+ label: row.warehouseName || String(row.id),
+ value: Number(row.id),
+ })),
+ )
+}
+
+function selectWarehouse(item: WarehouseDto) {
+ const id = Number(item.id)
+ if (!id) return
+ if (id === currentId.value) return
+ syncWarehouseOptions(list.value)
+ warehouseStore.setWarehouseId(id)
+ Message.success(
+ t('nav.warehousePeek.switched', {
+ name: item.warehouseName || String(id),
+ }),
+ )
+}
+
async function loadList() {
loading.value = true
try {
@@ -128,6 +152,7 @@ async function loadList() {
loadCustomerCode(),
])
list.value = (res.items ?? []).map(normalize).sort(compareWarehouseSort)
+ syncWarehouseOptions(list.value)
} catch {
list.value = []
} finally {
@@ -171,6 +196,7 @@ watch(
{{ t('nav.warehousePeek.tip') }}
{{ customerCode }}
+ {{ t('nav.warehousePeek.selectHint') }}
@@ -182,6 +208,12 @@ watch(
:key="String(item.id)"
class="peek-card"
:class="{ 'is-current': Number(item.id) === currentId }"
+ role="button"
+ tabindex="0"
+ :aria-pressed="Number(item.id) === currentId"
+ @click="selectWarehouse(item)"
+ @keydown.enter.prevent="selectWarehouse(item)"
+ @keydown.space.prevent="selectWarehouse(item)"
>
@@ -191,43 +223,53 @@ watch(
{{ t('nav.warehousePeek.current') }}
-
+
+
+
+
{{ t('system.warehouseAddress.fields.recipient') }}
{{ displayRecipient(item) }}
-
{{ t('system.warehouseAddress.fields.contactPhone') }}
{{ item.contactPhone || '-' }}
-
+
{{ t('system.warehouseAddress.fields.shippingAddress') }}
{{ displayAddress(item) }}
-
+
{{ t('system.warehouseAddress.fields.remark') }}
{{ item.remark }}
-
+
@@ -239,7 +281,7 @@ watch(