telephone-clients 3.0.101 → 3.0.103

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