优化
This commit is contained in:
@@ -34,7 +34,7 @@ describe('InboundOrderDetailView', () => {
|
||||
|
||||
expect(wrapper.get('[aria-label="面包屑"]').text()).toContain('首页入库单列表入库单详情')
|
||||
expect(wrapper.get('[data-testid="workspace"]').text()).toBe('10002:19001')
|
||||
expect(wrapper.findAll('button').filter((button) => button.text().includes('返回入库单列表'))).toHaveLength(2)
|
||||
expect(wrapper.findAll('button').filter((button) => button.text().includes('返回入库单列表'))).toHaveLength(1)
|
||||
await wrapper.findAll('button').filter((button) => button.text().includes('返回入库单列表')).at(-1)?.trigger('click')
|
||||
await flushPromises()
|
||||
expect(router.currentRoute.value.name).toBe('inbound-orders')
|
||||
@@ -50,11 +50,11 @@ describe('InboundOrderDetailView', () => {
|
||||
expect(source).not.toContain('租户')
|
||||
expect(source).toContain('<PageToolbar title="入库单详情"')
|
||||
expect(source).toContain('货品与测量、费用信息、状态历史及其他记录')
|
||||
expect(source).toContain('class="surface-panel detail-page"')
|
||||
expect(source).toContain('class="detail-page"')
|
||||
expect(source).toContain('class="detail-page-actions"')
|
||||
expect(source).toContain('返回入库单列表')
|
||||
expect(source).toContain('class="detail-breadcrumb"')
|
||||
expect(source).toContain('class="detail-page-footer"')
|
||||
expect(source).not.toContain('class="detail-page-footer"')
|
||||
expect(source).toContain('@media (max-width: 720px)')
|
||||
expect(source).toContain('@media (max-width: 360px)')
|
||||
})
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useRoute, useRouter } from 'vue-router'
|
||||
import { ArrowLeft, ChevronRight, Home } from '@lucide/vue'
|
||||
import AdminPage from '@/shared/components/AdminPage.vue'
|
||||
import DetailPageLayout from '@/shared/components/DetailPageLayout.vue'
|
||||
import FormSection from '@/shared/components/FormSection.vue'
|
||||
import PageToolbar from '@/shared/components/PageToolbar.vue'
|
||||
import InboundWorkflowWorkspace from '../components/InboundWorkflowWorkspace.vue'
|
||||
|
||||
@@ -37,7 +36,7 @@ function backToHome() {
|
||||
<ChevronRight :size="14" aria-hidden="true" />
|
||||
<span aria-current="page">入库单详情</span>
|
||||
</nav>
|
||||
<DetailPageLayout class="surface-panel detail-page" aria-label="入库单详情">
|
||||
<DetailPageLayout class="detail-page" aria-label="入库单详情">
|
||||
<template #header>
|
||||
<PageToolbar title="入库单详情" description="查看基本信息、货品与测量、费用信息、状态历史及其他记录。">
|
||||
<div class="detail-page-actions">
|
||||
@@ -46,21 +45,15 @@ function backToHome() {
|
||||
</PageToolbar>
|
||||
</template>
|
||||
|
||||
<FormSection title="入库处理工作区" :bordered="false">
|
||||
<InboundWorkflowWorkspace
|
||||
v-if="inboundId && customerId"
|
||||
:customer-id="customerId"
|
||||
:inbound-id="inboundId"
|
||||
/>
|
||||
<el-empty
|
||||
v-else
|
||||
:description="inboundId ? '缺少所属企业信息,请从入库单列表重新打开' : '缺少有效的入库单标识'"
|
||||
/>
|
||||
</FormSection>
|
||||
|
||||
<footer class="detail-page-footer">
|
||||
<el-button @click="backToList"><ArrowLeft :size="16" />返回入库单列表</el-button>
|
||||
</footer>
|
||||
<InboundWorkflowWorkspace
|
||||
v-if="inboundId && customerId"
|
||||
:customer-id="customerId"
|
||||
:inbound-id="inboundId"
|
||||
/>
|
||||
<el-empty
|
||||
v-else
|
||||
:description="inboundId ? '缺少所属企业信息,请从入库单列表重新打开' : '缺少有效的入库单标识'"
|
||||
/>
|
||||
</DetailPageLayout>
|
||||
</AdminPage>
|
||||
</template>
|
||||
@@ -71,14 +64,12 @@ function backToHome() {
|
||||
.detail-breadcrumb button { display: inline-flex; min-height: 32px; align-items: center; gap: 5px; padding: 4px 6px; border: 0; border-radius: 4px; background: transparent; color: var(--cc-primary); cursor: pointer; font: inherit; }
|
||||
.detail-breadcrumb button:hover { background: #f0f7ff; }
|
||||
.detail-breadcrumb button:focus-visible { outline: 3px solid rgba(102, 126, 234, .2); outline-offset: 1px; }
|
||||
.detail-page { overflow: hidden; padding: 20px 24px; }
|
||||
.detail-page { min-width: 0; overflow: hidden; padding: 20px 24px; }
|
||||
.detail-page-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 12px; }
|
||||
.detail-page-footer { display: flex; justify-content: flex-start; padding: 20px 0 0; border-top: 1px solid var(--cc-border); }
|
||||
@media (max-width: 720px) {
|
||||
.detail-page { padding: 16px; }
|
||||
.detail-page-actions { width: 100%; align-items: stretch; flex-direction: column; }
|
||||
.detail-page-actions :deep(.el-button) { width: 100%; min-height: 44px; }
|
||||
.detail-page-footer :deep(.el-button) { width: 100%; min-height: 44px; }
|
||||
}
|
||||
@media (max-width: 360px) { .detail-page { padding: 12px; } }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user