ViewDialogTable.vue
5.8 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<template>
<GlDialog mode='big' :bigTitle="'true'" :visible.sync='showFuncIntro' :hasFooter='false'>
<span v-if='selectedData' slot='custombigtitle'>{{ selectedData.merchantName }}-{{ selectedData.activityName
}}-{{ detailTitle }}</span>
<div class='dialogEncircle '>
<glsx-table
:headerStyle="{ color: '#EB6001',background:'#262525', borderColor: 'black' }"
ref='renewalListRef'
:getListApi='getListApi'
:tableParams='tableParams'
:searchForm='renewalSearchForm'
:pageConf='pageConf'>
<template slot='wechatName' slot-scope='scope'>
<div class='wechatWrap'>
<img v-if='scope.scope.wechatimg' class='wechatimg' :src='scope.scope.wechatimg'>
{{ scope.scope.wechatName }}
</div>
</template>
<template slot='phoneNum' slot-scope='scope'>
{{ scope.scope.phoneNum == 'null' || !scope.scope.phoneNum ? '-' : scope.scope.phoneNum }}
</template>
<template slot='shareName' slot-scope='scope'>
<div class='wechatWrap'>
<img v-if="scope.scope.shareimg !== 'null' && scope.scope.shareimg" class='wechatimg'
:src='scope.scope.shareimg'>
{{ scope.scope.shareName == 'null' || !scope.scope.shareName ? '-' : scope.scope.shareName }}
</div>
</template>
<!-- 转发明细员工-->
<template slot='staff' slot-scope='scope'>
<div class='wechatWrap'>
<img v-if='scope.scope.wechatimg' class='wechatimg' :src='scope.scope.wechatimg'>
{{ !scope.scope.staff ? '-' : scope.scope.staff }}
</div>
</template>
<!-- 转发明细核销激励-->
<template slot='writeoffIncentive' slot-scope='scope'>
{{ scope.scope.writeoffIncentive == 'null' ? '-' : scope.scope.writeoffIncentive }}
</template>
<!-- 转化率-->
<template slot='conversionRate' slot-scope='scope'>
{{ scope.scope.writeoffIncentive == 'null' ? '-' : scope.scope.writeoffIncentive }}
</template>
<template slot='userName' slot-scope='scope'>
{{ scope.scope.userName == 'null' ? '-' : scope.scope.userName }}
</template>
<template slot='licensePlate' slot-scope='scope'>
{{ scope.scope.licensePlate == 'null' ? '-' : scope.scope.licensePlate }}
</template>
<template slot='customerName' slot-scope='scope'>
{{ scope.scope.customerName == 'null' || !scope.scope.customerName ? '-' : scope.scope.customerName }}
</template>
<template slot='other' slot-scope='scope'>
{{ scope.scope.other == 'null' || !scope.scope.other ? '-' : scope.scope.other }}
</template>
<template slot='reference' slot-scope='scope'>
{{ scope.scope.reference == 'null' || !scope.scope.reference ? '-' : scope.scope.reference }}
<span v-if='scope.scope.referencetype && scope.scope.reference'
class='referencetype'>@{{ !scope.scope.referencetype || scope.scope.referencetype == 'null' ? '-' : scope.scope.referencetype
}}</span>
</template>
<template slot='lastFollowup' slot-scope='scope'>
<el-switch
v-model="scope.scope.lastFollowup == '是'"
active-color='#EB6001'
inactive-color='#E8E8EA'>
</el-switch>
</template>
</glsx-table>
</div>
</GlDialog>
</template>
<script>
import { tableDetailMixin } from '@/mixins'
export default {
name: 'ViewDialogTable',
mixins: [tableDetailMixin],
props: {
// showFuncIntro: {
// type: Boolean,
// default: false
// },
selectedData: {
type: Object,
default: {}
}
},
data() {
return {
showFuncIntro: false,
getListApi: this.api.renewal.getDetail,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'totalNum' },
tableParams: null,
renewalSearchForm: {
queryItem: '',
// pagenum: '1',
merchantId: '',
activityName: ''
},
detailTitle: ''
}
},
methods: {
switchSelectedType(type) {
switch (type) {
case 'viewActivity':
this.tableParams = this.accessDetailTable
this.renewalSearchForm.queryItem = 'view'
return '访问明细'
case 'forwardActivity':
this.tableParams = this.forwardingDetailTable
this.renewalSearchForm.queryItem = 'forward'
return '转发明细'
case 'clueActivity':
this.tableParams = this.lineDetailTable
this.renewalSearchForm.queryItem = 'clue'
return '线索明细'
case 'activationActivity':
this.tableParams = this.activationDetailTable
this.renewalSearchForm.queryItem = 'activation'
return '激活明细'
}
}
},
watch: {
selectedData: {
handler(newValue, oldValue) {
console.log(newValue)
this.detailTitle = newValue && this.switchSelectedType(newValue.type)
this.renewalSearchForm.activityName = newValue.activityName
// '活动1'
this.renewalSearchForm.merchantId = newValue.merchantId
// '4419194XX'
this.renewalSearchForm.startDate = newValue.params.startDate
this.renewalSearchForm.endDate = newValue.params.endDate
setTimeout(() => {
this.$refs.renewalListRef?.refreshTable()
this.showFuncIntro = true
}, 500)
},
deep: true,
immediate: false
}
}
}
</script>
<style lang='scss' scoped>
.wechatWrap {
display: flex;
align-items: center;
.wechatimg {
width: 32px;
height: 32px;
margin-right: 5px;
}
}
.referencetype {
color: rgb(235, 96, 1);
}
/deep/ .el-table {
background-color: rgba(38, 38, 38, 0.75);
}
</style>