miaofuhao 4 lat temu
rodzic
commit
c360fa2eeb

+ 73 - 86
CallCenterWeb.UI/src/views/telCall/missedCalls/index.vue

22
         <el-option value="已回拨" label="已回拨"/>
22
         <el-option value="已回拨" label="已回拨"/>
23
       </el-select>
23
       </el-select>
24
       <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
24
       <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
25
-      <el-button :loading="downloadLoading" :disabled="disableBL"  class="filter-item" type="primary" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
25
+      <el-button :loading="downloadLoading" :disabled="disableBL" class="filter-item" type="primary" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
26
     </div>
26
     </div>
27
-      <!-- @row-dblclick="customerDetail" -->
27
+    <!-- @row-dblclick="customerDetail" -->
28
     <el-table v-loading="loading" :data="dataLists" border stripe max-height="500">
28
     <el-table v-loading="loading" :data="dataLists" border stripe max-height="500">
29
       <el-table-column type="index" label="编号" align="center" fixed width="80" ></el-table-column>
29
       <el-table-column type="index" label="编号" align="center" fixed width="80" ></el-table-column>
30
       <el-table-column prop="callerNumber" label="主叫号码" align="center" min-width ></el-table-column>
30
       <el-table-column prop="callerNumber" label="主叫号码" align="center" min-width ></el-table-column>
33
 
33
 
34
       <el-table-column label="客户类型" align="center" min-width >
34
       <el-table-column label="客户类型" align="center" min-width >
35
         <template slot-scope="scope">
35
         <template slot-scope="scope">
36
-         {{scope.row.servAgentGroupId|custometType}}
36
+          {{ scope.row.servAgentGroupId|custometType }}
37
         </template>
37
         </template>
38
       </el-table-column>
38
       </el-table-column>
39
       <el-table-column prop="cusName" label="客户名称" align="center" min-width ></el-table-column>
39
       <el-table-column prop="cusName" label="客户名称" align="center" min-width ></el-table-column>
40
       <el-table-column prop="cusCode" label="客户编号" align="center" min-width ></el-table-column>
40
       <el-table-column prop="cusCode" label="客户编号" align="center" min-width ></el-table-column>
41
       <el-table-column prop="salMan" label="销售经理" align="center" min-width ></el-table-column>
41
       <el-table-column prop="salMan" label="销售经理" align="center" min-width ></el-table-column>
42
       <!-- <el-table-column prop="saleNo" label="销售经理编号" align="center" min-width ></el-table-column> -->
42
       <!-- <el-table-column prop="saleNo" label="销售经理编号" align="center" min-width ></el-table-column> -->
43
-      
43
+
44
       <!-- <el-table-column label="呼叫状态" align="center" min-width>
44
       <!-- <el-table-column label="呼叫状态" align="center" min-width>
45
         <template slot-scope="scope">
45
         <template slot-scope="scope">
46
           <el-tag
46
           <el-tag
51
         </template>
51
         </template>
52
       </el-table-column> -->
52
       </el-table-column> -->
53
       <el-table-column label="回拨状态" align="center" min-width>
53
       <el-table-column label="回拨状态" align="center" min-width>
54
-        <template slot-scope="scope">{{scope.row.hbStatus| calltypeFilter }}</template>
54
+        <template slot-scope="scope">{{ scope.row.hbStatus| calltypeFilter }}</template>
55
       </el-table-column>
55
       </el-table-column>
56
       <el-table-column prop="ringLongTime" label="振铃时长" align="center" min-width ></el-table-column>
56
       <el-table-column prop="ringLongTime" label="振铃时长" align="center" min-width ></el-table-column>
57
       <el-table-column label="来电时间" align="center" min-width="110">
57
       <el-table-column label="来电时间" align="center" min-width="110">
86
 </template>
86
 </template>
87
 
87
 
88
 <script>
88
 <script>
89
-import { getList,addRemark } from '@/api/telCall/missedCalls/missedCalls'
89
+import { getList, addRemark } from '@/api/telCall/missedCalls/missedCalls'
90
 import { pickerOptions, formatterContent } from '@/utils'
90
 import { pickerOptions, formatterContent } from '@/utils'
91
 import { Send } from '@/utils/telWebsocket'
91
 import { Send } from '@/utils/telWebsocket'
92
-import { timestampToTime} from '@/utils'
92
+import { timestampToTime } from '@/utils'
93
 import { getCallOutprefix } from '@/api/teloperation'
93
 import { getCallOutprefix } from '@/api/teloperation'
94
 import { mapGetters } from 'vuex'
94
 import { mapGetters } from 'vuex'
95
 import store from '@/store'
95
 import store from '@/store'
104
   filters: {
104
   filters: {
105
     // 回拨类型
105
     // 回拨类型
106
     calltypeFilter(status) {
106
     calltypeFilter(status) {
107
-      
108
       const statusMap = {
107
       const statusMap = {
109
         null: '未回拨',
108
         null: '未回拨',
110
         '未回拨': '未回拨',
109
         '未回拨': '未回拨',
112
         '已回拨': '已回拨'
111
         '已回拨': '已回拨'
113
       }
112
       }
114
       return statusMap[status]
113
       return statusMap[status]
115
-
116
     },
114
     },
117
-    custometType(status){
115
+    custometType(status) {
118
       const statusMap = {
116
       const statusMap = {
119
-        101:'军品业务',
120
-        102:'民品业务',
121
-        103:'新能源业务',
122
-        104:'外贸业务',
123
-        105:'华亿业务'
117
+        101: '军品业务',
118
+        102: '民品业务',
119
+        103: '新能源业务',
120
+        104: '外贸业务',
121
+        105: '华亿业务'
124
       }
122
       }
125
       return statusMap[status]
123
       return statusMap[status]
126
     }
124
     }
131
       loading: false,
129
       loading: false,
132
       keyword: '',
130
       keyword: '',
133
       hbStatus: '', // 回拨状态
131
       hbStatus: '', // 回拨状态
134
-      remarkId:'',
135
-      disableBL:true,
132
+      remarkId: '',
133
+      disableBL: true,
136
       roleOptions: [],
134
       roleOptions: [],
137
       searchDate: '',
135
       searchDate: '',
138
       pickerOptions,
136
       pickerOptions,
147
       },
145
       },
148
       downloadLoading: false,
146
       downloadLoading: false,
149
       dataLists: [], // 列表数据
147
       dataLists: [], // 列表数据
150
-      dataListsExport:[]
148
+      dataListsExport: []
151
     }
149
     }
152
   },
150
   },
153
   computed: {
151
   computed: {
163
       'groupid'
161
       'groupid'
164
     ])
162
     ])
165
   },
163
   },
166
-  watch:{
164
+  watch: {
167
     callStateUp: function() {
165
     callStateUp: function() {
168
-        
169
-        console.log("watch---"+this.callStateUp)
170
-
171
-				if (this.callStateUp) {
172
-          this.getList()
173
-          this.getListExport()
174
-				}
166
+      console.log('watch---' + this.callStateUp)
175
 
167
 
176
-			}
168
+      if (this.callStateUp) {
169
+        this.getList()
170
+        this.getListExport()
171
+      }
172
+    }
177
   },
173
   },
178
   created() {
174
   created() {
179
     this.getList()
175
     this.getList()
188
   methods: {
184
   methods: {
189
     getList() {
185
     getList() {
190
       this.loading = true
186
       this.loading = true
191
-      //this.disableBL = true
187
+      // this.disableBL = true
192
       return new Promise(resolve => {
188
       return new Promise(resolve => {
193
         const params = {
189
         const params = {
194
           pageindex: this.pageParams.pageindex, // 第几页
190
           pageindex: this.pageParams.pageindex, // 第几页
202
         }
198
         }
203
         getList(params).then(response => {
199
         getList(params).then(response => {
204
           this.loading = false
200
           this.loading = false
205
-          //this.disableBL = false
201
+          // this.disableBL = false
206
           if (response.state.toLowerCase() === 'success') {
202
           if (response.state.toLowerCase() === 'success') {
207
             if (response.total == null) {
203
             if (response.total == null) {
208
               this.pageParams.total = 0
204
               this.pageParams.total = 0
210
               this.pageParams.total = response.total
206
               this.pageParams.total = response.total
211
             }
207
             }
212
             this.dataLists = response.data
208
             this.dataLists = response.data
213
-            //this.dataListsExport = response.data
209
+            // this.dataListsExport = response.data
214
           }
210
           }
215
         })
211
         })
216
         resolve()
212
         resolve()
217
       })
213
       })
218
     },
214
     },
219
     // 添加
215
     // 添加
220
-    addRemarkHbStatus(){
221
-      
216
+    addRemarkHbStatus() {
222
       this.loading = true
217
       this.loading = true
223
       const datas = {
218
       const datas = {
224
         id: this.remarkId,
219
         id: this.remarkId,
225
-        hbStatus: "已回拨"
220
+        hbStatus: '已回拨'
226
       }
221
       }
227
       // 添加
222
       // 添加
228
       addRemark(datas).then(response => {
223
       addRemark(datas).then(response => {
239
       }).catch(() => {
234
       }).catch(() => {
240
         this.loading = false
235
         this.loading = false
241
       })
236
       })
242
-        
243
-
244
     },
237
     },
245
-						
246
-    getListExport(){
238
+
239
+    getListExport() {
247
       this.loading = true
240
       this.loading = true
248
       this.disableBL = true
241
       this.disableBL = true
249
       return new Promise(resolve => {
242
       return new Promise(resolve => {
264
             this.$message({
257
             this.$message({
265
               message: '导出未接来电数据查询成功!',
258
               message: '导出未接来电数据查询成功!',
266
               type: 'success',
259
               type: 'success',
267
-              duration: 1000
268
-              ,offset:50
260
+              duration: 1000,
261
+              offset: 50
269
             })
262
             })
270
             this.dataListsExport = response.data
263
             this.dataListsExport = response.data
271
-
272
           }
264
           }
273
         })
265
         })
274
         resolve()
266
         resolve()
275
       })
267
       })
276
     },
268
     },
277
-    calltypeState(index){
278
-      
269
+    calltypeState(index) {
279
       if (index.callBackTime) {
270
       if (index.callBackTime) {
280
-        
281
-        if(index.hbStatus=="不用回拨"){
271
+        if (index.hbStatus == '不用回拨') {
282
           return '不用回拨'
272
           return '不用回拨'
283
-        }else {
273
+        } else {
284
           return '已回拨'
274
           return '已回拨'
285
         }
275
         }
286
-
287
-      } else{
288
-
276
+      } else {
289
         if (!index.hbStatus) {
277
         if (!index.hbStatus) {
290
           return '未回拨'
278
           return '未回拨'
291
         } else {
279
         } else {
292
           return index.hbStatus
280
           return index.hbStatus
293
         }
281
         }
294
-
295
       }
282
       }
296
     },
283
     },
297
-	//显示客户信息
298
-    btn_remark(remarkId){
299
-      console.log(remarkId);
284
+    // 显示客户信息
285
+    btn_remark(remarkId) {
286
+      console.log(remarkId)
300
       this.$layer.iframe({
287
       this.$layer.iframe({
301
         content: {
288
         content: {
302
           content: remarkIndex, // 传递的组件对象
289
           content: remarkIndex, // 传递的组件对象
303
           parent: this, // 当前的vue对象
290
           parent: this, // 当前的vue对象
304
           data: {
291
           data: {
305
-            remarkId:remarkId
292
+            remarkId: remarkId
306
           } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
293
           } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
307
         },
294
         },
308
         area: ['40%', '40%'],
295
         area: ['40%', '40%'],
318
       this.downloadLoading = true
305
       this.downloadLoading = true
319
       import('@/vendor/Export2Excel').then(excel => {
306
       import('@/vendor/Export2Excel').then(excel => {
320
         const tHeader = [
307
         const tHeader = [
321
-          '主叫号码', 
322
-          '被叫坐席分机号', 
323
-          '坐席名称', 
324
-          '客户类型', 
308
+          '主叫号码',
309
+          '被叫坐席分机号',
310
+          '坐席名称',
311
+          '客户类型',
325
           '客户名称',
312
           '客户名称',
326
-          '客户编号', 
327
-          '销售经理', 
328
-          '回拨状态', 
329
-          '振铃时长', 
313
+          '客户编号',
314
+          '销售经理',
315
+          '回拨状态',
316
+          '振铃时长',
330
           '来电时间',
317
           '来电时间',
331
-          '回拨时间', 
332
-          '备注' ]
318
+          '回拨时间',
319
+          '备注']
333
         const filterVal = [
320
         const filterVal = [
334
-          'callerNumber', 
335
-          'agentExtNumber', 
336
-          'agentName',  
337
-          'servAgentGroupId', 
338
-          'cusName', 
339
-          'cusCode', 
340
-          'salMan',  
341
-          'hbStatus', 
342
-          'ringLongTime', 
343
-          'callInTime', 
344
-          'callBackTime', 
321
+          'callerNumber',
322
+          'agentExtNumber',
323
+          'agentName',
324
+          'servAgentGroupId',
325
+          'cusName',
326
+          'cusCode',
327
+          'salMan',
328
+          'hbStatus',
329
+          'ringLongTime',
330
+          'callInTime',
331
+          'callBackTime',
345
           'remark']
332
           'remark']
346
         const list = this.dataListsExport
333
         const list = this.dataListsExport
347
         const data = this.formatJson(filterVal, list)
334
         const data = this.formatJson(filterVal, list)
358
     },
345
     },
359
     // 回拨
346
     // 回拨
360
     btn_call(dataListLine) {
347
     btn_call(dataListLine) {
361
-      //dataListLine.callerNumber
348
+      // dataListLine.callerNumber
362
       console.log(dataListLine.id)
349
       console.log(dataListLine.id)
363
       console.log(dataListLine.callerNumber)
350
       console.log(dataListLine.callerNumber)
364
-      this.remarkId =dataListLine.id
351
+      this.remarkId = dataListLine.id
365
       this.addRemarkHbStatus()
352
       this.addRemarkHbStatus()
366
-      
353
+
367
       this.callOut(dataListLine.callerNumber)
354
       this.callOut(dataListLine.callerNumber)
368
     },
355
     },
369
     formatJson(filterVal, jsonData) {
356
     formatJson(filterVal, jsonData) {
385
             return timestampToTime(v[j])
372
             return timestampToTime(v[j])
386
           } else if (j == 'callBackTime') {
373
           } else if (j == 'callBackTime') {
387
             return timestampToTime(v[j])
374
             return timestampToTime(v[j])
388
-          } else{
375
+          } else {
389
             return v[j]
376
             return v[j]
390
           }
377
           }
391
         })
378
         })
392
       )
379
       )
393
     },
380
     },
394
-    
395
-    custometType(status){
381
+
382
+    custometType(status) {
396
       const statusMap = {
383
       const statusMap = {
397
-        101:'军品业务',
398
-        102:'民品业务',
399
-        103:'新能源业务',
400
-        104:'外贸业务',
401
-        105:'华亿业务'
384
+        101: '军品业务',
385
+        102: '民品业务',
386
+        103: '新能源业务',
387
+        104: '外贸业务',
388
+        105: '华亿业务'
402
       }
389
       }
403
       return statusMap[status]
390
       return statusMap[status]
404
     },
391
     },
406
     calltypeFilter(status) {
393
     calltypeFilter(status) {
407
       const statusMap = {
394
       const statusMap = {
408
         null: '未回拨'
395
         null: '未回拨'
409
-        
396
+
410
       }
397
       }
411
       return statusMap[status]
398
       return statusMap[status]
412
     },
399
     },