telephone-clients 4.0.0-1-60 → 4.0.0-1-62

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.
@@ -1,285 +1,285 @@
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: 50%">
6
- <div class="form-group form-input-group" style="display: flex;justify-content: flex-start">
7
- <label class="font_normal_body" style="width: 40%">查询日期</label>
8
- <datepicker placeholder="查询日期"
9
- :value.sync="searchDate"
10
- v-model="searchDate"
11
- :format="'yyyy-MM-dd HH:mm:ss'"
12
- ></datepicker>
13
- <button type="button" name="button"
14
- class="button_search button_spacing" style="z-index: 2" @click="searchEcharts()">查询</button>
15
- </div>
16
- </div>
17
- <div style="height: 45%;" id="husunzhexian1"></div>
18
- <div style="height: 45%;" id="husunzhexian2"></div>
19
- </div>
20
- <div class="span" style="width: 60%;overflow: auto">
21
- <visit-info v-if="showVisit" :phone="wavflie" :idwavfile="idwavfile" :outltime="outltime" @show-obj="watchShow" v-on:visitback="visitback" ></visit-info>
22
- <criteria-paged :model="model" v-else v-ref:paged>
23
- <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
24
- <div novalidate class="form-inline" partial>
25
- <div class="row">
26
- <div class="col-sm-3 form-group form-input-group">
27
- <label class="font_normal_body" style="width: 35%">电话号码</label>
28
- <input type="text" class="input_search" v-model="model.telnum" placeholder='电话号码'
29
- condition="telnum like '%{}%'"
30
- :size="model.telnum ? model.telnum.length : 7">
31
- </div>
32
-
33
- <div class="col-sm-3 form-group form-input-group">
34
- <label class="font_normal_body" style="width: 40%">来电时间</label>
35
- <datepicker placeholder="开始时间"
36
- :value.sync="model.f_date"
37
- v-model="model.f_date"
38
- :format="'yyyy-MM-dd HH:mm:ss'"
39
- condition="outltime > '{}'"
40
- ></datepicker>
41
- </div>
42
- <div class="col-sm-3 form-group form-input-group">
43
- <label class="font_normal_body" style="width: 40%">来电时间</label>
44
- <datepicker placeholder="结束时间"
45
- :value.sync="model.f_end_date"
46
- v-model="model.f_end_date"
47
- :format="'yyyy-MM-dd HH:mm:ss'"
48
- condition="outltime < '{}'"
49
- ></datepicker>
50
- </div>
51
- <div class="col-sm-3 form-group form-input-group">
52
- <label class="font_normal_body" style="width: 35%">回访状态</label>
53
- <v-select :value.sync="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">查询</button>
64
- <export-excel-tel
65
- :data="$parent.$parent.searchData"
66
- :field="$parent.$parent.excelHeaders"
67
- sqlurl="af-telephone/rs/logic/telephoneExport" sql-name="tel_singleTable_OrderBy" template-name='呼损记录导出'
68
- :choose-col="true">
69
- </export-excel-tel>
70
- </div>
71
- </div>
72
- </div>
73
- </criteria>
74
- <data-grid partial='list' v-ref:grid :model="model" class="list_area table_sy">
75
- <template partial='head'>
76
- <tr>
77
- <th><nobr>电话号码</nobr></th>
78
- <th><nobr>来电时间</nobr></th>
79
- <th><nobr>操作</nobr></th>
80
- </tr>
81
- </template>
82
- <template partial='body'>
83
- <td style="text-align: center">{{row.telnum}}</td>
84
- <td style="text-align: center">{{row.outltime}}</td>
85
- <td style="text-align: center">
86
- <button-link v-show="!row.f_flghuifang" type="button" class="btn btn-link" @click="$parent.$parent.$parent.playWav(row.telnum,row.id)">回拨</button-link>
87
- </td>
88
- </template>
89
- </data-grid>
90
- </criteria-paged>
91
- </div>
92
- </div>
93
- </div>
94
- <!-- <modal :show.sync="showVisit" v-ref:modal backdrop="false">-->
95
- <!-- <header slot="modal-header" class="modal-header">-->
96
- <!-- </header>-->
97
- <!-- <article slot="modal-body" class="modal-body">-->
98
- <!-- <visit-info v-if="showVisit" :phone="wavflie" :idwavfile="idwavfile" :outltime="outltime" @show-obj="watchShow"></visit-info>-->
99
- <!-- </article>-->
100
- <!-- <footer slot="modal-footer" class="modal-footer">-->
101
- <!-- </footer>-->
102
- <!-- </modal>-->
103
- </template>
104
-
105
- <script>
106
- import {HttpResetClass, PagedList} from 'vue-client'
107
- import * as Util from '../../../components/Util'
108
- export default {
109
- title: '呼损记录',
110
- data () {
111
- return {
112
- model: new PagedList('af-telephone/rs/sql/tel_singleTable_OrderBy', 20, {items: "'*'", tablename: "'t_records'", orderitem: "'outltime desc'" }),
113
- row: null,
114
- show: false,
115
- wavflie : '',
116
- idwavfile:'',
117
- leftShow:true,
118
- searchDate:Util.toStandardDateString(),
119
- orderMan: '',
120
- msgs: [],
121
- huifangs:[{label:"全部",value:""},{label:"已回访",value:"已回访"},{label:"未回访",value:"未回访"}],
122
- service: Object,
123
- pendingCount: 0,
124
- serobj:Object,
125
- showVisit:false,
126
- outltime:this.getNowFormatDate(),
127
- searchData:{
128
- items: "*",
129
- tablename: "t_records",
130
- orderitem: "outltime desc",
131
- condition: '1=1'
132
- },
133
- excelHeaders: {
134
- 'telnum': '电话号码',
135
- 'outltime': '来电时间',
136
- },
137
- f_filiale:'',
138
- f_filiale_id:'',
139
- }
140
- },
141
- ready () {
142
- this.f_filiale = this.$login.f.f_fengongsi
143
- this.f_filiale_id = this.$login.f.f_orgids
144
- this.$refs.paged.$refs.criteria.model.f_flghuifang = '未回访'
145
- this.leftShow = (this.$parent.leftShow == undefined ? true : this.$parent.leftShow)
146
- this.renderEcharts(Util.toStandardDateString())
147
- // this.selfSearch()
148
-
149
- },
150
- methods: {
151
- visitback(val){
152
- this.showVisit = false
153
- if(val == 'commit'){
154
- this.$refs.paged.$refs.criteria.search()
155
- }
156
- },
157
- searchEcharts(){
158
- console.log("9334",this.searchDate)
159
- this.renderEcharts(this.searchDate)
160
- },
161
- //获取当前日期
162
- renderEcharts(date){
163
- console.log("933",Util.addDate(3,date),Util.addDate(-3),date)
164
- new HttpResetClass().load("post",'af-telephone/rs/sql/getLossPhoneByTime',{
165
- data:{
166
- groupitem:'SUBSTRING(outltime, 0, 11)',
167
- condition:`outltime>='${Util.addDate(-3,date)} 00:00:00' and outltime<='${Util.addDate(3,date)} 23:59:59' and f_filiale_id = '${this.$login.f.orgid}'`
168
- }
169
- },{resolveMsg:null,rejectMsg:null}).then(res=>{
170
- let myChart1 = this.$echarts.init(document.getElementById(("husunzhexian1")))
171
- myChart1.setOption(this.getAOptions("呼损日分析表",res.data))
172
- })
173
-
174
- new HttpResetClass().load("post",'af-telephone/rs/sql/getLossPhoneByTime',{
175
- data:{
176
- groupitem:"SUBSTRING(outltime, 12, 2)+':00'",
177
- condition:`outltime>='${Util.toStandardDateString(date)} 08:00:00' and outltime<='${Util.toStandardDateString(date)} 18:59:59' and f_filiale_id = '${this.$login.f.orgid}'`
178
- }
179
- },{resolveMsg:null,rejectMsg:null}).then(res=>{
180
- let myChart1 = this.$echarts.init(document.getElementById(("husunzhexian2")))
181
- myChart1.setOption(this.getAOptions("呼损时分析表",res.data))
182
- })
183
- },
184
- getAOptions(title,arr){
185
-
186
- return {
187
- color: ['rgb(155,214,129)', '#73c0de'],
188
- title: {
189
- text: title
190
- },
191
- tooltip: {
192
- trigger: 'axis'
193
- },
194
- legend: {
195
- data: ['忙线', '未接']
196
- },
197
- grid: {
198
- left: '3%',
199
- right: '4%',
200
- bottom: '3%',
201
- containLabel: true
202
- },
203
- toolbox: {
204
- feature: {
205
- saveAsImage: {}
206
- }
207
- },
208
- xAxis: {
209
- type: 'category',
210
- boundaryGap: false,
211
- data: arr.map(item=>{
212
- if(title === '呼损日分析表'){
213
- return item.timearea.substr(5,5)
214
- }
215
- return item.timearea
216
- })
217
- },
218
- yAxis: {
219
- type: 'value'
220
- },
221
- series: [
222
- {
223
- name: '未接',
224
- type: 'line',
225
- stack: 'Total',
226
- data: arr.map(item=>item.weijie)
227
- },
228
- {
229
- name: '忙线',
230
- type: 'line',
231
- stack: 'Total',
232
- data: arr.map(item=>item.zhanxian)
233
- },
234
- ]
235
- }
236
- },
237
- getNowFormatDate() {
238
- var date = new Date();
239
- var seperator1 = "-";
240
- var month = date.getMonth() + 1;
241
- var strDate = date.getDate();
242
- if (month >= 1 && month <= 9) {
243
- month = "0" + month;
244
- }
245
- if (strDate >= 0 && strDate <= 9) {
246
- strDate = "0" + strDate;
247
- }
248
- var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate + ' 23:59:59'
249
- return currentdate;
250
- },
251
- watchShow(val){
252
- this.showVisit = val
253
- },
254
- clearVisit(){
255
- this.show = false
256
- },
257
- playWav(val,val1){
258
- if (!this.leftShow){
259
- this.$parent.setUserPhone(val)
260
- }
261
- this.wavflie=val;
262
- this.idwavfile=val1
263
- this.showVisit = true
264
- },
265
- closemodel () {
266
- this.showVisit = false
267
- },
268
- search(args) {
269
- if(args.model.f_flghuifang){
270
- if(args.model.f_flghuifang==='已回访'){
271
- args.condition += ` and f_flghuifang = '已回访'`
272
- }else{
273
- args.condition += ` and f_flghuifang is null`
274
- }
275
- }
276
- args.condition += " AND isnull(starttime,'') = '' AND isnull(findtime,'') != ''"
277
- if(this.f_filiale_id){
278
- args.condition += ` and f_filiale_id = '${this.f_filiale_id}'`
279
- }
280
- this.searchData.condition = args.condition
281
- this.model.search(args.condition)
282
- },
283
- },
284
- }
285
- </script>
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: 50%">
6
+ <div class="form-group form-input-group" style="display: flex;justify-content: flex-start">
7
+ <label class="font_normal_body" style="width: 40%">查询日期</label>
8
+ <datepicker placeholder="查询日期"
9
+ :value.sync="searchDate"
10
+ v-model="searchDate"
11
+ :format="'yyyy-MM-dd HH:mm:ss'"
12
+ ></datepicker>
13
+ <button type="button" name="button"
14
+ class="button_search button_spacing" style="z-index: 2" @click="searchEcharts()">查询</button>
15
+ </div>
16
+ </div>
17
+ <div style="height: 45%;" id="husunzhexian1"></div>
18
+ <div style="height: 45%;" id="husunzhexian2"></div>
19
+ </div>
20
+ <div class="span" style="width: 60%;overflow: auto">
21
+ <visit-info v-if="showVisit" :phone="wavflie" :idwavfile="idwavfile" :outltime="outltime" @show-obj="watchShow" v-on:visitback="visitback" ></visit-info>
22
+ <criteria-paged :model="model" v-else v-ref:paged>
23
+ <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
24
+ <div novalidate class="form-inline" partial>
25
+ <div class="row">
26
+ <div class="col-sm-3 form-group form-input-group">
27
+ <label class="font_normal_body" style="width: 35%">电话号码</label>
28
+ <input type="text" class="input_search" v-model="model.telnum" placeholder='电话号码'
29
+ condition="telnum like '%{}%'"
30
+ :size="model.telnum ? model.telnum.length : 7">
31
+ </div>
32
+
33
+ <div class="col-sm-3 form-group form-input-group">
34
+ <label class="font_normal_body" style="width: 40%">来电时间</label>
35
+ <datepicker placeholder="开始时间"
36
+ :value.sync="model.f_date"
37
+ v-model="model.f_date"
38
+ :format="'yyyy-MM-dd HH:mm:ss'"
39
+ condition="outltime > '{}'"
40
+ ></datepicker>
41
+ </div>
42
+ <div class="col-sm-3 form-group form-input-group">
43
+ <label class="font_normal_body" style="width: 40%">来电时间</label>
44
+ <datepicker placeholder="结束时间"
45
+ :value.sync="model.f_end_date"
46
+ v-model="model.f_end_date"
47
+ :format="'yyyy-MM-dd HH:mm:ss'"
48
+ condition="outltime < '{}'"
49
+ ></datepicker>
50
+ </div>
51
+ <div class="col-sm-3 form-group form-input-group">
52
+ <label class="font_normal_body" style="width: 35%">回访状态</label>
53
+ <v-select :value.sync="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">查询</button>
64
+ <export-excel-tel
65
+ :data="$parent.$parent.searchData"
66
+ :field="$parent.$parent.excelHeaders"
67
+ sqlurl="af-telephone/rs/logic/telephoneExport" sql-name="tel_singleTable_OrderBy" template-name='呼损记录导出'
68
+ :choose-col="true">
69
+ </export-excel-tel>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </criteria>
74
+ <data-grid partial='list' v-ref:grid :model="model" class="list_area table_sy">
75
+ <template partial='head'>
76
+ <tr>
77
+ <th><nobr>电话号码</nobr></th>
78
+ <th><nobr>来电时间</nobr></th>
79
+ <th><nobr>操作</nobr></th>
80
+ </tr>
81
+ </template>
82
+ <template partial='body'>
83
+ <td style="text-align: center">{{row.telnum}}</td>
84
+ <td style="text-align: center">{{row.outltime}}</td>
85
+ <td style="text-align: center">
86
+ <button-link v-show="!row.f_flghuifang" type="button" class="btn btn-link" @click="$parent.$parent.$parent.playWav(row.telnum,row.id)">回拨</button-link>
87
+ </td>
88
+ </template>
89
+ </data-grid>
90
+ </criteria-paged>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ <!-- <modal :show.sync="showVisit" v-ref:modal backdrop="false">-->
95
+ <!-- <header slot="modal-header" class="modal-header">-->
96
+ <!-- </header>-->
97
+ <!-- <article slot="modal-body" class="modal-body">-->
98
+ <!-- <visit-info v-if="showVisit" :phone="wavflie" :idwavfile="idwavfile" :outltime="outltime" @show-obj="watchShow"></visit-info>-->
99
+ <!-- </article>-->
100
+ <!-- <footer slot="modal-footer" class="modal-footer">-->
101
+ <!-- </footer>-->
102
+ <!-- </modal>-->
103
+ </template>
104
+
105
+ <script>
106
+ import {HttpResetClass, PagedList} from 'vue-client'
107
+ import * as Util from '../../../components/Util'
108
+ export default {
109
+ title: '呼损记录',
110
+ data () {
111
+ return {
112
+ model: new PagedList('af-telephone/rs/sql/tel_singleTable_OrderBy', 20, {items: "'*'", tablename: "'t_records'", orderitem: "'outltime desc'" }),
113
+ row: null,
114
+ show: false,
115
+ wavflie : '',
116
+ idwavfile:'',
117
+ leftShow:true,
118
+ searchDate:Util.toStandardDateString(),
119
+ orderMan: '',
120
+ msgs: [],
121
+ huifangs:[{label:"全部",value:""},{label:"已回访",value:"已回访"},{label:"未回访",value:"未回访"}],
122
+ service: Object,
123
+ pendingCount: 0,
124
+ serobj:Object,
125
+ showVisit:false,
126
+ outltime:this.getNowFormatDate(),
127
+ searchData:{
128
+ items: "*",
129
+ tablename: "t_records",
130
+ orderitem: "outltime desc",
131
+ condition: '1=1'
132
+ },
133
+ excelHeaders: {
134
+ 'telnum': '电话号码',
135
+ 'outltime': '来电时间',
136
+ },
137
+ f_filiale:'',
138
+ f_filiale_id:'',
139
+ }
140
+ },
141
+ ready () {
142
+ this.f_filiale = this.$login.f.orgs
143
+ this.f_filiale_id = this.$login.f.orgid
144
+ this.$refs.paged.$refs.criteria.model.f_flghuifang = '未回访'
145
+ this.leftShow = (this.$parent.leftShow == undefined ? true : this.$parent.leftShow)
146
+ this.renderEcharts(Util.toStandardDateString())
147
+ // this.selfSearch()
148
+
149
+ },
150
+ methods: {
151
+ visitback(val){
152
+ this.showVisit = false
153
+ if(val == 'commit'){
154
+ this.$refs.paged.$refs.criteria.search()
155
+ }
156
+ },
157
+ searchEcharts(){
158
+ console.log("9334",this.searchDate)
159
+ this.renderEcharts(this.searchDate)
160
+ },
161
+ //获取当前日期
162
+ renderEcharts(date){
163
+ console.log("933",Util.addDate(3,date),Util.addDate(-3),date)
164
+ new HttpResetClass().load("post",'af-telephone/rs/sql/getLossPhoneByTime',{
165
+ data:{
166
+ groupitem:'SUBSTRING(outltime, 0, 11)',
167
+ condition:`outltime>='${Util.addDate(-3,date)} 00:00:00' and outltime<='${Util.addDate(3,date)} 23:59:59' and f_filiale_id = '${this.$login.f.orgid}'`
168
+ }
169
+ },{resolveMsg:null,rejectMsg:null}).then(res=>{
170
+ let myChart1 = this.$echarts.init(document.getElementById(("husunzhexian1")))
171
+ myChart1.setOption(this.getAOptions("呼损日分析表",res.data))
172
+ })
173
+
174
+ new HttpResetClass().load("post",'af-telephone/rs/sql/getLossPhoneByTime',{
175
+ data:{
176
+ groupitem:"SUBSTRING(outltime, 12, 2)+':00'",
177
+ condition:`outltime>='${Util.toStandardDateString(date)} 08:00:00' and outltime<='${Util.toStandardDateString(date)} 18:59:59' and f_filiale_id = '${this.$login.f.orgid}'`
178
+ }
179
+ },{resolveMsg:null,rejectMsg:null}).then(res=>{
180
+ let myChart1 = this.$echarts.init(document.getElementById(("husunzhexian2")))
181
+ myChart1.setOption(this.getAOptions("呼损时分析表",res.data))
182
+ })
183
+ },
184
+ getAOptions(title,arr){
185
+
186
+ return {
187
+ color: ['rgb(155,214,129)', '#73c0de'],
188
+ title: {
189
+ text: title
190
+ },
191
+ tooltip: {
192
+ trigger: 'axis'
193
+ },
194
+ legend: {
195
+ data: ['忙线', '未接']
196
+ },
197
+ grid: {
198
+ left: '3%',
199
+ right: '4%',
200
+ bottom: '3%',
201
+ containLabel: true
202
+ },
203
+ toolbox: {
204
+ feature: {
205
+ saveAsImage: {}
206
+ }
207
+ },
208
+ xAxis: {
209
+ type: 'category',
210
+ boundaryGap: false,
211
+ data: arr.map(item=>{
212
+ if(title === '呼损日分析表'){
213
+ return item.timearea.substr(5,5)
214
+ }
215
+ return item.timearea
216
+ })
217
+ },
218
+ yAxis: {
219
+ type: 'value'
220
+ },
221
+ series: [
222
+ {
223
+ name: '未接',
224
+ type: 'line',
225
+ stack: 'Total',
226
+ data: arr.map(item=>item.weijie)
227
+ },
228
+ {
229
+ name: '忙线',
230
+ type: 'line',
231
+ stack: 'Total',
232
+ data: arr.map(item=>item.zhanxian)
233
+ },
234
+ ]
235
+ }
236
+ },
237
+ getNowFormatDate() {
238
+ var date = new Date();
239
+ var seperator1 = "-";
240
+ var month = date.getMonth() + 1;
241
+ var strDate = date.getDate();
242
+ if (month >= 1 && month <= 9) {
243
+ month = "0" + month;
244
+ }
245
+ if (strDate >= 0 && strDate <= 9) {
246
+ strDate = "0" + strDate;
247
+ }
248
+ var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate + ' 23:59:59'
249
+ return currentdate;
250
+ },
251
+ watchShow(val){
252
+ this.showVisit = val
253
+ },
254
+ clearVisit(){
255
+ this.show = false
256
+ },
257
+ playWav(val,val1){
258
+ if (!this.leftShow){
259
+ this.$parent.setUserPhone(val)
260
+ }
261
+ this.wavflie=val;
262
+ this.idwavfile=val1
263
+ this.showVisit = true
264
+ },
265
+ closemodel () {
266
+ this.showVisit = false
267
+ },
268
+ search(args) {
269
+ if(args.model.f_flghuifang){
270
+ if(args.model.f_flghuifang==='已回访'){
271
+ args.condition += ` and f_flghuifang = '已回访'`
272
+ }else{
273
+ args.condition += ` and f_flghuifang is null`
274
+ }
275
+ }
276
+ args.condition += " AND isnull(starttime,'') = '' AND isnull(findtime,'') != ''"
277
+ if(this.f_filiale_id){
278
+ args.condition += ` and f_filiale_id = '${this.f_filiale_id}'`
279
+ }
280
+ this.searchData.condition = args.condition
281
+ this.model.search(args.condition)
282
+ },
283
+ },
284
+ }
285
+ </script>