From 021bd733018e2924934aa2c1b84c4ac1a484d9fd Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Fri, 7 Aug 2026 17:33:23 +0800 Subject: [PATCH] feat: customer form and search UI for pinyin initials. Co-authored-by: Cursor --- web-admin/src/api/crm/customerTypes.ts | 2 + .../business/db/DbCrmCustomerSelect.vue | 2 +- .../crm/customer/CustomerDetailDialog.vue | 1 + .../views/crm/customer/CustomerFormDialog.vue | 72 ++++++++++--------- web-admin/src/views/crm/customer/index.vue | 4 +- 5 files changed, 44 insertions(+), 37 deletions(-) diff --git a/web-admin/src/api/crm/customerTypes.ts b/web-admin/src/api/crm/customerTypes.ts index 175658cd6..619f1702a 100644 --- a/web-admin/src/api/crm/customerTypes.ts +++ b/web-admin/src/api/crm/customerTypes.ts @@ -63,6 +63,8 @@ export interface CustomerForm { id?: number | string; /** 客户名称 */ customerName: string; + /** 客户名称拼音首字母(小写) */ + namePinyinAbbr?: string; /** 客户简称 */ shortName: string; /** 客户类型(company-企业/person-个人) */ diff --git a/web-admin/src/components/business/db/DbCrmCustomerSelect.vue b/web-admin/src/components/business/db/DbCrmCustomerSelect.vue index 3fbfb4277..96ac3a1f5 100644 --- a/web-admin/src/components/business/db/DbCrmCustomerSelect.vue +++ b/web-admin/src/components/business/db/DbCrmCustomerSelect.vue @@ -39,7 +39,7 @@ allowCreate?: boolean }>(), { - placeholder: '请输入客户名称搜索', + placeholder: '请输入客户名称/拼音搜索', allowCreate: true } ) diff --git a/web-admin/src/views/crm/customer/CustomerDetailDialog.vue b/web-admin/src/views/crm/customer/CustomerDetailDialog.vue index 7b1d89692..ee4f771d9 100644 --- a/web-admin/src/views/crm/customer/CustomerDetailDialog.vue +++ b/web-admin/src/views/crm/customer/CustomerDetailDialog.vue @@ -605,6 +605,7 @@ const viewSections = computed(() => { const address = [c.province, c.city, c.district, c.address].filter(Boolean).join(' ') const basicFields: ViewField[] = [ tagField('客户类型', 'crm_customer_type', c.customerType), + { label: '拼音首字母', value: c.namePinyinAbbr }, { label: '客户简称', value: c.shortName }, { label: '手机号', value: c.mobile }, { label: '固定电话', value: c.telephone }, diff --git a/web-admin/src/views/crm/customer/CustomerFormDialog.vue b/web-admin/src/views/crm/customer/CustomerFormDialog.vue index 5e2404ed9..189d95c2b 100644 --- a/web-admin/src/views/crm/customer/CustomerFormDialog.vue +++ b/web-admin/src/views/crm/customer/CustomerFormDialog.vue @@ -24,6 +24,20 @@ + +
+ + + + 重新生成 + +
+
@@ -152,7 +166,7 @@ 证件信息
- + - + @@ -262,7 +274,7 @@