|
@@ -49,44 +49,44 @@
|
|
|
</el-form>
|
|
|
</ContentWrap>
|
|
|
|
|
|
- <!-- 排行数据 -->
|
|
|
+ <!-- 客户统计 -->
|
|
|
<el-col>
|
|
|
<el-tabs v-model="activeTab">
|
|
|
<!-- 客户总量分析 -->
|
|
|
- <el-tab-pane label="客户总量分析" name="totalCustomerCount" lazy>
|
|
|
- <TotalCustomerCount :query-params="queryParams" ref="totalCustomerCountRef" />
|
|
|
+ <el-tab-pane label="客户总量分析" name="customerSummary" lazy>
|
|
|
+ <CustomerSummary :query-params="queryParams" ref="customerSummaryRef" />
|
|
|
</el-tab-pane>
|
|
|
<!-- 客户跟进次数分析 -->
|
|
|
- <el-tab-pane label="客户跟进次数分析" name="followupCount" lazy>
|
|
|
- <FollowupCount :query-params="queryParams" ref="followupCountRef" />
|
|
|
+ <el-tab-pane label="客户跟进次数分析" name="followupSummary" lazy>
|
|
|
+ <CustomerFollowupSummary :query-params="queryParams" ref="followupSummaryRef" />
|
|
|
</el-tab-pane>
|
|
|
<!-- 客户跟进方式分析 -->
|
|
|
<el-tab-pane label="客户跟进方式分析" name="followupType" lazy>
|
|
|
- <FollowupType :query-params="queryParams" ref="followupTypeRef" />
|
|
|
+ <CustomerFollowupType :query-params="queryParams" ref="followupTypeRef" />
|
|
|
</el-tab-pane>
|
|
|
<!-- 客户转化率分析 -->
|
|
|
- <el-tab-pane label="客户转化率分析" name="conversionRate" lazy>
|
|
|
- <ConversionRate :query-params="queryParams" ref="conversionRateRef" />
|
|
|
+ <el-tab-pane label="客户转化率分析" name="conversionStat" lazy>
|
|
|
+ <CustomerConversionStat :query-params="queryParams" ref="conversionStatRef" />
|
|
|
</el-tab-pane>
|
|
|
<!-- 成交周期分析 -->
|
|
|
- <el-tab-pane label="成交周期分析" name="customerCycle" lazy>
|
|
|
- <CustomerCycle :query-params="queryParams" ref="customerCycleRef" />
|
|
|
+ <el-tab-pane label="成交周期分析" name="dealCycle" lazy>
|
|
|
+ <CustomerDealCycle :query-params="queryParams" ref="dealCycleRef" />
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-col>
|
|
|
</template>
|
|
|
+
|
|
|
<script lang="ts" setup>
|
|
|
import * as DeptApi from '@/api/system/dept'
|
|
|
import * as UserApi from '@/api/system/user'
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
import { beginOfDay, defaultShortcuts, endOfDay, formatDate } from '@/utils/formatTime'
|
|
|
import { defaultProps, handleTree } from '@/utils/tree'
|
|
|
-import TotalCustomerCount from './components/TotalCustomerCount.vue'
|
|
|
-import FollowupCount from './components/FollowupCount.vue'
|
|
|
-import FollowupType from './components/FollowupType.vue'
|
|
|
-import ConversionRate from './components/ConversionRate.vue'
|
|
|
-import CustomerCycle from './components/CustomerCycle.vue'
|
|
|
-
|
|
|
+import CustomerSummary from './components/CustomerSummary.vue'
|
|
|
+import CustomerFollowupSummary from './components/CustomerFollowupSummary.vue'
|
|
|
+import CustomerFollowupType from './components/CustomerFollowupType.vue'
|
|
|
+import CustomerConversionStat from './components/CustomerConversionStat.vue'
|
|
|
+import CustomerDealCycle from './components/CustomerDealCycle.vue'
|
|
|
|
|
|
defineOptions({ name: 'CrmStatisticsCustomer' })
|
|
|
|
|
@@ -105,41 +105,43 @@ const deptList = ref<Tree[]>([]) // 部门树形结构
|
|
|
const userList = ref<UserApi.UserVO[]>([]) // 全量用户清单
|
|
|
// 根据选择的部门筛选员工清单
|
|
|
const userListByDeptId = computed(() =>
|
|
|
- queryParams.deptId ? userList.value.filter((u: UserApi.UserVO) => u.deptId === queryParams.deptId) : []
|
|
|
+ queryParams.deptId
|
|
|
+ ? userList.value.filter((u: UserApi.UserVO) => u.deptId === queryParams.deptId)
|
|
|
+ : []
|
|
|
)
|
|
|
|
|
|
// 活跃标签
|
|
|
-const activeTab = ref('totalCustomerCount')
|
|
|
+const activeTab = ref('customerSummary')
|
|
|
// 1.客户总量分析
|
|
|
-const totalCustomerCountRef = ref()
|
|
|
+const customerSummaryRef = ref()
|
|
|
// 2.客户跟进次数分析
|
|
|
-const followupCountRef = ref()
|
|
|
+const followupSummaryRef = ref()
|
|
|
// 3.客户跟进方式分析
|
|
|
const followupTypeRef = ref()
|
|
|
// 4.客户转化率分析
|
|
|
-const conversionRateRef = ref()
|
|
|
+const conversionStatRef = ref()
|
|
|
// 5.公海客户分析
|
|
|
// 缺 crm_owner_record 表
|
|
|
// 6.成交周期分析
|
|
|
-const customerCycleRef = ref()
|
|
|
+const dealCycleRef = ref()
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
|
switch (activeTab.value) {
|
|
|
- case 'totalCustomerCount':
|
|
|
- totalCustomerCountRef.value?.loadData?.()
|
|
|
+ case 'customerSummary':
|
|
|
+ customerSummaryRef.value?.loadData?.()
|
|
|
break
|
|
|
- case 'followupCount':
|
|
|
- followupCountRef.value?.loadData?.()
|
|
|
+ case 'followupSummary':
|
|
|
+ followupSummaryRef.value?.loadData?.()
|
|
|
break
|
|
|
case 'followupType':
|
|
|
followupTypeRef.value?.loadData?.()
|
|
|
break
|
|
|
- case 'conversionRate':
|
|
|
- conversionRateRef.value?.loadData?.()
|
|
|
+ case 'conversionStat':
|
|
|
+ conversionStatRef.value?.loadData?.()
|
|
|
break
|
|
|
- case 'customerCycle':
|
|
|
- customerCycleRef.value?.loadData?.()
|
|
|
+ case 'dealCycle':
|
|
|
+ dealCycleRef.value?.loadData?.()
|
|
|
break
|
|
|
}
|
|
|
}
|