1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<template>
<div class="callHistory H100">
<div class="head_box">
<h6>呼叫记录 </h6>
<h4>呼叫记录</h4>
</div>
<div class="content_box">
<div class="form_box h778px" >
<el-form :inline="true" :model="form" class="search-form">
<el-form-item label="网点归属:" v-if="roleId != 3">
<el-select size="mini" v-model="form.bankBranchId" placeholder="请选择网点归属" clearable filterable @change="Search">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="呼叫日期:">
<el-date-picker size="mini" v-model="form.callTime" type="date" placeholder="选择日期" @change="Search"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" class="btn_form_search" @click="Search">查询</el-button>
</el-form-item>
<el-form-item class="r-float">
<el-button size="mini" type="primary" class="btn_form_add" @click="exportExcel">下载数据</el-button>
</el-form-item>
</el-form>
<div class="scrool">
<el-table :data="tableData" stripe style="width: 100%"
@row-click="openDetails" >
<el-table-column prop="lineNumber" show-overflow-tooltip label="呼叫编号" ></el-table-column>
<el-table-column show-overflow-tooltip prop="content" label="呼叫内容" ></el-table-column>
<el-table-column prop="createTime" label="呼叫日期" width="160" >
<template slot-scope="scope">
{{scope.row.createTime | dateformat('YYYY-MM-DD HH:mm:ss')}}
</template>
</el-table-column>
<el-table-column prop="phoneNumber" show-overflow-tooltip label="手机号码"></el-table-column>
<el-table-column prop="bankBranchName" show-overflow-tooltip label="归属网点"></el-table-column>
</el-table>
</div>
<el-pagination small background
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-size="page.pageSize"
layout="prev, pager, next"
:total="page.total">
</el-pagination>
</div>
<!--查看详情-->
<el-dialog title="详情" :visible.sync="FormVisible" >
<div class="form_box">
<el-form :model="listform" ref="listform" >
<el-form-item label="呼叫编号:" prop="lineNumber" :label-width="formLabelWidth">
<span>{{listform.lineNumber}}</span>
</el-form-item>
<el-form-item label="呼叫内容:" prop="content" :label-width="formLabelWidth">
<span>{{listform.content}}</span>
</el-form-item>
<el-form-item label="呼叫日期:" prop="createTime" :label-width="formLabelWidth" >
<span>{{listform.createTime | dateformat('YYYY-MM-DD HH:mm:ss')}}</span>
</el-form-item>
<el-form-item label="手机号码:" prop="phoneNumber" :label-width="formLabelWidth">
<span>{{listform.phoneNumber}}</span>
</el-form-item>
<el-form-item label="归属网点:" prop="bankBranchName" :label-width="formLabelWidth">
<span>{{listform.bankBranchName}}</span>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="r-float" type="primary" @click="FormVisible = false">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
export default {
data() {
return {
tableData: [],
page: {
currentPage: 1, //当前页
pageSize: null, //每页条数
total: null, //总条数
},
FormVisible: false,
listform: {
lineNumber:'',
phoneNumber: '',
bankBranchName: '',
createTime: '',
content: '',
feedbackPersonName: '',
feedbackTime: '',
feedbackInfo: '',
},
formLabelWidth: "100px",
options: [],
roleId: '',
bankBranchId: '',
form: {
bankBranchId: '',
callTime: ''
},
}
},
computed: {},
mounted() {
this.initData();
},
components: {
},
methods: {
// 归属网点列表渲染
getBranch() {
let _this = this;
_this.$https({
method: 'get',
url: 'bankBranchInfo/getBankBox?action=appInfoQuery&roleId='+_this.roleId+'&bankId='+_this.bankBranchId,
authType: this.backToken
}).then((res) => {
_this.options = res.data;
}, (error) => {
console.log(error)
}
)
},
initData() {
this.roleId = localStorage.getItem('roleId');
this.bankBranchId = localStorage.getItem('bankBranchId');
this.onSearch();
this.getBranch();
},
// 获得数据接口
getTableData(param) {
let vm = this;
vm.$https({
url : "demandInfo/getList?type=2",
method: 'get',
authType: this.backToken
},param).then((res)=>{
let data = res.data;
vm.page.pageSize = data.size;
vm.page.total = data.total;
vm.tableData = data.records;
}).catch(function(err){
console.log(err);
})
},
// 分页
handleCurrentChange(val) {
let _this = this;
_this.page.currentPage = val;
_this.onSearch();
},
onSearch() {
let _this = this;
let param = _this.getSearchQuery();
_this.getTableData(param)
},
Search(){
let _this = this;
_this.form.callTime = this.formatDate();
_this.page.currentPage = 1;
let searchObj = {
"_index": 1,
"_size": _this.page.pageSize,
'roleId': _this.roleId,
'currentBankId': _this.bankBranchId,
"bankBranchId": _this.form.bankBranchId,
"callTime": _this.form.callTime,
};
this.getTableData(searchObj);
},
// 获取当前查询参数
getSearchQuery() {
let _this = this;
let searchObj = {
"_index": _this.page.currentPage,
"_size": _this.page.pageSize,
'roleId': _this.roleId,
'currentBankId': _this.bankBranchId
};
for (let key in _this.form) {
if (_this.form[key]) {
searchObj[key] = _this.form[key];
}
}
return searchObj;
},
formatDate() {
let _this = this;
let date = _this.form.callTime;
if (date) {
date = this.moment(date).format('YYYY-MM-DD HH:mm:ss');
date = date.split(' ')[0];
}
return date;
},
openDetails(row) {
let _this = this;
_this.$https({
method: 'get',
url: 'demandInfo/getById?id='+row.id,
authType: this.backToken
}).then((res) => {
_this.listform = res.data;
}, (error) => {
console.log(error)
}
)
this.FormVisible = true;
},
exportExcel () {
if(!this.form.callTime || this.form.callTime==""){
this.form.callTime = "";
}else{
this.form.callTime = this.form.callTime;
}
window.location.href= this.$baseUrl+'demandInfo/demandInfoDownload?bankBranchId='+this.form.bankBranchId+
'&callTime='+this.form.callTime+'&type=2&roleId='+this.roleId+'¤tBankId='+this.bankBranchId;
},
}
}
</script>
<style lang="less">
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover {
background-color: rgba(144,147,153,0.4)!important;
}
</style>
<style lang="less">
@import '../../style/common';
.callHistory{
.head_box{
h6{
font-size:14px;
font-weight:400;
color:rgba(0,0,0,0.65);
}
h4{
font-size:20px;
font-weight:500;
color:rgba(0,0,0,0.85);
}
}
.content_box{
.input_box{
width: 100%;
min-width: 815px;
margin-bottom: 30px;
.el-input, .el-select{
max-width:272px;
/*height:32px;*/
background:rgba(255,255,255,1);
border-radius:4px;
.el-input__inner{
height:32px;
}
.el-input__suffix{
height: 110%;
}
.el-input--suffix .el-input__inner {
padding-right: 0px;
}
}
.btn_form_search, .btn_form_add{
height: 32px;
text-align: center;
padding: 0 15px;
}
.el-input__icon.el-icon-date{
line-height: 32px;
}
}
/*列表*/
.scrool {
width: 100%;
/*width: calc(100% + 15px);*/
height: calc(100% - 100px);
overflow-x: hidden;
overflow-y: scroll;
.el-table {
.el-table__header-wrapper {
.el-table__header {
.has-gutter tr th {
background: rgba(250, 250, 250, 1);
}
}
}
.el-table__body-wrapper {
.el-table__body {
height: calc(100% - 48px);
overflow-x: hidden;
overflow-y: auto;
}
table tbody tr:hover{
cursor:pointer;
}
table tbody tr td {
padding: 6px 0px;
.cell {
max-height: 94px !important;
overflow: hidden !important;
}
}
}
}
}
/*!*弹窗*!*/
.el-dialog{
width: 600px;
background:rgba(255,255,255,1);
box-shadow:0px 4px 12px 0px rgba(0,0,0,0.2);
border-radius:4px;
margin-top: 10vh!important;
.el-dialog__header{
padding: 10px;
border-bottom: 1px solid rgba(0,0,0,0.09);
.el-dialog__headerbtn {
top: 11px!important;
}
}
.el-dialog__body{
padding: 0px!important;
border: 1px solid transparent;
.form_box{
padding-bottom: 40px;
.el-form {
margin-bottom: 20px;
border: 1px solid transparent;
.el-form-item{
margin: 10px 50px 20px;
.el-form-item__label{
line-height: 25px;
}
.el-form-item__content{
line-height: 25px;
}
}
.el-input{
width: 100%;
}
}
.dialog-footer{
border-top: 1px solid rgba(0,0,0,0.09);
padding-top: 8px;
.el-button{
margin-right: 10px;
padding: 8px 16px;
}
}
}
}
}
}
}
</style>