statDialog.vue
2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<template>
<GLDialog title="SOP执行统计" :visible.sync="statVisible" width="70%" :before-close="handleClose" :hasFooter="false">
<div class="dialog-body">
<GLTable v-loading="loading" :searchForm="tableSearchForm" :hasNum="true" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" ref="leadManage" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams"></GLTable>
</div>
</GLDialog>
</template>
<script>
const STAGE = Object.freeze({
1: '门店助手短信',
2: 'AI外呼',
3: '门店助手朋友圈',
4: '门店助手1v1',
5: '跟进提醒',
6: '客户信息查询',
7: '企微提醒',
8: '企微群发',
9: '企微朋友圈',
10: '发送短信'
})
export default {
props: {
statVisible: Boolean,
stageid:Number
},
data() {
return {
stage: STAGE,
loading:false,
tableSearchForm:{},
getListApi: this.$apis.journeyConfig.getTaskList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNumber', totalCount: 'total' },
tableParams: {
listName: 'list',
tableColumns: [
{
label: '营销计划',
prop: 'plan'
},
{
label: '触达方式',
prop: 'taskType',
formatter: cellValue => {
return this.stage[cellValue.taskType] ? this.stage[cellValue.taskType] : '--'
}
},
{
label: '今日营销客户数',
prop: 'todayCusCount'
},
{
label: '今日下发任务数',
prop: 'todayTaskCount',
formatter:cellValue => {
return cellValue.taskType!=10 ? cellValue.todayTaskCount : '--'
}
},
{
label: '累计营销客户数',
prop: 'totalCusCount'
},
{
label: '累计下发任务数',
prop: 'totalTaskCount'
}
]
}
}
},
created() {
const query = this.$route.query
this.query = query
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.loading = true
this.tableSearchForm = {
instId:this.query.instId,
stageid:this.stageid
}
resolve()
})
},
setTableFinishFun() {
this.loading = false
},
handleClose() {
this.$parent.statVisible = false
}
}
}
</script>
<style scoped lang="scss"></style>