From ad987e9ef19d6c0de4c75a17f5d13a3c7646216a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 3 Feb 2024 01:14:24 +0800 Subject: [PATCH] =?UTF-8?q?CRM=EF=BC=9A=E4=BC=98=E5=8C=96=E5=90=88?= =?UTF-8?q?=E5=90=8C=E9=87=91=E9=A2=9D=E6=8E=92=E8=A1=8C=E3=80=81=E5=9B=9E?= =?UTF-8?q?=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 (cherry picked from commit 4549f8ed3cf29006f3dfb0e7b6870a9982a3f215) --- src/api/crm/bi/rank.ts | 25 +++ src/api/crm/bi/ranking.ts | 38 ----- src/store/modules/user.ts | 8 +- src/views/crm/bi/rank/ContractPriceRank.vue | 107 +++++++++++++ src/views/crm/bi/rank/ReceivablePriceRank.vue | 108 +++++++++++++ src/views/crm/bi/{ranking => rank}/index.vue | 50 +++--- .../components/RankingContractStatistics.vue | 143 ------------------ .../RankingReceivablesStatistics.vue | 143 ------------------ 8 files changed, 270 insertions(+), 352 deletions(-) create mode 100644 src/api/crm/bi/rank.ts delete mode 100644 src/api/crm/bi/ranking.ts create mode 100644 src/views/crm/bi/rank/ContractPriceRank.vue create mode 100644 src/views/crm/bi/rank/ReceivablePriceRank.vue rename src/views/crm/bi/{ranking => rank}/index.vue (62%) delete mode 100644 src/views/crm/bi/ranking/components/RankingContractStatistics.vue delete mode 100644 src/views/crm/bi/ranking/components/RankingReceivablesStatistics.vue diff --git a/src/api/crm/bi/rank.ts b/src/api/crm/bi/rank.ts new file mode 100644 index 00000000..8c7f36e0 --- /dev/null +++ b/src/api/crm/bi/rank.ts @@ -0,0 +1,25 @@ +import request from '@/config/axios' + +export interface BiRankRespVO { + count: number + nickname: string + deptName: string +} + +// 排行 API +export const RankApi = { + // 获得合同排行榜 + getContractPriceRank: (params: any) => { + return request.get({ + url: '/crm/bi-rank/get-contract-price-rank', + params + }) + }, + // 获得回款排行榜 + getReceivablePriceRank: (params: any) => { + return request.get({ + url: '/crm/bi-rank/get-receivable-price-rank', + params + }) + } +} diff --git a/src/api/crm/bi/ranking.ts b/src/api/crm/bi/ranking.ts deleted file mode 100644 index d45d6995..00000000 --- a/src/api/crm/bi/ranking.ts +++ /dev/null @@ -1,38 +0,0 @@ -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 - orderDate: Date[] - startTime: Date - endTime: Date -} - -// 排行 API -export const RankingStatisticsApi = { - // 获得合同排行榜 - contractAmountRanking: (params: any) => { - return request.get({ - url: '/crm/bi-ranking/contract-ranking', - params - }) - }, - // 获得回款排行榜 - receivablesAmountRanking: (params: any) => { - return request.get({ - url: '/crm/bi-ranking/receivables-ranking', - params - }) - } -} diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 430eab2e..e6bd5b37 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -10,7 +10,9 @@ interface UserVO { id: number avatar: string nickname: string + deptId: number } + interface UserInfoVO { permissions: string[] roles: string[] @@ -26,7 +28,8 @@ export const useUserStore = defineStore('admin-user', { user: { id: 0, avatar: '', - nickname: '' + nickname: '', + deptId: 0 } }), getters: { @@ -73,7 +76,8 @@ export const useUserStore = defineStore('admin-user', { this.user = { id: 0, avatar: '', - nickname: '' + nickname: '', + deptId: 0 } } } diff --git a/src/views/crm/bi/rank/ContractPriceRank.vue b/src/views/crm/bi/rank/ContractPriceRank.vue new file mode 100644 index 00000000..1b12999f --- /dev/null +++ b/src/views/crm/bi/rank/ContractPriceRank.vue @@ -0,0 +1,107 @@ + + + diff --git a/src/views/crm/bi/rank/ReceivablePriceRank.vue b/src/views/crm/bi/rank/ReceivablePriceRank.vue new file mode 100644 index 00000000..9eb83807 --- /dev/null +++ b/src/views/crm/bi/rank/ReceivablePriceRank.vue @@ -0,0 +1,108 @@ + + + diff --git a/src/views/crm/bi/ranking/index.vue b/src/views/crm/bi/rank/index.vue similarity index 62% rename from src/views/crm/bi/ranking/index.vue rename to src/views/crm/bi/rank/index.vue index f3fbfb5d..88bc33e7 100644 --- a/src/views/crm/bi/ranking/index.vue +++ b/src/views/crm/bi/rank/index.vue @@ -1,3 +1,4 @@ + - 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 @@ - - -