This commit is contained in:
wujinliang
2026-09-18 11:41:27 +08:00
parent f2d5b2d8e4
commit 451663b6ff
24 changed files with 156 additions and 30 deletions
@@ -37,7 +37,7 @@ describe('InboundTaskList measurement scope', () => {
expect(source).toContain(':tenant-id="selectedInbound.tenantId"')
expect(source).toContain(':customer-id="selectedInbound.tenantId"')
expect(source).toContain(':customer-name="selectedInbound.customerName || selectedInbound.companyName"')
expect(source).toContain(':customer-name="customerDisplayName(selectedInbound)"')
expect(source).toContain(':channel-name="selectedInbound.channelName"')
expect(source).not.toContain('selectedInbound.customerId || selectedInbound.tenantId')
})
@@ -65,6 +65,9 @@ const actionPermission = computed(() => isReview.value
const taskLabel = computed(() => isReview.value ? '审核' : '测量')
const emptyText = computed(() => isReview.value ? '暂无待审核的测量数据' : '暂无当前可测量的订单')
const preferenceKey = computed(() => isReview.value ? 'inbound-measurement-reviews' : 'inbound-measurements')
const customerNameById = computed(() => new Map(customers.value.map((customer) => [
String(customer.id), customer.legalName?.trim() || customer.tenantName,
])))
const queryFields = computed<QueryField[]>(() => [
{
@@ -111,6 +114,11 @@ function text(value: unknown) {
return value === null || value === undefined || value === '' ? '—' : String(value)
}
function customerDisplayName(inbound: InboundOrderSummary) {
const snapshot = inbound.customerName?.trim() || inbound.companyName?.trim()
return snapshot || customerNameById.value.get(String(inbound.customerId || inbound.tenantId)) || ''
}
function formatNumber(value: number | null | undefined) {
return value === null || value === undefined ? '—' : value.toLocaleString('zh-CN', { maximumFractionDigits: 3 })
}
@@ -440,6 +448,7 @@ onBeforeUnmount(() => { disposed = true; requestSerial += 1; optionsRequestSeria
v-if="!isReview && selectedInbound"
v-model="measurementDialogOpen"
:customer-id="selectedInbound.tenantId"
:customer-name="customerDisplayName(selectedInbound)"
:inbound-id="selectedInbound.id"
:inbound-code="selectedInbound.inboundCode"
@updated="handleMeasurementUpdated"
@@ -40,6 +40,7 @@ describe('InboundWorkflowWorkspace', () => {
expect(source).toContain('@click="reviewDialogOpen = true"')
expect(source).toContain(':key="`review-dialog-${revision}`"')
expect(source).toContain(':customer-name="detail?.summary.customerName || detail?.summary.companyName"')
expect(source).toContain(':customer-name="detail?.summary.customerName || detail?.summary.companyName"')
expect(source).toContain(':channel-name="detail?.summary.channelName"')
expect(source).toContain('@changed="handleReviewChanged"')
expect(source).not.toContain('<template #footer>')
@@ -197,6 +197,7 @@ onBeforeUnmount(() => {
<InboundMeasurementDialog
v-model="measurementDialogOpen"
:customer-id="customerId"
:customer-name="detail?.summary.customerName || detail?.summary.companyName"
:inbound-id="inboundId"
:inbound-code="title"
@updated="handleDomainChanged"