2024-01-14 22:44:25 +08:00
|
|
|
<template>
|
|
|
|
<el-row :gutter="20">
|
|
|
|
<el-col :span="4" class="min-w-[200px]">
|
|
|
|
<div class="side-item-list">
|
|
|
|
<div
|
|
|
|
v-for="(item, index) in leftSides"
|
|
|
|
:key="index"
|
2024-02-19 22:47:35 +08:00
|
|
|
:class="leftMenu == item.menu ? 'side-item-select' : 'side-item-default'"
|
2024-01-14 22:44:25 +08:00
|
|
|
class="side-item"
|
|
|
|
@click="sideClick(item)"
|
|
|
|
>
|
|
|
|
{{ item.name }}
|
2024-02-19 22:47:35 +08:00
|
|
|
<el-badge v-if="item.count > 0" :max="99" :value="item.count" />
|
2024-01-14 22:44:25 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="20" :xs="24">
|
2024-02-19 22:47:35 +08:00
|
|
|
<TodayCustomer v-if="leftMenu === 'todayCustomer'" />
|
|
|
|
<ClueFollowList v-if="leftMenu === 'clueFollow'" />
|
|
|
|
<CheckContract v-if="leftMenu === 'checkContract'" />
|
|
|
|
<CheckReceivables v-if="leftMenu === 'checkReceivables'" />
|
|
|
|
<EndContract v-if="leftMenu === 'endContract'" />
|
|
|
|
<FollowCustomer v-if="leftMenu === 'followCustomer'" />
|
|
|
|
<PutInPoolRemind v-if="leftMenu === 'putInPoolRemind'" />
|
|
|
|
<RemindReceivables v-if="leftMenu === 'remindReceivables'" />
|
2024-01-14 22:44:25 +08:00
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</template>
|
2024-01-15 22:45:12 +08:00
|
|
|
|
2024-01-14 22:44:25 +08:00
|
|
|
<script lang="ts" setup>
|
2024-02-18 00:04:43 +08:00
|
|
|
import * as BacklogApi from '@/api/crm/backlog'
|
2024-01-15 22:45:12 +08:00
|
|
|
import CheckContract from './tables/CheckContract.vue'
|
|
|
|
import CheckReceivables from './tables/CheckReceivables.vue'
|
|
|
|
import EndContract from './tables/EndContract.vue'
|
|
|
|
import FollowCustomer from './tables/FollowCustomer.vue'
|
2024-02-19 22:47:35 +08:00
|
|
|
import ClueFollowList from './components/ClueFollowList.vue'
|
2024-01-15 22:45:12 +08:00
|
|
|
import PutInPoolRemind from './tables/PutInPoolRemind.vue'
|
|
|
|
import RemindReceivables from './tables/RemindReceivables.vue'
|
|
|
|
import TodayCustomer from './tables/TodayCustomer.vue'
|
2024-02-19 22:47:35 +08:00
|
|
|
import * as ClueApi from '@/api/crm/clue'
|
2024-01-14 22:44:25 +08:00
|
|
|
|
2024-02-19 22:47:35 +08:00
|
|
|
defineOptions({ name: 'CrmBacklog' })
|
|
|
|
|
|
|
|
const leftMenu = ref('todayCustomer')
|
2024-02-18 00:04:43 +08:00
|
|
|
|
|
|
|
const todayCustomerCountRef = ref(0)
|
2024-02-19 22:47:35 +08:00
|
|
|
const clueFollowCount = ref(0)
|
2024-02-18 00:04:43 +08:00
|
|
|
const followCustomerCountRef = ref(0)
|
|
|
|
const putInPoolCustomerRemindCountRef = ref(0)
|
|
|
|
const checkContractCountRef = ref(0)
|
|
|
|
const checkReceivablesCountRef = ref(0)
|
|
|
|
const remindReceivablesCountRef = ref(0)
|
|
|
|
const endContractCountRef = ref(0)
|
|
|
|
|
2024-01-14 22:44:25 +08:00
|
|
|
const leftSides = ref([
|
|
|
|
{
|
|
|
|
name: '今日需联系客户',
|
2024-02-19 22:47:35 +08:00
|
|
|
menu: 'todayCustomer',
|
|
|
|
count: todayCustomerCountRef
|
2024-01-14 22:44:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '分配给我的线索',
|
2024-02-19 22:47:35 +08:00
|
|
|
menu: 'clueFollow',
|
|
|
|
count: clueFollowCount
|
2024-01-14 22:44:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '分配给我的客户',
|
2024-02-19 22:47:35 +08:00
|
|
|
menu: 'followCustomer',
|
|
|
|
count: followCustomerCountRef
|
2024-01-14 22:44:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '待进入公海的客户',
|
2024-02-19 22:47:35 +08:00
|
|
|
menu: 'putInPoolRemind',
|
|
|
|
count: putInPoolCustomerRemindCountRef
|
2024-01-14 22:44:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '待审核合同',
|
2024-02-19 22:47:35 +08:00
|
|
|
menu: 'checkContract',
|
|
|
|
count: checkContractCountRef
|
2024-01-14 22:44:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '待审核回款',
|
2024-02-19 22:47:35 +08:00
|
|
|
menu: 'checkReceivables',
|
|
|
|
count: checkReceivablesCountRef
|
2024-01-14 22:44:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '待回款提醒',
|
2024-02-19 22:47:35 +08:00
|
|
|
menu: 'remindReceivables',
|
|
|
|
count: remindReceivablesCountRef
|
2024-01-14 22:44:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '即将到期的合同',
|
2024-02-19 22:47:35 +08:00
|
|
|
menu: 'endContract',
|
|
|
|
count: endContractCountRef
|
2024-01-14 22:44:25 +08:00
|
|
|
}
|
|
|
|
])
|
|
|
|
|
2024-02-17 18:02:40 +08:00
|
|
|
/** 侧边点击 */
|
|
|
|
const sideClick = (item: any) => {
|
2024-02-19 22:47:35 +08:00
|
|
|
leftMenu.value = item.menu
|
|
|
|
}
|
|
|
|
|
|
|
|
const getCount = () => {
|
|
|
|
BacklogApi.getTodayCustomerCount().then((count) => (todayCustomerCountRef.value = count))
|
|
|
|
ClueApi.getFollowClueCount().then((count) => (clueFollowCount.value = count))
|
|
|
|
BacklogApi.getClueFollowListCount().then((count) => (clueFollowCount.value = count))
|
|
|
|
BacklogApi.getFollowCustomerCount().then((count) => (followCustomerCountRef.value = count))
|
|
|
|
BacklogApi.getPutInPoolCustomerRemindCount().then(
|
|
|
|
(count) => (putInPoolCustomerRemindCountRef.value = count)
|
|
|
|
)
|
|
|
|
BacklogApi.getCheckContractCount().then((count) => (checkContractCountRef.value = count))
|
|
|
|
BacklogApi.getCheckReceivablesCount().then((count) => (checkReceivablesCountRef.value = count))
|
|
|
|
BacklogApi.getRemindReceivablePlanCount().then(
|
|
|
|
(count) => (remindReceivablesCountRef.value = count)
|
|
|
|
)
|
|
|
|
BacklogApi.getEndContractCount().then((count) => (endContractCountRef.value = count))
|
2024-01-14 22:44:25 +08:00
|
|
|
}
|
2024-02-18 00:04:43 +08:00
|
|
|
|
2024-02-19 22:47:35 +08:00
|
|
|
/** 激活时 */
|
|
|
|
onActivated(async () => {
|
|
|
|
getCount()
|
|
|
|
})
|
|
|
|
|
|
|
|
/** 初始化 */
|
2024-02-18 00:04:43 +08:00
|
|
|
onMounted(async () => {
|
2024-02-19 22:47:35 +08:00
|
|
|
getCount()
|
2024-02-18 00:04:43 +08:00
|
|
|
})
|
2024-01-14 22:44:25 +08:00
|
|
|
</script>
|
2024-02-14 23:28:25 +08:00
|
|
|
|
2024-01-14 22:44:25 +08:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
.side-item-list {
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: 1;
|
|
|
|
font-size: 14px;
|
2024-02-14 23:28:25 +08:00
|
|
|
background-color: var(--el-bg-color);
|
|
|
|
border: 1px solid var(--el-border-color);
|
2024-01-14 22:44:25 +08:00
|
|
|
border-radius: 5px;
|
|
|
|
|
|
|
|
.side-item {
|
|
|
|
position: relative;
|
|
|
|
height: 50px;
|
|
|
|
padding: 0 20px;
|
|
|
|
line-height: 50px;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.side-item-default {
|
2024-02-14 23:28:25 +08:00
|
|
|
color: var(--el-text-color-primary);
|
2024-01-14 22:44:25 +08:00
|
|
|
border-right: 2px solid transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.side-item-select {
|
2024-02-14 23:28:25 +08:00
|
|
|
color: var(--el-color-primary);
|
|
|
|
background-color: var(--el-color-primary-light-9);
|
2024-01-14 22:44:25 +08:00
|
|
|
border-right: 2px solid var(--el-color-primary);
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-badge :deep(.el-badge__content) {
|
|
|
|
top: 0;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-badge {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 15px;
|
|
|
|
}
|
|
|
|
</style>
|