diff --git a/src/components.d.ts b/src/components.d.ts
index 7c86478..b8cd11a 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -79,6 +79,5 @@ declare module 'vue' {
UserEditDrawer: typeof import('./components/UserEditDrawer/index.vue')['default']
UserProfileFields: typeof import('./components/UserProfileFields/index.vue')['default']
WarehouseAddressPeekModal: typeof import('./components/customer-side-rail/WarehouseAddressPeekModal.vue')['default']
- WarehouseSwitcherPopover: typeof import('./components/customer-side-rail/WarehouseSwitcherPopover.vue')['default']
}
}
diff --git a/src/components/customer-side-rail/WarehouseSwitcherPopover.vue b/src/components/customer-side-rail/WarehouseSwitcherPopover.vue
deleted file mode 100644
index 39f2afd..0000000
--- a/src/components/customer-side-rail/WarehouseSwitcherPopover.vue
+++ /dev/null
@@ -1,422 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t('nav.warehousePeek.empty') }}
-
-
-
- -
-
- {{ item.warehouseName || '-' }}
-
-
-
-
-
-
- {{ t('nav.warehousePeek.addressSummary') }}
-
-
-
- {{ t('system.warehouseAddress.fields.recipient') }}
-
- {{ displayRecipient(currentItem) }}
-
-
-
-
- {{ t('system.warehouseAddress.fields.contactPhone') }}
-
- {{ currentItem.contactPhone || '-' }}
-
-
-
-
- {{ t('system.warehouseAddress.fields.shippingAddress') }}
-
- {{ displayAddress(currentItem) }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/customer-side-rail/index.vue b/src/components/customer-side-rail/index.vue
index 06048f0..2e425c2 100644
--- a/src/components/customer-side-rail/index.vue
+++ b/src/components/customer-side-rail/index.vue
@@ -85,51 +85,22 @@
-
-
-
-
-
-
-
-
+
+
+
+ {{ t('nav.warehousePeek.shipLabel') }}
+
+ {{ warehouseDockName }}
+
+
@@ -374,14 +342,9 @@ const warehouseDockTitle = computed(() =>
)
function openWarehouseAddressPeek() {
- warehouseSwitcherVisible.value = false
warehousePeekVisible.value = true
}
-watch(compactLayout, () => {
- warehouseSwitcherVisible.value = false
-})
-
async function ensureWarehouseOptions() {
try {
const { items } = await getWarehouseList({ page: 1, pageSize: 100 })
@@ -931,15 +894,6 @@ onUnmounted(() => {
border-color: color-mix(in srgb, var(--app-primary-color, #1d7281) 28%, transparent);
}
- &.is-open {
- border-color: color-mix(in srgb, var(--app-primary-color, #1d7281) 40%, transparent);
- box-shadow: 0 0 0 2px color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, transparent);
-
- .customer-side-rail__warehouse-chip-chevron {
- transform: rotate(180deg);
- }
- }
-
&.is-compact {
width: 40px;
height: 40px;
@@ -980,13 +934,6 @@ onUnmounted(() => {
color: var(--color-text-1);
}
- &__warehouse-chip-chevron {
- flex-shrink: 0;
- font-size: 12px;
- color: var(--color-text-3);
- transition: transform 0.16s ease;
- }
-
/* 二级:头像 + 消息 + 打印 + 收起 */
&__toolbar {
display: flex;
@@ -1243,10 +1190,4 @@ onUnmounted(() => {
}
}
-:global(.csr-warehouse-switcher-popup) {
- padding: 0 !important;
- border-radius: 10px !important;
- overflow: hidden;
- box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12) !important;
-}
diff --git a/src/components/customer-side-rail/useWarehousePeek.ts b/src/components/customer-side-rail/useWarehousePeek.ts
index 6d8de3d..a3640cf 100644
--- a/src/components/customer-side-rail/useWarehousePeek.ts
+++ b/src/components/customer-side-rail/useWarehousePeek.ts
@@ -140,6 +140,20 @@ export function useWarehousePeek() {
return true
}
+ function applyStoreOptionsFallback() {
+ const opts = warehouseStore.options || []
+ if (!opts.length) {
+ list.value = []
+ return
+ }
+ list.value = opts.map((o) =>
+ normalize({
+ id: o.value,
+ warehouseName: o.label,
+ }),
+ )
+ }
+
async function loadList() {
loading.value = true
try {
@@ -147,10 +161,15 @@ export function useWarehousePeek() {
getWarehouseList({ page: 1, pageSize: 100 }),
loadCustomerCode(),
])
- list.value = (res.items ?? []).map(normalize).sort(compareWarehouseSort)
- syncWarehouseOptions(list.value)
+ const rows = (res.items ?? []).map(normalize).sort(compareWarehouseSort)
+ if (rows.length) {
+ list.value = rows
+ syncWarehouseOptions(list.value)
+ } else {
+ applyStoreOptionsFallback()
+ }
} catch {
- list.value = []
+ applyStoreOptionsFallback()
} finally {
loading.value = false
}