|
@@ -0,0 +1,288 @@
|
|
1
|
+<template>
|
|
2
|
+ <div>
|
|
3
|
+ <div class="operatArea">
|
|
4
|
+ <el-radio-group v-model="status">
|
|
5
|
+ <el-radio v-for="s in statusArrs" :label="s.label" :key="s.label">{{s.name}}</el-radio>
|
|
6
|
+ </el-radio-group>
|
|
7
|
+ <div class="btnArea">
|
|
8
|
+ <self-input :hasLabel="false" label_name="电话/备注名" @inputChange='(val)=>{input_keyword = val;init(1)}'></self-input>
|
|
9
|
+ <el-button class="lMar10" type="primary" plain size="small" @click="importCustomer()">导入客户</el-button>
|
|
10
|
+ <el-button type="primary" plain size="small" @click="importRecord()">导入记录</el-button>
|
|
11
|
+ <el-button type="primary" plain size="small" @click="setting()">设置</el-button>
|
|
12
|
+
|
|
13
|
+ <el-button v-if="status!==0" type="primary" plain size="small" @click="batchDele()">批量删除</el-button>
|
|
14
|
+ <el-button v-if="status==2 || status==3" type="primary" plain size="small" @click="batchRemind()">批量提醒</el-button>
|
|
15
|
+ <el-button v-if="status==1" type="primary" plain size="small" @click="batchAllot()">批量分配</el-button>
|
|
16
|
+ </div>
|
|
17
|
+ </div>
|
|
18
|
+
|
|
19
|
+ <!-- table -->
|
|
20
|
+ <el-table ref="multipleTable"
|
|
21
|
+ :height='height'
|
|
22
|
+ :data="tableData"
|
|
23
|
+ tooltip-effect="dark"
|
|
24
|
+ style="width: 100%"
|
|
25
|
+ @selection-change="handleSelectionChange"
|
|
26
|
+ v-loading="loading">
|
|
27
|
+ <el-table-column width="30px" type="selection" v-if="status!==0"></el-table-column>
|
|
28
|
+ <el-table-column prop="send_type" label="电话号码" align="center" show-overflow-tooltip></el-table-column>
|
|
29
|
+ <el-table-column label="备注" align="center">
|
|
30
|
+ <template slot-scope="scope">
|
|
31
|
+ <div>{{scope.row.send_type == 1 ? '立即发送':scope.row.send_type == 2?'定时发送':''}}</div>
|
|
32
|
+ </template>
|
|
33
|
+ </el-table-column>
|
|
34
|
+ <el-table-column prop="send_time" min-width="120" label="导入时间" show-overflow-tooltip align="center"></el-table-column>
|
|
35
|
+ <el-table-column label="客户标签" align="center">
|
|
36
|
+ <div class="customerServiceTagBox biaoqian">
|
|
37
|
+ -
|
|
38
|
+<!-- <div class="customerServiceTag" v-for="(item,index) in scope.row.tag_list" :key="index+'biaoqian'">{{item}}</div>-->
|
|
39
|
+ </div>
|
|
40
|
+ </el-table-column>
|
|
41
|
+ <el-table-column show-overflow-tooltip align="center">
|
|
42
|
+ <template #header>
|
|
43
|
+ 添加状态
|
|
44
|
+ <el-tooltip class="disinblock" placement="top" effect="light">
|
|
45
|
+ <div slot="content" class="f12">
|
|
46
|
+ <div>待分配:未分配跟进成员的客户</div>
|
|
47
|
+ <div>待添加:成员未添加的客户</div>
|
|
48
|
+ <div>待通过:已发送申请,等待通过的客户</div>
|
|
49
|
+ <div>已添加:成功添加的客户</div>
|
|
50
|
+ </div>
|
|
51
|
+ <i class="el-icon-question"></i>
|
|
52
|
+ </el-tooltip>
|
|
53
|
+ </template>
|
|
54
|
+ <template slot-scope="scope">
|
|
55
|
+ <span v-if="scope.row.enable==-2" class="c-F03F5C">已删除</span>
|
|
56
|
+ <span v-if="scope.row.enable==-1" class="c-666">发送失败</span>
|
|
57
|
+ <span v-if="scope.row.enable==0" class="c-F03F5C">禁用</span>
|
|
58
|
+ <span v-if="scope.row.enable==1" class="c-FFB055">待发送</span>
|
|
59
|
+ <span v-if="scope.row.enable==2" class="c-448AFF">正在发送中</span>
|
|
60
|
+ <span v-if="scope.row.enable==3" class="c-58BCA6">发送完成</span>
|
|
61
|
+ </template>
|
|
62
|
+ </el-table-column>
|
|
63
|
+ <el-table-column prop="send_time" min-width="120" label="添加时间" show-overflow-tooltip align="center"></el-table-column>
|
|
64
|
+ <el-table-column prop="send_fail" label="操作人" show-overflow-tooltip align="center"></el-table-column>
|
|
65
|
+ <el-table-column label="分配客服" show-overflow-tooltip align="center">
|
|
66
|
+ <template slot-scope="scope">
|
|
67
|
+ <div class="customerServiceTagBox">
|
|
68
|
+ <div class="customerServiceTag"><i class="el-icon-user-solid"></i> {{ scope.row.creator }}</div>
|
|
69
|
+ </div>
|
|
70
|
+ </template>
|
|
71
|
+ </el-table-column>
|
|
72
|
+ <el-table-column prop="estimated_user" label="分配次数" show-overflow-tooltip align="center"></el-table-column>
|
|
73
|
+ <el-table-column label="操作" align="center">
|
|
74
|
+ <template slot-scope="scope">
|
|
75
|
+ <div>
|
|
76
|
+
|
|
77
|
+ <div class="c-00B38A pointer" @click="goDetail(scope.row.rule_id)">详情</div>
|
|
78
|
+ <div class="c-00B38A pointer" @click="allotCustomer(scope.row.rule_id)">分配</div>
|
|
79
|
+ <div class="c-00B38A pointer" @click="remindCustomer(scope.row.rule_id,scope.row.enable)">提醒</div>
|
|
80
|
+ <div class="c-00B38A pointer" @click="deleCustomer(scope.row.rule_id)">删除</div>
|
|
81
|
+ </div>
|
|
82
|
+ </template>
|
|
83
|
+ </el-table-column>
|
|
84
|
+ </el-table>
|
|
85
|
+ <div class="pagination" v-show="total>0">
|
|
86
|
+ <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
|
|
87
|
+ </el-pagination>
|
|
88
|
+ </div>
|
|
89
|
+
|
|
90
|
+ <!--el-dialog-->
|
|
91
|
+ <el-dialog
|
|
92
|
+ :title="dialogTitle"
|
|
93
|
+ :visible.sync="dialogVisible"
|
|
94
|
+ width="30%">
|
|
95
|
+ <div class="f14 line21">{{dialogMsg}}</div>
|
|
96
|
+ <div v-if="dialogTitle == '分配'">
|
|
97
|
+ <self-customerservice title='选择员工' width="300px" :afferent_users='user_id_list' @customerDefine="(val)=>{user_id_list=val;}"></self-customerservice>
|
|
98
|
+ </div>
|
|
99
|
+ <span slot="footer" class="dialog-footer">
|
|
100
|
+ <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
|
|
101
|
+ <el-button size="mini" type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
102
|
+ </span>
|
|
103
|
+ </el-dialog>
|
|
104
|
+
|
|
105
|
+ </div>
|
|
106
|
+</template>
|
|
107
|
+
|
|
108
|
+<script>
|
|
109
|
+import selfInput from '@/components/assembly/screen/input.vue'
|
|
110
|
+import selfCustomerservice from '@/components/assembly/screen/customerService.vue'
|
|
111
|
+import importCustomer from "./importCustomer";
|
|
112
|
+import importRecord from "./importRecord";
|
|
113
|
+import setting from "./setting";
|
|
114
|
+export default {
|
|
115
|
+ name: "addFriend",
|
|
116
|
+ components:{selfInput,selfCustomerservice,importCustomer,importRecord,setting},
|
|
117
|
+ data(){
|
|
118
|
+ return {
|
|
119
|
+ loading:false,
|
|
120
|
+ dialogVisible:false,
|
|
121
|
+ status:0,
|
|
122
|
+ statusArrs:[
|
|
123
|
+ {
|
|
124
|
+ name:'全部',
|
|
125
|
+ label:0
|
|
126
|
+ },
|
|
127
|
+ {
|
|
128
|
+ name:'待分配',
|
|
129
|
+ label:1
|
|
130
|
+ },
|
|
131
|
+ {
|
|
132
|
+ name:'待添加',
|
|
133
|
+ label:2
|
|
134
|
+ },
|
|
135
|
+ {
|
|
136
|
+ name:'待通过',
|
|
137
|
+ label:3
|
|
138
|
+ },
|
|
139
|
+ {
|
|
140
|
+ name:'已添加',
|
|
141
|
+ label:4
|
|
142
|
+ }
|
|
143
|
+ ],
|
|
144
|
+ input_keyword:'',
|
|
145
|
+ tableData:[],
|
|
146
|
+ height:'',
|
|
147
|
+ page: 1,
|
|
148
|
+ pages: 0,
|
|
149
|
+ total: 0,
|
|
150
|
+ page_size: 20,
|
|
151
|
+ dialogTitle:'',
|
|
152
|
+ dialogMsg:'',
|
|
153
|
+ user_id_list:[],
|
|
154
|
+ multipleChoosePhones: []
|
|
155
|
+ }
|
|
156
|
+ },
|
|
157
|
+ created () {
|
|
158
|
+ this.height = document.documentElement.clientHeight - 250 > 400 ? document.documentElement.clientHeight - 250 : 400
|
|
159
|
+ this.init(1)
|
|
160
|
+ },
|
|
161
|
+ methods:{
|
|
162
|
+ noChooseCustomeTips(){//没有选择客户提示
|
|
163
|
+ if( this.multipleChoosePhones&& this.multipleChoosePhones.length==0){
|
|
164
|
+ this.$message({
|
|
165
|
+ type: 'error',
|
|
166
|
+ message: '请选择客户!'
|
|
167
|
+ });
|
|
168
|
+ return
|
|
169
|
+ }
|
|
170
|
+ },
|
|
171
|
+ handleSelectionChange(val){
|
|
172
|
+ this.multipleChoosePhones = val
|
|
173
|
+ console.log(this.multipleChoosePhones);
|
|
174
|
+ },
|
|
175
|
+ batchDele(){
|
|
176
|
+ this.noChooseCustomeTips()
|
|
177
|
+ this.$alert('确定删除选择的客户?', '提示', {
|
|
178
|
+ cancelButtonText: '取消',
|
|
179
|
+ confirmButtonText: '确定',
|
|
180
|
+ }).then(()=>{
|
|
181
|
+ this.$message({
|
|
182
|
+ type: 'success',
|
|
183
|
+ message: '删除成功!'
|
|
184
|
+ });
|
|
185
|
+ })
|
|
186
|
+ },
|
|
187
|
+ batchRemind(){
|
|
188
|
+ this.noChooseCustomeTips()
|
|
189
|
+ this.$alert('确认后将会给选择的成员发送提醒通知,是否发送?', '提示', {
|
|
190
|
+ cancelButtonText: '取消',
|
|
191
|
+ confirmButtonText: '确定',
|
|
192
|
+ }).then(()=>{
|
|
193
|
+ this.$message({
|
|
194
|
+ type: 'success',
|
|
195
|
+ message: '删除成功!'
|
|
196
|
+ });
|
|
197
|
+ })
|
|
198
|
+ },
|
|
199
|
+ batchAllot(){
|
|
200
|
+ this.noChooseCustomeTips()
|
|
201
|
+ this.dialogTitle = '分配'
|
|
202
|
+ this.dialogMsg = ''
|
|
203
|
+ this.dialogVisible = true
|
|
204
|
+ },
|
|
205
|
+ goDetail(){
|
|
206
|
+
|
|
207
|
+ },
|
|
208
|
+ allotCustomer(){
|
|
209
|
+ this.dialogTitle = '分配'
|
|
210
|
+ this.dialogMsg = ''
|
|
211
|
+ this.user_id_list = []
|
|
212
|
+ this.dialogVisible = true
|
|
213
|
+ },
|
|
214
|
+ remindCustomer(id,status){
|
|
215
|
+ this.dialogTitle = '提醒'
|
|
216
|
+ this.dialogMsg = `如果员工长时间未${status == 1 ? '添加客户' : '通过好友申请可再次添加'},可通过企微助手再次提醒员工${status == 1 ? '添加' : '跟进'}客户,是否确认发送?`
|
|
217
|
+ this.dialogVisible = true
|
|
218
|
+
|
|
219
|
+ },
|
|
220
|
+ deleCustomer(){
|
|
221
|
+ this.$alert('是否确定删除此客户', '提示', {
|
|
222
|
+ cancelButtonText: '取消',
|
|
223
|
+ confirmButtonText: '确定',
|
|
224
|
+ }).then(()=>{
|
|
225
|
+ this.$message({
|
|
226
|
+ type: 'success',
|
|
227
|
+ message: '删除成功!'
|
|
228
|
+ });
|
|
229
|
+ })
|
|
230
|
+ },
|
|
231
|
+ importCustomer(){
|
|
232
|
+
|
|
233
|
+ },
|
|
234
|
+ importRecord(){
|
|
235
|
+
|
|
236
|
+ },
|
|
237
|
+ setting(){
|
|
238
|
+
|
|
239
|
+ },
|
|
240
|
+ init (page, type) {
|
|
241
|
+ this.page = page ? page : this.page;
|
|
242
|
+ this.loading = true
|
|
243
|
+ this.$axios.get(this.URL.BASEURL + this.URL.massMsg_lists, {
|
|
244
|
+ params: {
|
|
245
|
+ creator_id: this.user_id_list,
|
|
246
|
+ send_time_start: this.add_date_start ? this.add_date_start + ' 00:00:00' : '',
|
|
247
|
+ send_time_end: this.add_date_end ? this.$day_format(this.$date_compatible(this.add_date_end + ' 24:00:00')) : '',
|
|
248
|
+ page: this.page,
|
|
249
|
+ page_size: this.page_size
|
|
250
|
+ }
|
|
251
|
+ }).then((res) => {
|
|
252
|
+ var res = res.data
|
|
253
|
+ this.loading = false
|
|
254
|
+ if (res && res.errno == 0) {
|
|
255
|
+ this.tableData = res.rst.data;
|
|
256
|
+ this.total = res.rst.pageInfo.total;
|
|
257
|
+ this.pages = res.rst.pageInfo.pages;
|
|
258
|
+ } else if (res.errno != 4002) {
|
|
259
|
+ this.$message({
|
|
260
|
+ message: res.err,
|
|
261
|
+ type: "warning"
|
|
262
|
+ })
|
|
263
|
+ }
|
|
264
|
+ }).catch((err) => {
|
|
265
|
+ this.loading = false
|
|
266
|
+ });
|
|
267
|
+ },
|
|
268
|
+ handleCurrentChange (val) {
|
|
269
|
+ this.init(val)
|
|
270
|
+ },
|
|
271
|
+ }
|
|
272
|
+}
|
|
273
|
+</script>
|
|
274
|
+
|
|
275
|
+<style lang="scss" scoped>
|
|
276
|
+@import "@/style/list.scss";
|
|
277
|
+.operatArea{
|
|
278
|
+ display: flex;
|
|
279
|
+ align-items: center;
|
|
280
|
+ justify-content: space-between;
|
|
281
|
+ padding: 0 20px;
|
|
282
|
+ .btnArea{
|
|
283
|
+ display: flex;
|
|
284
|
+ align-items: center;
|
|
285
|
+ justify-content: space-between;
|
|
286
|
+ }
|
|
287
|
+}
|
|
288
|
+</style>
|