|
@@ -26,6 +26,15 @@
|
26
|
26
|
v-loading="loading">
|
27
|
27
|
<el-table-column width="30px" type="selection" v-if="status!==0"></el-table-column>
|
28
|
28
|
<el-table-column label="电话号码" align="center" show-overflow-tooltip>
|
|
29
|
+ <template #header v-if="status!==0">
|
|
30
|
+ <div class="customTitle" slot="reference">{{pageOptionValue==0?'选择当前页面客户':'选择全部客户'}}<i class="el-icon-arrow-down"></i>
|
|
31
|
+<!-- @visible-change="pageOptionValue=''"-->
|
|
32
|
+ <el-select v-model="pageOptionValue" class="customTitleSelect" placeholder="请选择" size="mini" @change="pageOptionSelect" >
|
|
33
|
+ <el-option v-for="item in pageOptions" :key="item.id" :label="item.name" :value="item.id">
|
|
34
|
+ </el-option>
|
|
35
|
+ </el-select>
|
|
36
|
+ </div>
|
|
37
|
+ </template>
|
29
|
38
|
<template slot-scope="scope">
|
30
|
39
|
<div>{{scope.row.phone ? scope.row.phone : '-'}}</div>
|
31
|
40
|
</template>
|
|
@@ -129,7 +138,7 @@ export default {
|
129
|
138
|
return {
|
130
|
139
|
test:10,
|
131
|
140
|
loading:false,
|
132
|
|
- status:0,
|
|
141
|
+ status:1,
|
133
|
142
|
statusArrs:[
|
134
|
143
|
{
|
135
|
144
|
name:'全部',
|
|
@@ -165,6 +174,12 @@ export default {
|
165
|
174
|
noChooseFlag:false,//是否选中电话号码,true,表示没有人
|
166
|
175
|
time:[],
|
167
|
176
|
user_ids:[],//批量选中的人
|
|
177
|
+ exclude_id_list:[],//批量选中后,删除的人
|
|
178
|
+ pageOptionValue:0,
|
|
179
|
+ pageOptions: [
|
|
180
|
+ { name: '全部', id: 1 },
|
|
181
|
+ { name: '当前页面', id: 0 },
|
|
182
|
+ ],
|
168
|
183
|
}
|
169
|
184
|
},
|
170
|
185
|
watch:{
|
|
@@ -178,10 +193,34 @@ export default {
|
178
|
193
|
// this.status = arg
|
179
|
194
|
// this.test = arg
|
180
|
195
|
// })
|
|
196
|
+
|
181
|
197
|
this.height = document.documentElement.clientHeight - 250 > 400 ? document.documentElement.clientHeight - 250 : 400
|
182
|
198
|
this.init(1)
|
|
199
|
+ this.$nextTick(()=>{
|
|
200
|
+ this.$refs.settingRef.dialogVisible = true
|
|
201
|
+ })
|
183
|
202
|
},
|
184
|
203
|
methods:{
|
|
204
|
+ pageOptionSelect (val) {//选择
|
|
205
|
+ this.pageOptionValue = val
|
|
206
|
+ console.log(this.pageOptionValue);
|
|
207
|
+ // if (val && val != '') {
|
|
208
|
+ // this.old_pageOptionValue = val;
|
|
209
|
+ // }
|
|
210
|
+ // this.exclude_multiple_selection = {}
|
|
211
|
+ if (this.pageOptionValue == 1) {
|
|
212
|
+ // this.isAll = true
|
|
213
|
+ } else {//选择当前页面
|
|
214
|
+ // this.isAll = false
|
|
215
|
+ // let current_page_data = this.multipleSelection[this.page];
|
|
216
|
+ // this.multipleSelection = {};
|
|
217
|
+ // this.multipleSelection[this.page] = current_page_data ? current_page_data : null;
|
|
218
|
+ }
|
|
219
|
+ // this.tableData.forEach((row) => {
|
|
220
|
+ // this.$refs.multipleTable.toggleRowSelection(row, true);
|
|
221
|
+ // });
|
|
222
|
+
|
|
223
|
+ },
|
185
|
224
|
clearuser_ids(){ //清空批量选中的人
|
186
|
225
|
this.user_ids = []
|
187
|
226
|
},
|
|
@@ -196,10 +235,12 @@ export default {
|
196
|
235
|
}
|
197
|
236
|
},
|
198
|
237
|
handleSelectionChange(val){//列表选择人员
|
|
238
|
+ console.log(val);
|
199
|
239
|
this.user_ids = []
|
200
|
240
|
val.forEach(item=>{
|
201
|
241
|
this.user_ids.push(item.user_id)
|
202
|
242
|
})
|
|
243
|
+
|
203
|
244
|
},
|
204
|
245
|
batchDele(){//批量删除
|
205
|
246
|
this.noChooseCustomeTips()
|
|
@@ -225,10 +266,28 @@ export default {
|
225
|
266
|
cancelButtonText: '取消',
|
226
|
267
|
confirmButtonText: '确定',
|
227
|
268
|
}).then(()=>{
|
228
|
|
- this.$nextTick(()=>{
|
229
|
|
- this.$loading(this.$loadingConfig)
|
230
|
|
- this.$refs.dialogPublic.addCustomer_notice()
|
231
|
|
- })
|
|
269
|
+ this.$axios.post(this.URL.BASEURL + this.URL.batchRemind, {
|
|
270
|
+ add_status:this.status==0?'':this.status,
|
|
271
|
+ keyword:this.input_keyword,
|
|
272
|
+ start_time: this.time[0],
|
|
273
|
+ end_time: this.time[1],
|
|
274
|
+ select_all:this.pageOptionValue,
|
|
275
|
+ select_id_list:this.user_ids,
|
|
276
|
+ exclude_id_list:this.exclude_id_list
|
|
277
|
+ }).then((res) => {
|
|
278
|
+ var res = res.data
|
|
279
|
+ this.$message({
|
|
280
|
+ message: res.err,
|
|
281
|
+ type: "warning"
|
|
282
|
+ })
|
|
283
|
+
|
|
284
|
+ }).catch((err) => {
|
|
285
|
+ this.loading = false
|
|
286
|
+ this.$message({
|
|
287
|
+ message: err,
|
|
288
|
+ type: "warning"
|
|
289
|
+ })
|
|
290
|
+ });
|
232
|
291
|
})
|
233
|
292
|
},
|
234
|
293
|
batchAllot(){//批量分配
|
|
@@ -264,15 +323,42 @@ export default {
|
264
|
323
|
this.user_ids.push(user_id)
|
265
|
324
|
})
|
266
|
325
|
},
|
267
|
|
- deleCustomer(){//单个删除
|
|
326
|
+ delePack(select_id_list,exclude_id_list){
|
|
327
|
+ this.loading=true
|
|
328
|
+ this.$axios.post(this.URL.BASEURL + this.URL.batchAddCustomer_delete, {
|
|
329
|
+ add_status:this.status==0?'':this.status,
|
|
330
|
+ keyword:this.input_keyword,
|
|
331
|
+ start_time: this.time[0],
|
|
332
|
+ end_time: this.time[1],
|
|
333
|
+ select_all:0,
|
|
334
|
+ select_id_list:select_id_list,
|
|
335
|
+ exclude_id_list:exclude_id_list?exclude_id_list:[]
|
|
336
|
+ }).then((res) => {
|
|
337
|
+ this.loading = false
|
|
338
|
+ var res = res.data
|
|
339
|
+ this.$message({
|
|
340
|
+ message: res.err,
|
|
341
|
+ type: "warning"
|
|
342
|
+ })
|
|
343
|
+ if(res&&res.errno==0){
|
|
344
|
+ this.init(1)
|
|
345
|
+ }
|
|
346
|
+ }).catch((err) => {
|
|
347
|
+ this.loading = false
|
|
348
|
+ this.$message({
|
|
349
|
+ message: err,
|
|
350
|
+ type: "warning"
|
|
351
|
+ })
|
|
352
|
+ });
|
|
353
|
+ },
|
|
354
|
+ deleCustomer(id){//单个删除
|
268
|
355
|
this.$alert('是否确定删除此客户', '提示', {
|
269
|
356
|
cancelButtonText: '取消',
|
270
|
357
|
confirmButtonText: '确定',
|
271
|
358
|
}).then(()=>{
|
272
|
|
- this.$message({
|
273
|
|
- type: 'success',
|
274
|
|
- message: '删除成功!'
|
275
|
|
- });
|
|
359
|
+ let ids = []
|
|
360
|
+ ids.push(id)
|
|
361
|
+ this.delePack(ids)
|
276
|
362
|
})
|
277
|
363
|
},
|
278
|
364
|
init (page, type) {
|