29
29
</template >
30
30
31
31
<script lang="ts" setup>
32
+ import * as BacklogApi from ' @/api/crm/backlog'
32
33
import CheckContract from ' ./tables/CheckContract.vue'
33
34
import CheckReceivables from ' ./tables/CheckReceivables.vue'
34
35
import EndContract from ' ./tables/EndContract.vue'
@@ -39,54 +40,56 @@ import RemindReceivables from './tables/RemindReceivables.vue'
39
40
import TodayCustomer from ' ./tables/TodayCustomer.vue'
40
41
41
42
const leftType = ref (' todayCustomer' )
43
+
44
+ const todayCustomerCountRef = ref (0 )
45
+ const followLeadsCountRef = ref (0 )
46
+ const followCustomerCountRef = ref (0 )
47
+ const putInPoolCustomerRemindCountRef = ref (0 )
48
+ const checkContractCountRef = ref (0 )
49
+ const checkReceivablesCountRef = ref (0 )
50
+ const remindReceivablesCountRef = ref (0 )
51
+ const endContractCountRef = ref (0 )
52
+
42
53
const leftSides = ref ([
43
54
{
44
55
name: ' 今日需联系客户' ,
45
56
infoType: ' todayCustomer' ,
46
- msgCount: 1 ,
47
- tips: ' 下次跟进时间为今日的客户'
57
+ msgCount: todayCustomerCountRef
48
58
},
49
59
{
50
60
name: ' 分配给我的线索' ,
51
61
infoType: ' followLeads' ,
52
- msgCount: 0 ,
53
- tips: ' 转移之后未跟进的线索'
62
+ msgCount: followLeadsCountRef
54
63
},
55
64
{
56
65
name: ' 分配给我的客户' ,
57
66
infoType: ' followCustomer' ,
58
- msgCount: 0 ,
59
- tips: ' 转移、领取、分配之后未跟进的客户,默认显示自己负责的客户'
67
+ msgCount: followCustomerCountRef
60
68
},
61
69
{
62
70
name: ' 待进入公海的客户' ,
63
71
infoType: ' putInPoolRemind' ,
64
- msgCount: 0 ,
65
- tips: ' '
72
+ msgCount: putInPoolCustomerRemindCountRef
66
73
},
67
74
{
68
75
name: ' 待审核合同' ,
69
76
infoType: ' checkContract' ,
70
- msgCount: 0 ,
71
- tips: ' '
77
+ msgCount: checkContractCountRef
72
78
},
73
79
{
74
80
name: ' 待审核回款' ,
75
81
infoType: ' checkReceivables' ,
76
- msgCount: 0 ,
77
- tips: ' '
82
+ msgCount: checkReceivablesCountRef
78
83
},
79
84
{
80
85
name: ' 待回款提醒' ,
81
86
infoType: ' remindReceivables' ,
82
- msgCount: 4 ,
83
- tips: ' '
87
+ msgCount: remindReceivablesCountRef
84
88
},
85
89
{
86
90
name: ' 即将到期的合同' ,
87
91
infoType: ' endContract' ,
88
- msgCount: 20 ,
89
- tips: ' 根据“合同到期时间”及设置的“提前提醒天数”提醒'
92
+ msgCount: endContractCountRef
90
93
}
91
94
])
92
95
@@ -96,6 +99,18 @@ const leftSides = ref([
96
99
const sideClick = (item ) => {
97
100
leftType .value = item .infoType
98
101
}
102
+
103
+ /** 加载时读取待办数量 */
104
+ onMounted (async () => {
105
+ BacklogApi .getTodayCustomerCount ().then (count => todayCustomerCountRef .value = count )
106
+ BacklogApi .getFollowLeadsCount ().then (count => followLeadsCountRef .value = count )
107
+ BacklogApi .getFollowCustomerCount ().then (count => followCustomerCountRef .value = count )
108
+ BacklogApi .getPutInPoolCustomerRemindCount ().then (count => putInPoolCustomerRemindCountRef .value = count )
109
+ BacklogApi .getCheckContractCount ().then (count => checkContractCountRef .value = count )
110
+ BacklogApi .getCheckReceivablesCount ().then (count => checkReceivablesCountRef .value = count )
111
+ BacklogApi .getRemindReceivablePlanCount ().then (count => remindReceivablesCountRef .value = count )
112
+ BacklogApi .getEndContractCount ().then (count => endContractCountRef .value = count )
113
+ })
99
114
</script >
100
115
101
116
<style lang="scss" scoped>
0 commit comments