fix(fleet): fit booking action column to trip stage

This commit is contained in:
2026-10-03 06:27:30 +08:00
parent 22dcae616c
commit 94b8b8b31c
2 changed files with 4 additions and 4 deletions
@@ -29,8 +29,8 @@ let generation = 0, searchSequence = 0
let searchTimer: ReturnType<typeof setTimeout> | undefined
const planned = computed(() => props.trip.status === 'PLANNED')
const quotedAmount = computed(() => form.unitPrice == null ? null : form.priceBasis === 'ORDER' ? form.unitPrice : form.palletSpaces == null ? null : Math.round(form.unitPrice * form.palletSpaces * 100) / 100)
const columns: DataTableColumn[] = [
{ key: 'actions', label: '操作', slotName: 'actions', width: 440, fixed: 'left' },
const columns = computed<DataTableColumn[]>(() => [
{ key: 'actions', label: '操作', slotName: 'actions', width: planned.value ? 320 : 170, fixed: 'left' },
{ key: 'bookingNo', prop: 'bookingNo', label: '外接预订号', minWidth: 225 },
{ key: 'customerName', prop: 'customerName', label: '委托客户', minWidth: 170 },
{ key: 'destinationLabel', prop: 'destinationLabel', label: '卸货站', minWidth: 140 },
@@ -38,7 +38,7 @@ const columns: DataTableColumn[] = [
{ key: 'cargo', label: '承运货量', slotName: 'cargo', minWidth: 225 },
{ key: 'amount', label: '约定运费', slotName: 'amount', minWidth: 160 },
{ key: 'documents', label: '来货 / 排车', slotName: 'documents', minWidth: 230 },
]
])
async function load() {
const current = ++generation; loading.value = true; error.value = null
try { const value = await listTripBookings(props.trip.tripNo); if (current === generation) { records.value = value.records; version.value = value.tripRecordVersion