优化
This commit is contained in:
@@ -156,6 +156,13 @@ describe('CustomersView', () => {
|
||||
vi.mocked(showExportTaskCreatedDialog).mockResolvedValue(false)
|
||||
})
|
||||
|
||||
it('searches the customer list by customer name only', () => {
|
||||
expect(customersSource).toContain("label: '客户名称', placeholder: '请输入客户名称'")
|
||||
expect(customersSource).not.toContain('公司名称、客户编号或联系人')
|
||||
expect(customersSource).not.toContain('row.tenantCode.toLowerCase().includes(keyword)')
|
||||
expect(customersSource).not.toContain('String(row.id).includes(keyword)')
|
||||
})
|
||||
|
||||
it('matches the frozen prototype containers for customer operations', () => {
|
||||
expect(customersSource).toContain("router.push({ name: 'customer-detail'")
|
||||
expect(customersSource).toContain("'min(640px, calc(100vw - 28px))'")
|
||||
|
||||
@@ -127,7 +127,7 @@ const qualificationPreviewKind = ref<'image' | 'pdf' | ''>('')
|
||||
|
||||
const filters = ref<CustomerFilters>({ keyword: '', status: '' })
|
||||
const queryFields: QueryField[] = [
|
||||
{ key: 'keyword', type: 'input', label: '客户关键词', placeholder: '公司名称、客户编号或联系人' },
|
||||
{ key: 'keyword', type: 'input', label: '客户名称', placeholder: '请输入客户名称' },
|
||||
{ key: 'status', type: 'select', label: '状态', placeholder: '全部状态', options: [
|
||||
{ label: '待完善', value: 'PROFILE_REQUIRED' }, { label: '待审核', value: 'PENDING' },
|
||||
{ label: '启用', value: 'ACTIVE' }, { label: '已驳回', value: 'REJECTED' },
|
||||
@@ -338,8 +338,6 @@ function reviewOnlyPage(reviews: EnterpriseReview[]) {
|
||||
.filter((row) => (!filters.value.status || filters.value.status === 'PENDING') && (
|
||||
!keyword
|
||||
|| row.tenantName.toLowerCase().includes(keyword)
|
||||
|| row.tenantCode.toLowerCase().includes(keyword)
|
||||
|| String(row.id).includes(keyword)
|
||||
))
|
||||
const start = (page.value - 1) * pageSize.value
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user