This commit is contained in:
2026-08-14 14:27:03 +08:00
parent 724848feb6
commit a81af4a664
64 changed files with 961 additions and 176 deletions
@@ -9,7 +9,7 @@ const preloadDetailSource = readFileSync(resolve(process.cwd(), 'src/modules/loa
describe('LoadingListsView', () => {
it('filters both list modes by an active name-only customer selector', () => {
expect(source).toContain("listPlatformTenants({ page: 1, size: 200, status: 'ACTIVE' })")
expect(source).toContain("customer.legalName?.trim() || customer.tenantName")
expect(source).toContain("label: customer.tenantName")
expect(source).toContain("customerId: String(query.customerId || '').trim() || undefined")
expect(source).not.toContain('customer.tenantCode')
})
@@ -69,7 +69,7 @@ const canView = computed(() => canList.value)
const canEdit = computed(() => isPreload.value && access.can('platform:firstleg:preload:edit'))
const canManageCustoms = computed(() => !isPreload.value && access.can('platform:firstleg:customs:manage'))
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: isPreload.value ? '预装单号/集装箱号/柜号' : '装柜清单号/集装箱号/柜号', width: 250 },
{ key: 'createdRange', type: 'daterange', label: '创建日期', width: 260 },
])