telephone-clients 4.0.0-1-5 → 4.0.0-1-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/workorder/Outlay.vue +26 -21
- package/src/components/workorder/PhoneStandWork.vue +9 -9
- package/src/filiale/meihekou/android/AddMyTask.vue +336 -0
- package/src/filiale/meihekou/android/Outlay.vue +361 -0
- package/src/filiale/meihekou/android/PhoneStandWork.vue +431 -0
- package/src/filiale/meihekou/android/RepairOrderV.vue +825 -0
- package/src/filiale/meihekou/pc/TelLossList.vue +373 -0
- package/src/filiale/meihekou/pc/VisitInfo.vue +311 -0
- package/src/filiale/meihekou/telephone.js +2 -1
- package/src/filiale/meihekou/telephoneAndroid.js +4 -1
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex-row">
|
|
3
|
+
<div id="stand-work-list" class="flex bg-white p-10 basic-main" style="flex-direction: row">
|
|
4
|
+
<div style="width: 40%;height: 100%" v-show="leftShow">
|
|
5
|
+
<div class="row" style="height: 10%;width: 100%">
|
|
6
|
+
<div class="form-group form-input-group" style="display: flex;justify-content: flex-start;width: 80%">
|
|
7
|
+
<label class="font_normal_body" style="width: 20%">开始日期</label>
|
|
8
|
+
<datepicker placeholder="查询日期"
|
|
9
|
+
:value.sync="startDate"
|
|
10
|
+
v-model="startDate"
|
|
11
|
+
:format="'yyyy-MM-dd HH:mm:ss'"
|
|
12
|
+
></datepicker>
|
|
13
|
+
<label class="font_normal_body" style="width: 20%">结束日期</label>
|
|
14
|
+
<datepicker placeholder="查询日期"
|
|
15
|
+
:value.sync="endDate"
|
|
16
|
+
v-model="endDate"
|
|
17
|
+
:format="'yyyy-MM-dd HH:mm:ss'"
|
|
18
|
+
></datepicker>
|
|
19
|
+
<button type="button" name="button"
|
|
20
|
+
class="button_search button_spacing" style="z-index: 2" @click="searchEcharts()">查询
|
|
21
|
+
</button>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div style="height: 45%;" id="husunzhexian1"></div>
|
|
25
|
+
<div style="height: 45%;" id="husunzhexian2"></div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="span" style="width: 60%;overflow: auto">
|
|
28
|
+
<visit-info v-if="showVisit" :phone="wavflie" :idwavfile="idwavfile" :outltime="outltime" :userip="ip"
|
|
29
|
+
@show-obj="watchShow" @visitback="visitback"></visit-info>
|
|
30
|
+
<criteria-paged :model="model" v-if="!showVisit" v-ref:paged>
|
|
31
|
+
<criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
|
|
32
|
+
<div novalidate class="form-inline" partial>
|
|
33
|
+
<div class="row">
|
|
34
|
+
<div class="col-sm-3 form-group form-input-group">
|
|
35
|
+
<label class="font_normal_body" style="width: 35%">电话号码</label>
|
|
36
|
+
<input type="text" class="input_search" v-model="model.telnum" placeholder='电话号码'
|
|
37
|
+
condition="telnum like '%{}%'"
|
|
38
|
+
:size="model.telnum ? model.telnum.length : 7">
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div class="col-sm-3 form-group form-input-group">
|
|
42
|
+
<label class="font_normal_body" style="width: 40%">来电时间</label>
|
|
43
|
+
<datepicker placeholder="来电时间"
|
|
44
|
+
:value.sync="model.f_date"
|
|
45
|
+
v-model="model.f_date"
|
|
46
|
+
:format="'yyyy-MM-dd HH:mm:ss'"
|
|
47
|
+
condition="outltime > '{}'"
|
|
48
|
+
></datepicker>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="col-sm-3 form-group form-input-group">
|
|
51
|
+
<label class="font_normal_body" style="width: 35%">回访状态</label>
|
|
52
|
+
<v-select :value.sync="model.f_flghuifang"
|
|
53
|
+
v-model="model.f_flghuifang"
|
|
54
|
+
:options='$parent.$parent.huifangs'
|
|
55
|
+
:value-single="true"
|
|
56
|
+
placeholder='请选择回访状态'
|
|
57
|
+
close-on-select
|
|
58
|
+
style="width: 60%"
|
|
59
|
+
></v-select>
|
|
60
|
+
</div>
|
|
61
|
+
<div style="float: right;" class="form-group span">
|
|
62
|
+
<button type="button" name="button"
|
|
63
|
+
class="button_search button_spacing" @click="search(),$dispatch('search')" style="z-index: 2">
|
|
64
|
+
查询
|
|
65
|
+
</button>
|
|
66
|
+
<export-excel-tel
|
|
67
|
+
:data="$parent.$parent.searchData"
|
|
68
|
+
:field="$parent.$parent.excelHeaders"
|
|
69
|
+
sqlurl="af-telephone/rs/logic/telephoneExport" sql-name="tel_singleTable_OrderBy" template-name='呼损记录导出'
|
|
70
|
+
:choose-col="false">
|
|
71
|
+
</export-excel-tel>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</criteria>
|
|
76
|
+
<data-grid partial='list' v-ref:grid :model="model" class="list_area table_sy">
|
|
77
|
+
<template partial='head'>
|
|
78
|
+
<tr>
|
|
79
|
+
<th>
|
|
80
|
+
<nobr>电话号码</nobr>
|
|
81
|
+
</th>
|
|
82
|
+
<th>
|
|
83
|
+
<nobr>来电时间</nobr>
|
|
84
|
+
</th>
|
|
85
|
+
<th>
|
|
86
|
+
<nobr>操作</nobr>
|
|
87
|
+
</th>
|
|
88
|
+
</tr>
|
|
89
|
+
</template>
|
|
90
|
+
<template partial='body'>
|
|
91
|
+
<td style="text-align: center">{{ row.telnum }}</td>
|
|
92
|
+
<td style="text-align: center">{{ row.outltime }}</td>
|
|
93
|
+
<td style="text-align: center">
|
|
94
|
+
<button-link v-show="!row.f_flghuifang" type="button" class="btn btn-link"
|
|
95
|
+
@click="$parent.$parent.$parent.playWav(row.telnum)">回拨
|
|
96
|
+
</button-link>
|
|
97
|
+
</td>
|
|
98
|
+
</template>
|
|
99
|
+
</data-grid>
|
|
100
|
+
</criteria-paged>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<!-- <modal :show.sync="showVisit" v-ref:modal backdrop="false">-->
|
|
105
|
+
<!-- <header slot="modal-header" class="modal-header">-->
|
|
106
|
+
<!-- </header>-->
|
|
107
|
+
<!-- <article slot="modal-body" class="modal-body">-->
|
|
108
|
+
<!-- <visit-info v-if="showVisit" :phone="wavflie" :idwavfile="idwavfile" :outltime="outltime" @show-obj="watchShow"></visit-info>-->
|
|
109
|
+
<!-- </article>-->
|
|
110
|
+
<!-- <footer slot="modal-footer" class="modal-footer">-->
|
|
111
|
+
<!-- </footer>-->
|
|
112
|
+
<!-- </modal>-->
|
|
113
|
+
</template>
|
|
114
|
+
|
|
115
|
+
<script>
|
|
116
|
+
import {HttpResetClass, PagedList} from 'vue-client'
|
|
117
|
+
import * as Util from '../Util'
|
|
118
|
+
import {addDate} from "../Util";
|
|
119
|
+
|
|
120
|
+
export default {
|
|
121
|
+
title: '呼损记录',
|
|
122
|
+
data() {
|
|
123
|
+
return {
|
|
124
|
+
model: new PagedList('af-telephone/rs/sql/tel_singleTable_OrderBy', 20, {
|
|
125
|
+
items: "'*'",
|
|
126
|
+
tablename: "'t_records'",
|
|
127
|
+
orderitem: "'outltime desc'"
|
|
128
|
+
}),
|
|
129
|
+
row: null,
|
|
130
|
+
show: false,
|
|
131
|
+
flag: false,
|
|
132
|
+
f_filiale_id: '',
|
|
133
|
+
f_filiale: '',
|
|
134
|
+
wavflie: '',
|
|
135
|
+
idwavfile: '',
|
|
136
|
+
leftShow: true,
|
|
137
|
+
startDate: Util.toStandardDateString(),
|
|
138
|
+
endDate: Util.toStandardDateString(),
|
|
139
|
+
orderMan: '',
|
|
140
|
+
msgs: [],
|
|
141
|
+
huifangs: [{label: "全部", value: ""}, {label: "已回访", value: "已回访"}, {label: "未回访", value: "未回访"}],
|
|
142
|
+
service: Object,
|
|
143
|
+
pendingCount: 0,
|
|
144
|
+
serobj: Object,
|
|
145
|
+
showVisit: false,
|
|
146
|
+
ip: null,
|
|
147
|
+
outltime: this.getNowFormatDate(),
|
|
148
|
+
searchData: {
|
|
149
|
+
items: "*",
|
|
150
|
+
tablename: "t_records",
|
|
151
|
+
orderitem: "outltime desc",
|
|
152
|
+
condition: '1=1'
|
|
153
|
+
},
|
|
154
|
+
excelHeaders: {
|
|
155
|
+
'telnum': '电话号码',
|
|
156
|
+
'outltime': '来电时间',
|
|
157
|
+
},
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
ready() {
|
|
161
|
+
this.flag = this.$appdata.getSingleValue('电话记录只查当前公司')
|
|
162
|
+
if (this.flag) {
|
|
163
|
+
if (this.flag == '是') {
|
|
164
|
+
this.f_filiale = this.$login.f.f_fengongsi
|
|
165
|
+
this.f_filiale_id = this.$login.f.f_orgids
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
//获取当前用户的ip地址
|
|
169
|
+
this.getYourIP(this)
|
|
170
|
+
this.$refs.paged.$refs.criteria.model.f_flghuifang = '未回访'
|
|
171
|
+
this.leftShow = (this.$parent.leftShow == undefined ? true : this.$parent.leftShow)
|
|
172
|
+
this.renderEcharts(Util.toStandardDateString())
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
},
|
|
176
|
+
methods: {
|
|
177
|
+
// 获取本地内网IP (使用Chrome浏览器) 强烈推荐使用小智浏览器
|
|
178
|
+
/** 如果弹出 请输入通道号,说明未获取到IP,请按以下步骤修改浏览器设置:
|
|
179
|
+
1.打开地址chrome://flags/
|
|
180
|
+
2.搜索 #enable-webrtc-hide-local-ips-with-mdns 该配置 并将属性改为disabled
|
|
181
|
+
3.修改成功后重启浏览器并刷新网页即可
|
|
182
|
+
**/
|
|
183
|
+
getYourIP(val) {
|
|
184
|
+
var RTCPeerConnection = window.RTCPeerConnection || window.webkitRTCPeerConnection || window.mozRTCPeerConnection;
|
|
185
|
+
if (RTCPeerConnection) (function () {
|
|
186
|
+
var rtc = new RTCPeerConnection({iceServers: []});
|
|
187
|
+
if (1 || window.mozRTCPeerConnection) {
|
|
188
|
+
rtc.createDataChannel('', {reliable: false});
|
|
189
|
+
};
|
|
190
|
+
rtc.onicecandidate = function (evt) {
|
|
191
|
+
if (evt.candidate) grepSDP("a=" + evt.candidate.candidate);
|
|
192
|
+
};
|
|
193
|
+
rtc.createOffer(function (offerDesc) {
|
|
194
|
+
grepSDP(offerDesc.sdp);
|
|
195
|
+
rtc.setLocalDescription(offerDesc);
|
|
196
|
+
}, function (e) {
|
|
197
|
+
console.warn("offer failed", e);
|
|
198
|
+
});
|
|
199
|
+
let addrs = Object.create(null);
|
|
200
|
+
addrs["0.0.0.0"] = false;
|
|
201
|
+
function updateDisplay(newAddr) {
|
|
202
|
+
if (newAddr in addrs) return;
|
|
203
|
+
else addrs[newAddr] = true;
|
|
204
|
+
var displayAddrs = Object.keys(addrs).filter(function (k) {
|
|
205
|
+
return addrs[k];
|
|
206
|
+
});
|
|
207
|
+
for (var i = 0; i < displayAddrs.length; i++) {
|
|
208
|
+
if (displayAddrs[i].length > 16) {
|
|
209
|
+
displayAddrs.splice(i, 1);
|
|
210
|
+
i--;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if(!val.ip){
|
|
214
|
+
val.ip = displayAddrs[0]
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function grepSDP(sdp) {
|
|
218
|
+
var hosts = [];
|
|
219
|
+
sdp.split('\r\n').forEach(function (line, index, arr) {
|
|
220
|
+
if (~line.indexOf("a=candidate")) {
|
|
221
|
+
var parts = line.split(' '),
|
|
222
|
+
addr = parts[4],
|
|
223
|
+
type = parts[7];
|
|
224
|
+
if (type === 'host') updateDisplay(addr);
|
|
225
|
+
} else if (~line.indexOf("c=")) {
|
|
226
|
+
var parts = line.split(' '),
|
|
227
|
+
addr = parts[2];
|
|
228
|
+
updateDisplay(addr);
|
|
229
|
+
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
)();
|
|
235
|
+
|
|
236
|
+
},
|
|
237
|
+
visitback(val){
|
|
238
|
+
this.showVisit = false
|
|
239
|
+
this.wavflie = ''
|
|
240
|
+
this.idwavfile = ''
|
|
241
|
+
this.model.f_flghuifang = '未回访'
|
|
242
|
+
},
|
|
243
|
+
searchEcharts() {
|
|
244
|
+
console.log("9334", this.startDate)
|
|
245
|
+
this.renderEcharts(this.startDate,this.endDate)
|
|
246
|
+
},
|
|
247
|
+
//获取当前日期
|
|
248
|
+
renderEcharts(startDate,endDate) {
|
|
249
|
+
console.log("933", startDate, endDate)
|
|
250
|
+
new HttpResetClass().load("post", 'af-telephone/rs/sql/getLossPhoneByTime', {
|
|
251
|
+
data: {
|
|
252
|
+
groupitem: 'SUBSTRING(outltime, 0, 11)',
|
|
253
|
+
condition: `outltime>='${startDate} 00:00:00' and outltime<='${endDate} 23:59:59'`
|
|
254
|
+
}
|
|
255
|
+
}, {resolveMsg: null, rejectMsg: null}).then(res => {
|
|
256
|
+
let myChart1 = this.$echarts.init(document.getElementById(("husunzhexian1")))
|
|
257
|
+
myChart1.setOption(this.getAOptions("呼损日分析表", res.data))
|
|
258
|
+
})
|
|
259
|
+
|
|
260
|
+
new HttpResetClass().load("post", 'af-telephone/rs/sql/getLossPhoneByTime', {
|
|
261
|
+
data: {
|
|
262
|
+
groupitem: "SUBSTRING(outltime, 12, 2)+':00'",
|
|
263
|
+
condition: `outltime>='${startDate} 08:00:00' and outltime<='${endDate} 18:59:59'`
|
|
264
|
+
}
|
|
265
|
+
}, {resolveMsg: null, rejectMsg: null}).then(res => {
|
|
266
|
+
let myChart1 = this.$echarts.init(document.getElementById(("husunzhexian2")))
|
|
267
|
+
myChart1.setOption(this.getAOptions("呼损时分析表", res.data))
|
|
268
|
+
})
|
|
269
|
+
},
|
|
270
|
+
getAOptions(title, arr) {
|
|
271
|
+
|
|
272
|
+
return {
|
|
273
|
+
color: ['rgb(155,214,129)', '#73c0de'],
|
|
274
|
+
title: {
|
|
275
|
+
text: title
|
|
276
|
+
},
|
|
277
|
+
tooltip: {
|
|
278
|
+
trigger: 'axis',
|
|
279
|
+
extraCssText:'width:200px;height:100px'
|
|
280
|
+
},
|
|
281
|
+
legend: {
|
|
282
|
+
data: ['忙线', '未接']
|
|
283
|
+
},
|
|
284
|
+
grid: {
|
|
285
|
+
left: '3%',
|
|
286
|
+
right: '4%',
|
|
287
|
+
bottom: '3%',
|
|
288
|
+
containLabel: true
|
|
289
|
+
},
|
|
290
|
+
toolbox: {
|
|
291
|
+
feature: {
|
|
292
|
+
saveAsImage: {}
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
xAxis: {
|
|
296
|
+
type: 'category',
|
|
297
|
+
boundaryGap: false,
|
|
298
|
+
data: arr.map(item => {
|
|
299
|
+
if (title === '呼损日分析表') {
|
|
300
|
+
return item.timearea.substr(5, 5)
|
|
301
|
+
}
|
|
302
|
+
return item.timearea
|
|
303
|
+
})
|
|
304
|
+
},
|
|
305
|
+
yAxis: {
|
|
306
|
+
type: 'value'
|
|
307
|
+
},
|
|
308
|
+
series: [
|
|
309
|
+
{
|
|
310
|
+
name: '未接',
|
|
311
|
+
type: 'line',
|
|
312
|
+
stack: 'Total',
|
|
313
|
+
data: arr.map(item => item.weijie)
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: '忙线',
|
|
317
|
+
type: 'line',
|
|
318
|
+
stack: 'Total',
|
|
319
|
+
data: arr.map(item => item.zhanxian)
|
|
320
|
+
},
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
getNowFormatDate() {
|
|
325
|
+
var date = new Date();
|
|
326
|
+
var seperator1 = "-";
|
|
327
|
+
var month = date.getMonth() + 1;
|
|
328
|
+
var strDate = date.getDate();
|
|
329
|
+
if (month >= 1 && month <= 9) {
|
|
330
|
+
month = "0" + month;
|
|
331
|
+
}
|
|
332
|
+
if (strDate >= 0 && strDate <= 9) {
|
|
333
|
+
strDate = "0" + strDate;
|
|
334
|
+
}
|
|
335
|
+
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate + ' 23:59:59'
|
|
336
|
+
return currentdate;
|
|
337
|
+
},
|
|
338
|
+
watchShow(val) {
|
|
339
|
+
this.showVisit = val
|
|
340
|
+
},
|
|
341
|
+
clearVisit() {
|
|
342
|
+
this.show = false
|
|
343
|
+
},
|
|
344
|
+
playWav(val, val1) {
|
|
345
|
+
if (!this.leftShow) {
|
|
346
|
+
this.$parent.setUserPhone(val)
|
|
347
|
+
}
|
|
348
|
+
this.wavflie = val;
|
|
349
|
+
this.idwavfile = val1
|
|
350
|
+
this.showVisit = true
|
|
351
|
+
},
|
|
352
|
+
closemodel() {
|
|
353
|
+
this.showVisit = false
|
|
354
|
+
},
|
|
355
|
+
search(args) {
|
|
356
|
+
if (args.model.f_flghuifang || this.model.f_flghuifang) {
|
|
357
|
+
if (args.model.f_flghuifang === '已回访' || this.model.f_flghuifang === '已回访') {
|
|
358
|
+
args.condition += ` and f_flghuifang = '已回访'`
|
|
359
|
+
} else {
|
|
360
|
+
args.condition += ` and f_flghuifang is null`
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
if (!args.model.f_date) {
|
|
364
|
+
args.condition += ` and outltime > '${Util.addDate(0)} 00:00:00'`
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
args.condition += " AND isnull(starttime,'') = '' AND isnull(findtime,'') != ''"
|
|
368
|
+
this.searchData.condition = args.condition
|
|
369
|
+
this.model.search(args.condition)
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
}
|
|
373
|
+
</script>
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
<template xmlns="http://www.w3.org/1999/html">
|
|
2
|
+
<div class="auto select-overspread form-horizontal auto">
|
|
3
|
+
<div class="row workOrderInfo" >
|
|
4
|
+
<div class="row">
|
|
5
|
+
<blockquote class="bg-info">
|
|
6
|
+
工单回访
|
|
7
|
+
</blockquote>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="row roee">
|
|
10
|
+
<div class="col-sm-6 form-group form-input-group" >
|
|
11
|
+
<label class="font_normal_body" style="width: 25%">回 访 员</label>
|
|
12
|
+
<input type="text" class="form-control" v-model="model.f_visitman" placeholder='回访员' >
|
|
13
|
+
</div>
|
|
14
|
+
<div class="col-sm-6 form-group form-input-group" >
|
|
15
|
+
<label class="font_normal_body" style="width: 25%">回访时间</label>
|
|
16
|
+
<datepicker placeholder="回访时间"
|
|
17
|
+
:value.sync="model.f_visitdate"
|
|
18
|
+
:format="'yyyy-MM-dd HH:mm:ss'"
|
|
19
|
+
></datepicker>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="col-sm-6 form-group form-input-group">
|
|
22
|
+
<label class="font_normal_body" style="width: 25%">质量满意度</label>
|
|
23
|
+
<v-select :value.sync="model.f_qualitycore"
|
|
24
|
+
:value-single="true"
|
|
25
|
+
:options='qualitycase'
|
|
26
|
+
placeholder='质量满意情况'
|
|
27
|
+
close-on-select>
|
|
28
|
+
</v-select>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="col-sm-6 form-group form-input-group">
|
|
31
|
+
<label class=" font_normal_body" style="width: 25%">服务满意度</label>
|
|
32
|
+
<v-select :value.sync="model.f_servicescore"
|
|
33
|
+
v-model="model.f_servicescore"
|
|
34
|
+
:value-single="true"
|
|
35
|
+
:options='servicecase'
|
|
36
|
+
placeholder='服务态度满意情况'
|
|
37
|
+
close-on-select>
|
|
38
|
+
</v-select>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="col-sm-6 form-group form-input-group">
|
|
41
|
+
<label class="font_normal_body" style="width: 25%">联系电话</label>
|
|
42
|
+
<input type="text" v-model='model.f_phone' class="form-control"/>
|
|
43
|
+
<button class="button_search button_spacing" @click="callout(model.f_phone)">呼出</button>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="col-sm-2 form-group form-input-group button-range" style="min-width: 300px;justify-content:space-between;">
|
|
46
|
+
<input type="radio" id="one" value="否" v-model="model.f_again_revisit">
|
|
47
|
+
<p for="one" style="margin-top: 14px">已完成</p>
|
|
48
|
+
<input type="radio" id="two" value="是" v-model="model.f_again_revisit">
|
|
49
|
+
<p for="two" style="margin-top: 14px">未完成</p>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
<div class="col-sm-6 form-group form-input-group">
|
|
53
|
+
<label class="font_normal_body" style="width: 25%">地址</label>
|
|
54
|
+
<input type="text" :value='row.f_address' class="form-control" disabled/>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="col-sm-6 form-group form-input-group" v-if="contextxianshi">
|
|
57
|
+
<label class="font_normal_body" style="width: 25%">来电内容</label>
|
|
58
|
+
<input type="text" :value='contextxianshi' class="form-control" disabled/>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="col-sm-6 form-group form-input-group">
|
|
61
|
+
<label class="font_normal_body" style="width: 25%">维修员备注</label>
|
|
62
|
+
<input type="text" :value='row.remark' class="form-control" disabled/>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="col-sm-12 form-input-group">
|
|
66
|
+
<label class="font_normal_body" style="width: 12.5%">客户意见</label>
|
|
67
|
+
<textarea name="name" rows="3" v-model="model.f_remarks" class="form-control ver-textarea"
|
|
68
|
+
style="width: 80%"></textarea>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="col-sm-12 form-input-group" style="margin-top: 6px">
|
|
71
|
+
<label class="font_normal_body" style="width: 12.5%">备注</label>
|
|
72
|
+
<textarea name="name" rows="4" v-model="model.f_bz" class="form-control ver-textarea"
|
|
73
|
+
style="width: 80%"></textarea>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="row button-range form-group form-input-group">
|
|
76
|
+
<button type="button" name="button"
|
|
77
|
+
class="button_search button_spacing" @click="saveVisit">提交</button>
|
|
78
|
+
<button type="button" name="button" style="background-color: #5ac0d9;border-radius: 4px;"
|
|
79
|
+
class="button_spacing button_search" @click="clearVisit">取消</button>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<modal :show.sync="showcalloutResult" width="50%" backdrop="false">
|
|
84
|
+
<header slot="modal-header" class="modal-header">
|
|
85
|
+
<center><h4 class="modal-title ">{{showTitle}}结果</h4></center>
|
|
86
|
+
</header>
|
|
87
|
+
<article slot="modal-body" class="modal-body" style="height: 100px;padding-top: 15px!important;">
|
|
88
|
+
<div v-show="!calloutResult"><label>正在{{ showTitle }},请稍后。。。。。。</label></div>
|
|
89
|
+
<div v-show="calloutResult">
|
|
90
|
+
<div class="row auto" v-show="calloutResult.area">
|
|
91
|
+
<label>真实归属地:</label><span>{{calloutResult.area}}</span>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="row auto" v-show="calloutResult.calloutNo">
|
|
94
|
+
<label>真实呼出号码:</label><span>{{calloutResult.calloutNo}}</span>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="row auto" v-show="calloutResult.err">
|
|
97
|
+
<label>其他信息:</label><span>{{calloutResult.err}}</span>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</article>
|
|
101
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
102
|
+
<button type="button" class="btn btn-success" @click='calloutConfirm()'>确认</button>
|
|
103
|
+
</footer>
|
|
104
|
+
</modal>
|
|
105
|
+
</div>
|
|
106
|
+
</template>
|
|
107
|
+
|
|
108
|
+
<script>
|
|
109
|
+
import { HttpResetClass } from 'vue-client'
|
|
110
|
+
import * as Util from '../Util'
|
|
111
|
+
import wxcon from '../../stores/wxconfig'
|
|
112
|
+
export default {
|
|
113
|
+
title: '回访单',
|
|
114
|
+
props: {
|
|
115
|
+
contextxianshi:null,
|
|
116
|
+
row:Object,
|
|
117
|
+
phone:'',
|
|
118
|
+
idwavfile:'',
|
|
119
|
+
outltime:'',
|
|
120
|
+
showcalloutResult:false,
|
|
121
|
+
calloutResult:null,
|
|
122
|
+
showTitle:'呼出',
|
|
123
|
+
userip:'000.000.000.000'
|
|
124
|
+
|
|
125
|
+
},
|
|
126
|
+
data () {
|
|
127
|
+
return {
|
|
128
|
+
|
|
129
|
+
model:{
|
|
130
|
+
f_again_revisit: '是',
|
|
131
|
+
f_visitman:'',
|
|
132
|
+
f_visitdate:this.getNowFormatDate(),
|
|
133
|
+
f_qualitycore:'满意',
|
|
134
|
+
f_servicescore:'满意',
|
|
135
|
+
f_phone:'',
|
|
136
|
+
f_remarks:'',
|
|
137
|
+
f_type:'回访',
|
|
138
|
+
f_record_sound:'',
|
|
139
|
+
f_bz:''
|
|
140
|
+
},
|
|
141
|
+
idwavfile:'',
|
|
142
|
+
loginUser: this.$login.f,
|
|
143
|
+
aChannel:0,
|
|
144
|
+
aModule:1,
|
|
145
|
+
qualitycase: this.$appdata.getParam('质量满意情况'),
|
|
146
|
+
servicecase: this.$appdata.getParam('服务态度满意情况')
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
methods: {
|
|
150
|
+
calloutConfirm(){
|
|
151
|
+
this.calloutResult=null
|
|
152
|
+
this.showcalloutResult=false
|
|
153
|
+
},
|
|
154
|
+
//获取当前时间
|
|
155
|
+
getNowFormatDate() {
|
|
156
|
+
var date = new Date();
|
|
157
|
+
var seperator1 = "-";
|
|
158
|
+
var seperator2 = ":";
|
|
159
|
+
var month = date.getMonth() + 1;
|
|
160
|
+
var strDate = date.getDate();
|
|
161
|
+
var hour = date.getHours();
|
|
162
|
+
var min = date.getMinutes();
|
|
163
|
+
var second = date.getSeconds();
|
|
164
|
+
if (month >= 1 && month <= 9) {
|
|
165
|
+
month = "0" + month;
|
|
166
|
+
}
|
|
167
|
+
if (strDate >= 0 && strDate <= 9) {
|
|
168
|
+
strDate = "0" + strDate;
|
|
169
|
+
}
|
|
170
|
+
if (hour >= 0 && hour <= 9) {
|
|
171
|
+
hour = "0" + hour;
|
|
172
|
+
}
|
|
173
|
+
if (min >= 0 && min <= 9) {
|
|
174
|
+
min = "0" + min;
|
|
175
|
+
}
|
|
176
|
+
if (second >= 0 && second <= 9) {
|
|
177
|
+
second = "0" + second;
|
|
178
|
+
}
|
|
179
|
+
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
|
|
180
|
+
+ " " + hour + seperator2 + min
|
|
181
|
+
+ seperator2 + second;
|
|
182
|
+
return currentdate;
|
|
183
|
+
},
|
|
184
|
+
// 提交
|
|
185
|
+
saveVisit () {
|
|
186
|
+
let service
|
|
187
|
+
//tag
|
|
188
|
+
if (this.outltime){
|
|
189
|
+
this.model.f_type='呼损'
|
|
190
|
+
service={}
|
|
191
|
+
}else{
|
|
192
|
+
service={
|
|
193
|
+
f_userinfo_id:this.row.f_userinfo_id,
|
|
194
|
+
f_user_name:this.row.f_user_name,
|
|
195
|
+
f_address:this.row.f_address,
|
|
196
|
+
f_workorder_type:this.row.f_workorder_type,
|
|
197
|
+
f_service_id:this.row.f_service_id
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
let data = {model: this.model,
|
|
201
|
+
service: service,
|
|
202
|
+
loginUser: {
|
|
203
|
+
name: this.loginUser.name,
|
|
204
|
+
ename: this.loginUser.ename,
|
|
205
|
+
f_orgpathstr:this.loginUser.orgpathstr
|
|
206
|
+
},
|
|
207
|
+
// 呼损用(查询条件 时间)
|
|
208
|
+
outltime:this.outltime,
|
|
209
|
+
idwavfile:this.idwavfile
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// 获得数据发送地址
|
|
213
|
+
let url = 'af-telephone/rs/logic/telvisit'
|
|
214
|
+
return this.$resetpost(url, data).then((data) => {
|
|
215
|
+
this.id = JSON.parse(data.data.id).id
|
|
216
|
+
// 清除对象数据
|
|
217
|
+
this.model = Object.assign({}, {
|
|
218
|
+
f_qualitycore:'满意',
|
|
219
|
+
f_servicescore:'满意',
|
|
220
|
+
f_phone:'',
|
|
221
|
+
f_bz:'',
|
|
222
|
+
f_remarks:'',
|
|
223
|
+
f_type:'回访',
|
|
224
|
+
f_visitdate:this.getNowFormatDate(),
|
|
225
|
+
f_record_sound:''
|
|
226
|
+
})
|
|
227
|
+
this.$emit('visitback','commit')
|
|
228
|
+
})
|
|
229
|
+
},
|
|
230
|
+
// 取消
|
|
231
|
+
clearVisit () {
|
|
232
|
+
this.$emit('visitback','nodo')
|
|
233
|
+
},
|
|
234
|
+
callout(telnum){
|
|
235
|
+
if(telnum){
|
|
236
|
+
let http = new HttpResetClass()
|
|
237
|
+
try{
|
|
238
|
+
http.load('POST', wxcon.voiceUrl, {
|
|
239
|
+
aId: this.$login.f.id,
|
|
240
|
+
aChannel: Util.attendant.aChannel,
|
|
241
|
+
aModule: Util.attendant.aModule,
|
|
242
|
+
aBzType:"callout",
|
|
243
|
+
bzExtra: telnum,
|
|
244
|
+
bzId: telnum,
|
|
245
|
+
aName: this.$login.f.name,
|
|
246
|
+
RoleId:this.$login.f.rolesnames,
|
|
247
|
+
sendTime:Util.toStandardTimeString()
|
|
248
|
+
}, {resolveMsg: null, rejectMsg: null}).then((req) => {
|
|
249
|
+
this.calloutResult = req.data.calloutResult
|
|
250
|
+
if (req.data.desc === '呼出失败') {
|
|
251
|
+
this.$showAlert(`呼出${telnum}失败`, 'danger', 0)
|
|
252
|
+
}else{
|
|
253
|
+
this.showcalloutResult=true
|
|
254
|
+
this.showTitle='呼出'
|
|
255
|
+
// 返回录音ID 存在回访数据里
|
|
256
|
+
this.model.f_record_sound = req.data.RecordsID
|
|
257
|
+
}
|
|
258
|
+
})
|
|
259
|
+
}catch(e){
|
|
260
|
+
this.$showAlert(`${e.data},呼出失败`, 'danger', 0)
|
|
261
|
+
this.callContent = '呼出失败'
|
|
262
|
+
}
|
|
263
|
+
}else{
|
|
264
|
+
this.$showAlert(`无电话号码`, 'danger', 0)
|
|
265
|
+
this.callContent = '呼出失败'
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
watch: {
|
|
270
|
+
'phone'(val){
|
|
271
|
+
this.model.f_phone = val
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
ready(){
|
|
275
|
+
let sql = 'tel_singleTable_OrderBy'
|
|
276
|
+
let condition = {
|
|
277
|
+
items: 'tongdao,mokuai',
|
|
278
|
+
tablename: 'T_IPTONGDAO',
|
|
279
|
+
condition: `loginip = '${this.userip}'`,
|
|
280
|
+
orderitem: 'id'
|
|
281
|
+
}
|
|
282
|
+
//tag
|
|
283
|
+
let http = new HttpResetClass()
|
|
284
|
+
http.load('POST', `af-telephone/rs/logic/tel_getOneData`, {data: {sql: sql, params: condition}}, {resolveMsg: null, rejectMsg: null}).then((req) => {
|
|
285
|
+
this.aChannel = parseInt(req.data.tongdao)
|
|
286
|
+
this.aModule = parseInt(req.data.mokuai)
|
|
287
|
+
})
|
|
288
|
+
this.model.f_visitman = this.$login.f.name
|
|
289
|
+
this.model.f_phone = this.phone
|
|
290
|
+
this.model.f_bz = this.row ? this.row.f_remarks:''
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
</script>
|
|
294
|
+
<style scoped lang="less">
|
|
295
|
+
.workOrderInfo{
|
|
296
|
+
.roee {
|
|
297
|
+
div {
|
|
298
|
+
margin-top: 10px;
|
|
299
|
+
padding-right: 3px;
|
|
300
|
+
}
|
|
301
|
+
label {
|
|
302
|
+
display: inline-block;
|
|
303
|
+
height: 100%;
|
|
304
|
+
min-width: 100px;
|
|
305
|
+
text-align: justify;
|
|
306
|
+
text-align-last: justify;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
</style>
|
|
311
|
+
|