|
@@ -5,24 +5,24 @@
|
|
|
<div
|
|
|
v-for="(item, index) in leftSides"
|
|
|
:key="index"
|
|
|
- :class="leftType == item.infoType ? 'side-item-select' : 'side-item-default'"
|
|
|
+ :class="leftMenu == item.menu ? 'side-item-select' : 'side-item-default'"
|
|
|
class="side-item"
|
|
|
@click="sideClick(item)"
|
|
|
>
|
|
|
{{ item.name }}
|
|
|
- <el-badge v-if="item.msgCount > 0" :max="99" :value="item.msgCount" />
|
|
|
+ <el-badge v-if="item.count > 0" :max="99" :value="item.count" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="20" :xs="24">
|
|
|
- <TodayCustomer v-if="leftType === 'todayCustomer'" />
|
|
|
- <FollowLeads v-if="leftType === 'followLeads'" />
|
|
|
- <CheckContract v-if="leftType === 'checkContract'" />
|
|
|
- <CheckReceivables v-if="leftType === 'checkReceivables'" />
|
|
|
- <EndContract v-if="leftType === 'endContract'" />
|
|
|
- <FollowCustomer v-if="leftType === 'followCustomer'" />
|
|
|
- <PutInPoolRemind v-if="leftType === 'putInPoolRemind'" />
|
|
|
- <RemindReceivables v-if="leftType === 'remindReceivables'" />
|
|
|
+ <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'" />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</template>
|
|
@@ -33,15 +33,18 @@ import CheckContract from './tables/CheckContract.vue'
|
|
|
import CheckReceivables from './tables/CheckReceivables.vue'
|
|
|
import EndContract from './tables/EndContract.vue'
|
|
|
import FollowCustomer from './tables/FollowCustomer.vue'
|
|
|
-import FollowLeads from './tables/FollowLeads.vue'
|
|
|
+import ClueFollowList from './components/ClueFollowList.vue'
|
|
|
import PutInPoolRemind from './tables/PutInPoolRemind.vue'
|
|
|
import RemindReceivables from './tables/RemindReceivables.vue'
|
|
|
import TodayCustomer from './tables/TodayCustomer.vue'
|
|
|
+import * as ClueApi from '@/api/crm/clue'
|
|
|
|
|
|
-const leftType = ref('todayCustomer')
|
|
|
+defineOptions({ name: 'CrmBacklog' })
|
|
|
+
|
|
|
+const leftMenu = ref('todayCustomer')
|
|
|
|
|
|
const todayCustomerCountRef = ref(0)
|
|
|
-const followLeadsCountRef = ref(0)
|
|
|
+const clueFollowCount = ref(0)
|
|
|
const followCustomerCountRef = ref(0)
|
|
|
const putInPoolCustomerRemindCountRef = ref(0)
|
|
|
const checkContractCountRef = ref(0)
|
|
@@ -52,61 +55,75 @@ const endContractCountRef = ref(0)
|
|
|
const leftSides = ref([
|
|
|
{
|
|
|
name: '今日需联系客户',
|
|
|
- infoType: 'todayCustomer',
|
|
|
- msgCount: todayCustomerCountRef
|
|
|
+ menu: 'todayCustomer',
|
|
|
+ count: todayCustomerCountRef
|
|
|
},
|
|
|
{
|
|
|
name: '分配给我的线索',
|
|
|
- infoType: 'followLeads',
|
|
|
- msgCount: followLeadsCountRef
|
|
|
+ menu: 'clueFollow',
|
|
|
+ count: clueFollowCount
|
|
|
},
|
|
|
{
|
|
|
name: '分配给我的客户',
|
|
|
- infoType: 'followCustomer',
|
|
|
- msgCount: followCustomerCountRef
|
|
|
+ menu: 'followCustomer',
|
|
|
+ count: followCustomerCountRef
|
|
|
},
|
|
|
{
|
|
|
name: '待进入公海的客户',
|
|
|
- infoType: 'putInPoolRemind',
|
|
|
- msgCount: putInPoolCustomerRemindCountRef
|
|
|
+ menu: 'putInPoolRemind',
|
|
|
+ count: putInPoolCustomerRemindCountRef
|
|
|
},
|
|
|
{
|
|
|
name: '待审核合同',
|
|
|
- infoType: 'checkContract',
|
|
|
- msgCount: checkContractCountRef
|
|
|
+ menu: 'checkContract',
|
|
|
+ count: checkContractCountRef
|
|
|
},
|
|
|
{
|
|
|
name: '待审核回款',
|
|
|
- infoType: 'checkReceivables',
|
|
|
- msgCount: checkReceivablesCountRef
|
|
|
+ menu: 'checkReceivables',
|
|
|
+ count: checkReceivablesCountRef
|
|
|
},
|
|
|
{
|
|
|
name: '待回款提醒',
|
|
|
- infoType: 'remindReceivables',
|
|
|
- msgCount: remindReceivablesCountRef
|
|
|
+ menu: 'remindReceivables',
|
|
|
+ count: remindReceivablesCountRef
|
|
|
},
|
|
|
{
|
|
|
name: '即将到期的合同',
|
|
|
- infoType: 'endContract',
|
|
|
- msgCount: endContractCountRef
|
|
|
+ menu: 'endContract',
|
|
|
+ count: endContractCountRef
|
|
|
}
|
|
|
])
|
|
|
|
|
|
/** 侧边点击 */
|
|
|
const sideClick = (item: any) => {
|
|
|
- leftType.value = item.infoType
|
|
|
+ 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))
|
|
|
}
|
|
|
|
|
|
-/** 加载时读取待办数量 */
|
|
|
+/** 激活时 */
|
|
|
+onActivated(async () => {
|
|
|
+ getCount()
|
|
|
+})
|
|
|
+
|
|
|
+/** 初始化 */
|
|
|
onMounted(async () => {
|
|
|
- BacklogApi.getTodayCustomerCount().then(count => todayCustomerCountRef.value = count)
|
|
|
- BacklogApi.getFollowLeadsCount().then(count => followLeadsCountRef.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)
|
|
|
+ getCount()
|
|
|
})
|
|
|
</script>
|
|
|
|