From 08bb022cb507e06709180ce06ec6975e1d6a6a59 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 20 Feb 2024 23:31:52 +0800 Subject: [PATCH 01/33] =?UTF-8?q?=E2=9C=A8=20CRM=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E8=81=94=E7=B3=BB=E4=BA=BA=E7=9A=84=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E3=80=81=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/contact/index.ts | 51 ++-- src/views/crm/clue/detail/index.vue | 2 +- src/views/crm/contact/ContactForm.vue | 240 ++++++++---------- .../contact/detail/ContactDetailsHeader.vue | 14 +- .../crm/contact/detail/ContactDetailsInfo.vue | 63 ++--- src/views/crm/contact/detail/index.vue | 30 ++- src/views/crm/contact/index.vue | 24 +- 7 files changed, 202 insertions(+), 222 deletions(-) diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts index 2dab70bc..a4150bec 100644 --- a/src/api/crm/contact/index.ts +++ b/src/api/crm/contact/index.ts @@ -2,29 +2,34 @@ import request from '@/config/axios' import { TransferReqVO } from '@/api/crm/customer' export interface ContactVO { - name: string - nextTime: Date - mobile: string - telephone: string - email: string - post: string - customerId: number - detailAddress: string - remark: string - ownerUserId: string - lastTime: Date - id: number - parentId: number - qq: number - wechat: string - sex: number - master: boolean - creatorName: string - updateTime?: Date - createTime?: Date - customerName: string - areaName: string - ownerUserName: string + id: number // 编号 + name: string // 联系人名称 + customerId: number // 客户编号 + customerName?: string // 客户名称 + contactLastTime: Date // 最后跟进时间 + contactLastContent: string // 最后跟进内容 + contactNextTime: Date // 下次联系时间 + ownerUserId: number // 负责人的用户编号 + ownerUserName?: string // 负责人的用户名称 + ownerUserDept?: string // 负责人的部门名称 + mobile: string // 手机号 + telephone: string // 电话 + qq: string // QQ + wechat: string // wechat + email: string // email + areaId: number // 所在地 + areaName?: string // 所在地名称 + detailAddress: string // 详细地址 + sex: number // 性别 + master: boolean // 是否主联系人 + post: string // 职务 + parentId: number // 上级联系人编号 + parentName?: string // 上级联系人名称 + remark: string // 备注 + creator: string // 创建人 + creatorName?: string // 创建人名称 + createTime: Date // 创建时间 + updateTime: Date // 更新时间 } export interface ContactBusinessReqVO { diff --git a/src/views/crm/clue/detail/index.vue b/src/views/crm/clue/detail/index.vue index ff83aeaf..f9074c14 100644 --- a/src/views/crm/clue/detail/index.vue +++ b/src/views/crm/clue/detail/index.vue @@ -33,7 +33,7 @@ ref="permissionListRef" :biz-id="clue.id!" :biz-type="BizTypeEnum.CRM_CLUE" - :show-action="!permissionListRef?.isPool || false" + :show-action="true" @quit-team="close" /> diff --git a/src/views/crm/contact/ContactForm.vue b/src/views/crm/contact/ContactForm.vue index 83eea14e..2940bb6a 100644 --- a/src/views/crm/contact/ContactForm.vue +++ b/src/views/crm/contact/ContactForm.vue @@ -1,28 +1,27 @@ - - {{ contact.name }} + {{ contact.name }} + {{ contact.customerName }} + {{ contact.mobile }} + {{ contact.telephone }} + {{ contact.email }} + {{ contact.qq }} + {{ contact.wechat }} + + {{ contact.areaName }} {{ contact.detailAddress }} - - {{ contact.customerName }} - - - {{ contact.mobile }} - - - {{ contact.telephone }} - - - {{ contact.email }} - - - {{ contact.qq }} - - - {{ contact.wechat }} - - - {{ contact.nextTime ? formatDate(contact.nextTime) : '空' }} - - - {{ contact.areaName }} - - - {{ contact.detailAddress }} + {{ contact.post }} + {{ contact.parentName }} + + - - {{ contact.remark }} + + {{ formatDate(contact.contactNextTime) }} + {{ contact.remark }} - - - {{ contact.ownerUserName }} + + {{ contact.ownerUserName }} + + {{ contact.contactLastContent }} - - {{ contact.creatorName }} + + {{ formatDate(contact.contactLastTime) }} +   + {{ contact.creatorName }} - {{ contact.createTime ? formatDate(contact.createTime) : '空' }} + {{ formatDate(contact.createTime) }} - {{ contact.updateTime ? formatDate(contact.updateTime) : '空' }} + {{ formatDate(contact.updateTime) }} diff --git a/src/views/crm/contact/detail/index.vue b/src/views/crm/contact/detail/index.vue index aee34166..bf27246b 100644 --- a/src/views/crm/contact/detail/index.vue +++ b/src/views/crm/contact/detail/index.vue @@ -9,6 +9,9 @@ + + + @@ -20,7 +23,7 @@ ref="permissionListRef" :biz-id="contact.id!" :biz-type="BizTypeEnum.CRM_CONTACT" - :show-action="!permissionListRef?.isPool || false" + :show-action="true" @quit-team="close" /> @@ -34,8 +37,8 @@ - - + + diff --git a/src/views/crm/contact/index.vue b/src/views/crm/contact/index.vue index b4f9150a..5cfde47a 100644 --- a/src/views/crm/contact/index.vue +++ b/src/views/crm/contact/index.vue @@ -53,15 +53,6 @@ @keyup.enter="handleQuery" /> - - - + + + + + diff --git a/src/views/crm/contract/components/ContractProductForm.vue b/src/views/crm/contract/components/ContractProductForm.vue new file mode 100644 index 00000000..c33b996a --- /dev/null +++ b/src/views/crm/contract/components/ContractProductForm.vue @@ -0,0 +1,183 @@ + + diff --git a/src/views/crm/contract/components/ProductList.vue b/src/views/crm/contract/components/ProductList.vue deleted file mode 100644 index ed4ce6f1..00000000 --- a/src/views/crm/contract/components/ProductList.vue +++ /dev/null @@ -1,171 +0,0 @@ - - - - From 3bfdb2df3301147d919e359ba11ab8883014a3a3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 23 Feb 2024 00:20:14 +0800 Subject: [PATCH 11/33] =?UTF-8?q?=E2=9C=A8=20CRM=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=90=88=E5=90=8C=E7=9A=84=E6=96=B0=E5=A2=9E=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/crm/contract/ContractForm.vue | 36 ++++++++++++++++++++----- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue index e962d525..3dac598c 100644 --- a/src/views/crm/contract/ContractForm.vue +++ b/src/views/crm/contract/ContractForm.vue @@ -38,7 +38,12 @@ - + - + { formRef.value?.resetFields() } -// TODO 芋艿:切换客户时,需要 reset 关联的几个字段 -// TODO 芋艿:选择商机时,需要自动设置 +/** 处理切换客户 */ +const handleCustomerChange = () => { + formData.value.businessId = undefined + formData.value.signContactId = undefined + formData.value.products = [] +} + +/** 处理商机变化 */ +const handleBusinessChange = async (businessId: number) => { + const business = await BusinessApi.getBusiness(businessId) + business.products.forEach((item) => { + item.contractPrice = item.businessPrice + }) + formData.value.products = business.products +} /** 动态获取客户联系人 */ const getContactOptions = computed(() => - contactList.value.filter((item) => item.customerId === formData.value.customerId) + contactList.value.filter((item) => item.customerId == formData.value.customerId) ) /** 动态获取商机 */ const getBusinessOptions = computed(() => - businessList.value.filter((item) => item.customerId === formData.value.customerId) + businessList.value.filter((item) => item.customerId == formData.value.customerId) ) From 9acd01e768c204b3d51c59e0fdd426cf4cf22af6 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 23 Feb 2024 09:31:48 +0800 Subject: [PATCH 12/33] =?UTF-8?q?=E2=9C=A8=20CRM=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=90=88=E5=90=8C=E7=9A=84=E8=B7=9F=E8=BF=9B=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/detail/BusinessProductList.vue | 2 +- .../contract/detail/ContractDetailsHeader.vue | 9 +- .../contract/detail/ContractDetailsInfo.vue | 47 +++---- .../contract/detail/ContractProductList.vue | 123 +++++++++--------- src/views/crm/contract/detail/index.vue | 11 +- 5 files changed, 93 insertions(+), 99 deletions(-) diff --git a/src/views/crm/business/detail/BusinessProductList.vue b/src/views/crm/business/detail/BusinessProductList.vue index f995f3e5..9a316659 100644 --- a/src/views/crm/business/detail/BusinessProductList.vue +++ b/src/views/crm/business/detail/BusinessProductList.vue @@ -26,7 +26,7 @@ :formatter="erpPriceTableColumnFormatter" /> - {{ floatToFixed2(contract.price) }} + {{ erpPriceInputFormatter(contract.totalPrice) }} {{ contract.orderDate ? formatDate(contract.orderDate) : '空' }} - - {{ floatToFixed2(contract.price) }} - + + 待实现 {{ contract.ownerUserName }} @@ -38,7 +37,7 @@ diff --git a/src/views/crm/contract/detail/index.vue b/src/views/crm/contract/detail/index.vue index 8ea43fb1..711869ad 100644 --- a/src/views/crm/contract/detail/index.vue +++ b/src/views/crm/contract/detail/index.vue @@ -10,22 +10,22 @@ - + + + - - + - @@ -51,6 +51,7 @@ import { getOperateLogPage } from '@/api/crm/operateLog' import ContractForm from '@/views/crm/contract/ContractForm.vue' import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue' import PermissionList from '@/views/crm/permission/components/PermissionList.vue' +import FollowUpList from '@/views/crm/followup/index.vue' defineOptions({ name: 'CrmContractDetail' }) From c1f507bcae08db307a37fd28e5545cee1a5c9427 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 23 Feb 2024 12:58:39 +0800 Subject: [PATCH 13/33] =?UTF-8?q?=E2=9C=A8=20CRM=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=90=88=E5=90=8C=E7=9A=84=E5=AE=A1=E6=89=B9=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 12 ++++++++++++ .../contract/detail/ContractDetailsHeader.vue | 4 ++-- src/views/crm/contract/detail/index.vue | 7 ++++--- src/views/crm/contract/index.vue | 17 ++++++++++++++++- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 08d5db98..43535cc3 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -539,6 +539,18 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, component: () => import('@/views/crm/contract/detail/index.vue') }, + { + path: 'contract/detail', + name: 'CrmContractDetail2', // 特殊:用于适配 BPM 打开详情 + meta: { + title: '合同详情XXX', + noCache: true, + hidden: true, + canTo: true, + activeMenu: '/crm/contract' + }, + component: () => import('@/views/crm/contract/detail/index.vue') + }, { path: 'contact/detail/:id', name: 'CrmContactDetail', diff --git a/src/views/crm/contract/detail/ContractDetailsHeader.vue b/src/views/crm/contract/detail/ContractDetailsHeader.vue index 59edc8f1..775a3f47 100644 --- a/src/views/crm/contract/detail/ContractDetailsHeader.vue +++ b/src/views/crm/contract/detail/ContractDetailsHeader.vue @@ -24,7 +24,7 @@ {{ erpPriceInputFormatter(contract.totalPrice) }} - {{ contract.orderDate ? formatDate(contract.orderDate) : '空' }} + {{ formatDate(contract.orderDate) }} 待实现 @@ -37,7 +37,7 @@ diff --git a/src/views/crm/contract/detail/index.vue b/src/views/crm/contract/detail/index.vue index c5d8c050..0ab33888 100644 --- a/src/views/crm/contract/detail/index.vue +++ b/src/views/crm/contract/detail/index.vue @@ -19,6 +19,8 @@ + + 123 - +