From d7aba16e37be26620db49bed2ef8fab3b271b437 Mon Sep 17 00:00:00 2001 From: wersd <1523826083@qq.com> Date: Sun, 1 Jun 2025 16:29:25 +0800 Subject: [PATCH] =?UTF-8?q?crm=20=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/customer/index.ts | 2 +- src/views/crm/contact/ContactForm.vue | 74 +---------- .../crm/contact/components/ContactList.vue | 4 +- .../crm/contract/components/ContractList.vue | 8 -- src/views/crm/customer/CustomerForm.vue | 32 +++-- .../customer/detail/CustomerDetailsHeader.vue | 16 ++- .../customer/detail/CustomerDetailsInfo.vue | 4 +- src/views/crm/customer/detail/index.vue | 14 +-- src/views/crm/customer/index.vue | 17 ++- src/views/crm/followup/FollowUpRecordForm.vue | 119 ++++++++++-------- src/views/crm/followup/index.vue | 10 +- 11 files changed, 141 insertions(+), 159 deletions(-) diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index b2558f29c..15488e0bc 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -74,7 +74,7 @@ export const updateCustomer = async (data: CustomerVO) => { } // 更新客户的成交状态 -export const updateCustomerDealStatus = async (id: number, dealStatus: boolean) => { +export const updateCustomerDealStatus = async (id: number, dealStatus: number) => { return await request.put({ url: `/crm/customer/update-deal-status`, params: { id, dealStatus } }) } diff --git a/src/views/crm/contact/ContactForm.vue b/src/views/crm/contact/ContactForm.vue index 81813e6a2..b842ee615 100644 --- a/src/views/crm/contact/ContactForm.vue +++ b/src/views/crm/contact/ContactForm.vue @@ -13,41 +13,6 @@ - - - - - - - - - - - - - - - - @@ -85,7 +50,7 @@ - + - + - - - - - - - - - - - - - - - - - - + diff --git a/src/views/crm/contact/components/ContactList.vue b/src/views/crm/contact/components/ContactList.vue index 1c12ca81e..716028a84 100644 --- a/src/views/crm/contact/components/ContactList.vue +++ b/src/views/crm/contact/components/ContactList.vue @@ -42,8 +42,8 @@ - - + + diff --git a/src/views/crm/contract/components/ContractList.vue b/src/views/crm/contract/components/ContractList.vue index f693c9ab1..a78bb999f 100644 --- a/src/views/crm/contract/components/ContractList.vue +++ b/src/views/crm/contract/components/ContractList.vue @@ -1,12 +1,4 @@ diff --git a/src/views/crm/customer/detail/CustomerDetailsInfo.vue b/src/views/crm/customer/detail/CustomerDetailsInfo.vue index 3822a3256..857e2a05e 100644 --- a/src/views/crm/customer/detail/CustomerDetailsInfo.vue +++ b/src/views/crm/customer/detail/CustomerDetailsInfo.vue @@ -33,9 +33,9 @@ {{ customer.ownerUserName }} - + {{ formatDate(customer.contactLastTime) }} diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index b9c4c9d62..d25207e85 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -11,9 +11,9 @@ 转移 - + - + { /** 更新成交状态操作 */ const handleUpdateDealStatus = async () => { - const dealStatus = !customer.value.dealStatus + const dealStatus = customer.value.dealStatus try { - // 更新状态的二次确认 - await message.confirm(`确定更新成交状态为【${dealStatus ? '已成交' : '未成交'}】吗?`) + // // 更新状态的二次确认 + // await message.confirm(`确定更新成交状态为【${dealStatus ? '已成交' : '未成交'}】吗?`) // 发起更新 await CustomerApi.updateCustomerDealStatus(customerId.value, dealStatus) - message.success(`更新成交状态成功`) + // message.success(`更新成交状态成功`) // 刷新数据 await getCustomer() } catch {} diff --git a/src/views/crm/customer/index.vue b/src/views/crm/customer/index.vue index c9e6b6558..59d7896d3 100644 --- a/src/views/crm/customer/index.vue +++ b/src/views/crm/customer/index.vue @@ -116,8 +116,12 @@ @@ -260,8 +264,15 @@ const openDetail = (id: number) => { /** 打开主要联系人详情 */ const openPrimaryContactDetail = (id: number) => { - push({ name: 'CrmContactDetail', params: { id } }) + if (!id) { + // id 为空跳转客户详情 + push({ name: 'CrmCustomerDetail', params: { id: scopeRowIdForCustomerDetail.value } }) + } else { + push({ name: 'CrmContactDetail', params: { id } }) + } } +// 用于存储当前行客户id +const scopeRowIdForCustomerDetail = ref(null) /** 添加/修改操作 */ const formRef = ref() diff --git a/src/views/crm/followup/FollowUpRecordForm.vue b/src/views/crm/followup/FollowUpRecordForm.vue index 0b21e1ede..406aed669 100644 --- a/src/views/crm/followup/FollowUpRecordForm.vue +++ b/src/views/crm/followup/FollowUpRecordForm.vue @@ -1,4 +1,4 @@ - + diff --git a/src/views/crm/followup/index.vue b/src/views/crm/followup/index.vue index 52c9821ca..1cbf5a1a5 100644 --- a/src/views/crm/followup/index.vue +++ b/src/views/crm/followup/index.vue @@ -15,13 +15,17 @@ :timestamp="formatDate(item.createTime)" placement="top" > +
跟进人:{{ item.creatorName }} - 跟进类型: + 跟进方式:
- - + +