|
@@ -3,22 +3,22 @@
|
|
|
<ContentWrap>
|
|
|
<!-- 搜索工作栏 -->
|
|
|
<el-form
|
|
|
- class="-mb-15px"
|
|
|
- :model="queryParams"
|
|
|
ref="queryFormRef"
|
|
|
:inline="true"
|
|
|
+ :model="queryParams"
|
|
|
+ class="-mb-15px"
|
|
|
label-width="68px"
|
|
|
>
|
|
|
<el-form-item label="时间范围" prop="orderDate">
|
|
|
<el-date-picker
|
|
|
v-model="queryParams.times"
|
|
|
+ :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
:shortcuts="defaultShortcuts"
|
|
|
class="!w-240px"
|
|
|
end-placeholder="结束日期"
|
|
|
start-placeholder="开始日期"
|
|
|
type="daterange"
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="时间间隔" prop="interval">
|
|
@@ -34,28 +34,34 @@
|
|
|
<el-form-item label="归属部门" prop="deptId">
|
|
|
<el-tree-select
|
|
|
v-model="queryParams.deptId"
|
|
|
- class="!w-240px"
|
|
|
:data="deptList"
|
|
|
:props="defaultProps"
|
|
|
check-strictly
|
|
|
+ class="!w-240px"
|
|
|
node-key="id"
|
|
|
placeholder="请选择归属部门"
|
|
|
@change="queryParams.userId = undefined"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="员工" prop="userId">
|
|
|
- <el-select v-model="queryParams.userId" class="!w-240px" placeholder="员工" clearable>
|
|
|
+ <el-select v-model="queryParams.userId" class="!w-240px" clearable placeholder="员工">
|
|
|
<el-option
|
|
|
v-for="(user, index) in userListByDeptId"
|
|
|
+ :key="index"
|
|
|
:label="user.nickname"
|
|
|
:value="user.id"
|
|
|
- :key="index"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button @click="handleQuery"> <Icon icon="ep:search" class="mr-5px" /> 搜索 </el-button>
|
|
|
- <el-button @click="resetQuery"> <Icon icon="ep:refresh" class="mr-5px" /> 重置 </el-button>
|
|
|
+ <el-button @click="handleQuery">
|
|
|
+ <Icon class="mr-5px" icon="ep:search" />
|
|
|
+ 搜索
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="resetQuery">
|
|
|
+ <Icon class="mr-5px" icon="ep:refresh" />
|
|
|
+ 重置
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</ContentWrap>
|
|
@@ -64,41 +70,25 @@
|
|
|
<el-col>
|
|
|
<el-tabs v-model="activeTab">
|
|
|
<!-- 客户总量分析 -->
|
|
|
- <el-tab-pane label="客户总量分析" name="customerSummary" lazy>
|
|
|
- <CustomerSummary :query-params="queryParams" ref="customerSummaryRef" />
|
|
|
+ <el-tab-pane label="客户总量分析" lazy name="customerSummary">
|
|
|
+ <CustomerSummary ref="customerSummaryRef" :query-params="queryParams" />
|
|
|
</el-tab-pane>
|
|
|
<!-- 客户跟进次数分析 -->
|
|
|
- <el-tab-pane label="客户跟进次数分析" name="followUpSummary" lazy>
|
|
|
- <CustomerFollowUpSummary :query-params="queryParams" ref="followUpSummaryRef" />
|
|
|
+ <el-tab-pane label="客户跟进次数分析" lazy name="followUpSummary">
|
|
|
+ <CustomerFollowUpSummary ref="followUpSummaryRef" :query-params="queryParams" />
|
|
|
</el-tab-pane>
|
|
|
<!-- 客户跟进方式分析 -->
|
|
|
- <el-tab-pane label="客户跟进方式分析" name="followUpType" lazy>
|
|
|
- <CustomerFollowUpType :query-params="queryParams" ref="followUpTypeRef" />
|
|
|
+ <el-tab-pane label="客户跟进方式分析" lazy name="followUpType">
|
|
|
+ <CustomerFollowUpType ref="followUpTypeRef" :query-params="queryParams" />
|
|
|
</el-tab-pane>
|
|
|
<!-- 客户转化率分析 -->
|
|
|
- <el-tab-pane label="客户转化率分析" name="conversionStat" lazy>
|
|
|
- <CustomerConversionStat :query-params="queryParams" ref="conversionStatRef" />
|
|
|
+ <el-tab-pane label="客户转化率分析" lazy name="conversionStat">
|
|
|
+ <CustomerConversionStat ref="conversionStatRef" :query-params="queryParams" />
|
|
|
</el-tab-pane>
|
|
|
<!-- 成交周期分析 -->
|
|
|
<el-tab-pane label="成交周期分析" lazy name="dealCycle">
|
|
|
<CustomerDealCycle ref="dealCycleRef" :query-params="queryParams" />
|
|
|
</el-tab-pane>
|
|
|
- <!-- 城市分布分析 -->
|
|
|
- <el-tab-pane label="城市分布分析" lazy name="addressRef">
|
|
|
- <CustomerAddress ref="addressRef" :query-params="queryParams" />
|
|
|
- </el-tab-pane>
|
|
|
- <!-- 客户级别分析 -->
|
|
|
- <el-tab-pane label="客户级别分析" lazy name="levelRef">
|
|
|
- <CustomerLevel ref="levelRef" :query-params="queryParams" />
|
|
|
- </el-tab-pane>
|
|
|
- <!-- 客户来源分析 -->
|
|
|
- <el-tab-pane label="客户来源分析" lazy name="sourceRef">
|
|
|
- <CustomerSource ref="sourceRef" :query-params="queryParams" />
|
|
|
- </el-tab-pane>
|
|
|
- <!-- 客户行业分析 -->
|
|
|
- <el-tab-pane label="客户行业分析" lazy name="industryRef">
|
|
|
- <CustomerIndustry ref="industryRef" :query-params="queryParams" />
|
|
|
- </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-col>
|
|
|
</template>
|
|
@@ -115,10 +105,6 @@ import CustomerFollowUpType from './components/CustomerFollowUpType.vue'
|
|
|
import CustomerConversionStat from './components/CustomerConversionStat.vue'
|
|
|
import CustomerDealCycle from './components/CustomerDealCycle.vue'
|
|
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|
|
-import CustomerAddress from './components/CustomerAddress.vue'
|
|
|
-import CustomerIndustry from './components/CustomerIndustry.vue'
|
|
|
-import CustomerSource from './components/CustomerSource.vue'
|
|
|
-import CustomerLevel from './components/CustomerLevel.vue'
|
|
|
|
|
|
defineOptions({ name: 'CrmStatisticsCustomer' })
|
|
|
|
|
@@ -152,13 +138,6 @@ const conversionStatRef = ref() // 4. 客户转化率分析
|
|
|
// 5. TODO 公海客户分析
|
|
|
// 缺 crm_owner_record 表 TODO @dhb52:可以先做界面 + 接口,接口数据直接写死返回,相当于 mock 出来
|
|
|
const dealCycleRef = ref() // 6. 成交周期分析
|
|
|
-const addressRef = ref()
|
|
|
-// 客户级别
|
|
|
-const levelRef = ref()
|
|
|
-// 客户来源
|
|
|
-const sourceRef = ref()
|
|
|
-// 客户行业
|
|
|
-const industryRef = ref()
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
@@ -178,19 +157,6 @@ const handleQuery = () => {
|
|
|
case 'dealCycle': // 成交周期分析
|
|
|
dealCycleRef.value?.loadData?.()
|
|
|
break
|
|
|
- // TODO @puhui999:这 4 个拆出去哈;独立一个【客户画像】菜单
|
|
|
- case 'addressRef':
|
|
|
- addressRef.value?.loadData?.()
|
|
|
- break
|
|
|
- case 'levelRef':
|
|
|
- levelRef.value?.loadData?.()
|
|
|
- break
|
|
|
- case 'sourceRef':
|
|
|
- sourceRef.value?.loadData?.()
|
|
|
- break
|
|
|
- case 'industryRef':
|
|
|
- industryRef.value?.loadData?.()
|
|
|
- break
|
|
|
}
|
|
|
}
|
|
|
|