This commit is contained in:
2026-09-01 14:27:22 +08:00
parent e42d765f5c
commit 76604da31b
9 changed files with 33 additions and 9 deletions
@@ -82,4 +82,10 @@ describe('OceanBookingsView', () => {
expect(source).not.toContain('customer.tenantCode')
expect(source).toContain('@media(max-width:420px)')
})
it('keeps desktop filter widths proportional instead of stretching short status fields', () => {
expect(source).toContain("key: 'customerId', type: 'select', label: '客户', placeholder: '全部客户', width: 220")
expect(source).toContain("key: 'keyword', type: 'input', label: '关键词', placeholder: '订舱号/提单号/船名/航次', width: 260")
expect(source).toContain("key: 'status', type: 'select', label: '状态', width: 160")
})
})
@@ -36,7 +36,7 @@ const printBooking = ref<{ id: string; bookingNo?: string | null } | null>(null)
const fields = computed<QueryField[]>(() => [
{ key: 'customerId', type: 'select', label: '客户', placeholder: '全部客户', width: 220, options: activeCustomers.value.map((customer) => ({ label: customer.tenantName, value: String(customer.id) })), props: { filterable: true, loading: customersLoading.value } },
{ key: 'keyword', type: 'input', label: '关键词', placeholder: '订舱号/提单号/船名/航次', width: 260 },
{ key: 'status', type: 'select', label: '状态', options: oceanBookingStatusOptions },
{ key: 'status', type: 'select', label: '状态', width: 160, options: oceanBookingStatusOptions },
])
const columns = [
{ key: 'actions', label: '操作', fixed: 'left', width: 196, slotName: 'actions', hideable: false, movable: false },