This commit is contained in:
2026-08-30 17:43:03 +08:00
parent de1b956d43
commit ae52141952
45 changed files with 404 additions and 82 deletions
@@ -275,7 +275,7 @@ onMounted(() => { void load() })
<template>
<section class="smart-loading" aria-label="智能排柜工作台">
<header class="smart-loading__heading">
<div class="smart-loading__context"><span>当前柜次</span><strong>{{ container?.cabinetNo || container?.containerNo || `柜次 ${bookingId}` }}</strong><small>{{ container?.warehouseName || '仓库待加载' }}</small></div>
<div class="smart-loading__context"><span>当前柜次</span><strong>{{ container?.cabinetNo || container?.containerNo || '柜次信息待补充' }}</strong><small>{{ container?.warehouseName || '仓库待加载' }}</small></div>
<div class="smart-loading__actions">
<el-button circle :loading="loading" aria-label="刷新智能排柜" @click="load"><RefreshCw :size="16" /></el-button>
<el-button v-if="!plan" type="primary" :disabled="!canCreate || loading" :loading="action === 'create'" @click="createPlan"><Plus :size="15" />创建装柜草稿</el-button>
@@ -45,6 +45,7 @@ function mountPanel(permissions: string[], mainStatus: 'WAIT_SPLIT' | 'LOADING'
return mount(UnifiedOrderWorkflowPanel, {
props: {
tenantId: '2086085512165634052', inboundId: '2086085512165634051', orderId: '2086085512165634053',
inboundCode: 'NYEXX2608300001',
mainStatus, inboundVersion: 4,
},
global: { plugins: [pinia, ElementPlus] },
@@ -61,6 +62,14 @@ describe('UnifiedOrderWorkflowPanel preload editor', () => {
vi.mocked(voidEvidence).mockReset()
})
it('uses the inbound code as the visible workflow identifier', async () => {
const wrapper = mountPanel([])
await flushPromises()
expect(wrapper.text()).toContain('入库作业')
expect(wrapper.text()).toContain('NYEXX2608300001')
expect(wrapper.text()).not.toContain('#2086085512165634051')
})
it('keeps workflow business actions as outlined semantic buttons with icons', () => {
const source = readFileSync(resolve(process.cwd(), 'src/modules/unified-orders/workflows/components/UnifiedOrderWorkflowPanel.vue'), 'utf8')
expect(source).toContain('size="small" plain type="primary"')
@@ -38,6 +38,7 @@ import type { UnifiedOrderMainStatus } from '@/modules/unified-orders/api/unifie
const props = withDefaults(defineProps<{
tenantId: string
inboundId: string | number
inboundCode?: string | null
orderId?: string | number | null
mainStatus: UnifiedOrderMainStatus
inboundVersion?: number | null
@@ -411,7 +412,7 @@ onMounted(() => { void refresh() })
<template>
<section class="workflow-panel" aria-label="订单后半程作业">
<div class="workflow-heading" aria-label="订单作业上下文">
<div class="workflow-context"><span>入库作业</span><strong>#{{ props.inboundId }}</strong></div>
<div class="workflow-context"><span>入库作业</span><strong>{{ props.inboundCode || '入仓码待补充' }}</strong></div>
<el-tooltip content="刷新作业数据" placement="top"><el-button text :loading="loading" aria-label="刷新作业数据" @click="refresh"><RefreshCw :size="15" /></el-button></el-tooltip>
</div>
@@ -507,7 +508,7 @@ onMounted(() => { void refresh() })
</div>
<div v-if="canEvidenceView" class="evidence-files">
<div v-for="item in activeEvidences(entry.type)" :key="String(item.id)" class="evidence-file">
<span>{{ item.fileName || `证据 #${item.id}` }}<template v-if="item.sealNo"> · 锁码 {{ item.sealNo }}</template></span>
<span>{{ item.fileName || '证据文件名待补充' }}<template v-if="item.sealNo"> · 锁码 {{ item.sealNo }}</template></span>
<div class="evidence-file__actions">
<el-button size="small" plain type="primary" :disabled="Boolean(busy)" @click="previewEvidence(item)"><Eye :size="14" />查看</el-button>
<el-button v-if="canEvidence" size="small" plain type="danger" :disabled="Boolean(busy)" @click="markEvidenceVoided(item)"><Trash2 :size="14" />作废</el-button>
@@ -47,6 +47,7 @@ onMounted(() => { void load() })
v-else-if="summary && summary.inboundId"
:tenant-id="tenantId"
:inbound-id="summary.inboundId"
:inbound-code="summary.inboundCode"
:order-id="summary.orderId"
:main-status="summary.mainStatus"
:inbound-version="summary.inboundVersion"