修复订单货柜预约与排车维护界面

This commit is contained in:
2026-10-21 23:20:10 +08:00
parent 93a31b3872
commit 2e26477db5
68 changed files with 602 additions and 239 deletions
@@ -175,7 +175,7 @@ describe('InboundFeeDetailManager', () => {
[['edit', 'delete'], ['编辑', '删除'], false],
[['review', 'delete'], ['审核', '驳回', '删除'], false],
[['edit', 'review'], ['编辑', '审核', '驳回'], false],
[['edit', 'review', 'delete'], ['编辑', '审核', '驳回', ''], true],
[['edit', 'review', 'delete'], ['编辑', '审核', '驳回', '更多'], true],
])('folds pending fee actions only when more than three are available: %j', async (actions, labels, overflow) => {
vi.mocked(listInboundFeeDetails).mockResolvedValue([pending])
const wrapper = mountManager(['firstleg:inbound:fee-detail:view', ...actions.map(action => 'firstleg:inbound:fee-detail:' + action)])
@@ -317,7 +317,7 @@ onMounted(() => void load())
<div v-loading="loading" class="fee-table-shell">
<el-table :data="rows" border stripe empty-text="暂无费用数据" row-key="id">
<el-table-column label="操作" fixed="left" width="250">
<template #default="{ row }"><RowActions :actions="feeRowActions(row as InboundFeeDetail)" :more-label="`${(row as InboundFeeDetail).feeTypeNameSnapshot || '当前费用'}的更多操作`" @action="handleFeeRowAction($event, row as InboundFeeDetail)" /></template>
<template #default="{ row }"><RowActions text-actions :actions="feeRowActions(row as InboundFeeDetail)" :more-label="`${(row as InboundFeeDetail).feeTypeNameSnapshot || '当前费用'}的更多操作`" @action="handleFeeRowAction($event, row as InboundFeeDetail)" /></template>
</el-table-column>
<el-table-column label="审核状态" width="120"><template #default="{ row }"><StatusBadge :status="reviewLabel(row.reviewStatus)" /></template></el-table-column>
<el-table-column label="来源" width="120"><template #default="{ row }">{{ row.sourceType === 'FBA_PRICING' ? '头程派生' : '人工录入' }}</template></el-table-column>
@@ -346,7 +346,7 @@ onMounted(() => void load())
<el-alert v-if="feeItemsError" type="error" :closable="true" @close="feeItemsError = null"><template #title>{{ feeItemsError.message }}</template><ApiErrorMeta :details="feeItemsError" /></el-alert>
<el-alert v-if="suppliersError" type="error" :closable="true" @close="suppliersError = null"><template #title>{{ suppliersError.message }}</template><ApiErrorMeta :details="suppliersError" /></el-alert>
<el-alert v-if="actionError" type="error" :closable="true" @close="actionError = null"><template #title>{{ actionError.message }}</template><ApiErrorMeta :details="actionError" /></el-alert>
<section class="density-dialog-section" data-tone="work">
<section class="density-dialog-section">
<h3 class="density-dialog-section__title">费用资料</h3>
<el-form ref="formRef" :model="form" :rules="rules" label-position="top" class="fee-form density-form">
<el-form-item label="应收/应付" prop="direction"><el-segmented v-model="form.direction" :options="directionOptions" /></el-form-item>
@@ -20,7 +20,7 @@ describe('UnifiedOrdersView contract', () => {
it('exposes desktop pallet printing only for one-click dropship orders', () => {
expect(source).toContain("detail.value?.summary.fulfillmentType === 'ONE_CLICK_DROPSHIP'")
expect(source).toContain("{ key: 'dropship-print', label: '托盘打印', icon: '🖨️' }")
expect(source).toContain("{ key: 'dropship-print', label: '托盘打印', icon: Printer }")
expect(source).toContain("activeDetailTab === 'dropship-print'")
expect(source).toContain('<DropshipPalletPrintPanel')
expect(source).toContain("can('platform:firstleg:inbound:list')")
@@ -70,6 +70,7 @@ describe('UnifiedOrdersView contract', () => {
})
it('renders accessible current-status tabs with keyboard navigation', () => {
expect(source).toContain("unifiedOrderStatusOptions.filter((tab) => tab.value !== 'WEIGHT_CONFIRMED')")
expect(source.match(/class="orders-status-toolbar"/g)).toHaveLength(2)
expect(source).toContain('.orders-status-toolbar :deep(.workbench-table.is-page-surface > .data-table > .data-table__toolbar > .data-table__toolbar-start)')
expect(source).toContain('flex: 0 0 100%;')
@@ -591,7 +592,9 @@ describe('UnifiedOrdersView contract', () => {
expect(source).toContain('子单 · 第 ${row.relation.splitSequence} 次')
expect(source).toContain('title="父子订单关联"')
expect(source).toContain('@click="openOrderRelation(row as UnifiedOrderResource)"')
expect(source).toContain("{ key: 'fulfillment', label: '拆分履约', icon: '🧩' }")
expect(source).toContain("{ key: 'fulfillment', label: '拆分履约', icon: GitBranch }")
const tabs = source.slice(source.indexOf('const detailTabs ='), source.indexOf('const customerMeasurementColumns ='))
expect(tabs.indexOf("key: 'other'")).toBeGreaterThan(tabs.indexOf("key: 'fulfillment'"))
expect(source).toContain("activeDetailTab === 'fulfillment'")
expect(source).toContain('<OrderFulfillmentTreePanel')
expect(source).not.toContain('根单、已完成分片与当前余量')
@@ -373,8 +373,8 @@ const detailTabs = computed(() => [
{ key: 'history', label: '状态历史', icon: History },
{ key: 'measurement', label: '测量数据', icon: Ruler },
...(isDropshipOrder.value ? [{ key: 'dropship-print', label: '托盘打印', icon: Printer }] : []),
{ key: 'other', label: '其他', icon: MoreHorizontal },
{ key: 'fulfillment', label: '拆分履约', icon: GitBranch },
{ key: 'other', label: '其他', icon: MoreHorizontal },
])
const customerMeasurementColumns = [
@@ -609,7 +609,7 @@ async function waitForSavedMeasurementVersion(tenantId: string, inboundId: strin
const statusTabs = computed(() => [
{ value: '' as const, label: '全部' },
...unifiedOrderStatusOptions.flatMap((tab) => tab.value === 'WAIT_MEASURE' && can('firstleg:inbound:measurement-review')
...unifiedOrderStatusOptions.filter((tab) => tab.value !== 'WEIGHT_CONFIRMED').flatMap((tab) => tab.value === 'WAIT_MEASURE' && can('firstleg:inbound:measurement-review')
? [tab, { value: 'MEASUREMENT_REVIEW' as const, label: '测量数据审核' }]
: [tab]),
])