From acc3a6bcfdb83a24d541bf4e7904cfbf328fc85f Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 26 Jan 2024 21:54:17 +0800 Subject: [PATCH 01/19] fix: warning UnoCSS utilities are not ordered --- src/views/Login/Login.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index e8b03a93..5d349ce3 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -1,7 +1,7 @@ diff --git a/src/views/crm/contact/detail/index.vue b/src/views/crm/contact/detail/index.vue index 4932292c..7d287381 100644 --- a/src/views/crm/contact/detail/index.vue +++ b/src/views/crm/contact/detail/index.vue @@ -1,5 +1,12 @@ diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue index 5d5578f9..a9271ce5 100644 --- a/src/views/crm/contract/ContractForm.vue +++ b/src/views/crm/contract/ContractForm.vue @@ -1,54 +1,108 @@ - diff --git a/src/views/crm/contract/components/ProductList.vue b/src/views/crm/contract/components/ProductList.vue new file mode 100644 index 00000000..6c4ca350 --- /dev/null +++ b/src/views/crm/contract/components/ProductList.vue @@ -0,0 +1,112 @@ + + + From 331b6c5611001f622c70646883bd4fc8b62ff091 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 27 Jan 2024 23:18:52 +0800 Subject: [PATCH 06/19] =?UTF-8?q?CRM-=E5=90=88=E5=90=8C=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=90=88=E5=90=8C=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/contract/index.ts | 3 +-- src/views/crm/contract/ContractForm.vue | 11 +++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts index 527eb5c7..1d944498 100644 --- a/src/api/crm/contract/index.ts +++ b/src/api/crm/contract/index.ts @@ -15,11 +15,10 @@ export interface ContractVO { price: number discountPercent: number productPrice: number - roUserIds: string - rwUserIds: string contactId: number signUserId: number contactLastTime: Date + status: number remark: string productItems: ProductExpandVO[] } diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue index a9271ce5..28e49301 100644 --- a/src/views/crm/contract/ContractForm.vue +++ b/src/views/crm/contract/ContractForm.vue @@ -5,7 +5,7 @@ v-loading="formLoading" :model="formData" :rules="formRules" - label-width="100px" + label-width="110px" > @@ -152,7 +152,8 @@ @@ -164,6 +165,7 @@ import * as UserApi from '@/api/system/user' import * as ContactApi from '@/api/crm/contact' import * as BusinessApi from '@/api/crm/business' import ProductList from './components/ProductList.vue' +import { cloneDeep } from 'lodash-es' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -217,7 +219,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 -const submitForm = async () => { +const submitForm = async (status: number) => { // 校验表单 if (!formRef) return const valid = await formRef.value.validate() @@ -225,7 +227,8 @@ const submitForm = async () => { // 提交请求 formLoading.value = true try { - const data = formData.value as unknown as ContractApi.ContractVO + const data = cloneDeep(unref(formData.value)) as unknown as ContractApi.ContractVO + data.status = status if (formType.value === 'create') { await ContractApi.createContract(data) message.success(t('common.createSuccess')) From 4a2349ecf57ba7ec89166de271487459994b59de Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sat, 27 Jan 2024 23:42:13 +0800 Subject: [PATCH 07/19] =?UTF-8?q?feat:=20CRM-backlog-=E5=BE=85=E8=BF=9B?= =?UTF-8?q?=E5=85=A5=E5=85=AC=E6=B5=B7=E7=9A=84=E5=AE=A2=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/customer/index.ts | 5 + src/views/crm/backlog/index.vue | 2 +- .../crm/backlog/tables/PutInPoolRemind.vue | 156 +++++++++++++++++- 3 files changed, 154 insertions(+), 9 deletions(-) diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index 4542c86a..eb3445cf 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -100,3 +100,8 @@ export const receiveCustomer = async (ids: any[]) => { export const putCustomerPool = async (id: number) => { return await request.put({ url: `/crm/customer/put-pool?id=${id}` }) } + +// 进入公海客户提醒 +export const getPutInPoolRemindCustomerPage = async (params) => { + return await request.get({ url: `/crm/customer/put-in-pool-remind-page`, params }) +} diff --git a/src/views/crm/backlog/index.vue b/src/views/crm/backlog/index.vue index bbaf3f16..bc20c425 100644 --- a/src/views/crm/backlog/index.vue +++ b/src/views/crm/backlog/index.vue @@ -1,3 +1,4 @@ + diff --git a/src/views/crm/contract/detail/index.vue b/src/views/crm/contract/detail/index.vue index 5ba1e997..fde35ba2 100644 --- a/src/views/crm/contract/detail/index.vue +++ b/src/views/crm/contract/detail/index.vue @@ -105,7 +105,7 @@ onMounted(async () => { close() return } - contractId.value = id + contractId.value = id as unknown as number await getContractData() }) diff --git a/src/views/crm/contract/oa/ContractDetail/index.vue b/src/views/crm/contract/oa/ContractDetail/index.vue new file mode 100644 index 00000000..ac8a4f63 --- /dev/null +++ b/src/views/crm/contract/oa/ContractDetail/index.vue @@ -0,0 +1,220 @@ + + From 770e551900cebf69deb5c34a08b85521861090ca Mon Sep 17 00:00:00 2001 From: anhaohao <1036606149@qq.com> Date: Sun, 28 Jan 2024 20:04:42 +0800 Subject: [PATCH 11/19] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=95=86?= =?UTF-8?q?=E4=B8=9A=E6=99=BA=E8=83=BD-=E6=8E=92=E8=A1=8C=E6=A6=9C?= =?UTF-8?q?=EF=BC=8C=E5=90=88=E5=90=8C=E9=87=91=E9=A2=9D=E6=8E=92=E8=A1=8C?= =?UTF-8?q?=E5=92=8C=E5=9B=9E=E6=AC=BE=E9=87=91=E9=A2=9D=E6=8E=92=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/bi/ranking.ts | 34 +++++ src/utils/dict.ts | 5 +- .../components/RankingContractStatistics.vue | 133 ++++++++++++++++++ .../RankingReceivablesStatistics.vue | 133 ++++++++++++++++++ src/views/crm/bi/ranking/index.vue | 91 ++++++++++++ 5 files changed, 395 insertions(+), 1 deletion(-) create mode 100644 src/api/crm/bi/ranking.ts create mode 100644 src/views/crm/bi/ranking/components/RankingContractStatistics.vue create mode 100644 src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue create mode 100644 src/views/crm/bi/ranking/index.vue diff --git a/src/api/crm/bi/ranking.ts b/src/api/crm/bi/ranking.ts new file mode 100644 index 00000000..53c09e63 --- /dev/null +++ b/src/api/crm/bi/ranking.ts @@ -0,0 +1,34 @@ +import request from '@/config/axios' + +export interface BiContractRanKingRespVO { + price: number + nickname: string + deptName: string +} +export interface BiReceivablesRanKingRespVO { + price: number + nickname: string + deptName: string +} +export interface BiRankReqVO { + deptId: number + type: string +} + +// 排行 API +export const RankingStatisticsApi = { + // 获得合同排行榜 + contractAmountRanking: (params: any) => { + return request.get({ + url: '/bi/ranking/contract-ranking', + params + }) + }, + // 获得回款排行榜 + receivablesAmountRanking: (params: any) => { + return request.get({ + url: '/bi/ranking/receivables-ranking', + params + }) + } +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 2c8e47ff..4c490f59 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -203,5 +203,8 @@ export enum DICT_TYPE { CRM_PRODUCT_STATUS = 'crm_product_status', CRM_PERMISSION_LEVEL = 'crm_permission_level', // CRM 数据权限的级别 CRM_PRODUCT_UNIT = 'crm_product_unit', // 产品单位 - CRM_FOLLOW_UP_TYPE = 'crm_follow_up_type' // 跟进方式 + CRM_FOLLOW_UP_TYPE = 'crm_follow_up_type', // 跟进方式 + + // ========== BI - 商业智能模块 ========== + BI_ANALYZE_TYPE = 'bi_analyze_type' // 分析类型 } diff --git a/src/views/crm/bi/ranking/components/RankingContractStatistics.vue b/src/views/crm/bi/ranking/components/RankingContractStatistics.vue new file mode 100644 index 00000000..b560131c --- /dev/null +++ b/src/views/crm/bi/ranking/components/RankingContractStatistics.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue b/src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue new file mode 100644 index 00000000..80186535 --- /dev/null +++ b/src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/views/crm/bi/ranking/index.vue b/src/views/crm/bi/ranking/index.vue new file mode 100644 index 00000000..fac2b8ba --- /dev/null +++ b/src/views/crm/bi/ranking/index.vue @@ -0,0 +1,91 @@ + + + From 34a796de89b9d5e1fb660eb5bd4154a33ebf76f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=B5=A9=E6=B5=A9?= <1036606149@qq.com> Date: Wed, 31 Jan 2024 23:37:21 +0800 Subject: [PATCH 12/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=95=86?= =?UTF-8?q?=E4=B8=9A=E6=99=BA=E8=83=BD-=E6=8E=92=E8=A1=8C=E6=A6=9C?= =?UTF-8?q?=EF=BC=8C=E5=90=88=E5=90=8C=E9=87=91=E9=A2=9D=E6=8E=92=E8=A1=8C?= =?UTF-8?q?=E5=92=8C=E5=9B=9E=E6=AC=BE=E9=87=91=E9=A2=9D=E6=8E=92=E8=A1=8C?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=9D=A1=E4=BB=B6=E5=92=8C=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/bi/ranking.ts | 8 +++-- .../components/RankingContractStatistics.vue | 14 ++++++-- .../RankingReceivablesStatistics.vue | 16 +++++++-- src/views/crm/bi/ranking/index.vue | 34 ++++++++++++------- 4 files changed, 52 insertions(+), 20 deletions(-) diff --git a/src/api/crm/bi/ranking.ts b/src/api/crm/bi/ranking.ts index 53c09e63..f68c2dd0 100644 --- a/src/api/crm/bi/ranking.ts +++ b/src/api/crm/bi/ranking.ts @@ -12,7 +12,9 @@ export interface BiReceivablesRanKingRespVO { } export interface BiRankReqVO { deptId: number - type: string + orderDate: Date[] + startTime: Date + endTime: Date } // 排行 API @@ -20,14 +22,14 @@ export const RankingStatisticsApi = { // 获得合同排行榜 contractAmountRanking: (params: any) => { return request.get({ - url: '/bi/ranking/contract-ranking', + url: '/crm/bi-ranking/contract-ranking', params }) }, // 获得回款排行榜 receivablesAmountRanking: (params: any) => { return request.get({ - url: '/bi/ranking/receivables-ranking', + url: '/crm/bi-ranking/receivables-ranking', params }) } diff --git a/src/views/crm/bi/ranking/components/RankingContractStatistics.vue b/src/views/crm/bi/ranking/components/RankingContractStatistics.vue index b560131c..cf0c22f9 100644 --- a/src/views/crm/bi/ranking/components/RankingContractStatistics.vue +++ b/src/views/crm/bi/ranking/components/RankingContractStatistics.vue @@ -18,14 +18,21 @@ - diff --git a/src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue b/src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue deleted file mode 100644 index c56d94c7..00000000 --- a/src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue +++ /dev/null @@ -1,143 +0,0 @@ - - - From 6d0e242387476f7cff3902b1a07e4e224843a397 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 3 Feb 2024 20:47:50 +0800 Subject: [PATCH 15/19] =?UTF-8?q?CRM-=E5=90=88=E5=90=8C=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=20TODO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/business/index.ts | 5 +- src/api/crm/clue/index.ts | 6 ++ src/api/crm/contact/index.ts | 4 +- src/api/crm/contract/index.ts | 9 +-- src/api/crm/customer/index.ts | 4 +- src/components/Table/src/TableSelectForm.vue | 2 +- src/views/crm/contact/detail/index.vue | 2 +- src/views/crm/contract/ContractForm.vue | 7 +- .../crm/contract/components/ProductList.vue | 44 ++++++++++--- .../contract/detail/ContractDetailsHeader.vue | 20 +++--- .../contract/detail/ContractDetailsInfo.vue | 35 +++++++++- .../contract/detail/ContractProductList.vue | 64 +++++++++++++++++++ src/views/crm/contract/detail/index.vue | 25 +++----- src/views/crm/contract/index.vue | 38 ++++------- src/views/crm/customer/detail/index.vue | 2 +- src/views/crm/customer/index.vue | 7 +- 16 files changed, 194 insertions(+), 80 deletions(-) create mode 100644 src/views/crm/contract/detail/ContractProductList.vue diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts index 79568dec..bc3abe62 100644 --- a/src/api/crm/business/index.ts +++ b/src/api/crm/business/index.ts @@ -73,7 +73,6 @@ export const getBusinessListByIds = async (val: number[]) => { } // 商机转移 -// TODO @puhui999:transferBusiness -export const transfer = async (data: TransferReqVO) => { - return await request.put({ url: '/crm/business/transfer', data }) +export const transferBusiness = async (data: TransferReqVO) => { + return await request.put({ url: '/crm/business/transfer-business', data }) } diff --git a/src/api/crm/clue/index.ts b/src/api/crm/clue/index.ts index 39da03d3..711a5041 100644 --- a/src/api/crm/clue/index.ts +++ b/src/api/crm/clue/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import { TransferReqVO } from '@/api/crm/customer' export interface ClueVO { id: number @@ -44,3 +45,8 @@ export const deleteClue = async (id: number) => { export const exportClue = async (params) => { return await request.download({ url: `/crm/clue/export-excel`, params }) } + +// 线索转移 +export const transferClue = async (data: TransferReqVO) => { + return await request.put({ url: '/crm/clue/transfer-clue', data }) +} diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts index 6edb90a1..b728c80a 100644 --- a/src/api/crm/contact/index.ts +++ b/src/api/crm/contact/index.ts @@ -88,6 +88,6 @@ export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => { } // 联系人转移 -export const transfer = async (data: TransferReqVO) => { - return await request.put({ url: '/crm/contact/transfer', data }) +export const transferContact = async (data: TransferReqVO) => { + return await request.put({ url: '/crm/contact/transfer-contact', data }) } diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts index 58f63631..bb4c7a7e 100644 --- a/src/api/crm/contract/index.ts +++ b/src/api/crm/contract/index.ts @@ -7,6 +7,7 @@ export interface ContractVO { name: string customerId: number businessId: number + businessName: string processInstanceId: number orderDate: Date ownerUserId: number @@ -18,8 +19,9 @@ export interface ContractVO { productPrice: number contactId: number signUserId: number + signUserName: string contactLastTime: Date - status: number + auditStatus: number remark: string productItems: ProductExpandVO[] creatorName: string @@ -71,7 +73,6 @@ export const handleApprove = async (id: number) => { } // 合同转移 -// TODO @puhui999:transfer 相关方法,这块要补充下; -export const transfer = async (data: TransferReqVO) => { - return await request.put({ url: '/crm/contract/transfer', data }) +export const transferContract = async (data: TransferReqVO) => { + return await request.put({ url: '/crm/contract/transfer-contract', data }) } diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index a6fb489b..d867e415 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -82,8 +82,8 @@ export interface TransferReqVO { } // 客户转移 -export const transfer = async (data: TransferReqVO) => { - return await request.put({ url: '/crm/customer/transfer', data }) +export const transferCustomer = async (data: TransferReqVO) => { + return await request.put({ url: '/crm/customer/transfer-customer', data }) } // 锁定/解锁客户 diff --git a/src/components/Table/src/TableSelectForm.vue b/src/components/Table/src/TableSelectForm.vue index fde540cd..7fece2d2 100644 --- a/src/components/Table/src/TableSelectForm.vue +++ b/src/components/Table/src/TableSelectForm.vue @@ -1,4 +1,4 @@ - +