feat: 仓租价格弹窗单页重构与门户顶栏圆形工具样式 #36
@ -1,6 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { IconDown, IconHome } from '@arco-design/web-vue/es/icon'
|
||||||
import { getWarehouseList } from '@/api/system/warehouse'
|
import { getWarehouseList } from '@/api/system/warehouse'
|
||||||
import { useCurrentWarehouseStore } from '@/store'
|
import { useCurrentWarehouseStore } from '@/store'
|
||||||
import WarehouseAddressPeekModal from '@/components/customer-side-rail/WarehouseAddressPeekModal.vue'
|
import WarehouseAddressPeekModal from '@/components/customer-side-rail/WarehouseAddressPeekModal.vue'
|
||||||
@ -98,11 +99,14 @@ onMounted(() => {
|
|||||||
:aria-label="`${t('nav.contactService.shipWarehouse')}: ${displayName}`"
|
:aria-label="`${t('nav.contactService.shipWarehouse')}: ${displayName}`"
|
||||||
@click="openPeek"
|
@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">
|
<span v-if="showSiderCaption" class="contact-service__caption">
|
||||||
{{ t('nav.contactService.shipWarehouse') }}
|
{{ t('nav.contactService.shipWarehouse') }}
|
||||||
</span>
|
</span>
|
||||||
<span class="contact-service__text">{{ labelText }}</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>
|
</button>
|
||||||
|
|
||||||
<a-select
|
<a-select
|
||||||
@ -152,44 +156,66 @@ onMounted(() => {
|
|||||||
.contact-service__label {
|
.contact-service__label {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 8px;
|
||||||
max-width: 160px;
|
max-width: 200px;
|
||||||
height: 28px;
|
height: 30px;
|
||||||
padding: 0 8px 0 10px;
|
padding: 0 8px 0 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
font-size: 12px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
letter-spacing: 0.02em;
|
letter-spacing: -0.01em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: var(--color-text-2, #4e5969);
|
color: #1a2e38;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
transition:
|
transition: background-color 0.14s ease;
|
||||||
color 0.16s ease,
|
|
||||||
background-color 0.16s ease;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--color-text-1, #1d2129);
|
background: rgba(26, 46, 56, 0.04);
|
||||||
background-color: rgba(15, 23, 42, 0.045);
|
|
||||||
|
.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 {
|
.contact-service__text {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact-service__caret {
|
.contact-service__caret-ico {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 0;
|
width: 11px;
|
||||||
height: 0;
|
height: 11px;
|
||||||
margin-left: 1px;
|
font-size: 11px;
|
||||||
border-left: 3.5px solid transparent;
|
color: rgba(26, 46, 56, 0.52);
|
||||||
border-right: 3.5px solid transparent;
|
|
||||||
border-top: 4px solid currentColor;
|
|
||||||
opacity: 0.45;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -275,10 +275,36 @@
|
|||||||
emit('search', searchKeywordModel.value);
|
emit('search', searchKeywordModel.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const refreshing = ref(false);
|
||||||
|
let refreshFeedbackTimer = 0;
|
||||||
|
|
||||||
function handleRefresh() {
|
function handleRefresh() {
|
||||||
|
if (refreshing.value || props.loading) return;
|
||||||
|
refreshing.value = true;
|
||||||
emit('refresh');
|
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() {
|
function handleAdd() {
|
||||||
emit('add');
|
emit('add');
|
||||||
}
|
}
|
||||||
@ -335,28 +361,30 @@
|
|||||||
<icon-search />
|
<icon-search />
|
||||||
</template>
|
</template>
|
||||||
</a-input>
|
</a-input>
|
||||||
<div class="search-actions">
|
<a-button
|
||||||
<a-button
|
v-if="showRefresh"
|
||||||
v-if="showRefresh"
|
type="text"
|
||||||
type="text"
|
size="small"
|
||||||
size="small"
|
shape="circle"
|
||||||
class="action-icon-btn refresh-btn"
|
class="action-icon-btn refresh-btn"
|
||||||
:title="refreshTitle"
|
:class="{ 'is-spinning': refreshing || loading }"
|
||||||
@click="handleRefresh"
|
:disabled="refreshing || loading"
|
||||||
>
|
:title="refreshTitle"
|
||||||
<icon-refresh :size="18" />
|
@click="handleRefresh"
|
||||||
</a-button>
|
>
|
||||||
<a-button
|
<icon-refresh :size="15" class="refresh-btn-ico" />
|
||||||
v-if="showAdd"
|
</a-button>
|
||||||
type="text"
|
<a-button
|
||||||
size="small"
|
v-if="showAdd"
|
||||||
class="action-icon-btn add-btn"
|
type="text"
|
||||||
:title="addTitle"
|
size="small"
|
||||||
@click="handleAdd"
|
shape="circle"
|
||||||
>
|
class="action-icon-btn add-btn"
|
||||||
<icon-plus :size="18" />
|
:title="addTitle"
|
||||||
</a-button>
|
@click="handleAdd"
|
||||||
</div>
|
>
|
||||||
|
<icon-plus :size="15" />
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="$slots['search-extra']" class="search-extra">
|
<div v-if="$slots['search-extra']" class="search-extra">
|
||||||
<slot name="search-extra" />
|
<slot name="search-extra" />
|
||||||
@ -367,7 +395,7 @@
|
|||||||
class="interface-tree"
|
class="interface-tree"
|
||||||
:class="{ 'interface-tree--hierarchical': hierarchical }"
|
:class="{ 'interface-tree--hierarchical': hierarchical }"
|
||||||
>
|
>
|
||||||
<div v-if="loading" class="loading-state">
|
<div v-if="loading || refreshing" class="loading-state">
|
||||||
<img
|
<img
|
||||||
v-if="appMascotUrl"
|
v-if="appMascotUrl"
|
||||||
class="state-mascot is-bounce"
|
class="state-mascot is-bounce"
|
||||||
@ -433,7 +461,16 @@
|
|||||||
v-if="getNodeData(key)?.isLeaf && showNodeActions"
|
v-if="getNodeData(key)?.isLeaf && showNodeActions"
|
||||||
class="node-actions-cell"
|
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
|
<a-dropdown
|
||||||
|
v-else
|
||||||
trigger="click"
|
trigger="click"
|
||||||
:popup-max-height="false"
|
:popup-max-height="false"
|
||||||
@select="handleActionSelect"
|
@select="handleActionSelect"
|
||||||
@ -441,6 +478,7 @@
|
|||||||
<a-button
|
<a-button
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
|
shape="circle"
|
||||||
class="action-btn vertical-dots"
|
class="action-btn vertical-dots"
|
||||||
:title="actionsTitle"
|
:title="actionsTitle"
|
||||||
@click.stop
|
@click.stop
|
||||||
@ -532,17 +570,70 @@
|
|||||||
((showNodeCode && getNodeData(key)?.code) || !!$slots['node-second-row-extra'])
|
((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>
|
<template v-if="showNodeActions && $slots['node-second-row-extra']">
|
||||||
</td>
|
<td class="node-code-cell">
|
||||||
<td
|
<span v-if="showNodeCode && getNodeData(key)?.code" class="interface-code">
|
||||||
:class="['node-actions-cell', 'node-second-row-extra-cell']"
|
{{ getNodeData(key)?.code }}
|
||||||
:colspan="(showNodeCode && getNodeData(key)?.code) ? 1 : 2"
|
</span>
|
||||||
>
|
</td>
|
||||||
<span class="node-second-row-extra-slot">
|
<td class="node-actions-cell node-second-row-extra-cell">
|
||||||
<slot name="node-second-row-extra" :node-data="getNodeData(key)" :node-key="key"></slot>
|
<a-dropdown
|
||||||
</span>
|
trigger="click"
|
||||||
</td>
|
: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>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<td colspan="2" class="node-second-row-spacer-cell" aria-hidden="true" />
|
<td colspan="2" class="node-second-row-spacer-cell" aria-hidden="true" />
|
||||||
@ -556,7 +647,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="showPagination && paginationMeta.showPagination && !loading"
|
v-if="showPagination && paginationMeta.showPagination && !loading && !refreshing"
|
||||||
class="menu-pagination"
|
class="menu-pagination"
|
||||||
>
|
>
|
||||||
<div class="menu-pagination-capsule">
|
<div class="menu-pagination-capsule">
|
||||||
@ -658,7 +749,7 @@
|
|||||||
.search-box {
|
.search-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 6px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -704,53 +795,77 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-actions {
|
|
||||||
display: flex;
|
|
||||||
gap: 2px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-icon-btn {
|
.action-icon-btn {
|
||||||
width: 28px;
|
flex-shrink: 0;
|
||||||
height: 28px;
|
width: 28px !important;
|
||||||
padding: 0;
|
height: 28px !important;
|
||||||
display: flex;
|
min-width: 28px !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
display: inline-flex !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: var(--clm-muted);
|
color: var(--clm-muted);
|
||||||
border: none;
|
border: none !important;
|
||||||
border-radius: 7px;
|
border-radius: 50% !important;
|
||||||
|
background: rgba(26, 46, 56, 0.05) !important;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 510;
|
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) {
|
:deep(.arco-icon),
|
||||||
font-size: 14px;
|
: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 {
|
&:hover {
|
||||||
color: var(--clm-text);
|
color: var(--clm-text);
|
||||||
background-color: var(--clm-hover);
|
background: rgba(26, 46, 56, 0.09) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.add-btn,
|
&.add-btn,
|
||||||
&.refresh-btn {
|
&.refresh-btn {
|
||||||
color: var(--clm-muted);
|
color: var(--clm-muted);
|
||||||
|
|
||||||
:deep(.arco-icon),
|
&:hover:not(:disabled) {
|
||||||
:deep(svg) {
|
|
||||||
font-size: 18px !important;
|
|
||||||
width: 18px !important;
|
|
||||||
height: 18px !important;
|
|
||||||
min-width: 18px !important;
|
|
||||||
min-height: 18px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: var(--clm-text);
|
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 {
|
.interface-tree {
|
||||||
@ -1328,7 +1443,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.node-second-row > td {
|
.node-second-row > td {
|
||||||
padding-top: 2px;
|
padding-top: 6px;
|
||||||
|
padding-bottom: 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.node-content-cell {
|
.node-content-cell {
|
||||||
@ -1351,11 +1469,9 @@
|
|||||||
|
|
||||||
.node-code-cell {
|
.node-code-cell {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 2px 0 0;
|
|
||||||
width: auto;
|
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
height: var(--clm-node-second-line-height);
|
padding-right: 0;
|
||||||
vertical-align: middle;
|
width: auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1411,11 +1527,8 @@
|
|||||||
|
|
||||||
.node-second-row-extra-cell {
|
.node-second-row-extra-cell {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding: 2px 0 0;
|
min-width: 28px;
|
||||||
min-width: 50px;
|
width: 28px;
|
||||||
width: auto;
|
|
||||||
height: var(--clm-node-second-line-height);
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.node-second-row-spacer-cell {
|
.node-second-row-spacer-cell {
|
||||||
@ -1517,8 +1630,10 @@
|
|||||||
color: var(--clm-muted);
|
color: var(--clm-muted);
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: 450;
|
font-weight: 450;
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
line-height: var(--clm-node-second-line-height);
|
align-items: center;
|
||||||
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
letter-spacing: -0.01em;
|
letter-spacing: -0.01em;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -1550,18 +1665,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
padding: 0;
|
padding: 0 !important;
|
||||||
min-width: 20px;
|
min-width: 24px !important;
|
||||||
height: 20px;
|
width: 24px !important;
|
||||||
display: flex;
|
height: 24px !important;
|
||||||
|
display: inline-flex !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.12s ease;
|
transition: opacity 0.12s ease, background-color 0.12s ease;
|
||||||
border-radius: 5px;
|
border-radius: 50% !important;
|
||||||
|
background: rgba(26, 46, 56, 0.05);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: rgba(15, 16, 17, 0.06);
|
background: rgba(26, 46, 56, 0.09) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.arco-icon) {
|
: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 {
|
.vertical-dots-icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -7,7 +7,9 @@
|
|||||||
:aria-label="warehouseTitle"
|
:aria-label="warehouseTitle"
|
||||||
@click="openWarehousePeek"
|
@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>
|
<span class="cpt-tools__wh-name">{{ warehouseName }}</span>
|
||||||
<icon-down class="cpt-tools__wh-caret" />
|
<icon-down class="cpt-tools__wh-caret" />
|
||||||
</button>
|
</button>
|
||||||
@ -28,10 +30,11 @@
|
|||||||
:aria-label="t('navbar.message')"
|
:aria-label="t('navbar.message')"
|
||||||
>
|
>
|
||||||
<icon-notification class="cpt-tools__chip-ico" />
|
<icon-notification class="cpt-tools__chip-ico" />
|
||||||
<span class="cpt-tools__chip-label">{{ t('navbar.message') }}</span>
|
<span
|
||||||
<span v-if="messageTotal > 0" class="cpt-tools__chip-count">
|
v-if="messageTotal > 0"
|
||||||
{{ messageBadge }}
|
class="cpt-tools__chip-ping"
|
||||||
</span>
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
</button>
|
</button>
|
||||||
<template #content>
|
<template #content>
|
||||||
<a-doption @click="goInbox('message')">
|
<a-doption @click="goInbox('message')">
|
||||||
@ -60,12 +63,12 @@
|
|||||||
:aria-label="t('nav.printControl.menu')"
|
:aria-label="t('nav.printControl.menu')"
|
||||||
>
|
>
|
||||||
<icon-printer class="cpt-tools__chip-ico" />
|
<icon-printer class="cpt-tools__chip-ico" />
|
||||||
<span class="cpt-tools__chip-label">打印</span>
|
|
||||||
<span
|
<span
|
||||||
class="cpt-tools__chip-dot"
|
class="cpt-tools__chip-ping"
|
||||||
:class="{
|
:class="{
|
||||||
'is-on': printConnectionState.enabled,
|
'is-on': printConnectionState.enabled,
|
||||||
'is-busy': printConnectionState.connecting,
|
'is-busy': printConnectionState.connecting,
|
||||||
|
'is-off': !printConnectionState.enabled && !printConnectionState.connecting,
|
||||||
}"
|
}"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
@ -116,8 +119,7 @@ const { t } = useI18n();
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const warehouseStore = useCurrentWarehouseStore();
|
const warehouseStore = useCurrentWarehouseStore();
|
||||||
const printConnectionState = useHiprintClientState();
|
const printConnectionState = useHiprintClientState();
|
||||||
const { notificationCount, noticeCount, totalCount, displayCount, refreshUnread } =
|
const { notificationCount, noticeCount, totalCount, refreshUnread } = useInboxUnread();
|
||||||
useInboxUnread();
|
|
||||||
|
|
||||||
const warehousePeekVisible = ref(false);
|
const warehousePeekVisible = ref(false);
|
||||||
|
|
||||||
@ -135,7 +137,6 @@ const printConnectionTitle = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const messageTotal = computed(() => totalCount.value);
|
const messageTotal = computed(() => totalCount.value);
|
||||||
const messageBadge = computed(() => displayCount.value);
|
|
||||||
|
|
||||||
function openWarehousePeek() {
|
function openWarehousePeek() {
|
||||||
warehousePeekVisible.value = true;
|
warehousePeekVisible.value = true;
|
||||||
@ -201,26 +202,49 @@ onMounted(() => {
|
|||||||
.cpt-tools__wh {
|
.cpt-tools__wh {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 8px;
|
||||||
max-width: 180px;
|
max-width: 200px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 10px 0 8px;
|
padding: 0 8px 0 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 8px;
|
border-radius: 999px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--cpt-ink);
|
color: var(--cpt-ink);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.14s ease;
|
transition: background-color 0.14s ease;
|
||||||
|
|
||||||
&:hover {
|
&: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;
|
flex-shrink: 0;
|
||||||
font-size: 15px;
|
border-radius: 999px;
|
||||||
|
background: rgba(26, 46, 56, 0.05);
|
||||||
color: var(--cpt-muted);
|
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 {
|
.cpt-tools__wh-name {
|
||||||
@ -243,35 +267,39 @@ onMounted(() => {
|
|||||||
.cpt-tools__actions {
|
.cpt-tools__actions {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2px;
|
gap: 6px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpt-tools__chip {
|
.cpt-tools__chip {
|
||||||
|
position: relative;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
justify-content: center;
|
||||||
height: 100%;
|
width: var(--cpt-h);
|
||||||
min-width: 0;
|
height: var(--cpt-h);
|
||||||
padding: 0 10px;
|
min-width: var(--cpt-h);
|
||||||
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 8px;
|
border-radius: 999px;
|
||||||
background: transparent;
|
background: rgba(26, 46, 56, 0.05);
|
||||||
color: var(--cpt-muted);
|
color: var(--cpt-muted);
|
||||||
|
line-height: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color 0.14s ease, background-color 0.14s ease;
|
transition: color 0.14s ease, background-color 0.14s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--cpt-ink);
|
color: var(--cpt-ink);
|
||||||
background: rgba(26, 46, 56, 0.05);
|
background: rgba(26, 46, 56, 0.09);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-hot {
|
&.is-hot {
|
||||||
color: var(--app-primary-color, #1d7281);
|
color: var(--cpt-ink);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-on {
|
&.is-on {
|
||||||
color: var(--app-primary-color, #1d7281);
|
color: var(--app-primary-color, #1d7281);
|
||||||
|
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-busy {
|
&.is-busy {
|
||||||
@ -281,46 +309,63 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cpt-tools__chip-ico {
|
.cpt-tools__chip-ico {
|
||||||
|
display: block;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
|
||||||
|
|
||||||
.cpt-tools__chip-label {
|
|
||||||
flex-shrink: 0;
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: inherit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpt-tools__chip-count {
|
/* 右上角状态点 + 扩散涟漪(消息红 / 打印绿橙灰) */
|
||||||
flex-shrink: 0;
|
.cpt-tools__chip-ping {
|
||||||
min-width: 16px;
|
--cpt-ping: #f53f3f;
|
||||||
height: 16px;
|
position: absolute;
|
||||||
padding: 0 4px;
|
top: 4px;
|
||||||
border-radius: 8px;
|
right: 4px;
|
||||||
background: #f53f3f;
|
width: 7px;
|
||||||
color: #fff;
|
height: 7px;
|
||||||
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;
|
|
||||||
border-radius: 50%;
|
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 {
|
&.is-on {
|
||||||
background: #00b42a;
|
--cpt-ping: #00b42a;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-busy {
|
&.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>
|
</style>
|
||||||
|
|||||||
@ -22,15 +22,17 @@
|
|||||||
:title="brandCopy.navFullName"
|
:title="brandCopy.navFullName"
|
||||||
@click.prevent="goOfficialSite"
|
@click.prevent="goOfficialSite"
|
||||||
>
|
>
|
||||||
<img
|
<span class="customer-side-rail__brand-badge">
|
||||||
v-if="navLogoSrc"
|
<img
|
||||||
:src="navLogoSrc"
|
v-if="navLogoSrc"
|
||||||
:alt="brandCopy.navName"
|
:src="navLogoSrc"
|
||||||
class="customer-side-rail__brand-logo"
|
: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 v-else class="customer-side-rail__brand-mark" aria-hidden="true">{{
|
||||||
}}</span>
|
BRAND_TEXT_LOGO
|
||||||
|
}}</span>
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="customer-side-rail__scroll">
|
<div class="customer-side-rail__scroll">
|
||||||
@ -68,7 +70,6 @@
|
|||||||
@pointerenter="prefetch(item)"
|
@pointerenter="prefetch(item)"
|
||||||
@click="onNavigate(item)"
|
@click="onNavigate(item)"
|
||||||
>
|
>
|
||||||
<span class="customer-side-rail__active-dot" aria-hidden="true" />
|
|
||||||
<span class="customer-side-rail__icon">
|
<span class="customer-side-rail__icon">
|
||||||
<component :is="getSubMenuIcon(item, undefined, MENU_NAME_TO_LOCALE_KEY)" />
|
<component :is="getSubMenuIcon(item, undefined, MENU_NAME_TO_LOCALE_KEY)" />
|
||||||
</span>
|
</span>
|
||||||
@ -77,14 +78,16 @@
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="!compactLayout"
|
v-if="!compactLayout && isActive(item)"
|
||||||
type="button"
|
type="button"
|
||||||
class="customer-side-rail__refresh"
|
class="customer-side-rail__refresh"
|
||||||
|
:class="{ 'is-spinning': refreshingPath === navKey(item) }"
|
||||||
|
:disabled="refreshingPath === navKey(item)"
|
||||||
:title="t('nav.sideRail.refresh')"
|
:title="t('nav.sideRail.refresh')"
|
||||||
:aria-label="t('nav.sideRail.refresh')"
|
:aria-label="t('nav.sideRail.refresh')"
|
||||||
@click.stop="onRefresh(item)"
|
@click.stop="onRefresh(item)"
|
||||||
>
|
>
|
||||||
<icon-refresh />
|
<icon-refresh class="customer-side-rail__refresh-ico" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
@ -112,8 +115,8 @@
|
|||||||
:title="collapsed ? t('nav.sideRail.expand') : t('nav.sideRail.collapse')"
|
:title="collapsed ? t('nav.sideRail.expand') : t('nav.sideRail.collapse')"
|
||||||
@click="toggleCollapsed"
|
@click="toggleCollapsed"
|
||||||
>
|
>
|
||||||
<icon-double-right v-if="collapsed" class="customer-side-rail__toggle-icon" />
|
<icon-right v-if="collapsed" class="customer-side-rail__toggle-icon" />
|
||||||
<icon-double-left v-else class="customer-side-rail__toggle-icon" />
|
<icon-left v-else class="customer-side-rail__toggle-icon" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -139,9 +142,9 @@ import { computed, nextTick, onUnmounted, ref, watch } from 'vue'
|
|||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import {
|
import {
|
||||||
IconDoubleLeft,
|
IconLeft,
|
||||||
IconDoubleRight,
|
|
||||||
IconRefresh,
|
IconRefresh,
|
||||||
|
IconRight,
|
||||||
} from '@arco-design/web-vue/es/icon'
|
} from '@arco-design/web-vue/es/icon'
|
||||||
import { useTabBarStore } from '@/store'
|
import { useTabBarStore } from '@/store'
|
||||||
import type { TagProps } from '@/store/modules/tab-bar/types'
|
import type { TagProps } from '@/store/modules/tab-bar/types'
|
||||||
@ -192,6 +195,8 @@ const compactLayout = ref(collapsed.value)
|
|||||||
const animating = ref(false)
|
const animating = ref(false)
|
||||||
const resizing = ref(false)
|
const resizing = ref(false)
|
||||||
const expandedWidth = ref(readCustomerSideRailExpandedWidth(CUSTOMER_SIDE_RAIL_EXPANDED_WIDTH))
|
const expandedWidth = ref(readCustomerSideRailExpandedWidth(CUSTOMER_SIDE_RAIL_EXPANDED_WIDTH))
|
||||||
|
/** 正在刷新的菜单 path,用于转圈与防连点 */
|
||||||
|
const refreshingPath = ref('')
|
||||||
let compactTimer = 0
|
let compactTimer = 0
|
||||||
let resizeStartX = 0
|
let resizeStartX = 0
|
||||||
let resizeStartW = 0
|
let resizeStartW = 0
|
||||||
@ -392,35 +397,43 @@ async function onRefresh(item: CustomerNavItem) {
|
|||||||
let targetPath = getCustomerNavPath(item)
|
let targetPath = getCustomerNavPath(item)
|
||||||
if (!targetPath || regexUrl.test(targetPath)) return
|
if (!targetPath || regexUrl.test(targetPath)) return
|
||||||
if (!targetPath.startsWith('/')) targetPath = `/${targetPath}`
|
if (!targetPath.startsWith('/')) targetPath = `/${targetPath}`
|
||||||
|
if (refreshingPath.value === targetPath) return
|
||||||
|
|
||||||
const portalPanel = resolvePortalDrawerPanel(targetPath)
|
refreshingPath.value = targetPath
|
||||||
if (portalPanel) {
|
try {
|
||||||
openPortalSideDrawer(portalPanel)
|
const portalPanel = resolvePortalDrawerPanel(targetPath)
|
||||||
return
|
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(
|
watch(
|
||||||
@ -447,13 +460,13 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.customer-side-rail {
|
.customer-side-rail {
|
||||||
--csr-pad-x: 14px;
|
--csr-pad-x: 8px;
|
||||||
--csr-item-h: 44px;
|
--csr-item-h: 44px;
|
||||||
/* 与工作台 banner / panel 卡片圆角一致 */
|
/* 菜单项圆角;外壳不再做白底卡片 */
|
||||||
--csr-radius: 16px;
|
--csr-radius: 10px;
|
||||||
--csr-panel-radius: 16px;
|
|
||||||
--csr-panel-inset: 16px;
|
--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-ease: cubic-bezier(0.32, 0.72, 0, 1);
|
||||||
--csr-dur: 0.3s;
|
--csr-dur: 0.3s;
|
||||||
|
|
||||||
@ -461,11 +474,12 @@ onUnmounted(() => {
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: calc(100% - var(--csr-panel-inset) * 2);
|
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;
|
min-height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--app-card-bg, #fff);
|
background: transparent;
|
||||||
border-radius: var(--csr-panel-radius);
|
border-radius: 0;
|
||||||
|
box-shadow: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
/* 外层只动画宽度;内容在 shell 内固定宽,不随变窄重排(Linear / Notion) */
|
/* 外层只动画宽度;内容在 shell 内固定宽,不随变窄重排(Linear / Notion) */
|
||||||
transition: width var(--csr-dur) var(--csr-ease);
|
transition: width var(--csr-dur) var(--csr-ease);
|
||||||
@ -547,28 +561,43 @@ onUnmounted(() => {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 0;
|
gap: 0;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
min-height: 40px;
|
box-sizing: border-box;
|
||||||
padding: 2px 16px;
|
height: 48px;
|
||||||
|
min-height: 48px;
|
||||||
|
padding: 0 8px;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
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 {
|
&__brand-logo {
|
||||||
display: block;
|
display: block;
|
||||||
width: 40px;
|
width: 36px;
|
||||||
height: 40px;
|
height: 36px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
/* 与登录页一致:contain 避免 cover 裁切发糊;圆角过大也会让小图发软 */
|
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
image-rendering: -webkit-optimize-contrast;
|
image-rendering: -webkit-optimize-contrast;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__brand-mark {
|
&__brand-mark {
|
||||||
font-size: 18px;
|
font-size: 14px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 0.12em;
|
letter-spacing: 0.08em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: var(--color-text-3, #86909c);
|
color: var(--color-text-3, #86909c);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
@ -599,7 +628,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__label {
|
&__label {
|
||||||
padding: 0 12px 4px;
|
padding: 0 8px 4px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
@ -622,7 +651,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
&__refresh {
|
&__refresh {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 6px;
|
right: 4px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
@ -633,33 +662,63 @@ onUnmounted(() => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 6px;
|
border-radius: 999px;
|
||||||
background: transparent;
|
background: rgba(26, 46, 56, 0.05);
|
||||||
color: var(--color-text-3);
|
color: var(--color-text-3);
|
||||||
font-size: 14px;
|
line-height: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%) scale(0.92);
|
||||||
transition:
|
transition:
|
||||||
opacity 0.14s ease,
|
opacity 0.16s ease,
|
||||||
color 0.14s ease,
|
color 0.14s ease,
|
||||||
background-color 0.14s ease;
|
background-color 0.14s ease,
|
||||||
|
transform 0.16s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover:not(:disabled) {
|
||||||
color: var(--app-primary-color, rgb(var(--primary-6)));
|
color: var(--color-text-1);
|
||||||
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 10%, #fff);
|
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 {
|
&__refresh-ico {
|
||||||
opacity: 1;
|
display: block;
|
||||||
pointer-events: auto;
|
width: 14px;
|
||||||
background: color-mix(in srgb, #fff 92%, transparent);
|
height: 14px;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item-wrap:hover &__refresh:hover {
|
&__refresh.is-spinning &__refresh-ico {
|
||||||
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 10%, #fff);
|
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 {
|
&__item {
|
||||||
@ -669,7 +728,7 @@ onUnmounted(() => {
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: var(--csr-item-h);
|
min-height: var(--csr-item-h);
|
||||||
padding: 0 12px 0 8px;
|
padding: 0 8px 0 4px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@ -686,45 +745,29 @@ onUnmounted(() => {
|
|||||||
background: rgba(15, 23, 42, 0.04);
|
background: rgba(15, 23, 42, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Linear 式:浅底 + 左侧选中点 */
|
/* 选中:珊瑚红圆底包图标;右侧给刷新钮留位 */
|
||||||
&.active {
|
&.active {
|
||||||
color: var(--app-primary-color, #1d7281);
|
color: var(--color-text-1);
|
||||||
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 10%, #fff);
|
background: transparent;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
padding-right: 30px;
|
||||||
.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.customer-side-rail__icon {
|
.customer-side-rail__icon {
|
||||||
color: var(--app-primary-color, #1d7281);
|
color: #fff;
|
||||||
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff);
|
background: #f56668;
|
||||||
}
|
}
|
||||||
|
|
||||||
.customer-side-rail__text {
|
.customer-side-rail__text {
|
||||||
color: var(--app-primary-color, #1d7281);
|
color: var(--color-text-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&: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 {
|
&__icon {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -732,18 +775,25 @@ onUnmounted(() => {
|
|||||||
width: 28px;
|
width: 28px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-radius: 8px;
|
border-radius: 999px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
line-height: 0;
|
||||||
color: var(--color-text-3);
|
color: var(--color-text-3);
|
||||||
background: transparent;
|
background: rgba(26, 46, 56, 0.05);
|
||||||
transition:
|
transition:
|
||||||
color 0.16s ease,
|
color 0.16s ease,
|
||||||
background-color 0.16s ease;
|
background-color 0.16s ease;
|
||||||
|
|
||||||
|
:deep(.arco-icon) {
|
||||||
|
display: block;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item:hover:not(.active) &__icon {
|
&__item:hover:not(.active) &__icon {
|
||||||
color: var(--color-text-1);
|
color: var(--color-text-1);
|
||||||
background: rgba(15, 23, 42, 0.04);
|
background: rgba(26, 46, 56, 0.09);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__text {
|
&__text {
|
||||||
@ -826,28 +876,32 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__toggle {
|
&__toggle {
|
||||||
display: flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 32px;
|
width: 28px;
|
||||||
height: 40px;
|
height: 28px;
|
||||||
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 8px;
|
border-radius: 999px;
|
||||||
background: transparent;
|
background: rgba(26, 46, 56, 0.05);
|
||||||
color: var(--color-text-3);
|
color: var(--color-text-3);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 13px;
|
line-height: 0;
|
||||||
|
transition: color 0.14s ease, background-color 0.14s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--app-primary-color);
|
color: var(--color-text-1);
|
||||||
background: rgba(15, 23, 42, 0.04);
|
background: rgba(26, 46, 56, 0.09);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__toggle-icon {
|
&__toggle-icon {
|
||||||
display: inline-flex;
|
display: block;
|
||||||
font-size: 13px;
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -862,8 +916,15 @@ onUnmounted(() => {
|
|||||||
.customer-side-rail__brand {
|
.customer-side-rail__brand {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 0;
|
gap: 0;
|
||||||
padding: 2px 0;
|
padding: 0;
|
||||||
min-height: 40px;
|
height: 48px;
|
||||||
|
min-height: 48px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.customer-side-rail__brand-badge {
|
||||||
|
width: 72px;
|
||||||
|
height: 42px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.customer-side-rail__scroll {
|
.customer-side-rail__scroll {
|
||||||
@ -905,23 +966,15 @@ onUnmounted(() => {
|
|||||||
border-radius: var(--csr-radius);
|
border-radius: var(--csr-radius);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 8%, #fff);
|
background: rgba(15, 23, 42, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff);
|
background: transparent;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.customer-side-rail__active-dot {
|
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
right: 5px;
|
|
||||||
width: 5px;
|
|
||||||
height: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.customer-side-rail__text {
|
.customer-side-rail__text {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -959,8 +1012,8 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.customer-side-rail__toggle {
|
.customer-side-rail__toggle {
|
||||||
width: 32px;
|
width: 28px;
|
||||||
height: 32px;
|
height: 28px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<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
|
<a-dropdown
|
||||||
:trigger="trigger"
|
:trigger="trigger"
|
||||||
:position="dropdownPosition"
|
:position="dropdownPosition"
|
||||||
@ -9,12 +9,17 @@
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="message-dropdown-trigger"
|
class="message-dropdown-trigger"
|
||||||
:class="{ 'is-emphasized': emphasize && totalCount > 0 }"
|
:class="{ 'is-hot': totalCount > 0, 'is-emphasized': emphasize && totalCount > 0 }"
|
||||||
:title="t('navbar.message')"
|
: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="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>
|
</div>
|
||||||
<template #content>
|
<template #content>
|
||||||
<a-doption @click="() => onMessageMenuClick({ key: 'notification' })">
|
<a-doption @click="() => onMessageMenuClick({ key: 'notification' })">
|
||||||
@ -65,7 +70,7 @@ const popupTranslate = computed<[number, number] | undefined>(() =>
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { notificationCount, noticeCount, totalCount, displayCount, refreshUnread } = useInboxUnread();
|
const { notificationCount, noticeCount, totalCount, refreshUnread } = useInboxUnread();
|
||||||
|
|
||||||
const onMessageDropdownVisibleChange = (visible: boolean) => {
|
const onMessageDropdownVisibleChange = (visible: boolean) => {
|
||||||
if (visible) refreshUnread();
|
if (visible) refreshUnread();
|
||||||
@ -83,45 +88,31 @@ const onMessageMenuClick = (event: { key?: string }) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<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 {
|
.message-dropdown-trigger {
|
||||||
|
position: relative;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 3px;
|
gap: 6px;
|
||||||
min-width: 28px;
|
width: 30px;
|
||||||
height: 28px;
|
min-width: 30px;
|
||||||
padding: 0 6px;
|
height: 30px;
|
||||||
border-radius: 8px;
|
padding: 0;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(26, 46, 56, 0.05);
|
||||||
|
color: rgba(26, 46, 56, 0.52);
|
||||||
|
line-height: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: inherit;
|
transition: background-color 0.14s ease, color 0.14s ease;
|
||||||
transition: background-color 0.15s ease, opacity 0.15s ease, color 0.15s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-dropdown-trigger:hover {
|
.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 {
|
.message-dropdown-trigger.is-emphasized {
|
||||||
@ -130,8 +121,12 @@ const onMessageMenuClick = (event: { key?: string }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.message-icon {
|
.message-icon {
|
||||||
font-size: 16px;
|
display: block;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
font-size: 15px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-label {
|
.message-label {
|
||||||
@ -142,18 +137,47 @@ const onMessageMenuClick = (event: { key?: string }) => {
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-count {
|
.message-dropdown-trigger:has(.message-label) {
|
||||||
flex-shrink: 0;
|
width: auto;
|
||||||
min-width: 16px;
|
padding: 0 10px 0 8px;
|
||||||
height: 16px;
|
}
|
||||||
padding: 0 4px;
|
|
||||||
border-radius: 8px;
|
.message-ping {
|
||||||
background: #f53f3f;
|
--msg-ping: #f53f3f;
|
||||||
color: #fff;
|
position: absolute;
|
||||||
font-size: 11px;
|
top: 4px;
|
||||||
font-weight: 600;
|
right: 4px;
|
||||||
line-height: 16px;
|
width: 7px;
|
||||||
text-align: center;
|
height: 7px;
|
||||||
letter-spacing: -0.02em;
|
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>
|
</style>
|
||||||
|
|||||||
@ -859,10 +859,11 @@ const onMenuClick = async (event: { key: string }) => {
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: 7px;
|
border-radius: 999px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
line-height: 0;
|
||||||
color: rgba(26, 46, 56, 0.55);
|
color: rgba(26, 46, 56, 0.55);
|
||||||
background: rgba(15, 23, 42, 0.04);
|
background: rgba(26, 46, 56, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item-label {
|
&__item-label {
|
||||||
|
|||||||
@ -73,17 +73,20 @@ function changeLang({ key }: { key: string }) {
|
|||||||
}
|
}
|
||||||
.dropDown {
|
.dropDown {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: inherit;
|
color: rgba(26, 46, 56, 0.52);
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 28px;
|
width: 30px;
|
||||||
height: 28px;
|
height: 30px;
|
||||||
border-radius: 8px;
|
border-radius: 999px;
|
||||||
transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
|
background: rgba(26, 46, 56, 0.05);
|
||||||
|
line-height: 0;
|
||||||
|
transition: background-color 0.14s ease, color 0.14s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgba(0, 0, 0, 0.05);
|
color: #1a2e38;
|
||||||
|
background: rgba(26, 46, 56, 0.09);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-sider {
|
&.is-sider {
|
||||||
@ -98,7 +101,11 @@ function changeLang({ key }: { key: string }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lang-icon {
|
.lang-icon {
|
||||||
font-size: 16px;
|
display: block;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -233,7 +233,15 @@
|
|||||||
@keydown.enter.prevent="onPrintConnectionClick"
|
@keydown.enter.prevent="onPrintConnectionClick"
|
||||||
>
|
>
|
||||||
<icon-printer class="print-connection-icon" />
|
<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>
|
</span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
@ -1410,7 +1418,7 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|
||||||
/* 独立白底胶囊标(高度与 .top-nav-menu 同为 44) */
|
/* 与客户侧栏品牌椭圆同步:浅灰底、无描边 */
|
||||||
.top-nav-logo {
|
.top-nav-logo {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
@ -1418,42 +1426,39 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
height: 44px;
|
width: 72px;
|
||||||
min-width: 64px;
|
height: 42px;
|
||||||
|
min-width: 72px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 14px;
|
padding: 0;
|
||||||
|
border: none;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
background: #fff;
|
background: rgba(26, 46, 56, 0.05);
|
||||||
border: 1px solid rgba(15, 23, 42, 0.08);
|
box-shadow: none;
|
||||||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
|
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
transition:
|
line-height: 0;
|
||||||
border-color 0.18s ease,
|
transition: background-color 0.14s ease;
|
||||||
box-shadow 0.18s ease,
|
|
||||||
transform 0.14s ease;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: rgba(15, 23, 42, 0.12);
|
background: rgba(26, 46, 56, 0.09);
|
||||||
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
border-color: rgba(15, 23, 42, 0.1);
|
background: rgba(26, 46, 56, 0.08);
|
||||||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
|
|
||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 28px;
|
width: 36px;
|
||||||
width: auto;
|
height: 36px;
|
||||||
max-width: 88px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
display: block;
|
display: block;
|
||||||
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
@ -1570,7 +1575,7 @@ onUnmounted(() => {
|
|||||||
.top-nav-right-cluster {
|
.top-nav-right-cluster {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2px;
|
gap: 6px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
&--meta {
|
&--meta {
|
||||||
@ -1600,7 +1605,7 @@ onUnmounted(() => {
|
|||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&--warehouse {
|
&--warehouse {
|
||||||
max-width: 180px;
|
max-width: 220px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1611,48 +1616,91 @@ onUnmounted(() => {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
border-radius: 9px;
|
border-radius: 999px;
|
||||||
color: var(--color-text-3, #86909c);
|
background: rgba(26, 46, 56, 0.05);
|
||||||
|
color: rgba(26, 46, 56, 0.52);
|
||||||
|
line-height: 0;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
outline: none;
|
outline: none;
|
||||||
transition:
|
transition:
|
||||||
color 0.16s ease,
|
color 0.14s ease,
|
||||||
background-color 0.16s ease,
|
background-color 0.14s ease,
|
||||||
opacity 0.16s ease;
|
opacity 0.14s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--color-text-1, #1d2129);
|
color: #1a2e38;
|
||||||
background-color: rgba(15, 23, 42, 0.045);
|
background: rgba(26, 46, 56, 0.09);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-enabled {
|
&.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 {
|
&.is-loading {
|
||||||
opacity: 0.5;
|
opacity: 0.55;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-connection-icon {
|
.print-connection-icon {
|
||||||
|
display: block;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-connection-dot {
|
.print-connection-ping {
|
||||||
|
--print-ping: #c9cdd4;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 5px;
|
top: 4px;
|
||||||
bottom: 5px;
|
right: 4px;
|
||||||
width: 6px;
|
width: 7px;
|
||||||
height: 6px;
|
height: 7px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--color-text-4, #c9cdd4);
|
background: var(--print-ping);
|
||||||
box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.92);
|
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 {
|
@keyframes top-nav-chip-ping {
|
||||||
background: #22c55e;
|
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 {
|
.balance-dropdown-trigger {
|
||||||
@ -1694,47 +1742,34 @@ onUnmounted(() => {
|
|||||||
padding-right: 2px;
|
padding-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 统一消息 / 语言触控态 */
|
/* 统一消息 / 语言:圆钮,与客户门户工具条一致 */
|
||||||
:deep(.dropDown) {
|
:deep(.dropDown) {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
min-width: 30px;
|
min-width: 30px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-radius: 9px;
|
border-radius: 999px;
|
||||||
color: var(--color-text-3, #86909c);
|
background: rgba(26, 46, 56, 0.05);
|
||||||
|
color: rgba(26, 46, 56, 0.52);
|
||||||
|
line-height: 0;
|
||||||
transition:
|
transition:
|
||||||
color 0.16s ease,
|
color 0.14s ease,
|
||||||
background-color 0.16s ease;
|
background-color 0.14s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--color-text-1, #1d2129);
|
color: #1a2e38;
|
||||||
background-color: rgba(15, 23, 42, 0.045);
|
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) {
|
:deep(.lang-icon) {
|
||||||
|
display: block;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 未读数样式由 RightTopMessage 红底胶囊负责,勿在此盖 opacity/字色 */
|
|
||||||
|
|
||||||
/* 用户头像:右侧锚点,轻描边即可,不做坞 */
|
/* 用户头像:右侧锚点,轻描边即可,不做坞 */
|
||||||
:deep(.user-dropdown-trigger.is-compact) {
|
:deep(.user-dropdown-trigger.is-compact) {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
@ -1767,7 +1802,7 @@ onUnmounted(() => {
|
|||||||
.top-nav-tabs {
|
.top-nav-tabs {
|
||||||
height: @headerTabNavHeight;
|
height: @headerTabNavHeight;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-bottom: 1px dashed rgba(26, 46, 56, 0.14);
|
border-bottom: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -168,7 +168,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-bottom: 1px dashed rgba(26, 46, 56, 0.14);
|
border-bottom: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-right: 12px;
|
padding-right: 12px;
|
||||||
/* 虚线分割与下方页面内容留白(原先贴死到工作台卡片) */
|
/* 虚线分割与下方页面内容留白(原先贴死到工作台卡片) */
|
||||||
|
|||||||
@ -222,12 +222,16 @@ export default {
|
|||||||
'warehouse.storageRent.price.volume': 'Volume band (CBM)',
|
'warehouse.storageRent.price.volume': 'Volume band (CBM)',
|
||||||
'warehouse.storageRent.price.customer': 'Customer group',
|
'warehouse.storageRent.price.customer': 'Customer group',
|
||||||
'warehouse.storageRent.price.matrixHint': '{rows} rows × {cols} customer columns; unit: CNY/CBM/day',
|
'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.rateName': 'e.g. SZ warehouse standard rent',
|
||||||
'warehouse.storageRent.placeholder.remark': 'Optional',
|
'warehouse.storageRent.placeholder.remark': 'Optional',
|
||||||
'warehouse.storageRent.placeholder.warehouses': 'Select warehouses',
|
'warehouse.storageRent.placeholder.warehouses': 'Select warehouses',
|
||||||
'warehouse.storageRent.placeholder.customers': 'Select customer groups',
|
'warehouse.storageRent.placeholder.customers': 'Select customer groups',
|
||||||
'warehouse.storageRent.placeholder.days': 'e.g. 0-7 or (0-7], integer days inclusive',
|
'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.volume': 'e.g. (0-1], custom allowed',
|
||||||
|
'warehouse.storageRent.placeholder.batchFill': 'Enter unit price',
|
||||||
'warehouse.storageRent.bill.billNo': 'Bill no.',
|
'warehouse.storageRent.bill.billNo': 'Bill no.',
|
||||||
'warehouse.storageRent.bill.billDate': 'Bill date',
|
'warehouse.storageRent.bill.billDate': 'Bill date',
|
||||||
'warehouse.storageRent.bill.totalCbm': 'Total CBM',
|
'warehouse.storageRent.bill.totalCbm': 'Total CBM',
|
||||||
@ -235,6 +239,10 @@ export default {
|
|||||||
'warehouse.storageRent.bill.unitPrice': 'Unit price',
|
'warehouse.storageRent.bill.unitPrice': 'Unit price',
|
||||||
'warehouse.storageRent.bill.detailTitle': 'Storage rent bill',
|
'warehouse.storageRent.bill.detailTitle': 'Storage rent bill',
|
||||||
'warehouse.storageRent.action.syncPrice': 'Sync price grid',
|
'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.addRate': 'Add rate',
|
||||||
'warehouse.storageRent.action.reset': 'Reset',
|
'warehouse.storageRent.action.reset': 'Reset',
|
||||||
'warehouse.storageRent.action.disable': 'Disable',
|
'warehouse.storageRent.action.disable': 'Disable',
|
||||||
@ -264,6 +272,18 @@ export default {
|
|||||||
'warehouse.storageRent.message.backfillOk': 'Backfill done',
|
'warehouse.storageRent.message.backfillOk': 'Backfill done',
|
||||||
'warehouse.storageRent.message.backfillFail': 'Backfill failed',
|
'warehouse.storageRent.message.backfillFail': 'Backfill failed',
|
||||||
'warehouse.storageRent.message.synced': 'Price grid synced',
|
'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.search': 'Search',
|
||||||
'warehouse.common.add': 'Add',
|
'warehouse.common.add': 'Add',
|
||||||
|
|||||||
@ -397,12 +397,16 @@ export default {
|
|||||||
'warehouse.storageRent.price.volume': '体积区间(CBM)',
|
'warehouse.storageRent.price.volume': '体积区间(CBM)',
|
||||||
'warehouse.storageRent.price.customer': '客户组',
|
'warehouse.storageRent.price.customer': '客户组',
|
||||||
'warehouse.storageRent.price.matrixHint': '共 {rows} 行 × {cols} 个客户组列,单价单位:元/CBM/天',
|
'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.rateName': '例如:深圳仓标准仓租',
|
||||||
'warehouse.storageRent.placeholder.remark': '选填',
|
'warehouse.storageRent.placeholder.remark': '选填',
|
||||||
'warehouse.storageRent.placeholder.warehouses': '选择适用仓库',
|
'warehouse.storageRent.placeholder.warehouses': '选择适用仓库',
|
||||||
'warehouse.storageRent.placeholder.customers': '选择客户组',
|
'warehouse.storageRent.placeholder.customers': '选择客户组',
|
||||||
'warehouse.storageRent.placeholder.days': '如 0-7 或 (0-7],按整数天闭区间匹配',
|
'warehouse.storageRent.placeholder.days': '如 0-7 或 (0-7],按整数天闭区间匹配',
|
||||||
'warehouse.storageRent.placeholder.volume': '如 (0-1],可自定义',
|
'warehouse.storageRent.placeholder.volume': '如 (0-1],可自定义',
|
||||||
|
'warehouse.storageRent.placeholder.batchFill': '输入统一单价',
|
||||||
'warehouse.storageRent.bill.billNo': '账单号',
|
'warehouse.storageRent.bill.billNo': '账单号',
|
||||||
'warehouse.storageRent.bill.billDate': '计费日',
|
'warehouse.storageRent.bill.billDate': '计费日',
|
||||||
'warehouse.storageRent.bill.totalCbm': '总体积',
|
'warehouse.storageRent.bill.totalCbm': '总体积',
|
||||||
@ -410,6 +414,10 @@ export default {
|
|||||||
'warehouse.storageRent.bill.unitPrice': '单价',
|
'warehouse.storageRent.bill.unitPrice': '单价',
|
||||||
'warehouse.storageRent.bill.detailTitle': '仓租账单详情',
|
'warehouse.storageRent.bill.detailTitle': '仓租账单详情',
|
||||||
'warehouse.storageRent.action.syncPrice': '同步价格表',
|
'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.addRate': '新增费率',
|
||||||
'warehouse.storageRent.action.reset': '重置',
|
'warehouse.storageRent.action.reset': '重置',
|
||||||
'warehouse.storageRent.action.disable': '禁用',
|
'warehouse.storageRent.action.disable': '禁用',
|
||||||
@ -439,6 +447,18 @@ export default {
|
|||||||
'warehouse.storageRent.message.backfillOk': '反灌完成',
|
'warehouse.storageRent.message.backfillOk': '反灌完成',
|
||||||
'warehouse.storageRent.message.backfillFail': '反灌失败',
|
'warehouse.storageRent.message.backfillFail': '反灌失败',
|
||||||
'warehouse.storageRent.message.synced': '价格表已同步',
|
'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.all': '全部',
|
||||||
'warehouse.parcel.status.inTransit': '在途',
|
'warehouse.parcel.status.inTransit': '在途',
|
||||||
'warehouse.parcel.status.arrived': '已到仓',
|
'warehouse.parcel.status.arrived': '已到仓',
|
||||||
|
|||||||
@ -10,10 +10,11 @@ export const CUSTOMER_TOP_NAV_PRIORITY_PATHS = [
|
|||||||
'/order/myOrders',
|
'/order/myOrders',
|
||||||
] as const
|
] as const
|
||||||
|
|
||||||
export const CUSTOMER_SIDE_RAIL_COLLAPSED_WIDTH = 64
|
/** 收起宽与品牌椭圆 badge(72px)对齐 */
|
||||||
|
export const CUSTOMER_SIDE_RAIL_COLLAPSED_WIDTH = 72
|
||||||
/** 默认展开宽;可拖拽,落在 MIN~MAX */
|
/** 默认展开宽;可拖拽,落在 MIN~MAX */
|
||||||
export const CUSTOMER_SIDE_RAIL_EXPANDED_WIDTH = 180
|
export const CUSTOMER_SIDE_RAIL_EXPANDED_WIDTH = 156
|
||||||
export const CUSTOMER_SIDE_RAIL_MIN_WIDTH = 160
|
export const CUSTOMER_SIDE_RAIL_MIN_WIDTH = 140
|
||||||
export const CUSTOMER_SIDE_RAIL_MAX_WIDTH = 280
|
export const CUSTOMER_SIDE_RAIL_MAX_WIDTH = 280
|
||||||
export const CUSTOMER_SIDE_RAIL_STORAGE_KEY = 'oms.customerSideRail.collapsed'
|
export const CUSTOMER_SIDE_RAIL_STORAGE_KEY = 'oms.customerSideRail.collapsed'
|
||||||
export const CUSTOMER_SIDE_RAIL_WIDTH_STORAGE_KEY = 'oms.customerSideRail.expandedWidth'
|
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)
|
if (raw == null || raw === '') return clampCustomerSideRailWidth(fallback)
|
||||||
const n = Number(raw)
|
const n = Number(raw)
|
||||||
if (!Number.isFinite(n)) return clampCustomerSideRailWidth(fallback)
|
if (!Number.isFinite(n)) return clampCustomerSideRailWidth(fallback)
|
||||||
|
// 旧默认 180 → 新默认,避免本地缓存挡住缩窄
|
||||||
|
if (n === 180) return clampCustomerSideRailWidth(fallback)
|
||||||
return clampCustomerSideRailWidth(n)
|
return clampCustomerSideRailWidth(n)
|
||||||
} catch {
|
} catch {
|
||||||
return clampCustomerSideRailWidth(fallback)
|
return clampCustomerSideRailWidth(fallback)
|
||||||
|
|||||||
@ -2006,16 +2006,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 与上游 interface-layout 对齐:吃满 page-layout,自管 16 内边距(覆盖全局 padding-top 8) */
|
||||||
.service-provider-layout {
|
.service-provider-layout {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: calc(100vh - 86px);
|
height: 100%;
|
||||||
max-height: calc(100vh - 86px);
|
min-height: 0;
|
||||||
padding: 16px;
|
width: 100%;
|
||||||
|
padding: 16px !important;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
background-color: var(--app-page-bg);
|
background-color: var(--app-page-bg);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 左侧使用自定义左菜单组件,仅保留布局 */
|
/* 左侧使用自定义左菜单组件,仅保留布局 */
|
||||||
|
|||||||
@ -1526,7 +1526,6 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="upstream-interface-page">
|
|
||||||
<div class="interface-layout">
|
<div class="interface-layout">
|
||||||
<!-- 左侧上游接口列表:自定义左菜单 -->
|
<!-- 左侧上游接口列表:自定义左菜单 -->
|
||||||
<CustomLeftMenu
|
<CustomLeftMenu
|
||||||
@ -1662,7 +1661,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<ModalPro
|
<ModalPro
|
||||||
v-model:visible="editVisible"
|
v-model:visible="editVisible"
|
||||||
:width="1500"
|
:width="1500"
|
||||||
@ -1775,25 +1774,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.upstream-interface-page {
|
/* 与下游 service-provider-layout 同构:单层根节点,吃满 page-layout */
|
||||||
height: 100%;
|
|
||||||
min-height: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.interface-layout {
|
.interface-layout {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
height: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
height: calc(100vh - 86px);
|
width: 100%;
|
||||||
max-height: calc(100vh - 86px);
|
padding: 16px !important;
|
||||||
padding: 16px;
|
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
background-color: var(--app-page-bg);
|
background-color: var(--app-page-bg);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 左侧使用自定义左菜单组件,仅保留布局 */
|
/* 左侧使用自定义左菜单组件,仅保留布局 */
|
||||||
|
|||||||
@ -153,8 +153,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const productList = ref<any[]>([]);
|
const productList = ref<any[]>([]);
|
||||||
|
const productListLoading = ref(false);
|
||||||
|
|
||||||
async function loadProductList() {
|
async function loadProductList() {
|
||||||
|
productListLoading.value = true;
|
||||||
try {
|
try {
|
||||||
const { items } = await getSalesProductList({
|
const { items } = await getSalesProductList({
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -182,6 +184,8 @@
|
|||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
Message.error(e?.message || '加载销售产品失败');
|
Message.error(e?.message || '加载销售产品失败');
|
||||||
productList.value = [];
|
productList.value = [];
|
||||||
|
} finally {
|
||||||
|
productListLoading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1202,6 +1206,7 @@
|
|||||||
id: p.id,
|
id: p.id,
|
||||||
name: p.name,
|
name: p.name,
|
||||||
...p,
|
...p,
|
||||||
|
code: `修改: ${p.updateTime || '--'}`,
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -4813,13 +4818,15 @@
|
|||||||
:selected-keys="productSelectedKeys"
|
:selected-keys="productSelectedKeys"
|
||||||
v-model:expanded-keys="productExpandedKeys"
|
v-model:expanded-keys="productExpandedKeys"
|
||||||
v-model:search-keyword="searchKeyword"
|
v-model:search-keyword="searchKeyword"
|
||||||
|
:loading="productListLoading"
|
||||||
|
loading-text="正在加载产品列表..."
|
||||||
:search-placeholder="t('channel.salesProducts.search.placeholder')"
|
:search-placeholder="t('channel.salesProducts.search.placeholder')"
|
||||||
:refresh-title="t('channel.salesProducts.search.refresh')"
|
:refresh-title="t('channel.salesProducts.search.refresh')"
|
||||||
:add-title="t('channel.salesProducts.search.addProduct')"
|
:add-title="t('channel.salesProducts.search.addProduct')"
|
||||||
:show-node-index="true"
|
:show-node-index="true"
|
||||||
:show-method="false"
|
:show-method="false"
|
||||||
:show-map-count="false"
|
:show-map-count="false"
|
||||||
:show-node-code="false"
|
:show-node-code="true"
|
||||||
:show-node-actions="true"
|
:show-node-actions="true"
|
||||||
:delete-label="t('channel.salesProducts.actions.delete')"
|
:delete-label="t('channel.salesProducts.actions.delete')"
|
||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
@ -4832,27 +4839,24 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #node-second-row-extra="{ nodeData }">
|
<template #node-second-row-extra="{ nodeData }">
|
||||||
<div class="product-second-row">
|
<span
|
||||||
<span class="modify-time">修改: {{ nodeData?.updateTime || '--' }}</span>
|
class="switch-swipe-wrapper"
|
||||||
<span
|
@click.capture.stop="() => {
|
||||||
class="switch-swipe-wrapper"
|
const product = productList.find((p: any) => p.id === nodeData?.id);
|
||||||
@click.capture.stop="() => {
|
if (product) { product.isActive = !product.isActive; handleToggleProduct(product); }
|
||||||
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)"
|
||||||
@touchstart.passive="onStatusSwipeStart"
|
>
|
||||||
@touchend="(e) => onProductSwitchSwipeEnd(nodeData, e)"
|
<a-switch
|
||||||
>
|
:model-value="nodeData?.isActive"
|
||||||
<a-switch
|
size="small"
|
||||||
:model-value="nodeData?.isActive"
|
type="circle"
|
||||||
size="small"
|
class="product-active-switch"
|
||||||
type="circle"
|
checked-color="#00b42a"
|
||||||
class="product-active-switch"
|
unchecked-color="#f53f3f"
|
||||||
checked-color="#00b42a"
|
/>
|
||||||
unchecked-color="#f53f3f"
|
</span>
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</CustomLeftMenu>
|
</CustomLeftMenu>
|
||||||
</div>
|
</div>
|
||||||
@ -7350,22 +7354,30 @@
|
|||||||
.price-approval-banner {
|
.price-approval-banner {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
padding: 12px 14px;
|
padding: 12px 14px;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
border: 1px solid var(--color-border-2);
|
border: 1px solid var(--color-border-2);
|
||||||
|
|
||||||
&.is-waiting {
|
&.is-waiting {
|
||||||
background: #e8f7f7;
|
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 10%, #fff);
|
||||||
border-color: color-mix(in srgb, var(--app-primary-color, #1d7281) 35%, #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 {
|
&.is-failed {
|
||||||
background: #fff7f0;
|
background: color-mix(in srgb, #f53f3f 8%, #fff);
|
||||||
border-color: #ffd0a8;
|
border-color: color-mix(in srgb, #f53f3f 28%, #fff);
|
||||||
|
|
||||||
|
.price-approval-banner-title {
|
||||||
|
color: #c93c37;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
:show-node-index="true"
|
:show-node-index="true"
|
||||||
:show-method="false"
|
:show-method="false"
|
||||||
:show-map-count="false"
|
:show-map-count="false"
|
||||||
:show-node-code="false"
|
:show-node-code="true"
|
||||||
:show-node-actions="true"
|
:show-node-actions="true"
|
||||||
:show-branch-node-actions="true"
|
:show-branch-node-actions="true"
|
||||||
:delete-label="t('channel.serviceChannels.actions.delete')"
|
:delete-label="t('channel.serviceChannels.actions.delete')"
|
||||||
@ -43,31 +43,24 @@
|
|||||||
</a-doption>
|
</a-doption>
|
||||||
</template>
|
</template>
|
||||||
<template #node-second-row-extra="{ nodeData }">
|
<template #node-second-row-extra="{ nodeData }">
|
||||||
<div class="channel-second-row">
|
<span
|
||||||
<span class="modify-time">{{
|
class="switch-swipe-wrapper"
|
||||||
t('channel.serviceChannels.updateTime', {
|
@click.capture.stop="() => {
|
||||||
time: nodeData?.updateTime || '--',
|
const channel = findChannelById(nodeData?.id)
|
||||||
})
|
if (channel) { channel.isActive = !channel.isActive; handleToggleChannel(channel); }
|
||||||
}}</span>
|
}"
|
||||||
<span
|
@touchstart.passive="onStatusSwipeStart"
|
||||||
class="switch-swipe-wrapper"
|
@touchend="(e) => onChannelSwitchSwipeEnd(nodeData, e)"
|
||||||
@click.capture.stop="() => {
|
>
|
||||||
const channel = findChannelById(nodeData?.id)
|
<a-switch
|
||||||
if (channel) { channel.isActive = !channel.isActive; handleToggleChannel(channel); }
|
:model-value="nodeData?.isActive"
|
||||||
}"
|
size="small"
|
||||||
@touchstart.passive="onStatusSwipeStart"
|
type="circle"
|
||||||
@touchend="(e) => onChannelSwitchSwipeEnd(nodeData, e)"
|
class="channel-active-switch"
|
||||||
>
|
checked-color="#00b42a"
|
||||||
<a-switch
|
unchecked-color="#f53f3f"
|
||||||
:model-value="nodeData?.isActive"
|
/>
|
||||||
size="small"
|
</span>
|
||||||
type="circle"
|
|
||||||
class="channel-active-switch"
|
|
||||||
checked-color="#00b42a"
|
|
||||||
unchecked-color="#f53f3f"
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</CustomLeftMenu>
|
</CustomLeftMenu>
|
||||||
</div>
|
</div>
|
||||||
@ -2162,7 +2155,10 @@ const channelTreeData = computed<CustomLeftMenuTreeNode[]>(() => {
|
|||||||
isLeaf: true,
|
isLeaf: true,
|
||||||
id: ch.id,
|
id: ch.id,
|
||||||
name: ch.name,
|
name: ch.name,
|
||||||
...ch
|
...ch,
|
||||||
|
code: t('channel.serviceChannels.updateTime', {
|
||||||
|
time: ch.updateTime || '--',
|
||||||
|
}),
|
||||||
}))
|
}))
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
|||||||
@ -361,9 +361,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.banner-hello__copy {
|
.banner-hello__copy {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: flex-start;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.banner-hello__meta {
|
||||||
|
margin-left: 0;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
.banner-hello__avatar {
|
.banner-hello__avatar {
|
||||||
border: none;
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@ -434,8 +442,11 @@
|
|||||||
|
|
||||||
.banner-hello__copy {
|
.banner-hello__copy {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: row;
|
||||||
gap: 4px;
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px 12px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -152,8 +152,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 贴视口底:不进 flex 内容流,避免随 VV/矮屏一起被挤缩 -->
|
<!-- 欢迎态文档流页脚:矮屏滚到底可见;对话态不占视口 -->
|
||||||
<div class="ai-trust-bar">
|
<div v-if="!chatting" class="ai-trust-bar">
|
||||||
<div class="ai-trust-bar__inner">
|
<div class="ai-trust-bar__inner">
|
||||||
<SitePartnerMarquee
|
<SitePartnerMarquee
|
||||||
:is-zh="isZh"
|
:is-zh="isZh"
|
||||||
|
|||||||
@ -225,8 +225,8 @@ body.command-home .site-nav-wordmark__copy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body.command-home .site-nav-wordmark__text {
|
body.command-home .site-nav-wordmark__text {
|
||||||
color: var(--ai-brand);
|
color: var(--ai-text-3, #6a7380);
|
||||||
font-weight: 400;
|
font-weight: 650;
|
||||||
font-size: 1.05rem;
|
font-size: 1.05rem;
|
||||||
letter-spacing: 0.02em;
|
letter-spacing: 0.02em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
@ -609,63 +609,60 @@ body.command-home .site-nav-wordmark__logo img {
|
|||||||
background: rgba(15, 23, 42, 0.04);
|
background: rgba(15, 23, 42, 0.04);
|
||||||
box-shadow: none;
|
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,
|
||||||
body.command-home #navbar .site-nav-tools .language-toggle-link:focus,
|
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,
|
||||||
body.command-home #navbar .site-nav-tools .language-toggle-link.active:focus {
|
body.command-home #navbar .site-nav-tools .language-toggle-link.active:focus {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 32px;
|
||||||
|
min-width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
min-height: 32px;
|
min-height: 32px;
|
||||||
padding: 0 8px;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
gap: 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 999px;
|
border-radius: 50%;
|
||||||
background: transparent;
|
background: rgba(26, 46, 56, 0.05);
|
||||||
backdrop-filter: none;
|
backdrop-filter: none;
|
||||||
-webkit-backdrop-filter: none;
|
-webkit-backdrop-filter: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
color: rgba(26, 46, 56, 0.55);
|
color: rgba(26, 46, 56, 0.55);
|
||||||
font-size: 12px;
|
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;
|
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:hover,
|
||||||
body.command-home #navbar .site-nav-tools .language-toggle-link.active,
|
body.command-home #navbar .site-nav-tools .language-toggle-link.active,
|
||||||
body.command-home #navbar .site-nav-tools .language-toggle-link.active:focus {
|
body.command-home #navbar .site-nav-tools .language-toggle-link.active:focus {
|
||||||
color: var(--ai-text);
|
color: var(--ai-text);
|
||||||
border: none;
|
background: rgba(26, 46, 56, 0.09);
|
||||||
background: rgba(15, 23, 42, 0.04);
|
|
||||||
box-shadow: none;
|
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 {
|
body.command-home #navbar .site-nav-tools .site-nav-avatar .site-nav-avatar__icon {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
body.command-home #navbar .site-nav-tools .language-toggle-icon {
|
body.command-home #navbar .site-nav-tools .language-toggle-icon {
|
||||||
font-size: 12px;
|
display: none;
|
||||||
color: inherit;
|
|
||||||
}
|
}
|
||||||
body.command-home #navbar .site-nav-tools .language-toggle__next {
|
body.command-home #navbar .site-nav-tools .language-toggle__next {
|
||||||
|
min-width: 0;
|
||||||
font-size: 11.5px;
|
font-size: 11.5px;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
letter-spacing: 0.02em;
|
letter-spacing: 0.02em;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
@ -711,11 +708,6 @@ body.command-home #navbar .site-nav-dock a.is-active:focus {
|
|||||||
color: var(--ai-brand, #023e8a);
|
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,
|
||||||
body.command-home #navbar .site-nav-login:focus,
|
body.command-home #navbar .site-nav-login:focus,
|
||||||
body.command-home #navbar .site-nav-login:hover,
|
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:hover,
|
||||||
body.command-home #navbar .language-toggle-link.active,
|
body.command-home #navbar .language-toggle-link.active,
|
||||||
body.command-home #navbar .language-toggle-link.active:focus {
|
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,
|
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 {
|
body.command-home .language-toggle-icon {
|
||||||
width: 1em;
|
display: none;
|
||||||
height: 1em;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 1;
|
|
||||||
color: inherit;
|
|
||||||
transition: color 0.15s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.command-home .language-toggle__next {
|
body.command-home .language-toggle__next {
|
||||||
min-width: 1.1em;
|
min-width: 0;
|
||||||
font-size: 11.5px;
|
font-size: 11.5px;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
letter-spacing: 0.02em;
|
letter-spacing: 0.02em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: inherit;
|
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,
|
||||||
body.command-home #navbar .language-toggle-link.active:focus {
|
body.command-home #navbar .language-toggle-link.active:focus {
|
||||||
border: none;
|
border: none;
|
||||||
background: rgba(15, 23, 42, 0.04);
|
background: rgba(26, 46, 56, 0.09);
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
color: var(--ai-text);
|
color: var(--ai-text);
|
||||||
}
|
}
|
||||||
@ -981,8 +987,6 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-advisor-layou
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
/* 抵消 EdiAssistant 同名类的卡片壳/内边距,首页铺满舞台不做浮卡 */
|
/* 抵消 EdiAssistant 同名类的卡片壳/内边距,首页铺满舞台不做浮卡 */
|
||||||
padding: 0;
|
padding: 0;
|
||||||
/* 给固定信任条留位,内容不被挡住 */
|
|
||||||
padding-bottom: calc(var(--ai-trust-bar-h) + env(safe-area-inset-bottom, 0px));
|
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@ -1060,7 +1064,7 @@ body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-advisor-layou
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
top: calc(var(--ai-header-h) + 10px);
|
top: calc(var(--ai-header-h) + 10px);
|
||||||
left: 12px;
|
left: 12px;
|
||||||
bottom: calc(var(--ai-trust-bar-h) + 10px);
|
bottom: calc(10px + env(safe-area-inset-bottom, 0px));
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
width: min(300px, calc(86vw - 24px));
|
width: min(300px, calc(86vw - 24px));
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -2444,26 +2448,29 @@ body.command-home #navbar .site-nav-avatar:visited {
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
width: 32px;
|
width: 32px;
|
||||||
|
min-width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
min-height: 32px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
border: none;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 1px solid var(--ai-glass-border);
|
background: rgba(26, 46, 56, 0.05);
|
||||||
background: var(--ai-glass-fill);
|
box-shadow: none;
|
||||||
box-shadow: var(--ai-glass-shadow);
|
color: rgba(26, 46, 56, 0.55);
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.command-home #navbar .site-nav-avatar .site-nav-avatar__icon {
|
body.command-home #navbar .site-nav-avatar .site-nav-avatar__icon {
|
||||||
width: 18px;
|
width: 16px;
|
||||||
height: 18px;
|
height: 16px;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.command-home #navbar .site-nav-avatar:hover {
|
body.command-home #navbar .site-nav-avatar:hover {
|
||||||
border-color: rgba(255, 255, 255, 0.94);
|
color: var(--ai-text);
|
||||||
box-shadow: var(--ai-glass-shadow);
|
background: rgba(26, 46, 56, 0.09);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-welcome__stack {
|
.ai-welcome__stack {
|
||||||
@ -2802,7 +2809,7 @@ body.command-home #navbar .site-nav-avatar:hover {
|
|||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 首页:主区不吃满高度,精选紧跟输入台;信任条已 fixed 贴底 */
|
/* 首页:主区不吃满高度,精选紧跟输入台;信任条随文档流沉底 */
|
||||||
|
|
||||||
body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-app-main {
|
body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-app-main {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
@ -4911,7 +4918,7 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: min(720px, 100%);
|
max-width: min(720px, 100%);
|
||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
padding: 10px 0 0;
|
padding: 10px 0 20px;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
}
|
}
|
||||||
@ -4970,12 +4977,15 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 40px;
|
width: 36px;
|
||||||
height: 40px;
|
height: 36px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 14px;
|
border-radius: 999px;
|
||||||
background: var(--ai-brand, #023e8a);
|
background: var(--ai-accent, #f56668);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
line-height: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.15s var(--ai-ease), filter 0.15s ease, transform 0.12s ease;
|
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;
|
display: block;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
|
flex-shrink: 0;
|
||||||
fill: none;
|
fill: none;
|
||||||
stroke: currentColor;
|
stroke: currentColor;
|
||||||
stroke-width: 2.25;
|
stroke-width: 2.25;
|
||||||
stroke-linecap: round;
|
stroke-linecap: round;
|
||||||
stroke-linejoin: round;
|
stroke-linejoin: round;
|
||||||
|
/* 上箭头 path 视觉重心略偏上,微下移让几何居中 */
|
||||||
|
transform: translateY(0.5px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-composer-send.is-empty,
|
.ai-composer-send.is-empty,
|
||||||
.ai-composer-send.is-empty:hover {
|
.ai-composer-send.is-empty:hover {
|
||||||
background: #ececec;
|
background: #e8eaed;
|
||||||
color: #9a9a9a;
|
color: #b0b5bd;
|
||||||
|
opacity: 1;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
transform: none;
|
transform: none;
|
||||||
filter: none;
|
filter: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-composer-send:hover:not(:disabled):not(.is-empty) {
|
.ai-composer-send:hover:not(:disabled):not(.is-empty) {
|
||||||
background: var(--ai-brand-hover, #012a74);
|
background: var(--ai-accent-hover, #e25557);
|
||||||
filter: brightness(1.02);
|
color: #fff;
|
||||||
|
filter: none;
|
||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-composer-send:focus-visible {
|
.ai-composer-send:focus-visible {
|
||||||
outline: 2px solid var(--ai-brand, #023e8a);
|
outline: 2px solid var(--ai-accent, #f56668);
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5028,34 +5043,30 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ai-trust-bar {
|
.ai-trust-bar {
|
||||||
/* Pin to layout viewport bottom; ignore --ai-vv-height flex shrink */
|
/* 文档流页脚:短页靠 flex 沉底,长页滚到底可见(非 position:fixed) */
|
||||||
position: fixed;
|
position: relative;
|
||||||
left: 0;
|
z-index: 1;
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 30;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
flex-shrink: 0;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 0;
|
gap: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
height: calc(var(--ai-trust-bar-h) + env(safe-area-inset-bottom, 0px));
|
height: calc(var(--ai-trust-bar-h) + env(safe-area-inset-bottom, 0px));
|
||||||
margin: 0;
|
margin: auto 0 0;
|
||||||
padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px)
|
padding: 0;
|
||||||
env(safe-area-inset-left, 0px);
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid color-mix(in srgb, var(--ai-border) 22%, transparent);
|
background: transparent;
|
||||||
background: color-mix(in srgb, var(--ai-bg, #f3f5f6) 88%, transparent);
|
|
||||||
color: var(--ai-text-3);
|
color: var(--ai-text-3);
|
||||||
font-size: 0.68rem;
|
font-size: 0.68rem;
|
||||||
backdrop-filter: none;
|
backdrop-filter: none;
|
||||||
-webkit-backdrop-filter: none;
|
-webkit-backdrop-filter: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 与 .ai-advisor-layout 同列:合作伙伴靠左,ICP 靠右 */
|
/* 已在 .ai-advisor-layout 内:合作伙伴靠左,ICP 靠右(勿再套一层左右 padding) */
|
||||||
.ai-trust-bar__inner {
|
.ai-trust-bar__inner {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -5063,10 +5074,9 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: var(--ai-content-max, 1200px);
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0 auto;
|
margin: 0;
|
||||||
padding: 0 20px;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5297,7 +5307,7 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
gap: 0;
|
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 {
|
.ai-trust-bar {
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
@ -5314,8 +5324,6 @@ body.command-home .ai-composer-slot--welcome .ai-composer {
|
|||||||
font-size: 0.58rem;
|
font-size: 0.58rem;
|
||||||
}
|
}
|
||||||
.ai-trust-bar__inner {
|
.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;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
.ai-trust-icp {
|
.ai-trust-icp {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<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 { useI18n } from 'vue-i18n'
|
||||||
import { Modal } from '@arco-design/web-vue'
|
import { Modal } from '@arco-design/web-vue'
|
||||||
import HandsontablePro from '@/components/HandsontablePro/index.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 ModalPro from '@/components/ModalPro/index.vue'
|
||||||
import useModal from '@/components/ModalPro/useModal'
|
import useModal from '@/components/ModalPro/useModal'
|
||||||
import { useTableContainerHeight } from '@/composables/useTableContainerHeight'
|
import { useTableContainerHeight } from '@/composables/useTableContainerHeight'
|
||||||
|
import PriceListHotTable, {
|
||||||
|
type PriceListHotColumn,
|
||||||
|
} from '@/views/channel/salesProducts/components/PriceListHotTable.vue'
|
||||||
import { getWarehouseList } from '@/api/system/warehouse'
|
import { getWarehouseList } from '@/api/system/warehouse'
|
||||||
import { getDictListAll } from '@/api/system/dict'
|
import { getDictListAll } from '@/api/system/dict'
|
||||||
import {
|
import {
|
||||||
@ -60,11 +63,16 @@ const backfillLoading = ref(false)
|
|||||||
|
|
||||||
const warehouseOptions = ref<Array<{ id: number; warehouseName: string }>>([])
|
const warehouseOptions = ref<Array<{ id: number; warehouseName: string }>>([])
|
||||||
const customerGroupOptions = ref<Array<{ code: string; name: 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 [registerFormModal, { openModal, closeModal }] = useModal() as any
|
||||||
const [registerBillModal, { openModal: openBillModal, closeModal: closeBillModal }] = useModal() as any
|
const [registerBillModal, { openModal: openBillModal, closeModal: closeBillModal }] = useModal() as any
|
||||||
const saving = ref(false)
|
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({
|
const formModel = reactive({
|
||||||
id: 0,
|
id: 0,
|
||||||
@ -78,6 +86,12 @@ const formModel = reactive({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const priceRows = ref<any[]>([])
|
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 billDetail = ref<any | null>(null)
|
||||||
const billDetailLines = computed(() => {
|
const billDetailLines = computed(() => {
|
||||||
const lines = billDetail.value?.lines || billDetail.value?.Lines || []
|
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 },
|
{ key: 'remark', label: t('warehouse.storageRent.table.remark'), width: 180 },
|
||||||
])
|
])
|
||||||
|
|
||||||
const priceHotColumns = computed(() => {
|
function defaultCalculationFormulaCode() {
|
||||||
const cols: any[] = [
|
const rows = calculationFormulaOptions.value
|
||||||
{ key: 'warehouse', label: t('warehouse.common.warehouse'), width: 130, readOnly: true },
|
const hit = rows.find((r) => r.name === '总价' || r.code === 'total')
|
||||||
{ key: 'days', label: t('warehouse.storageRent.price.days'), width: 110, readOnly: true },
|
return hit?.code || rows[0]?.code || 'total'
|
||||||
{ key: 'volume', label: t('warehouse.storageRent.price.volume'), width: 120, readOnly: true },
|
}
|
||||||
|
|
||||||
|
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 =
|
const customers =
|
||||||
formModel.customers.length > 0
|
formModel.customers.length > 0
|
||||||
@ -168,6 +246,10 @@ const priceHotColumns = computed(() => {
|
|||||||
return cols
|
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 currentLoading = computed(() => (activeTab.value === 'rate' ? listLoading.value : billLoading.value))
|
||||||
const currentRows = computed(() => (activeTab.value === 'rate' ? tableRows.value : billRows.value))
|
const currentRows = computed(() => (activeTab.value === 'rate' ? tableRows.value : billRows.value))
|
||||||
const currentColumns = computed(() => (activeTab.value === 'rate' ? hotColumns.value : billHotColumns.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>) {
|
function mapRateRow(raw: Record<string, unknown>) {
|
||||||
const row = normalizeListRow(raw)
|
const row = normalizeListRow(raw)
|
||||||
const status = Number(pickField(row, 'status', 'Status') ?? 0)
|
const status = Number(pickField(row, 'status', 'Status') ?? 0)
|
||||||
@ -258,6 +430,16 @@ async function loadCustomerGroups() {
|
|||||||
.filter((x: any) => x.code && x.name)
|
.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() {
|
async function loadRates() {
|
||||||
listLoading.value = true
|
listLoading.value = true
|
||||||
try {
|
try {
|
||||||
@ -343,6 +525,7 @@ function handlePageSizeChange(size: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resetForm() {
|
function resetForm() {
|
||||||
|
suppressFactorsWatch.value = true
|
||||||
formModel.id = 0
|
formModel.id = 0
|
||||||
formModel.rateName = ''
|
formModel.rateName = ''
|
||||||
formModel.status = 2
|
formModel.status = 2
|
||||||
@ -354,9 +537,60 @@ function resetForm() {
|
|||||||
? [customerGroupOptions.value.find((x) => x.code === 'all')!.name]
|
? [customerGroupOptions.value.find((x) => x.code === 'all')!.name]
|
||||||
: customerGroupOptions.value.map((x) => x.name)
|
: customerGroupOptions.value.map((x) => x.name)
|
||||||
priceRows.value = []
|
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) {
|
function warehouseLabel(idOrName: string) {
|
||||||
const hit = warehouseOptions.value.find((w) => String(w.id) === String(idOrName))
|
const hit = warehouseOptions.value.find((w) => String(w.id) === String(idOrName))
|
||||||
return hit?.warehouseName || idOrName
|
return hit?.warehouseName || idOrName
|
||||||
@ -372,8 +606,13 @@ function syncPriceTable(silent = false) {
|
|||||||
: customerGroupOptions.value.map((x) => x.name)
|
: customerGroupOptions.value.map((x) => x.name)
|
||||||
|
|
||||||
const oldMap = new Map(
|
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[] = []
|
const next: any[] = []
|
||||||
let seq = 1
|
let seq = 1
|
||||||
for (const wh of warehouses) {
|
for (const wh of warehouses) {
|
||||||
@ -384,9 +623,14 @@ function syncPriceTable(silent = false) {
|
|||||||
const row: any = {
|
const row: any = {
|
||||||
id: prev?.id ?? seq++,
|
id: prev?.id ?? seq++,
|
||||||
warehouseId: wh,
|
warehouseId: wh,
|
||||||
warehouse: warehouseLabel(wh),
|
factor_0: warehouseLabel(wh),
|
||||||
|
factor_1: d,
|
||||||
|
factor_2: v,
|
||||||
days: d,
|
days: d,
|
||||||
volume: v,
|
volume: v,
|
||||||
|
calculationFormula: formulaCodeToLabel(
|
||||||
|
String(prev?.calculationFormula ?? defaultFormula),
|
||||||
|
) || defaultFormula,
|
||||||
}
|
}
|
||||||
customers.forEach((name) => {
|
customers.forEach((name) => {
|
||||||
const k = `customer_${name}`
|
const k = `customer_${name}`
|
||||||
@ -397,6 +641,9 @@ function syncPriceTable(silent = false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
priceRows.value = next
|
priceRows.value = next
|
||||||
|
factorsDirty.value = false
|
||||||
|
priceSelectedCount.value = 0
|
||||||
|
lastPriceSelectedIds.value = []
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
$baseMessage(t('warehouse.storageRent.message.synced'), 'success')
|
$baseMessage(t('warehouse.storageRent.message.synced'), 'success')
|
||||||
}
|
}
|
||||||
@ -420,6 +667,7 @@ async function openCreate() {
|
|||||||
|
|
||||||
async function openEdit(row: any) {
|
async function openEdit(row: any) {
|
||||||
resetForm()
|
resetForm()
|
||||||
|
suppressFactorsWatch.value = true
|
||||||
try {
|
try {
|
||||||
const detail = await getWarehouseRentRateDetail(row.id)
|
const detail = await getWarehouseRentRateDetail(row.id)
|
||||||
const d = normalizeListRow(detail as any)
|
const d = normalizeListRow(detail as any)
|
||||||
@ -451,12 +699,16 @@ async function openEdit(row: any) {
|
|||||||
const warehouseVal = String(fv['仓库'] ?? fv.warehouse ?? '')
|
const warehouseVal = String(fv['仓库'] ?? fv.warehouse ?? '')
|
||||||
const daysVal = String(fv['天数'] ?? fv.days ?? '')
|
const daysVal = String(fv['天数'] ?? fv.days ?? '')
|
||||||
const volumeVal = String(fv['体积'] ?? fv.volume ?? '')
|
const volumeVal = String(fv['体积'] ?? fv.volume ?? '')
|
||||||
|
const formulaRaw = item.calculationFormula ?? item.CalculationFormula ?? defaultCalculationFormulaCode()
|
||||||
const rowItem: any = {
|
const rowItem: any = {
|
||||||
id: item.id ?? item.Id ?? idx + 1,
|
id: item.id ?? item.Id ?? idx + 1,
|
||||||
warehouseId: warehouseVal,
|
warehouseId: warehouseVal,
|
||||||
warehouse: warehouseLabel(warehouseVal),
|
factor_0: warehouseLabel(warehouseVal),
|
||||||
|
factor_1: daysVal,
|
||||||
|
factor_2: volumeVal,
|
||||||
days: daysVal,
|
days: daysVal,
|
||||||
volume: volumeVal,
|
volume: volumeVal,
|
||||||
|
calculationFormula: formulaCodeToLabel(String(formulaRaw)) || defaultCalculationFormulaDisplay(),
|
||||||
customerPrices: cg,
|
customerPrices: cg,
|
||||||
}
|
}
|
||||||
Object.keys(cg || {}).forEach((name) => {
|
Object.keys(cg || {}).forEach((name) => {
|
||||||
@ -466,10 +718,14 @@ async function openEdit(row: any) {
|
|||||||
})
|
})
|
||||||
priceRows.value = rows
|
priceRows.value = rows
|
||||||
if (!rows.length) syncPriceTable(true)
|
if (!rows.length) syncPriceTable(true)
|
||||||
modalTab.value = 'price'
|
factorsDirty.value = false
|
||||||
openModal()
|
openModal()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
$baseMessage(e?.message || t('warehouse.storageRent.message.loadError'), 'error')
|
$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() {
|
async function handleSave() {
|
||||||
if (!formModel.rateName.trim()) {
|
if (!formModel.rateName.trim()) {
|
||||||
$baseMessage(t('warehouse.storageRent.message.nameRequired'), 'warning')
|
$baseMessage(t('warehouse.storageRent.message.nameRequired'), 'warning')
|
||||||
modalTab.value = 'basic'
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!priceRows.value.length) {
|
if (!priceRows.value.length) {
|
||||||
@ -519,10 +774,10 @@ async function handleSave() {
|
|||||||
return {
|
return {
|
||||||
factorValuesJson: {
|
factorValuesJson: {
|
||||||
[factorLabel('warehouse')]: String(row.warehouseId ?? ''),
|
[factorLabel('warehouse')]: String(row.warehouseId ?? ''),
|
||||||
[factorLabel('days')]: String(row.days ?? ''),
|
[factorLabel('days')]: String(row.factor_1 ?? row.days ?? ''),
|
||||||
[factorLabel('volume')]: String(row.volume ?? ''),
|
[factorLabel('volume')]: String(row.factor_2 ?? row.volume ?? ''),
|
||||||
},
|
},
|
||||||
calculationFormula: 'total',
|
calculationFormula: formulaLabelToCode(String(row.calculationFormula ?? '')),
|
||||||
calculatedValue: firstPrice ?? 0,
|
calculatedValue: firstPrice ?? 0,
|
||||||
customerGroupValues,
|
customerGroupValues,
|
||||||
}
|
}
|
||||||
@ -690,13 +945,8 @@ function actionRenderer(row: any) {
|
|||||||
return activeTab.value === 'rate' ? rateActionHtml(row) : billActionHtml(row)
|
return activeTab.value === 'rate' ? rateActionHtml(row) : billActionHtml(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
function goFillPrice() {
|
|
||||||
syncPriceTable(true)
|
|
||||||
modalTab.value = 'price'
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await Promise.all([loadWarehouses(), loadCustomerGroups()])
|
await Promise.all([loadWarehouses(), loadCustomerGroups(), loadCalculationFormulas()])
|
||||||
await loadRates()
|
await loadRates()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@ -851,35 +1101,17 @@ onMounted(async () => {
|
|||||||
<ModalPro
|
<ModalPro
|
||||||
:title="modalTitle"
|
:title="modalTitle"
|
||||||
width="1180px"
|
width="1180px"
|
||||||
|
modal-class="sales-price-config-modal"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:confirm-loading="saving"
|
:confirm-loading="saving"
|
||||||
:body-style="{ overflow: 'hidden', paddingTop: '16px', paddingBottom: '12px' }"
|
:body-style="{ paddingTop: '16px', paddingBottom: '12px' }"
|
||||||
@register="registerFormModal"
|
@register="registerFormModal"
|
||||||
@ok="handleSave"
|
@ok="handleSave"
|
||||||
@cancel="closeModal"
|
@cancel="closeModal"
|
||||||
>
|
>
|
||||||
<div class="rent-modal">
|
<div class="rent-modal">
|
||||||
<div class="modal-switch">
|
<section class="rent-section rent-section-basic">
|
||||||
<button
|
<div class="section-title">{{ t('warehouse.storageRent.modal.tabBasic') }}</div>
|
||||||
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">
|
|
||||||
<a-form
|
<a-form
|
||||||
:model="formModel"
|
:model="formModel"
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
@ -898,10 +1130,24 @@ onMounted(async () => {
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item :label="t('warehouse.storageRent.table.status')">
|
<a-form-item :label="t('warehouse.storageRent.table.status')">
|
||||||
<a-radio-group v-model="formModel.status" type="button">
|
<div class="status-capsule" role="group">
|
||||||
<a-radio :value="2">{{ t('warehouse.storageRent.status.enabled') }}</a-radio>
|
<button
|
||||||
<a-radio :value="1">{{ t('warehouse.storageRent.status.disabled') }}</a-radio>
|
type="button"
|
||||||
</a-radio-group>
|
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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@ -929,100 +1175,172 @@ onMounted(async () => {
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</section>
|
||||||
|
|
||||||
<div class="billing-factors-section">
|
<section class="rent-section rent-section-factors">
|
||||||
<div class="section-head">
|
<div class="section-head">
|
||||||
<div>
|
<div>
|
||||||
<div class="section-title">{{ t('warehouse.storageRent.factors.title') }}</div>
|
<div class="section-title">{{ t('warehouse.storageRent.factors.title') }}</div>
|
||||||
<div class="section-sub">{{ t('warehouse.storageRent.factors.hint') }}</div>
|
<div class="section-sub">{{ t('warehouse.storageRent.factors.hint') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<a-button type="primary" class="app-btn-primary-soft" @click="goFillPrice">
|
</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') }}
|
{{ t('warehouse.storageRent.action.syncPrice') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</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>
|
|
||||||
</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>
|
</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">
|
<div class="price-hot-wrap">
|
||||||
<HandsontablePro
|
<PriceListHotTable
|
||||||
|
ref="priceHotRef"
|
||||||
|
:key="priceListHotTableKey"
|
||||||
:data="priceRows"
|
:data="priceRows"
|
||||||
:columns="priceHotColumns"
|
:columns="priceHotColumns"
|
||||||
:height="464"
|
:height="380"
|
||||||
:stretch-columns="true"
|
:merge-same-values="priceListMergeSame"
|
||||||
|
@selection-change="onPriceSelectionChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</ModalPro>
|
</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
|
<ModalPro
|
||||||
:title="t('warehouse.storageRent.bill.detailTitle')"
|
:title="t('warehouse.storageRent.bill.detailTitle')"
|
||||||
width="920px"
|
width="920px"
|
||||||
@ -1125,8 +1443,7 @@ onMounted(async () => {
|
|||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-switch,
|
.view-switch {
|
||||||
.modal-switch {
|
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@ -1134,8 +1451,7 @@ onMounted(async () => {
|
|||||||
gap: 2px;
|
gap: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-switch-item,
|
.view-switch-item {
|
||||||
.modal-switch-item {
|
|
||||||
border: 0;
|
border: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
height: 28px;
|
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 {
|
.table-toolbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -1190,39 +1537,30 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.rent-modal {
|
.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;
|
margin-bottom: 12px;
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 固定内容区高度,切换页签不缩动;外层不滚动,仅列表内滚动 */
|
.rent-section-factors {
|
||||||
.modal-body-fixed {
|
padding: 14px 16px 16px;
|
||||||
position: relative;
|
border: 1px solid var(--color-border-2);
|
||||||
height: 520px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
background: color-mix(in srgb, var(--app-primary-color) 4%, #fff);
|
||||||
}
|
|
||||||
|
|
||||||
.modal-pane {
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-pane--basic {
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-pane--price {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.price-hot-wrap {
|
.price-hot-wrap {
|
||||||
flex: 1;
|
height: 380px;
|
||||||
min-height: 0;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
border: 1px solid var(--color-border-2);
|
||||||
|
border-radius: 8px;
|
||||||
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-title {
|
.section-title {
|
||||||
@ -1239,21 +1577,98 @@ onMounted(async () => {
|
|||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.billing-factors-section {
|
.section-head {
|
||||||
margin-top: 4px;
|
|
||||||
padding: 14px 16px 16px;
|
|
||||||
background: #f7f8fa;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-head,
|
|
||||||
.price-toolbar {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
margin-bottom: 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;
|
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 {
|
.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 {
|
.bill-summary {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
@ -1302,3 +1725,12 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
/* 价格矩阵下拉层可溢出弹窗 */
|
||||||
|
.arco-modal.sales-price-config-modal {
|
||||||
|
.arco-modal-body {
|
||||||
|
overflow: visible !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user