1
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user