telephone-clients 3.0.103 → 3.0.104-1

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