fix(fleet): label missing delivery customer names

This commit is contained in:
2026-10-03 10:33:34 +08:00
parent f7b84ea887
commit 8c462cef17
@@ -18,7 +18,7 @@ let generation = 0
const columns = computed<DataTableColumn[]>(() => props.kind === 'deliveries' ? [
{ key: 'deliveryNo', prop: 'deliveryNo', label: '派送单号', minWidth: 210 },
{ key: 'source', label: 'BOL / 来源排车', minWidth: 215, slotName: 'source' },
{ key: 'customerName', prop: 'customerName', label: '客户', minWidth: 160 },
{ key: 'customerName', label: '客户', minWidth: 160, slotName: 'customer' },
{ key: 'destination', label: '目的仓 / 地址', minWidth: 180, slotName: 'destination' },
{ key: 'plannedDeliveryAt', label: '预约日期', minWidth: 165, slotName: 'date' },
{ key: 'status', label: '派送状态', width: 115, slotName: 'status' },
@@ -65,6 +65,7 @@ onBeforeUnmount(() => { generation++ })
<DataTable v-model:page="page" v-model:page-size="size" :data="rows" :columns="columns" :total="total" :loading="loading" :row-key="rowKey" :empty-text="`暂无${title}`">
<template #toolbar-actions><el-button :disabled="loading" @click="load">刷新</el-button></template>
<template #source="{ row }"><div>{{ row.bolNo || '—' }}</div><div>{{ row.dispatchNo || '未关联排车' }}</div></template>
<template #customer="{ row }">{{ row.customerName || '—' }}</template>
<template #destination="{ row }">{{ row.destinationType === 'PRIVATE' ? row.deliveryAddress || '—' : row.destinationWarehouseCode || row.destinationWarehouseName || '—' }}</template>
<template #date="{ row }">{{ date(kind === 'deliveries' ? row.plannedDeliveryAt : row.occurredAt) }}</template>
<template #status="{ row }">{{ statuses[row.status] || row.status || '—' }}</template>