telephone-clients 3.0.102 → 3.0.103

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