优化
This commit is contained in:
@@ -77,6 +77,8 @@ describe('LoadingListsView', () => {
|
||||
expect(detailSource).not.toContain('[action] || action')
|
||||
})
|
||||
it('uses safe labels when customer or operator names are missing', () => {
|
||||
expect(source).toContain("item.customerName || '客户信息缺失'")
|
||||
expect(source).not.toContain('item.customerName || item.accountId')
|
||||
expect(detailSource).toContain("item.customerName || '客户信息缺失'")
|
||||
expect(detailSource).toContain("history.operatorName || '操作人信息缺失'")
|
||||
expect(detailSource).not.toContain('item.customerName || item.accountId')
|
||||
|
||||
@@ -305,7 +305,7 @@ onMounted(() => {
|
||||
<el-button v-if="canView" link type="primary" @click="openDetail(row)"><Eye :size="15" />查看</el-button>
|
||||
<el-button v-if="isPreload && canEdit && ['EDITING', 'LOADING'].includes(row.status)" link type="primary" @click="openEditFromRow(row)"><Pencil :size="15" />编辑</el-button>
|
||||
</template>
|
||||
<template #customers="{ row }">{{ (row as PreloadSummary).customers.map((item) => item.customerName || item.accountId).join('、') || '—' }}</template>
|
||||
<template #customers="{ row }">{{ (row as PreloadSummary).customers.map((item) => item.customerName || '客户信息缺失').join('、') || '—' }}</template>
|
||||
<template #vesselVoyage="{ row }">{{ (row as PreloadSummary).vesselName || '—' }} / {{ (row as PreloadSummary).voyageNo || '—' }}</template>
|
||||
<template #status="{ row }"><StatusBadge :status="loadingListStatusLabel(row.status)" /></template>
|
||||
<template #grossWeight="{ row }">{{ formatNumber(row.totalGrossWeightKg) }}</template>
|
||||
|
||||
Reference in New Issue
Block a user