优化
This commit is contained in:
@@ -125,7 +125,7 @@ describe('TruckAppointmentsView', () => {
|
||||
it('filters with an active name-only customer selector and stable customerId', () => {
|
||||
expect(source).toContain("listPlatformTenants({ page: 1, size: 200, status: 'ACTIVE' })")
|
||||
expect(source).toContain("customer.status === 'ACTIVE'")
|
||||
expect(source).toContain("customer.legalName?.trim() || customer.tenantName")
|
||||
expect(source).toContain("label: customer.tenantName")
|
||||
expect(source).toContain("customerId: String(model.customerId || '')")
|
||||
expect(source).not.toContain('customer.tenantCode')
|
||||
})
|
||||
|
||||
@@ -20,7 +20,7 @@ const access = useAccessPreviewStore()
|
||||
const customers = ref<PlatformTenantResource[]>([]); const customersLoading = ref(false)
|
||||
const filters = ref({ customerId: '', keyword: '', status: '' as TruckAppointmentStatus | '', containerBookingId: '', containerType: '' }); const applied = ref({ ...filters.value })
|
||||
const fields = computed<QueryField[]>(() => [
|
||||
{ key: 'customerId', type: 'select', label: '客户', placeholder: '全部客户', width: 220, options: customers.value.filter((customer) => customer.status === 'ACTIVE').map((customer) => ({ label: customer.legalName?.trim() || customer.tenantName, value: String(customer.id) })), props: { filterable: true, loading: customersLoading.value } },
|
||||
{ key: 'customerId', type: 'select', label: '客户', placeholder: '全部客户', width: 220, options: customers.value.filter((customer) => customer.status === 'ACTIVE').map((customer) => ({ label: customer.tenantName, value: String(customer.id) })), props: { filterable: true, loading: customersLoading.value } },
|
||||
{ key: 'keyword', type: 'input', label: '关键词', placeholder: '派车单号、车牌号、运输公司' },
|
||||
{ key: 'status', type: 'select', label: '状态', placeholder: '全部状态', options: TRUCK_APPOINTMENT_STATUSES.map((value) => ({ value, label: truckAppointmentStatusLabels[value] })) },
|
||||
{ key: 'containerType', type: 'select', label: '柜型', placeholder: '全部柜型', options: [
|
||||
|
||||
Reference in New Issue
Block a user