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 { EChartsOption } from 'echarts'
import { clone } from 'lodash-es' import { clone } from 'lodash-es'
defineOptions({ name: 'ContactsCountRank' }) defineOptions({ name: 'ContactCountRank' })
const props = defineProps<{ queryParams: any }>() // const props = defineProps<{ queryParams: any }>() //
const loading = ref(false) // 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" type="index" width="80" />
<el-table-column label="签订人" align="center" prop="nickname" min-width="200" /> <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="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-table>
</el-card> </el-card>
</template> </template>
@ -21,6 +27,7 @@
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank' import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts' import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es' import { clone } from 'lodash-es'
import { erpPriceTableColumnFormatter } from '@/utils'
defineOptions({ name: 'ContractPriceRank' }) defineOptions({ name: 'ContractPriceRank' })
const props = defineProps<{ queryParams: any }>() // 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" type="index" width="80" />
<el-table-column label="签订人" align="center" prop="nickname" min-width="200" /> <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="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-table>
</el-card> </el-card>
</template> </template>
@ -21,6 +27,7 @@
import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank' import { StatisticsRankApi, StatisticsRankRespVO } from '@/api/crm/statistics/rank'
import { EChartsOption } from 'echarts' import { EChartsOption } from 'echarts'
import { clone } from 'lodash-es' import { clone } from 'lodash-es'
import { erpPriceTableColumnFormatter } from '@/utils'
defineOptions({ name: 'ReceivablePriceRank' }) defineOptions({ name: 'ReceivablePriceRank' })
const props = defineProps<{ queryParams: any }>() // const props = defineProps<{ queryParams: any }>() //

View File

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