This commit is contained in:
2026-08-13 20:00:38 +08:00
parent 5489bff92f
commit b9cfdcf42a
13 changed files with 183 additions and 479 deletions
@@ -149,7 +149,9 @@ describe('UnifiedOrdersView contract', () => {
expect(source).toContain('<InboundMeasurementPanel')
expect(source).toContain('width="min(1180px, calc(100vw - 32px))"')
expect(source).toContain('measurementDialogOpen.value = true')
expect(source).not.toContain("router.push({ name: 'inbound-order-detail'")
expect(source).not.toContain("name: 'inbound-order-detail'")
expect(source).not.toContain('openInboundFromDetail')
expect(source).not.toContain('inbound-code-link')
expect(source).not.toContain('待接入:智能分柜')
expect(source).not.toContain('updateMainStatus')
expect(source).not.toContain('人工进入分柜')
@@ -654,16 +654,6 @@ function handleMeasurementChanged() {
void loadOrders()
}
function openInboundFromDetail() {
const summary = detail.value?.summary
if (!summary?.inboundId || !can('platform:firstleg:inbound:view')) return
void router.push({
name: 'inbound-order-detail',
params: { inboundId: String(summary.inboundId) },
query: { tenantId: String(summary.tenantId) },
})
}
type UnifiedOrderRowAction = 'note' | 'approve' | 'measurement'
const unifiedOrderRowActionIcons: Record<UnifiedOrderRowAction, Component> = {
note: StickyNote,
@@ -771,10 +761,7 @@ onMounted(() => {
<el-button link class="back-button" @click="closeDetail"><ArrowLeft :size="16" />返回列表</el-button>
<span class="order-mark" aria-hidden="true"><Box :size="19" /></span>
<div class="order-title">
<h1>
<el-button v-if="detail?.summary.inboundId && can('platform:firstleg:inbound:view')" link type="primary" class="inbound-code-link" @click="openInboundFromDetail">{{ detail.summary.inboundCode || `入库单 ${detail.summary.inboundId}` }}</el-button>
<span v-else>{{ detail?.summary.inboundCode || '暂未生成' }}</span>
</h1>
<h1>{{ detail?.summary.inboundCode || (detail?.summary.inboundId ? `入库单 ${detail.summary.inboundId}` : '暂未生成') }}</h1>
<p>{{ detail?.summary.orderNo || `订单 ${orderId}` }}</p>
</div>
<StatusBadge v-if="detail" :status="statusLabel(detail.summary.mainStatus)" />
@@ -1119,8 +1106,6 @@ onMounted(() => {
.order-mark { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 7px; background: #1d2939; color: #fff; }
.order-title { min-width: 0; }
.order-title h1 { margin: 0; overflow: hidden; color: #172033; font-size: 18px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.inbound-code-link { width: 100%; max-width: 100%; overflow: hidden; justify-content: flex-start; padding: 0; color: var(--cc-primary); font: inherit; font-weight: 700; vertical-align: baseline; }
.inbound-code-link :deep(span) { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-title p { margin: 2px 0 0; color: var(--cc-muted); font-size: 11px; }
.detail-header-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.detail-header-actions :deep(.el-button + .el-button) { margin-left: 0; }