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 @@ - + @@ -93,20 +114,39 @@ - + + + + + + + + + > + + @@ -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 + }) })