telephone-clients 4.0.0-1-28 → 4.0.0-1-29

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,868 +1,893 @@
1
- <template>
2
- <!--<div class="app-botton" @click="back()">-->
3
- <!--返回<span class="glyphicon glyphicon-menu-right"></span>-->
4
- <!--</div>-->
5
- <div class="no-close row android-repair-order" style="background-color: #f9f9f9">
6
- <div class="col-sm-12 col-xs-12" >
7
- <ul class="nav nav-tabs" style="background:#ffffff;">
8
- <li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
9
- v-if="$index < number+1 && $index < faultshow.number" >
10
- <a href="javascript:void(0)" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
11
- <span class="spanboder">{{row.header}}</span>
12
- <img class="butt2" :src="imgback(row.complete === componentName)"></a>
13
- <p></p>
14
- </li>
15
- <div class="col-sm-12 col-xs-12 repair-bg" v-show="routeShow">
16
- <route name='repair' :reuse="false"></route>
17
- </div>
18
- <li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
19
- v-if="$index > number && $index < faultshow.number ">
20
- <a href="javascript:void(0)" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
21
- <span class="spanboder">{{row.header}}</span>
22
- <img class="butt2" :src="imgback(row.complete === componentName)"></a>
23
- <p></p>
24
- </li>
25
- <div class="col-sm-12 col-xs-12 repair-bg">
26
- <route name='upload' :reuse="false"></route>
27
- </div>
28
- </ul>
29
- </div>
30
- </div>
31
- </template>
32
-
33
- <script>
34
- // 户内维修
35
- import Vue from 'vue'
36
- import RepairInfo from '../../../components/workorder/RepairInfo'
37
- import MeterReading from './MeterReading'
38
- import RepairDetails from '../../../components/workorder/RepairDetails'
39
- import RepairUserInfo from '../../../components/workorder/RepairUserInfo'
40
- import Outlay from './Outlay'
41
- import FaultAll from '../../../components/workorder/FaultAll'
42
- import { HttpResetClass } from 'vue-client'
43
- import * as Util from '../../../components/Util'
44
-
45
- let loadParamGem = async function (self) {
46
- await self.$LoadParams.loadParam()
47
- }
48
-
49
- export default {
50
- title: '维修单',
51
- props: {
52
- worktype:{
53
- type: String,
54
- default: '报修单'
55
- },
56
- //分辨平板还是pc
57
- system: '',
58
- // 要处理的工单
59
- row: {
60
- type: Object
61
- },
62
- // 要显示的维修单
63
- repair: {
64
- type: Object
65
- },
66
- // 是否是显示
67
- show: {
68
- type: Boolean,
69
- default: false
70
- },
71
- issee:'',
72
- ischeck:{
73
- type: Boolean,
74
- default: false
75
- }
76
- },
77
-
78
- data() {
79
- return {
80
- // 维修项
81
- repairdetails:{},
82
- // userinfo: '',
83
- routeShow:true,
84
- number:0,
85
- shupingshow:false,
86
- pipeline: {},
87
- model: {
88
- serviceacitivity: [{
89
- baseuserinfo: {
90
- f_credentials:'身份证'
91
- },
92
- basemeterinfo: {},
93
- matterinfo: {},
94
- servicerepair: [],
95
- // 照片
96
- imgs: [],
97
- // 签名照片名字
98
- // 照片
99
- material: [], //维修的一批材料
100
- f_date: '',
101
- f_date_come: '',
102
- f_date_leave: '',
103
- f_is_userfilesadd:'未上传',
104
- f_dealtype:'线下处理',
105
- f_workorder_type:this.worktype ? this.worktype : '报修单'
106
- }]
107
- },
108
- details: [],
109
- ids: '',
110
- savevalid: {
111
- uservalid: false,
112
- doorvalid: true,
113
- changetable: false
114
- },
115
- doordetails: {},
116
- devicedetails: {},
117
- cookdetails: {},
118
- componentName: 'repair-info',
119
- tabs: [
120
- {
121
- header: '客户工单信息', complete: 'repair-info', class: 'repair-info-class', props: null
122
- },
123
- {
124
- header: '拍照及签名',complete:'outlay', class: 'outlay-class', props: null
125
- }
126
- ],
127
- faultshow:{
128
- number : 8
129
- } // 控制 故障汇总 在 菜单里显示与否
130
- }
131
- },
132
- methods: {
133
- // 录音方法
134
- record () {
135
- //tag
136
- let fileName
137
- if (!this.f_recording1_path) {
138
- fileName = Util.guid() + '.amr'
139
- } else {
140
- fileName = Util.getFileName(this.f_recording1_path)
141
- }
142
- //HostApp.__this__ = this
143
- /*调用无限制录音模块*/
144
- let startOrStopState = HostApp.startOrStopAudioClip(fileName, "开始录音")
145
- //tag
146
- if (startOrStopState.code == 200) {
147
- this.model.f_recording1_path = "/storage/emulated/0/safecheck/" + fileName
148
- console.log("录音文件地址" + this.model.f_recording1_path)
149
- //tag
150
- return true;
151
- } else {
152
- return false;
153
- }
154
- },
155
- imgback (val) {
156
- if (val && this.routeShow) {
157
- return require('../../../assets/xiangxia1.png')
158
- } else {
159
- return require('../../../assets/xiangyou1.png')
160
- }
161
- },
162
- // 选择tab
163
- tabSelect (item, number) {
164
- // 处理关闭/显示 内容
165
- if (this.number == number && !this.routeShow) {
166
- this.routeShow = true
167
- } else if (this.number == number && this.routeShow) {
168
-
169
- this.routeShow = false
170
- } else if (this.number != item.complete) {
171
- this.routeShow = true
172
- }
173
- this.number = number
174
- this.componentName = item.complete
175
- if (item.complete == 'repair-details') {
176
- if (this.row.f_workorder_type == '置换通气单') {
177
- // 根据置换单的用户类型,查询气价信息给下拉框赋值
178
- new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/queryGaspriceGroupByFilaleid`,
179
- {data: {f_filialeid: Vue.user.orgid, f_gasproperties: this.row.f_gasproperties}},
180
- {resolveMsg: null, rejectMsg: null}).then((rese) => {
181
- //tag)
182
- let pricelist = []
183
- if (rese.data) {
184
- rese.data.forEach(item => pricelist.push({label: item.f_price_name, value: item.f_price_name}))
185
- }
186
- this.pricelists = pricelist;
187
- //tag)
188
- let itemprops = {
189
- model: this.model.serviceacitivity[0],
190
- service: this.model,
191
- show: this.show,
192
- repairitem: item,
193
- faultshow: this.faultshow,
194
- shutype: 'shu',
195
- tabs: this.tabs,
196
- repairdetails: this.repairdetails,
197
- issee: this.issee,
198
- pricelists: this.pricelists //根据置换单下派的用气性质和公司查询的气价信息
199
- }
200
- //tag
201
- //tag)
202
- this.$goto(item.complete, itemprops, 'repair')
203
- })
204
- } else {
205
- let itemprops = {
206
- model: this.model.serviceacitivity[0],
207
- service: this.model,
208
- show: this.show,
209
- repairitem: item,
210
- faultshow: this.faultshow,
211
- shutype: 'shu',
212
- tabs: this.tabs,
213
- repairdetails: this.repairdetails,
214
- issee: this.issee,
215
- pricelists: [{label: "无", value: "无"}]
216
- }
217
- //tag
218
- //tag)
219
- this.$goto(item.complete, itemprops, 'repair')
220
- }
221
- } else {
222
- //tag
223
- // //tag)
224
- // //tag)
225
- if (this.routeShow) {
226
- //tag)
227
- // //tag)
228
- this.$goto(item.complete, this.tabs[number].props, 'repair')
229
- }
230
- }
231
- this.shupingshow = true
232
- },
233
- // 给组件添加参数
234
- getImgPath () {
235
- for (var i = 0; i < this.model.serviceacitivity[0].imgs.length; i++) {
236
- this.ids += this.model.serviceacitivity[0].imgs[i].imgid + ','
237
- }
238
- this.ids = this.ids.substring(0, this.ids.length - 1)
239
- if (this.ids) {
240
- this.getImgGen();
241
- }
242
- },
243
- getImgGen () {
244
- let http = new HttpResetClass()
245
- http.load('POST', 'af-telephone/rs/sql/tel_singleTable_OrderBy', {
246
- data: {
247
- items: '*',
248
- tablename: 't_files',
249
- condition: `id in (${this.ids})`,
250
- orderitem: 'id'
251
- }
252
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
253
- for (let i = 0; i < res.data.length; i++) {
254
- for (let j = 0; j < this.model.serviceacitivity[0].imgs.length; j++) {
255
- //tag)
256
- //tag
257
- if (res.data[i].id.toString() === this.model.serviceacitivity[0].imgs[j].imgid) {
258
- this.model.serviceacitivity[0].imgs[j] = Object.assign({}, res.data[i], this.model.serviceacitivity[0].imgs[j])
259
- }
260
- }
261
-
262
- }
263
- })
264
- },
265
- setProps () {
266
- // 给各自组件添加参数
267
- for (var i = 0; i < this.tabs.length; i++) {
268
- if (this.tabs[i].complete == 'repair-info') {
269
- this.tabs[i].props = {
270
- service: this.row,
271
- model: this.model.serviceacitivity[0].baseuserinfo,
272
- data: this.model.serviceacitivity[0],
273
- savevalid: this.savevalid,
274
- repair: this.row,
275
- show: this.show,
276
- // userinfo: this.userinfo
277
- shutype: 'shu',
278
- worktype: this.worktype,
279
- issee: this.issee,
280
- ischeck: this.ischeck
281
- }
282
- } else if (this.tabs[i].complete == 'repair-user-info') {
283
- this.tabs[i].props = {
284
- model: this.model.serviceacitivity[0].baseuserinfo,
285
- data: this.model.serviceacitivity[0],
286
- savevalid: this.savevalid,
287
- repair: this.row,
288
- show: this.show,
289
- // userinfo: this.userinfo
290
- shutype: 'shu',
291
- worktype: this.worktype,
292
- issee: this.issee
293
- }
294
- } else if (this.tabs[i].complete == 'outlay') {
295
- this.tabs[i].props = {
296
- model: this.model.serviceacitivity[0],
297
- service: this.model,
298
- show: this.show,
299
- system: this.system,
300
- f_single_man: this.model.f_single_man,
301
- shutype: 'shu',
302
- issee: this.issee
303
- }
304
- } else if (this.tabs[i].complete == 'fault-all') {
305
- this.tabs[i].props = {
306
- msg: this.model, model: this.model.serviceacitivity[0],
307
- service: this.model, system: this.system, show: this.show,
308
- savevalid: this.savevalid,
309
- issee: this.issee
310
- }
311
- }else if (this.tabs[i].complete == 'meter-reading') {
312
- //tag
313
- //tag)
314
- this.tabs[i].props = {
315
- service: this.model,
316
- model: this.model.serviceacitivity[0].basemeterinfo,
317
- data: this.model.serviceacitivity[0],
318
- savevalid: this.savevalid,
319
- repair: this.row,
320
- show: this.show,
321
- // userinfo: this.userinfo
322
- shutype: 'shu',
323
- worktype: this.worktype,
324
- issee: this.issee
325
- }
326
- }
327
- }
328
- // 参数设置成功,在转向第一个页签
329
- this.$goto('repair-info', this.tabs[0].props, 'repair')
330
- if (!this.issee) {
331
- this.gotoUpload()
332
- }
333
- },
334
-
335
- getRepair () {
336
- if (Vue.android) {
337
- //tag
338
- if (this.$androidUtil.isTest) {
339
- //tag
340
- this.$androidUtil.path({
341
- 'alias': 'serviceWork',
342
- 'data': {id: this.row.serviceacitivity[0].id}
343
- }).then((ret) => {
344
- this.model.serviceacitivity = ret.data
345
- this.getDetails()
346
- })
347
- } else {
348
- //tag
349
- let result = this.$androidUtil.path({'alias': 'serviceWork', 'data': {id: this.row.serviceacitivity[0].id}})
350
- //tag
351
- if (result.code === 200) {
352
- // this.show = true
353
- this.model.serviceacitivity = result.data
354
- this.getDetails()
355
- }
356
- }
357
- } else {
358
- //tag
359
- this.getService();
360
- }
361
- },
362
- getService () {
363
- let http = new HttpResetClass()
364
- http.load('POST', 'af-telephone/rs/path/serviceWork', {data: {id: this.repair.id}}, {
365
- resolveMsg: null,
366
- rejectMsg: null
367
- }).then((res) => {
368
- this.model.serviceacitivity = [res.data[0]]
369
- this.getDetails()
370
- })
371
- },
372
- sortDetails () {
373
- for (let i = 0; i < this.details.length; i++) {
374
- if (this.details[i].details.length) {
375
- for (let j = 0; j < this.details[i].details.length; j++) {
376
- if (this.details[i].details[j].f_type === 'a') {
377
- this.doordetails = {details: this.details[i].details}
378
- break
379
- }
380
- if (this.details[i].details[j].f_type === 'b') {
381
- this.devicedetails = {details: this.details[i].details}
382
- break
383
- }
384
- if (this.details[i].details[j].f_type === 'c') {
385
- this.cookdetails = {details: this.details[i].details}
386
- break
387
- }
388
- }
389
- }
390
- }
391
- },
392
- getDetails () {
393
- if (Vue.android) {
394
- //tag
395
- if (this.$androidUtil.isTest) {
396
- //tag
397
- this.$androidUtil.path({'alias': 'getDetails', 'data': {id: this.row.serviceacitivity[0].id}}).then((ret) => {
398
- this.details = ret.data
399
- this.sortDetails()
400
- if (this.model.serviceacitivity[0] && this.model.serviceacitivity[0].imgs) {
401
- this.getImgPath()
402
- }
403
- this.setProps()
404
- })
405
- } else {
406
- //tag
407
- //tag
408
- let result = this.$androidUtil.path({'alias': 'getDetails', 'data': {id: this.row.serviceacitivity[0].id}})
409
- //tag
410
- if (result.code === 200) {
411
- this.details = result.data
412
- this.sortDetails()
413
- if (this.model.serviceacitivity[0] && this.model.serviceacitivity[0].imgs) {
414
- this.getImgPath()
415
- }
416
- this.setProps()
417
- }
418
- }
419
- } else {
420
- //tag
421
- this.getDetailsGen();
422
- }
423
- },
424
- getDetailsGen () {
425
- let http = new HttpResetClass()
426
- http.load('POST', 'af-telephone/rs/path/getDetails', {data: {id: this.repair.id}}, {
427
- resolveMsg: null,
428
- rejectMsg: null
429
- }).then((res) => {
430
- this.details = res.data
431
- // this.sortDetails()
432
- if (this.model.serviceacitivity[0] && this.model.serviceacitivity[0].imgs) {
433
- this.getImgPath()
434
- }
435
- this.setProps()
436
- })
437
- },
438
- // 获取维修数据
439
- getRepairInfo () {
440
- if (this.$androidUtil.isTest) {
441
- // android模拟
442
- this.$androidUtil.path({'alias': 'telgetRepairWorkMsg', 'data': {id: this.row.id}}).then((ret) => {
443
- this.model.serviceacitivity = ret.data[0].serviceacitivity
444
- this.setProps()
445
- })
446
- } else {
447
- let result = this.$androidUtil.path({'alias': 'telgetRepairWorkMsg', 'data': {id: this.row.id}})
448
- if (result.code == 200) {
449
- //tag)
450
- //tag)
451
- this.model.serviceacitivity = result.data[0].serviceacitivity
452
- this.setProps()
453
- }
454
- }
455
- },
456
- // 复制数据
457
- copy () {
458
- if (this.row) {
459
- //tag
460
- this.model = Object.assign({}, this.model, this.row)
461
- //tag
462
- //tag)
463
- // 获取维修数据
464
- if (Vue.android) {
465
- if (this.row.f_orderstatus == '本地保存') {
466
- this.getRepairInfo()
467
- }
468
- }
469
- }
470
- // 指定了维修单,获取维修单数据,给工单
471
- if (this.repair) {
472
- this.getRepair()
473
- } else {
474
- //tag
475
- this.setProps()
476
- }
477
- },
478
- back () {
479
- let _this = this
480
- if (this.issee) {
481
- _this.$back()
482
- return
483
- }
484
- this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
485
- if (res === 'confirm') {
486
- _this.$back()
487
- }
488
- })
489
- },
490
- confirm () {
491
- this.$dispatch('confirm')
492
- },
493
- mute () {
494
- HostApp.mute()
495
- },
496
- // 维修项赋给维修单的维修集合内
497
- getRepairDetails () {
498
- if (this.repairdetails.length > 0) {
499
- let repairlist = []
500
- for (let j = 0; j < this.repairdetails.length; j++) {
501
- let repairitem = []
502
- for (var i = 0; i < this.repairdetails[j].details.length; i++) {
503
- if (this.row.f_source == '安检') {
504
- repairitem.push({
505
- f_project: this.repairdetails[j].details[i].f_project,
506
- f_defect_remark: this.repairdetails[j].details[i].f_defect_remark,
507
- type: this.repairdetails[j].details[i].type,
508
- f_defect_id: this.repairdetails[j].details[i].f_defect_id,
509
- f_status: '',
510
- f_content: ''
511
- })
512
- } else {
513
- repairitem.push({
514
- f_project: this.repairdetails[j].details[i].f_project,
515
- type: this.repairdetails[j].details[i].type,
516
- f_status: '',
517
- f_content: '',
518
- f_is_must: this.repairdetails[j].details[i].f_is_must ? 'true' : 'false'
519
- })
520
- }
521
- }
522
- repairlist.push({
523
- f_type: this.repairdetails[j].f_type,
524
- details: repairitem,
525
- imgs: [],
526
- f_remarks: this.repairdetails[j].f_remarks
527
- })
528
- }
529
- this.model.serviceacitivity[0].servicerepair = Object.assign([], repairlist)
530
- }
531
- //tag)
532
- },
533
- gotoUpload () {
534
- this.$goto('fault-all', {
535
- msg: this.model, model: this.model.serviceacitivity[0],
536
- service: this.model, system: this.system, show: this.show,
537
- savevalid: this.savevalid,
538
- issee: this.issee,
539
- parentPage: 'CurrentCreate',
540
- ischeck: this.ischeck
541
- }, 'upload')
542
- }
543
- },
544
- watch: {
545
- 'row' () {
546
- //tag
547
- this.copy()
548
- }
549
- },
550
- async ready () {
551
- if (this.row.f_userinfo_id){
552
- let http = new HttpResetClass()
553
- let response = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/tel_singleTable_OrderBy`, {
554
- data: {
555
- items: 'count(0) as num',
556
- tablename: 't_userfiles',
557
- condition: `f_userinfo_id = '${this.row.f_userinfo_id}' and f_meter_classify != '物联网表'`,
558
- orderitem: '1'
559
- }
560
- }, {resolveMsg: null, rejectMsg: null})
561
- if (response.data[0].num > 0 ){
562
- this.tabs.push({
563
- header: '抄表', complete: 'meter-reading', class: 'meter-reading-class', props: null
564
- })
565
- }
566
- }
567
- // 1.先判断是否是安检转来的
568
- // 2.判断工单类型 报修单/置换通气单
569
- // 3.判断用户类型 民用及非民用
570
- // 是否是复检,如果是复检,读复检配置
571
- if (this.ischeck) {
572
- if (Vue.config.telephone.IsCheckConfig && Vue.config.telephone.IsCheckConfig.data != undefined) {
573
- this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.IsCheckConfig.data)))
574
- } else {
575
- this.repairdetails = []
576
- console.log('无复检配置项')
577
- }
578
- } else if (this.row.f_source == '安检') {
579
- //tag)
580
- this.repairdetails = JSON.parse(this.row.f_repairitems).data
581
- //tag}`)
582
- } else {
583
- //tag
584
- if (this.row.f_workorder_type == '报修单') {
585
- if (Vue.config.telephone.RepairsConfig.data != undefined) {
586
- //tag
587
- //tag)
588
- this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.RepairsConfig.data)))
589
- } else {
590
- this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
591
- }
592
- } else if (this.row.f_workorder_type == '置换通气单') {
593
- //tag
594
- // 判断用户类型 民用/非民用
595
- if (this.row.f_user_type == '民用') {
596
- //tag
597
- if (Vue.config.telephone.SubstitConfigCivil.data != undefined) {
598
- //tag
599
- //tag)
600
- this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.SubstitConfigCivil.data)))
601
- } else {
602
- this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
603
- }
604
- } else {
605
- //tag
606
- if (Vue.config.telephone.SubstitConfigBusiness.data != undefined) {
607
- //tag
608
- //tag)
609
- this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.SubstitConfigBusiness.data)))
610
- } else {
611
- this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
612
- }
613
- }
614
- } else {
615
- //tag
616
- // 判断用户类型 民用/非民用
617
- if (this.row.f_user_type == '民用') {
618
- //tag
619
- if (Vue.config.telephone.InstallConfigCivil.data != undefined) {
620
- //tag
621
- //tag)
622
- this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.InstallConfigCivil.data)))
623
- } else {
624
- this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
625
- }
626
- } else {
627
- //tag
628
- if (Vue.config.telephone.InstallConfigBusiness.data != undefined) {
629
- //tag
630
- //tag)
631
- this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.InstallConfigBusiness.data)))
632
- } else {
633
- this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
634
- }
635
- }
636
-
637
- }
638
- }
639
- // this.repairdetails = [{"f_type": "换表","details": [{"f_project":"换表类型","type": "selector","options": [{"data": "换计费器"},{"data": "换新表"},{"data": "气表清零"}]},{"f_project":"换表原因","type": "selector","options": [{"data": "换新表"}]},{"f_project":"旧表底数","type": "string"}]},{"f_type": "改管","details": [{"f_project":"换表原因","type": "selector","options": [{"data": "换新表"}]},{"f_project":"旧表底数","type": "string"}]}]
640
- // 维修项传到维修单中
641
- this.getRepairDetails()
642
- //loadParamGem(this)
643
- //tag
644
- this.copy()
645
- //tag
646
- // tbs合并数组
647
- if (this.model.serviceacitivity[0].servicerepair.length > 0) {
648
- for (let i = 0; i < this.model.serviceacitivity[0].servicerepair.length; i++) {
649
- this.tabs.splice(1 + i, 0, {
650
- header: this.model.serviceacitivity[0].servicerepair[i].f_type,
651
- complete: 'repair-details',
652
- items: this.model.serviceacitivity[0].servicerepair[i].details,
653
- class: 'repair-details-class',
654
- number: i,
655
- details: Object.assign({}, JSON.parse(JSON.stringify(this.model.serviceacitivity[0].servicerepair[i])))
656
- })
657
- }
658
- }
659
- //tag
660
- this.faultshow.number = this.tabs.length
661
- if (this.show || this.repair) {
662
- this.faultshow.number = this.tabs.length
663
- }
664
- let isRecodr = this.$appdata.getSingleValue('呼叫无限制录音'); //单值参数,为true则是开启全程录音
665
- if (isRecodr) {
666
- if (isRecodr == 'true' && !this.repair) {
667
- this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
668
- // 初始化录音
669
- this.record()
670
- }
671
- }
672
- },
673
- components: {
674
- // 'door-service': DoorService,
675
- 'repair-info': RepairInfo,
676
- 'meter-reading': MeterReading,
677
- 'repair-user-info': RepairUserInfo,
678
- 'outlay': Outlay,
679
- 'fault-all': FaultAll,
680
- 'repair-details': RepairDetails
681
- // 'change-meter-page': ChangeMeterPage
682
- // 'pipeline': Pipeline,
683
- // 'device-service': DeviceService,
684
- // 'trouble-removal': TroubleRemoval,
685
- // 'cooking-utensils': CookingUtensils,
686
- // 'repair-matter-info': RepairMatterInfo,
687
- // 'first-gas-check': FirstGasCheck,
688
- // 'tel-change-matter': TelChangeMatter/
689
- },
690
- events: {
691
- 'tijiao': function () {
692
- // 事件回调内的 `this` 自动绑定到注册它的实例上
693
- this.confirm()
694
- },
695
- 'gotorepairinfo': function () {
696
- let pardate = {
697
- _this: this,
698
- title: '维修信息',
699
- safe: false
700
- }
701
- let curActivity = {
702
- id: this.row.workid
703
- }
704
- this.$dispatch('gotoson', pardate)
705
- this.$goto('repair-paper-andorid', {service: this.row, curActivity: curActivity}, 'self')
706
- }
707
- }
708
- }
709
- </script>
710
- <style lang="less">
711
- @import "../../../../src/bootstrap/less/variables.less";
712
-
713
- .tab-befor-img (@url) {
714
- content: '';
715
- background-image: url("@{url}");
716
- background-size: 20px;
717
- display: inline-block;
718
- margin-right: 8px;
719
- margin-top: 0.3em;
720
- height: 1.3em;
721
- width: 1.3em;
722
- vertical-align: -35%;
723
- }
724
-
725
- @media screen and (min-width: 768px) {
726
- .android-repair-order > div > ul a {
727
- font-size: @font-size-h2;
728
- margin: 0.3em 0;
729
- }
730
- }
731
-
732
- .repair-details-class {
733
- &::before {
734
- .tab-befor-img("../../../assets/huneiweixiu1.png");
735
- }
736
- }
737
-
738
- .repair-info-class {
739
- &::before {
740
- .tab-befor-img("../../../assets/baoxiuxinxi1.png");
741
- }
742
- }
743
-
744
- /* .change-meter-page-class {
745
- &::before {
746
- .tab-befor-img("../../../assets/baoxiuxinxi1.png");
747
- }
748
- }*/
749
- .repair-user-info-class {
750
- &::before {
751
- .tab-befor-img("../../../assets/jibenxinxi1.png")
752
- }
753
- }
754
-
755
- .door-service-class {
756
- &::before {
757
- .tab-befor-img("../../../assets/huneiweixiu1.png")
758
- }
759
- }
760
-
761
- .pipeline-class {
762
- &::before {
763
- .tab-befor-img("../../../assets/guandao1.png")
764
- }
765
- }
766
-
767
- .device-service-class {
768
- &::before {
769
- .tab-befor-img("../../../assets/shebeiweixiu1.png")
770
- }
771
- }
772
-
773
- .trouble-removal-class {
774
- &::before {
775
- .tab-befor-img("../../../assets/shiguchuli.png")
776
- }
777
- }
778
-
779
- .cooking-utensils-class {
780
- &::before {
781
- .tab-befor-img("../../../assets/zaoju1.png")
782
- }
783
- }
784
-
785
- .outlay-class {
786
- &::before {
787
- .tab-befor-img("../../../assets/feiyong1.png")
788
- }
789
- }
790
-
791
- .fault-all-class {
792
- &::before {
793
- .tab-befor-img("../../../assets/guzhanghuizong1.png")
794
- }
795
- }
796
-
797
- .meter-reading-class {
798
- &::before {
799
- .tab-befor-img("../../../assets/guzhanghuizong1.png")
800
- }
801
- }
802
-
803
- .photo-write-class {
804
- &::before {
805
- .tab-befor-img("../../../assets/zaoju.png")
806
- }
807
- }
808
-
809
- .delay-apply-class {
810
- &::before {
811
- .tab-befor-img("../../../assets/yonghubaoxiu.png")
812
- }
813
- }
814
-
815
- .repair-back-class {
816
- &::before {
817
- .tab-befor-img("../../../assets/fanhui.png")
818
- }
819
- }
820
-
821
- .butt2 {
822
- display: inline;
823
- float: right;
824
- width: 10px;
825
- text-align: center;
826
- align-items: center;
827
- position: absolute;
828
- top: 50%;
829
-
830
- left: 90%;
831
- transform: translate(-50%, -50%);
832
- }
833
-
834
- .linesty {
835
- display: inline-block;
836
- height: 1px;
837
- width: 100%;
838
- background: #d0d0d0;
839
- overflow: hidden;
840
- vertical-align: middle;
841
- }
842
-
843
- .spanboder {
844
- border-bottom: 2px solid #499edf;
845
- padding-bottom: 8px
846
- }
847
-
848
- .app-botton {
849
- position: fixed;
850
- background: #87b2dd;
851
- right: 8px;
852
- color: #FFF;
853
- padding: 8px;
854
- text-align: center;
855
- font-size: 1.2em;
856
- z-index: 10;
857
- opacity: 0.5;
858
- bottom: 50px;
859
- margin-top: -10px;
860
- height: 40px;
861
- }
862
-
863
- .android-repair-order > div > ul a {
864
- font-size: 12px;
865
- color: #333333;
866
- padding: 13px 16px;
867
- }
868
- </style>
1
+ <template>
2
+ <!--<div class="app-botton" @click="back()">-->
3
+ <!--返回<span class="glyphicon glyphicon-menu-right"></span>-->
4
+ <!--</div>-->
5
+ <div class="no-close row android-repair-order" style="background-color: #f9f9f9">
6
+ <div class="col-sm-12 col-xs-12" >
7
+ <ul class="nav nav-tabs" style="background:#ffffff;">
8
+ <li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
9
+ v-if="$index < number+1 && $index < faultshow.number" >
10
+ <a href="javascript:void(0)" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
11
+ <span class="spanboder">{{row.header}}</span>
12
+ <img class="butt2" :src="imgback(row.complete === componentName)"></a>
13
+ <p></p>
14
+ </li>
15
+ <div class="col-sm-12 col-xs-12 repair-bg" v-show="routeShow">
16
+ <route name='repair' :reuse="false"></route>
17
+ </div>
18
+ <li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
19
+ v-if="$index > number && $index < faultshow.number ">
20
+ <a href="javascript:void(0)" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
21
+ <span class="spanboder">{{row.header}}</span>
22
+ <img class="butt2" :src="imgback(row.complete === componentName)"></a>
23
+ <p></p>
24
+ </li>
25
+ <div class="col-sm-12 col-xs-12 repair-bg">
26
+ <route name='upload' :reuse="false"></route>
27
+ </div>
28
+ </ul>
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ // 户内维修
35
+ import Vue from 'vue'
36
+ import RepairInfo from '../../../components/workorder/RepairInfo'
37
+ import CirculationRecord from './CirculationRecord'
38
+ import MeterReading from './MeterReading'
39
+ import RepairDetails from '../../../components/workorder/RepairDetails'
40
+ import RepairUserInfo from '../../../components/workorder/RepairUserInfo'
41
+ import Outlay from './Outlay'
42
+ import FaultAll from '../../../components/workorder/FaultAll'
43
+ import { HttpResetClass } from 'vue-client'
44
+ import * as Util from '../../../components/Util'
45
+
46
+ let loadParamGem = async function (self) {
47
+ await self.$LoadParams.loadParam()
48
+ }
49
+
50
+ export default {
51
+ title: '维修单',
52
+ props: {
53
+ worktype:{
54
+ type: String,
55
+ default: '报修单'
56
+ },
57
+ //分辨平板还是pc
58
+ system: '',
59
+ // 要处理的工单
60
+ row: {
61
+ type: Object
62
+ },
63
+ // 要显示的维修单
64
+ repair: {
65
+ type: Object
66
+ },
67
+ // 是否是显示
68
+ show: {
69
+ type: Boolean,
70
+ default: false
71
+ },
72
+ issee:'',
73
+ ischeck:{
74
+ type: Boolean,
75
+ default: false
76
+ }
77
+ },
78
+
79
+ data() {
80
+ return {
81
+ // 维修项
82
+ repairdetails:{},
83
+ // userinfo: '',
84
+ routeShow:true,
85
+ number:0,
86
+ shupingshow:false,
87
+ pipeline: {},
88
+ model: {
89
+ serviceacitivity: [{
90
+ baseuserinfo: {
91
+ f_credentials:'身份证'
92
+ },
93
+ basemeterinfo: {},
94
+ matterinfo: {},
95
+ servicerepair: [],
96
+ // 照片
97
+ imgs: [],
98
+ // 签名照片名字
99
+ // 照片
100
+ material: [], //维修的一批材料
101
+ f_date: '',
102
+ f_date_come: '',
103
+ f_date_leave: '',
104
+ f_is_userfilesadd:'未上传',
105
+ f_dealtype:'线下处理',
106
+ f_workorder_type:this.worktype ? this.worktype : '报修单'
107
+ }]
108
+ },
109
+ details: [],
110
+ ids: '',
111
+ savevalid: {
112
+ uservalid: false,
113
+ doorvalid: true,
114
+ changetable: false
115
+ },
116
+ doordetails: {},
117
+ devicedetails: {},
118
+ cookdetails: {},
119
+ componentName: 'repair-info',
120
+ tabs: [
121
+ {
122
+ header: '客户工单信息', complete: 'repair-info', class: 'repair-info-class', props: null
123
+ },
124
+ {
125
+ header: '流转记录', complete: 'circulation-record', class: 'circulation-record-class', props: null
126
+ },
127
+ {
128
+ header: '拍照及签名',complete:'outlay', class: 'outlay-class', props: null
129
+ }
130
+ ],
131
+ faultshow:{
132
+ number : 8
133
+ } // 控制 故障汇总 在 菜单里显示与否
134
+ }
135
+ },
136
+ methods: {
137
+ // 录音方法
138
+ record () {
139
+ //tag
140
+ let fileName
141
+ if (!this.f_recording1_path) {
142
+ fileName = Util.guid() + '.amr'
143
+ } else {
144
+ fileName = Util.getFileName(this.f_recording1_path)
145
+ }
146
+ //HostApp.__this__ = this
147
+ /*调用无限制录音模块*/
148
+ let startOrStopState = HostApp.startOrStopAudioClip(fileName, "开始录音")
149
+ //tag
150
+ if (startOrStopState.code == 200) {
151
+ this.model.f_recording1_path = "/storage/emulated/0/safecheck/" + fileName
152
+ console.log("录音文件地址" + this.model.f_recording1_path)
153
+ //tag
154
+ return true;
155
+ } else {
156
+ return false;
157
+ }
158
+ },
159
+ imgback (val) {
160
+ if (val && this.routeShow) {
161
+ return require('../../../assets/xiangxia1.png')
162
+ } else {
163
+ return require('../../../assets/xiangyou1.png')
164
+ }
165
+ },
166
+ // 选择tab
167
+ tabSelect (item, number) {
168
+ // 处理关闭/显示 内容
169
+ if (this.number == number && !this.routeShow) {
170
+ this.routeShow = true
171
+ } else if (this.number == number && this.routeShow) {
172
+
173
+ this.routeShow = false
174
+ } else if (this.number != item.complete) {
175
+ this.routeShow = true
176
+ }
177
+ this.number = number
178
+ this.componentName = item.complete
179
+ if (item.complete == 'repair-details') {
180
+ if (this.row.f_workorder_type == '置换通气单') {
181
+ // 根据置换单的用户类型,查询气价信息给下拉框赋值
182
+ new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/queryGaspriceGroupByFilaleid`,
183
+ {data: {f_filialeid: Vue.user.orgid, f_gasproperties: this.row.f_gasproperties}},
184
+ {resolveMsg: null, rejectMsg: null}).then((rese) => {
185
+ //tag)
186
+ let pricelist = []
187
+ if (rese.data) {
188
+ rese.data.forEach(item => pricelist.push({label: item.f_price_name, value: item.f_price_name}))
189
+ }
190
+ this.pricelists = pricelist;
191
+ //tag)
192
+ let itemprops = {
193
+ model: this.model.serviceacitivity[0],
194
+ service: this.model,
195
+ show: this.show,
196
+ repairitem: item,
197
+ faultshow: this.faultshow,
198
+ shutype: 'shu',
199
+ tabs: this.tabs,
200
+ repairdetails: this.repairdetails,
201
+ issee: this.issee,
202
+ pricelists: this.pricelists //根据置换单下派的用气性质和公司查询的气价信息
203
+ }
204
+ //tag
205
+ //tag)
206
+ this.$goto(item.complete, itemprops, 'repair')
207
+ })
208
+ } else {
209
+ let itemprops = {
210
+ model: this.model.serviceacitivity[0],
211
+ service: this.model,
212
+ show: this.show,
213
+ repairitem: item,
214
+ faultshow: this.faultshow,
215
+ shutype: 'shu',
216
+ tabs: this.tabs,
217
+ repairdetails: this.repairdetails,
218
+ issee: this.issee,
219
+ pricelists: [{label: "无", value: "无"}]
220
+ }
221
+ //tag
222
+ //tag)
223
+ this.$goto(item.complete, itemprops, 'repair')
224
+ }
225
+ } else {
226
+ //tag
227
+ // //tag)
228
+ // //tag)
229
+ if (this.routeShow) {
230
+ //tag)
231
+ // //tag)
232
+ this.$goto(item.complete, this.tabs[number].props, 'repair')
233
+ }
234
+ }
235
+ this.shupingshow = true
236
+ },
237
+ // 给组件添加参数
238
+ getImgPath () {
239
+ for (var i = 0; i < this.model.serviceacitivity[0].imgs.length; i++) {
240
+ this.ids += this.model.serviceacitivity[0].imgs[i].imgid + ','
241
+ }
242
+ this.ids = this.ids.substring(0, this.ids.length - 1)
243
+ if (this.ids) {
244
+ this.getImgGen();
245
+ }
246
+ },
247
+ getImgGen () {
248
+ let http = new HttpResetClass()
249
+ http.load('POST', 'af-telephone/rs/sql/tel_singleTable_OrderBy', {
250
+ data: {
251
+ items: '*',
252
+ tablename: 't_files',
253
+ condition: `id in (${this.ids})`,
254
+ orderitem: 'id'
255
+ }
256
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
257
+ for (let i = 0; i < res.data.length; i++) {
258
+ for (let j = 0; j < this.model.serviceacitivity[0].imgs.length; j++) {
259
+ //tag)
260
+ //tag
261
+ if (res.data[i].id.toString() === this.model.serviceacitivity[0].imgs[j].imgid) {
262
+ this.model.serviceacitivity[0].imgs[j] = Object.assign({}, res.data[i], this.model.serviceacitivity[0].imgs[j])
263
+ }
264
+ }
265
+
266
+ }
267
+ })
268
+ },
269
+ setProps () {
270
+ // 给各自组件添加参数
271
+ for (var i = 0; i < this.tabs.length; i++) {
272
+ if (this.tabs[i].complete == 'repair-info') {
273
+ this.tabs[i].props = {
274
+ service: this.row,
275
+ model: this.model.serviceacitivity[0].baseuserinfo,
276
+ data: this.model.serviceacitivity[0],
277
+ savevalid: this.savevalid,
278
+ repair: this.row,
279
+ show: this.show,
280
+ // userinfo: this.userinfo
281
+ shutype: 'shu',
282
+ worktype: this.worktype,
283
+ issee: this.issee,
284
+ ischeck: this.ischeck
285
+ }
286
+ } else if (this.tabs[i].complete == 'repair-user-info') {
287
+ this.tabs[i].props = {
288
+ model: this.model.serviceacitivity[0].baseuserinfo,
289
+ data: this.model.serviceacitivity[0],
290
+ savevalid: this.savevalid,
291
+ repair: this.row,
292
+ show: this.show,
293
+ // userinfo: this.userinfo
294
+ shutype: 'shu',
295
+ worktype: this.worktype,
296
+ issee: this.issee
297
+ }
298
+ } else if (this.tabs[i].complete == 'outlay') {
299
+ this.tabs[i].props = {
300
+ model: this.model.serviceacitivity[0],
301
+ service: this.model,
302
+ show: this.show,
303
+ system: this.system,
304
+ f_single_man: this.model.f_single_man,
305
+ shutype: 'shu',
306
+ issee: this.issee
307
+ }
308
+ } else if (this.tabs[i].complete == 'fault-all') {
309
+ this.tabs[i].props = {
310
+ msg: this.model, model: this.model.serviceacitivity[0],
311
+ service: this.model, system: this.system, show: this.show,
312
+ savevalid: this.savevalid,
313
+ issee: this.issee
314
+ }
315
+ }else if (this.tabs[i].complete == 'meter-reading') {
316
+ //tag
317
+ //tag)
318
+ this.tabs[i].props = {
319
+ service: this.model,
320
+ model: this.model.serviceacitivity[0].basemeterinfo,
321
+ data: this.model.serviceacitivity[0],
322
+ savevalid: this.savevalid,
323
+ repair: this.row,
324
+ show: this.show,
325
+ // userinfo: this.userinfo
326
+ shutype: 'shu',
327
+ worktype: this.worktype,
328
+ issee: this.issee
329
+ }
330
+ }else if (this.tabs[i].complete == 'circulation-record') {
331
+ //tag
332
+ //tag)
333
+ this.tabs[i].props = {
334
+ service: this.row,
335
+ model: this.model.serviceacitivity[0].basemeterinfo,
336
+ data: this.model.serviceacitivity[0],
337
+ savevalid: this.savevalid,
338
+ repair: this.row,
339
+ show: this.show,
340
+ // userinfo: this.userinfo
341
+ shutype: 'shu',
342
+ worktype: this.worktype,
343
+ issee: this.issee
344
+ }
345
+ }
346
+ }
347
+ // 参数设置成功,在转向第一个页签
348
+ this.$goto('repair-info', this.tabs[0].props, 'repair')
349
+ if (!this.issee) {
350
+ this.gotoUpload()
351
+ }
352
+ },
353
+
354
+ getRepair () {
355
+ if (Vue.android) {
356
+ //tag
357
+ if (this.$androidUtil.isTest) {
358
+ //tag
359
+ this.$androidUtil.path({
360
+ 'alias': 'serviceWork',
361
+ 'data': {id: this.row.serviceacitivity[0].id}
362
+ }).then((ret) => {
363
+ this.model.serviceacitivity = ret.data
364
+ this.getDetails()
365
+ })
366
+ } else {
367
+ //tag
368
+ let result = this.$androidUtil.path({'alias': 'serviceWork', 'data': {id: this.row.serviceacitivity[0].id}})
369
+ //tag
370
+ if (result.code === 200) {
371
+ // this.show = true
372
+ this.model.serviceacitivity = result.data
373
+ this.getDetails()
374
+ }
375
+ }
376
+ } else {
377
+ //tag
378
+ this.getService();
379
+ }
380
+ },
381
+ getService () {
382
+ let http = new HttpResetClass()
383
+ http.load('POST', 'af-telephone/rs/path/serviceWork', {data: {id: this.repair.id}}, {
384
+ resolveMsg: null,
385
+ rejectMsg: null
386
+ }).then((res) => {
387
+ this.model.serviceacitivity = [res.data[0]]
388
+ this.getDetails()
389
+ })
390
+ },
391
+ sortDetails () {
392
+ for (let i = 0; i < this.details.length; i++) {
393
+ if (this.details[i].details.length) {
394
+ for (let j = 0; j < this.details[i].details.length; j++) {
395
+ if (this.details[i].details[j].f_type === 'a') {
396
+ this.doordetails = {details: this.details[i].details}
397
+ break
398
+ }
399
+ if (this.details[i].details[j].f_type === 'b') {
400
+ this.devicedetails = {details: this.details[i].details}
401
+ break
402
+ }
403
+ if (this.details[i].details[j].f_type === 'c') {
404
+ this.cookdetails = {details: this.details[i].details}
405
+ break
406
+ }
407
+ }
408
+ }
409
+ }
410
+ },
411
+ getDetails () {
412
+ if (Vue.android) {
413
+ //tag
414
+ if (this.$androidUtil.isTest) {
415
+ //tag
416
+ this.$androidUtil.path({'alias': 'getDetails', 'data': {id: this.row.serviceacitivity[0].id}}).then((ret) => {
417
+ this.details = ret.data
418
+ this.sortDetails()
419
+ if (this.model.serviceacitivity[0] && this.model.serviceacitivity[0].imgs) {
420
+ this.getImgPath()
421
+ }
422
+ this.setProps()
423
+ })
424
+ } else {
425
+ //tag
426
+ //tag
427
+ let result = this.$androidUtil.path({'alias': 'getDetails', 'data': {id: this.row.serviceacitivity[0].id}})
428
+ //tag
429
+ if (result.code === 200) {
430
+ this.details = result.data
431
+ this.sortDetails()
432
+ if (this.model.serviceacitivity[0] && this.model.serviceacitivity[0].imgs) {
433
+ this.getImgPath()
434
+ }
435
+ this.setProps()
436
+ }
437
+ }
438
+ } else {
439
+ //tag
440
+ this.getDetailsGen();
441
+ }
442
+ },
443
+ getDetailsGen () {
444
+ let http = new HttpResetClass()
445
+ http.load('POST', 'af-telephone/rs/path/getDetails', {data: {id: this.repair.id}}, {
446
+ resolveMsg: null,
447
+ rejectMsg: null
448
+ }).then((res) => {
449
+ this.details = res.data
450
+ // this.sortDetails()
451
+ if (this.model.serviceacitivity[0] && this.model.serviceacitivity[0].imgs) {
452
+ this.getImgPath()
453
+ }
454
+ this.setProps()
455
+ })
456
+ },
457
+ // 获取维修数据
458
+ getRepairInfo () {
459
+ if (this.$androidUtil.isTest) {
460
+ // android模拟
461
+ this.$androidUtil.path({'alias': 'telgetRepairWorkMsg', 'data': {id: this.row.id}}).then((ret) => {
462
+ this.model.serviceacitivity = ret.data[0].serviceacitivity
463
+ this.setProps()
464
+ })
465
+ } else {
466
+ let result = this.$androidUtil.path({'alias': 'telgetRepairWorkMsg', 'data': {id: this.row.id}})
467
+ if (result.code == 200) {
468
+ //tag)
469
+ //tag)
470
+ this.model.serviceacitivity = result.data[0].serviceacitivity
471
+ this.setProps()
472
+ }
473
+ }
474
+ },
475
+ // 复制数据
476
+ copy () {
477
+ if (this.row) {
478
+ //tag
479
+ this.model = Object.assign({}, this.model, this.row)
480
+ //tag
481
+ //tag)
482
+ // 获取维修数据
483
+ if (Vue.android) {
484
+ if (this.row.f_orderstatus == '本地保存') {
485
+ this.getRepairInfo()
486
+ }
487
+ }
488
+ }
489
+ // 指定了维修单,获取维修单数据,给工单
490
+ if (this.repair) {
491
+ this.getRepair()
492
+ } else {
493
+ //tag
494
+ this.setProps()
495
+ }
496
+ },
497
+ back () {
498
+ let _this = this
499
+ if (this.issee) {
500
+ _this.$back()
501
+ return
502
+ }
503
+ this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
504
+ if (res === 'confirm') {
505
+ _this.$back()
506
+ }
507
+ })
508
+ },
509
+ confirm () {
510
+ this.$dispatch('confirm')
511
+ },
512
+ mute () {
513
+ HostApp.mute()
514
+ },
515
+ // 维修项赋给维修单的维修集合内
516
+ getRepairDetails () {
517
+ if (this.repairdetails.length > 0) {
518
+ let repairlist = []
519
+ for (let j = 0; j < this.repairdetails.length; j++) {
520
+ let repairitem = []
521
+ for (var i = 0; i < this.repairdetails[j].details.length; i++) {
522
+ if (this.row.f_source == '安检') {
523
+ repairitem.push({
524
+ f_project: this.repairdetails[j].details[i].f_project,
525
+ f_defect_remark: this.repairdetails[j].details[i].f_defect_remark,
526
+ type: this.repairdetails[j].details[i].type,
527
+ f_defect_id: this.repairdetails[j].details[i].f_defect_id,
528
+ f_status: '',
529
+ f_content: ''
530
+ })
531
+ } else {
532
+ repairitem.push({
533
+ f_project: this.repairdetails[j].details[i].f_project,
534
+ type: this.repairdetails[j].details[i].type,
535
+ f_status: '',
536
+ f_content: '',
537
+ f_is_must: this.repairdetails[j].details[i].f_is_must ? 'true' : 'false'
538
+ })
539
+ }
540
+ }
541
+ repairlist.push({
542
+ f_type: this.repairdetails[j].f_type,
543
+ details: repairitem,
544
+ imgs: [],
545
+ f_remarks: this.repairdetails[j].f_remarks
546
+ })
547
+ }
548
+ this.model.serviceacitivity[0].servicerepair = Object.assign([], repairlist)
549
+ }
550
+ //tag)
551
+ },
552
+ gotoUpload () {
553
+ this.$goto('fault-all', {
554
+ msg: this.model, model: this.model.serviceacitivity[0],
555
+ service: this.model, system: this.system, show: this.show,
556
+ savevalid: this.savevalid,
557
+ issee: this.issee,
558
+ parentPage: 'CurrentCreate',
559
+ ischeck: this.ischeck
560
+ }, 'upload')
561
+ }
562
+ },
563
+ watch: {
564
+ 'row' () {
565
+ //tag
566
+ this.copy()
567
+ }
568
+ },
569
+ async ready () {
570
+ if (this.row.f_userinfo_id){
571
+ let http = new HttpResetClass()
572
+ let response = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/tel_singleTable_OrderBy`, {
573
+ data: {
574
+ items: 'count(0) as num',
575
+ tablename: 't_userfiles',
576
+ condition: `f_userinfo_id = '${this.row.f_userinfo_id}' and f_meter_classify != '物联网表'`,
577
+ orderitem: '1'
578
+ }
579
+ }, {resolveMsg: null, rejectMsg: null})
580
+ if (response.data[0].num > 0 ){
581
+ this.tabs.push({
582
+ header: '抄表', complete: 'meter-reading', class: 'meter-reading-class', props: null
583
+ })
584
+ }
585
+ }
586
+ // 1.先判断是否是安检转来的
587
+ // 2.判断工单类型 报修单/置换通气单
588
+ // 3.判断用户类型 民用及非民用
589
+ // 是否是复检,如果是复检,读复检配置
590
+ if (this.ischeck) {
591
+ if (Vue.config.telephone.IsCheckConfig && Vue.config.telephone.IsCheckConfig.data != undefined) {
592
+ this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.IsCheckConfig.data)))
593
+ } else {
594
+ this.repairdetails = []
595
+ console.log('无复检配置项')
596
+ }
597
+ } else if (this.row.f_source == '安检') {
598
+ //tag)
599
+ this.repairdetails = JSON.parse(this.row.f_repairitems).data
600
+ //tag}`)
601
+ } else {
602
+ //tag
603
+ if (this.row.f_workorder_type == '报修单') {
604
+ if (Vue.config.telephone.RepairsConfig.data != undefined) {
605
+ //tag
606
+ //tag)
607
+ this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.RepairsConfig.data)))
608
+ } else {
609
+ this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
610
+ }
611
+ } else if (this.row.f_workorder_type == '置换通气单') {
612
+ //tag
613
+ // 判断用户类型 民用/非民用
614
+ if (this.row.f_user_type == '民用') {
615
+ //tag
616
+ if (Vue.config.telephone.SubstitConfigCivil.data != undefined) {
617
+ //tag
618
+ //tag)
619
+ this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.SubstitConfigCivil.data)))
620
+ } else {
621
+ this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
622
+ }
623
+ } else {
624
+ //tag
625
+ if (Vue.config.telephone.SubstitConfigBusiness.data != undefined) {
626
+ //tag
627
+ //tag)
628
+ this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.SubstitConfigBusiness.data)))
629
+ } else {
630
+ this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
631
+ }
632
+ }
633
+ } else {
634
+ //tag
635
+ // 判断用户类型 民用/非民用
636
+ if (this.row.f_user_type == '民用') {
637
+ //tag
638
+ if (Vue.config.telephone.InstallConfigCivil.data != undefined) {
639
+ //tag
640
+ //tag)
641
+ this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.InstallConfigCivil.data)))
642
+ } else {
643
+ this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
644
+ }
645
+ } else {
646
+ //tag
647
+ if (Vue.config.telephone.InstallConfigBusiness.data != undefined) {
648
+ //tag
649
+ //tag)
650
+ this.repairdetails = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.InstallConfigBusiness.data)))
651
+ } else {
652
+ this.$showMessage('网络异常,请重新登陆系统!', ['confirm'])
653
+ }
654
+ }
655
+
656
+ }
657
+ }
658
+ // this.repairdetails = [{"f_type": "换表","details": [{"f_project":"换表类型","type": "selector","options": [{"data": "换计费器"},{"data": "换新表"},{"data": "气表清零"}]},{"f_project":"换表原因","type": "selector","options": [{"data": "换新表"}]},{"f_project":"旧表底数","type": "string"}]},{"f_type": "改管","details": [{"f_project":"换表原因","type": "selector","options": [{"data": "换新表"}]},{"f_project":"旧表底数","type": "string"}]}]
659
+ // 维修项传到维修单中
660
+ this.getRepairDetails()
661
+ //loadParamGem(this)
662
+ //tag
663
+ this.copy()
664
+ //tag
665
+ // tbs合并数组
666
+ if (this.model.serviceacitivity[0].servicerepair.length > 0) {
667
+ for (let i = 0; i < this.model.serviceacitivity[0].servicerepair.length; i++) {
668
+ this.tabs.splice(1 + i, 0, {
669
+ header: this.model.serviceacitivity[0].servicerepair[i].f_type,
670
+ complete: 'repair-details',
671
+ items: this.model.serviceacitivity[0].servicerepair[i].details,
672
+ class: 'repair-details-class',
673
+ number: i,
674
+ details: Object.assign({}, JSON.parse(JSON.stringify(this.model.serviceacitivity[0].servicerepair[i])))
675
+ })
676
+ }
677
+ }
678
+ //tag
679
+ this.faultshow.number = this.tabs.length
680
+ if (this.show || this.repair) {
681
+ this.faultshow.number = this.tabs.length
682
+ }
683
+ let isRecodr = this.$appdata.getSingleValue('呼叫无限制录音'); //单值参数,为true则是开启全程录音
684
+ if (isRecodr) {
685
+ if (isRecodr == 'true' && !this.repair) {
686
+ this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
687
+ // 初始化录音
688
+ this.record()
689
+ }
690
+ }
691
+ },
692
+ components: {
693
+ // 'door-service': DoorService,
694
+ 'repair-info': RepairInfo,
695
+ 'meter-reading': MeterReading,
696
+ 'circulation-record': CirculationRecord,
697
+ 'repair-user-info': RepairUserInfo,
698
+ 'outlay': Outlay,
699
+ 'fault-all': FaultAll,
700
+ 'repair-details': RepairDetails
701
+ // 'change-meter-page': ChangeMeterPage
702
+ // 'pipeline': Pipeline,
703
+ // 'device-service': DeviceService,
704
+ // 'trouble-removal': TroubleRemoval,
705
+ // 'cooking-utensils': CookingUtensils,
706
+ // 'repair-matter-info': RepairMatterInfo,
707
+ // 'first-gas-check': FirstGasCheck,
708
+ // 'tel-change-matter': TelChangeMatter/
709
+ },
710
+ events: {
711
+ 'tijiao': function () {
712
+ // 事件回调内的 `this` 自动绑定到注册它的实例上
713
+ this.confirm()
714
+ },
715
+ 'gotorepairinfo': function () {
716
+ let pardate = {
717
+ _this: this,
718
+ title: '维修信息',
719
+ safe: false
720
+ }
721
+ let curActivity = {
722
+ id: this.row.workid
723
+ }
724
+ this.$dispatch('gotoson', pardate)
725
+ this.$goto('repair-paper-andorid', {service: this.row, curActivity: curActivity}, 'self')
726
+ }
727
+ }
728
+ }
729
+ </script>
730
+ <style lang="less">
731
+ @import "../../../../src/bootstrap/less/variables.less";
732
+
733
+ .tab-befor-img (@url) {
734
+ content: '';
735
+ background-image: url("@{url}");
736
+ background-size: 20px;
737
+ display: inline-block;
738
+ margin-right: 8px;
739
+ margin-top: 0.3em;
740
+ height: 1.3em;
741
+ width: 1.3em;
742
+ vertical-align: -35%;
743
+ }
744
+
745
+ @media screen and (min-width: 768px) {
746
+ .android-repair-order > div > ul a {
747
+ font-size: @font-size-h2;
748
+ margin: 0.3em 0;
749
+ }
750
+ }
751
+
752
+ .repair-details-class {
753
+ &::before {
754
+ .tab-befor-img("../../../assets/huneiweixiu1.png");
755
+ }
756
+ }
757
+
758
+ .repair-info-class {
759
+ &::before {
760
+ .tab-befor-img("../../../assets/baoxiuxinxi1.png");
761
+ }
762
+ }
763
+
764
+ /* .change-meter-page-class {
765
+ &::before {
766
+ .tab-befor-img("../../../assets/baoxiuxinxi1.png");
767
+ }
768
+ }*/
769
+ .repair-user-info-class {
770
+ &::before {
771
+ .tab-befor-img("../../../assets/jibenxinxi1.png")
772
+ }
773
+ }
774
+ .circulation-record-class{
775
+ &::before {
776
+ .tab-befor-img("../../../assets/huneiweixiu1.png");
777
+ }
778
+ }
779
+
780
+ .door-service-class {
781
+ &::before {
782
+ .tab-befor-img("../../../assets/huneiweixiu1.png")
783
+ }
784
+ }
785
+
786
+ .pipeline-class {
787
+ &::before {
788
+ .tab-befor-img("../../../assets/guandao1.png")
789
+ }
790
+ }
791
+
792
+ .device-service-class {
793
+ &::before {
794
+ .tab-befor-img("../../../assets/shebeiweixiu1.png")
795
+ }
796
+ }
797
+
798
+ .trouble-removal-class {
799
+ &::before {
800
+ .tab-befor-img("../../../assets/shiguchuli.png")
801
+ }
802
+ }
803
+
804
+ .cooking-utensils-class {
805
+ &::before {
806
+ .tab-befor-img("../../../assets/zaoju1.png")
807
+ }
808
+ }
809
+
810
+ .outlay-class {
811
+ &::before {
812
+ .tab-befor-img("../../../assets/feiyong1.png")
813
+ }
814
+ }
815
+
816
+ .fault-all-class {
817
+ &::before {
818
+ .tab-befor-img("../../../assets/guzhanghuizong1.png")
819
+ }
820
+ }
821
+
822
+ .meter-reading-class {
823
+ &::before {
824
+ .tab-befor-img("../../../assets/guzhanghuizong1.png")
825
+ }
826
+ }
827
+
828
+ .photo-write-class {
829
+ &::before {
830
+ .tab-befor-img("../../../assets/zaoju.png")
831
+ }
832
+ }
833
+
834
+ .delay-apply-class {
835
+ &::before {
836
+ .tab-befor-img("../../../assets/yonghubaoxiu.png")
837
+ }
838
+ }
839
+
840
+ .repair-back-class {
841
+ &::before {
842
+ .tab-befor-img("../../../assets/fanhui.png")
843
+ }
844
+ }
845
+
846
+ .butt2 {
847
+ display: inline;
848
+ float: right;
849
+ width: 10px;
850
+ text-align: center;
851
+ align-items: center;
852
+ position: absolute;
853
+ top: 50%;
854
+
855
+ left: 90%;
856
+ transform: translate(-50%, -50%);
857
+ }
858
+
859
+ .linesty {
860
+ display: inline-block;
861
+ height: 1px;
862
+ width: 100%;
863
+ background: #d0d0d0;
864
+ overflow: hidden;
865
+ vertical-align: middle;
866
+ }
867
+
868
+ .spanboder {
869
+ border-bottom: 2px solid #499edf;
870
+ padding-bottom: 8px
871
+ }
872
+
873
+ .app-botton {
874
+ position: fixed;
875
+ background: #87b2dd;
876
+ right: 8px;
877
+ color: #FFF;
878
+ padding: 8px;
879
+ text-align: center;
880
+ font-size: 1.2em;
881
+ z-index: 10;
882
+ opacity: 0.5;
883
+ bottom: 50px;
884
+ margin-top: -10px;
885
+ height: 40px;
886
+ }
887
+
888
+ .android-repair-order > div > ul a {
889
+ font-size: 12px;
890
+ color: #333333;
891
+ padding: 13px 16px;
892
+ }
893
+ </style>