telephone-clients 3.0.103-97 → 3.0.103-99

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