fix: guard supplier status rendering

This commit is contained in:
2026-09-03 20:20:21 +08:00
parent 3fd7768e28
commit e94ae9b2b7
2 changed files with 2 additions and 1 deletions
@@ -15,6 +15,7 @@ describe('supplier formal pages', () => {
expect(source).toContain("access.can('platform:supplier:status')")
expect(source).toContain("access.can('platform:supplier:list')")
expect(source).toContain('<el-button size="small" plain type="primary" @click="router.push')
expect(source).toContain("statusLabels[supplierRow(row).status] ?? '—'")
})
it('matches the prototype statistics, category tabs and search sequence', () => {
@@ -157,7 +157,7 @@ onActivated(() => {
<template #category="{ row }">{{ categoryLabels[row.category as SupplierCategory] }}</template>
<template #carrierCodes="{ row }">{{ supplierRow(row).category === 'BOOKING' ? formatCarrierCodes(supplierRow(row).carrierCodes) : '—' }}</template>
<template #license="{ row }"><el-button size="small" plain type="primary" @click="showLicense(supplierRow(row))"><FileText :size="15" />查看</el-button></template>
<template #status="{ row }"><StatusBadge :status="statusLabels[row.status as SupplierStatus]" /></template>
<template #status="{ row }"><StatusBadge :status="statusLabels[supplierRow(row).status] ?? '—'" /></template>
<template #settlement="{ row }">{{ settlementLabels[supplierRow(row).settlementPeriod] }}</template>
</DataTable>
</section>