refine: 工作台与订单列表密度/工具栏选中态、筛选芯片与分页弱化
All checks were successful
Build and Deploy Front / deploy (push) Successful in 11m54s
All checks were successful
Build and Deploy Front / deploy (push) Successful in 11m54s
合并管理端工作台抬头与泳道卡片,订单列表统一紧凑工具栏(情境主按钮+更多)、吸顶与选中展开,并补可清除筛选芯片。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
95c71f4c44
commit
a8d71d821d
1
src/components.d.ts
vendored
1
src/components.d.ts
vendored
@ -53,6 +53,7 @@ declare module 'vue' {
|
||||
ModalForm: typeof import('./components/ModalForm/index.vue')['default']
|
||||
ModalPro: typeof import('./components/ModalPro/index.vue')['default']
|
||||
OrderPrintModal: typeof import('./components/PrintTemplate/OrderPrintModal.vue')['default']
|
||||
OrderStatusFilterTabs: typeof import('./components/OrderStatusFilterTabs/index.vue')['default']
|
||||
PaginationPro: typeof import('./components/PaginationPro/index.vue')['default']
|
||||
PrintOptionsForm: typeof import('./components/PrintTemplate/PrintOptionsForm.vue')['default']
|
||||
PrintPdfPreview: typeof import('./components/PrintTemplate/PrintPdfPreview.vue')['default']
|
||||
|
||||
@ -47,12 +47,13 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
margin-bottom: 8px;
|
||||
background: color-mix(in srgb, var(--app-primary-color, #007979) 8%, var(--app-card-bg));
|
||||
border: 1px solid var(--color-border-2);
|
||||
border-radius: 4px;
|
||||
gap: 6px;
|
||||
padding: 6px 12px;
|
||||
margin-bottom: 0;
|
||||
background: color-mix(in srgb, var(--app-primary-color, #007979) 6%, var(--app-card-bg));
|
||||
border: none;
|
||||
border-bottom: 1px solid var(--color-border-1);
|
||||
border-radius: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
|
||||
@ -156,6 +156,8 @@
|
||||
enableHeaderFilter?: boolean;
|
||||
/** 表格上方已筛选条件条 */
|
||||
showActiveFilterBar?: boolean;
|
||||
/** 业务页额外筛选芯片(关键词/日期/状态等),与表头筛选合并展示 */
|
||||
extraActiveFilters?: ActiveFilterItem[];
|
||||
/** local=排当前页;remote=仅 emit sort-change */
|
||||
sortMode?: 'local' | 'remote';
|
||||
sortField?: string | null;
|
||||
@ -196,6 +198,7 @@
|
||||
enableHeaderSort: true,
|
||||
enableHeaderFilter: true,
|
||||
showActiveFilterBar: true,
|
||||
extraActiveFilters: () => [],
|
||||
sortMode: 'local',
|
||||
sortField: null,
|
||||
sortOrder: null,
|
||||
@ -229,6 +232,10 @@
|
||||
'sort-change': [payload: { field: string | null; order: SortOrder }];
|
||||
'filter-apply': [payload: { field: string; value: string; serverFilter: boolean }];
|
||||
'clear-filters': [];
|
||||
/** 清除业务页 extraActiveFilters 中的单项 */
|
||||
'extra-filter-clear': [key: string];
|
||||
/** 清除业务页全部 extraActiveFilters */
|
||||
'extra-filter-clear-all': [];
|
||||
/** 可编辑模式下,数据列变更写回源对象后触发 */
|
||||
'cell-change': [
|
||||
payload: {
|
||||
@ -857,7 +864,15 @@
|
||||
syncHybridHeaders();
|
||||
}
|
||||
|
||||
function isExtraActiveFilterKey(key: string) {
|
||||
return (props.extraActiveFilters || []).some((item) => item.key === key);
|
||||
}
|
||||
|
||||
function onActiveFilterClear(key: string) {
|
||||
if (isExtraActiveFilterKey(key)) {
|
||||
emit('extra-filter-clear', key);
|
||||
return;
|
||||
}
|
||||
if (key === '__sort__') {
|
||||
emit('sort-change', { field: null, order: null });
|
||||
if (props.sortMode === 'local') {
|
||||
@ -887,6 +902,9 @@
|
||||
localSortOrder.value = null;
|
||||
}
|
||||
emit('clear-filters');
|
||||
if ((props.extraActiveFilters || []).length) {
|
||||
emit('extra-filter-clear-all');
|
||||
}
|
||||
emitSearch();
|
||||
if (hotInstance) {
|
||||
hotInstance.loadData(syncDisplayRows());
|
||||
@ -896,7 +914,7 @@
|
||||
}
|
||||
|
||||
function onActiveFilterItemClick(key: string) {
|
||||
if (key === '__sort__') return;
|
||||
if (key === '__sort__' || isExtraActiveFilterKey(key)) return;
|
||||
const col = effectiveColumns.value.find((c) => resolveFilterField(c) === key);
|
||||
if (!col) return;
|
||||
nextTick(() => {
|
||||
@ -1274,6 +1292,15 @@
|
||||
|
||||
const activeFilterItems = computed<ActiveFilterItem[]>(() => {
|
||||
const items: ActiveFilterItem[] = [];
|
||||
for (const extra of props.extraActiveFilters || []) {
|
||||
if (!extra?.key || !String(extra.text || '').trim()) continue;
|
||||
items.push({
|
||||
key: extra.key,
|
||||
label: extra.label,
|
||||
text: extra.text,
|
||||
kind: extra.kind || 'filter',
|
||||
});
|
||||
}
|
||||
effectiveColumns.value.forEach((col) => {
|
||||
const field = resolveFilterField(col);
|
||||
const val = (props.searchParams as any)[field];
|
||||
|
||||
@ -70,6 +70,13 @@ export interface HandsontableProProps {
|
||||
enableHeaderFilter?: boolean;
|
||||
/** 表格上方已筛选条件条 */
|
||||
showActiveFilterBar?: boolean;
|
||||
/** 业务页额外筛选芯片(关键词/日期/状态等),与表头筛选合并展示 */
|
||||
extraActiveFilters?: Array<{
|
||||
key: string;
|
||||
label: string;
|
||||
text: string;
|
||||
kind?: 'filter' | 'sort';
|
||||
}>;
|
||||
/** local=排当前页;remote=仅 emit sort-change */
|
||||
sortMode?: SortMode;
|
||||
sortField?: string | null;
|
||||
|
||||
222
src/components/OrderStatusFilterTabs/index.vue
Normal file
222
src/components/OrderStatusFilterTabs/index.vue
Normal file
@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<div class="ost-filter" role="navigation" aria-label="订单状态">
|
||||
<SlidingTabs
|
||||
class="ost-filter__primary"
|
||||
:model-value="primaryValue"
|
||||
:items="primaryItems"
|
||||
size="mini"
|
||||
aria-label="主状态"
|
||||
@change="onSelect"
|
||||
/>
|
||||
|
||||
<a-dropdown
|
||||
trigger="click"
|
||||
position="bl"
|
||||
:popup-max-height="320"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="ost-filter__ex"
|
||||
:class="{ 'is-active': exceptionActive }"
|
||||
:aria-pressed="exceptionActive"
|
||||
>
|
||||
<span class="ost-filter__ex-label">
|
||||
{{ exceptionActive ? activeExceptionLabel : '异常' }}
|
||||
</span>
|
||||
<span v-if="exceptionTotal > 0" class="ost-filter__ex-badge">
|
||||
{{ exceptionTotal }}
|
||||
</span>
|
||||
<icon-down class="ost-filter__ex-caret" />
|
||||
</button>
|
||||
<template #content>
|
||||
<div class="ost-filter__menu">
|
||||
<button
|
||||
v-for="item in exceptionItems"
|
||||
:key="item.key"
|
||||
type="button"
|
||||
class="ost-filter__menu-item"
|
||||
:class="{ 'is-active': modelValue === item.key }"
|
||||
@click="onSelect(item.key)"
|
||||
>
|
||||
<span class="ost-filter__menu-title">{{ item.label }}</span>
|
||||
<span
|
||||
v-if="item.badge != null && item.badge !== ''"
|
||||
class="ost-filter__menu-badge"
|
||||
:class="{ 'is-zero': Number(item.badge) === 0 }"
|
||||
>
|
||||
{{ item.badge }}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { IconDown } from '@arco-design/web-vue/es/icon'
|
||||
import SlidingTabs, { type SlidingTabItem } from '@/components/SlidingTabs/index.vue'
|
||||
import { isOrderStatusTabException } from '@/constants/orderStatus'
|
||||
|
||||
defineOptions({ name: 'OrderStatusFilterTabs' })
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: string
|
||||
items: SlidingTabItem[]
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
change: [key: string]
|
||||
'update:modelValue': [key: string]
|
||||
}>()
|
||||
|
||||
const primaryItems = computed(() =>
|
||||
props.items.filter((item) => !isOrderStatusTabException(item.key)),
|
||||
)
|
||||
|
||||
const exceptionItems = computed(() =>
|
||||
props.items.filter((item) => isOrderStatusTabException(item.key)),
|
||||
)
|
||||
|
||||
const exceptionActive = computed(() => isOrderStatusTabException(props.modelValue))
|
||||
|
||||
const primaryValue = computed(() =>
|
||||
exceptionActive.value ? '' : props.modelValue,
|
||||
)
|
||||
|
||||
const activeExceptionLabel = computed(() => {
|
||||
const hit = exceptionItems.value.find((item) => item.key === props.modelValue)
|
||||
return hit?.label || '异常'
|
||||
})
|
||||
|
||||
const exceptionTotal = computed(() =>
|
||||
exceptionItems.value.reduce((sum, item) => {
|
||||
const n = Number(item.badge)
|
||||
return sum + (Number.isFinite(n) ? n : 0)
|
||||
}, 0),
|
||||
)
|
||||
|
||||
function onSelect(key: string) {
|
||||
if (!key || key === props.modelValue) return
|
||||
emit('update:modelValue', key)
|
||||
emit('change', key)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.ost-filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ost-filter__primary {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.ost-filter__ex {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
flex: 0 0 auto;
|
||||
height: 28px;
|
||||
padding: 0 10px;
|
||||
border: none;
|
||||
border-radius: 999px;
|
||||
background: rgba(26, 46, 56, 0.04);
|
||||
color: rgba(26, 46, 56, 0.62);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition:
|
||||
background 0.15s ease,
|
||||
color 0.15s ease;
|
||||
|
||||
&:hover {
|
||||
background: rgba(26, 46, 56, 0.07);
|
||||
color: #1a2e38;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
background: color-mix(in srgb, #c45c4a 12%, #fff);
|
||||
color: #c45c4a;
|
||||
}
|
||||
}
|
||||
|
||||
.ost-filter__ex-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 16px;
|
||||
height: 16px;
|
||||
padding: 0 4px;
|
||||
border-radius: 8px;
|
||||
background: rgba(196, 92, 74, 0.12);
|
||||
color: #c45c4a;
|
||||
font-size: 10px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.ost-filter__ex:not(.is-active) .ost-filter__ex-badge {
|
||||
background: rgba(26, 46, 56, 0.08);
|
||||
color: rgba(26, 46, 56, 0.55);
|
||||
}
|
||||
|
||||
.ost-filter__ex-caret {
|
||||
font-size: 12px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.ost-filter__menu {
|
||||
min-width: 168px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.ost-filter__menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
padding: 0 12px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: #1a2e38;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
|
||||
&:hover {
|
||||
background: rgba(26, 46, 56, 0.04);
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
color: #c45c4a;
|
||||
background: color-mix(in srgb, #c45c4a 8%, #fff);
|
||||
font-weight: 650;
|
||||
}
|
||||
}
|
||||
|
||||
.ost-filter__menu-badge {
|
||||
font-size: 12px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 650;
|
||||
color: rgba(26, 46, 56, 0.55);
|
||||
|
||||
&.is-zero {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.ost-filter__menu-item.is-active & {
|
||||
color: #c45c4a;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -68,6 +68,7 @@
|
||||
<div class="pager">
|
||||
<a-button
|
||||
class="pager-btn"
|
||||
size="mini"
|
||||
:disabled="props.currentPage <= 1"
|
||||
:aria-label="t('common.pagination.prev')"
|
||||
@click="handlePageChange(props.currentPage - 1)"
|
||||
@ -77,6 +78,7 @@
|
||||
<span class="current-page">{{ props.currentPage }}</span>
|
||||
<a-button
|
||||
class="pager-btn"
|
||||
size="mini"
|
||||
:disabled="props.currentPage >= maxPage"
|
||||
:aria-label="t('common.pagination.next')"
|
||||
@click="handlePageChange(props.currentPage + 1)"
|
||||
@ -87,6 +89,7 @@
|
||||
|
||||
<a-select
|
||||
:model-value="props.pageSize"
|
||||
size="mini"
|
||||
class="page-size-select"
|
||||
@update:model-value="handlePageSizeChange"
|
||||
>
|
||||
@ -95,7 +98,7 @@
|
||||
:key="size"
|
||||
:value="size"
|
||||
>
|
||||
{{ size }} {{ t('common.pagination.perPage') }}
|
||||
{{ size }}{{ t('common.pagination.perPage') }}
|
||||
</a-option>
|
||||
</a-select>
|
||||
|
||||
@ -103,11 +106,12 @@
|
||||
<span class="go-to-text">{{ t('common.pagination.goTo') }}</span>
|
||||
<a-input
|
||||
v-model="jumpPage"
|
||||
size="mini"
|
||||
class="jump-input"
|
||||
@keyup.enter="handleJumpPage"
|
||||
@blur="handleJumpPage"
|
||||
/>
|
||||
<span class="page-text">{{ t('common.pagination.page') }}</span>
|
||||
<span v-if="t('common.pagination.page')" class="page-text">{{ t('common.pagination.page') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -116,79 +120,120 @@
|
||||
.pagination-pro {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
height: 32px;
|
||||
font-size: 14px;
|
||||
gap: 8px;
|
||||
height: 28px;
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
flex-wrap: nowrap;
|
||||
color: var(--color-text-2);
|
||||
color: var(--color-text-3);
|
||||
|
||||
.total-records {
|
||||
color: var(--color-text-2);
|
||||
color: var(--color-text-3);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.pager {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.pager-btn.arco-btn {
|
||||
width: 32px;
|
||||
min-width: 32px;
|
||||
height: 32px;
|
||||
width: 24px;
|
||||
min-width: 24px;
|
||||
height: 24px;
|
||||
padding: 0 !important;
|
||||
border: none;
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
font-size: 18px;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
color: var(--color-text-2);
|
||||
color: var(--color-text-3);
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
color: var(--app-primary-color);
|
||||
background: color-mix(in srgb, var(--app-primary-color) 8%, transparent);
|
||||
color: var(--color-text-2);
|
||||
background: var(--color-fill-2);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
color: var(--color-text-4);
|
||||
}
|
||||
}
|
||||
|
||||
.current-page {
|
||||
min-width: 24px;
|
||||
height: 32px;
|
||||
padding: 0 6px;
|
||||
min-width: 20px;
|
||||
height: 24px;
|
||||
padding: 0 4px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--app-primary-color);
|
||||
font-weight: 600;
|
||||
color: var(--color-text-2);
|
||||
font-weight: 500;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.page-size-select {
|
||||
width: 118px;
|
||||
height: 32px;
|
||||
border-radius: 4px;
|
||||
width: 72px;
|
||||
|
||||
:deep(.arco-select-view-single) {
|
||||
height: 24px;
|
||||
min-height: 24px;
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
color: var(--color-text-3);
|
||||
font-size: 12px;
|
||||
padding: 0 4px;
|
||||
|
||||
&:hover {
|
||||
background: var(--color-fill-2);
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.arco-select-view-value),
|
||||
:deep(.arco-select-view-suffix) {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.jump {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.go-to-text,
|
||||
.page-text {
|
||||
color: var(--color-text-2);
|
||||
color: var(--color-text-4);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.jump-input {
|
||||
width: 48px;
|
||||
height: 32px;
|
||||
padding: 0 4px;
|
||||
border-radius: 4px;
|
||||
width: 40px;
|
||||
|
||||
:deep(.arco-input-wrapper) {
|
||||
height: 24px;
|
||||
min-height: 24px;
|
||||
padding: 0 4px;
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
border-radius: 4px;
|
||||
|
||||
&:hover,
|
||||
&.arco-input-focus {
|
||||
background: var(--color-fill-2);
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.arco-input) {
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
line-height: 30px;
|
||||
line-height: 22px;
|
||||
font-size: 12px;
|
||||
color: var(--color-text-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,8 +87,23 @@ function canScroll() {
|
||||
|
||||
function movePill(animate: boolean) {
|
||||
const pill = pillRef.value
|
||||
const tab = tabRefs.get(props.modelValue)
|
||||
if (!pill || !tab) return
|
||||
if (!pill) return
|
||||
const tab = props.modelValue ? tabRefs.get(props.modelValue) : null
|
||||
// 无选中(如异常组激活时主轨清空):收起滑块
|
||||
if (!tab) {
|
||||
if (!animate) {
|
||||
const prev = pill.style.transition
|
||||
pill.style.transition = 'none'
|
||||
pill.style.width = '0px'
|
||||
pill.style.opacity = '0'
|
||||
void pill.offsetWidth
|
||||
pill.style.transition = prev
|
||||
return
|
||||
}
|
||||
pill.style.width = '0px'
|
||||
pill.style.opacity = '0'
|
||||
return
|
||||
}
|
||||
|
||||
const left = tab.offsetLeft
|
||||
const width = tab.offsetWidth
|
||||
@ -96,6 +111,7 @@ function movePill(animate: boolean) {
|
||||
if (!animate) {
|
||||
const prev = pill.style.transition
|
||||
pill.style.transition = 'none'
|
||||
pill.style.opacity = '1'
|
||||
pill.style.transform = `translateX(${left}px)`
|
||||
pill.style.width = `${width}px`
|
||||
void pill.offsetWidth
|
||||
@ -103,6 +119,7 @@ function movePill(animate: boolean) {
|
||||
return
|
||||
}
|
||||
|
||||
pill.style.opacity = '1'
|
||||
pill.style.transform = `translateX(${left}px)`
|
||||
pill.style.width = `${width}px`
|
||||
}
|
||||
@ -348,10 +365,12 @@ defineExpose({ syncPill: () => movePill(false) })
|
||||
border-radius: 48px;
|
||||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
transition:
|
||||
transform var(--tabs-dur) var(--tabs-ease),
|
||||
width var(--tabs-dur) var(--tabs-ease);
|
||||
will-change: transform, width;
|
||||
width var(--tabs-dur) var(--tabs-ease),
|
||||
opacity calc(var(--tabs-dur) * 0.7) var(--tabs-ease);
|
||||
will-change: transform, width, opacity;
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@ -43,38 +43,44 @@
|
||||
|
||||
<div class="tab-bar-actions">
|
||||
<a-dropdown
|
||||
v-if="foldedTags.length"
|
||||
trigger="click"
|
||||
position="br"
|
||||
:popup-max-height="320"
|
||||
>
|
||||
<button type="button" class="tab-bar-action" :title="`已折叠 ${foldedTags.length} 个标签`">
|
||||
<icon-down />
|
||||
<span class="tab-bar-action__label">更多</span>
|
||||
<span class="tab-bar-action__badge">{{ foldedTags.length }}</span>
|
||||
<button
|
||||
type="button"
|
||||
class="tab-bar-action"
|
||||
:title="foldedTags.length ? `更多(已折叠 ${foldedTags.length})` : '标签操作'"
|
||||
>
|
||||
<icon-more />
|
||||
<span v-if="foldedTags.length" class="tab-bar-action__badge">
|
||||
{{ foldedTags.length }}
|
||||
</span>
|
||||
</button>
|
||||
<template #content>
|
||||
<div class="fold-menu">
|
||||
<button
|
||||
v-for="entry in foldedTags"
|
||||
:key="entry.tag.name || entry.tag.fullPath"
|
||||
type="button"
|
||||
class="fold-menu-item"
|
||||
:class="{ 'is-active': isTagActive(entry.tag) }"
|
||||
@click="gotoTag(entry.tag)"
|
||||
>
|
||||
<span class="fold-menu-item__title" :title="entry.tag.title">
|
||||
{{ entry.tag.title }}
|
||||
</span>
|
||||
<span
|
||||
class="fold-menu-item__close"
|
||||
title="关闭"
|
||||
@click.stop="closeTag(entry.tag, entry.index)"
|
||||
<template v-if="foldedTags.length">
|
||||
<button
|
||||
v-for="entry in foldedTags"
|
||||
:key="entry.tag.name || entry.tag.fullPath"
|
||||
type="button"
|
||||
class="fold-menu-item"
|
||||
:class="{ 'is-active': isTagActive(entry.tag) }"
|
||||
@click="gotoTag(entry.tag)"
|
||||
>
|
||||
<icon-close />
|
||||
</span>
|
||||
</button>
|
||||
<div class="fold-menu-divider" />
|
||||
<span class="fold-menu-item__title" :title="entry.tag.title">
|
||||
{{ entry.tag.title }}
|
||||
</span>
|
||||
<span
|
||||
class="fold-menu-item__close"
|
||||
title="关闭"
|
||||
@click.stop="closeTag(entry.tag, entry.index)"
|
||||
>
|
||||
<icon-close />
|
||||
</span>
|
||||
</button>
|
||||
<div class="fold-menu-divider" />
|
||||
</template>
|
||||
<button
|
||||
type="button"
|
||||
class="fold-menu-item fold-menu-item--action"
|
||||
@ -94,35 +100,6 @@
|
||||
</div>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
|
||||
<a-dropdown trigger="hover" position="br" :disabled="tagList.length <= 1">
|
||||
<button
|
||||
type="button"
|
||||
class="tab-bar-action tab-bar-action--icon"
|
||||
:disabled="!canCloseOthers"
|
||||
title="关闭其他"
|
||||
>
|
||||
<icon-close-circle :size="18" />
|
||||
</button>
|
||||
<template #content>
|
||||
<a-doption :disabled="!canCloseOthers" @click="closeOthers">
|
||||
关闭其他
|
||||
</a-doption>
|
||||
<a-doption :disabled="tagList.length <= 1" @click="closeAll">
|
||||
关闭全部
|
||||
</a-doption>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="tab-bar-action tab-bar-action--icon"
|
||||
:disabled="tagList.length <= 1"
|
||||
title="关闭全部标签"
|
||||
@click="closeAll"
|
||||
>
|
||||
<icon-folder-delete :size="18" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -135,10 +112,8 @@
|
||||
import {
|
||||
IconLeft,
|
||||
IconRight,
|
||||
IconDown,
|
||||
IconMore,
|
||||
IconClose,
|
||||
IconCloseCircle,
|
||||
IconFolderDelete,
|
||||
} from '@arco-design/web-vue/es/icon';
|
||||
import {
|
||||
listenerRouteChange,
|
||||
@ -411,11 +386,15 @@
|
||||
|
||||
<style lang="less" scoped>
|
||||
.tab-bar {
|
||||
--tb-ink: #1a2e38;
|
||||
--tb-muted: rgba(26, 46, 56, 0.48);
|
||||
--tb-primary: var(--app-primary-color, #1d7281);
|
||||
|
||||
position: relative;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
gap: 4px;
|
||||
/* 与菜单坞内文字起点对齐:12 + 4 + 8(logo pad) + 32(logo) + 6 ≈ 62 */
|
||||
padding: 0 12px 0 62px;
|
||||
background: transparent;
|
||||
@ -426,7 +405,7 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 20px;
|
||||
width: 24px;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
}
|
||||
@ -441,7 +420,7 @@
|
||||
}
|
||||
|
||||
&.is-overflow-right::after {
|
||||
right: 72px;
|
||||
right: 48px;
|
||||
background: linear-gradient(
|
||||
270deg,
|
||||
var(--app-page-bg, #f0f3f4) 10%,
|
||||
@ -450,18 +429,18 @@
|
||||
}
|
||||
|
||||
&.has-fold.is-overflow-right::after {
|
||||
right: 140px;
|
||||
right: 56px;
|
||||
}
|
||||
|
||||
.tab-bar-nav {
|
||||
flex-shrink: 0;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: var(--color-text-4);
|
||||
color: var(--tb-muted);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -470,8 +449,8 @@
|
||||
transition: background-color 0.15s ease, color 0.15s ease;
|
||||
|
||||
&:hover {
|
||||
color: var(--color-text-2);
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
color: var(--tb-ink);
|
||||
background: rgba(26, 46, 56, 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
@ -494,53 +473,123 @@
|
||||
.tags-wrap {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: stretch;
|
||||
width: max-content;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
gap: 4px;
|
||||
gap: 0;
|
||||
|
||||
:deep(.arco-tag) {
|
||||
:deep(.arco-tag.tab-item-tag) {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-right: 0;
|
||||
gap: 0;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
border-radius: 8px;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
padding: 0 8px;
|
||||
font-size: 8px; /* 未选中:小 */
|
||||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
color: var(--color-text-3);
|
||||
box-shadow: none;
|
||||
transition:
|
||||
background-color 0.15s ease,
|
||||
color 0.15s ease,
|
||||
border-color 0.15s ease;
|
||||
height: auto;
|
||||
min-height: 100%;
|
||||
line-height: 1;
|
||||
padding: 0 28px 0 14px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
background: transparent !important;
|
||||
color: var(--tb-muted);
|
||||
box-shadow: none !important;
|
||||
transition: color 0.15s ease;
|
||||
|
||||
.tag-link {
|
||||
max-width: 148px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: grab;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
|
||||
&.sortable-ghost {
|
||||
opacity: 0.4;
|
||||
opacity: 0.35;
|
||||
}
|
||||
|
||||
&.sortable-drag {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
/* 关闭固定占位,只改透明度,避免 hover 挤宽抖动 */
|
||||
.arco-tag-close-btn {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 8px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 0;
|
||||
border-radius: 4px;
|
||||
color: var(--tb-muted);
|
||||
opacity: 0;
|
||||
transform: translateY(-50%);
|
||||
transition:
|
||||
opacity 0.12s ease,
|
||||
background-color 0.12s ease,
|
||||
color 0.12s ease;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
right: 12px;
|
||||
bottom: 0;
|
||||
height: 2px;
|
||||
border-radius: 2px 2px 0 0;
|
||||
background: transparent;
|
||||
transition: background-color 0.15s ease;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--tb-ink);
|
||||
|
||||
.arco-tag-close-btn {
|
||||
display: none;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.link-activated):hover {
|
||||
background-color: rgba(0, 0, 0, 0.04);
|
||||
border-color: transparent;
|
||||
color: var(--color-text-1);
|
||||
&.is-home {
|
||||
padding-right: 14px;
|
||||
|
||||
.arco-tag-close-btn {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.link-activated {
|
||||
color: var(--tb-primary) !important;
|
||||
font-weight: 650;
|
||||
|
||||
.tag-link {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
&::after {
|
||||
background: var(--tb-primary);
|
||||
}
|
||||
|
||||
.arco-tag-close-btn {
|
||||
opacity: 0.72;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
color: var(--tb-ink);
|
||||
background: rgba(26, 46, 56, 0.06);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover .arco-tag-close-btn {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -550,10 +599,8 @@
|
||||
flex-shrink: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-left: auto;
|
||||
padding-left: 6px;
|
||||
border-left: none;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.tab-bar-action {
|
||||
@ -561,20 +608,20 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
height: 24px;
|
||||
min-width: 24px;
|
||||
height: 26px;
|
||||
min-width: 26px;
|
||||
padding: 0 6px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: var(--color-text-3);
|
||||
color: var(--tb-muted);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.15s ease, color 0.15s ease;
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
color: var(--color-text-1);
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
color: var(--tb-ink);
|
||||
background: rgba(26, 46, 56, 0.05);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
@ -582,27 +629,13 @@
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
&--icon {
|
||||
padding: 0;
|
||||
width: 24px;
|
||||
|
||||
:deep(svg) {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
&__label {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
&__badge {
|
||||
min-width: 16px;
|
||||
height: 16px;
|
||||
padding: 0 4px;
|
||||
border-radius: 8px;
|
||||
background: var(--color-fill-3);
|
||||
color: var(--color-text-2);
|
||||
background: rgba(26, 46, 56, 0.08);
|
||||
color: rgba(26, 46, 56, 0.65);
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
|
||||
@ -5,24 +5,23 @@
|
||||
@select="actionSelect"
|
||||
>
|
||||
<span
|
||||
:class="{ 'link-activated': isActive }"
|
||||
:class="{
|
||||
'link-activated': isActive,
|
||||
'is-home': index === 0,
|
||||
}"
|
||||
class="arco-tag arco-tag-size-medium arco-tag-checked tab-item-tag"
|
||||
:title="isActive ? `${itemData.title}(双击刷新)` : itemData.title"
|
||||
@click="goto(itemData)"
|
||||
@dblclick.prevent="onDblRefresh"
|
||||
@mousedown.middle.prevent="onMiddleClose"
|
||||
>
|
||||
<span
|
||||
v-if="isActive"
|
||||
class="arco-icon-hover arco-tag-icon-hover arco-icon-hover-size-medium arco-tag-refresh-btn"
|
||||
@click.stop="handleRefresh"
|
||||
title="刷新当前页面"
|
||||
>
|
||||
<icon-refresh />
|
||||
</span>
|
||||
<span class="tag-link">
|
||||
{{ itemData.title }}
|
||||
</span>
|
||||
<span
|
||||
v-if="index !== 0"
|
||||
class="arco-icon-hover arco-tag-icon-hover arco-icon-hover-size-medium arco-tag-close-btn"
|
||||
title="关闭"
|
||||
@click.stop="tagClose(itemData, index)"
|
||||
>
|
||||
<icon-close />
|
||||
@ -193,7 +192,7 @@
|
||||
stripEphemeralQuery(route.fullPath),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 刷新当前页:必须串行「剔缓存 → 等卸载 → bump key → 再入缓存」。
|
||||
* 旧实现同帧 deleteCache + bump + setTimeout 回填,会与 Dropdown ResizeObserver
|
||||
@ -227,14 +226,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新当前标签页
|
||||
const handleRefresh = async (e: Event) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
/** 双击当前激活页签刷新(替代页签内刷新按钮,避免宽度抖动) */
|
||||
const onDblRefresh = async () => {
|
||||
if (!isActive.value) return;
|
||||
await reloadActiveTab(props.itemData, props.index);
|
||||
};
|
||||
|
||||
|
||||
const actionSelect = async (value: any) => {
|
||||
const { itemData, index } = props;
|
||||
const copyTagList = [...tagList.value];
|
||||
@ -281,59 +278,6 @@
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.link-activated {
|
||||
/* 无色底:主色字 + 中等字重 */
|
||||
background-color: transparent !important;
|
||||
border-radius: 8px !important;
|
||||
color: var(--app-primary-color, #054f74) !important;
|
||||
padding: 0 8px !important;
|
||||
height: 24px !important;
|
||||
line-height: 24px !important;
|
||||
border: 1px solid transparent !important;
|
||||
box-shadow: none;
|
||||
transition:
|
||||
background-color 0.15s ease,
|
||||
border-color 0.15s ease,
|
||||
color 0.15s ease;
|
||||
|
||||
.tag-link {
|
||||
color: var(--app-primary-color, #054f74) !important;
|
||||
font-weight: 500;
|
||||
font-size: 13px; /* 选中:大 */
|
||||
}
|
||||
|
||||
:deep(.arco-tag-close-btn),
|
||||
:deep(.arco-tag-refresh-btn) {
|
||||
color: var(--color-text-3, #86909c) !important;
|
||||
|
||||
&:hover {
|
||||
color: var(--color-text-1, #1d2129) !important;
|
||||
background-color: rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
}
|
||||
|
||||
/* 刷新仅在悬停时出现,减少常显噪音 */
|
||||
:deep(.arco-tag-refresh-btn) {
|
||||
width: 0;
|
||||
margin-right: 0;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
transition: width 0.12s ease, opacity 0.12s ease, margin 0.12s ease;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(0, 0, 0, 0.04) !important;
|
||||
border-color: transparent !important;
|
||||
box-shadow: none;
|
||||
|
||||
:deep(.arco-tag-refresh-btn) {
|
||||
width: 16px;
|
||||
margin-right: 4px;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.arco-dropdown-option-content) {
|
||||
span {
|
||||
margin-left: 10px;
|
||||
@ -345,20 +289,10 @@
|
||||
color: rgb(var(--danger-6));
|
||||
}
|
||||
|
||||
.arco-tag-close-btn,
|
||||
.arco-tag-refresh-btn {
|
||||
.arco-tag-close-btn {
|
||||
color: rgb(var(--danger-6));
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.arco-tag-refresh-btn) {
|
||||
margin-left: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sperate-line {
|
||||
border-bottom: 1px solid var(--color-neutral-3);
|
||||
|
||||
@ -1372,9 +1372,9 @@ onUnmounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@headerInsetTop: 6px;
|
||||
@headerBarHeight: 52px;
|
||||
@headerHeight: (@headerInsetTop + @headerBarHeight); // 58:容纳 44px 菜单坞
|
||||
@headerInsetTop: 4px;
|
||||
@headerBarHeight: 48px;
|
||||
@headerHeight: (@headerInsetTop + @headerBarHeight); // 52:菜单坞 44 + 余量
|
||||
@headerTabNavHeight: 28px;
|
||||
|
||||
.top-nav {
|
||||
@ -1764,9 +1764,9 @@ onUnmounted(() => {
|
||||
|
||||
.top-nav-tabs {
|
||||
height: @headerTabNavHeight;
|
||||
/* 与顶栏/页面同色,去掉分隔线,页签像浮在同一块底上 */
|
||||
background: transparent;
|
||||
border-bottom: none;
|
||||
border-bottom: 1px dashed rgba(26, 46, 56, 0.14);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -243,6 +243,22 @@ export const ORDER_STATUS_TABS: OrderStatusMeta[] = [
|
||||
})),
|
||||
]
|
||||
|
||||
/** 列表状态过滤器:收进「异常」组的次级状态 */
|
||||
export const ORDER_STATUS_TAB_EXCEPTION_KEYS = [
|
||||
'deliveryFailed',
|
||||
'deleted',
|
||||
'problematic',
|
||||
'claimed',
|
||||
] as const
|
||||
|
||||
export type OrderStatusTabExceptionKey = (typeof ORDER_STATUS_TAB_EXCEPTION_KEYS)[number]
|
||||
|
||||
const ORDER_STATUS_TAB_EXCEPTION_SET = new Set<string>(ORDER_STATUS_TAB_EXCEPTION_KEYS)
|
||||
|
||||
export function isOrderStatusTabException(key: string): boolean {
|
||||
return ORDER_STATUS_TAB_EXCEPTION_SET.has(key)
|
||||
}
|
||||
|
||||
export function resolveOrderStatusCode(row?: {
|
||||
status?: string
|
||||
Status?: string
|
||||
|
||||
@ -84,8 +84,8 @@
|
||||
|
||||
// 仅运营端需要为 fixed 顶栏留白
|
||||
const adminContentStyle = computed(() => {
|
||||
// 与 top-nav:上边距 6 + 栏高 52(+ 页签 28)对齐
|
||||
const headerHeight = 58;
|
||||
// 与 top-nav:上边距 4 + 栏高 48(+ 页签 28)对齐
|
||||
const headerHeight = 52;
|
||||
const tabNavHeight = appStore.tabBar ? 28 : 0;
|
||||
return { paddingTop: `${headerHeight + tabNavHeight}px` };
|
||||
});
|
||||
@ -153,6 +153,8 @@
|
||||
flex-shrink: 0;
|
||||
height: 28px;
|
||||
background: transparent;
|
||||
border-bottom: 1px dashed rgba(26, 46, 56, 0.14);
|
||||
box-sizing: border-box;
|
||||
|
||||
:deep(.tab-bar) {
|
||||
padding-left: 16px;
|
||||
|
||||
@ -8,13 +8,16 @@
|
||||
>
|
||||
<AppMascotState mode="loading" description="页面加载中…" />
|
||||
</div>
|
||||
<keep-alive :include="cacheList" :max="keepAliveMax">
|
||||
<component
|
||||
:is="Component"
|
||||
v-if="Component && canMountPage(viewRoute)"
|
||||
:key="getComponentKey(viewRoute)"
|
||||
/>
|
||||
</keep-alive>
|
||||
<!-- 仅透明度交叉淡入:不用位移/out-in,避免整页高度塌陷抖动 -->
|
||||
<Transition name="page-fade">
|
||||
<keep-alive :include="cacheList" :max="keepAliveMax">
|
||||
<component
|
||||
:is="Component"
|
||||
v-if="Component && canMountPage(viewRoute)"
|
||||
:key="getComponentKey(viewRoute)"
|
||||
/>
|
||||
</keep-alive>
|
||||
</Transition>
|
||||
</router-view>
|
||||
</div>
|
||||
</template>
|
||||
@ -112,6 +115,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.page-layout-root :deep(> *:not(.page-route-shell)) {
|
||||
@ -128,4 +132,22 @@
|
||||
justify-content: center;
|
||||
background: var(--app-page-bg, #f0f3f4);
|
||||
}
|
||||
|
||||
.page-fade-enter-active,
|
||||
.page-fade-leave-active {
|
||||
transition: opacity 0.16s ease;
|
||||
}
|
||||
|
||||
.page-fade-leave-active {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.page-fade-enter-from,
|
||||
.page-fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -46,12 +46,12 @@ export default {
|
||||
'common.importFailed': 'Import failed',
|
||||
'common.operationFailed': 'Operation failed',
|
||||
'pagination.pageExceeded': 'Page number exceeds maximum limit, automatically jumped to page {max}',
|
||||
'common.pagination.total': 'Total {count} records',
|
||||
'common.pagination.total': '{count} total',
|
||||
'common.pagination.prev': 'Previous',
|
||||
'common.pagination.next': 'Next',
|
||||
'common.pagination.perPage': 'per page',
|
||||
'common.pagination.goTo': 'Go to',
|
||||
'common.pagination.page': 'page',
|
||||
'common.pagination.perPage': '/pg',
|
||||
'common.pagination.goTo': 'Go',
|
||||
'common.pagination.page': '',
|
||||
|
||||
// Menus (keep existing demo keys)
|
||||
'menu.home': 'Home',
|
||||
@ -2522,7 +2522,7 @@ export default {
|
||||
'order.myOrders.status.problematic': 'Problematic',
|
||||
'order.myOrders.status.claimed': 'Claim Item',
|
||||
|
||||
'order.myOrders.selectedCount': 'Selected {count} items',
|
||||
'order.myOrders.selectedCount': '{count} selected',
|
||||
|
||||
'order.myOrders.drawer.title': 'Order Detail',
|
||||
'order.myOrders.drawer.tabs.basic': 'Order Detail',
|
||||
|
||||
@ -46,11 +46,11 @@ export default {
|
||||
'common.importFailed': '导入失败',
|
||||
'common.operationFailed': '操作失败',
|
||||
'pagination.pageExceeded': '页码超出最大限制,已自动跳转到第 {max} 页',
|
||||
'common.pagination.total': '共 {count} 条记录',
|
||||
'common.pagination.total': '共 {count}',
|
||||
'common.pagination.prev': '上一页',
|
||||
'common.pagination.next': '下一页',
|
||||
'common.pagination.perPage': '条/页',
|
||||
'common.pagination.goTo': '前往',
|
||||
'common.pagination.perPage': '/页',
|
||||
'common.pagination.goTo': '至',
|
||||
'common.pagination.page': '页',
|
||||
|
||||
// 菜单(示例 / 保留原有)
|
||||
@ -923,7 +923,7 @@ export default {
|
||||
'order.pickupOrder.actions.confirmFreight': '确认运费',
|
||||
'order.pickupOrder.actions.pay': '支付揽收费',
|
||||
'order.pickupOrder.actions.batchPay': '批量支付',
|
||||
'order.pickupOrder.selectedCount': '已选 {count} 条',
|
||||
'order.pickupOrder.selectedCount': '已选 {count}',
|
||||
'order.pickupOrder.actions.schedule': '预约下发',
|
||||
'order.pickupOrder.actions.draftForecast': '草稿预报',
|
||||
'order.pickupOrder.actions.rebind': '改绑订单',
|
||||
@ -2322,7 +2322,7 @@ export default {
|
||||
'order.myOrders.status.problematic': '问题件',
|
||||
'order.myOrders.status.claimed': '理赔件',
|
||||
|
||||
'order.myOrders.selectedCount': '已选中{count}条',
|
||||
'order.myOrders.selectedCount': '已选 {count}',
|
||||
|
||||
'order.myOrders.drawer.title': '订单详情',
|
||||
'order.myOrders.drawer.tabs.basic': '订单详情',
|
||||
|
||||
@ -613,11 +613,10 @@ const router = createRouter({
|
||||
REDIRECT_MAIN,
|
||||
NOT_FOUND_ROUTE,
|
||||
],
|
||||
// 多页签 keep-alive:禁止切页强制滚顶,避免主区「抖一下」
|
||||
scrollBehavior(to) {
|
||||
if (to.path === '/' && to.hash) {
|
||||
return false;
|
||||
}
|
||||
return { top: 0 };
|
||||
if (to.hash) return false;
|
||||
return false;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -155,18 +155,18 @@
|
||||
.toolbar-buttons,
|
||||
.table-buttons,
|
||||
.channel-config-right-panel .toolbar-actions {
|
||||
> .arco-btn-primary:not(.btn-add):not(.app-btn-primary-soft):not(.arco-btn-text),
|
||||
.arco-space > .arco-btn-primary:not(.btn-add):not(.app-btn-primary-soft):not(.arco-btn-text),
|
||||
.arco-btn-primary:not(.btn-add):not(.app-btn-primary-soft):not(.app-btn-search):not(.app-btn-reset):not(.arco-btn-text),
|
||||
.arco-btn-status-warning:not(.btn-add):not(.app-btn-primary-soft):not(.arco-btn-text) {
|
||||
> .arco-btn-primary:not(.btn-add):not(.app-btn-primary-soft):not(.arco-btn-text):not(.toolbar-cta),
|
||||
.arco-space > .arco-btn-primary:not(.btn-add):not(.app-btn-primary-soft):not(.arco-btn-text):not(.toolbar-cta),
|
||||
.arco-btn-primary:not(.btn-add):not(.app-btn-primary-soft):not(.app-btn-search):not(.app-btn-reset):not(.arco-btn-text):not(.toolbar-cta),
|
||||
.arco-btn-status-warning:not(.btn-add):not(.app-btn-primary-soft):not(.arco-btn-text):not(.toolbar-cta) {
|
||||
.app-btn-toolbar-styles();
|
||||
}
|
||||
}
|
||||
|
||||
.table-toolbar,
|
||||
.list-toolbar {
|
||||
.actions-right > .arco-btn:not(.btn-add):not(.app-btn-primary-soft):not(.arco-btn-text),
|
||||
.actions-right .arco-dropdown .arco-btn:not(.btn-add):not(.app-btn-primary-soft),
|
||||
.actions-right > .arco-btn:not(.btn-add):not(.app-btn-primary-soft):not(.arco-btn-text):not(.toolbar-cta),
|
||||
.actions-right .arco-dropdown .arco-btn:not(.btn-add):not(.app-btn-primary-soft):not(.toolbar-cta),
|
||||
.toolbar-left > .arco-space .arco-btn:not(.btn-add):not(.app-btn-primary-soft):not(.app-btn-search):not(.app-btn-reset),
|
||||
.actions-right .column-config-controls .arco-btn:not(.btn-add):not(.app-btn-primary-soft) {
|
||||
&:not(.arco-btn-text):not(.column-config-btn) {
|
||||
@ -176,6 +176,168 @@
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表工具栏吸顶:钉在表体上方(flex 页不随 HOT 滚;有页面滚动时 sticky 生效)
|
||||
*/
|
||||
.table-section > .table-toolbar,
|
||||
.warehouse-list-page-card > .table-toolbar,
|
||||
.list-toolbar.is-sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 20;
|
||||
flex-shrink: 0;
|
||||
background: var(--app-card-bg);
|
||||
padding: 8px 12px;
|
||||
margin-bottom: 0;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表批量操作区:选中态感知(Linear / 飞书式)
|
||||
* - 未选:仅芯片 + 主 CTA + 更多;次要动作折叠
|
||||
* - 已选:实心 CTA 点亮 + 次要动作展开
|
||||
*/
|
||||
.table-toolbar .actions-right,
|
||||
.list-toolbar .actions-right {
|
||||
.selected-count {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 24px;
|
||||
padding: 0 8px;
|
||||
margin-right: 4px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
line-height: 24px;
|
||||
color: var(--color-text-4);
|
||||
background: transparent;
|
||||
transition: color 0.15s ease, background 0.15s ease;
|
||||
|
||||
.count-number {
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 600;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
&.has-selection {
|
||||
color: var(--app-primary-color);
|
||||
background: var(--app-primary-color-light);
|
||||
|
||||
.count-number {
|
||||
color: inherit;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .arco-btn.toolbar-cta,
|
||||
.arco-dropdown .arco-btn.toolbar-cta {
|
||||
height: 28px;
|
||||
padding: 0 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
line-height: 26px;
|
||||
box-shadow: none !important;
|
||||
transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
|
||||
|
||||
/* 未选中:浅主色,保持可识别但未激活 */
|
||||
color: var(--app-primary-color) !important;
|
||||
background-color: var(--app-primary-color-light) !important;
|
||||
border: 1px solid color-mix(in srgb, var(--app-primary-color) 18%, transparent) !important;
|
||||
|
||||
&:hover:not(:disabled),
|
||||
&:focus:not(:disabled) {
|
||||
color: var(--app-primary-color-hover) !important;
|
||||
background-color: color-mix(in srgb, var(--app-primary-color) 16%, #fff) !important;
|
||||
border-color: color-mix(in srgb, var(--app-primary-color) 28%, transparent) !important;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.55;
|
||||
color: var(--app-primary-color) !important;
|
||||
background-color: var(--app-primary-color-light) !important;
|
||||
border-color: color-mix(in srgb, var(--app-primary-color) 12%, transparent) !important;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
&.has-selection {
|
||||
> .arco-btn.toolbar-cta,
|
||||
.arco-dropdown .arco-btn.toolbar-cta {
|
||||
color: #fff !important;
|
||||
background-color: var(--app-primary-color) !important;
|
||||
border-color: var(--app-primary-color) !important;
|
||||
|
||||
&:hover:not(:disabled),
|
||||
&:focus:not(:disabled) {
|
||||
color: #fff !important;
|
||||
background-color: var(--app-primary-color-hover) !important;
|
||||
border-color: var(--app-primary-color-hover) !important;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.7;
|
||||
color: #fff !important;
|
||||
background-color: var(--app-primary-color) !important;
|
||||
border-color: var(--app-primary-color) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 次要操作:选中后展开 */
|
||||
.toolbar-secondary {
|
||||
display: grid;
|
||||
grid-template-columns: 0fr;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition:
|
||||
grid-template-columns 0.22s ease,
|
||||
opacity 0.16s ease;
|
||||
}
|
||||
|
||||
.toolbar-secondary__inner {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
&.has-selection .toolbar-secondary {
|
||||
grid-template-columns: 1fr;
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.toolbar-secondary .arco-btn.app-btn-toolbar:not(.toolbar-cta),
|
||||
.toolbar-secondary .arco-dropdown .arco-btn.app-btn-toolbar:not(.toolbar-cta),
|
||||
> .arco-btn.app-btn-toolbar:not(.toolbar-cta),
|
||||
.arco-dropdown .arco-btn.app-btn-toolbar:not(.toolbar-cta) {
|
||||
height: 28px;
|
||||
padding: 0 10px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
line-height: 26px;
|
||||
color: var(--color-text-1) !important;
|
||||
background: var(--color-bg-2) !important;
|
||||
border: 1px solid var(--color-border-2) !important;
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
color: var(--color-text-1) !important;
|
||||
background: var(--color-fill-2) !important;
|
||||
border-color: var(--color-border-3) !important;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.5;
|
||||
color: var(--color-text-3) !important;
|
||||
background: transparent !important;
|
||||
border-color: var(--color-border-1) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-page-toolbar-zones();
|
||||
|
||||
/* 订单详情抽屉(我的订单 / 运单管理):按钮与列表查询区一致 */
|
||||
|
||||
@ -27,20 +27,17 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 10px 16px;
|
||||
gap: 12px;
|
||||
padding: 6px 12px;
|
||||
flex-shrink: 0;
|
||||
border-bottom: 1px solid var(--color-border-2);
|
||||
}
|
||||
|
||||
.warehouse-list-page-card .table-toolbar {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 12px 16px 0;
|
||||
margin-bottom: 12px;
|
||||
flex-shrink: 0;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
|
||||
362
src/views/home/workplace/biz-ops/BizOpsToolbar.vue
Normal file
362
src/views/home/workplace/biz-ops/BizOpsToolbar.vue
Normal file
@ -0,0 +1,362 @@
|
||||
<template>
|
||||
<div class="biz-ops-toolbar">
|
||||
<div class="biz-ops-toolbar__filters">
|
||||
<WorkplaceSegmented
|
||||
:model-value="range"
|
||||
variant="pill"
|
||||
compact
|
||||
aria-label="时间范围"
|
||||
:options="rangeOptions"
|
||||
@update:model-value="emit('update:range', $event)"
|
||||
/>
|
||||
<WorkplaceSegmented
|
||||
:model-value="laneDim"
|
||||
variant="pill"
|
||||
compact
|
||||
aria-label="线路维度"
|
||||
:options="laneDimOptions"
|
||||
@update:model-value="emit('update:laneDim', $event)"
|
||||
/>
|
||||
<WorkplaceSegmented
|
||||
:model-value="latencyMode"
|
||||
variant="pill"
|
||||
compact
|
||||
aria-label="时效口径"
|
||||
:options="latencyModeOptions"
|
||||
@update:model-value="emit('update:latencyMode', $event)"
|
||||
/>
|
||||
|
||||
<a-popover
|
||||
v-model:popup-visible="thresholdOpen"
|
||||
trigger="click"
|
||||
position="bl"
|
||||
:content-style="{ padding: 0 }"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="biz-ops-toolbar__threshold"
|
||||
:class="{ 'is-open': thresholdOpen }"
|
||||
aria-haspopup="dialog"
|
||||
:aria-expanded="thresholdOpen"
|
||||
>
|
||||
<span class="biz-ops-toolbar__threshold-label">阈值</span>
|
||||
<span class="biz-ops-toolbar__threshold-summary">
|
||||
≥{{ draftFailDays }}d · <{{ draftMarginPct }}%
|
||||
</span>
|
||||
</button>
|
||||
<template #content>
|
||||
<div class="biz-ops-toolbar__panel" role="dialog" aria-label="预警阈值">
|
||||
<header class="biz-ops-toolbar__panel-head">
|
||||
<strong>预警阈值</strong>
|
||||
<span>用于线路告警筛选</span>
|
||||
</header>
|
||||
<div class="biz-ops-toolbar__panel-body">
|
||||
<label class="biz-ops-toolbar__field">
|
||||
<span class="biz-ops-toolbar__field-label">失败时效 ≥</span>
|
||||
<div class="biz-ops-toolbar__field-control">
|
||||
<input
|
||||
:value="draftFailDays"
|
||||
type="number"
|
||||
min="1"
|
||||
max="90"
|
||||
step="0.5"
|
||||
@input="onFailDays"
|
||||
/>
|
||||
<span>天</span>
|
||||
</div>
|
||||
</label>
|
||||
<label class="biz-ops-toolbar__field">
|
||||
<span class="biz-ops-toolbar__field-label">毛利率 <</span>
|
||||
<div class="biz-ops-toolbar__field-control">
|
||||
<input
|
||||
:value="draftMarginPct"
|
||||
type="number"
|
||||
min="1"
|
||||
max="90"
|
||||
step="1"
|
||||
@input="onMarginPct"
|
||||
/>
|
||||
<span>%</span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<footer class="biz-ops-toolbar__panel-foot">
|
||||
<button
|
||||
type="button"
|
||||
class="biz-ops-toolbar__ghost"
|
||||
@click="thresholdOpen = false"
|
||||
>
|
||||
取消
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="biz-ops-toolbar__primary"
|
||||
@click="onApply"
|
||||
>
|
||||
应用
|
||||
</button>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
</a-popover>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="biz-ops-toolbar__ghost"
|
||||
:disabled="loading"
|
||||
@click="emit('refresh')"
|
||||
>
|
||||
刷新
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import WorkplaceSegmented from '../components/WorkplaceSegmented.vue'
|
||||
import type { LaneDim, LatencyMode, RangeKey } from './types'
|
||||
|
||||
defineOptions({ name: 'BizOpsToolbar' })
|
||||
|
||||
defineProps<{
|
||||
range: RangeKey | string
|
||||
laneDim: LaneDim | string
|
||||
latencyMode: LatencyMode | string
|
||||
draftFailDays: number
|
||||
draftMarginPct: number
|
||||
loading?: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:range': [value: string]
|
||||
'update:laneDim': [value: string]
|
||||
'update:latencyMode': [value: string]
|
||||
'update:draftFailDays': [value: number]
|
||||
'update:draftMarginPct': [value: number]
|
||||
apply: []
|
||||
refresh: []
|
||||
}>()
|
||||
|
||||
const thresholdOpen = ref(false)
|
||||
|
||||
const rangeOptions = [
|
||||
{ value: '7', label: '7天' },
|
||||
{ value: '30', label: '30天' },
|
||||
{ value: '90', label: '90天' },
|
||||
]
|
||||
|
||||
const laneDimOptions = [
|
||||
{ value: 'product', label: '产品线路' },
|
||||
{ value: 'country', label: '国家线路' },
|
||||
]
|
||||
|
||||
const latencyModeOptions = [
|
||||
{ value: 'success', label: '成功时效' },
|
||||
{ value: 'fail', label: '失败时效' },
|
||||
]
|
||||
|
||||
function onFailDays(e: Event) {
|
||||
emit('update:draftFailDays', Number((e.target as HTMLInputElement).value))
|
||||
}
|
||||
|
||||
function onMarginPct(e: Event) {
|
||||
emit('update:draftMarginPct', Number((e.target as HTMLInputElement).value))
|
||||
}
|
||||
|
||||
function onApply() {
|
||||
emit('apply')
|
||||
thresholdOpen.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.biz-ops-toolbar {
|
||||
--biz-ink: #1a2e38;
|
||||
--biz-muted: rgba(26, 46, 56, 0.48);
|
||||
--biz-line: rgba(26, 46, 56, 0.08);
|
||||
--biz-primary: var(--app-primary-color, #1d7281);
|
||||
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
color: var(--biz-ink);
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__filters {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__threshold {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
padding: 0 10px 0 12px;
|
||||
border: none;
|
||||
border-radius: 999px;
|
||||
background: #f3f5f7;
|
||||
box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
|
||||
color: var(--biz-muted);
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background 0.15s ease,
|
||||
color 0.15s ease,
|
||||
box-shadow 0.15s ease;
|
||||
|
||||
&:hover,
|
||||
&.is-open {
|
||||
color: var(--biz-primary);
|
||||
background: color-mix(in srgb, var(--biz-primary) 8%, #fff);
|
||||
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--biz-primary) 22%, transparent);
|
||||
}
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__threshold-label {
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__threshold-summary {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: 0.01em;
|
||||
color: rgba(26, 46, 56, 0.55);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__panel {
|
||||
width: 260px;
|
||||
padding: 12px;
|
||||
color: var(--biz-ink);
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__panel-head {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
margin-bottom: 12px;
|
||||
|
||||
strong {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 11px;
|
||||
color: var(--biz-muted);
|
||||
}
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__panel-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__field {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__field-label {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: rgba(26, 46, 56, 0.72);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__field-control {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
|
||||
input {
|
||||
width: 64px;
|
||||
height: 28px;
|
||||
border: 1px solid var(--biz-line);
|
||||
border-radius: 8px;
|
||||
padding: 0 8px;
|
||||
background: #fff;
|
||||
color: var(--biz-ink);
|
||||
font-size: 13px;
|
||||
font-weight: 650;
|
||||
font-variant-numeric: tabular-nums;
|
||||
text-align: center;
|
||||
outline: none;
|
||||
|
||||
&:focus {
|
||||
border-color: color-mix(in srgb, var(--biz-primary) 45%, transparent);
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 12px;
|
||||
color: var(--biz-muted);
|
||||
}
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__panel-foot {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__ghost {
|
||||
height: 28px;
|
||||
padding: 0 12px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--biz-line);
|
||||
background: #fff;
|
||||
color: rgba(26, 46, 56, 0.72);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
border-color: rgba(29, 114, 129, 0.35);
|
||||
color: var(--biz-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.biz-ops-toolbar__primary {
|
||||
height: 28px;
|
||||
padding: 0 14px;
|
||||
border-radius: 999px;
|
||||
border: none;
|
||||
background: var(--biz-primary);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.biz-ops-toolbar {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<div ref="rootRef" class="biz-ops">
|
||||
<header class="biz-ops__bar">
|
||||
<div class="biz-ops__brand">
|
||||
<div ref="rootRef" class="biz-ops" :class="{ 'biz-ops--unified': hasIdentitySlot }">
|
||||
<header class="biz-ops__bar" :class="{ 'biz-ops__bar--unified': hasIdentitySlot }">
|
||||
<div v-if="hasIdentitySlot" class="biz-ops__lede">
|
||||
<slot
|
||||
name="identity"
|
||||
:loading="loading"
|
||||
:error="error"
|
||||
/>
|
||||
</div>
|
||||
<div v-else class="biz-ops__brand">
|
||||
<h1>地图经营驾驶舱</h1>
|
||||
<span v-if="loading" class="biz-ops__status">加载中</span>
|
||||
<span
|
||||
@ -14,56 +21,21 @@
|
||||
<span v-else class="biz-ops__status is-ok">实时</span>
|
||||
</div>
|
||||
|
||||
<div class="biz-ops__bar-main">
|
||||
<WorkplaceSegmented
|
||||
v-model="range"
|
||||
variant="pill"
|
||||
:compact="false"
|
||||
aria-label="时间范围"
|
||||
:options="rangeOptions"
|
||||
/>
|
||||
<WorkplaceSegmented
|
||||
v-model="laneDim"
|
||||
variant="pill"
|
||||
:compact="false"
|
||||
aria-label="线路维度"
|
||||
:options="laneDimOptions"
|
||||
/>
|
||||
<WorkplaceSegmented
|
||||
v-model="latencyMode"
|
||||
variant="pill"
|
||||
:compact="false"
|
||||
aria-label="时效口径"
|
||||
:options="latencyModeOptions"
|
||||
<div class="biz-ops__tools">
|
||||
<BizOpsToolbar
|
||||
v-model:range="range"
|
||||
v-model:lane-dim="laneDim"
|
||||
v-model:latency-mode="latencyMode"
|
||||
v-model:draft-fail-days="draftFailDays"
|
||||
v-model:draft-margin-pct="draftMarginPct"
|
||||
:loading="loading"
|
||||
@apply="applyThresholds"
|
||||
@refresh="refresh"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="biz-ops__inline">
|
||||
<label>
|
||||
失败 ≥
|
||||
<input v-model.number="draftFailDays" type="number" min="1" max="90" step="0.5" />
|
||||
d
|
||||
</label>
|
||||
<label>
|
||||
毛利 <
|
||||
<input v-model.number="draftMarginPct" type="number" min="1" max="90" step="1" />
|
||||
%
|
||||
</label>
|
||||
<button type="button" class="biz-ops__ghost" @click="applyThresholds">应用</button>
|
||||
</div>
|
||||
|
||||
<div class="biz-ops__meta">
|
||||
<span>环比营收 {{ formatGrowth(slice.totals.revenueGrowthPercent) }}</span>
|
||||
<span>毛利 {{ formatGrowth(slice.totals.grossProfitGrowthPercent) }}</span>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="biz-ops__ghost"
|
||||
:disabled="loading"
|
||||
@click="refresh"
|
||||
>
|
||||
刷新
|
||||
</button>
|
||||
<div v-if="hasInboxSlot" class="biz-ops__inbox">
|
||||
<slot name="inbox" />
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@ -145,17 +117,16 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onErrorCaptured, onMounted, onUnmounted, ref, watch } from 'vue'
|
||||
import { computed, onErrorCaptured, onMounted, onUnmounted, ref, useSlots, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import gsap from 'gsap'
|
||||
import WorkplaceSegmented from '../components/WorkplaceSegmented.vue'
|
||||
import BizOpsToolbar from './BizOpsToolbar.vue'
|
||||
import OpsDualMapStage from './OpsDualMapStage.vue'
|
||||
import ChinaOriginMap from './ChinaOriginMap.vue'
|
||||
import WorldDestMap from './WorldDestMap.vue'
|
||||
import UsDestDetailMap from './UsDestDetailMap.vue'
|
||||
import LaneRankRail from './LaneRankRail.vue'
|
||||
import { useBizOpsData } from './useBizOpsData'
|
||||
import { formatGrowth } from './mock/bizOpsMock'
|
||||
import type { LaneStat, LatencyMode } from './types'
|
||||
import {
|
||||
bizOpsLaneWaybillLink,
|
||||
@ -165,6 +136,10 @@ import {
|
||||
|
||||
defineOptions({ name: 'BizOpsWorkplace' })
|
||||
|
||||
const slots = useSlots()
|
||||
const hasIdentitySlot = computed(() => !!slots.identity)
|
||||
const hasInboxSlot = computed(() => !!slots.inbox)
|
||||
|
||||
const railError = ref('')
|
||||
onErrorCaptured((err, _inst, info) => {
|
||||
railError.value = `${err instanceof Error ? err.message : String(err)} (${info})`
|
||||
@ -208,22 +183,6 @@ const focusAriaLabel = computed(() => {
|
||||
const draftFailDays = ref(thresholds.value.failDaysThreshold)
|
||||
const draftMarginPct = ref(Math.round(thresholds.value.marginRateThreshold * 100))
|
||||
|
||||
const rangeOptions = [
|
||||
{ value: '7', label: '7天' },
|
||||
{ value: '30', label: '30天' },
|
||||
{ value: '90', label: '90天' },
|
||||
]
|
||||
|
||||
const laneDimOptions = [
|
||||
{ value: 'product', label: '产品线路' },
|
||||
{ value: 'country', label: '国家线路' },
|
||||
]
|
||||
|
||||
const latencyModeOptions = [
|
||||
{ value: 'success', label: '成功时效' },
|
||||
{ value: 'fail', label: '失败时效' },
|
||||
]
|
||||
|
||||
watch(
|
||||
() => slice.value.lanes,
|
||||
(lanes) => {
|
||||
@ -338,7 +297,6 @@ onMounted(() => {
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('keydown', onFocusKeydown)
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@ -355,7 +313,7 @@ onUnmounted(() => {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
padding: 12px 14px 14px;
|
||||
padding: 6px 14px 14px;
|
||||
box-sizing: border-box;
|
||||
color: var(--biz-ink);
|
||||
background: #f0f3f4;
|
||||
@ -365,14 +323,27 @@ onUnmounted(() => {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
gap: 16px;
|
||||
min-width: 0;
|
||||
padding: 10px 12px;
|
||||
border-radius: 12px;
|
||||
padding: 10px 12px 10px 14px;
|
||||
border-radius: 14px;
|
||||
background: #fff;
|
||||
border: 1px solid var(--biz-line);
|
||||
}
|
||||
|
||||
.biz-ops__bar--unified {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(200px, 1fr) auto minmax(300px, 1fr);
|
||||
align-items: center;
|
||||
gap: 16px 20px;
|
||||
}
|
||||
|
||||
.biz-ops__lede {
|
||||
flex: 0 1 300px;
|
||||
min-width: 0;
|
||||
justify-self: start;
|
||||
}
|
||||
|
||||
.biz-ops__brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -384,6 +355,7 @@ onUnmounted(() => {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 650;
|
||||
letter-spacing: 0.01em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
@ -413,73 +385,26 @@ onUnmounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
.biz-ops__bar-main {
|
||||
.biz-ops__tools {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
.biz-ops__inline {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 0 8px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
background: #f7fafb;
|
||||
border: 1px solid transparent;
|
||||
font-size: 12px;
|
||||
color: var(--biz-muted);
|
||||
.biz-ops__inbox {
|
||||
flex: 1 1 auto;
|
||||
min-width: 280px;
|
||||
max-width: none;
|
||||
justify-self: stretch;
|
||||
width: 100%;
|
||||
|
||||
label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 44px;
|
||||
height: 22px;
|
||||
border: 1px solid var(--biz-line);
|
||||
border-radius: 4px;
|
||||
padding: 0 4px;
|
||||
background: #fff;
|
||||
color: var(--biz-ink);
|
||||
}
|
||||
}
|
||||
|
||||
.biz-ops__meta {
|
||||
display: inline-flex;
|
||||
gap: 10px;
|
||||
font-size: 12px;
|
||||
color: var(--biz-muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.biz-ops__ghost {
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--biz-line);
|
||||
background: #fff;
|
||||
color: var(--biz-ink);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
border-color: rgba(29, 114, 129, 0.35);
|
||||
color: var(--biz-primary);
|
||||
:deep(.wk-inbox) {
|
||||
width: 100%;
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -519,18 +444,43 @@ onUnmounted(() => {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@media (max-width: 1280px) {
|
||||
.biz-ops__bar--unified {
|
||||
grid-template-columns: minmax(180px, 0.9fr) auto minmax(260px, 1.1fr);
|
||||
}
|
||||
|
||||
.biz-ops__inbox {
|
||||
min-width: 240px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.biz-ops {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.biz-ops__bar {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
.biz-ops__bar,
|
||||
.biz-ops__bar--unified {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.biz-ops__bar-main {
|
||||
justify-content: flex-start;
|
||||
.biz-ops__lede {
|
||||
flex: 1 1 auto;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.biz-ops__tools {
|
||||
order: 3;
|
||||
flex: 1 1 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.biz-ops__inbox {
|
||||
order: 2;
|
||||
flex: 1 1 240px;
|
||||
min-width: 220px;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.biz-ops__body {
|
||||
@ -538,4 +488,15 @@ onUnmounted(() => {
|
||||
grid-auto-rows: minmax(420px, 50vh) minmax(420px, auto);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.biz-ops__lede {
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
.biz-ops__inbox {
|
||||
order: 4;
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,29 @@
|
||||
<template>
|
||||
<div class="admin-workplace-host">
|
||||
<header class="admin-workplace-top">
|
||||
<div class="admin-workplace-top__identity">
|
||||
<Banner compact with-clock />
|
||||
</div>
|
||||
<WorkplaceUrgentBar embedded class="admin-workplace-top__inbox" />
|
||||
</header>
|
||||
<div class="admin-workplace-body">
|
||||
<BizOpsWorkplace />
|
||||
</div>
|
||||
<BizOpsWorkplace>
|
||||
<template #identity="{ loading, error }">
|
||||
<Banner compact with-clock cockpit>
|
||||
<template #headline>
|
||||
<h1 class="admin-cockpit-title">地图经营驾驶舱</h1>
|
||||
<span v-if="loading" class="admin-cockpit-live">加载中</span>
|
||||
<span
|
||||
v-else-if="error"
|
||||
class="admin-cockpit-live is-err"
|
||||
:title="error"
|
||||
>
|
||||
数据未就绪
|
||||
</span>
|
||||
<span v-else class="admin-cockpit-live is-ok">
|
||||
<i class="admin-cockpit-live__dot" aria-hidden="true" />
|
||||
实时
|
||||
</span>
|
||||
</template>
|
||||
</Banner>
|
||||
</template>
|
||||
<template #inbox>
|
||||
<WorkplaceUrgentBar embedded />
|
||||
</template>
|
||||
</BizOpsWorkplace>
|
||||
<NoticePopup />
|
||||
</div>
|
||||
</template>
|
||||
@ -22,7 +37,7 @@ import WorkplaceUrgentBar from './WorkplaceUrgentBar.vue'
|
||||
defineOptions({ name: 'AdminWorkplace' })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="less">
|
||||
.admin-workplace-host {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -32,65 +47,54 @@ defineOptions({ name: 'AdminWorkplace' })
|
||||
background: #f0f3f4;
|
||||
}
|
||||
|
||||
.admin-workplace-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
flex: 0 0 auto;
|
||||
min-width: 0;
|
||||
margin: 12px 14px 0;
|
||||
padding: 10px 12px 10px 14px;
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
border: 1px solid rgba(26, 46, 56, 0.08);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.admin-workplace-top__identity {
|
||||
flex: 0 0 auto;
|
||||
min-width: 0;
|
||||
max-width: 280px;
|
||||
|
||||
:deep(.banner) {
|
||||
padding: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
:deep(.banner-row) {
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.admin-workplace-top__inbox {
|
||||
flex: 1 1 0%;
|
||||
min-width: 0;
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.admin-workplace-body {
|
||||
.admin-workplace-host > :deep(.biz-ops) {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.admin-workplace-body :deep(.biz-ops) {
|
||||
padding-top: 10px;
|
||||
.admin-cockpit-title {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
letter-spacing: 0.02em;
|
||||
color: #1a2e38;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.admin-workplace-top {
|
||||
flex-wrap: wrap;
|
||||
.admin-cockpit-live {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
height: 22px;
|
||||
padding: 0 8px;
|
||||
border-radius: 999px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.02em;
|
||||
color: rgba(26, 46, 56, 0.5);
|
||||
background: rgba(26, 46, 56, 0.05);
|
||||
white-space: nowrap;
|
||||
|
||||
&.is-ok {
|
||||
color: var(--app-primary-color, #1d7281);
|
||||
background: rgba(29, 114, 129, 0.1);
|
||||
}
|
||||
|
||||
.admin-workplace-top__identity {
|
||||
max-width: none;
|
||||
flex: 1 1 auto;
|
||||
&.is-err {
|
||||
color: #c45c4a;
|
||||
background: rgba(196, 92, 74, 0.1);
|
||||
max-width: 88px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.admin-workplace-top__inbox {
|
||||
order: 3;
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
.admin-cockpit-live__dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: currentColor;
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,34 +1,61 @@
|
||||
<template>
|
||||
<div class="banner" :class="{ 'is-compact': compact, 'has-clock': withClock }">
|
||||
<div
|
||||
class="banner"
|
||||
:class="{
|
||||
'is-compact': compact,
|
||||
'has-clock': withClock,
|
||||
'is-cockpit': cockpit,
|
||||
}"
|
||||
>
|
||||
<div class="banner-row">
|
||||
<div class="banner-hello">
|
||||
<a-avatar :size="compact ? (withClock ? 36 : 32) : 40" class="banner-hello__avatar">
|
||||
<AvatarDisplay :src="avatarSrc" :size="compact ? (withClock ? 36 : 32) : 40" />
|
||||
<a-avatar
|
||||
:size="cockpit ? 40 : compact ? (withClock ? 36 : 32) : 40"
|
||||
class="banner-hello__avatar"
|
||||
>
|
||||
<AvatarDisplay
|
||||
:src="avatarSrc"
|
||||
:size="cockpit ? 40 : compact ? (withClock ? 36 : 32) : 40"
|
||||
/>
|
||||
</a-avatar>
|
||||
<div class="banner-hello__copy">
|
||||
<p class="banner-hello__line">
|
||||
<span class="banner-hello__greet">{{ greetText }}</span>
|
||||
<span class="banner-hello__name">{{ displayName }}</span>
|
||||
<MemberLevelBadge
|
||||
v-if="showBalance && memberLevel.name"
|
||||
class="banner-hello__level"
|
||||
:level-code="memberLevel.code"
|
||||
:level-name="memberLevel.name"
|
||||
:icon-url="memberLevel.iconUrl"
|
||||
size="sm"
|
||||
/>
|
||||
</p>
|
||||
<div
|
||||
v-if="withClock"
|
||||
class="banner-hello__clock"
|
||||
aria-live="polite"
|
||||
>
|
||||
<span class="banner-hello__clock-date">{{ dateText }}</span>
|
||||
<span class="banner-hello__clock-sep" aria-hidden="true">·</span>
|
||||
<span class="banner-hello__clock-time">{{ timeText }}</span>
|
||||
</div>
|
||||
<template v-if="cockpit">
|
||||
<div class="banner-hello__headline">
|
||||
<slot name="headline" />
|
||||
</div>
|
||||
<p class="banner-hello__sub">
|
||||
<span class="banner-hello__greet">{{ greetText }}</span>
|
||||
<span class="banner-hello__name">{{ displayName }}</span>
|
||||
<span class="banner-hello__sub-sep" aria-hidden="true">·</span>
|
||||
<span class="banner-hello__clock-date">{{ dateText }}</span>
|
||||
<span class="banner-hello__clock-time">{{ timeText }}</span>
|
||||
</p>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p class="banner-hello__line">
|
||||
<span class="banner-hello__greet">{{ greetText }}</span>
|
||||
<span class="banner-hello__name">{{ displayName }}</span>
|
||||
<MemberLevelBadge
|
||||
v-if="showBalance && memberLevel.name"
|
||||
class="banner-hello__level"
|
||||
:level-code="memberLevel.code"
|
||||
:level-name="memberLevel.name"
|
||||
:icon-url="memberLevel.iconUrl"
|
||||
size="sm"
|
||||
/>
|
||||
</p>
|
||||
<div
|
||||
v-if="withClock"
|
||||
class="banner-hello__clock"
|
||||
aria-live="polite"
|
||||
>
|
||||
<span class="banner-hello__clock-date">{{ dateText }}</span>
|
||||
<span class="banner-hello__clock-sep" aria-hidden="true">·</span>
|
||||
<span class="banner-hello__clock-time">{{ timeText }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div v-if="!compact && !withClock" class="banner-local-clock" aria-live="polite">
|
||||
<div v-if="!compact && !withClock && !cockpit" class="banner-local-clock" aria-live="polite">
|
||||
<span class="banner-local-clock__label">{{ t('workplace.clock.local') }}</span>
|
||||
<span class="banner-local-clock__date">{{ dateText }}</span>
|
||||
<span class="banner-local-clock__time">{{ timeText }}</span>
|
||||
@ -74,10 +101,13 @@
|
||||
compact?: boolean
|
||||
/** 紧凑问候下展示日期时间(对齐姓名列) */
|
||||
withClock?: boolean
|
||||
/** 驾驶舱:标题主导,问候/时钟收为副线 */
|
||||
cockpit?: boolean
|
||||
}>(),
|
||||
{
|
||||
compact: false,
|
||||
withClock: false,
|
||||
cockpit: false,
|
||||
},
|
||||
)
|
||||
|
||||
@ -281,6 +311,74 @@
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-cockpit {
|
||||
padding: 0;
|
||||
|
||||
.banner-row {
|
||||
min-height: 0;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.banner-hello {
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.banner-hello__copy {
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.banner-hello__avatar {
|
||||
border: none;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.banner-hello__greet,
|
||||
.banner-hello__name,
|
||||
.banner-hello__clock-date,
|
||||
.banner-hello__clock-time {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
color: rgba(26, 46, 56, 0.48);
|
||||
}
|
||||
|
||||
.banner-hello__name {
|
||||
font-weight: 600;
|
||||
color: rgba(26, 46, 56, 0.62);
|
||||
}
|
||||
|
||||
.banner-hello__clock-time {
|
||||
font-weight: 650;
|
||||
letter-spacing: 0.04em;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: rgba(26, 46, 56, 0.55);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.banner-hello__headline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.banner-hello__sub {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.banner-hello__sub-sep {
|
||||
color: rgba(26, 46, 56, 0.28);
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.banner-row {
|
||||
|
||||
@ -684,6 +684,7 @@ onMounted(() => {
|
||||
<div class="tabs-actions-section">
|
||||
<div class="tabs-slot">
|
||||
<SlidingTabs
|
||||
size="mini"
|
||||
:model-value="statusTab"
|
||||
:items="slidingTabItems"
|
||||
@change="handleTabChange"
|
||||
@ -720,41 +721,47 @@ onMounted(() => {
|
||||
</div>
|
||||
|
||||
<div class="table-toolbar">
|
||||
<div class="actions-right">
|
||||
<a-button
|
||||
v-if="hasPermission('Order.Customs9610.DeclareBatch')"
|
||||
class="app-btn-toolbar"
|
||||
@click="handleOpenCreate"
|
||||
>
|
||||
{{ t('order.customs9610.actions.createFromOrders') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.Customs9610.FetchManifestBatch')"
|
||||
class="app-btn-toolbar"
|
||||
:loading="fetchingManifest"
|
||||
:disabled="!selectedIds.length || fetchingManifest"
|
||||
@click="handleBatchFetchManifest"
|
||||
>
|
||||
{{ t('order.customs9610.actions.batchFetchManifest') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.Customs9610.FetchDeclarationFormBatch')"
|
||||
class="app-btn-toolbar"
|
||||
:loading="fetchingDeclarationForm"
|
||||
:disabled="!selectedIds.length || fetchingDeclarationForm"
|
||||
@click="handleBatchFetchDeclarationForm"
|
||||
>
|
||||
{{ t('order.customs9610.actions.batchFetchDeclarationForm') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<span class="selected-count">
|
||||
<div class="actions-right" :class="{ 'has-selection': selectedRowCount > 0 }">
|
||||
<span class="selected-count" :class="{ 'has-selection': selectedRowCount > 0 }">
|
||||
<i18n-t keypath="order.myOrders.selectedCount" tag="span" scope="global">
|
||||
<template #count>
|
||||
<span class="count-number">{{ selectedRowCount }}</span>
|
||||
</template>
|
||||
</i18n-t>
|
||||
</span>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.Customs9610.DeclareBatch')"
|
||||
class="app-btn-primary-soft"
|
||||
@click="handleOpenCreate"
|
||||
>
|
||||
{{ t('order.customs9610.actions.createFromOrders') }}
|
||||
</a-button>
|
||||
<div class="toolbar-secondary" :aria-hidden="selectedRowCount === 0">
|
||||
<div class="toolbar-secondary__inner">
|
||||
<a-button
|
||||
v-if="hasPermission('Order.Customs9610.FetchManifestBatch')"
|
||||
class="app-btn-toolbar"
|
||||
:title="selectedIds.length ? undefined : '请先勾选订单'"
|
||||
:loading="fetchingManifest"
|
||||
:disabled="!selectedIds.length || fetchingManifest"
|
||||
@click="handleBatchFetchManifest"
|
||||
>
|
||||
{{ t('order.customs9610.actions.batchFetchManifest') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.Customs9610.FetchDeclarationFormBatch')"
|
||||
class="app-btn-toolbar"
|
||||
:title="selectedIds.length ? undefined : '请先勾选订单'"
|
||||
:loading="fetchingDeclarationForm"
|
||||
:disabled="!selectedIds.length || fetchingDeclarationForm"
|
||||
@click="handleBatchFetchDeclarationForm"
|
||||
>
|
||||
{{ t('order.customs9610.actions.batchFetchDeclarationForm') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="pagination-controls">
|
||||
<PaginationPro
|
||||
:total-count="totalCount"
|
||||
@ -1006,20 +1013,19 @@ onMounted(() => {
|
||||
.tabs-actions-section {
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
padding: 10px 16px;
|
||||
padding: 6px 12px;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid var(--color-border-2);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
gap: 12px;
|
||||
gap: 6px 12px;
|
||||
flex-shrink: 0;
|
||||
min-height: 52px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.tabs-slot {
|
||||
flex: 1 1 auto;
|
||||
flex: 1 1 420px;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -1035,25 +1041,26 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.toolbar-left {
|
||||
flex: 0 0 auto;
|
||||
flex: 0 1 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0;
|
||||
max-width: 100%;
|
||||
height: 32px;
|
||||
margin-left: auto;
|
||||
height: 28px;
|
||||
|
||||
.list-filters {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
height: 32px;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
|
||||
:deep(.arco-select-view),
|
||||
:deep(.arco-input-wrapper),
|
||||
:deep(.arco-btn) {
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
:deep(.arco-select-view-single),
|
||||
@ -1082,13 +1089,13 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.table-toolbar {
|
||||
padding: 12px 16px 0;
|
||||
margin-bottom: 12px;
|
||||
padding: 8px 12px 0;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
gap: 8px;
|
||||
|
||||
.toolbar-right {
|
||||
display: flex;
|
||||
@ -1097,13 +1104,6 @@ onMounted(() => {
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
|
||||
.selected-count {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-3);
|
||||
white-space: nowrap;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.pagination-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -1114,19 +1114,11 @@ onMounted(() => {
|
||||
.actions-right {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--app-button-gap, 8px);
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
:deep(.arco-btn) {
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.list-empty-hint {
|
||||
|
||||
@ -9,12 +9,13 @@
|
||||
defineAsyncComponent,
|
||||
} from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { IconCalendar, IconDown, IconQuestionCircleFill } from '@arco-design/web-vue/es/icon';
|
||||
import { IconCalendar, IconDown, IconQuestionCircleFill, IconSettings } from '@arco-design/web-vue/es/icon';
|
||||
import { Message, Modal } from '@arco-design/web-vue';
|
||||
import dayjs from 'dayjs';
|
||||
import HandsontablePro from '@/components/HandsontablePro/index.vue';
|
||||
import PaginationPro from '@/components/PaginationPro/index.vue';
|
||||
import SlidingTabs from '@/components/SlidingTabs/index.vue';
|
||||
import OrderStatusFilterTabs from '@/components/OrderStatusFilterTabs/index.vue';
|
||||
import { useTableContainerHeight } from '@/composables/useTableContainerHeight';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import {
|
||||
@ -365,15 +366,7 @@
|
||||
return isFulfillList.value && keys.includes(activeTab.value);
|
||||
}
|
||||
|
||||
/** Tab 下动作优先级(越靠前越优先外露,最4 个) */
|
||||
const FULFILL_TAB_TOOLBAR_ACTION_ORDER: Record<string, ToolbarActionKey[]> = {
|
||||
all: ['stockBind', 'pay', 'predeclare', 'batchPrint', 'modifyOrder', 'delete', 'export'],
|
||||
domesticInTransit: ['batchPrint', 'export'],
|
||||
arrivedPendingPick: ['batchPrint', 'export'],
|
||||
outboundDone: ['batchPrint', 'export'],
|
||||
};
|
||||
|
||||
/** 按当前状态收敛工具栏,避免客户在无关 Tab 看到一排无效按*/
|
||||
/** 按当前状态收敛工具栏,避免客户在无关 Tab 看到一排无效按钮 */
|
||||
const showPayAction = computed(() =>
|
||||
isFulfillList.value
|
||||
? isFulfillProgressTab('all')
|
||||
@ -415,104 +408,23 @@
|
||||
const showCreatePickupAction = computed(
|
||||
() => !isFulfillList.value && isActiveTab('predeclared') && hasPermission('Order.Pickup.Create'),
|
||||
);
|
||||
const showStockBindAction = computed(() =>
|
||||
hasPermission(
|
||||
isFulfillList.value ? 'Order.FulfillOrders.StockBind' : 'Order.MyOrders.StockBind',
|
||||
),
|
||||
);
|
||||
|
||||
const TOOLBAR_MAX_PRIMARY = 4;
|
||||
|
||||
type ToolbarActionKey =
|
||||
/** 工具栏外露动作:情境主按钮 + 最多 2 个次要,其余进「更多」分组 */
|
||||
type ToolbarActionId =
|
||||
| 'markProcessed'
|
||||
| 'pay'
|
||||
| 'predeclare'
|
||||
| 'batchPrint'
|
||||
| 'createPickup'
|
||||
| 'stockBind'
|
||||
| 'createProblematic'
|
||||
| 'createClaimed'
|
||||
| 'intercept'
|
||||
| 'cancelIntercept'
|
||||
| 'delete'
|
||||
| 'export'
|
||||
| 'modifyOrder';
|
||||
| 'stockBind';
|
||||
|
||||
const TOOLBAR_ACTION_LABEL_KEYS: Record<ToolbarActionKey, string> = {
|
||||
markProcessed: 'order.myOrders.actions.markProcessed',
|
||||
pay: 'order.myOrders.actions.pay',
|
||||
predeclare: 'order.myOrders.actions.predeclare',
|
||||
batchPrint: 'order.myOrders.actions.batchPrint',
|
||||
createPickup: 'order.myOrders.actions.createPickup',
|
||||
stockBind: 'order.myOrders.actions.stockBind',
|
||||
createProblematic: 'order.myOrders.actions.createProblematic',
|
||||
createClaimed: 'order.myOrders.actions.createClaimed',
|
||||
intercept: 'order.myOrders.actions.intercept',
|
||||
cancelIntercept: 'order.myOrders.actions.cancelIntercept',
|
||||
delete: 'order.myOrders.actions.delete',
|
||||
export: 'order.myOrders.actions.export',
|
||||
modifyOrder: 'order.myOrders.actions.modifyOrder',
|
||||
};
|
||||
|
||||
/** Tab 下动作优先级(越靠前越优先外露,最4 个) */
|
||||
const TAB_TOOLBAR_ACTION_ORDER: Record<string, ToolbarActionKey[]> = {
|
||||
all: [
|
||||
'pay',
|
||||
'predeclare',
|
||||
'batchPrint',
|
||||
'modifyOrder',
|
||||
'delete',
|
||||
'stockBind',
|
||||
'createProblematic',
|
||||
'createClaimed',
|
||||
'intercept',
|
||||
'cancelIntercept',
|
||||
'export',
|
||||
],
|
||||
draft: ['predeclare', 'modifyOrder', 'delete', 'batchPrint', 'export', 'stockBind', 'createProblematic', 'createClaimed'],
|
||||
predeclared: ['createPickup', 'batchPrint', 'modifyOrder', 'delete', 'intercept', 'cancelIntercept', 'export', 'stockBind'],
|
||||
pendingAllocation: [
|
||||
'modifyOrder',
|
||||
'batchPrint',
|
||||
'stockBind',
|
||||
'intercept',
|
||||
'cancelIntercept',
|
||||
'createProblematic',
|
||||
'createClaimed',
|
||||
'export',
|
||||
],
|
||||
pendingPayment: [
|
||||
'pay',
|
||||
'batchPrint',
|
||||
'modifyOrder',
|
||||
'stockBind',
|
||||
'intercept',
|
||||
'cancelIntercept',
|
||||
'export',
|
||||
],
|
||||
pendingShip: ['batchPrint', 'modifyOrder', 'intercept', 'cancelIntercept', 'stockBind', 'export'],
|
||||
pendingOnline: ['batchPrint', 'export', 'stockBind'],
|
||||
shipping: ['batchPrint', 'export', 'stockBind'],
|
||||
deliverySuccess: ['batchPrint', 'export', 'stockBind'],
|
||||
deliveryFailed: ['batchPrint', 'export', 'stockBind', 'createProblematic', 'createClaimed'],
|
||||
problematic: ['markProcessed', 'export', 'stockBind'],
|
||||
claimed: ['markProcessed', 'export', 'stockBind'],
|
||||
deleted: ['export'],
|
||||
};
|
||||
|
||||
const ALL_TOOLBAR_ACTION_KEYS: ToolbarActionKey[] = [
|
||||
'markProcessed',
|
||||
'pay',
|
||||
'predeclare',
|
||||
'batchPrint',
|
||||
'createPickup',
|
||||
'stockBind',
|
||||
'createProblematic',
|
||||
'createClaimed',
|
||||
'intercept',
|
||||
'cancelIntercept',
|
||||
'delete',
|
||||
'export',
|
||||
'modifyOrder',
|
||||
];
|
||||
|
||||
function isToolbarActionVisible(key: ToolbarActionKey): boolean {
|
||||
switch (key) {
|
||||
function isToolbarActionVisible(id: ToolbarActionId) {
|
||||
switch (id) {
|
||||
case 'markProcessed':
|
||||
return showMarkProcessedAction.value;
|
||||
case 'pay':
|
||||
@ -524,117 +436,70 @@
|
||||
case 'createPickup':
|
||||
return showCreatePickupAction.value;
|
||||
case 'stockBind':
|
||||
return hasPermission(
|
||||
isFulfillList.value ? 'Order.FulfillOrders.StockBind' : 'Order.MyOrders.StockBind',
|
||||
);
|
||||
case 'createProblematic':
|
||||
case 'createClaimed':
|
||||
return showExceptionCreateActions.value;
|
||||
case 'intercept':
|
||||
case 'cancelIntercept':
|
||||
return showInterceptActions.value;
|
||||
case 'delete':
|
||||
return showDeleteAction.value;
|
||||
case 'export':
|
||||
return true;
|
||||
case 'modifyOrder':
|
||||
return showModifyOrderAction.value;
|
||||
return showStockBindAction.value;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const primaryToolbarAction = computed<ToolbarActionId | null>(() => {
|
||||
if (showMarkProcessedAction.value) return 'markProcessed';
|
||||
if (showCreatePickupAction.value) return 'createPickup';
|
||||
if (
|
||||
!isFulfillList.value &&
|
||||
activeTab.value === 'pendingPayment' &&
|
||||
showPayAction.value
|
||||
) {
|
||||
return 'pay';
|
||||
}
|
||||
if (
|
||||
!isFulfillList.value &&
|
||||
(activeTab.value === 'draft' || activeTab.value === 'predeclared') &&
|
||||
showPredeclareAction.value
|
||||
) {
|
||||
return 'predeclare';
|
||||
}
|
||||
if (isFulfillList.value && showStockBindAction.value) return 'stockBind';
|
||||
if (showPrintAction.value) return 'batchPrint';
|
||||
if (showPayAction.value) return 'pay';
|
||||
if (showPredeclareAction.value) return 'predeclare';
|
||||
if (showStockBindAction.value) return 'stockBind';
|
||||
return null;
|
||||
});
|
||||
|
||||
const secondaryToolbarActions = computed<ToolbarActionId[]>(() => {
|
||||
const primary = primaryToolbarAction.value;
|
||||
const order: ToolbarActionId[] = [
|
||||
'pay',
|
||||
'predeclare',
|
||||
'batchPrint',
|
||||
'createPickup',
|
||||
'stockBind',
|
||||
'markProcessed',
|
||||
];
|
||||
return order
|
||||
.filter((id) => id !== primary && isToolbarActionVisible(id))
|
||||
.slice(0, 2);
|
||||
});
|
||||
|
||||
function isToolbarExposed(id: ToolbarActionId) {
|
||||
return primaryToolbarAction.value === id || secondaryToolbarActions.value.includes(id);
|
||||
}
|
||||
|
||||
const needSelectHint = computed(() =>
|
||||
selectedRowCount.value === 0 ? '请先勾选订单' : undefined,
|
||||
);
|
||||
|
||||
const stockBindLabelKey = computed(() =>
|
||||
isFulfillList.value
|
||||
? 'order.fulfillOrders.actions.manageBind'
|
||||
: 'order.myOrders.actions.stockBindConvert',
|
||||
);
|
||||
|
||||
const listColumnStorageKey = computed(() =>
|
||||
isFulfillList.value ? FULFILL_ORDERS_COLUMN_STORAGE_KEY : MY_ORDERS_COLUMN_STORAGE_KEY,
|
||||
);
|
||||
|
||||
function getToolbarActionLabelKey(key: ToolbarActionKey) {
|
||||
if (key === 'stockBind') {
|
||||
return isFulfillList.value
|
||||
? 'order.fulfillOrders.actions.manageBind'
|
||||
: 'order.myOrders.actions.stockBindConvert';
|
||||
}
|
||||
return TOOLBAR_ACTION_LABEL_KEYS[key];
|
||||
}
|
||||
|
||||
const orderedVisibleToolbarActions = computed(() => {
|
||||
const order = isFulfillList.value
|
||||
? FULFILL_TAB_TOOLBAR_ACTION_ORDER[activeTab.value] ?? FULFILL_TAB_TOOLBAR_ACTION_ORDER.all
|
||||
: TAB_TOOLBAR_ACTION_ORDER[activeTab.value] ?? TAB_TOOLBAR_ACTION_ORDER.all;
|
||||
const seen = new Set<ToolbarActionKey>();
|
||||
const result: ToolbarActionKey[] = [];
|
||||
for (const key of order) {
|
||||
if (seen.has(key) || !isToolbarActionVisible(key)) continue;
|
||||
seen.add(key);
|
||||
result.push(key);
|
||||
}
|
||||
for (const key of ALL_TOOLBAR_ACTION_KEYS) {
|
||||
if (!seen.has(key) && isToolbarActionVisible(key)) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
|
||||
const primaryToolbarActions = computed(() =>
|
||||
orderedVisibleToolbarActions.value.slice(0, TOOLBAR_MAX_PRIMARY),
|
||||
);
|
||||
|
||||
const overflowToolbarActions = computed(() =>
|
||||
orderedVisibleToolbarActions.value.slice(TOOLBAR_MAX_PRIMARY),
|
||||
);
|
||||
|
||||
const showToolbarMore = computed(() => overflowToolbarActions.value.length > 0);
|
||||
|
||||
function toolbarActionNeedsSelection(key: ToolbarActionKey): boolean {
|
||||
return key !== 'export';
|
||||
}
|
||||
|
||||
function getToolbarActionLoadingKey(key: ToolbarActionKey): string | null {
|
||||
const map: Partial<Record<ToolbarActionKey, string>> = {
|
||||
markProcessed: 'markProcessed',
|
||||
pay: 'pay',
|
||||
predeclare: 'predeclare',
|
||||
batchPrint: 'batchPrint',
|
||||
export: 'export',
|
||||
};
|
||||
return map[key] ?? null;
|
||||
}
|
||||
|
||||
function isToolbarActionDisabled(key: ToolbarActionKey): boolean {
|
||||
if (toolbarActionNeedsSelection(key) && selectedRowCount.value === 0) {
|
||||
return true;
|
||||
}
|
||||
const loadingKey = getToolbarActionLoadingKey(key);
|
||||
if (loadingKey) {
|
||||
return isActionBusy(loadingKey);
|
||||
}
|
||||
if (key === 'createProblematic') {
|
||||
return isActionBusy('markProblematic');
|
||||
}
|
||||
if (key === 'createClaimed') {
|
||||
return isActionBusy('markClaimed');
|
||||
}
|
||||
return !!actionLoadingKey.value;
|
||||
}
|
||||
|
||||
function handleToolbarAction(key: ToolbarActionKey) {
|
||||
if (isToolbarActionDisabled(key)) return;
|
||||
if (key === 'markProcessed') return handleMarkProcessed();
|
||||
if (key === 'pay') return handlePay();
|
||||
if (key === 'predeclare') return handlePreDeclare();
|
||||
if (key === 'batchPrint') return handleBatchPrint();
|
||||
if (key === 'createPickup') return handleCreatePickup();
|
||||
if (key === 'stockBind') return openStockBindModal();
|
||||
if (key === 'createProblematic') return openProblematicModal();
|
||||
if (key === 'createClaimed') return openClaimedModal();
|
||||
if (key === 'intercept') return handleIntercept();
|
||||
if (key === 'cancelIntercept') return handleCancelIntercept();
|
||||
if (key === 'delete') return handleDelete();
|
||||
if (key === 'export') return handleExport();
|
||||
if (key === 'modifyOrder') return handleModifyOrder();
|
||||
}
|
||||
|
||||
const problematicModalVisible = ref(false);
|
||||
const claimedModalVisible = ref(false);
|
||||
const claimContext = ref<{
|
||||
@ -698,11 +563,20 @@
|
||||
});
|
||||
|
||||
const slidingTabItems = computed(() =>
|
||||
tabs.value.map((tab) => ({
|
||||
key: tab.key,
|
||||
label: t(tab.labelKey),
|
||||
badge: tab.showCount && tab.count != null ? tab.count : undefined,
|
||||
}))
|
||||
tabs.value.map((tab) => {
|
||||
const count = tab.showCount && tab.count != null ? tab.count : undefined
|
||||
const badge =
|
||||
count == null
|
||||
? undefined
|
||||
: tab.key === 'all' || Number(count) > 0
|
||||
? count
|
||||
: undefined
|
||||
return {
|
||||
key: tab.key,
|
||||
label: t(tab.labelKey),
|
||||
badge,
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
async function loadTabCounts() {
|
||||
@ -857,6 +731,96 @@
|
||||
return `默认仅展示近 ${ORDER_LIST_DEFAULT_DAYS} 天订单;按单号精确查询时可清空时间。`;
|
||||
});
|
||||
|
||||
function formatPageDateChipText() {
|
||||
if (timeWindowRelaxed.value && !createTimeRange.value?.length) return '不限';
|
||||
const range = createTimeRange.value;
|
||||
if (!range || range.length < 2 || !range[0] || !range[1]) return '';
|
||||
const start = dayjs(range[0]).format('MM-DD');
|
||||
const end = dayjs(range[1]).format('MM-DD');
|
||||
return `${start} ~ ${end}`;
|
||||
}
|
||||
|
||||
const pageFilterChips = computed(() => {
|
||||
const items: Array<{ key: string; label: string; text: string; kind: 'filter' }> = [];
|
||||
const kw = listKeyword.value.trim();
|
||||
if (kw) {
|
||||
items.push({
|
||||
key: 'page:keyword',
|
||||
label: '关键词',
|
||||
text: kw.length > 24 ? `${kw.slice(0, 24)}…` : kw,
|
||||
kind: 'filter',
|
||||
});
|
||||
}
|
||||
if (!usingDefaultTimeWindow.value) {
|
||||
const dateText = formatPageDateChipText();
|
||||
if (dateText) {
|
||||
items.push({ key: 'page:date', label: '创建时间', text: dateText, kind: 'filter' });
|
||||
}
|
||||
}
|
||||
const allKey = isFulfillList.value ? FULFILL_PROGRESS_ALL : ORDER_STATUS_ALL;
|
||||
if (activeTab.value !== allKey) {
|
||||
if (isFulfillList.value) {
|
||||
const meta = FULFILL_PROGRESS_TABS.find((m) => m.value === activeTab.value);
|
||||
items.push({
|
||||
key: 'page:status',
|
||||
label: '进度',
|
||||
text: meta ? t(meta.labelKey) : activeTab.value,
|
||||
kind: 'filter',
|
||||
});
|
||||
} else {
|
||||
const meta = getOrderStatusMeta(activeTab.value);
|
||||
items.push({
|
||||
key: 'page:status',
|
||||
label: '状态',
|
||||
text: meta ? t(meta.labelKey) : activeTab.value,
|
||||
kind: 'filter',
|
||||
});
|
||||
}
|
||||
}
|
||||
if (showHandleSubTabs.value && activeHandleTab.value !== ORDER_HANDLE_STATUS_ALL) {
|
||||
const meta = getOrderHandleStatusMeta(activeHandleTab.value);
|
||||
items.push({
|
||||
key: 'page:handle',
|
||||
label: '处理',
|
||||
text: meta ? t(meta.labelKey) : activeHandleTab.value,
|
||||
kind: 'filter',
|
||||
});
|
||||
}
|
||||
return items;
|
||||
});
|
||||
|
||||
function onExtraFilterClear(key: string) {
|
||||
if (key === 'page:keyword') {
|
||||
listKeyword.value = '';
|
||||
handleSearch();
|
||||
return;
|
||||
}
|
||||
if (key === 'page:date') {
|
||||
restoreDefaultTimeWindow();
|
||||
dateFilterExpanded.value = false;
|
||||
handleSearch();
|
||||
return;
|
||||
}
|
||||
if (key === 'page:status') {
|
||||
handleTabChange(isFulfillList.value ? FULFILL_PROGRESS_ALL : ORDER_STATUS_ALL);
|
||||
return;
|
||||
}
|
||||
if (key === 'page:handle') {
|
||||
handleHandleTabChange(ORDER_HANDLE_STATUS_ALL);
|
||||
}
|
||||
}
|
||||
|
||||
function onExtraFilterClearAll() {
|
||||
listKeyword.value = '';
|
||||
restoreDefaultTimeWindow();
|
||||
dateFilterExpanded.value = false;
|
||||
activeHandleTab.value = ORDER_HANDLE_STATUS_ALL;
|
||||
const allKey = isFulfillList.value ? FULFILL_PROGRESS_ALL : ORDER_STATUS_ALL;
|
||||
if (activeTab.value !== allKey) {
|
||||
activeTab.value = allKey;
|
||||
}
|
||||
}
|
||||
|
||||
function restoreDefaultTimeWindow() {
|
||||
createTimeRange.value = [...buildDefaultCreateTimeRange()];
|
||||
timeWindowRelaxed.value = false;
|
||||
@ -2007,13 +1971,20 @@
|
||||
<div class="table-section">
|
||||
<div class="tabs-actions-section">
|
||||
<div class="tabs-slot">
|
||||
<OrderStatusFilterTabs
|
||||
v-if="!isFulfillList"
|
||||
:model-value="activeTab"
|
||||
:items="slidingTabItems"
|
||||
@change="handleTabChange"
|
||||
/>
|
||||
<SlidingTabs
|
||||
v-else
|
||||
size="mini"
|
||||
:model-value="activeTab"
|
||||
:items="slidingTabItems"
|
||||
@change="handleTabChange"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="toolbar-left">
|
||||
<div class="list-filters">
|
||||
<a-input
|
||||
@ -2103,56 +2074,226 @@
|
||||
|
||||
<!-- 表格操作按钮和分页控-->
|
||||
<div class="table-toolbar">
|
||||
<div class="actions-right">
|
||||
<a-button
|
||||
v-for="actionKey in primaryToolbarActions"
|
||||
:key="actionKey"
|
||||
class="app-btn-toolbar"
|
||||
:loading="!!getToolbarActionLoadingKey(actionKey) && isActionLoading(getToolbarActionLoadingKey(actionKey)!)"
|
||||
:disabled="isToolbarActionDisabled(actionKey)"
|
||||
@click="handleToolbarAction(actionKey)"
|
||||
>{{ t(getToolbarActionLabelKey(actionKey)) }}</a-button>
|
||||
<a-dropdown
|
||||
v-if="showToolbarMore"
|
||||
trigger="click"
|
||||
position="bl"
|
||||
:disabled="!!actionLoadingKey"
|
||||
>
|
||||
<a-button class="app-btn-toolbar btn-more" :disabled="!!actionLoadingKey">
|
||||
{{ t('order.myOrders.actions.more') }}
|
||||
<icon-down class="btn-more-arrow" />
|
||||
</a-button>
|
||||
<template #content>
|
||||
<a-doption
|
||||
v-for="actionKey in overflowToolbarActions"
|
||||
:key="actionKey"
|
||||
:disabled="isToolbarActionDisabled(actionKey)"
|
||||
@click="handleToolbarAction(actionKey)"
|
||||
>{{ t(getToolbarActionLabelKey(actionKey)) }}</a-doption>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
|
||||
<div class="toolbar-right">
|
||||
<span class="selected-count">
|
||||
<div class="actions-right" :class="{ 'has-selection': selectedRowCount > 0 }">
|
||||
<span class="selected-count" :class="{ 'has-selection': selectedRowCount > 0 }">
|
||||
<i18n-t keypath="order.myOrders.selectedCount" tag="span" scope="global">
|
||||
<template #count>
|
||||
<span class="count-number">{{ selectedRowCount }}</span>
|
||||
</template>
|
||||
</i18n-t>
|
||||
</span>
|
||||
<div class="column-config-controls">
|
||||
<a-select
|
||||
:model-value="columnConfigState.activeId"
|
||||
:options="columnSchemeOptions"
|
||||
:placeholder="t('order.myOrders.columnConfig.scheme')"
|
||||
style="width: 140px"
|
||||
@change="handleColumnSchemeChange"
|
||||
/>
|
||||
<a-button @click="openColumnConfig" class="app-btn-toolbar">
|
||||
{{ t('order.myOrders.columnConfig.open') }}
|
||||
</a-button>
|
||||
|
||||
<a-button
|
||||
v-if="primaryToolbarAction === 'markProcessed'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('markProcessed')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('markProcessed')"
|
||||
@click="handleMarkProcessed"
|
||||
>{{ t('order.myOrders.actions.markProcessed') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="primaryToolbarAction === 'createPickup'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
@click="handleCreatePickup"
|
||||
>{{ t('order.myOrders.actions.createPickup') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="primaryToolbarAction === 'pay'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('pay')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('pay')"
|
||||
@click="handlePay"
|
||||
>{{ t('order.myOrders.actions.pay') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="primaryToolbarAction === 'predeclare'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('predeclare')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('predeclare')"
|
||||
@click="handlePreDeclare"
|
||||
>{{ t('order.myOrders.actions.predeclare') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="primaryToolbarAction === 'batchPrint'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('batchPrint')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('batchPrint')"
|
||||
@click="handleBatchPrint"
|
||||
>{{ t('order.myOrders.actions.batchPrint') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="primaryToolbarAction === 'stockBind'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
@click="openStockBindModal"
|
||||
>{{ t(stockBindLabelKey) }}</a-button>
|
||||
|
||||
<div
|
||||
v-if="secondaryToolbarActions.length"
|
||||
class="toolbar-secondary"
|
||||
:aria-hidden="selectedRowCount === 0"
|
||||
>
|
||||
<div class="toolbar-secondary__inner">
|
||||
<template v-for="secId in secondaryToolbarActions" :key="secId">
|
||||
<a-button
|
||||
v-if="secId === 'pay'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('pay')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('pay')"
|
||||
@click="handlePay"
|
||||
>{{ t('order.myOrders.actions.pay') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="secId === 'predeclare'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('predeclare')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('predeclare')"
|
||||
@click="handlePreDeclare"
|
||||
>{{ t('order.myOrders.actions.predeclare') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="secId === 'batchPrint'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('batchPrint')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('batchPrint')"
|
||||
@click="handleBatchPrint"
|
||||
>{{ t('order.myOrders.actions.batchPrint') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="secId === 'createPickup'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
@click="handleCreatePickup"
|
||||
>{{ t('order.myOrders.actions.createPickup') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="secId === 'stockBind'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
@click="openStockBindModal"
|
||||
>{{ t(stockBindLabelKey) }}</a-button>
|
||||
<a-button
|
||||
v-else-if="secId === 'markProcessed'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('markProcessed')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('markProcessed')"
|
||||
@click="handleMarkProcessed"
|
||||
>{{ t('order.myOrders.actions.markProcessed') }}</a-button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-dropdown trigger="click" position="bl" :disabled="!!actionLoadingKey">
|
||||
<a-button class="app-btn-toolbar btn-more" :disabled="!!actionLoadingKey">
|
||||
{{ t('order.myOrders.actions.more') }}
|
||||
<icon-down class="btn-more-arrow" />
|
||||
</a-button>
|
||||
<template #content>
|
||||
<div class="toolbar-more-menu">
|
||||
<div
|
||||
v-if="
|
||||
(!isToolbarExposed('stockBind') && showStockBindAction) ||
|
||||
(!isToolbarExposed('createPickup') && showCreatePickupAction) ||
|
||||
showInterceptActions ||
|
||||
showModifyOrderAction
|
||||
"
|
||||
class="toolbar-more-menu__group"
|
||||
>
|
||||
履约
|
||||
</div>
|
||||
<a-doption
|
||||
v-if="!isToolbarExposed('stockBind') && showStockBindAction"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
@click="openStockBindModal"
|
||||
>{{ t(stockBindLabelKey) }}</a-doption>
|
||||
<a-doption
|
||||
v-if="!isToolbarExposed('createPickup') && showCreatePickupAction"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
@click="handleCreatePickup"
|
||||
>{{ t('order.myOrders.actions.createPickup') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showInterceptActions"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="handleIntercept"
|
||||
>{{ t('order.myOrders.actions.intercept') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showInterceptActions"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="handleCancelIntercept"
|
||||
>{{ t('order.myOrders.actions.cancelIntercept') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showModifyOrderAction"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="handleModifyOrder"
|
||||
>{{ t('order.myOrders.actions.modifyOrder') }}</a-doption>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
(!isToolbarExposed('pay') && showPayAction) ||
|
||||
(!isToolbarExposed('predeclare') && showPredeclareAction) ||
|
||||
(!isToolbarExposed('batchPrint') && showPrintAction)
|
||||
"
|
||||
class="toolbar-more-menu__group"
|
||||
>
|
||||
面单
|
||||
</div>
|
||||
<a-doption
|
||||
v-if="!isToolbarExposed('pay') && showPayAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('pay')"
|
||||
@click="handlePay"
|
||||
>{{ t('order.myOrders.actions.pay') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="!isToolbarExposed('predeclare') && showPredeclareAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('predeclare')"
|
||||
@click="handlePreDeclare"
|
||||
>{{ t('order.myOrders.actions.predeclare') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="!isToolbarExposed('batchPrint') && showPrintAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('batchPrint')"
|
||||
@click="handleBatchPrint"
|
||||
>{{ t('order.myOrders.actions.batchPrint') }}</a-doption>
|
||||
|
||||
<div v-if="showExceptionCreateActions" class="toolbar-more-menu__group">
|
||||
异常
|
||||
</div>
|
||||
<a-doption
|
||||
v-if="showExceptionCreateActions"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('markProblematic')"
|
||||
@click="openProblematicModal"
|
||||
>{{ t('order.myOrders.actions.createProblematic') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showExceptionCreateActions"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('markClaimed')"
|
||||
@click="openClaimedModal"
|
||||
>{{ t('order.myOrders.actions.createClaimed') }}</a-doption>
|
||||
|
||||
<div class="toolbar-more-menu__group">其它</div>
|
||||
<a-doption
|
||||
:disabled="isActionBusy('export')"
|
||||
@click="handleExport"
|
||||
>{{ t('order.myOrders.actions.export') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showDeleteAction"
|
||||
class="toolbar-more-menu__danger"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="handleDelete"
|
||||
>{{ t('order.myOrders.actions.delete') }}</a-doption>
|
||||
</div>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
|
||||
<div class="toolbar-right">
|
||||
<div class="pagination-controls">
|
||||
<PaginationPro
|
||||
:total-count="totalCount"
|
||||
@ -2161,6 +2302,13 @@
|
||||
@page-change="handlePageChange"
|
||||
@page-size-change="handlePageSizeChange"
|
||||
/>
|
||||
<a-tooltip :content="t('order.myOrders.columnConfig.open')">
|
||||
<a-button type="text" class="column-config-icon-btn" @click="openColumnConfig">
|
||||
<template #icon>
|
||||
<IconSettings />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -2180,6 +2328,7 @@
|
||||
:stretch-columns="true"
|
||||
:height="tableHeight"
|
||||
:search-params="headerSearchParams"
|
||||
:extra-active-filters="pageFilterChips"
|
||||
:empty-text="t('order.myOrders.empty.hint')"
|
||||
sort-mode="remote"
|
||||
:sort-field="listSortField"
|
||||
@ -2188,6 +2337,8 @@
|
||||
@sort-change="handleSortChange"
|
||||
@action-click="handleActionClick"
|
||||
@selection-change="handleSelectionChange"
|
||||
@extra-filter-clear="onExtraFilterClear"
|
||||
@extra-filter-clear-all="onExtraFilterClearAll"
|
||||
>
|
||||
<template #emptyExtra>
|
||||
<a-button class="app-btn-primary-soft" @click="router.push(placeOrderPath)">
|
||||
@ -2295,26 +2446,31 @@
|
||||
.tabs-actions-section {
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
padding: 10px 16px;
|
||||
padding: 6px 12px;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid var(--color-border-2);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
gap: 12px;
|
||||
gap: 6px 12px;
|
||||
flex-shrink: 0;
|
||||
min-height: 52px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.tabs-slot {
|
||||
flex: 1 1 auto;
|
||||
flex: 1 1 560px;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.toolbar-left {
|
||||
flex: 0 1 auto;
|
||||
min-width: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
:deep(.t-tabs) {
|
||||
flex: 0 1 auto;
|
||||
min-width: 0;
|
||||
@ -2327,9 +2483,9 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
gap: 12px;
|
||||
margin-bottom: 0;
|
||||
padding: 12px 16px;
|
||||
padding: 8px 12px;
|
||||
background: var(--app-card-bg);
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
@ -2389,8 +2545,8 @@
|
||||
.handle-status-segments {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 4px;
|
||||
gap: 6px;
|
||||
padding: 3px;
|
||||
background: var(--color-fill-2);
|
||||
border-radius: 8px;
|
||||
flex-wrap: wrap;
|
||||
@ -2401,9 +2557,9 @@
|
||||
.handle-status-segment {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
height: 32px;
|
||||
padding: 0 14px;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
padding: 0 12px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
@ -2447,20 +2603,11 @@
|
||||
.actions-right {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--app-button-gap, 8px);
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
:deep(.arco-btn) {
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
:deep(.arco-btn.btn-more) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@ -2481,18 +2628,18 @@
|
||||
justify-content: flex-end;
|
||||
padding: 0;
|
||||
max-width: 100%;
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
|
||||
.list-filters {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
height: 32px;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
|
||||
:deep(.arco-input-wrapper),
|
||||
:deep(.arco-btn) {
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
:deep(.arco-input-wrapper) {
|
||||
@ -2504,7 +2651,7 @@
|
||||
}
|
||||
|
||||
.list-date-toggle {
|
||||
width: 32px;
|
||||
width: 28px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@ -2512,7 +2659,7 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.list-date-help {
|
||||
@ -2550,13 +2697,11 @@
|
||||
}
|
||||
|
||||
.table-toolbar {
|
||||
padding: 12px 16px 0;
|
||||
margin-bottom: 12px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
gap: 8px;
|
||||
|
||||
.toolbar-right {
|
||||
display: flex;
|
||||
@ -2565,22 +2710,25 @@
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
|
||||
.selected-count {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-3);
|
||||
white-space: nowrap;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.column-config-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.pagination-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
|
||||
.column-config-icon-btn {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--color-text-3);
|
||||
box-shadow: none;
|
||||
|
||||
&:hover {
|
||||
color: var(--color-text-2);
|
||||
background: var(--color-fill-2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2753,4 +2901,29 @@
|
||||
height: 28px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
/* Dropdown 挂到 body,需非 scoped */
|
||||
.toolbar-more-menu {
|
||||
min-width: 180px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.toolbar-more-menu__group {
|
||||
margin: 6px 12px 2px;
|
||||
font-size: 11px;
|
||||
font-weight: 650;
|
||||
letter-spacing: 0.04em;
|
||||
color: rgba(26, 46, 56, 0.4);
|
||||
line-height: 20px;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.toolbar-more-menu__danger {
|
||||
color: #c45c4a !important;
|
||||
}
|
||||
</style>
|
||||
@ -1254,6 +1254,7 @@ onMounted(() => {
|
||||
<div class="tabs-actions-section">
|
||||
<div class="tabs-slot pk-direction-tabs">
|
||||
<SlidingTabs
|
||||
size="mini"
|
||||
v-model="directionFilter"
|
||||
:items="directionTabs"
|
||||
@change="handleDirectionTabChange"
|
||||
@ -1302,6 +1303,7 @@ onMounted(() => {
|
||||
|
||||
<div class="pk-status-tabs">
|
||||
<SlidingTabs
|
||||
size="mini"
|
||||
v-model="statusFilter"
|
||||
:items="slidingStatusTabs"
|
||||
@change="handleStatusTabChange"
|
||||
@ -1309,10 +1311,17 @@ onMounted(() => {
|
||||
</div>
|
||||
|
||||
<div class="table-toolbar">
|
||||
<div class="actions-right">
|
||||
<div class="actions-right" :class="{ 'has-selection': selectedRowCount > 0 }">
|
||||
<span class="selected-count" :class="{ 'has-selection': selectedRowCount > 0 }">
|
||||
<i18n-t keypath="order.pickupOrder.selectedCount" tag="span" scope="global">
|
||||
<template #count>
|
||||
<span class="count-number">{{ selectedRowCount }}</span>
|
||||
</template>
|
||||
</i18n-t>
|
||||
</span>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.Pickup.Create')"
|
||||
class="btn-add app-btn-primary-soft"
|
||||
class="app-btn-primary-soft"
|
||||
@click="handleOpenCreate"
|
||||
>
|
||||
{{
|
||||
@ -1321,42 +1330,42 @@ onMounted(() => {
|
||||
: t('order.pickupOrder.actions.createForward')
|
||||
}}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.Pickup.Create')"
|
||||
class="app-btn-toolbar"
|
||||
:loading="batchPaying"
|
||||
:disabled="!hasSelectedRows || batchPaying"
|
||||
@click="handleBatchPay"
|
||||
>
|
||||
{{ t('order.pickupOrder.actions.batchPay') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="canCreateTrack"
|
||||
class="app-btn-toolbar"
|
||||
:loading="batchTrackUpserting"
|
||||
:disabled="!hasSelectedRows || batchTrackUpserting"
|
||||
@click="handleCreateTrackOrder"
|
||||
>
|
||||
{{ t('order.myOrders.actions.createTrackOrder') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="canForwardDownstream"
|
||||
class="app-btn-toolbar"
|
||||
:loading="batchDownstreamForwarding"
|
||||
:disabled="!hasSelectedRows || batchDownstreamForwarding"
|
||||
@click="handleForwardDownstreamCreate"
|
||||
>
|
||||
{{ t('order.myOrders.actions.forwardDownstreamCreate') }}
|
||||
</a-button>
|
||||
<div class="toolbar-secondary" :aria-hidden="selectedRowCount === 0">
|
||||
<div class="toolbar-secondary__inner">
|
||||
<a-button
|
||||
v-if="hasPermission('Order.Pickup.Create')"
|
||||
class="app-btn-toolbar"
|
||||
:title="hasSelectedRows ? undefined : '请先勾选取件单'"
|
||||
:loading="batchPaying"
|
||||
:disabled="!hasSelectedRows || batchPaying"
|
||||
@click="handleBatchPay"
|
||||
>
|
||||
{{ t('order.pickupOrder.actions.batchPay') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="canCreateTrack"
|
||||
class="app-btn-toolbar"
|
||||
:title="hasSelectedRows ? undefined : '请先勾选取件单'"
|
||||
:loading="batchTrackUpserting"
|
||||
:disabled="!hasSelectedRows || batchTrackUpserting"
|
||||
@click="handleCreateTrackOrder"
|
||||
>
|
||||
{{ t('order.myOrders.actions.createTrackOrder') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="canForwardDownstream"
|
||||
class="app-btn-toolbar"
|
||||
:title="hasSelectedRows ? undefined : '请先勾选取件单'"
|
||||
:loading="batchDownstreamForwarding"
|
||||
:disabled="!hasSelectedRows || batchDownstreamForwarding"
|
||||
@click="handleForwardDownstreamCreate"
|
||||
>
|
||||
{{ t('order.myOrders.actions.forwardDownstreamCreate') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<span class="selected-count">
|
||||
<i18n-t keypath="order.pickupOrder.selectedCount" tag="span" scope="global">
|
||||
<template #count>
|
||||
<span class="count-number">{{ selectedRowCount }}</span>
|
||||
</template>
|
||||
</i18n-t>
|
||||
</span>
|
||||
<PaginationPro
|
||||
:total-count="totalCount"
|
||||
v-model:current-page="currentPage"
|
||||
@ -1540,27 +1549,26 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.pk-status-tabs {
|
||||
padding: 0 16px 8px;
|
||||
padding: 4px 12px 6px;
|
||||
border-bottom: 1px solid var(--color-border-2);
|
||||
}
|
||||
|
||||
.tabs-actions-section {
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
padding: 10px 16px;
|
||||
padding: 6px 12px;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid var(--color-border-2);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
gap: 12px;
|
||||
gap: 6px 12px;
|
||||
flex-shrink: 0;
|
||||
min-height: 52px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.tabs-slot {
|
||||
flex: 1 1 auto;
|
||||
flex: 1 1 420px;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -1575,26 +1583,27 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.toolbar-left {
|
||||
flex: 0 0 auto;
|
||||
flex: 0 1 auto;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
height: 32px;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
max-width: 100%;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.list-filters {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
height: 32px;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
|
||||
:deep(.arco-select-view),
|
||||
:deep(.arco-input-wrapper),
|
||||
:deep(.arco-btn) {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
:deep(.arco-select-view-single) {
|
||||
@ -1620,15 +1629,15 @@ onMounted(() => {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 4px;
|
||||
color: var(--app-primary-color);
|
||||
cursor: help;
|
||||
flex-shrink: 0;
|
||||
|
||||
:deep(svg) {
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@ -1640,10 +1649,11 @@ onMounted(() => {
|
||||
.actions-right {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
}
|
||||
|
||||
.toolbar-right {
|
||||
@ -1652,13 +1662,6 @@ onMounted(() => {
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
|
||||
.selected-count {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-3);
|
||||
white-space: nowrap;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -419,6 +419,7 @@ function handleActionClick(row: any, _i: number, action?: string) {
|
||||
<div class="tabs-actions-section">
|
||||
<div class="tabs-slot">
|
||||
<SlidingTabs
|
||||
size="mini"
|
||||
v-model="platformCode"
|
||||
:items="slidingPlatformTabs"
|
||||
@change="handlePlatformTabChange"
|
||||
@ -642,18 +643,17 @@ function handleActionClick(row: any, _i: number, action?: string) {
|
||||
|
||||
.tabs-actions-section {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
gap: 12px;
|
||||
gap: 6px 12px;
|
||||
flex-shrink: 0;
|
||||
padding: 10px 16px;
|
||||
padding: 6px 12px;
|
||||
border-bottom: 1px solid var(--color-border-2);
|
||||
min-height: 52px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.tabs-slot {
|
||||
flex: 1 1 auto;
|
||||
flex: 1 1 420px;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -668,24 +668,25 @@ function handleActionClick(row: any, _i: number, action?: string) {
|
||||
}
|
||||
|
||||
.toolbar-left {
|
||||
flex: 0 0 auto;
|
||||
flex: 0 1 auto;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
max-width: 100%;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.list-filters {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
height: 32px;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
|
||||
:deep(.arco-select-view),
|
||||
:deep(.arco-input-wrapper),
|
||||
:deep(.arco-btn) {
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
:deep(.arco-select-view-single),
|
||||
|
||||
@ -3,6 +3,7 @@ import { computed, defineAsyncComponent, nextTick, onMounted, ref, watch } from
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { Modal } from '@arco-design/web-vue'
|
||||
import { IconDown } from '@arco-design/web-vue/es/icon'
|
||||
import HandsontablePro from '@/components/HandsontablePro/index.vue'
|
||||
import PaginationPro from '@/components/PaginationPro/index.vue'
|
||||
import SlidingTabs from '@/components/SlidingTabs/index.vue'
|
||||
@ -769,6 +770,7 @@ watch(
|
||||
<div class="tabs-actions-section tabs-actions-section--platform">
|
||||
<div class="tabs-slot">
|
||||
<SlidingTabs
|
||||
size="mini"
|
||||
:model-value="platformCode"
|
||||
:items="slidingPlatformTabs"
|
||||
@change="handlePlatformTabChange"
|
||||
@ -778,6 +780,7 @@ watch(
|
||||
<div class="tabs-actions-section">
|
||||
<div class="tabs-slot">
|
||||
<SlidingTabs
|
||||
size="mini"
|
||||
:model-value="fulfillStatus"
|
||||
:items="slidingStatusTabs"
|
||||
@change="handleStatusTabChange"
|
||||
@ -813,19 +816,19 @@ watch(
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-toolbar">
|
||||
<div class="actions-right">
|
||||
<a-button
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.Sync')"
|
||||
class="app-btn-toolbar"
|
||||
:loading="runningAction === 'sync'"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="handleSyncStatus"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.syncStatus') }}
|
||||
</a-button>
|
||||
<div class="actions-right" :class="{ 'has-selection': selectedRowCount > 0 }">
|
||||
<span class="selected-count" :class="{ 'has-selection': selectedRowCount > 0 }">
|
||||
<i18n-t keypath="order.myOrders.selectedCount" tag="span" scope="global">
|
||||
<template #count>
|
||||
<span class="count-number">{{ selectedRowCount }}</span>
|
||||
</template>
|
||||
</i18n-t>
|
||||
</span>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.Rts')"
|
||||
class="app-btn-toolbar"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="hasSelectedRows ? undefined : '请先勾选订单'"
|
||||
:loading="runningAction === 'rts'"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="handleReadyToShip()"
|
||||
@ -833,68 +836,97 @@ watch(
|
||||
{{ t('order.platformStoreOrder.actions.readyToShip') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.Label')"
|
||||
class="app-btn-toolbar"
|
||||
:loading="runningAction === 'label'"
|
||||
v-else-if="hasPermission('Order.PlatformStoreOrder.Sync')"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="hasSelectedRows ? undefined : '请先勾选订单'"
|
||||
:loading="runningAction === 'sync'"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="handleFetchLabel"
|
||||
@click="handleSyncStatus"
|
||||
>
|
||||
<template v-if="runningAction === 'label' && labelProgress.total > 1">
|
||||
{{ t('order.platformStoreOrder.actions.fetchLabelProgress', labelProgress) }}
|
||||
{{ t('order.platformStoreOrder.actions.syncStatus') }}
|
||||
</a-button>
|
||||
<div class="toolbar-secondary" :aria-hidden="selectedRowCount === 0">
|
||||
<div class="toolbar-secondary__inner">
|
||||
<a-button
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.Sync') && hasPermission('Order.PlatformStoreOrder.Rts')"
|
||||
class="app-btn-toolbar"
|
||||
:title="hasSelectedRows ? undefined : '请先勾选订单'"
|
||||
:loading="runningAction === 'sync'"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="handleSyncStatus"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.syncStatus') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.Label')"
|
||||
class="app-btn-toolbar"
|
||||
:title="hasSelectedRows ? undefined : '请先勾选订单'"
|
||||
:loading="runningAction === 'label'"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="handleFetchLabel"
|
||||
>
|
||||
<template v-if="runningAction === 'label' && labelProgress.total > 1">
|
||||
{{ t('order.platformStoreOrder.actions.fetchLabelProgress', labelProgress) }}
|
||||
</template>
|
||||
<template v-else>{{ t('order.platformStoreOrder.actions.fetchLabel') }}</template>
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<a-dropdown trigger="click" position="bl" :disabled="actionLoading">
|
||||
<a-button class="app-btn-toolbar btn-more" :disabled="actionLoading">
|
||||
{{ t('order.myOrders.actions.more') }}
|
||||
<IconDown class="btn-more-arrow" />
|
||||
</a-button>
|
||||
<template #content>
|
||||
<div class="toolbar-more-menu">
|
||||
<div class="toolbar-more-menu__group">履约</div>
|
||||
<a-doption
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.CreateLogistics')"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="openCreateModal('logistics')"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.createLogistics') }}
|
||||
</a-doption>
|
||||
<a-doption
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.CreateFulfill')"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="openCreateModal('fulfill')"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.createFulfill') }}
|
||||
</a-doption>
|
||||
<a-doption
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.CreateFulfillWms')"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="openCreateModal('fulfillWms')"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.createFulfillWms') }}
|
||||
</a-doption>
|
||||
<div
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.ToggleSuspend')"
|
||||
class="toolbar-more-menu__group"
|
||||
>
|
||||
状态
|
||||
</div>
|
||||
<a-doption
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.ToggleSuspend')"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="handleSuspendBatch(true)"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.suspend') }}
|
||||
</a-doption>
|
||||
<a-doption
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.ToggleSuspend')"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="handleSuspendBatch(false)"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.resume') }}
|
||||
</a-doption>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>{{ t('order.platformStoreOrder.actions.fetchLabel') }}</template>
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.ToggleSuspend')"
|
||||
class="app-btn-toolbar"
|
||||
:loading="runningAction === 'suspend'"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="handleSuspendBatch(true)"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.suspend') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.ToggleSuspend')"
|
||||
class="app-btn-toolbar"
|
||||
:loading="runningAction === 'resume'"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="handleSuspendBatch(false)"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.resume') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.CreateLogistics')"
|
||||
class="app-btn-toolbar"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="openCreateModal('logistics')"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.createLogistics') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.CreateFulfill')"
|
||||
class="app-btn-toolbar"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="openCreateModal('fulfill')"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.createFulfill') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="hasPermission('Order.PlatformStoreOrder.CreateFulfillWms')"
|
||||
class="app-btn-toolbar"
|
||||
:disabled="!hasSelectedRows || actionLoading"
|
||||
@click="openCreateModal('fulfillWms')"
|
||||
>
|
||||
{{ t('order.platformStoreOrder.actions.createFulfillWms') }}
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<span class="selected-count">
|
||||
<i18n-t keypath="order.myOrders.selectedCount" tag="span" scope="global">
|
||||
<template #count>
|
||||
<span class="count-number">{{ selectedRowCount }}</span>
|
||||
</template>
|
||||
</i18n-t>
|
||||
</span>
|
||||
<PaginationPro
|
||||
:total-count="totalCount"
|
||||
v-model:current-page="currentPage"
|
||||
@ -962,23 +994,21 @@ watch(
|
||||
|
||||
.tabs-actions-section {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
gap: 12px;
|
||||
gap: 6px 12px;
|
||||
flex-shrink: 0;
|
||||
padding: 10px 16px;
|
||||
padding: 6px 12px;
|
||||
border-bottom: 1px solid var(--color-border-2);
|
||||
min-height: 52px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&--platform {
|
||||
min-height: 48px;
|
||||
border-bottom-color: var(--color-border-1);
|
||||
}
|
||||
|
||||
.tabs-slot {
|
||||
flex: 1 1 auto;
|
||||
flex: 1 1 420px;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -993,24 +1023,25 @@ watch(
|
||||
}
|
||||
|
||||
.toolbar-left {
|
||||
flex: 0 0 auto;
|
||||
flex: 0 1 auto;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
max-width: 100%;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.list-filters {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
height: 32px;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
|
||||
:deep(.arco-select-view),
|
||||
:deep(.arco-input-wrapper),
|
||||
:deep(.arco-btn) {
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
:deep(.arco-select-view-single),
|
||||
@ -1030,10 +1061,21 @@ watch(
|
||||
.actions-right {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
:deep(.arco-btn.btn-more) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
|
||||
.btn-more-arrow {
|
||||
font-size: 12px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.toolbar-right {
|
||||
@ -1042,13 +1084,26 @@ watch(
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
|
||||
.selected-count {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-3);
|
||||
white-space: nowrap;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
.toolbar-more-menu {
|
||||
min-width: 180px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.toolbar-more-menu__group {
|
||||
margin: 6px 12px 2px;
|
||||
font-size: 11px;
|
||||
font-weight: 650;
|
||||
letter-spacing: 0.04em;
|
||||
color: rgba(26, 46, 56, 0.4);
|
||||
line-height: 20px;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
import dayjs from 'dayjs';
|
||||
import HandsontablePro from '@/components/HandsontablePro/index.vue';
|
||||
import PaginationPro from '@/components/PaginationPro/index.vue';
|
||||
import SlidingTabs from '@/components/SlidingTabs/index.vue';
|
||||
import OrderStatusFilterTabs from '@/components/OrderStatusFilterTabs/index.vue';
|
||||
import { useTableContainerHeight } from '@/composables/useTableContainerHeight';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import {
|
||||
@ -609,6 +609,78 @@
|
||||
isActiveTab('all', 'pendingOnline', 'shipping', 'deliverySuccess', 'deliveryFailed'),
|
||||
);
|
||||
|
||||
/** 工具栏外露动作:情境主按钮 + 最多 2 个次要,其余进「更多」分组 */
|
||||
type ToolbarActionId =
|
||||
| 'markProcessed'
|
||||
| 'pay'
|
||||
| 'predeclare'
|
||||
| 'downstream'
|
||||
| 'batchPrint'
|
||||
| 'stockBind'
|
||||
| 'getDownstreamFile'
|
||||
|
||||
function isToolbarActionVisible(id: ToolbarActionId) {
|
||||
switch (id) {
|
||||
case 'markProcessed':
|
||||
return showMarkProcessedAction.value
|
||||
case 'pay':
|
||||
return showPayAction.value
|
||||
case 'predeclare':
|
||||
return showPredeclareAction.value
|
||||
case 'downstream':
|
||||
return showDownstreamAction.value
|
||||
case 'batchPrint':
|
||||
return showPrintAction.value
|
||||
case 'stockBind':
|
||||
return showStockBindAction.value
|
||||
case 'getDownstreamFile':
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
const primaryToolbarAction = computed<ToolbarActionId | null>(() => {
|
||||
if (showMarkProcessedAction.value) return 'markProcessed'
|
||||
if (activeTab.value === 'pendingPayment' && showPayAction.value) return 'pay'
|
||||
if (
|
||||
(activeTab.value === 'draft' || activeTab.value === 'predeclared') &&
|
||||
showPredeclareAction.value
|
||||
) {
|
||||
return 'predeclare'
|
||||
}
|
||||
if (showPrintAction.value) return 'batchPrint'
|
||||
if (showDownstreamAction.value) return 'downstream'
|
||||
if (showPayAction.value) return 'pay'
|
||||
if (showPredeclareAction.value) return 'predeclare'
|
||||
if (showStockBindAction.value) return 'stockBind'
|
||||
return 'getDownstreamFile'
|
||||
})
|
||||
|
||||
const secondaryToolbarActions = computed<ToolbarActionId[]>(() => {
|
||||
const primary = primaryToolbarAction.value
|
||||
const order: ToolbarActionId[] = [
|
||||
'pay',
|
||||
'predeclare',
|
||||
'downstream',
|
||||
'batchPrint',
|
||||
'getDownstreamFile',
|
||||
'stockBind',
|
||||
'markProcessed',
|
||||
]
|
||||
return order
|
||||
.filter((id) => id !== primary && isToolbarActionVisible(id))
|
||||
.slice(0, 2)
|
||||
})
|
||||
|
||||
function isToolbarExposed(id: ToolbarActionId) {
|
||||
return primaryToolbarAction.value === id || secondaryToolbarActions.value.includes(id)
|
||||
}
|
||||
|
||||
const needSelectHint = computed(() =>
|
||||
selectedRowCount.value === 0 ? '请先勾选运单' : undefined,
|
||||
)
|
||||
|
||||
const stockBindModalVisible = ref(false);
|
||||
const stockBindOrderIds = ref<number[]>([]);
|
||||
/** 本次打开绑定前是否含直发单(用于成功后提示已转代发) */
|
||||
@ -671,11 +743,21 @@
|
||||
);
|
||||
|
||||
const slidingTabItems = computed(() =>
|
||||
tabs.value.map((tab) => ({
|
||||
key: tab.key,
|
||||
label: t(tab.labelKey),
|
||||
badge: tab.showCount && tab.count != null ? tab.count : undefined,
|
||||
})),
|
||||
tabs.value.map((tab) => {
|
||||
const count = tab.showCount && tab.count != null ? tab.count : undefined
|
||||
// 0 不展示角标,减轻噪声;「全部」始终展示
|
||||
const badge =
|
||||
count == null
|
||||
? undefined
|
||||
: tab.key === 'all' || Number(count) > 0
|
||||
? count
|
||||
: undefined
|
||||
return {
|
||||
key: tab.key,
|
||||
label: t(tab.labelKey),
|
||||
badge,
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
async function loadTabCounts() {
|
||||
@ -864,6 +946,129 @@
|
||||
|
||||
const dateFilterExpanded = ref(false);
|
||||
|
||||
function formatPageDateChipText() {
|
||||
if (timeWindowRelaxed.value && !createTimeRange.value?.length) return '不限';
|
||||
const range = createTimeRange.value;
|
||||
if (!range || range.length < 2 || !range[0] || !range[1]) return '';
|
||||
const start = dayjs(range[0]).format('MM-DD');
|
||||
const end = dayjs(range[1]).format('MM-DD');
|
||||
return `${start} ~ ${end}`;
|
||||
}
|
||||
|
||||
/** 页面级筛选芯片(与表头筛选合并进 ActiveFilterBar) */
|
||||
const pageFilterChips = computed(() => {
|
||||
const items: Array<{ key: string; label: string; text: string; kind: 'filter' }> = [];
|
||||
const kw = listKeyword.value.trim();
|
||||
if (kw) {
|
||||
items.push({
|
||||
key: 'page:keyword',
|
||||
label: '关键词',
|
||||
text: kw.length > 24 ? `${kw.slice(0, 24)}…` : kw,
|
||||
kind: 'filter',
|
||||
});
|
||||
}
|
||||
if (!usingDefaultTimeWindow.value) {
|
||||
const dateText = formatPageDateChipText();
|
||||
if (dateText) {
|
||||
items.push({ key: 'page:date', label: '创建时间', text: dateText, kind: 'filter' });
|
||||
}
|
||||
}
|
||||
if (activeTab.value !== ORDER_STATUS_ALL) {
|
||||
const meta = getOrderStatusMeta(activeTab.value);
|
||||
items.push({
|
||||
key: 'page:status',
|
||||
label: '状态',
|
||||
text: meta ? t(meta.labelKey) : activeTab.value,
|
||||
kind: 'filter',
|
||||
});
|
||||
}
|
||||
if (showHandleSubTabs.value && activeHandleTab.value !== ORDER_HANDLE_STATUS_ALL) {
|
||||
const meta = getOrderHandleStatusMeta(activeHandleTab.value);
|
||||
items.push({
|
||||
key: 'page:handle',
|
||||
label: '处理',
|
||||
text: meta ? t(meta.labelKey) : activeHandleTab.value,
|
||||
kind: 'filter',
|
||||
});
|
||||
}
|
||||
const qProduct = Array.isArray(route.query.productCode)
|
||||
? route.query.productCode[0]
|
||||
: route.query.productCode;
|
||||
if (typeof qProduct === 'string' && qProduct.trim()) {
|
||||
items.push({ key: 'page:product', label: '产品', text: qProduct.trim(), kind: 'filter' });
|
||||
}
|
||||
const qCountry = Array.isArray(route.query.consigneeCountry)
|
||||
? route.query.consigneeCountry[0]
|
||||
: route.query.consigneeCountry;
|
||||
if (typeof qCountry === 'string' && qCountry.trim()) {
|
||||
items.push({
|
||||
key: 'page:country',
|
||||
label: '目的国',
|
||||
text: qCountry.trim().toUpperCase(),
|
||||
kind: 'filter',
|
||||
});
|
||||
}
|
||||
return items;
|
||||
});
|
||||
|
||||
function clearPageDrilldownQuery(keys: Array<'productCode' | 'consigneeCountry'>) {
|
||||
const nextQuery = { ...route.query };
|
||||
let changed = false;
|
||||
for (const key of keys) {
|
||||
if (nextQuery[key] != null) {
|
||||
delete nextQuery[key];
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
router.replace({ query: nextQuery });
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
function onExtraFilterClear(key: string) {
|
||||
if (key === 'page:keyword') {
|
||||
listKeyword.value = '';
|
||||
handleSearch();
|
||||
return;
|
||||
}
|
||||
if (key === 'page:date') {
|
||||
restoreDefaultTimeWindow();
|
||||
dateFilterExpanded.value = false;
|
||||
handleSearch();
|
||||
return;
|
||||
}
|
||||
if (key === 'page:status') {
|
||||
handleTabChange(ORDER_STATUS_ALL);
|
||||
return;
|
||||
}
|
||||
if (key === 'page:handle') {
|
||||
handleHandleTabChange(ORDER_HANDLE_STATUS_ALL);
|
||||
return;
|
||||
}
|
||||
if (key === 'page:product') {
|
||||
clearPageDrilldownQuery(['productCode']);
|
||||
handleSearch();
|
||||
return;
|
||||
}
|
||||
if (key === 'page:country') {
|
||||
clearPageDrilldownQuery(['consigneeCountry']);
|
||||
handleSearch();
|
||||
}
|
||||
}
|
||||
|
||||
/** clear-all 时只改状态;表头清除后 Handsontable 会 emit search */
|
||||
function onExtraFilterClearAll() {
|
||||
listKeyword.value = '';
|
||||
restoreDefaultTimeWindow();
|
||||
dateFilterExpanded.value = false;
|
||||
activeHandleTab.value = ORDER_HANDLE_STATUS_ALL;
|
||||
if (activeTab.value !== ORDER_STATUS_ALL) {
|
||||
activeTab.value = ORDER_STATUS_ALL;
|
||||
}
|
||||
clearPageDrilldownQuery(['productCode', 'consigneeCountry']);
|
||||
}
|
||||
|
||||
function restoreDefaultTimeWindow() {
|
||||
createTimeRange.value = [...buildDefaultCreateTimeRange()];
|
||||
timeWindowRelaxed.value = false;
|
||||
@ -2262,13 +2467,12 @@
|
||||
<div class="table-section">
|
||||
<div class="tabs-actions-section">
|
||||
<div class="tabs-slot">
|
||||
<SlidingTabs
|
||||
<OrderStatusFilterTabs
|
||||
:model-value="activeTab"
|
||||
:items="slidingTabItems"
|
||||
@change="handleTabChange"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="toolbar-left">
|
||||
<div class="list-filters">
|
||||
<a-input
|
||||
@ -2358,55 +2562,78 @@
|
||||
<!-- 订单表格区域 -->
|
||||
<!-- 表格操作按钮和分页控制 -->
|
||||
<div class="table-toolbar">
|
||||
<div class="actions-right">
|
||||
<div class="actions-right" :class="{ 'has-selection': selectedRowCount > 0 }">
|
||||
<span class="selected-count" :class="{ 'has-selection': selectedRowCount > 0 }">
|
||||
<i18n-t keypath="order.myOrders.selectedCount" tag="span" scope="global">
|
||||
<template #count>
|
||||
<span class="count-number">{{ selectedRowCount }}</span>
|
||||
</template>
|
||||
</i18n-t>
|
||||
</span>
|
||||
|
||||
<a-button
|
||||
v-if="showMarkProcessedAction"
|
||||
class="app-btn-toolbar"
|
||||
v-if="primaryToolbarAction === 'markProcessed'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('markProcessed')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('markProcessed')"
|
||||
@click="handleMarkProcessed"
|
||||
>{{ t('order.myOrders.actions.markProcessed') }}</a-button>
|
||||
<a-button
|
||||
v-if="showPayAction"
|
||||
class="app-btn-toolbar"
|
||||
v-else-if="primaryToolbarAction === 'pay'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('pay')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('pay')"
|
||||
@click="handlePay"
|
||||
>{{ t('order.myOrders.actions.pay') }}</a-button>
|
||||
<a-button
|
||||
v-if="showPredeclareAction"
|
||||
class="app-btn-toolbar"
|
||||
v-else-if="primaryToolbarAction === 'predeclare'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('predeclare')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('predeclare')"
|
||||
@click="handlePreDeclare"
|
||||
>{{ t('order.myOrders.actions.predeclare') }}</a-button>
|
||||
<a-button
|
||||
v-if="showDownstreamAction"
|
||||
class="app-btn-toolbar"
|
||||
v-else-if="primaryToolbarAction === 'downstream'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('downstream')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('downstream')"
|
||||
@click="handleForwardDownstreamCreate"
|
||||
>{{ t('order.myOrders.actions.forwardDownstreamCreate') }}</a-button>
|
||||
<a-button
|
||||
v-if="showPrintAction"
|
||||
class="app-btn-toolbar"
|
||||
v-else-if="primaryToolbarAction === 'batchPrint'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('batchPrint')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('batchPrint')"
|
||||
@click="handleBatchPrint"
|
||||
>{{ t('order.myOrders.actions.batchPrint') }}</a-button>
|
||||
<a-button
|
||||
v-if="showStockBindAction"
|
||||
class="app-btn-toolbar"
|
||||
v-else-if="primaryToolbarAction === 'stockBind'"
|
||||
type="primary"
|
||||
class="toolbar-cta"
|
||||
:title="needSelectHint"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
@click="openStockBindModal"
|
||||
>{{ t('order.myOrders.actions.stockBindConvert') }}</a-button>
|
||||
<a-dropdown
|
||||
v-else-if="primaryToolbarAction === 'getDownstreamFile'"
|
||||
trigger="click"
|
||||
position="bl"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
>
|
||||
<a-button
|
||||
class="app-btn-toolbar btn-more"
|
||||
type="primary"
|
||||
class="toolbar-cta btn-more"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('getDownstreamFile')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('getDownstreamFile')"
|
||||
>
|
||||
@ -2422,6 +2649,89 @@
|
||||
>{{ tx(opt.labelKey, getDownstreamFileTypeFallback(opt.value)) }}</a-doption>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
|
||||
<div
|
||||
v-if="secondaryToolbarActions.length"
|
||||
class="toolbar-secondary"
|
||||
:aria-hidden="selectedRowCount === 0"
|
||||
>
|
||||
<div class="toolbar-secondary__inner">
|
||||
<template v-for="secId in secondaryToolbarActions" :key="secId">
|
||||
<a-button
|
||||
v-if="secId === 'pay'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('pay')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('pay')"
|
||||
@click="handlePay"
|
||||
>{{ t('order.myOrders.actions.pay') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="secId === 'predeclare'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('predeclare')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('predeclare')"
|
||||
@click="handlePreDeclare"
|
||||
>{{ t('order.myOrders.actions.predeclare') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="secId === 'downstream'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('downstream')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('downstream')"
|
||||
@click="handleForwardDownstreamCreate"
|
||||
>{{ t('order.myOrders.actions.forwardDownstreamCreate') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="secId === 'batchPrint'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('batchPrint')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('batchPrint')"
|
||||
@click="handleBatchPrint"
|
||||
>{{ t('order.myOrders.actions.batchPrint') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="secId === 'stockBind'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
@click="openStockBindModal"
|
||||
>{{ t('order.myOrders.actions.stockBindConvert') }}</a-button>
|
||||
<a-button
|
||||
v-else-if="secId === 'markProcessed'"
|
||||
class="app-btn-toolbar"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('markProcessed')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('markProcessed')"
|
||||
@click="handleMarkProcessed"
|
||||
>{{ t('order.myOrders.actions.markProcessed') }}</a-button>
|
||||
<a-dropdown
|
||||
v-else-if="secId === 'getDownstreamFile'"
|
||||
trigger="click"
|
||||
position="bl"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
>
|
||||
<a-button
|
||||
class="app-btn-toolbar btn-more"
|
||||
:title="needSelectHint"
|
||||
:loading="isActionLoading('getDownstreamFile')"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('getDownstreamFile')"
|
||||
>
|
||||
{{ getDownstreamFileTypeLabel }}
|
||||
<icon-down class="btn-more-arrow" />
|
||||
</a-button>
|
||||
<template #content>
|
||||
<a-doption
|
||||
v-for="opt in DOWNSTREAM_GET_FILE_TYPES"
|
||||
:key="opt.value"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('getDownstreamFile')"
|
||||
@click="handleGetDownstreamFile(opt.value)"
|
||||
>{{ tx(opt.labelKey, getDownstreamFileTypeFallback(opt.value)) }}</a-doption>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-dropdown trigger="click" position="bl" :disabled="!!actionLoadingKey">
|
||||
<a-button
|
||||
class="app-btn-toolbar btn-more"
|
||||
@ -2431,70 +2741,130 @@
|
||||
<icon-down class="btn-more-arrow" />
|
||||
</a-button>
|
||||
<template #content>
|
||||
<a-doption
|
||||
v-if="showExceptionCreateActions"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('markProblematic')"
|
||||
@click="onMoreActionClick('createProblematic')"
|
||||
>{{ t('order.myOrders.actions.createProblematic') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showExceptionCreateActions"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('markClaimed')"
|
||||
@click="onMoreActionClick('createClaimed')"
|
||||
>{{ t('order.myOrders.actions.createClaimed') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showReallocateAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('reallocate')"
|
||||
@click="onMoreActionClick('reallocate')"
|
||||
>{{ t('order.myOrders.actions.reallocate') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showCreateTrackAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('track')"
|
||||
@click="onMoreActionClick('createTrackOrder')"
|
||||
>{{ t('order.myOrders.actions.createTrackOrder') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showInterceptActions"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('intercept')"
|
||||
>{{ t('order.myOrders.actions.intercept') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showInterceptActions"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('cancelIntercept')"
|
||||
>{{ t('order.myOrders.actions.cancelIntercept') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showDeleteAction"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('delete')"
|
||||
>{{ t('order.myOrders.actions.delete') }}</a-doption>
|
||||
<a-doption
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('export')"
|
||||
>{{ t('order.myOrders.actions.export') }}</a-doption>
|
||||
<a-doption @click="onMoreActionClick('importDownstreamWeight')">
|
||||
{{ t('order.waybillManage.importDownstream.action') }}
|
||||
</a-doption>
|
||||
<a-doption
|
||||
v-if="showModifyOrderAction"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('modifyOrder')"
|
||||
>{{ t('order.myOrders.actions.modifyOrder') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showChangeStatusAction"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('changeStatus')"
|
||||
>{{ t('order.myOrders.actions.changeStatus') }}</a-doption>
|
||||
<div class="toolbar-more-menu">
|
||||
<div
|
||||
v-if="
|
||||
(!isToolbarExposed('stockBind') && showStockBindAction) ||
|
||||
showReallocateAction ||
|
||||
showInterceptActions ||
|
||||
showModifyOrderAction
|
||||
"
|
||||
class="toolbar-more-menu__group"
|
||||
>
|
||||
履约
|
||||
</div>
|
||||
<a-doption
|
||||
v-if="!isToolbarExposed('stockBind') && showStockBindAction"
|
||||
:disabled="selectedRowCount === 0 || !!actionLoadingKey"
|
||||
@click="openStockBindModal"
|
||||
>{{ t('order.myOrders.actions.stockBindConvert') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showReallocateAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('reallocate')"
|
||||
@click="onMoreActionClick('reallocate')"
|
||||
>{{ t('order.myOrders.actions.reallocate') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showInterceptActions"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('intercept')"
|
||||
>{{ t('order.myOrders.actions.intercept') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showInterceptActions"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('cancelIntercept')"
|
||||
>{{ t('order.myOrders.actions.cancelIntercept') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showModifyOrderAction"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('modifyOrder')"
|
||||
>{{ t('order.myOrders.actions.modifyOrder') }}</a-doption>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
(!isToolbarExposed('pay') && showPayAction) ||
|
||||
(!isToolbarExposed('predeclare') && showPredeclareAction) ||
|
||||
(!isToolbarExposed('downstream') && showDownstreamAction) ||
|
||||
(!isToolbarExposed('batchPrint') && showPrintAction) ||
|
||||
!isToolbarExposed('getDownstreamFile') ||
|
||||
showCreateTrackAction
|
||||
"
|
||||
class="toolbar-more-menu__group"
|
||||
>
|
||||
面单 / 轨迹
|
||||
</div>
|
||||
<a-doption
|
||||
v-if="!isToolbarExposed('pay') && showPayAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('pay')"
|
||||
@click="handlePay"
|
||||
>{{ t('order.myOrders.actions.pay') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="!isToolbarExposed('predeclare') && showPredeclareAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('predeclare')"
|
||||
@click="handlePreDeclare"
|
||||
>{{ t('order.myOrders.actions.predeclare') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="!isToolbarExposed('downstream') && showDownstreamAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('downstream')"
|
||||
@click="handleForwardDownstreamCreate"
|
||||
>{{ t('order.myOrders.actions.forwardDownstreamCreate') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="!isToolbarExposed('batchPrint') && showPrintAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('batchPrint')"
|
||||
@click="handleBatchPrint"
|
||||
>{{ t('order.myOrders.actions.batchPrint') }}</a-doption>
|
||||
<template v-if="!isToolbarExposed('getDownstreamFile')">
|
||||
<a-doption
|
||||
v-for="opt in DOWNSTREAM_GET_FILE_TYPES"
|
||||
:key="`more-file-${opt.value}`"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('getDownstreamFile')"
|
||||
@click="handleGetDownstreamFile(opt.value)"
|
||||
>{{ tx(opt.labelKey, getDownstreamFileTypeFallback(opt.value)) }}</a-doption>
|
||||
</template>
|
||||
<a-doption
|
||||
v-if="showCreateTrackAction"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('track')"
|
||||
@click="onMoreActionClick('createTrackOrder')"
|
||||
>{{ t('order.myOrders.actions.createTrackOrder') }}</a-doption>
|
||||
|
||||
<div v-if="showExceptionCreateActions" class="toolbar-more-menu__group">
|
||||
异常
|
||||
</div>
|
||||
<a-doption
|
||||
v-if="showExceptionCreateActions"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('markProblematic')"
|
||||
@click="onMoreActionClick('createProblematic')"
|
||||
>{{ t('order.myOrders.actions.createProblematic') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showExceptionCreateActions"
|
||||
:disabled="selectedRowCount === 0 || isActionBusy('markClaimed')"
|
||||
@click="onMoreActionClick('createClaimed')"
|
||||
>{{ t('order.myOrders.actions.createClaimed') }}</a-doption>
|
||||
|
||||
<div class="toolbar-more-menu__group">其它</div>
|
||||
<a-doption
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('export')"
|
||||
>{{ t('order.myOrders.actions.export') }}</a-doption>
|
||||
<a-doption @click="onMoreActionClick('importDownstreamWeight')">
|
||||
{{ t('order.waybillManage.importDownstream.action') }}
|
||||
</a-doption>
|
||||
<a-doption
|
||||
v-if="showChangeStatusAction"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('changeStatus')"
|
||||
>{{ t('order.myOrders.actions.changeStatus') }}</a-doption>
|
||||
<a-doption
|
||||
v-if="showDeleteAction"
|
||||
class="toolbar-more-menu__danger"
|
||||
:disabled="selectedRowCount === 0"
|
||||
@click="onMoreActionClick('delete')"
|
||||
>{{ t('order.myOrders.actions.delete') }}</a-doption>
|
||||
</div>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="toolbar-right">
|
||||
<span class="selected-count">
|
||||
<i18n-t keypath="order.myOrders.selectedCount" tag="span" scope="global">
|
||||
<template #count>
|
||||
<span class="count-number">{{ selectedRowCount }}</span>
|
||||
</template>
|
||||
</i18n-t>
|
||||
</span>
|
||||
<div class="pagination-controls">
|
||||
<PaginationPro
|
||||
:total-count="totalCount"
|
||||
@ -2505,7 +2875,8 @@
|
||||
/>
|
||||
<a-tooltip content="表头配置">
|
||||
<a-button
|
||||
class="app-btn-toolbar column-config-icon-btn"
|
||||
type="text"
|
||||
class="column-config-icon-btn"
|
||||
@click="openColumnConfig"
|
||||
>
|
||||
<template #icon>
|
||||
@ -2541,6 +2912,7 @@
|
||||
:deep-watch-data="false"
|
||||
:height="tableHeight"
|
||||
:search-params="headerSearchParams"
|
||||
:extra-active-filters="pageFilterChips"
|
||||
:empty-text="t('order.waybillManage.empty.hint')"
|
||||
sort-mode="remote"
|
||||
:sort-field="listSortField"
|
||||
@ -2549,6 +2921,8 @@
|
||||
@sort-change="handleSortChange"
|
||||
@action-click="handleActionClick"
|
||||
@selection-change="handleSelectionChange"
|
||||
@extra-filter-clear="onExtraFilterClear"
|
||||
@extra-filter-clear-all="onExtraFilterClearAll"
|
||||
/>
|
||||
</a-spin>
|
||||
</div>
|
||||
@ -2715,26 +3089,31 @@
|
||||
.tabs-actions-section {
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
padding: 6px 16px;
|
||||
padding: 6px 12px;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid var(--color-border-2);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
gap: 12px;
|
||||
gap: 6px 12px;
|
||||
flex-shrink: 0;
|
||||
min-height: 44px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.tabs-slot {
|
||||
flex: 1 1 auto;
|
||||
flex: 1 1 560px;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.toolbar-left {
|
||||
flex: 0 1 auto;
|
||||
min-width: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
:deep(.t-tabs) {
|
||||
flex: 0 1 auto;
|
||||
min-width: 0;
|
||||
@ -2867,20 +3246,11 @@
|
||||
.actions-right {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--app-button-gap, 8px);
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
:deep(.arco-btn) {
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
:deep(.arco-btn.btn-more) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@ -2893,26 +3263,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
.toolbar-left {
|
||||
flex: 0 0 auto;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0;
|
||||
max-width: 100%;
|
||||
height: 32px;
|
||||
.toolbar-left {
|
||||
flex: 0 0 auto;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0;
|
||||
max-width: 100%;
|
||||
height: 28px;
|
||||
|
||||
.list-filters {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
height: 32px;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
|
||||
:deep(.arco-input-wrapper),
|
||||
:deep(.arco-btn) {
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
:deep(.arco-input-wrapper) {
|
||||
@ -2924,7 +3294,7 @@
|
||||
}
|
||||
|
||||
.list-date-toggle {
|
||||
width: 32px;
|
||||
width: 28px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@ -2932,7 +3302,7 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.list-date-help {
|
||||
@ -2970,13 +3340,11 @@
|
||||
}
|
||||
|
||||
.table-toolbar {
|
||||
padding: 12px 16px 0;
|
||||
margin-bottom: 12px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
gap: 8px;
|
||||
|
||||
.toolbar-right {
|
||||
display: flex;
|
||||
@ -2985,21 +3353,24 @@
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
|
||||
.selected-count {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-3);
|
||||
white-space: nowrap;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.pagination-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
|
||||
.column-config-icon-btn {
|
||||
width: 32px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--color-text-3);
|
||||
box-shadow: none;
|
||||
|
||||
&:hover {
|
||||
color: var(--color-text-2);
|
||||
background: var(--color-fill-2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3209,4 +3580,29 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
/* Dropdown 挂到 body,需非 scoped */
|
||||
.toolbar-more-menu {
|
||||
min-width: 180px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.toolbar-more-menu__group {
|
||||
margin: 6px 12px 2px;
|
||||
font-size: 11px;
|
||||
font-weight: 650;
|
||||
letter-spacing: 0.04em;
|
||||
color: rgba(26, 46, 56, 0.4);
|
||||
line-height: 20px;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.toolbar-more-menu__danger {
|
||||
color: #c45c4a !important;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user