feat: 仓租价格弹窗单页重构与门户顶栏圆形工具样式 #36

Merged
zzh merged 1 commits from test into master 2026-12-04 11:44:01 +08:00
20 changed files with 1551 additions and 742 deletions
Showing only changes of commit 6a070be3fc - Show all commits

View File

@ -1,6 +1,7 @@
<script setup lang="ts">
import { computed, onMounted, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { IconDown, IconHome } from '@arco-design/web-vue/es/icon'
import { getWarehouseList } from '@/api/system/warehouse'
import { useCurrentWarehouseStore } from '@/store'
import WarehouseAddressPeekModal from '@/components/customer-side-rail/WarehouseAddressPeekModal.vue'
@ -98,11 +99,14 @@ onMounted(() => {
:aria-label="`${t('nav.contactService.shipWarehouse')}: ${displayName}`"
@click="openPeek"
>
<span v-if="variant === 'navbar'" class="contact-service__icon" aria-hidden="true">
<icon-home class="contact-service__ico" />
</span>
<span v-if="showSiderCaption" class="contact-service__caption">
{{ t('nav.contactService.shipWarehouse') }}
</span>
<span class="contact-service__text">{{ labelText }}</span>
<span v-if="variant === 'navbar'" class="contact-service__caret" aria-hidden="true" />
<icon-down v-if="variant === 'navbar'" class="contact-service__caret-ico" />
</button>
<a-select
@ -152,44 +156,66 @@ onMounted(() => {
.contact-service__label {
display: inline-flex;
align-items: center;
gap: 4px;
max-width: 160px;
height: 28px;
padding: 0 8px 0 10px;
gap: 8px;
max-width: 200px;
height: 30px;
padding: 0 8px 0 0;
border: none;
border-radius: 999px;
background: transparent;
font-size: 12px;
font-size: 13px;
font-weight: 500;
letter-spacing: 0.02em;
letter-spacing: -0.01em;
line-height: 1;
color: var(--color-text-2, #4e5969);
color: #1a2e38;
cursor: pointer;
overflow: hidden;
white-space: nowrap;
transition:
color 0.16s ease,
background-color 0.16s ease;
transition: background-color 0.14s ease;
&:hover {
color: var(--color-text-1, #1d2129);
background-color: rgba(15, 23, 42, 0.045);
background: rgba(26, 46, 56, 0.04);
.contact-service__icon {
background: rgba(26, 46, 56, 0.09);
color: #1a2e38;
}
}
}
.contact-service__icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
flex-shrink: 0;
border-radius: 999px;
background: rgba(26, 46, 56, 0.05);
color: rgba(26, 46, 56, 0.52);
line-height: 0;
transition: color 0.14s ease, background-color 0.14s ease;
}
.contact-service__ico {
display: block;
width: 15px;
height: 15px;
font-size: 15px;
line-height: 1;
color: inherit;
}
.contact-service__text {
min-width: 0;
}
.contact-service__caret {
.contact-service__caret-ico {
flex-shrink: 0;
width: 0;
height: 0;
margin-left: 1px;
border-left: 3.5px solid transparent;
border-right: 3.5px solid transparent;
border-top: 4px solid currentColor;
opacity: 0.45;
width: 11px;
height: 11px;
font-size: 11px;
color: rgba(26, 46, 56, 0.52);
}
}

View File

@ -275,10 +275,36 @@
emit('search', searchKeywordModel.value);
}
const refreshing = ref(false);
let refreshFeedbackTimer = 0;
function handleRefresh() {
if (refreshing.value || props.loading) return;
refreshing.value = true;
emit('refresh');
if (refreshFeedbackTimer) window.clearTimeout(refreshFeedbackTimer);
// 父级 loading 未接上时,至少给一轮转圈反馈,避免「点了没反应」
refreshFeedbackTimer = window.setTimeout(() => {
if (!props.loading) refreshing.value = false;
refreshFeedbackTimer = 0;
}, 600);
}
watch(
() => props.loading,
(loading) => {
if (loading) {
refreshing.value = true;
return;
}
if (refreshFeedbackTimer) {
window.clearTimeout(refreshFeedbackTimer);
refreshFeedbackTimer = 0;
}
refreshing.value = false;
},
);
function handleAdd() {
emit('add');
}
@ -335,28 +361,30 @@
<icon-search />
</template>
</a-input>
<div class="search-actions">
<a-button
v-if="showRefresh"
type="text"
size="small"
class="action-icon-btn refresh-btn"
:title="refreshTitle"
@click="handleRefresh"
>
<icon-refresh :size="18" />
</a-button>
<a-button
v-if="showAdd"
type="text"
size="small"
class="action-icon-btn add-btn"
:title="addTitle"
@click="handleAdd"
>
<icon-plus :size="18" />
</a-button>
</div>
<a-button
v-if="showRefresh"
type="text"
size="small"
shape="circle"
class="action-icon-btn refresh-btn"
:class="{ 'is-spinning': refreshing || loading }"
:disabled="refreshing || loading"
:title="refreshTitle"
@click="handleRefresh"
>
<icon-refresh :size="15" class="refresh-btn-ico" />
</a-button>
<a-button
v-if="showAdd"
type="text"
size="small"
shape="circle"
class="action-icon-btn add-btn"
:title="addTitle"
@click="handleAdd"
>
<icon-plus :size="15" />
</a-button>
</div>
<div v-if="$slots['search-extra']" class="search-extra">
<slot name="search-extra" />
@ -367,7 +395,7 @@
class="interface-tree"
:class="{ 'interface-tree--hierarchical': hierarchical }"
>
<div v-if="loading" class="loading-state">
<div v-if="loading || refreshing" class="loading-state">
<img
v-if="appMascotUrl"
class="state-mascot is-bounce"
@ -433,7 +461,16 @@
v-if="getNodeData(key)?.isLeaf && showNodeActions"
class="node-actions-cell"
>
<!-- 有扩展槽(开关等):放到上行;三点菜单改到下行 -->
<span
v-if="$slots['node-second-row-extra']"
class="node-second-row-extra-slot node-second-row-extra-slot--top"
@click.stop
>
<slot name="node-second-row-extra" :node-data="getNodeData(key)" :node-key="key"></slot>
</span>
<a-dropdown
v-else
trigger="click"
:popup-max-height="false"
@select="handleActionSelect"
@ -441,6 +478,7 @@
<a-button
type="text"
size="small"
shape="circle"
class="action-btn vertical-dots"
:title="actionsTitle"
@click.stop
@ -532,17 +570,70 @@
((showNodeCode && getNodeData(key)?.code) || !!$slots['node-second-row-extra'])
"
>
<td v-if="showNodeCode && getNodeData(key)?.code" class="node-code-cell">
<span class="interface-code">{{ getNodeData(key)?.code }}</span>
</td>
<td
:class="['node-actions-cell', 'node-second-row-extra-cell']"
:colspan="(showNodeCode && getNodeData(key)?.code) ? 1 : 2"
>
<span class="node-second-row-extra-slot">
<slot name="node-second-row-extra" :node-data="getNodeData(key)" :node-key="key"></slot>
</span>
</td>
<!-- 开关在上行时:下行左侧时间/编码,右侧三点 -->
<template v-if="showNodeActions && $slots['node-second-row-extra']">
<td class="node-code-cell">
<span v-if="showNodeCode && getNodeData(key)?.code" class="interface-code">
{{ getNodeData(key)?.code }}
</span>
</td>
<td class="node-actions-cell node-second-row-extra-cell">
<a-dropdown
trigger="click"
:popup-max-height="false"
@select="handleActionSelect"
>
<a-button
type="text"
size="small"
shape="circle"
class="action-btn vertical-dots"
:title="actionsTitle"
@click.stop
>
<div class="vertical-dots-icon">
<span></span>
<span></span>
<span></span>
</div>
</a-button>
<template #content>
<slot name="node-menu" :node-data="getNodeData(key)" :node-key="key">
<a-doption
value="delete"
:data="getNodeData(key)"
@click="handleDeleteNode(getNodeData(key))"
>
<icon-delete />
{{ deleteLabel }}
</a-doption>
</slot>
</template>
</a-dropdown>
</td>
</template>
<!-- 无操作菜单:扩展槽仍在下行(兼容旧用法) -->
<template v-else-if="$slots['node-second-row-extra']">
<td
v-if="showNodeCode && getNodeData(key)?.code"
class="node-code-cell"
>
<span class="interface-code">{{ getNodeData(key)?.code }}</span>
</td>
<td
class="node-actions-cell node-second-row-extra-cell"
:colspan="showNodeCode && getNodeData(key)?.code ? 1 : 2"
>
<span class="node-second-row-extra-slot">
<slot name="node-second-row-extra" :node-data="getNodeData(key)" :node-key="key"></slot>
</span>
</td>
</template>
<template v-else>
<td colspan="2" class="node-code-cell">
<span class="interface-code">{{ getNodeData(key)?.code }}</span>
</td>
</template>
</template>
<template v-else>
<td colspan="2" class="node-second-row-spacer-cell" aria-hidden="true" />
@ -556,7 +647,7 @@
</div>
<div
v-if="showPagination && paginationMeta.showPagination && !loading"
v-if="showPagination && paginationMeta.showPagination && !loading && !refreshing"
class="menu-pagination"
>
<div class="menu-pagination-capsule">
@ -658,7 +749,7 @@
.search-box {
display: flex;
align-items: center;
gap: 4px;
gap: 6px;
width: 100%;
}
@ -704,53 +795,77 @@
}
}
.search-actions {
display: flex;
gap: 2px;
flex-shrink: 0;
}
.action-icon-btn {
width: 28px;
height: 28px;
padding: 0;
display: flex;
flex-shrink: 0;
width: 28px !important;
height: 28px !important;
min-width: 28px !important;
margin: 0 !important;
padding: 0 !important;
display: inline-flex !important;
align-items: center;
justify-content: center;
color: var(--clm-muted);
border: none;
border-radius: 7px;
border: none !important;
border-radius: 50% !important;
background: rgba(26, 46, 56, 0.05) !important;
font-size: 14px;
font-weight: 510;
transition: background-color 0.12s ease, color 0.12s ease;
line-height: 0;
transition: background-color 0.14s ease, color 0.14s ease;
:deep(.arco-icon) {
font-size: 14px;
:deep(.arco-icon),
:deep(svg) {
display: block;
width: 15px !important;
height: 15px !important;
min-width: 15px !important;
min-height: 15px !important;
font-size: 15px !important;
line-height: 1;
}
&:hover {
color: var(--clm-text);
background-color: var(--clm-hover);
background: rgba(26, 46, 56, 0.09) !important;
}
&.add-btn,
&.refresh-btn {
color: var(--clm-muted);
:deep(.arco-icon),
:deep(svg) {
font-size: 18px !important;
width: 18px !important;
height: 18px !important;
min-width: 18px !important;
min-height: 18px !important;
}
&:hover {
&:hover:not(:disabled) {
color: var(--clm-text);
background-color: var(--clm-hover);
background: rgba(26, 46, 56, 0.09) !important;
}
}
&.refresh-btn.is-spinning {
color: var(--app-primary-color, #1d7281);
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff) !important;
opacity: 1;
cursor: wait;
.refresh-btn-ico {
animation: clm-refresh-spin 0.7s linear infinite;
}
}
}
.refresh-btn-ico {
display: block;
}
@keyframes clm-refresh-spin {
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: reduce) {
.action-icon-btn.refresh-btn.is-spinning .refresh-btn-ico {
animation: none;
}
}
.interface-tree {
@ -1328,7 +1443,10 @@
}
.node-second-row > td {
padding-top: 2px;
padding-top: 6px;
padding-bottom: 0;
vertical-align: middle;
height: 24px;
}
.node-content-cell {
@ -1351,11 +1469,9 @@
.node-code-cell {
text-align: left;
padding: 2px 0 0;
width: auto;
padding-left: 20px;
height: var(--clm-node-second-line-height);
vertical-align: middle;
padding-right: 0;
width: auto;
overflow: hidden;
}
@ -1411,11 +1527,8 @@
.node-second-row-extra-cell {
text-align: right;
padding: 2px 0 0;
min-width: 50px;
width: auto;
height: var(--clm-node-second-line-height);
vertical-align: middle;
min-width: 28px;
width: 28px;
}
.node-second-row-spacer-cell {
@ -1517,8 +1630,10 @@
color: var(--clm-muted);
font-size: 11px;
font-weight: 450;
display: inline-block;
line-height: var(--clm-node-second-line-height);
display: inline-flex;
align-items: center;
height: 24px;
line-height: 24px;
letter-spacing: -0.01em;
max-width: 100%;
overflow: hidden;
@ -1550,18 +1665,20 @@
}
.action-btn {
padding: 0;
min-width: 20px;
height: 20px;
display: flex;
padding: 0 !important;
min-width: 24px !important;
width: 24px !important;
height: 24px !important;
display: inline-flex !important;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.12s ease;
border-radius: 5px;
transition: opacity 0.12s ease, background-color 0.12s ease;
border-radius: 50% !important;
background: rgba(26, 46, 56, 0.05);
&:hover {
background: rgba(15, 16, 17, 0.06);
background: rgba(26, 46, 56, 0.09) !important;
}
:deep(.arco-icon) {
@ -1569,6 +1686,13 @@
}
}
.node-second-row-extra-slot--top {
display: inline-flex;
align-items: center;
justify-content: flex-end;
width: 100%;
}
.vertical-dots-icon {
display: flex;
flex-direction: column;

View File

@ -7,7 +7,9 @@
:aria-label="warehouseTitle"
@click="openWarehousePeek"
>
<icon-home class="cpt-tools__wh-ico" />
<span class="cpt-tools__wh-icon" aria-hidden="true">
<icon-home class="cpt-tools__wh-ico" />
</span>
<span class="cpt-tools__wh-name">{{ warehouseName }}</span>
<icon-down class="cpt-tools__wh-caret" />
</button>
@ -28,10 +30,11 @@
:aria-label="t('navbar.message')"
>
<icon-notification class="cpt-tools__chip-ico" />
<span class="cpt-tools__chip-label">{{ t('navbar.message') }}</span>
<span v-if="messageTotal > 0" class="cpt-tools__chip-count">
{{ messageBadge }}
</span>
<span
v-if="messageTotal > 0"
class="cpt-tools__chip-ping"
aria-hidden="true"
/>
</button>
<template #content>
<a-doption @click="goInbox('message')">
@ -60,12 +63,12 @@
:aria-label="t('nav.printControl.menu')"
>
<icon-printer class="cpt-tools__chip-ico" />
<span class="cpt-tools__chip-label">打印</span>
<span
class="cpt-tools__chip-dot"
class="cpt-tools__chip-ping"
:class="{
'is-on': printConnectionState.enabled,
'is-busy': printConnectionState.connecting,
'is-off': !printConnectionState.enabled && !printConnectionState.connecting,
}"
aria-hidden="true"
/>
@ -116,8 +119,7 @@ const { t } = useI18n();
const router = useRouter();
const warehouseStore = useCurrentWarehouseStore();
const printConnectionState = useHiprintClientState();
const { notificationCount, noticeCount, totalCount, displayCount, refreshUnread } =
useInboxUnread();
const { notificationCount, noticeCount, totalCount, refreshUnread } = useInboxUnread();
const warehousePeekVisible = ref(false);
@ -135,7 +137,6 @@ const printConnectionTitle = computed(() => {
});
const messageTotal = computed(() => totalCount.value);
const messageBadge = computed(() => displayCount.value);
function openWarehousePeek() {
warehousePeekVisible.value = true;
@ -201,26 +202,49 @@ onMounted(() => {
.cpt-tools__wh {
display: inline-flex;
align-items: center;
gap: 6px;
max-width: 180px;
gap: 8px;
max-width: 200px;
height: 100%;
padding: 0 10px 0 8px;
padding: 0 8px 0 0;
border: none;
border-radius: 8px;
border-radius: 999px;
background: transparent;
color: var(--cpt-ink);
cursor: pointer;
transition: background-color 0.14s ease;
&:hover {
background: rgba(26, 46, 56, 0.05);
background: rgba(26, 46, 56, 0.04);
.cpt-tools__wh-icon {
background: rgba(26, 46, 56, 0.09);
color: var(--cpt-ink);
}
}
}
.cpt-tools__wh-ico {
.cpt-tools__wh-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: var(--cpt-h);
height: var(--cpt-h);
flex-shrink: 0;
font-size: 15px;
border-radius: 999px;
background: rgba(26, 46, 56, 0.05);
color: var(--cpt-muted);
line-height: 0;
transition: color 0.14s ease, background-color 0.14s ease;
}
.cpt-tools__wh-ico {
display: block;
flex-shrink: 0;
width: 15px;
height: 15px;
font-size: 15px;
line-height: 1;
color: inherit;
}
.cpt-tools__wh-name {
@ -243,35 +267,39 @@ onMounted(() => {
.cpt-tools__actions {
display: inline-flex;
align-items: center;
gap: 2px;
gap: 6px;
height: 100%;
}
.cpt-tools__chip {
position: relative;
display: inline-flex;
align-items: center;
gap: 6px;
height: 100%;
min-width: 0;
padding: 0 10px;
justify-content: center;
width: var(--cpt-h);
height: var(--cpt-h);
min-width: var(--cpt-h);
padding: 0;
border: none;
border-radius: 8px;
background: transparent;
border-radius: 999px;
background: rgba(26, 46, 56, 0.05);
color: var(--cpt-muted);
line-height: 0;
cursor: pointer;
transition: color 0.14s ease, background-color 0.14s ease;
&:hover {
color: var(--cpt-ink);
background: rgba(26, 46, 56, 0.05);
background: rgba(26, 46, 56, 0.09);
}
&.is-hot {
color: var(--app-primary-color, #1d7281);
color: var(--cpt-ink);
}
&.is-on {
color: var(--app-primary-color, #1d7281);
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff);
}
&.is-busy {
@ -281,46 +309,63 @@ onMounted(() => {
}
.cpt-tools__chip-ico {
display: block;
flex-shrink: 0;
width: 15px;
height: 15px;
font-size: 15px;
}
.cpt-tools__chip-label {
flex-shrink: 0;
font-size: 13px;
font-weight: 500;
line-height: 1;
color: inherit;
}
.cpt-tools__chip-count {
flex-shrink: 0;
min-width: 16px;
height: 16px;
padding: 0 4px;
border-radius: 8px;
background: #f53f3f;
color: #fff;
font-size: 11px;
font-weight: 600;
line-height: 16px;
text-align: center;
letter-spacing: -0.02em;
}
.cpt-tools__chip-dot {
flex-shrink: 0;
width: 6px;
height: 6px;
/* 右上角状态点 + 扩散涟漪(消息红 / 打印绿橙灰) */
.cpt-tools__chip-ping {
--cpt-ping: #f53f3f;
position: absolute;
top: 4px;
right: 4px;
width: 7px;
height: 7px;
border-radius: 50%;
background: #c9cdd4;
background: var(--cpt-ping);
box-shadow: 0 0 0 1.5px #fff;
pointer-events: none;
&::before {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
background: var(--cpt-ping);
animation: cpt-chip-ping 1.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
&.is-on {
background: #00b42a;
--cpt-ping: #00b42a;
}
&.is-busy {
background: #ff7d00;
--cpt-ping: #ff7d00;
}
&.is-off {
--cpt-ping: #c9cdd4;
}
}
@keyframes cpt-chip-ping {
0% {
transform: scale(1);
opacity: 0.7;
}
100% {
transform: scale(2.6);
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.cpt-tools__chip-ping::before {
animation: none;
}
}
</style>

View File

@ -22,15 +22,17 @@
:title="brandCopy.navFullName"
@click.prevent="goOfficialSite"
>
<img
v-if="navLogoSrc"
:src="navLogoSrc"
:alt="brandCopy.navName"
class="customer-side-rail__brand-logo"
/>
<span v-else class="customer-side-rail__brand-mark" aria-hidden="true">{{
BRAND_TEXT_LOGO
}}</span>
<span class="customer-side-rail__brand-badge">
<img
v-if="navLogoSrc"
:src="navLogoSrc"
:alt="brandCopy.navName"
class="customer-side-rail__brand-logo"
/>
<span v-else class="customer-side-rail__brand-mark" aria-hidden="true">{{
BRAND_TEXT_LOGO
}}</span>
</span>
</a>
<div class="customer-side-rail__scroll">
@ -68,7 +70,6 @@
@pointerenter="prefetch(item)"
@click="onNavigate(item)"
>
<span class="customer-side-rail__active-dot" aria-hidden="true" />
<span class="customer-side-rail__icon">
<component :is="getSubMenuIcon(item, undefined, MENU_NAME_TO_LOCALE_KEY)" />
</span>
@ -77,14 +78,16 @@
</span>
</button>
<button
v-if="!compactLayout"
v-if="!compactLayout && isActive(item)"
type="button"
class="customer-side-rail__refresh"
:class="{ 'is-spinning': refreshingPath === navKey(item) }"
:disabled="refreshingPath === navKey(item)"
:title="t('nav.sideRail.refresh')"
:aria-label="t('nav.sideRail.refresh')"
@click.stop="onRefresh(item)"
>
<icon-refresh />
<icon-refresh class="customer-side-rail__refresh-ico" />
</button>
</div>
</a-tooltip>
@ -112,8 +115,8 @@
:title="collapsed ? t('nav.sideRail.expand') : t('nav.sideRail.collapse')"
@click="toggleCollapsed"
>
<icon-double-right v-if="collapsed" class="customer-side-rail__toggle-icon" />
<icon-double-left v-else class="customer-side-rail__toggle-icon" />
<icon-right v-if="collapsed" class="customer-side-rail__toggle-icon" />
<icon-left v-else class="customer-side-rail__toggle-icon" />
</button>
</div>
</div>
@ -139,9 +142,9 @@ import { computed, nextTick, onUnmounted, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import {
IconDoubleLeft,
IconDoubleRight,
IconLeft,
IconRefresh,
IconRight,
} from '@arco-design/web-vue/es/icon'
import { useTabBarStore } from '@/store'
import type { TagProps } from '@/store/modules/tab-bar/types'
@ -192,6 +195,8 @@ const compactLayout = ref(collapsed.value)
const animating = ref(false)
const resizing = ref(false)
const expandedWidth = ref(readCustomerSideRailExpandedWidth(CUSTOMER_SIDE_RAIL_EXPANDED_WIDTH))
/** 正在刷新的菜单 path,用于转圈与防连点 */
const refreshingPath = ref('')
let compactTimer = 0
let resizeStartX = 0
let resizeStartW = 0
@ -392,35 +397,43 @@ async function onRefresh(item: CustomerNavItem) {
let targetPath = getCustomerNavPath(item)
if (!targetPath || regexUrl.test(targetPath)) return
if (!targetPath.startsWith('/')) targetPath = `/${targetPath}`
if (refreshingPath.value === targetPath) return
const portalPanel = resolvePortalDrawerPanel(targetPath)
if (portalPanel) {
openPortalSideDrawer(portalPanel)
return
refreshingPath.value = targetPath
try {
const portalPanel = resolvePortalDrawerPanel(targetPath)
if (portalPanel) {
openPortalSideDrawer(portalPanel)
return
}
if (router.currentRoute.value.path !== targetPath) {
await router.push(targetPath).catch(() => undefined)
}
const cacheKey = resolveRefreshCacheKey(targetPath)
if (!cacheKey) return
await nextTick()
tabBarStore.deleteCache({ name: cacheKey } as TagProps)
await nextTick()
tabBarStore.bumpRouteRefresh(cacheKey)
await nextTick()
const ignoreCache = !!router.currentRoute.value.meta?.ignoreCache
if (!ignoreCache) {
tabBarStore.addCache(cacheKey)
}
pub('page:refresh', {
routeName: cacheKey,
fullPath: router.currentRoute.value.fullPath,
})
} finally {
window.setTimeout(() => {
if (refreshingPath.value === targetPath) refreshingPath.value = ''
}, 420)
}
if (router.currentRoute.value.path !== targetPath) {
await router.push(targetPath).catch(() => undefined)
}
const cacheKey = resolveRefreshCacheKey(targetPath)
if (!cacheKey) return
await nextTick()
tabBarStore.deleteCache({ name: cacheKey } as TagProps)
await nextTick()
tabBarStore.bumpRouteRefresh(cacheKey)
await nextTick()
const ignoreCache = !!router.currentRoute.value.meta?.ignoreCache
if (!ignoreCache) {
tabBarStore.addCache(cacheKey)
}
pub('page:refresh', {
routeName: cacheKey,
fullPath: router.currentRoute.value.fullPath,
})
}
watch(
@ -447,13 +460,13 @@ onUnmounted(() => {
<style lang="less" scoped>
.customer-side-rail {
--csr-pad-x: 14px;
--csr-pad-x: 8px;
--csr-item-h: 44px;
/* 与工作台 banner / panel 卡片圆角一致 */
--csr-radius: 16px;
--csr-panel-radius: 16px;
/* 菜单项圆角;外壳不再做白底卡片 */
--csr-radius: 10px;
--csr-panel-inset: 16px;
--csr-shell-width: 180px;
--csr-panel-inset-left: 8px;
--csr-shell-width: 156px;
--csr-ease: cubic-bezier(0.32, 0.72, 0, 1);
--csr-dur: 0.3s;
@ -461,11 +474,12 @@ onUnmounted(() => {
align-self: stretch;
box-sizing: border-box;
height: calc(100% - var(--csr-panel-inset) * 2);
margin: var(--csr-panel-inset) 0 var(--csr-panel-inset) var(--csr-panel-inset);
margin: var(--csr-panel-inset) 0 var(--csr-panel-inset) var(--csr-panel-inset-left);
min-height: 0;
overflow: hidden;
background: var(--app-card-bg, #fff);
border-radius: var(--csr-panel-radius);
background: transparent;
border-radius: 0;
box-shadow: none;
position: relative;
/* 外层只动画宽度;内容在 shell 内固定宽,不随变窄重排(Linear / Notion) */
transition: width var(--csr-dur) var(--csr-ease);
@ -547,28 +561,43 @@ onUnmounted(() => {
justify-content: center;
gap: 0;
flex-shrink: 0;
min-height: 40px;
padding: 2px 16px;
box-sizing: border-box;
height: 48px;
min-height: 48px;
padding: 0 8px;
color: inherit;
text-decoration: none;
border-bottom: 1px solid var(--color-border-2, rgba(0, 0, 0, 0.06));
border: none;
}
&__brand-badge {
display: inline-flex;
align-items: center;
justify-content: center;
width: 72px;
height: 42px;
flex-shrink: 0;
border-radius: 999px;
background: rgba(26, 46, 56, 0.05);
overflow: hidden;
line-height: 0;
}
&__brand-logo {
display: block;
width: 40px;
height: 40px;
width: 36px;
height: 36px;
flex-shrink: 0;
/* 与登录页一致:contain 避免 cover 裁切发糊;圆角过大也会让小图发软 */
object-fit: contain;
border: none;
border-radius: 0;
image-rendering: -webkit-optimize-contrast;
}
&__brand-mark {
font-size: 18px;
font-size: 14px;
font-weight: 700;
letter-spacing: 0.12em;
letter-spacing: 0.08em;
line-height: 1;
color: var(--color-text-3, #86909c);
user-select: none;
@ -599,7 +628,7 @@ onUnmounted(() => {
}
&__label {
padding: 0 12px 4px;
padding: 0 8px 4px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.04em;
@ -622,7 +651,7 @@ onUnmounted(() => {
&__refresh {
position: absolute;
right: 6px;
right: 4px;
top: 50%;
z-index: 1;
display: inline-flex;
@ -633,33 +662,63 @@ onUnmounted(() => {
margin: 0;
padding: 0;
border: none;
border-radius: 6px;
background: transparent;
border-radius: 999px;
background: rgba(26, 46, 56, 0.05);
color: var(--color-text-3);
font-size: 14px;
line-height: 0;
cursor: pointer;
opacity: 0;
pointer-events: none;
transform: translateY(-50%);
transform: translateY(-50%) scale(0.92);
transition:
opacity 0.14s ease,
opacity 0.16s ease,
color 0.14s ease,
background-color 0.14s ease;
background-color 0.14s ease,
transform 0.16s ease;
&:hover {
color: var(--app-primary-color, rgb(var(--primary-6)));
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 10%, #fff);
&:hover:not(:disabled) {
color: var(--color-text-1);
background: rgba(26, 46, 56, 0.1);
}
&:disabled,
&.is-spinning {
opacity: 1;
pointer-events: none;
color: #f56668;
background: color-mix(in srgb, #f56668 12%, #fff);
transform: translateY(-50%) scale(1);
}
}
&__item-wrap:hover &__refresh {
opacity: 1;
pointer-events: auto;
background: color-mix(in srgb, #fff 92%, transparent);
&__refresh-ico {
display: block;
width: 14px;
height: 14px;
font-size: 14px;
}
&__item-wrap:hover &__refresh:hover {
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 10%, #fff);
&__refresh.is-spinning &__refresh-ico {
animation: csr-refresh-spin 0.7s linear infinite;
}
/* 仅当前页:悬停行时露出刷新圆钮 */
&__item-wrap:hover &__refresh:not(:disabled) {
opacity: 1;
pointer-events: auto;
transform: translateY(-50%) scale(1);
}
@keyframes csr-refresh-spin {
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: reduce) {
&__refresh.is-spinning &__refresh-ico {
animation: none;
}
}
&__item {
@ -669,7 +728,7 @@ onUnmounted(() => {
gap: 8px;
width: 100%;
min-height: var(--csr-item-h);
padding: 0 12px 0 8px;
padding: 0 8px 0 4px;
border: none;
border-radius: 10px;
background: transparent;
@ -686,45 +745,29 @@ onUnmounted(() => {
background: rgba(15, 23, 42, 0.04);
}
/* Linear 式:浅底 + 左侧选中点 */
/* 选中:珊瑚红圆底包图标;右侧给刷新钮留位 */
&.active {
color: var(--app-primary-color, #1d7281);
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 10%, #fff);
color: var(--color-text-1);
background: transparent;
font-weight: 600;
box-shadow: none;
.customer-side-rail__active-dot {
background: var(--app-primary-color, #1d7281);
box-shadow: 0 0 0 3px
color-mix(in srgb, var(--app-primary-color, #1d7281) 18%, transparent);
}
padding-right: 30px;
.customer-side-rail__icon {
color: var(--app-primary-color, #1d7281);
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff);
color: #fff;
background: #f56668;
}
.customer-side-rail__text {
color: var(--app-primary-color, #1d7281);
color: var(--color-text-1);
}
&:hover {
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 14%, #fff);
background: rgba(15, 23, 42, 0.04);
}
}
}
&__active-dot {
flex-shrink: 0;
width: 6px;
height: 6px;
border-radius: 50%;
background: transparent;
transition:
background-color 0.16s ease,
box-shadow 0.16s ease;
}
&__icon {
display: inline-flex;
align-items: center;
@ -732,18 +775,25 @@ onUnmounted(() => {
width: 28px;
height: 28px;
flex-shrink: 0;
border-radius: 8px;
border-radius: 999px;
font-size: 16px;
line-height: 0;
color: var(--color-text-3);
background: transparent;
background: rgba(26, 46, 56, 0.05);
transition:
color 0.16s ease,
background-color 0.16s ease;
:deep(.arco-icon) {
display: block;
width: 16px;
height: 16px;
}
}
&__item:hover:not(.active) &__icon {
color: var(--color-text-1);
background: rgba(15, 23, 42, 0.04);
background: rgba(26, 46, 56, 0.09);
}
&__text {
@ -826,28 +876,32 @@ onUnmounted(() => {
}
&__toggle {
display: flex;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 32px;
height: 40px;
width: 28px;
height: 28px;
padding: 0;
border: none;
border-radius: 8px;
background: transparent;
border-radius: 999px;
background: rgba(26, 46, 56, 0.05);
color: var(--color-text-3);
cursor: pointer;
font-size: 13px;
line-height: 0;
transition: color 0.14s ease, background-color 0.14s ease;
&:hover {
color: var(--app-primary-color);
background: rgba(15, 23, 42, 0.04);
color: var(--color-text-1);
background: rgba(26, 46, 56, 0.09);
}
}
&__toggle-icon {
display: inline-flex;
font-size: 13px;
display: block;
width: 14px;
height: 14px;
font-size: 14px;
}
/*
@ -862,8 +916,15 @@ onUnmounted(() => {
.customer-side-rail__brand {
justify-content: center;
gap: 0;
padding: 2px 0;
min-height: 40px;
padding: 0;
height: 48px;
min-height: 48px;
width: 100%;
}
.customer-side-rail__brand-badge {
width: 72px;
height: 42px;
}
.customer-side-rail__scroll {
@ -905,23 +966,15 @@ onUnmounted(() => {
border-radius: var(--csr-radius);
&:hover {
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 8%, #fff);
background: rgba(15, 23, 42, 0.04);
}
&.active {
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff);
background: transparent;
box-shadow: none;
}
}
.customer-side-rail__active-dot {
position: absolute;
top: 5px;
right: 5px;
width: 5px;
height: 5px;
}
.customer-side-rail__text {
display: none;
}
@ -959,8 +1012,8 @@ onUnmounted(() => {
}
.customer-side-rail__toggle {
width: 32px;
height: 32px;
width: 28px;
height: 28px;
padding: 0;
}
}

View File

@ -1,5 +1,5 @@
<template>
<!-- Top-nav inbox / announcement entry (unread counts stay here, not on Edi FAB). -->
<!-- Top-nav inbox / announcement entry (unread: ping, not count). -->
<a-dropdown
:trigger="trigger"
:position="dropdownPosition"
@ -9,12 +9,17 @@
>
<div
class="message-dropdown-trigger"
:class="{ 'is-emphasized': emphasize && totalCount > 0 }"
:class="{ 'is-hot': totalCount > 0, 'is-emphasized': emphasize && totalCount > 0 }"
:title="t('navbar.message')"
:aria-label="t('navbar.message')"
>
<IconNotification class="message-icon" :class="totalCount > 0 ? 'theMessage' : ''" />
<IconNotification class="message-icon" />
<span v-if="showLabel" class="message-label">{{ t('navbar.message') }}</span>
<span v-if="totalCount > 0" class="message-count">{{ displayCount }}</span>
<span
v-if="totalCount > 0"
class="message-ping"
aria-hidden="true"
/>
</div>
<template #content>
<a-doption @click="() => onMessageMenuClick({ key: 'notification' })">
@ -65,7 +70,7 @@ const popupTranslate = computed<[number, number] | undefined>(() =>
const router = useRouter();
const { t } = useI18n();
const { notificationCount, noticeCount, totalCount, displayCount, refreshUnread } = useInboxUnread();
const { notificationCount, noticeCount, totalCount, refreshUnread } = useInboxUnread();
const onMessageDropdownVisibleChange = (visible: boolean) => {
if (visible) refreshUnread();
@ -83,45 +88,31 @@ const onMessageMenuClick = (event: { key?: string }) => {
</script>
<style scoped>
@keyframes zy {
10% {
transform: rotate(15deg);
}
20% {
transform: rotate(-10deg);
}
30% {
transform: rotate(5deg);
}
40% {
transform: rotate(-5deg);
}
50%,
100% {
transform: rotate(0deg);
}
}
.theMessage {
animation: zy 2.5s 0.15s linear infinite;
}
.message-dropdown-trigger {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 3px;
min-width: 28px;
height: 28px;
padding: 0 6px;
border-radius: 8px;
gap: 6px;
width: 30px;
min-width: 30px;
height: 30px;
padding: 0;
border-radius: 999px;
background: rgba(26, 46, 56, 0.05);
color: rgba(26, 46, 56, 0.52);
line-height: 0;
cursor: pointer;
color: inherit;
transition: background-color 0.15s ease, opacity 0.15s ease, color 0.15s ease;
transition: background-color 0.14s ease, color 0.14s ease;
}
.message-dropdown-trigger:hover {
background-color: rgba(0, 0, 0, 0.05);
color: #1a2e38;
background: rgba(26, 46, 56, 0.09);
}
.message-dropdown-trigger.is-hot {
color: #1a2e38;
}
.message-dropdown-trigger.is-emphasized {
@ -130,8 +121,12 @@ const onMessageMenuClick = (event: { key?: string }) => {
}
.message-icon {
font-size: 16px;
display: block;
width: 15px;
height: 15px;
font-size: 15px;
flex-shrink: 0;
line-height: 1;
}
.message-label {
@ -142,18 +137,47 @@ const onMessageMenuClick = (event: { key?: string }) => {
color: inherit;
}
.message-count {
flex-shrink: 0;
min-width: 16px;
height: 16px;
padding: 0 4px;
border-radius: 8px;
background: #f53f3f;
color: #fff;
font-size: 11px;
font-weight: 600;
line-height: 16px;
text-align: center;
letter-spacing: -0.02em;
.message-dropdown-trigger:has(.message-label) {
width: auto;
padding: 0 10px 0 8px;
}
.message-ping {
--msg-ping: #f53f3f;
position: absolute;
top: 4px;
right: 4px;
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--msg-ping);
box-shadow: 0 0 0 1.5px #fff;
pointer-events: none;
}
.message-ping::before {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
background: var(--msg-ping);
animation: msg-chip-ping 1.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
@keyframes msg-chip-ping {
0% {
transform: scale(1);
opacity: 0.7;
}
100% {
transform: scale(2.6);
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.message-ping::before {
animation: none;
}
}
</style>

View File

@ -859,10 +859,11 @@ const onMenuClick = async (event: { key: string }) => {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 7px;
border-radius: 999px;
font-size: 13px;
line-height: 0;
color: rgba(26, 46, 56, 0.55);
background: rgba(15, 23, 42, 0.04);
background: rgba(26, 46, 56, 0.05);
}
&__item-label {

View File

@ -73,17 +73,20 @@ function changeLang({ key }: { key: string }) {
}
.dropDown {
cursor: pointer;
color: inherit;
color: rgba(26, 46, 56, 0.52);
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border-radius: 8px;
transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
width: 30px;
height: 30px;
border-radius: 999px;
background: rgba(26, 46, 56, 0.05);
line-height: 0;
transition: background-color 0.14s ease, color 0.14s ease;
&:hover {
background-color: rgba(0, 0, 0, 0.05);
color: #1a2e38;
background: rgba(26, 46, 56, 0.09);
}
&.is-sider {
@ -98,7 +101,11 @@ function changeLang({ key }: { key: string }) {
}
.lang-icon {
font-size: 16px;
display: block;
width: 15px;
height: 15px;
font-size: 15px;
line-height: 1;
}
}

View File

@ -233,7 +233,15 @@
@keydown.enter.prevent="onPrintConnectionClick"
>
<icon-printer class="print-connection-icon" />
<span class="print-connection-dot" aria-hidden="true" />
<span
class="print-connection-ping"
:class="{
'is-on': printConnectionState.enabled,
'is-busy': printConnectionState.connecting,
'is-off': !printConnectionState.enabled && !printConnectionState.connecting,
}"
aria-hidden="true"
/>
</span>
</a-tooltip>
</div>
@ -1410,7 +1418,7 @@ onUnmounted(() => {
align-items: center;
gap: 8px;
/* 独立白底胶囊标(高度与 .top-nav-menu 同为 44) */
/* 与客户侧栏品牌椭圆同步:浅灰底、无描边 */
.top-nav-logo {
position: relative;
z-index: 2;
@ -1418,42 +1426,39 @@ onUnmounted(() => {
align-items: center;
justify-content: center;
flex-shrink: 0;
height: 44px;
min-width: 64px;
width: 72px;
height: 42px;
min-width: 72px;
margin: 0;
padding: 0 14px;
padding: 0;
border: none;
border-radius: 999px;
background: #fff;
border: 1px solid rgba(15, 23, 42, 0.08);
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
background: rgba(26, 46, 56, 0.05);
box-shadow: none;
color: inherit;
text-decoration: none;
cursor: pointer;
overflow: hidden;
box-sizing: border-box;
transition:
border-color 0.18s ease,
box-shadow 0.18s ease,
transform 0.14s ease;
line-height: 0;
transition: background-color 0.14s ease;
&:hover {
border-color: rgba(15, 23, 42, 0.12);
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
background: rgba(26, 46, 56, 0.09);
}
&:active {
border-color: rgba(15, 23, 42, 0.1);
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
background: rgba(26, 46, 56, 0.08);
transform: scale(0.98);
}
img {
height: 28px;
width: auto;
max-width: 88px;
width: 36px;
height: 36px;
box-sizing: border-box;
object-fit: contain;
display: block;
border: none;
background: transparent;
border: none;
border-radius: 0;
@ -1570,7 +1575,7 @@ onUnmounted(() => {
.top-nav-right-cluster {
display: inline-flex;
align-items: center;
gap: 2px;
gap: 6px;
min-width: 0;
&--meta {
@ -1600,7 +1605,7 @@ onUnmounted(() => {
position: relative;
&--warehouse {
max-width: 180px;
max-width: 220px;
}
}
@ -1611,48 +1616,91 @@ onUnmounted(() => {
justify-content: center;
width: 30px;
height: 30px;
border-radius: 9px;
color: var(--color-text-3, #86909c);
border-radius: 999px;
background: rgba(26, 46, 56, 0.05);
color: rgba(26, 46, 56, 0.52);
line-height: 0;
text-decoration: none;
cursor: pointer;
outline: none;
transition:
color 0.16s ease,
background-color 0.16s ease,
opacity 0.16s ease;
color 0.14s ease,
background-color 0.14s ease,
opacity 0.14s ease;
&:hover {
color: var(--color-text-1, #1d2129);
background-color: rgba(15, 23, 42, 0.045);
color: #1a2e38;
background: rgba(26, 46, 56, 0.09);
}
&.is-enabled {
color: var(--color-text-1, #1d2129);
color: var(--app-primary-color, #1d7281);
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff);
}
&.is-loading {
opacity: 0.5;
opacity: 0.55;
pointer-events: none;
}
}
.print-connection-icon {
display: block;
width: 15px;
height: 15px;
font-size: 15px;
line-height: 1;
}
.print-connection-dot {
.print-connection-ping {
--print-ping: #c9cdd4;
position: absolute;
right: 5px;
bottom: 5px;
width: 6px;
height: 6px;
top: 4px;
right: 4px;
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--color-text-4, #c9cdd4);
box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.92);
background: var(--print-ping);
box-shadow: 0 0 0 1.5px #fff;
pointer-events: none;
&::before {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
background: var(--print-ping);
animation: top-nav-chip-ping 1.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
&.is-on {
--print-ping: #00b42a;
}
&.is-busy {
--print-ping: #ff7d00;
}
&.is-off {
--print-ping: #c9cdd4;
}
}
.print-connection-trigger.is-enabled .print-connection-dot {
background: #22c55e;
@keyframes top-nav-chip-ping {
0% {
transform: scale(1);
opacity: 0.7;
}
100% {
transform: scale(2.6);
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.print-connection-ping::before {
animation: none;
}
}
.balance-dropdown-trigger {
@ -1694,47 +1742,34 @@ onUnmounted(() => {
padding-right: 2px;
}
/* 统一消息 / 语言触控态 */
/* 统一消息 / 语言:圆钮,与客户门户工具条一致 */
:deep(.dropDown) {
width: 30px;
height: 30px;
min-width: 30px;
padding: 0;
border-radius: 9px;
color: var(--color-text-3, #86909c);
border-radius: 999px;
background: rgba(26, 46, 56, 0.05);
color: rgba(26, 46, 56, 0.52);
line-height: 0;
transition:
color 0.16s ease,
background-color 0.16s ease;
color 0.14s ease,
background-color 0.14s ease;
&:hover {
color: var(--color-text-1, #1d2129);
background-color: rgba(15, 23, 42, 0.045);
color: #1a2e38;
background: rgba(26, 46, 56, 0.09);
}
}
:deep(.message-dropdown-trigger) {
min-width: 30px;
height: 30px;
padding: 0 6px;
border-radius: 9px;
color: var(--color-text-3, #86909c);
transition:
color 0.16s ease,
background-color 0.16s ease;
&:hover {
color: var(--color-text-1, #1d2129);
background-color: rgba(15, 23, 42, 0.045);
}
}
:deep(.message-icon),
:deep(.lang-icon) {
display: block;
width: 15px;
height: 15px;
font-size: 15px;
line-height: 1;
}
/* 未读数样式由 RightTopMessage 红底胶囊负责,勿在此盖 opacity/字色 */
/* 用户头像:右侧锚点,轻描边即可,不做坞 */
:deep(.user-dropdown-trigger.is-compact) {
width: 30px;
@ -1767,7 +1802,7 @@ onUnmounted(() => {
.top-nav-tabs {
height: @headerTabNavHeight;
background: transparent;
border-bottom: 1px dashed rgba(26, 46, 56, 0.14);
border-bottom: none;
box-sizing: border-box;
}
}

View File

@ -168,7 +168,7 @@
align-items: center;
gap: 12px;
background: transparent;
border-bottom: 1px dashed rgba(26, 46, 56, 0.14);
border-bottom: none;
box-sizing: border-box;
padding-right: 12px;
/* 虚线分割与下方页面内容留白(原先贴死到工作台卡片) */

View File

@ -222,12 +222,16 @@ export default {
'warehouse.storageRent.price.volume': 'Volume band (CBM)',
'warehouse.storageRent.price.customer': 'Customer group',
'warehouse.storageRent.price.matrixHint': '{rows} rows × {cols} customer columns; unit: CNY/CBM/day',
'warehouse.storageRent.price.editHint': 'Existing combos keep prices; select rows to batch-fill',
'warehouse.storageRent.price.selected': '{count} selected',
'warehouse.storageRent.price.formula': 'Formula',
'warehouse.storageRent.placeholder.rateName': 'e.g. SZ warehouse standard rent',
'warehouse.storageRent.placeholder.remark': 'Optional',
'warehouse.storageRent.placeholder.warehouses': 'Select warehouses',
'warehouse.storageRent.placeholder.customers': 'Select customer groups',
'warehouse.storageRent.placeholder.days': 'e.g. 0-7 or (0-7], integer days inclusive',
'warehouse.storageRent.placeholder.volume': 'e.g. (0-1], custom allowed',
'warehouse.storageRent.placeholder.batchFill': 'Enter unit price',
'warehouse.storageRent.bill.billNo': 'Bill no.',
'warehouse.storageRent.bill.billDate': 'Bill date',
'warehouse.storageRent.bill.totalCbm': 'Total CBM',
@ -235,6 +239,10 @@ export default {
'warehouse.storageRent.bill.unitPrice': 'Unit price',
'warehouse.storageRent.bill.detailTitle': 'Storage rent bill',
'warehouse.storageRent.action.syncPrice': 'Sync price grid',
'warehouse.storageRent.action.mergeSame': 'Merge same values',
'warehouse.storageRent.action.selectAll': 'Select all',
'warehouse.storageRent.action.clearSelect': 'Clear selection',
'warehouse.storageRent.action.batchFill': 'Batch fill',
'warehouse.storageRent.action.addRate': 'Add rate',
'warehouse.storageRent.action.reset': 'Reset',
'warehouse.storageRent.action.disable': 'Disable',
@ -264,6 +272,18 @@ export default {
'warehouse.storageRent.message.backfillOk': 'Backfill done',
'warehouse.storageRent.message.backfillFail': 'Backfill failed',
'warehouse.storageRent.message.synced': 'Price grid synced',
'warehouse.storageRent.message.factorsDirty':
'Billing factors changed. Sync the price grid to refresh rows/columns (filled unit prices are kept when dimensions still match).',
'warehouse.storageRent.message.syncConfirmTitle': 'Sync price grid',
'warehouse.storageRent.message.syncConfirmContent':
'The grid already has unit prices. Sync will rebuild rows/columns from current factors (matching dimensions keep prices). Continue?',
'warehouse.storageRent.message.batchFillNeedSelect': 'Select rows to fill first',
'warehouse.storageRent.message.batchFillInvalid': 'Enter a valid unit price (≥0)',
'warehouse.storageRent.message.batchFillNoCustomer': 'No customer price columns',
'warehouse.storageRent.message.batchFillSelected': '{count} rows selected',
'warehouse.storageRent.message.batchFillValue': 'Unit price',
'warehouse.storageRent.message.batchFillOk': 'Filled {count} cells',
'warehouse.storageRent.message.batchFillNone': 'Nothing to fill',
'warehouse.common.search': 'Search',
'warehouse.common.add': 'Add',

View File

@ -397,12 +397,16 @@ export default {
'warehouse.storageRent.price.volume': '体积区间(CBM)',
'warehouse.storageRent.price.customer': '客户组',
'warehouse.storageRent.price.matrixHint': '共 {rows} 行 × {cols} 个客户组列,单价单位:元/CBM/天',
'warehouse.storageRent.price.editHint': '已有组合会保留单价;选中行可批量填价',
'warehouse.storageRent.price.selected': '已选 {count}',
'warehouse.storageRent.price.formula': '计算公式',
'warehouse.storageRent.placeholder.rateName': '例如:深圳仓标准仓租',
'warehouse.storageRent.placeholder.remark': '选填',
'warehouse.storageRent.placeholder.warehouses': '选择适用仓库',
'warehouse.storageRent.placeholder.customers': '选择客户组',
'warehouse.storageRent.placeholder.days': '如 0-7 或 (0-7],按整数天闭区间匹配',
'warehouse.storageRent.placeholder.volume': '如 (0-1],可自定义',
'warehouse.storageRent.placeholder.batchFill': '输入统一单价',
'warehouse.storageRent.bill.billNo': '账单号',
'warehouse.storageRent.bill.billDate': '计费日',
'warehouse.storageRent.bill.totalCbm': '总体积',
@ -410,6 +414,10 @@ export default {
'warehouse.storageRent.bill.unitPrice': '单价',
'warehouse.storageRent.bill.detailTitle': '仓租账单详情',
'warehouse.storageRent.action.syncPrice': '同步价格表',
'warehouse.storageRent.action.mergeSame': '合并相同值',
'warehouse.storageRent.action.selectAll': '全选',
'warehouse.storageRent.action.clearSelect': '取消全选',
'warehouse.storageRent.action.batchFill': '批量填价',
'warehouse.storageRent.action.addRate': '新增费率',
'warehouse.storageRent.action.reset': '重置',
'warehouse.storageRent.action.disable': '禁用',
@ -439,6 +447,18 @@ export default {
'warehouse.storageRent.message.backfillOk': '反灌完成',
'warehouse.storageRent.message.backfillFail': '反灌失败',
'warehouse.storageRent.message.synced': '价格表已同步',
'warehouse.storageRent.message.factorsDirty':
'计费因素已变更,请同步价格表以更新行列(已填单价会按维度尽量保留)',
'warehouse.storageRent.message.syncConfirmTitle': '同步价格表',
'warehouse.storageRent.message.syncConfirmContent':
'矩阵中已有单价,同步将按当前计费因素重建行列(同维度单价尽量保留)。是否继续?',
'warehouse.storageRent.message.batchFillNeedSelect': '请先勾选要填价的行',
'warehouse.storageRent.message.batchFillInvalid': '请输入有效单价(≥0)',
'warehouse.storageRent.message.batchFillNoCustomer': '当前没有客户组价格列',
'warehouse.storageRent.message.batchFillSelected': '已选 {count} 行',
'warehouse.storageRent.message.batchFillValue': '统一单价',
'warehouse.storageRent.message.batchFillOk': '已填充 {count} 个价格格',
'warehouse.storageRent.message.batchFillNone': '没有需要填充的格子',
'warehouse.parcel.status.all': '全部',
'warehouse.parcel.status.inTransit': '在途',
'warehouse.parcel.status.arrived': '已到仓',

View File

@ -10,10 +10,11 @@ export const CUSTOMER_TOP_NAV_PRIORITY_PATHS = [
'/order/myOrders',
] as const
export const CUSTOMER_SIDE_RAIL_COLLAPSED_WIDTH = 64
/** 收起宽与品牌椭圆 badge(72px)对齐 */
export const CUSTOMER_SIDE_RAIL_COLLAPSED_WIDTH = 72
/** 默认展开宽;可拖拽,落在 MIN~MAX */
export const CUSTOMER_SIDE_RAIL_EXPANDED_WIDTH = 180
export const CUSTOMER_SIDE_RAIL_MIN_WIDTH = 160
export const CUSTOMER_SIDE_RAIL_EXPANDED_WIDTH = 156
export const CUSTOMER_SIDE_RAIL_MIN_WIDTH = 140
export const CUSTOMER_SIDE_RAIL_MAX_WIDTH = 280
export const CUSTOMER_SIDE_RAIL_STORAGE_KEY = 'oms.customerSideRail.collapsed'
export const CUSTOMER_SIDE_RAIL_WIDTH_STORAGE_KEY = 'oms.customerSideRail.expandedWidth'
@ -235,6 +236,8 @@ export function readCustomerSideRailExpandedWidth(
if (raw == null || raw === '') return clampCustomerSideRailWidth(fallback)
const n = Number(raw)
if (!Number.isFinite(n)) return clampCustomerSideRailWidth(fallback)
// 旧默认 180 → 新默认,避免本地缓存挡住缩窄
if (n === 180) return clampCustomerSideRailWidth(fallback)
return clampCustomerSideRailWidth(n)
} catch {
return clampCustomerSideRailWidth(fallback)

View File

@ -2006,16 +2006,17 @@
}
}
/* 与上游 interface-layout 对齐:吃满 page-layout,自管 16 内边距(覆盖全局 padding-top 8) */
.service-provider-layout {
display: flex;
height: calc(100vh - 86px);
max-height: calc(100vh - 86px);
padding: 16px;
height: 100%;
min-height: 0;
width: 100%;
padding: 16px !important;
gap: 16px;
background-color: var(--app-page-bg);
overflow: hidden;
box-sizing: border-box;
width: 100%;
}
/* 左侧使用自定义左菜单组件,仅保留布局 */

View File

@ -1526,7 +1526,6 @@
</script>
<template>
<div class="upstream-interface-page">
<div class="interface-layout">
<!-- 左侧上游接口列表:自定义左菜单 -->
<CustomLeftMenu
@ -1662,7 +1661,7 @@
</div>
</div>
</div>
</div>
<ModalPro
v-model:visible="editVisible"
:width="1500"
@ -1775,25 +1774,17 @@
</template>
<style scoped lang="less">
.upstream-interface-page {
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
}
/* 与下游 service-provider-layout 同构:单层根节点,吃满 page-layout */
.interface-layout {
display: flex;
flex: 1;
height: 100%;
min-height: 0;
height: calc(100vh - 86px);
max-height: calc(100vh - 86px);
padding: 16px;
width: 100%;
padding: 16px !important;
gap: 16px;
background-color: var(--app-page-bg);
overflow: hidden;
box-sizing: border-box;
width: 100%;
}
/* 左侧使用自定义左菜单组件,仅保留布局 */

View File

@ -153,8 +153,10 @@
});
const productList = ref<any[]>([]);
const productListLoading = ref(false);
async function loadProductList() {
productListLoading.value = true;
try {
const { items } = await getSalesProductList({
page: 1,
@ -182,6 +184,8 @@
} catch (e: any) {
Message.error(e?.message || '加载销售产品失败');
productList.value = [];
} finally {
productListLoading.value = false;
}
}
@ -1202,6 +1206,7 @@
id: p.id,
name: p.name,
...p,
code: `修改: ${p.updateTime || '--'}`,
})),
},
];
@ -4813,13 +4818,15 @@
:selected-keys="productSelectedKeys"
v-model:expanded-keys="productExpandedKeys"
v-model:search-keyword="searchKeyword"
:loading="productListLoading"
loading-text="正在加载产品列表..."
:search-placeholder="t('channel.salesProducts.search.placeholder')"
:refresh-title="t('channel.salesProducts.search.refresh')"
:add-title="t('channel.salesProducts.search.addProduct')"
:show-node-index="true"
:show-method="false"
:show-map-count="false"
:show-node-code="false"
:show-node-code="true"
:show-node-actions="true"
:delete-label="t('channel.salesProducts.actions.delete')"
@search="handleSearch"
@ -4832,27 +4839,24 @@
}"
>
<template #node-second-row-extra="{ nodeData }">
<div class="product-second-row">
<span class="modify-time">修改: {{ nodeData?.updateTime || '--' }}</span>
<span
class="switch-swipe-wrapper"
@click.capture.stop="() => {
const product = productList.find((p: any) => p.id === nodeData?.id);
if (product) { product.isActive = !product.isActive; handleToggleProduct(product); }
}"
@touchstart.passive="onStatusSwipeStart"
@touchend="(e) => onProductSwitchSwipeEnd(nodeData, e)"
>
<a-switch
:model-value="nodeData?.isActive"
size="small"
type="circle"
class="product-active-switch"
checked-color="#00b42a"
unchecked-color="#f53f3f"
/>
</span>
</div>
<span
class="switch-swipe-wrapper"
@click.capture.stop="() => {
const product = productList.find((p: any) => p.id === nodeData?.id);
if (product) { product.isActive = !product.isActive; handleToggleProduct(product); }
}"
@touchstart.passive="onStatusSwipeStart"
@touchend="(e) => onProductSwitchSwipeEnd(nodeData, e)"
>
<a-switch
:model-value="nodeData?.isActive"
size="small"
type="circle"
class="product-active-switch"
checked-color="#00b42a"
unchecked-color="#f53f3f"
/>
</span>
</template>
</CustomLeftMenu>
</div>
@ -7350,22 +7354,30 @@
.price-approval-banner {
flex-shrink: 0;
display: flex;
align-items: flex-start;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 12px;
padding: 12px 14px;
border-radius: 6px;
border-radius: 8px;
border: 1px solid var(--color-border-2);
&.is-waiting {
background: #e8f7f7;
border-color: color-mix(in srgb, var(--app-primary-color, #1d7281) 35%, #fff);
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 10%, #fff);
border-color: color-mix(in srgb, var(--app-primary-color, #1d7281) 28%, #fff);
.price-approval-banner-title {
color: var(--app-primary-color, #1d7281);
}
}
&.is-failed {
background: #fff7f0;
border-color: #ffd0a8;
background: color-mix(in srgb, #f53f3f 8%, #fff);
border-color: color-mix(in srgb, #f53f3f 28%, #fff);
.price-approval-banner-title {
color: #c93c37;
}
}
}

View File

@ -13,7 +13,7 @@
:show-node-index="true"
:show-method="false"
:show-map-count="false"
:show-node-code="false"
:show-node-code="true"
:show-node-actions="true"
:show-branch-node-actions="true"
:delete-label="t('channel.serviceChannels.actions.delete')"
@ -43,31 +43,24 @@
</a-doption>
</template>
<template #node-second-row-extra="{ nodeData }">
<div class="channel-second-row">
<span class="modify-time">{{
t('channel.serviceChannels.updateTime', {
time: nodeData?.updateTime || '--',
})
}}</span>
<span
class="switch-swipe-wrapper"
@click.capture.stop="() => {
const channel = findChannelById(nodeData?.id)
if (channel) { channel.isActive = !channel.isActive; handleToggleChannel(channel); }
}"
@touchstart.passive="onStatusSwipeStart"
@touchend="(e) => onChannelSwitchSwipeEnd(nodeData, e)"
>
<a-switch
:model-value="nodeData?.isActive"
size="small"
type="circle"
class="channel-active-switch"
checked-color="#00b42a"
unchecked-color="#f53f3f"
/>
</span>
</div>
<span
class="switch-swipe-wrapper"
@click.capture.stop="() => {
const channel = findChannelById(nodeData?.id)
if (channel) { channel.isActive = !channel.isActive; handleToggleChannel(channel); }
}"
@touchstart.passive="onStatusSwipeStart"
@touchend="(e) => onChannelSwitchSwipeEnd(nodeData, e)"
>
<a-switch
:model-value="nodeData?.isActive"
size="small"
type="circle"
class="channel-active-switch"
checked-color="#00b42a"
unchecked-color="#f53f3f"
/>
</span>
</template>
</CustomLeftMenu>
</div>
@ -2162,7 +2155,10 @@ const channelTreeData = computed<CustomLeftMenuTreeNode[]>(() => {
isLeaf: true,
id: ch.id,
name: ch.name,
...ch
...ch,
code: t('channel.serviceChannels.updateTime', {
time: ch.updateTime || '--',
}),
}))
}))
})

View File

@ -361,9 +361,17 @@
}
.banner-hello__copy {
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
gap: 4px;
}
.banner-hello__meta {
margin-left: 0;
justify-content: flex-start;
}
.banner-hello__avatar {
border: none;
background: transparent;
@ -434,8 +442,11 @@
.banner-hello__copy {
display: flex;
flex-direction: column;
gap: 4px;
flex-direction: row;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
gap: 8px 12px;
min-width: 0;
flex: 1;
}

View File

@ -152,8 +152,8 @@
</div>
</div>
</div>
<!-- 贴视口底:不进 flex 内容流,避免随 VV/矮屏一起被挤缩 -->
<div class="ai-trust-bar">
<!-- 欢迎态文档流页脚:矮屏滚到底可见;对话态不占视口 -->
<div v-if="!chatting" class="ai-trust-bar">
<div class="ai-trust-bar__inner">
<SitePartnerMarquee
:is-zh="isZh"

View File

@ -225,8 +225,8 @@ body.command-home .site-nav-wordmark__copy {
}
body.command-home .site-nav-wordmark__text {
color: var(--ai-brand);
font-weight: 400;
color: var(--ai-text-3, #6a7380);
font-weight: 650;
font-size: 1.05rem;
letter-spacing: 0.02em;
line-height: 1;
@ -609,63 +609,60 @@ body.command-home .site-nav-wordmark__logo img {
background: rgba(15, 23, 42, 0.04);
box-shadow: none;
}
body.command-home #navbar .site-nav-tools .site-nav-avatar,
body.command-home #navbar .site-nav-tools .site-nav-avatar:visited,
body.command-home #navbar .site-nav-tools .site-nav-avatar:hover,
body.command-home #navbar .site-nav-tools .language-toggle-link,
body.command-home #navbar .site-nav-tools .language-toggle-link:focus,
body.command-home #navbar .site-nav-tools .language-toggle-link:hover,
body.command-home #navbar .site-nav-tools .language-toggle-link.active,
body.command-home #navbar .site-nav-tools .language-toggle-link.active:focus {
position: relative;
z-index: 1;
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: 32px;
min-width: 32px;
height: 32px;
min-height: 32px;
padding: 0 8px;
margin: 0;
padding: 0;
gap: 0;
border: none;
border-radius: 999px;
background: transparent;
border-radius: 50%;
background: rgba(26, 46, 56, 0.05);
backdrop-filter: none;
-webkit-backdrop-filter: none;
box-shadow: none;
color: rgba(26, 46, 56, 0.55);
font-size: 12px;
font-weight: 500;
font-weight: 600;
letter-spacing: 0.02em;
line-height: 1;
transition: color 0.15s ease, background 0.15s ease;
}
body.command-home #navbar .site-nav-tools .site-nav-avatar:hover,
body.command-home #navbar .site-nav-tools .language-toggle-link:hover,
body.command-home #navbar .site-nav-tools .language-toggle-link.active,
body.command-home #navbar .site-nav-tools .language-toggle-link.active:focus {
color: var(--ai-text);
border: none;
background: rgba(15, 23, 42, 0.04);
background: rgba(26, 46, 56, 0.09);
box-shadow: none;
}
body.command-home #navbar .site-nav-tools .site-nav-avatar,
body.command-home #navbar .site-nav-tools .site-nav-avatar:visited,
body.command-home #navbar .site-nav-tools .site-nav-avatar:hover {
position: relative;
z-index: 1;
width: 32px;
height: 32px;
border: none;
border-radius: 999px;
background: transparent;
box-shadow: none;
color: rgba(26, 46, 56, 0.55);
}
body.command-home #navbar .site-nav-tools .site-nav-avatar:hover {
color: var(--ai-text);
background: rgba(15, 23, 42, 0.04);
}
body.command-home #navbar .site-nav-tools .site-nav-avatar .site-nav-avatar__icon {
width: 16px;
height: 16px;
display: block;
}
body.command-home #navbar .site-nav-tools .language-toggle-icon {
font-size: 12px;
color: inherit;
display: none;
}
body.command-home #navbar .site-nav-tools .language-toggle__next {
min-width: 0;
font-size: 11.5px;
font-weight: 500;
font-weight: 600;
letter-spacing: 0.02em;
color: inherit;
}
@ -711,11 +708,6 @@ body.command-home #navbar .site-nav-dock a.is-active:focus {
color: var(--ai-brand, #023e8a);
}
body.command-home #navbar .language-toggle-link,
body.command-home #navbar .language-toggle-link:focus,
body.command-home #navbar .language-toggle-link:hover,
body.command-home #navbar .language-toggle-link.active,
body.command-home #navbar .language-toggle-link.active:focus,
body.command-home #navbar .site-nav-login,
body.command-home #navbar .site-nav-login:focus,
body.command-home #navbar .site-nav-login:hover,
@ -744,7 +736,26 @@ body.command-home #navbar .language-toggle-link:focus,
body.command-home #navbar .language-toggle-link:hover,
body.command-home #navbar .language-toggle-link.active,
body.command-home #navbar .language-toggle-link.active:focus {
padding: 0 8px;
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: 32px;
min-width: 32px;
height: 32px;
min-height: 32px;
margin: 0;
padding: 0;
gap: 0;
border: none;
border-radius: 50%;
background: rgba(26, 46, 56, 0.05);
backdrop-filter: none;
-webkit-backdrop-filter: none;
color: rgba(26, 46, 56, 0.55);
box-shadow: none;
cursor: pointer;
transition: background 0.15s ease, color 0.15s ease;
}
body.command-home #navbar .site-nav-login,
@ -762,18 +773,13 @@ body.command-home #navbar .site-nav-login:visited {
}
body.command-home .language-toggle-icon {
width: 1em;
height: 1em;
font-size: 12px;
line-height: 1;
color: inherit;
transition: color 0.15s ease;
display: none;
}
body.command-home .language-toggle__next {
min-width: 1.1em;
min-width: 0;
font-size: 11.5px;
font-weight: 500;
font-weight: 600;
letter-spacing: 0.02em;
line-height: 1;
color: inherit;
@ -783,7 +789,7 @@ body.command-home #navbar .language-toggle-link:hover,
body.command-home #navbar .language-toggle-link.active,
body.command-home #navbar .language-toggle-link.active:focus {
border: none;
background: rgba(15, 23, 42, 0.04);
background: rgba(26, 46, 56, 0.09);
box-shadow: none;
color: var(--ai-text);
}
@ -981,8 +987,6 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-advisor-layou
overflow: visible;
/* 抵消 EdiAssistant 同名类的卡片壳/内边距,首页铺满舞台不做浮卡 */
padding: 0;
/* 给固定信任条留位,内容不被挡住 */
padding-bottom: calc(var(--ai-trust-bar-h) + env(safe-area-inset-bottom, 0px));
border: none;
border-radius: 0;
background: transparent;
@ -1060,7 +1064,7 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-advisor-layou
position: fixed;
top: calc(var(--ai-header-h) + 10px);
left: 12px;
bottom: calc(var(--ai-trust-bar-h) + 10px);
bottom: calc(10px + env(safe-area-inset-bottom, 0px));
z-index: 20;
width: min(300px, calc(86vw - 24px));
display: flex;
@ -2444,26 +2448,29 @@ body.command-home #navbar .site-nav-avatar:visited {
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: 32px;
min-width: 32px;
height: 32px;
min-height: 32px;
padding: 0;
border: none;
border-radius: 50%;
border: 1px solid var(--ai-glass-border);
background: var(--ai-glass-fill);
box-shadow: var(--ai-glass-shadow);
color: inherit;
background: rgba(26, 46, 56, 0.05);
box-shadow: none;
color: rgba(26, 46, 56, 0.55);
text-decoration: none;
}
body.command-home #navbar .site-nav-avatar .site-nav-avatar__icon {
width: 18px;
height: 18px;
width: 16px;
height: 16px;
display: block;
}
body.command-home #navbar .site-nav-avatar:hover {
border-color: rgba(255, 255, 255, 0.94);
box-shadow: var(--ai-glass-shadow);
color: var(--ai-text);
background: rgba(26, 46, 56, 0.09);
}
.ai-welcome__stack {
@ -2802,7 +2809,7 @@ body.command-home #navbar .site-nav-avatar:hover {
cursor: not-allowed;
}
/* 首页:主区不吃满高度,精选紧跟输入台;信任条已 fixed 贴底 */
/* 首页:主区不吃满高度,精选紧跟输入台;信任条随文档流沉底 */
body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-app-main {
flex: 0 0 auto;
@ -4911,7 +4918,7 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
width: 100%;
max-width: min(720px, 100%);
margin-inline: auto;
padding: 10px 0 0;
padding: 10px 0 20px;
border-top: none;
background-image: none;
}
@ -4970,12 +4977,15 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
display: inline-flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
width: 36px;
height: 36px;
margin: 0;
padding: 0;
border: none;
border-radius: 14px;
background: var(--ai-brand, #023e8a);
border-radius: 999px;
background: var(--ai-accent, #f56668);
color: #fff;
line-height: 0;
box-shadow: none;
cursor: pointer;
transition: background 0.15s var(--ai-ease), filter 0.15s ease, transform 0.12s ease;
@ -4985,30 +4995,35 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
display: block;
width: 18px;
height: 18px;
flex-shrink: 0;
fill: none;
stroke: currentColor;
stroke-width: 2.25;
stroke-linecap: round;
stroke-linejoin: round;
/* 上箭头 path 视觉重心略偏上,微下移让几何居中 */
transform: translateY(0.5px);
}
.ai-composer-send.is-empty,
.ai-composer-send.is-empty:hover {
background: #ececec;
color: #9a9a9a;
background: #e8eaed;
color: #b0b5bd;
opacity: 1;
cursor: default;
transform: none;
filter: none;
}
.ai-composer-send:hover:not(:disabled):not(.is-empty) {
background: var(--ai-brand-hover, #012a74);
filter: brightness(1.02);
background: var(--ai-accent-hover, #e25557);
color: #fff;
filter: none;
transform: none;
}
.ai-composer-send:focus-visible {
outline: 2px solid var(--ai-brand, #023e8a);
outline: 2px solid var(--ai-accent, #f56668);
outline-offset: 2px;
}
@ -5028,34 +5043,30 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
}
.ai-trust-bar {
/* Pin to layout viewport bottom; ignore --ai-vv-height flex shrink */
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 30;
/* 文档流页脚:短页靠 flex 沉底,长页滚到底可见(非 position:fixed) */
position: relative;
z-index: 1;
display: flex;
flex-direction: row;
flex-shrink: 0;
align-items: center;
justify-content: center;
gap: 0;
width: 100%;
max-width: none;
height: calc(var(--ai-trust-bar-h) + env(safe-area-inset-bottom, 0px));
margin: 0;
padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px)
env(safe-area-inset-left, 0px);
margin: auto 0 0;
padding: 0;
box-sizing: border-box;
border: none;
border-top: 1px solid color-mix(in srgb, var(--ai-border) 22%, transparent);
background: color-mix(in srgb, var(--ai-bg, #f3f5f6) 88%, transparent);
background: transparent;
color: var(--ai-text-3);
font-size: 0.68rem;
backdrop-filter: none;
-webkit-backdrop-filter: none;
}
/* 与 .ai-advisor-layout 同列:合作伙伴靠左,ICP 靠右 */
/* 已在 .ai-advisor-layout 内:合作伙伴靠左,ICP 靠右(勿再套一层左右 padding) */
.ai-trust-bar__inner {
position: relative;
display: flex;
@ -5063,10 +5074,9 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
align-items: center;
gap: 16px;
width: 100%;
max-width: var(--ai-content-max, 1200px);
height: 100%;
margin: 0 auto;
padding: 0 20px;
margin: 0;
padding: 0;
box-sizing: border-box;
}
@ -5297,7 +5307,7 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
justify-content: flex-start;
gap: 0;
}
/* Narrow: keep single-row pinned bar; scroll partners horizontally if needed */
/* Narrow: single-row footer; scroll partners horizontally if needed */
.ai-trust-bar {
flex-wrap: nowrap;
}
@ -5314,8 +5324,6 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
font-size: 0.58rem;
}
.ai-trust-bar__inner {
padding-left: max(14px, env(safe-area-inset-left, 0px));
padding-right: max(14px, env(safe-area-inset-right, 0px));
gap: 10px;
}
.ai-trust-icp {

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed, onMounted, reactive, ref } from 'vue'
import { computed, onMounted, reactive, ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { Modal } from '@arco-design/web-vue'
import HandsontablePro from '@/components/HandsontablePro/index.vue'
@ -7,6 +7,9 @@ import PaginationPro from '@/components/PaginationPro/index.vue'
import ModalPro from '@/components/ModalPro/index.vue'
import useModal from '@/components/ModalPro/useModal'
import { useTableContainerHeight } from '@/composables/useTableContainerHeight'
import PriceListHotTable, {
type PriceListHotColumn,
} from '@/views/channel/salesProducts/components/PriceListHotTable.vue'
import { getWarehouseList } from '@/api/system/warehouse'
import { getDictListAll } from '@/api/system/dict'
import {
@ -60,11 +63,16 @@ const backfillLoading = ref(false)
const warehouseOptions = ref<Array<{ id: number; warehouseName: string }>>([])
const customerGroupOptions = ref<Array<{ code: string; name: string }>>([])
const calculationFormulaOptions = ref<Array<{ code: string; name: string }>>([])
const [registerFormModal, { openModal, closeModal }] = useModal() as any
const [registerBillModal, { openModal: openBillModal, closeModal: closeBillModal }] = useModal() as any
const saving = ref(false)
const modalTab = ref<'basic' | 'price'>('basic')
/** 计费因素变更且矩阵已有单价时提示同步 */
const factorsDirty = ref(false)
/** 打开/重置表单时抑制因素 watch */
const suppressFactorsWatch = ref(false)
const priceListMergeSame = ref(false)
const formModel = reactive({
id: 0,
@ -78,6 +86,12 @@ const formModel = reactive({
})
const priceRows = ref<any[]>([])
const priceHotRef = ref<any>(null)
const priceSelectedCount = ref(0)
const lastPriceSelectedIds = ref<Array<number | string>>([])
const batchFillModalVisible = ref(false)
const batchFillValue = ref<number | undefined>(undefined)
const batchFillTargetIds = ref<Array<number | string>>([])
const billDetail = ref<any | null>(null)
const billDetailLines = computed(() => {
const lines = billDetail.value?.lines || billDetail.value?.Lines || []
@ -147,11 +161,75 @@ const billHotColumns = computed(() => [
{ key: 'remark', label: t('warehouse.storageRent.table.remark'), width: 180 },
])
const priceHotColumns = computed(() => {
const cols: any[] = [
{ key: 'warehouse', label: t('warehouse.common.warehouse'), width: 130, readOnly: true },
{ key: 'days', label: t('warehouse.storageRent.price.days'), width: 110, readOnly: true },
{ key: 'volume', label: t('warehouse.storageRent.price.volume'), width: 120, readOnly: true },
function defaultCalculationFormulaCode() {
const rows = calculationFormulaOptions.value
const hit = rows.find((r) => r.name === '总价' || r.code === 'total')
return hit?.code || rows[0]?.code || 'total'
}
function formulaCodeToLabel(code: string) {
const c = String(code ?? '').trim()
if (!c) return ''
const hit = calculationFormulaOptions.value.find((r) => r.code === c || r.name === c)
return hit?.name || c
}
function formulaLabelToCode(labelOrCode: string) {
const s = String(labelOrCode ?? '').trim()
if (!s) return defaultCalculationFormulaCode()
const byName = calculationFormulaOptions.value.find((r) => r.name === s)
if (byName?.code) return byName.code
const byCode = calculationFormulaOptions.value.find((r) => r.code === s)
if (byCode?.code) return byCode.code
return s
}
function defaultCalculationFormulaDisplay() {
return formulaCodeToLabel(defaultCalculationFormulaCode()) || '总价'
}
const priceHotColumns = computed<PriceListHotColumn[]>(() => {
const formulaSource = Array.from(
new Set(
calculationFormulaOptions.value
.map((o) => String(o.name || o.code || '').trim())
.filter(Boolean),
),
)
if (!formulaSource.length) {
const fallback = defaultCalculationFormulaDisplay()
if (fallback) formulaSource.push(fallback)
}
const cols: PriceListHotColumn[] = [
{
key: 'factor_0',
label: t('warehouse.common.warehouse'),
width: 130,
readOnly: true,
type: 'text',
},
{
key: 'factor_1',
label: t('warehouse.storageRent.price.days'),
width: 110,
readOnly: true,
type: 'text',
},
{
key: 'factor_2',
label: t('warehouse.storageRent.price.volume'),
width: 120,
readOnly: true,
type: 'text',
},
{
key: 'calculationFormula',
label: t('warehouse.storageRent.price.formula'),
width: 140,
type: 'dropdown',
source: formulaSource,
},
]
const customers =
formModel.customers.length > 0
@ -168,6 +246,10 @@ const priceHotColumns = computed(() => {
return cols
})
const priceListHotTableKey = computed(
() => `rent-hot-${priceHotColumns.value.map((c) => c.key).join('|')}`,
)
const currentLoading = computed(() => (activeTab.value === 'rate' ? listLoading.value : billLoading.value))
const currentRows = computed(() => (activeTab.value === 'rate' ? tableRows.value : billRows.value))
const currentColumns = computed(() => (activeTab.value === 'rate' ? hotColumns.value : billHotColumns.value))
@ -198,6 +280,96 @@ const priceMatrixHint = computed(() =>
}),
)
const priceCustomerKeys = computed(() =>
(formModel.customers.length > 0
? formModel.customers
: customerGroupOptions.value.map((x) => x.name)
).map((name) => `customer_${name}`),
)
function onPriceSelectionChange(ids: Array<number | string>) {
const next = (ids || [])
.map((id) => id)
.filter((id) => id != null && id !== '')
priceSelectedCount.value = next.length
if (next.length) lastPriceSelectedIds.value = next
}
function selectAllPriceRows() {
try {
priceHotRef.value?.selectAll?.()
} catch {
/* ignore */
}
}
function clearAllPriceRowsSelection() {
try {
priceHotRef.value?.clearSelection?.()
} catch {
/* ignore */
}
priceSelectedCount.value = 0
}
function resolvePriceSelectedIds() {
if (priceSelectedCount.value && lastPriceSelectedIds.value.length) {
return [...lastPriceSelectedIds.value]
}
return [...lastPriceSelectedIds.value]
}
function touchPriceRows() {
priceRows.value = priceRows.value.map((row) => ({ ...row }))
}
function openBatchFillModal() {
const ids = resolvePriceSelectedIds()
if (!ids.length) {
$baseMessage(t('warehouse.storageRent.message.batchFillNeedSelect'), 'warning')
return
}
batchFillTargetIds.value = ids
batchFillValue.value = undefined
batchFillModalVisible.value = true
}
function handleConfirmBatchFill() {
const val = Number(batchFillValue.value)
if (!Number.isFinite(val) || val < 0) {
$baseMessage(t('warehouse.storageRent.message.batchFillInvalid'), 'warning')
return
}
const selected = new Set(
batchFillTargetIds.value.length ? batchFillTargetIds.value : resolvePriceSelectedIds(),
)
const keys = priceCustomerKeys.value
if (!keys.length) {
$baseMessage(t('warehouse.storageRent.message.batchFillNoCustomer'), 'warning')
return
}
let touched = 0
priceRows.value.forEach((row) => {
if (!selected.has(row.id)) return
keys.forEach((key) => {
row[key] = val
if (!row.customerPrices) row.customerPrices = {}
const name = key.replace(/^customer_/, '')
row.customerPrices[name] = val
touched += 1
})
})
batchFillModalVisible.value = false
batchFillTargetIds.value = []
touchPriceRows()
$baseMessage(
touched
? t('warehouse.storageRent.message.batchFillOk', { count: touched })
: t('warehouse.storageRent.message.batchFillNone'),
'success',
)
}
function mapRateRow(raw: Record<string, unknown>) {
const row = normalizeListRow(raw)
const status = Number(pickField(row, 'status', 'Status') ?? 0)
@ -258,6 +430,16 @@ async function loadCustomerGroups() {
.filter((x: any) => x.code && x.name)
}
async function loadCalculationFormulas() {
const rows = await getDictListAll({ dictType: 'calculation_formula' })
calculationFormulaOptions.value = (rows || [])
.map((x: any) => ({
code: String(x.dictCode ?? x.DictCode ?? ''),
name: String(x.dictName ?? x.DictName ?? ''),
}))
.filter((x: any) => x.code || x.name)
}
async function loadRates() {
listLoading.value = true
try {
@ -343,6 +525,7 @@ function handlePageSizeChange(size: number) {
}
function resetForm() {
suppressFactorsWatch.value = true
formModel.id = 0
formModel.rateName = ''
formModel.status = 2
@ -354,9 +537,60 @@ function resetForm() {
? [customerGroupOptions.value.find((x) => x.code === 'all')!.name]
: customerGroupOptions.value.map((x) => x.name)
priceRows.value = []
modalTab.value = 'basic'
factorsDirty.value = false
priceSelectedCount.value = 0
lastPriceSelectedIds.value = []
batchFillTargetIds.value = []
batchFillModalVisible.value = false
queueMicrotask(() => {
suppressFactorsWatch.value = false
})
}
function hasFilledUnitPrices() {
const customers =
formModel.customers.length > 0
? formModel.customers
: customerGroupOptions.value.map((x) => x.name)
return priceRows.value.some((row) =>
customers.some((name) => {
const raw = row[`customer_${name}`] ?? row?.customerPrices?.[name]
return raw !== '' && raw != null
}),
)
}
function requestSyncPriceTable() {
if (!hasFilledUnitPrices()) {
syncPriceTable(false)
factorsDirty.value = false
return
}
Modal.confirm({
title: t('warehouse.storageRent.message.syncConfirmTitle'),
content: t('warehouse.storageRent.message.syncConfirmContent'),
okText: t('warehouse.storageRent.action.syncPrice'),
cancelText: t('warehouse.common.cancel'),
onOk: () => {
syncPriceTable(false)
factorsDirty.value = false
},
})
}
watch(
() => [
[...formModel.warehouses],
[...formModel.customers],
[...formModel.dayIntervals],
[...formModel.volumeIntervals],
],
() => {
if (suppressFactorsWatch.value) return
if (hasFilledUnitPrices()) factorsDirty.value = true
},
)
function warehouseLabel(idOrName: string) {
const hit = warehouseOptions.value.find((w) => String(w.id) === String(idOrName))
return hit?.warehouseName || idOrName
@ -372,8 +606,13 @@ function syncPriceTable(silent = false) {
: customerGroupOptions.value.map((x) => x.name)
const oldMap = new Map(
priceRows.value.map((r) => [`${r.warehouseId}|${r.days}|${r.volume}`, r]),
priceRows.value.map((r) => {
const daysVal = String(r.factor_1 ?? r.days ?? '')
const volumeVal = String(r.factor_2 ?? r.volume ?? '')
return [`${r.warehouseId}|${daysVal}|${volumeVal}`, r]
}),
)
const defaultFormula = defaultCalculationFormulaDisplay()
const next: any[] = []
let seq = 1
for (const wh of warehouses) {
@ -384,9 +623,14 @@ function syncPriceTable(silent = false) {
const row: any = {
id: prev?.id ?? seq++,
warehouseId: wh,
warehouse: warehouseLabel(wh),
factor_0: warehouseLabel(wh),
factor_1: d,
factor_2: v,
days: d,
volume: v,
calculationFormula: formulaCodeToLabel(
String(prev?.calculationFormula ?? defaultFormula),
) || defaultFormula,
}
customers.forEach((name) => {
const k = `customer_${name}`
@ -397,6 +641,9 @@ function syncPriceTable(silent = false) {
}
}
priceRows.value = next
factorsDirty.value = false
priceSelectedCount.value = 0
lastPriceSelectedIds.value = []
if (!silent) {
$baseMessage(t('warehouse.storageRent.message.synced'), 'success')
}
@ -420,6 +667,7 @@ async function openCreate() {
async function openEdit(row: any) {
resetForm()
suppressFactorsWatch.value = true
try {
const detail = await getWarehouseRentRateDetail(row.id)
const d = normalizeListRow(detail as any)
@ -451,12 +699,16 @@ async function openEdit(row: any) {
const warehouseVal = String(fv['仓库'] ?? fv.warehouse ?? '')
const daysVal = String(fv['天数'] ?? fv.days ?? '')
const volumeVal = String(fv['体积'] ?? fv.volume ?? '')
const formulaRaw = item.calculationFormula ?? item.CalculationFormula ?? defaultCalculationFormulaCode()
const rowItem: any = {
id: item.id ?? item.Id ?? idx + 1,
warehouseId: warehouseVal,
warehouse: warehouseLabel(warehouseVal),
factor_0: warehouseLabel(warehouseVal),
factor_1: daysVal,
factor_2: volumeVal,
days: daysVal,
volume: volumeVal,
calculationFormula: formulaCodeToLabel(String(formulaRaw)) || defaultCalculationFormulaDisplay(),
customerPrices: cg,
}
Object.keys(cg || {}).forEach((name) => {
@ -466,10 +718,14 @@ async function openEdit(row: any) {
})
priceRows.value = rows
if (!rows.length) syncPriceTable(true)
modalTab.value = 'price'
factorsDirty.value = false
openModal()
} catch (e: any) {
$baseMessage(e?.message || t('warehouse.storageRent.message.loadError'), 'error')
} finally {
queueMicrotask(() => {
suppressFactorsWatch.value = false
})
}
}
@ -485,7 +741,6 @@ function normalizeIntervalList(list: string[]) {
async function handleSave() {
if (!formModel.rateName.trim()) {
$baseMessage(t('warehouse.storageRent.message.nameRequired'), 'warning')
modalTab.value = 'basic'
return
}
if (!priceRows.value.length) {
@ -519,10 +774,10 @@ async function handleSave() {
return {
factorValuesJson: {
[factorLabel('warehouse')]: String(row.warehouseId ?? ''),
[factorLabel('days')]: String(row.days ?? ''),
[factorLabel('volume')]: String(row.volume ?? ''),
[factorLabel('days')]: String(row.factor_1 ?? row.days ?? ''),
[factorLabel('volume')]: String(row.factor_2 ?? row.volume ?? ''),
},
calculationFormula: 'total',
calculationFormula: formulaLabelToCode(String(row.calculationFormula ?? '')),
calculatedValue: firstPrice ?? 0,
customerGroupValues,
}
@ -690,13 +945,8 @@ function actionRenderer(row: any) {
return activeTab.value === 'rate' ? rateActionHtml(row) : billActionHtml(row)
}
function goFillPrice() {
syncPriceTable(true)
modalTab.value = 'price'
}
onMounted(async () => {
await Promise.all([loadWarehouses(), loadCustomerGroups()])
await Promise.all([loadWarehouses(), loadCustomerGroups(), loadCalculationFormulas()])
await loadRates()
})
</script>
@ -851,35 +1101,17 @@ onMounted(async () => {
<ModalPro
:title="modalTitle"
width="1180px"
modal-class="sales-price-config-modal"
:mask-closable="false"
:confirm-loading="saving"
:body-style="{ overflow: 'hidden', paddingTop: '16px', paddingBottom: '12px' }"
:body-style="{ paddingTop: '16px', paddingBottom: '12px' }"
@register="registerFormModal"
@ok="handleSave"
@cancel="closeModal"
>
<div class="rent-modal">
<div class="modal-switch">
<button
type="button"
class="modal-switch-item"
:class="{ active: modalTab === 'basic' }"
@click="modalTab = 'basic'"
>
{{ t('warehouse.storageRent.modal.tabBasic') }}
</button>
<button
type="button"
class="modal-switch-item"
:class="{ active: modalTab === 'price' }"
@click="goFillPrice"
>
{{ t('warehouse.storageRent.modal.tabPrice') }}
</button>
</div>
<div class="modal-body-fixed">
<div v-show="modalTab === 'basic'" class="modal-pane modal-pane--basic">
<section class="rent-section rent-section-basic">
<div class="section-title">{{ t('warehouse.storageRent.modal.tabBasic') }}</div>
<a-form
:model="formModel"
layout="horizontal"
@ -898,10 +1130,24 @@ onMounted(async () => {
</a-col>
<a-col :span="12">
<a-form-item :label="t('warehouse.storageRent.table.status')">
<a-radio-group v-model="formModel.status" type="button">
<a-radio :value="2">{{ t('warehouse.storageRent.status.enabled') }}</a-radio>
<a-radio :value="1">{{ t('warehouse.storageRent.status.disabled') }}</a-radio>
</a-radio-group>
<div class="status-capsule" role="group">
<button
type="button"
class="status-capsule-item"
:class="{ active: formModel.status === 2 }"
@click="formModel.status = 2"
>
{{ t('warehouse.storageRent.status.enabled') }}
</button>
<button
type="button"
class="status-capsule-item"
:class="{ active: formModel.status === 1 }"
@click="formModel.status = 1"
>
{{ t('warehouse.storageRent.status.disabled') }}
</button>
</div>
</a-form-item>
</a-col>
<a-col :span="12">
@ -929,100 +1175,172 @@ onMounted(async () => {
</a-col>
</a-row>
</a-form>
</section>
<div class="billing-factors-section">
<div class="section-head">
<div>
<div class="section-title">{{ t('warehouse.storageRent.factors.title') }}</div>
<div class="section-sub">{{ t('warehouse.storageRent.factors.hint') }}</div>
</div>
<a-button type="primary" class="app-btn-primary-soft" @click="goFillPrice">
<section class="rent-section rent-section-factors">
<div class="section-head">
<div>
<div class="section-title">{{ t('warehouse.storageRent.factors.title') }}</div>
<div class="section-sub">{{ t('warehouse.storageRent.factors.hint') }}</div>
</div>
</div>
<a-row :gutter="[16, 12]">
<a-col :span="12">
<div class="factor-label">{{ t('warehouse.common.warehouse') }}</div>
<a-select
v-model="formModel.warehouses"
multiple
allow-clear
:max-tag-count="3"
:placeholder="t('warehouse.storageRent.placeholder.warehouses')"
>
<a-option v-for="w in warehouseOptions" :key="w.id" :value="String(w.id)">
{{ w.warehouseName }}
</a-option>
</a-select>
</a-col>
<a-col :span="12">
<div class="factor-label">{{ t('warehouse.storageRent.price.customer') }}</div>
<a-select
v-model="formModel.customers"
multiple
allow-clear
:max-tag-count="3"
:placeholder="t('warehouse.storageRent.placeholder.customers')"
>
<a-option v-for="c in customerGroupOptions" :key="c.code" :value="c.name">
{{ c.name }}
</a-option>
</a-select>
</a-col>
<a-col :span="12">
<div class="factor-label">{{ t('warehouse.storageRent.price.days') }}</div>
<a-select
v-model="formModel.dayIntervals"
multiple
allow-create
allow-clear
:max-tag-count="4"
:placeholder="t('warehouse.storageRent.placeholder.days')"
>
<a-option v-for="d in dayPresets" :key="d" :value="d">{{ d }}</a-option>
</a-select>
</a-col>
<a-col :span="12">
<div class="factor-label">{{ t('warehouse.storageRent.price.volume') }}</div>
<a-select
v-model="formModel.volumeIntervals"
multiple
allow-create
allow-clear
:max-tag-count="4"
:placeholder="t('warehouse.storageRent.placeholder.volume')"
>
<a-option v-for="v in volumePresets" :key="v" :value="v">{{ v }}</a-option>
</a-select>
</a-col>
</a-row>
</section>
<section class="rent-section rent-section-price">
<div class="price-list-header">
<div class="price-list-header__meta">
<span class="price-list-badge">{{ t('warehouse.storageRent.price.title') }}</span>
<span class="price-list-hint">{{ t('warehouse.storageRent.price.editHint') }}</span>
<span v-if="priceRows.length" class="price-list-count">
{{ priceMatrixHint }}
<template v-if="priceSelectedCount"> · {{ t('warehouse.storageRent.price.selected', { count: priceSelectedCount }) }}</template>
</span>
</div>
<div class="price-list-actions">
<label class="price-list-merge">
<span>{{ t('warehouse.storageRent.action.mergeSame') }}</span>
<a-switch v-model="priceListMergeSame" size="small" />
</label>
<span class="price-list-actions__sep" aria-hidden="true"></span>
<a-button size="small" :disabled="!priceRows.length" @click="selectAllPriceRows">
{{ t('warehouse.storageRent.action.selectAll') }}
</a-button>
<a-button
size="small"
:disabled="!priceSelectedCount && !lastPriceSelectedIds.length"
@click="clearAllPriceRowsSelection"
>
{{ t('warehouse.storageRent.action.clearSelect') }}
</a-button>
<span class="price-list-actions__sep" aria-hidden="true"></span>
<a-button
size="small"
:disabled="!priceSelectedCount && !lastPriceSelectedIds.length"
@mousedown.prevent="openBatchFillModal"
>
{{ t('warehouse.storageRent.action.batchFill') }}
</a-button>
<span class="price-list-actions__sep" aria-hidden="true"></span>
<a-button
type="primary"
size="small"
class="app-btn-primary-soft"
@click="requestSyncPriceTable"
>
{{ t('warehouse.storageRent.action.syncPrice') }}
</a-button>
</div>
<a-row :gutter="[16, 12]">
<a-col :span="12">
<div class="factor-label">{{ t('warehouse.common.warehouse') }}</div>
<a-select
v-model="formModel.warehouses"
multiple
allow-clear
:max-tag-count="3"
:placeholder="t('warehouse.storageRent.placeholder.warehouses')"
>
<a-option v-for="w in warehouseOptions" :key="w.id" :value="String(w.id)">
{{ w.warehouseName }}
</a-option>
</a-select>
</a-col>
<a-col :span="12">
<div class="factor-label">{{ t('warehouse.storageRent.price.customer') }}</div>
<a-select
v-model="formModel.customers"
multiple
allow-clear
:max-tag-count="3"
:placeholder="t('warehouse.storageRent.placeholder.customers')"
>
<a-option v-for="c in customerGroupOptions" :key="c.code" :value="c.name">
{{ c.name }}
</a-option>
</a-select>
</a-col>
<a-col :span="12">
<div class="factor-label">{{ t('warehouse.storageRent.price.days') }}</div>
<a-select
v-model="formModel.dayIntervals"
multiple
allow-create
allow-clear
:max-tag-count="4"
:placeholder="t('warehouse.storageRent.placeholder.days')"
>
<a-option v-for="d in dayPresets" :key="d" :value="d">{{ d }}</a-option>
</a-select>
</a-col>
<a-col :span="12">
<div class="factor-label">{{ t('warehouse.storageRent.price.volume') }}</div>
<a-select
v-model="formModel.volumeIntervals"
multiple
allow-create
allow-clear
:max-tag-count="4"
:placeholder="t('warehouse.storageRent.placeholder.volume')"
>
<a-option v-for="v in volumePresets" :key="v" :value="v">{{ v }}</a-option>
</a-select>
</a-col>
</a-row>
</div>
</div>
<div v-show="modalTab === 'price'" class="modal-pane modal-pane--price">
<div class="price-toolbar">
<div>
<div class="section-title">{{ t('warehouse.storageRent.price.title') }}</div>
<div class="section-sub">{{ priceMatrixHint }}</div>
</div>
<a-button @click="syncPriceTable(false)">
{{ t('warehouse.storageRent.action.syncPrice') }}
</a-button>
</div>
<a-alert
v-if="factorsDirty"
type="warning"
class="factors-dirty-alert"
:show-icon="true"
:closable="false"
>
{{ t('warehouse.storageRent.message.factorsDirty') }}
</a-alert>
<div class="price-hot-wrap">
<HandsontablePro
<PriceListHotTable
ref="priceHotRef"
:key="priceListHotTableKey"
:data="priceRows"
:columns="priceHotColumns"
:height="464"
:stretch-columns="true"
:height="380"
:merge-same-values="priceListMergeSame"
@selection-change="onPriceSelectionChange"
/>
</div>
</div>
</div>
</section>
</div>
</ModalPro>
<a-modal
v-model:visible="batchFillModalVisible"
:title="t('warehouse.storageRent.action.batchFill')"
width="420px"
:z-index="3200"
unmount-on-close
@ok="handleConfirmBatchFill"
@cancel="batchFillModalVisible = false"
>
<div class="batch-fill-form">
<div class="batch-fill-meta">
{{
t('warehouse.storageRent.message.batchFillSelected', {
count: batchFillTargetIds.length || priceSelectedCount,
})
}}
</div>
<a-form-item :label="t('warehouse.storageRent.message.batchFillValue')" required>
<a-input-number
v-model="batchFillValue"
:min="0"
:precision="4"
style="width: 100%"
:placeholder="t('warehouse.storageRent.placeholder.batchFill')"
/>
</a-form-item>
</div>
</a-modal>
<ModalPro
:title="t('warehouse.storageRent.bill.detailTitle')"
width="920px"
@ -1125,8 +1443,7 @@ onMounted(async () => {
line-height: 20px;
}
.view-switch,
.modal-switch {
.view-switch {
display: inline-flex;
padding: 3px;
border-radius: 6px;
@ -1134,8 +1451,7 @@ onMounted(async () => {
gap: 2px;
}
.view-switch-item,
.modal-switch-item {
.view-switch-item {
border: 0;
background: transparent;
height: 28px;
@ -1155,6 +1471,37 @@ onMounted(async () => {
}
}
.status-capsule {
display: inline-flex;
align-items: center;
height: 32px;
padding: 3px;
border-radius: 999px;
background: #f2f3f5;
gap: 2px;
}
.status-capsule-item {
border: 0;
background: transparent;
height: 26px;
min-width: 64px;
padding: 0 16px;
border-radius: 999px;
color: var(--color-text-2);
cursor: pointer;
font-size: 13px;
line-height: 26px;
transition: all 0.15s ease;
&.active {
background: #fff;
color: var(--app-primary-color);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
font-weight: 600;
}
}
.table-toolbar {
display: flex;
justify-content: space-between;
@ -1190,39 +1537,30 @@ onMounted(async () => {
}
.rent-modal {
overflow: hidden;
display: flex;
flex-direction: column;
gap: 16px;
max-height: min(72vh, 720px);
overflow: auto;
padding-right: 4px;
.modal-switch {
.rent-section-basic .section-title {
margin-bottom: 12px;
flex-shrink: 0;
}
/* 固定内容区高度,切换页签不缩动;外层不滚动,仅列表内滚动 */
.modal-body-fixed {
position: relative;
height: 520px;
overflow: hidden;
}
.modal-pane {
height: 100%;
overflow: hidden;
}
.modal-pane--basic {
overflow-y: auto;
}
.modal-pane--price {
display: flex;
flex-direction: column;
min-height: 0;
.rent-section-factors {
padding: 14px 16px 16px;
border: 1px solid var(--color-border-2);
border-radius: 8px;
background: color-mix(in srgb, var(--app-primary-color) 4%, #fff);
}
.price-hot-wrap {
flex: 1;
min-height: 0;
height: 380px;
overflow: hidden;
border: 1px solid var(--color-border-2);
border-radius: 8px;
background: #fff;
}
.section-title {
@ -1239,21 +1577,98 @@ onMounted(async () => {
line-height: 20px;
}
.billing-factors-section {
margin-top: 4px;
padding: 14px 16px 16px;
background: #f7f8fa;
border-radius: 6px;
}
.section-head,
.price-toolbar {
.section-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.price-list-header {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.price-list-header__meta {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
flex: 1 1 auto;
overflow: hidden;
}
.price-list-badge {
flex-shrink: 0;
height: 24px;
padding: 0 10px;
border-radius: 4px;
background: color-mix(in srgb, var(--app-primary-color) 12%, #fff);
color: var(--app-primary-color);
font-size: 13px;
font-weight: 600;
line-height: 24px;
white-space: nowrap;
}
.price-list-hint {
min-width: 0;
color: var(--color-text-3);
font-size: 12px;
line-height: 1.2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.price-list-count {
flex-shrink: 0;
color: var(--color-text-3);
font-size: 12px;
white-space: nowrap;
}
.price-list-merge {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--color-text-2);
font-size: 12px;
white-space: nowrap;
cursor: pointer;
user-select: none;
}
.price-list-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 6px;
flex: 0 0 auto;
&__sep {
width: 1px;
height: 16px;
margin: 0 2px;
background: var(--color-border-2);
}
:deep(.arco-btn) {
height: 28px;
padding: 0 10px;
border-radius: 4px;
font-size: 12px;
}
}
.factors-dirty-alert {
margin-bottom: 12px;
}
.factor-label {
@ -1263,6 +1678,14 @@ onMounted(async () => {
}
}
.batch-fill-form {
.batch-fill-meta {
margin-bottom: 12px;
color: var(--color-text-3);
font-size: 13px;
}
}
.bill-summary {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
@ -1302,3 +1725,12 @@ onMounted(async () => {
}
}
</style>
<style lang="less">
/* 价格矩阵下拉层可溢出弹窗 */
.arco-modal.sales-price-config-modal {
.arco-modal-body {
overflow: visible !important;
}
}
</style>