telephone-clients 3.0.103-63 → 3.0.103-65

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,730 +1,741 @@
1
- <template>
2
- <div id="stand-work-list" class="flex bg-white p-10">
3
- <div class="span">
4
- <criteria-paged :model="model" v-ref:paged>
5
- <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
9
- <label class="font_normal_body" style="width: 40%">工单编号</label>
10
- <input type="text" class="input_search" v-model="model.f_service_id" placeholder='工单编号'
11
- condition="tswo.f_service_id like '%{}%'"
12
- :size="model.f_service_id ? model.f_service_id.length : 6">
13
- </div>
14
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
15
- <label class="font_normal_body" style="width: 40%">工单类型</label>
16
- <v-select :value.sync="model.f_workorder_type" :value-single="true" v-model="model.f_workorder_type"
17
- :options='$parent.$parent.serviceorders' placeholder='工单类型'
18
- condition="tswo.f_workorder_type like '%{}%'"
19
- close-on-select>
20
- </v-select>
21
- </div>
22
- <div class="col-sm-3 form-group form-input-group" style="width: 20%;">
23
- <label class="font_normal_body" style="width: 40%">客户姓名</label>
24
- <input type="text" class="input_search" v-model="model.f_user_name" placeholder='客户姓名'
25
- condition="tswo.f_user_name like '%{}%'"
26
- :size="model.f_user_name ? model.f_user_name.length : 6">
27
- </div>
28
- <div class="form-group col-sm-6 button-range" style="margin-right: 10px">
29
- <button class="button_search button_spacing" style="margin-right: 9px"
30
- @click="search(),$dispatch('search')">查询
31
- </button>
32
-
33
-
34
- <export-excel-tel
35
- :data="$parent.$parent.searchData"
36
- :field="$parent.$parent.excelHeaders"
37
- sqlurl="rs/logic/telephoneExport"
38
- sql-name="serviceDetails"
39
- template-name='工单详情导出'
40
- :choose-col="true">
41
- </export-excel-tel>
42
-
43
- <div style="float: right" class="button_spacing"
44
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
45
- @click="$parent.$parent.hidden()"></div>
46
-
47
- </div>
48
- </div>
49
- <div class="row" v-show="$parent.$parent.criteriaShow">
50
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
51
- <label class="font_normal_body" style="width: 40%">客户编号</label>
52
- <input type="text" class="input_search" v-model="model.f_userinfo_code" placeholder='客户编号'
53
- condition="tswo.f_userinfo_code like '%{}%'"
54
- :size="model.f_userinfo_code ? model.f_userinfo_code.length : 6">
55
- </div>
56
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
57
- <label class="font_normal_body" style="width: 40%">派单时间</label>
58
- <datepicker placeholder="起始派单时间"
59
- :value.sync="model.f_created_date"
60
- v-model="model.f_created_date"
61
- :format="'yyyy-MM-dd 00:00:00'"
62
- condition="f_created_date > '{}'"
63
- ></datepicker>
64
- </div>
65
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
66
- <label class="font_normal_body" style="width: 40%">派单时间</label>
67
- <datepicker placeholder="终止派单时间"
68
- :value.sync="model.f_created_enddate"
69
- v-model="model.f_created_enddate"
70
- :format="'yyyy-MM-dd 23:59:59'"
71
- condition="f_created_date < '{}'"
72
- ></datepicker>
73
- </div>
74
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
75
- <label class="font_normal_body" style="width: 40%">来电电话</label>
76
- <input type="text" class="input_search" v-model="model.f_phone" placeholder='来电电话'
77
- condition="tswo.f_phone like '%{}%'"
78
- :size="model.f_phone ? model.f_phone.length : 6">
79
- </div>
80
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
81
- <label class="font_normal_body" style="width: 40%">联系电话</label>
82
- <input type="text" class="input_search" v-model="model.f_contact_phone" placeholder='联系电话'
83
- condition="tswo.f_contact_phone like '%{}%'"
84
- :size="model.f_contact_phone ? model.f_contact_phone.length : 6">
85
- </div>
86
- </div>
87
-
88
-
89
- <div class="row" v-show="$parent.$parent.criteriaShow">
90
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
91
- <label class="font_normal_body" style="width: 40%">地&emsp;&emsp;址</label>
92
- <input type="text" class="input_search" v-model="model.f_address" placeholder='地址'
93
- condition="tswo.f_address like '%{}%'"
94
- :size="model.f_address ? model.f_address.length : 4">
95
- </div>
96
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
97
- <label class="font_normal_body" style="width: 40%">接单站点</label>
98
- <input type="text" class="input_search" v-model="model.f_outlets" placeholder='接单站点'
99
- condition="tswo.f_outlets like '%{}%'"
100
- :size="model.f_outlets ? model.f_outlets.length : 6">
101
- </div>
102
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
103
- <label class="font_normal_body" style="width: 40%">完成时间</label>
104
- <datepicker placeholder="维修完成时间"
105
- :value.sync="model.f_date_start"
106
- v-model="model.f_date_start"
107
- :format="'yyyy-MM-dd 00:00:00'"
108
- condition="f_date > '{}'"
109
- ></datepicker>
110
- </div>
111
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
112
- <label class="font_normal_body" style="width: 40%">完成时间</label>
113
- <datepicker placeholder="维修完成时间"
114
- :value.sync="model.f_date_end"
115
- v-model="model.f_date_end"
116
- :format="'yyyy-MM-dd 23:59:59'"
117
- condition="f_date < '{}'"
118
- ></datepicker>
119
- </div>
120
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
121
- <label class="font_normal_body" style="width: 40%">话&ensp;务&ensp;员</label>
122
- <input type="text" class="input_search" v-model="model.f_attendant" placeholder='话务员'
123
- condition="tswo.f_attendant like '%{}%'"
124
- :size="model.f_attendant ? model.f_attendant.length : 6">
125
- </div>
126
- </div>
127
- <div class="row" v-show="$parent.$parent.criteriaShow">
128
- <div class="col-sm-6 form-group form-input-group" style="width: 40%">
129
- <role-selector-tel
130
- role-name="维修员"
131
- role-lable="维&nbsp;修&nbsp;员"
132
- @re-res="$parent.$parent.getRes"
133
- :value.sync="model.f_checker_id"
134
- v-model="model.f_checker_id"
135
- condition="tswo.f_order_man = '{}'">
136
- </role-selector-tel>
137
- </div>
138
- <!-- <div class="col-sm-3 form-group form-input-group" style="width: 20%">-->
139
- <!-- <label class="font_normal_body" style="width: 40%">接&ensp;单&ensp;员</label>-->
140
- <!-- <input type="text" class="input_search" v-model="model.f_order_man" placeholder='接单员'-->
141
- <!-- condition="tswo.f_order_man like '%{}%'"-->
142
- <!-- :size="model.f_order_man ? model.f_order_man.length : 6">-->
143
- <!-- </div>-->
144
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
145
- <label class="font_normal_body" style="width: 40%">工单来源</label>
146
- <v-select :value.sync="model.f_source" v-model='model.f_source'
147
- :value-single="true"
148
- :options='$parent.$parent.sources' placeholder='工单来源'
149
- close-on-select
150
- condition="tswo.f_source = '{}'"></v-select>
151
- </div>
152
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
153
- <label class="font_normal_body" style="width: 40%">工单状态</label>
154
- <v-select :value.sync="model.defname" v-model='model.defname'
155
- :value-single="true"
156
- :options='$parent.$parent.defnames' placeholder='工单状态'
157
- condition="sa.defname = '{}'"
158
- close-on-select></v-select>
159
- </div>
160
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
161
- <label class="font_normal_body" style="width: 40%" >报修类型</label>
162
- <v-select :value.sync="model.f_repairtype" :value-single="true" v-model="model.f_repairtype"
163
- :options='$parent.$parent.repairstypes' placeholder='报修类型'
164
- condition="f_repairtype like '%{}%'"
165
- close-on-select>
166
- </v-select>
167
- </div>
168
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
169
- <label class="font_normal_body" style="width: 40%">派单类型</label>
170
- <v-select :value.sync="model.f_handlingtype" :value-single="true" v-model="model.f_handlingtype"
171
- :options='$parent.$parent.handling_types' placeholder='派单类型'
172
- condition="tswo.f_handlingtype like '%{}%'"
173
- close-on-select>
174
- </v-select>
175
- </div>
176
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
177
- <label class="font_normal_body" style="width: 40%">工单结果</label>
178
- <v-select :value.sync="model.f_result_status" :value-single="true" v-model="model.f_result_status"
179
- :options='$parent.$parent.result_status' placeholder='工单结果'
180
- condition="tsw.f_result_status = '{}'"
181
- close-on-select>
182
- </v-select>
183
- </div>
184
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
185
- <label class="font_normal_body" style="width: 40%">派&ensp;单&ensp;员</label>
186
- <input type="text" class="input_search" v-model="model.f_single_man" placeholder='派单员'
187
- condition="tswo.f_single_man like '%{}%'"
188
- :size="model.f_single_man ? model.f_single_man.length : 6">
189
- </div>
190
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
191
- <label class="font_normal_body" style="width: 40%">客户类型</label>
192
- <v-select :value.sync="model.f_user_type" :value-single="true" v-model="model.f_user_type"
193
- :options='$parent.$parent.user_types' placeholder='客户类型'
194
- condition="tswo.f_user_type = '{}'"
195
- close-on-select>
196
- </v-select>
197
- </div>
198
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
199
- <label class="font_normal_body" style="width: 40%">维修类型</label>
200
- <input type="text" class="input_search" v-model="model.f_failure" placeholder='维修类型'
201
- condition="tf.f_failure like '%{}%'" style="width: 150px"
202
- >
203
- </div>
204
- </div>
205
- </div>
206
- </criteria>
207
-
208
- <data-grid partial='list' v-ref:grid :model="model" class="list_area table_sy">
209
- <template partial='head'>
210
- <tr>
211
- <th>
212
- <nobr>序号</nobr>
213
- </th>
214
- <th>
215
- <nobr>回访</nobr>
216
- </th>
217
- <th>
218
- <nobr>工单类型</nobr>
219
- </th>
220
- <!--<th><nobr>报修类型</nobr></th>-->
221
- <th>
222
- <nobr>工单编号</nobr>
223
- </th>
224
- <th>
225
- <nobr>派单时间</nobr>
226
- </th>
227
-
228
- <th>
229
- <nobr>客户信息</nobr>
230
- </th>
231
- <th>
232
- <nobr>联系电话</nobr>
233
- </th>
234
- <th>
235
- <nobr>故障明细</nobr>
236
- </th>
237
- <th>
238
- <nobr>工单状态</nobr>
239
- </th>
240
- <th>
241
- <nobr>派单人</nobr>
242
- </th>
243
- <th>
244
- <nobr>话务员</nobr>
245
- </th>
246
- <th>
247
- <nobr>接单员</nobr>
248
- </th>
249
- <th>
250
- <nobr>结单时间</nobr>
251
- </th>
252
- <th>
253
- <nobr>到达时间</nobr>
254
- </th>
255
- <th>
256
- <nobr>离开时间</nobr>
257
- </th>
258
-
259
- <th>
260
- <nobr>逾期状态</nobr>
261
- </th>
262
- <th>
263
- <nobr>截止时间</nobr>
264
- </th>
265
- <th>
266
- <nobr>工单结果</nobr>
267
- </th>
268
- <th>
269
- <nobr>客户类型</nobr>
270
- </th>
271
- <th>
272
- <nobr>维修类型</nobr>
273
- </th>
274
- <th>
275
- <nobr>派单类型</nobr>
276
- </th>
277
- </tr>
278
- </template>
279
- <template partial='body'>
280
- <td style="text-align: center;">
281
- <nobr>{{ $index + 1 }}</nobr>
282
- </td>
283
- <td style="text-align: center;">
284
- <nobr v-if="row.f_phone&&row.f_again_revisit!='否'">
285
- <button-link type="button" class="btn btn-link"
286
- @click="$parent.$parent.$parent.playWav(row.f_phone,row)">回访
287
- </button-link>
288
- </nobr>
289
- <nobr v-if="(!row.f_phone)||row.f_again_revisit=='否'">回访</nobr>
290
- </td>
291
- <td style="text-align: center;">
292
- <nobr>{{ row.f_workorder_type }}</nobr>
293
- </td>
294
-
295
- <td style="text-align: center;">
296
- <nobr>{{ row.f_service_id }}</nobr>
297
- </td>
298
- <td style="text-align: center;">
299
- <nobr>{{ row.f_created_date }}</nobr>
300
- </td>
301
-
302
- <td>
303
- <nobr>
304
- {{ row.f_user_name }}&nbsp;&nbsp;&nbsp;{{ row.f_address }}&nbsp;&nbsp;&nbsp;
305
- </nobr>
306
- </td>
307
- <td style="text-align: center;">
308
- <nobr>{{ row.f_contact_phone }}</nobr>
309
- </td>
310
- <td>
311
- <nobr>{{ $parent.$parent.$parent.trouble(row.failure) }}</nobr>
312
- </td>
313
- <td style="text-align: center;">
314
- <nobr>
315
- <!-- row.defname ?row.defname: (row.f_state === '撤销' ? '撤销' : '完成')-->
316
- {{ row.f_state ?row.f_state:(row.defname ?row.defname:'完成')}}
317
- </nobr>
318
- </td>
319
- <td style="text-align: center;">
320
- <nobr>{{ row.f_single_man }}</nobr>
321
- </td>
322
- <td style="text-align: center;">
323
- <nobr>{{ row.f_attendant }}</nobr>
324
- </td>
325
- <td style="text-align: center;">
326
- <nobr>{{ row.f_order_man }} {{ row.f_repairman_phone }}</nobr>
327
- </td>
328
- <td style="text-align: center;">
329
- <nobr>{{ row.f_date }}</nobr>
330
- </td>
331
- <td style="text-align: center;">
332
- <nobr>{{ row.f_date_come }}</nobr>
333
- </td>
334
- <td style="text-align: center;">
335
- <nobr>{{ row.f_date_leave }}</nobr>
336
- </td>
337
-
338
- <td style="text-align: center;">
339
- <nobr>{{ $parent.$parent.$parent.d1(row)}}</nobr>
340
- </td>
341
- <td style="text-align: center;">
342
- <nobr>{{ row.f_finish_date == '1900-01-01 00:00:00' ? '' : row.f_finish_date }}</nobr>
343
- </td>
344
- <td style="text-align: center;">
345
- <nobr>{{ row.f_result_status }}</nobr>
346
- </td>
347
- <td style="text-align: center;">
348
- <nobr>{{ row.f_user_type }}</nobr>
349
- </td>
350
- <td style="text-align: center;">
351
- <nobr>{{ row.f_failure }}</nobr>
352
- </td>
353
- <td style="text-align: center;">
354
- <nobr>{{ row.f_handlingtype }}</nobr>
355
- </td>
356
- </template>
357
- </data-grid>
358
- </criteria-paged>
359
- </div>
360
- <!--打印-->
361
- <modal :show.sync="printshow" v-ref:modal backdrop="false">
362
- <header slot="modal-header" class="modal-header text-center">
363
- <h4 class="modal-title">打印列选择</h4>
364
- <input type="checkbox" class="" id="f_generations" v-model="all">
365
- <label for="f_generations" class="font-size">全选</label>
366
- </header>
367
- <article slot="modal-body">
368
- <div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">
369
- <div class="col-sm-3" v-for="f in fields">
370
- <input type="checkbox" class="" :id="'water-owe-details-'+$index" v-model="modelval" :value="$key">
371
- <label :for="'water-owe-details-'+$index" class="font-size">{{ f }}</label>
372
- </div>
373
- </div>
374
- </article>
375
- <footer slot="modal-footer" class="modal-footer">
376
- <center>
377
- <button v-show="printshow" type="button" class="btn btn-default" @click='close()'>取消</button>
378
- <button v-show="printshow" type="button" class="btn btn-success" @click='print()'>打印</button>
379
- <print-table :model='model' v-show="false" v-ref:print
380
- :top='40' :left='60' :right='40' :bottom='60'
381
- :thead="thead" :tfoot='tfoot' :attach="yangsen"
382
- :fields="modelval">
383
- </print-table>
384
- </center>
385
- </footer>
386
- </modal>
387
- </div>
388
- <modal :show.sync="showVisit" v-ref:modal backdrop="false">
389
- <header slot="modal-header" class="modal-header">
390
- </header>
391
- <article slot="modal-body" class="modal-body">
392
- <visit-info v-if="showVisit" :row="visitrow" :phone="wavflie"
393
- @show-obj="watchShow"></visit-info>
394
- </article>
395
- <footer slot="modal-footer" class="modal-footer">
396
- </footer>
397
- </modal>
398
- <modal :show.sync="imgshow" v-ref:modal backdrop="true">
399
- <header slot="modal-header" class="modal-header">
400
- 在线抢修照片
401
- </header>
402
- <article slot="modal-body" class="modal-body">
403
- <div class="from-group">
404
- <img-self :src="imgfilename" width="500" height="500"></img-self>
405
- </div>
406
- </article>
407
- <footer slot="modal-footer" class="modal-footer">
408
- <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
409
- </footer>
410
- </modal>
411
- </template>
412
-
413
- <script>
414
- import {PagedList} from 'vue-client'
415
- import DelayReply from '../../../components/pc/DelayReply'
416
- import defaultPrint from '../../../components/pc/config/DefaultPrint'
417
- import {HttpResetClass} from 'vue-client'
418
-
419
- export default {
420
- title: '工单列表',
421
- data () {
422
- return {
423
- orgstrs: [{label: '全部', value: ''}],
424
- editflag: null,
425
- showVisit: false,
426
- outltime: this.getNowFormatDate(),
427
- wavflie: '',
428
- selectone: '',
429
- model: new PagedList('rs/sql/serviceDetails', 20),
430
- row: null,
431
- orderMan: '',
432
- user_types:[{label: '全部', value: ''}, {label: '民用', value: '民用'},{label: '非民用', value: '非民用'}],
433
- handling_types:[{label: '全部', value: ''}, {label: '转站点', value: '转站点'},{label: '转维修员', value: '转维修员'},{label: '转运营系统', value: '转运营系统'}],
434
- msgs: [],
435
- service: Object,
436
- pendingCount: 0,
437
- // 打印
438
- all: false,
439
- modelval: [],
440
- visitrow: {},
441
- printshow: false,
442
- imgshow: false,
443
- imgfilename: '',
444
- fields: {},
445
- thead: '',
446
- tfoot: '',
447
- zhihuans: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '异常', value: '异常'}],
448
- headData: ['工单类型', '工单编号', '派单时间','客户信息', '联系电话', '故障明细', '工单状态', '派单人', '话务员','接单员',
449
- '结单时间','到达时间', '离开时间','逾期状态','截止时间','工单结果','派单类型'],
450
- bodyData: ['f_workorder_type', 'f_service_id', 'f_created_date', 'f_customer_info_show','f_contact_phone', 'f_json',
451
- 'f_state_show', 'f_single_man','f_attendant','f_order_man','f_date','f_date_come','f_date_leave',
452
- 'f_overdue_show','f_finish_time_show','f_result_status','f_handlingtype'],
453
- searchData: {
454
- condition: '1=1'
455
- },
456
- excelHeaders: {
457
- 'f_workorder_type': '工单类型',
458
- 'f_service_id': '工单编号',
459
- 'f_created_date': '派单时间',
460
- 'f_customer_info_show': '客户信息',
461
- 'f_contact_phone': '联系电话',
462
- 'f_json': '故障明细',
463
- 'f_state_show': '工单状态',
464
- 'f_single_man': '派单人',
465
- 'f_attendant': '话务员',
466
- 'f_order_man': '接单员',
467
- 'f_date': '结单时间',
468
- 'f_date_come': '到达时间',
469
- 'f_date_leave': '离开时间',
470
- 'f_overdue_show': '逾期状态',
471
- 'f_finish_time_show': '截止时间',
472
- 'f_result_status': '工单结果',
473
- 'f_user_type': '客户类型',
474
- 'f_failure': '维修类型',
475
- 'f_handlingtype': '派单类型'
476
- },
477
- criteriaShow: false
478
- }
479
- },
480
- props: {
481
- user: {
482
- type: Object
483
- },
484
- sum: 0,
485
- maintenance: [],
486
-
487
- serviceId: '',
488
-
489
- defname: {
490
- type: String
491
- },
492
- systemshow: {
493
- type: Boolean,
494
- default: false
495
- }
496
- },
497
- ready () {
498
- this.selfSearch()
499
- console.log(this.model)
500
- },
501
- watch: {
502
- 'all' (val) {
503
- if (val) {
504
- this.modelval = this.bodyData
505
- } else {
506
- this.modelval = defaultPrint.config
507
- this.put()
508
- }
509
- },
510
- 'modelval.length' () {
511
- this.put()
512
- },
513
- 'serviceId' () {
514
- this.selfSearch()
515
- },
516
- 'sum' (val) {
517
- this.selfSearch()
518
- //this.model.search()
519
- }
520
- },
521
- methods: {
522
- d1(row){
523
- return row.f_workorder_type == '报修单'?(row.f_result_status == '已完成'?(this.datejisuan(row.f_finish_date,row.f_date)<0?'已逾期':'未逾期'):(this.datejisuan(row.f_finish_date,this.getNowFormatDate())<0?'已逾期':'未逾期')):''
524
- },
525
- d2(row){
526
- const result = row.f_workorder_type == '报修单'?(row.f_result_status == '已完成'?(this.datejisuan(row.f_finish_date,row.f_date)<0?this.formatDuring(new Date(row.f_date).getTime(),new Date(row.f_finish_date).getTime()):'未逾期'):(this.datejisuan(row.f_finish_date,'')<0?this.formatDuring(new Date().getTime(),new Date(row.f_finish_date).getTime()):'未逾期')):''
527
- if (result == '未逾期' && row.f_finish_date == '1900-01-01 00:00:00'){
528
- return ''
529
- }
530
- return result
531
- },
532
- datejisuan(a,b){
533
- if (a && b && a != '1900-01-01 00:00:00'){
534
- return new Date(a).getTime()-new Date(b).getTime()
535
- }else {
536
- return ''
537
- }
538
- },
539
- getNowFormatDate () {
540
- var date = new Date()
541
- var seperator1 = '-'
542
- var seperator2 = ':'
543
- var month = date.getMonth() + 1
544
- var strDate = date.getDate()
545
- var hour = date.getHours()
546
- var min = date.getMinutes()
547
- var second = date.getSeconds()
548
- if (month >= 1 && month <= 9) {
549
- month = '0' + month
550
- }
551
- if (strDate >= 0 && strDate <= 9) {
552
- strDate = '0' + strDate
553
- }
554
- if (hour >= 0 && hour <= 9) {
555
- hour = '0' + hour
556
- }
557
- if (min >= 0 && min <= 9) {
558
- min = '0' + min
559
- }
560
- if (second >= 0 && second <= 9) {
561
- second = '0' + second
562
- }
563
- var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
564
- + ' ' + hour + seperator2 + min
565
- + seperator2 + second
566
- return currentdate
567
- },
568
- watchShow (val) {
569
- this.visitrow = {}
570
- this.showVisit = val
571
- this.selfSearch()
572
- },
573
- playWav (val, val2) {
574
- //tag
575
- this.wavflie = val
576
- this.visitrow = val2
577
- this.showVisit = true
578
- },
579
- showpicture (val) {
580
- //tag
581
- //tag)
582
- this.imgshow = true
583
- this.imgfilename = 'rs/image/file/' + val.f_single_path
584
- },
585
- imgclose () {
586
- this.imgshow = false
587
- },
588
- yccolor (val) {
589
- if (val == '异常') {
590
- return 'color:red'
591
- }
592
- return ''
593
- },
594
-
595
- search (args) {
596
-
597
- if (this.f_filialeids) {
598
- args.condition += ` and f_filiale_id in ${this.f_filialeids}`
599
- } else {
600
- args.condition += ` and f_filiale_id = '${this.$login.f.orgid}'`
601
- }
602
-
603
- this.searchData.condition = args.condition
604
- return this.model.search(args.condition, args.model)
605
- },
606
- selfSearch () {
607
- // 取消编辑状态
608
- let condition = '1=1'
609
-
610
- if (this.f_filialeids) {
611
- condition += ` and f_filiale_id in ${this.f_filialeids}`
612
- //tag
613
- } else {
614
- condition += ` and f_filiale_id = '${this.$login.f.orgid}'`
615
- }
616
- return this.model.search(condition)
617
- },
618
-
619
- // 发送数据给业务逻辑,并刷新界面
620
-
621
- // 是否可以退回
622
-
623
- trouble (val) {
624
- let failureall=''
625
- // val=[{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""},{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""},{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""}]
626
-
627
- let failure = JSON.parse(val)
628
- for (let i = 0; i <failure.length; i++) {
629
- if (failure[i].failurecase.length>0){
630
- failureall+=failure[i].f_failure_type+":"
631
- for (let j = 0; j < failure[i].failurecase.length; j++) {
632
- failureall+=failure[i].failurecase[j]
633
- if (j+1!=failure[i].failurecase.length){
634
- failureall+=","
635
- }
636
- }
637
-
638
- }else{
639
- failureall+=failure[i].f_failure_type
640
- }
641
- if (i+1!=failure.length){
642
- failureall+=';'
643
- }
644
- }
645
- return failureall
646
- },
647
- // 打印
648
- stamp () {
649
- this.all = false
650
- // 默认选择要打印的列
651
- this.modelval = defaultPrint.config
652
- this.fields = this.getfield
653
- this.printshow = true
654
- this.put()
655
- },
656
- put () {
657
- // 对Modelval进行排序
658
- this.sortModelval()
659
- this.thead = `<tr><th colspan=${this.modelval.length}>工单详情报表</th></tr><tr>`
660
- for (let key of this.modelval) {
661
- this.thead += '<th>' + this.fields[key] + '</th>'
662
- }
663
- this.thead += '</tr>'
664
- },
665
- print () {
666
- this.$refs.print.PrintAsFile()
667
- this.printshow = false
668
- },
669
- close () {
670
- this.printshow = false
671
- this.all = false
672
- },
673
- // 对选择的列进行排序
674
- sortModelval () {
675
- let sortModel = []
676
- Object.keys(this.fields).forEach((key) => {
677
- if (this.modelval.includes(key)) {
678
- sortModel.push(key)
679
- }
680
- })
681
- this.modelval = sortModel
682
- },
683
- hidden () {
684
- this.criteriaShow = !this.criteriaShow
685
- },
686
- getRes (obj) {
687
- //tag
688
- ////tag)
689
- this.f_filialeids = this.$login.convertToIn(obj.resids)
690
- //tag
691
- },
692
- formatDuring (s1,s2) {
693
- var millisecond = s1-s2
694
- var days = parseInt(millisecond / (1000 * 60 * 60 * 24))
695
- var hours = parseInt((millisecond % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
696
- var minutes = parseInt((millisecond % (1000 * 60 * 60)) / (1000 * 60))
697
- var seconds = parseInt((millisecond % (1000 * 60)) / 1000)
698
- return days + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒"
699
- }
700
-
701
- },
702
- computed: {
703
- result_status(){
704
- return this.$appdata.getParam('呼叫工单结果')?[{label: '全部', value: ''}, ...this.$appdata.getParam('呼叫工单结果')] : [{label: '全部', value: ''}]
705
- },
706
- defnames () {
707
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('呼叫工单状态')]
708
- },
709
- repairstypes () {
710
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('报修全部类型')]
711
- },
712
- serviceorders () {
713
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单类型')]
714
- },
715
- sources () {
716
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单来源')]
717
- },
718
- getfield () {
719
- let data = {}
720
- this.bodyData.forEach((value, index) => {
721
- data[this.bodyData[index]] = this.headData[index]
722
- })
723
- return data
724
- }
725
- },
726
- components: {
727
- 'delay-reply': DelayReply
728
- }
729
- }
730
- </script>
1
+ <template>
2
+ <div id="stand-work-list" class="flex bg-white p-10">
3
+ <div class="span">
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
9
+ <label class="font_normal_body" style="width: 40%">工单编号</label>
10
+ <input type="text" class="input_search" v-model="model.f_service_id" placeholder='工单编号'
11
+ condition="tswo.f_service_id like '%{}%'"
12
+ :size="model.f_service_id ? model.f_service_id.length : 6">
13
+ </div>
14
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
15
+ <label class="font_normal_body" style="width: 40%">工单类型</label>
16
+ <v-select :value.sync="model.f_workorder_type" :value-single="true" v-model="model.f_workorder_type"
17
+ :options='$parent.$parent.serviceorders' placeholder='工单类型'
18
+ condition="tswo.f_workorder_type like '%{}%'"
19
+ close-on-select>
20
+ </v-select>
21
+ </div>
22
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%;">
23
+ <label class="font_normal_body" style="width: 40%">客户姓名</label>
24
+ <input type="text" class="input_search" v-model="model.f_user_name" placeholder='客户姓名'
25
+ condition="tswo.f_user_name like '%{}%'"
26
+ :size="model.f_user_name ? model.f_user_name.length : 6">
27
+ </div>
28
+ <div class="form-group col-sm-6 button-range" style="margin-right: 10px">
29
+ <button class="button_search button_spacing" style="margin-right: 9px"
30
+ @click="search(),$dispatch('search')">查询
31
+ </button>
32
+
33
+
34
+ <export-excel-tel
35
+ :data="$parent.$parent.searchData"
36
+ :field="$parent.$parent.excelHeaders"
37
+ sqlurl="rs/logic/telephoneExport"
38
+ sql-name="serviceDetails"
39
+ template-name='工单详情导出'
40
+ :choose-col="true">
41
+ </export-excel-tel>
42
+
43
+ <div style="float: right" class="button_spacing"
44
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
45
+ @click="$parent.$parent.hidden()"></div>
46
+
47
+ </div>
48
+ </div>
49
+ <div class="row" v-show="$parent.$parent.criteriaShow">
50
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
51
+ <label class="font_normal_body" style="width: 40%">客户编号</label>
52
+ <input type="text" class="input_search" v-model="model.f_userinfo_code" placeholder='客户编号'
53
+ condition="tswo.f_userinfo_code like '%{}%'"
54
+ :size="model.f_userinfo_code ? model.f_userinfo_code.length : 6">
55
+ </div>
56
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
57
+ <label class="font_normal_body" style="width: 40%">派单时间</label>
58
+ <datepicker placeholder="起始派单时间"
59
+ :value.sync="model.f_created_date"
60
+ v-model="model.f_created_date"
61
+ :format="'yyyy-MM-dd 00:00:00'"
62
+ condition="f_created_date > '{}'"
63
+ ></datepicker>
64
+ </div>
65
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
66
+ <label class="font_normal_body" style="width: 40%">派单时间</label>
67
+ <datepicker placeholder="终止派单时间"
68
+ :value.sync="model.f_created_enddate"
69
+ v-model="model.f_created_enddate"
70
+ :format="'yyyy-MM-dd 23:59:59'"
71
+ condition="f_created_date < '{}'"
72
+ ></datepicker>
73
+ </div>
74
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
75
+ <label class="font_normal_body" style="width: 40%">来电电话</label>
76
+ <input type="text" class="input_search" v-model="model.f_phone" placeholder='来电电话'
77
+ condition="tswo.f_phone like '%{}%'"
78
+ :size="model.f_phone ? model.f_phone.length : 6">
79
+ </div>
80
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
81
+ <label class="font_normal_body" style="width: 40%">联系电话</label>
82
+ <input type="text" class="input_search" v-model="model.f_contact_phone" placeholder='联系电话'
83
+ condition="tswo.f_contact_phone like '%{}%'"
84
+ :size="model.f_contact_phone ? model.f_contact_phone.length : 6">
85
+ </div>
86
+ </div>
87
+
88
+
89
+ <div class="row" v-show="$parent.$parent.criteriaShow">
90
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
91
+ <label class="font_normal_body" style="width: 40%">地&emsp;&emsp;址</label>
92
+ <input type="text" class="input_search" v-model="model.f_address" placeholder='地址'
93
+ condition="tswo.f_address like '%{}%'"
94
+ :size="model.f_address ? model.f_address.length : 4">
95
+ </div>
96
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
97
+ <label class="font_normal_body" style="width: 40%">接单站点</label>
98
+ <input type="text" class="input_search" v-model="model.f_outlets" placeholder='接单站点'
99
+ condition="tswo.f_outlets like '%{}%'"
100
+ :size="model.f_outlets ? model.f_outlets.length : 6">
101
+ </div>
102
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
103
+ <label class="font_normal_body" style="width: 40%">完成时间</label>
104
+ <datepicker placeholder="维修完成时间"
105
+ :value.sync="model.f_date_start"
106
+ v-model="model.f_date_start"
107
+ :format="'yyyy-MM-dd 00:00:00'"
108
+ condition="f_date > '{}'"
109
+ ></datepicker>
110
+ </div>
111
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
112
+ <label class="font_normal_body" style="width: 40%">完成时间</label>
113
+ <datepicker placeholder="维修完成时间"
114
+ :value.sync="model.f_date_end"
115
+ v-model="model.f_date_end"
116
+ :format="'yyyy-MM-dd 23:59:59'"
117
+ condition="f_date < '{}'"
118
+ ></datepicker>
119
+ </div>
120
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
121
+ <label class="font_normal_body" style="width: 40%">话&ensp;务&ensp;员</label>
122
+ <input type="text" class="input_search" v-model="model.f_attendant" placeholder='话务员'
123
+ condition="tswo.f_attendant like '%{}%'"
124
+ :size="model.f_attendant ? model.f_attendant.length : 6">
125
+ </div>
126
+ </div>
127
+ <div class="row" v-show="$parent.$parent.criteriaShow">
128
+ <div class="col-sm-6 form-group form-input-group" style="width: 40%">
129
+ <role-selector-tel
130
+ role-name="维修员"
131
+ role-lable="维&nbsp;修&nbsp;员"
132
+ @re-res="$parent.$parent.getRes"
133
+ :value.sync="model.f_checker_id"
134
+ v-model="model.f_checker_id"
135
+ condition="tswo.f_order_man = '{}'">
136
+ </role-selector-tel>
137
+ </div>
138
+ <!-- <div class="col-sm-3 form-group form-input-group" style="width: 20%">-->
139
+ <!-- <label class="font_normal_body" style="width: 40%">接&ensp;单&ensp;员</label>-->
140
+ <!-- <input type="text" class="input_search" v-model="model.f_order_man" placeholder='接单员'-->
141
+ <!-- condition="tswo.f_order_man like '%{}%'"-->
142
+ <!-- :size="model.f_order_man ? model.f_order_man.length : 6">-->
143
+ <!-- </div>-->
144
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
145
+ <label class="font_normal_body" style="width: 40%">工单来源</label>
146
+ <v-select :value.sync="model.f_source" v-model='model.f_source'
147
+ :value-single="true"
148
+ :options='$parent.$parent.sources' placeholder='工单来源'
149
+ close-on-select
150
+ condition="tswo.f_source = '{}'"></v-select>
151
+ </div>
152
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
153
+ <label class="font_normal_body" style="width: 40%">工单状态</label>
154
+ <v-select :value.sync="model.defname" v-model='model.defname'
155
+ :value-single="true"
156
+ :options='$parent.$parent.defnames' placeholder='工单状态'
157
+ condition="sa.defname = '{}'"
158
+ close-on-select></v-select>
159
+ </div>
160
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
161
+ <label class="font_normal_body" style="width: 40%" >报修类型</label>
162
+ <v-select :value.sync="model.f_repairtype" :value-single="true" v-model="model.f_repairtype"
163
+ :options='$parent.$parent.repairstypes' placeholder='报修类型'
164
+ condition="f_repairtype like '%{}%'"
165
+ close-on-select>
166
+ </v-select>
167
+ </div>
168
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
169
+ <label class="font_normal_body" style="width: 40%">派单类型</label>
170
+ <v-select :value.sync="model.f_handlingtype" :value-single="true" v-model="model.f_handlingtype"
171
+ :options='$parent.$parent.handling_types' placeholder='派单类型'
172
+ condition="tswo.f_handlingtype like '%{}%'"
173
+ close-on-select>
174
+ </v-select>
175
+ </div>
176
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
177
+ <label class="font_normal_body" style="width: 40%">工单结果</label>
178
+ <v-select :value.sync="model.f_result_status" :value-single="true" v-model="model.f_result_status"
179
+ :options='$parent.$parent.result_status' placeholder='工单结果'
180
+ close-on-select>
181
+ </v-select>
182
+ </div>
183
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
184
+ <label class="font_normal_body" style="width: 40%">派&ensp;单&ensp;员</label>
185
+ <input type="text" class="input_search" v-model="model.f_single_man" placeholder='派单员'
186
+ condition="tswo.f_single_man like '%{}%'"
187
+ :size="model.f_single_man ? model.f_single_man.length : 6">
188
+ </div>
189
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
190
+ <label class="font_normal_body" style="width: 40%">客户类型</label>
191
+ <v-select :value.sync="model.f_user_type" :value-single="true" v-model="model.f_user_type"
192
+ :options='$parent.$parent.user_types' placeholder='客户类型'
193
+ condition="tswo.f_user_type = '{}'"
194
+ close-on-select>
195
+ </v-select>
196
+ </div>
197
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
198
+ <label class="font_normal_body" style="width: 40%">维修类型</label>
199
+ <input type="text" class="input_search" v-model="model.f_failure" placeholder='维修类型'
200
+ condition="tf.f_failure like '%{}%'" style="width: 150px"
201
+ >
202
+ </div>
203
+ </div>
204
+ </div>
205
+ </criteria>
206
+
207
+ <data-grid partial='list' v-ref:grid :model="model" class="list_area table_sy">
208
+ <template partial='head'>
209
+ <tr>
210
+ <th>
211
+ <nobr>序号</nobr>
212
+ </th>
213
+ <th>
214
+ <nobr>回访</nobr>
215
+ </th>
216
+ <th>
217
+ <nobr>工单类型</nobr>
218
+ </th>
219
+ <!--<th><nobr>报修类型</nobr></th>-->
220
+ <th>
221
+ <nobr>工单编号</nobr>
222
+ </th>
223
+ <th>
224
+ <nobr>派单时间</nobr>
225
+ </th>
226
+
227
+ <th>
228
+ <nobr>客户信息</nobr>
229
+ </th>
230
+ <th>
231
+ <nobr>联系电话</nobr>
232
+ </th>
233
+ <th>
234
+ <nobr>故障明细</nobr>
235
+ </th>
236
+ <th>
237
+ <nobr>工单状态</nobr>
238
+ </th>
239
+ <th>
240
+ <nobr>派单人</nobr>
241
+ </th>
242
+ <th>
243
+ <nobr>话务员</nobr>
244
+ </th>
245
+ <th>
246
+ <nobr>接单员</nobr>
247
+ </th>
248
+ <th>
249
+ <nobr>结单时间</nobr>
250
+ </th>
251
+ <th>
252
+ <nobr>到达时间</nobr>
253
+ </th>
254
+ <th>
255
+ <nobr>离开时间</nobr>
256
+ </th>
257
+
258
+ <th>
259
+ <nobr>逾期状态</nobr>
260
+ </th>
261
+ <th>
262
+ <nobr>截止时间</nobr>
263
+ </th>
264
+ <th>
265
+ <nobr>工单结果</nobr>
266
+ </th>
267
+ <th>
268
+ <nobr>客户类型</nobr>
269
+ </th>
270
+ <th>
271
+ <nobr>维修类型</nobr>
272
+ </th>
273
+ <th>
274
+ <nobr>派单类型</nobr>
275
+ </th>
276
+ <th>
277
+ <nobr>汇总备注</nobr>
278
+ </th>
279
+ </tr>
280
+ </template>
281
+ <template partial='body'>
282
+ <td style="text-align: center;">
283
+ <nobr>{{ $index + 1 }}</nobr>
284
+ </td>
285
+ <td style="text-align: center;">
286
+ <nobr v-if="row.f_phone&&row.f_again_revisit!='否'">
287
+ <button-link type="button" class="btn btn-link"
288
+ @click="$parent.$parent.$parent.playWav(row.f_phone,row)">回访
289
+ </button-link>
290
+ </nobr>
291
+ <nobr v-if="(!row.f_phone)||row.f_again_revisit=='否'">回访</nobr>
292
+ </td>
293
+ <td style="text-align: center;">
294
+ <nobr>{{ row.f_workorder_type }}</nobr>
295
+ </td>
296
+
297
+ <td style="text-align: center;">
298
+ <nobr>{{ row.f_service_id }}</nobr>
299
+ </td>
300
+ <td style="text-align: center;">
301
+ <nobr>{{ row.f_created_date }}</nobr>
302
+ </td>
303
+
304
+ <td>
305
+ <nobr>
306
+ {{ row.f_userinfo_code }}&nbsp;&nbsp;&nbsp;{{ row.f_user_name }}&nbsp;&nbsp;&nbsp;{{ row.f_address }}&nbsp;&nbsp;&nbsp;
307
+ </nobr>
308
+ </td>
309
+ <td style="text-align: center;">
310
+ <nobr>{{ row.f_contact_phone }}</nobr>
311
+ </td>
312
+ <td>
313
+ <nobr>{{ $parent.$parent.$parent.trouble(row.failure) }}</nobr>
314
+ </td>
315
+ <td style="text-align: center;">
316
+ <nobr>
317
+ <!-- row.defname ?row.defname: (row.f_state === '撤销' ? '撤销' : '完成')-->
318
+ {{ row.f_state ?row.f_state:(row.defname ?row.defname:'完成')}}
319
+ </nobr>
320
+ </td>
321
+ <td style="text-align: center;">
322
+ <nobr>{{ row.f_single_man }}</nobr>
323
+ </td>
324
+ <td style="text-align: center;">
325
+ <nobr>{{ row.f_attendant }}</nobr>
326
+ </td>
327
+ <td style="text-align: center;">
328
+ <nobr>{{ row.f_order_man }} {{ row.f_repairman_phone }}</nobr>
329
+ </td>
330
+ <td style="text-align: center;">
331
+ <nobr>{{ row.f_date }}</nobr>
332
+ </td>
333
+ <td style="text-align: center;">
334
+ <nobr>{{ row.f_date_come }}</nobr>
335
+ </td>
336
+ <td style="text-align: center;">
337
+ <nobr>{{ row.f_date_leave }}</nobr>
338
+ </td>
339
+
340
+ <td style="text-align: center;">
341
+ <nobr>{{ $parent.$parent.$parent.d1(row)}}</nobr>
342
+ </td>
343
+ <td style="text-align: center;">
344
+ <nobr>{{ row.f_finish_date == '1900-01-01 00:00:00' ? '' : row.f_finish_date }}</nobr>
345
+ </td>
346
+ <td style="text-align: center;">
347
+ <nobr>{{ row.f_result_status }}</nobr>
348
+ </td>
349
+ <td style="text-align: center;">
350
+ <nobr>{{ row.f_user_type }}</nobr>
351
+ </td>
352
+ <td style="text-align: center;">
353
+ <nobr>{{ row.f_failure }}</nobr>
354
+ </td>
355
+ <td style="text-align: center;">
356
+ <nobr>{{ row.f_handlingtype }}</nobr>
357
+ </td>
358
+ <td style="text-align: center;">
359
+ <nobr>{{ row.f_repair_remarks }}</nobr>
360
+ </td>
361
+ </template>
362
+ </data-grid>
363
+ </criteria-paged>
364
+ </div>
365
+ <!--打印-->
366
+ <modal :show.sync="printshow" v-ref:modal backdrop="false">
367
+ <header slot="modal-header" class="modal-header text-center">
368
+ <h4 class="modal-title">打印列选择</h4>
369
+ <input type="checkbox" class="" id="f_generations" v-model="all">
370
+ <label for="f_generations" class="font-size">全选</label>
371
+ </header>
372
+ <article slot="modal-body">
373
+ <div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">
374
+ <div class="col-sm-3" v-for="f in fields">
375
+ <input type="checkbox" class="" :id="'water-owe-details-'+$index" v-model="modelval" :value="$key">
376
+ <label :for="'water-owe-details-'+$index" class="font-size">{{ f }}</label>
377
+ </div>
378
+ </div>
379
+ </article>
380
+ <footer slot="modal-footer" class="modal-footer">
381
+ <center>
382
+ <button v-show="printshow" type="button" class="btn btn-default" @click='close()'>取消</button>
383
+ <button v-show="printshow" type="button" class="btn btn-success" @click='print()'>打印</button>
384
+ <print-table :model='model' v-show="false" v-ref:print
385
+ :top='40' :left='60' :right='40' :bottom='60'
386
+ :thead="thead" :tfoot='tfoot' :attach="yangsen"
387
+ :fields="modelval">
388
+ </print-table>
389
+ </center>
390
+ </footer>
391
+ </modal>
392
+ </div>
393
+ <modal :show.sync="showVisit" v-ref:modal backdrop="false">
394
+ <header slot="modal-header" class="modal-header">
395
+ </header>
396
+ <article slot="modal-body" class="modal-body">
397
+ <visit-info v-if="showVisit" :row="visitrow" :phone="wavflie"
398
+ @show-obj="watchShow"></visit-info>
399
+ </article>
400
+ <footer slot="modal-footer" class="modal-footer">
401
+ </footer>
402
+ </modal>
403
+ <modal :show.sync="imgshow" v-ref:modal backdrop="true">
404
+ <header slot="modal-header" class="modal-header">
405
+ 在线抢修照片
406
+ </header>
407
+ <article slot="modal-body" class="modal-body">
408
+ <div class="from-group">
409
+ <img-self :src="imgfilename" width="500" height="500"></img-self>
410
+ </div>
411
+ </article>
412
+ <footer slot="modal-footer" class="modal-footer">
413
+ <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
414
+ </footer>
415
+ </modal>
416
+ </template>
417
+
418
+ <script>
419
+ import {PagedList} from 'vue-client'
420
+ import DelayReply from '../../../components/pc/DelayReply'
421
+ import defaultPrint from '../../../components/pc/config/DefaultPrint'
422
+ import {HttpResetClass} from 'vue-client'
423
+
424
+ export default {
425
+ title: '工单列表',
426
+ data () {
427
+ return {
428
+ orgstrs: [{label: '全部', value: ''}],
429
+ editflag: null,
430
+ showVisit: false,
431
+ outltime: this.getNowFormatDate(),
432
+ wavflie: '',
433
+ selectone: '',
434
+ model: new PagedList('rs/sql/serviceDetails', 20),
435
+ row: null,
436
+ orderMan: '',
437
+ user_types:[{label: '全部', value: ''}, {label: '民用', value: '民用'},{label: '非民用', value: '非民用'}],
438
+ handling_types:[{label: '全部', value: ''}, {label: '转站点', value: '转站点'},{label: '转维修员', value: '转维修员'},{label: '转运营系统', value: '转运营系统'}],
439
+ msgs: [],
440
+ service: Object,
441
+ pendingCount: 0,
442
+ // 打印
443
+ all: false,
444
+ modelval: [],
445
+ visitrow: {},
446
+ printshow: false,
447
+ imgshow: false,
448
+ imgfilename: '',
449
+ fields: {},
450
+ thead: '',
451
+ tfoot: '',
452
+ zhihuans: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '异常', value: '异常'}],
453
+ headData: ['工单类型', '工单编号', '派单时间','客户信息', '联系电话', '故障明细', '工单状态', '派单人', '话务员','接单员',
454
+ '结单时间','到达时间', '离开时间','逾期状态','截止时间','工单结果','派单类型'],
455
+ bodyData: ['f_workorder_type', 'f_service_id', 'f_created_date', 'f_customer_info_show','f_contact_phone', 'f_json',
456
+ 'f_state_show', 'f_single_man','f_attendant','f_order_man','f_date','f_date_come','f_date_leave',
457
+ 'f_overdue_show','f_finish_time_show','f_result_status','f_handlingtype'],
458
+ searchData: {
459
+ condition: '1=1'
460
+ },
461
+ excelHeaders: {
462
+ 'f_workorder_type': '工单类型',
463
+ 'f_service_id': '工单编号',
464
+ 'f_created_date': '派单时间',
465
+ 'f_customer_info_show': '客户信息',
466
+ 'f_contact_phone': '联系电话',
467
+ 'f_json': '故障明细',
468
+ 'f_state_show': '工单状态',
469
+ 'f_single_man': '派单人',
470
+ 'f_attendant': '话务员',
471
+ 'f_order_man': '接单员',
472
+ 'f_date': '结单时间',
473
+ 'f_date_come': '到达时间',
474
+ 'f_date_leave': '离开时间',
475
+ 'f_overdue_show': '逾期状态',
476
+ 'f_finish_time_show': '截止时间',
477
+ 'f_result_status': '工单结果',
478
+ 'f_user_type': '客户类型',
479
+ 'f_failure': '维修类型',
480
+ 'f_handlingtype': '派单类型'
481
+ },
482
+ criteriaShow: false
483
+ }
484
+ },
485
+ props: {
486
+ user: {
487
+ type: Object
488
+ },
489
+ sum: 0,
490
+ maintenance: [],
491
+
492
+ serviceId: '',
493
+
494
+ defname: {
495
+ type: String
496
+ },
497
+ systemshow: {
498
+ type: Boolean,
499
+ default: false
500
+ }
501
+ },
502
+ ready () {
503
+ this.selfSearch()
504
+ console.log(this.model)
505
+ },
506
+ watch: {
507
+ 'all' (val) {
508
+ if (val) {
509
+ this.modelval = this.bodyData
510
+ } else {
511
+ this.modelval = defaultPrint.config
512
+ this.put()
513
+ }
514
+ },
515
+ 'modelval.length' () {
516
+ this.put()
517
+ },
518
+ 'serviceId' () {
519
+ this.selfSearch()
520
+ },
521
+ 'sum' (val) {
522
+ this.selfSearch()
523
+ //this.model.search()
524
+ }
525
+ },
526
+ methods: {
527
+ d1(row){
528
+ return row.f_workorder_type == '报修单'?(row.f_result_status == '已完成'?(this.datejisuan(row.f_finish_date,row.f_date)<0?'已逾期':'未逾期'):(this.datejisuan(row.f_finish_date,this.getNowFormatDate())<0?'已逾期':'未逾期')):''
529
+ },
530
+ d2(row){
531
+ const result = row.f_workorder_type == '报修单'?(row.f_result_status == '已完成'?(this.datejisuan(row.f_finish_date,row.f_date)<0?this.formatDuring(new Date(row.f_date).getTime(),new Date(row.f_finish_date).getTime()):'未逾期'):(this.datejisuan(row.f_finish_date,'')<0?this.formatDuring(new Date().getTime(),new Date(row.f_finish_date).getTime()):'未逾期')):''
532
+ if (result == '未逾期' && row.f_finish_date == '1900-01-01 00:00:00'){
533
+ return ''
534
+ }
535
+ return result
536
+ },
537
+ datejisuan(a,b){
538
+ if (a && b && a != '1900-01-01 00:00:00'){
539
+ return new Date(a).getTime()-new Date(b).getTime()
540
+ }else {
541
+ return ''
542
+ }
543
+ },
544
+ getNowFormatDate () {
545
+ var date = new Date()
546
+ var seperator1 = '-'
547
+ var seperator2 = ':'
548
+ var month = date.getMonth() + 1
549
+ var strDate = date.getDate()
550
+ var hour = date.getHours()
551
+ var min = date.getMinutes()
552
+ var second = date.getSeconds()
553
+ if (month >= 1 && month <= 9) {
554
+ month = '0' + month
555
+ }
556
+ if (strDate >= 0 && strDate <= 9) {
557
+ strDate = '0' + strDate
558
+ }
559
+ if (hour >= 0 && hour <= 9) {
560
+ hour = '0' + hour
561
+ }
562
+ if (min >= 0 && min <= 9) {
563
+ min = '0' + min
564
+ }
565
+ if (second >= 0 && second <= 9) {
566
+ second = '0' + second
567
+ }
568
+ var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
569
+ + ' ' + hour + seperator2 + min
570
+ + seperator2 + second
571
+ return currentdate
572
+ },
573
+ watchShow (val) {
574
+ this.visitrow = {}
575
+ this.showVisit = val
576
+ this.selfSearch()
577
+ },
578
+ playWav (val, val2) {
579
+ //tag
580
+ this.wavflie = val
581
+ this.visitrow = val2
582
+ this.showVisit = true
583
+ },
584
+ showpicture (val) {
585
+ //tag
586
+ //tag)
587
+ this.imgshow = true
588
+ this.imgfilename = 'rs/image/file/' + val.f_single_path
589
+ },
590
+ imgclose () {
591
+ this.imgshow = false
592
+ },
593
+ yccolor (val) {
594
+ if (val == '异常') {
595
+ return 'color:red'
596
+ }
597
+ return ''
598
+ },
599
+
600
+ search (args) {
601
+
602
+ if (this.f_filialeids) {
603
+ args.condition += ` and f_filiale_id in ${this.f_filialeids}`
604
+ } else {
605
+ args.condition += ` and f_filiale_id = '${this.$login.f.orgid}'`
606
+ }
607
+ if (args.model.f_result_status) {
608
+ if (args.model.f_result_status == '已完成') {
609
+ args.condition += ` and tsw.f_result_status = '已完成'`
610
+ }else {
611
+ args.condition += ` and tsw.f_result_status is null `
612
+ }
613
+ }
614
+ this.searchData.condition = args.condition
615
+ return this.model.search(args.condition, args.model)
616
+ },
617
+ selfSearch () {
618
+ // 取消编辑状态
619
+ let condition = '1=1'
620
+
621
+ if (this.f_filialeids) {
622
+ condition += ` and f_filiale_id in ${this.f_filialeids}`
623
+ //tag
624
+ } else {
625
+ condition += ` and f_filiale_id = '${this.$login.f.orgid}'`
626
+ }
627
+ return this.model.search(condition)
628
+ },
629
+
630
+ // 发送数据给业务逻辑,并刷新界面
631
+
632
+ // 是否可以退回
633
+
634
+ trouble (val) {
635
+ let failureall=''
636
+ // val=[{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""},{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""},{"f_failure_type":"抽油烟机","failurecase":[],"f_equipment":""}]
637
+
638
+ let failure = JSON.parse(val)
639
+ for (let i = 0; i <failure.length; i++) {
640
+ if (failure[i].failurecase.length>0){
641
+ failureall+=failure[i].f_failure_type+":"
642
+ for (let j = 0; j < failure[i].failurecase.length; j++) {
643
+ failureall+=failure[i].failurecase[j]
644
+ if (j+1!=failure[i].failurecase.length){
645
+ failureall+=","
646
+ }
647
+ }
648
+
649
+ }else{
650
+ failureall+=failure[i].f_failure_type
651
+ }
652
+ if (i+1!=failure.length){
653
+ failureall+=';'
654
+ }
655
+ }
656
+ return failureall
657
+ },
658
+ // 打印
659
+ stamp () {
660
+ this.all = false
661
+ // 默认选择要打印的列
662
+ this.modelval = defaultPrint.config
663
+ this.fields = this.getfield
664
+ this.printshow = true
665
+ this.put()
666
+ },
667
+ put () {
668
+ // 对Modelval进行排序
669
+ this.sortModelval()
670
+ this.thead = `<tr><th colspan=${this.modelval.length}>工单详情报表</th></tr><tr>`
671
+ for (let key of this.modelval) {
672
+ this.thead += '<th>' + this.fields[key] + '</th>'
673
+ }
674
+ this.thead += '</tr>'
675
+ },
676
+ print () {
677
+ this.$refs.print.PrintAsFile()
678
+ this.printshow = false
679
+ },
680
+ close () {
681
+ this.printshow = false
682
+ this.all = false
683
+ },
684
+ // 对选择的列进行排序
685
+ sortModelval () {
686
+ let sortModel = []
687
+ Object.keys(this.fields).forEach((key) => {
688
+ if (this.modelval.includes(key)) {
689
+ sortModel.push(key)
690
+ }
691
+ })
692
+ this.modelval = sortModel
693
+ },
694
+ hidden () {
695
+ this.criteriaShow = !this.criteriaShow
696
+ },
697
+ getRes (obj) {
698
+ //tag
699
+ ////tag)
700
+ this.f_filialeids = this.$login.convertToIn(obj.resids)
701
+ //tag
702
+ },
703
+ formatDuring (s1,s2) {
704
+ var millisecond = s1-s2
705
+ var days = parseInt(millisecond / (1000 * 60 * 60 * 24))
706
+ var hours = parseInt((millisecond % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
707
+ var minutes = parseInt((millisecond % (1000 * 60 * 60)) / (1000 * 60))
708
+ var seconds = parseInt((millisecond % (1000 * 60)) / 1000)
709
+ return days + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒"
710
+ }
711
+
712
+ },
713
+ computed: {
714
+ result_status(){
715
+ return this.$appdata.getParam('呼叫工单结果')?[{label: '全部', value: ''}, ...this.$appdata.getParam('呼叫工单结果')] : [{label: '全部', value: ''}]
716
+ },
717
+ defnames () {
718
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('呼叫工单状态')]
719
+ },
720
+ repairstypes () {
721
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('报修全部类型')]
722
+ },
723
+ serviceorders () {
724
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单类型')]
725
+ },
726
+ sources () {
727
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单来源')]
728
+ },
729
+ getfield () {
730
+ let data = {}
731
+ this.bodyData.forEach((value, index) => {
732
+ data[this.bodyData[index]] = this.headData[index]
733
+ })
734
+ return data
735
+ }
736
+ },
737
+ components: {
738
+ 'delay-reply': DelayReply
739
+ }
740
+ }
741
+ </script>