From fec9539f7b8ff4323f1f5ef21927e0ef3484813b Mon Sep 17 00:00:00 2001
From: wersd <1523826083@qq.com>
Date: Sat, 31 May 2025 17:08:54 +0800
Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E6=89=8B=E6=9C=BA=20=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=88=B7?=
=?UTF-8?q?=E7=8A=B6=E6=80=81=20=E5=9C=B0=E5=8C=BA=E6=90=9C=E7=B4=A2=20?=
=?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=88=B7=E7=8A=B6?=
=?UTF-8?q?=E6=80=81=20=E4=B8=BB=E8=A6=81=E8=81=94=E7=B3=BB=E4=BA=BA?=
=?UTF-8?q?=E5=8F=AF=E4=BB=A5=E7=82=B9=E5=87=BB=20=E4=B8=8B=E6=AC=A1?=
=?UTF-8?q?=E8=81=94=E7=B3=BB=E6=97=B6=E9=97=B4=E8=B6=85=E8=BF=87=E4=BB=8A?=
=?UTF-8?q?=E5=A4=A9=E6=A0=87=E7=BA=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/crm/customer/index.ts | 5 +-
src/utils/dict.ts | 1 +
src/views/crm/customer/index.vue | 78 ++++++++++++++++++++++++++------
3 files changed, 69 insertions(+), 15 deletions(-)
diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts
index cc61596dd..b2558f29c 100644
--- a/src/api/crm/customer/index.ts
+++ b/src/api/crm/customer/index.ts
@@ -12,7 +12,7 @@ export interface CustomerVO {
ownerUserName?: string // 负责人的用户名称
ownerUserDept?: string // 负责人的部门名称
lockStatus?: boolean
- dealStatus?: boolean
+ dealStatus?: number // 成交状态 0-未成交 1-谈判中 2-已成交
mobile: string // 手机号
telephone: string // 电话
qq: string // QQ
@@ -24,7 +24,8 @@ export interface CustomerVO {
industryId: number // 所属行业
level: number // 客户等级
source: number // 客户来源
- primaryContact: string // 主要联系人
+ primaryContactName: string // 主要联系人名称
+ primaryContactId: number // 主要联系人编号
remark: string // 备注
creator: string // 创建人
creatorName?: string // 创建人名称
diff --git a/src/utils/dict.ts b/src/utils/dict.ts
index 947f9f31a..2f4325921 100644
--- a/src/utils/dict.ts
+++ b/src/utils/dict.ts
@@ -205,6 +205,7 @@ export enum DICT_TYPE {
CRM_BUSINESS_END_STATUS_TYPE = 'crm_business_end_status_type', // CRM 商机结束状态类型
CRM_RECEIVABLE_RETURN_TYPE = 'crm_receivable_return_type', // CRM 回款的还款方式
CRM_CUSTOMER_INDUSTRY = 'crm_customer_industry', // CRM 客户所属行业
+ CRM_CUSTOMER_DEAL_STATUS = 'crm_customer_deal_status', // CRM 客户成交状态
CRM_CUSTOMER_LEVEL = 'crm_customer_level', // CRM 客户级别
CRM_CUSTOMER_SOURCE = 'crm_customer_source', // CRM 客户来源
CRM_PRODUCT_STATUS = 'crm_product_status', // CRM 商品状态
diff --git a/src/views/crm/customer/index.vue b/src/views/crm/customer/index.vue
index c73d9a551..c9e6b6558 100644
--- a/src/views/crm/customer/index.vue
+++ b/src/views/crm/customer/index.vue
@@ -17,15 +17,6 @@
@keyup.enter="handleQuery"
/>
-
-
-
+
+
+
+
+
+
+
+
@@ -79,10 +96,14 @@
-
+
- {{ scope.row.areaName || '--' }}
+ {{ scope.row.areaName || '暂无' }}
@@ -93,20 +114,39 @@
-
+
+
+
+ {{ scope.row.primaryContactName }}
+
+
+
+
+
+
+
+
+
+
+ >
+
+
+ {{ dateFormatter2(scope.row, scope.column, scope.row.contactNextTime) }}
+
+
+
@@ -150,8 +190,10 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { dateFormatter2 } from '@/utils/formatTime'
import download from '@/utils/download'
import * as CustomerApi from '@/api/crm/customer'
+import * as AreaApi from '@/api/system/area'
import CustomerForm from './CustomerForm.vue'
import CustomerImportForm from './CustomerImportForm.vue'
+import { defaultProps } from '@/utils/tree'
import { TabsPaneContext } from 'element-plus'
defineOptions({ name: 'CrmCustomer' })
@@ -169,6 +211,7 @@ const queryParams = reactive({
name: '',
mobile: '',
areaId: undefined,
+ dealStatus: undefined,
industryId: undefined,
level: undefined,
source: undefined,
@@ -177,6 +220,7 @@ const queryParams = reactive({
const queryFormRef = ref() // 搜索的表单
const exportLoading = ref(false) // 导出的加载中
const activeName = ref('1') // 列表 tab
+const areaList = ref([])
/** tab 切换 */
const handleTabClick = (tab: TabsPaneContext) => {
@@ -214,6 +258,11 @@ const openDetail = (id: number) => {
push({ name: 'CrmCustomerDetail', params: { id } })
}
+/** 打开主要联系人详情 */
+const openPrimaryContactDetail = (id: number) => {
+ push({ name: 'CrmContactDetail', params: { id } })
+}
+
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
@@ -265,5 +314,8 @@ watch(
/** 初始化 **/
onMounted(() => {
getList()
+ AreaApi.getAreaTree().then(res => {
+ areaList.value = res
+ })
})