CRM:完善【排行版】功能

This commit is contained in:
YunaiV 2024-03-30 11:48:41 +08:00
parent 1b7d604858
commit 291dc51849
9 changed files with 38 additions and 23 deletions

View File

@ -22,7 +22,7 @@ import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/ra
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
defineOptions({ name: 'ContactsCountRank' })
defineOptions({ name: 'ContactCountRank' })
const props = defineProps<{ queryParams: any }>() //
const loading = ref(false) //

View File

@ -13,7 +13,13 @@
<el-table-column label="公司排名" align="center" type="index" width="80" />
<el-table-column label="签订人" align="center" prop="nickname" min-width="200" />
<el-table-column label="部门" align="center" prop="deptName" min-width="200" />
<el-table-column label="合同金额(元)" align="center" prop="count" min-width="200" />
<el-table-column
label="合同金额(元)"
align="center"
prop="count"
min-width="200"
:formatter="erpPriceTableColumnFormatter"
/>
</el-table>
</el-card>
</template>
@ -21,6 +27,7 @@
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
import { erpPriceTableColumnFormatter } from '@/utils'
defineOptions({ name: 'ContractPriceRank' })
const props = defineProps<{ queryParams: any }>() //

View File

@ -13,7 +13,13 @@
<el-table-column label="公司排名" align="center" type="index" width="80" />
<el-table-column label="签订人" align="center" prop="nickname" min-width="200" />
<el-table-column label="部门" align="center" prop="deptName" min-width="200" />
<el-table-column label="回款金额(元)" align="center" prop="count" min-width="200" />
<el-table-column
label="回款金额(元)"
align="center"
prop="count"
min-width="200"
:formatter="erpPriceTableColumnFormatter"
/>
</el-table>
</el-card>
</template>
@ -21,6 +27,7 @@
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es'
import { erpPriceTableColumnFormatter } from '@/utils'
defineOptions({ name: 'ReceivablePriceRank' })
const props = defineProps<{ queryParams: any }>() //

View File

@ -29,6 +29,7 @@
check-strictly
node-key="id"
placeholder="请选择归属部门"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
@ -62,8 +63,8 @@
<CustomerCountRank :query-params="queryParams" ref="customerCountRankRef" />
</el-tab-pane>
<!-- 新增联系人数排行 -->
<el-tab-pane label="新增联系人数排行" name="contactsCountRank" lazy>
<ContactsCountRank :query-params="queryParams" ref="contactsCountRankRef" />
<el-tab-pane label="新增联系人数排行" name="contactCountRank" lazy>
<ContactCountRank :query-params="queryParams" ref="contactCountRankRef" />
</el-tab-pane>
<!-- 跟进次数排行 -->
<el-tab-pane label="跟进次数排行" name="followCountRank" lazy>
@ -77,14 +78,14 @@
</el-col>
</template>
<script lang="ts" setup>
import ContractPriceRank from './ContractPriceRank.vue'
import ReceivablePriceRank from './ReceivablePriceRank.vue'
import ContractCountRank from './ContractCountRank.vue'
import ProductSalesRank from './ProductSalesRank.vue'
import CustomerCountRank from './CustomerCountRank.vue'
import ContactsCountRank from './ContactsCountRank.vue'
import FollowCountRank from './FollowCountRank.vue'
import FollowCustomerCountRank from './FollowCustomerCountRank.vue'
import ContractPriceRank from './components/ContractPriceRank.vue'
import ReceivablePriceRank from './components/ReceivablePriceRank.vue'
import ContractCountRank from './components/ContractCountRank.vue'
import ProductSalesRank from './components/ProductSalesRank.vue'
import CustomerCountRank from './components/CustomerCountRank.vue'
import ContactCountRank from './components/ContactCountRank.vue'
import FollowCountRank from './components/FollowCountRank.vue'
import FollowCustomerCountRank from './components/FollowCustomerCountRank.vue'
import { defaultProps, handleTree } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
import { beginOfDay, defaultShortcuts, endOfDay, formatDate } from '@/utils/formatTime'
@ -109,35 +110,35 @@ const receivablePriceRankRef = ref() // ReceivablePriceRank 组件的引用
const contractCountRankRef = ref() // ContractCountRank
const productSalesRankRef = ref() // ProductSalesRank
const customerCountRankRef = ref() // CustomerCountRank
const contactsCountRankRef = ref() // ContactsCountRank
const contactCountRankRef = ref() // ContactCountRank
const followCountRankRef = ref() // FollowCountRank
const followCustomerCountRankRef = ref() // FollowCustomerCountRank
/** 搜索按钮操作 */
const handleQuery = () => {
switch (activeTab.value) {
case 'contractPriceRank':
case 'contractPriceRank': //
contractPriceRankRef.value?.loadData?.()
break
case 'receivablePriceRank':
case 'receivablePriceRank': //
receivablePriceRankRef.value?.loadData?.()
break
case 'contractCountRank':
case 'contractCountRank': //
contractCountRankRef.value?.loadData?.()
break
case 'productSalesRank':
case 'productSalesRank': //
productSalesRankRef.value?.loadData?.()
break
case 'customerCountRank':
case 'customerCountRank': //
customerCountRankRef.value?.loadData?.()
break
case 'contactsCountRank':
contactsCountRankRef.value?.loadData?.()
case 'contactCountRank': //
contactCountRankRef.value?.loadData?.()
break
case 'followCountRank':
case 'followCountRank': //
followCountRankRef.value?.loadData?.()
break
case 'followCustomerCountRank':
case 'followCustomerCountRank': //
followCustomerCountRankRef.value?.loadData?.()
break
}