telephone-clients 4.0.0-1-89 → 4.0.0-1-90

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 +2 -2
  2. package/src/components/pc/MaintenanceWorker.vue +152 -0
  3. package/src/components/pc/NewRepairPaper.vue +704 -704
  4. package/src/components/pc/NewRepairTablePaper.vue +442 -442
  5. package/src/components/pc/WorkHistory.vue +650 -650
  6. package/src/components/pc/WorkListNew.vue +838 -838
  7. package/src/components/sendsingle/onlinecharge.vue +424 -424
  8. package/src/components/workorder/ChangeMeterPageNew.vue +663 -663
  9. package/src/components/workorder/ChangeMeterUserInfo.vue +130 -130
  10. package/src/components/workorder/RepairFirstV.vue +736 -736
  11. package/src/components/workorder/RepairInfo.vue +178 -178
  12. package/src/components/workorder/RepairOrderT.vue +713 -713
  13. package/src/components/workorder/oldMeterPage.vue +104 -104
  14. package/src/components/workorder/repairFirstTable.vue +715 -715
  15. package/src/filiale/jinhong/android/FaultAll.vue +936 -936
  16. package/src/filiale/jinhong/android/ZHihuanFirst.vue +540 -540
  17. package/src/filiale/jinhong/pc/WorkListAllNew.vue +884 -884
  18. package/src/filiale/jinhong/telephone.js +10 -10
  19. package/src/filiale/jinhong/telephoneAndroid.js +13 -13
  20. package/src/filiale/meihekou/android/Othercharge.vue +454 -454
  21. package/src/filiale/meihekou/android/PhoneStandWorkNew.vue +692 -692
  22. package/src/filiale/meihekou/android/ServiceOnlineQuery.vue +477 -477
  23. package/src/filiale/meihekou/pc/WorkListAllNew.vue +925 -901
  24. package/src/filiale/meihekou/pc/WorkListNew.vue +1103 -1049
  25. package/src/filiale/meihekou/telephoneAndroid.js +26 -26
  26. package/src/filiale/xinjiangdexin/telephone.js +16 -16
  27. package/src/filiale/xinliansihui/android/FaultAll.vue +923 -923
  28. package/src/filiale/xinliansihui/android/RepairFirstV.vue +734 -734
  29. package/src/filiale/xinliansihui/android/RepairOrderT.vue +713 -713
  30. package/src/main.js +1 -1
  31. package/src/telephone-android.js +425 -425
  32. package/src/telephone.js +799 -796
@@ -1,923 +1,923 @@
1
- <template>
2
- <div class="auto select-overspread form-horizontal repair-bg " style="padding-bottom:5px;" id="savePhonebut" >
3
- <div class="bq-parent">
4
- <blockquote class="blockquote">
5
- <p>工单上传<a @click="$parent.mute()" style="float:right" href="javascript:void(0)" class="repair-mute-class"><img
6
- src="../../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a>
7
- </p>
8
- </blockquote>
9
- </div>
10
- <div class="panel panel-default auto repair-info-content"
11
- v-if="showhead && msg.serviceacitivity[0].f_result_status != '已完成'">
12
- <div class="panel-body ">
13
- <div class="row auto compatible">
14
- <div class="row auto">
15
- <div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;" v-if="!show">
16
- <div class="col-xs-3 col-sm-3 col-md-3">
17
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='confirm("已完成")'>
18
- 工单完成
19
- </button>
20
- </div>
21
- <div class="col-xs-3 col-sm-3 col-md-3" v-if="isNeedMaterial && !ischeck">
22
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='showmateria'>
23
- 材料收费
24
- </button>
25
- </div>
26
- <div class="col-xs-3 col-sm-3 col-md-3" v-show="sfbutten && !ischeck">
27
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='gotoOtherCharge'>
28
- 工单收费
29
- </button>
30
- </div>
31
- <div class="col-xs-3 col-sm-3 col-md-3" v-show="savebutten && !ischeck">
32
- <button type="button" name="button" class="col-sm-3 btn btn-primary"
33
- @click='workOrderSave'>
34
- 临时保存
35
- </button>
36
- </div>
37
- </div>
38
- </div>
39
- </div>
40
- </div>
41
- </div>
42
- <div class="panel panel-default auto repair-info-content"
43
- v-if="msg.serviceacitivity[0].f_result_status == '已完成' && !show">
44
- <div class="panel-body ">
45
- <div class="row auto compatible">
46
- <div class="row auto">
47
- <div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;" v-show="false">
48
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='saveCompeleted()'>
49
- 保存
50
- </button>
51
- </div>
52
- </div>
53
- </div>
54
- </div>
55
- </div>
56
- <div class="panel panel-default auto repair-info-content form-horizontal" v-if="showNorepair">
57
- <div>
58
- <p><big><b>工单未完成</b></big></p>
59
- </div>
60
- <div class="row">
61
- <div class="col-sm-12 form-group form-fix-width">
62
- <label class="control-label">原因</label>
63
- <textarea name="name" rows="2" class="form-control ver-textarea"
64
- v-model="msg.serviceacitivity[0].f_reason"></textarea>
65
- </div>
66
- </div>
67
- <failure-edit :value='msg.serviceacitivity[0].failure' @input='newFailure' v-if="msg.f_workorder_type == '报修单'">
68
- </failure-edit>
69
- <!--<div class="row">-->
70
- <!--<div class="col-sm-12 form-group form-fix-width">-->
71
- <!--<label class="control-label">选择站点</label>-->
72
- <!--<v-select :value.sync="msg.serviceacitivity[0].f_department" :value-single="true"-->
73
- <!--:options='repairers' placeholder='请选择站点'-->
74
- <!--close-on-select></v-select>-->
75
- <!--</div>-->
76
- <!--</div>-->
77
- <div class="form-group">
78
- <button type="button" class="btn btn-default pull-right" @click='close'>取消</button>
79
- <button type="button" class="btn btn-success pull-right" @click='confirm("未完成")'>确认</button>
80
- </div>
81
- </div>
82
- <div class="panel panel-default auto repair-info-content form-horizontal" v-if="showCannotrepair">
83
- <div>
84
- <p><big><b>无法完成</b></big></p>
85
- </div>
86
- <div class="row">
87
- <div class="col-sm-12 form-group form-fix-width">
88
- <label class="control-label">原因</label>
89
- <textarea name="name" rows="2" class="form-control ver-textarea"
90
- v-model="msg.serviceacitivity[0].f_reason"></textarea>
91
- </div>
92
- </div>
93
- <failure-edit :value='msg.serviceacitivity[0].failure' @input='newFailure' v-if="msg.f_workorder_type == '报修单'">
94
- </failure-edit>
95
- <!--<div class="row">-->
96
- <!--<div class="col-sm-12 form-group form-fix-width">-->
97
- <!--<label class="control-label">选择站点</label>-->
98
- <!--<v-select :value.sync="msg.serviceacitivity[0].f_department" :value-single="true"-->
99
- <!--:options='repairers' placeholder='请选择站点'-->
100
- <!--close-on-select></v-select>-->
101
- <!--</div>-->
102
- <!--</div>-->
103
- <div class="row">
104
- <div class="col-sm-12">
105
- <button type="button" class="btn btn-default pull-right" @click='close1'>取消</button>
106
- <button type="button" class="btn btn-success pull-right" @click='cannotRepaer()'>确认</button>
107
- </div>
108
- </div>
109
- </div>
110
- </div>
111
- <modal :show.sync="showmaterial" backdrop="false" style="overflow: scroll;height: 100%">
112
- <header slot="modal-header" class="modal-header text-center">
113
- <button type="button" class="close" @click="close2"><span>&times;</span></button>
114
- <h4 class="modal-title">添加材料</h4>
115
- </header>
116
- <article slot="modal-body">
117
- <appinstallation-material v-if="showmaterial" :selectdata = "selectdata"></appinstallation-material>
118
- </article>
119
- <footer slot="modal-footer"></footer>
120
- </modal>
121
- </template>
122
- <script>
123
- import Vue from 'vue'
124
- import * as Util from "../../../components/Util"
125
- import {HttpResetClass} from 'vue-client'
126
- import FailureEdit from '../../../components/pc/FailureEdit'
127
- import AppInstallationMaterial from './AppInstallationMaterial'
128
- import $ from "jquery"
129
-
130
- export default {
131
- title: '故障汇总',
132
- props: {
133
- msg: {
134
- type: Object
135
- },
136
- savevalid: {
137
- type: Object
138
- },
139
- model: {
140
- type: Object
141
- },
142
- show: {
143
- type: Boolean,
144
- default: false
145
- },
146
- row: {
147
- type: Object
148
- },
149
- system: '',
150
- parentPage:'',
151
- ischeck:{
152
- type: Boolean,
153
- default: false
154
- }
155
- },
156
- data() {
157
- return {
158
- savebutten:false, // 工单保存按钮
159
- sfbutten:false, //收费按钮
160
- fileName: '',
161
- datajson: '',
162
- norepair: '',
163
- showNorepair: false,
164
- showCannotrepair: false,
165
- showhead: true,
166
- repairers : this.$appdata.getParam('站点管理员'),
167
- config:{},
168
- othercharge_id: '',
169
- showmaterial:false,
170
- tablechange_id: '',
171
- selectdata:{},
172
- isNeedMaterial: this.$appdata.getSingleValue('材料收费') == '是',
173
- }
174
- },
175
- methods: {
176
- saveNoclick() {
177
- // 禁用点击事件
178
- $("#savePhonebut").addClass("noclickbut");
179
- //tag
180
-
181
- // 5秒后启用点击事件
182
- setTimeout(function(){
183
- $("#savePhonebut").removeClass("noclickbut");
184
- },5000);
185
- },
186
- // 停止录音
187
- closely(isdelete){
188
- try {
189
- var startOrStopAudioClipStr;
190
- if (isdelete===true) {
191
- //tag
192
- startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止并删除录音') //停止并删除录音
193
- }else {
194
- //tag
195
- startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止录音') //停止录音
196
- }
197
- if (startOrStopAudioClipStr.code == 200) {
198
- //tag
199
- return true;
200
- }else {
201
- return false;
202
- }
203
- } catch (e) {
204
- console.error("关闭录音方法异常")
205
- console.error(e)
206
- return false;
207
- }
208
- },
209
- /* // 录音方法
210
- record() {
211
- //tag
212
- let fileName
213
- if (!this.f_recording1_path) {
214
- fileName = Util.guid() + '.amr'
215
- } else {
216
- fileName = Util.getFileName(this.f_recording1_path)
217
- }
218
- //HostApp.__this__ = this
219
- /!*调用无限制录音模块*!/
220
- let startOrStopState = HostApp.startOrStopAudioClip(fileName,"开始录音")
221
- //tag
222
- if (startOrStopState.code == 200) {
223
- this.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
224
- console.log("录音文件地址"+this.f_recording1_path)
225
- //tag
226
- return true;
227
- }else {
228
- return false;
229
- }
230
- },*/
231
- // 工单收费
232
- async gotoOtherCharge() {
233
- //tag
234
- let con = {
235
- conndition: ` f_userinfo_id = '${this.msg.f_userinfo_id}' `
236
- }
237
- let http1 = new HttpResetClass()
238
- let row = await http1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/onlinequeryuser`, {data: con},{
239
- resolveMsg: '物联网收费成功!!',
240
- rejectMsg: '物联网收费出错!!!'
241
- })
242
- //tag))
243
- // 去其他收费界面
244
- let _this = this
245
- var pardate = {
246
- _this:_this,
247
- title:'其他收费',
248
- safe:false
249
- }
250
- this.closely(false)
251
- _this.$dispatch('gotoson',pardate)
252
- //tag
253
- _this.$goto('other_charge', {row: row}, 'self',_this.payback)
254
- // _this.$goto('create_qrcode', {row: parameter}, 'self',_this.payback)
255
- },
256
- payback(msg) {
257
- if (msg) {
258
- //tag)
259
- this.othercharge_id = msg
260
- }else {
261
- //tag
262
- this.$showMessage('支付失败!')
263
- }
264
- },
265
- // 工单结案
266
- finishRepair(){
267
- var _this = this
268
- this.$showMessage('请确认该工单结案!', ['confirm', 'cancel']).then((res) => {
269
- if (res === 'confirm') {
270
- this.closely(false)
271
- _this.confirm("结案")
272
- }
273
- })
274
- },
275
- deleteEmptyProperty(object){
276
- for (var i in object) {
277
- var value = object[i];
278
- if (typeof value === 'object') {
279
- if (Array.isArray(value)) {
280
- if (value.length == 0) {
281
- delete object[i];
282
- //tag;
283
- continue;
284
- }
285
- }
286
- this.deleteEmptyProperty(value);
287
- if (this.isEmpty(value)) {
288
- //tag;
289
- delete object[i];
290
- //tag;
291
- }
292
- } else {
293
- if (value === '' || value === null || value === undefined) {
294
- delete object[i];
295
- //tag;
296
- } else {
297
- //tag;
298
- }
299
- }
300
- }
301
- },
302
- isEmpty(object) {
303
- for (var name in object) {
304
- return false;
305
- }
306
- return true;
307
- },
308
- // 从图片中删除
309
- remove(row) {
310
- this.$androidUtil.delfile(row.android_file)
311
- let pos = this.model.imgs.findIndex((value) => {
312
- return value === row
313
- })
314
- this.model.imgs.splice(pos, 1)
315
- },
316
- // fileName: 回传文件名,传入的带安卓路径url
317
- // prop: 传入的字段名,没做改动
318
- cameraCallBack(prop, fileName) {
319
- // 当前this只能通过HostApp.__tis__获取
320
- let self = this.$androidUtil.getCallBack(this)
321
- // 添加新图片
322
- self.model.imgs.push({
323
- android_file: self.fileName,
324
- path: fileName
325
- })
326
- },
327
- takePic() {
328
- let prop = 'repair'
329
- let idx = 'aofeng'
330
- this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
331
- this.$sandroidUtil.takePic(this, this.cameraCallBack, this.fileName)
332
- },
333
- newFailure(value) {
334
- this.msg.serviceacitivity[0].failure = value
335
- },
336
- noRepair() {
337
- this.showhead = false
338
- this.showNorepair = true
339
- this.closely()
340
- HostApp.backupDatabase()
341
- },
342
- cannotRepair() {
343
- this.showhead = false
344
- this.showCannotrepair = true
345
- this.closely()
346
- // falg:0, 表示第一次上传,批量上传时,flag:1
347
- // this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg})
348
- },
349
- // 测试环境下模拟上传失败
350
- fail(param) {
351
- this.msg.serviceacitivity[0].f_result_status = param
352
- this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg, test: true})
353
- },
354
- async workOrderSave(){
355
- this.norepair = false
356
- if (this.hunei && this.hunei.details) {
357
- for (let i = 0; i < this.hunei.details.length; i++) {
358
- if (this.hunei.details[i].f_project === '未维修') {
359
- this.norepair = true
360
- }
361
- }
362
- }
363
- // 用户基本信息转字符串
364
- this.msg.serviceacitivity[0].f_date_leave = Util.toStandardTimeString()
365
- this.msg.serviceacitivity[0].f_result_status = '工单保存'
366
- this.msg.serviceacitivity[0].f_order_man = Vue.user.name
367
- this.closely(true)
368
- console.log("保存本地2"+this.msg.f_recording1_path)
369
- this.deleteEmptyProperty(this.msg)
370
- let dataone = {
371
- row: this.msg
372
- }
373
- let paramStr = JSON.stringify(dataone)
374
- // 多长截断一次
375
- let subLength = 1000
376
- for (let i = 0; i < paramStr.length; i += subLength) {
377
- HostApp.param_cache(paramStr.slice(i, i + subLength))
378
- }
379
- HostApp.__this__ = this
380
- HostApp.syncLogic({
381
- // logic别名,key必须为logic
382
- 'logic': 'workOrderSave',
383
- // 回调执行方法名,key必须为callback
384
- 'callback': 'javascript:HostApp.__this__.localSaveCallBack()',
385
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
386
- // 执行回调方法传入key为backresult
387
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
388
- 'backresult': 1
389
- })
390
- },
391
- localSaveCallBack(res){
392
- if(res.state == 'ok'){
393
- let result = JSON.parse(res.result)
394
- if(result.result == '成功'){
395
- this.$showMessage('工单保存成功!', ['confirm'])
396
- }else{
397
- this.$showMessage(`工单保存失败! ${result.errMsg}`, ['confirm'])
398
- }
399
- this.$dispatch('tijiao')
400
- }else {
401
- this.$showMessage(`保存提交失败!`, ['confirm'])
402
- }
403
- },
404
- // 工单上传
405
- async confirm(param) {
406
- this.msg.f_dealtype = this.msg.serviceacitivity[0].f_dealtype || null
407
- /*//tag)
408
- if(!this.model.ischange) {
409
- this.$showMessage('您还为进行换表操作,工单为完成!,')
410
- return
411
- }*/
412
-
413
- this.norepair = false
414
- if (this.hunei && this.hunei.details) {
415
- for (let i = 0; i < this.hunei.details.length; i++) {
416
- if (this.hunei.details[i].f_project === '未维修') {
417
- this.norepair = true
418
- }
419
- }
420
- }
421
- if(param != '结案'&& (this.msg.f_workorder_type == '置换通气单'||this.msg.f_workorder_type == '安装单')) {
422
- // 检测验证是否必填
423
- var isfinish = this.checkismust()
424
- if(isfinish.ifmust){
425
- this.$showMessage(`请录入${isfinish.msg}信息!`, ['confirm'])
426
- return
427
- }
428
- // 检测签名是否完成
429
- // if(!(this.msg.serviceacitivity[0].f_signname)) {
430
- // this.$showMessage(`请完成客户签名!`, ['confirm'])
431
- // return
432
- // }
433
- // 检测置换作业是否有异常
434
- var yinhuanflag = this.checkzhihuanwork()
435
- if(!yinhuanflag){
436
- var resy = await this.$showMessage('是否确认该户置换作业异常?', ['confirm', 'cancel'])
437
- if(resy == 'cancel'){
438
- return
439
- }
440
- this.msg.f_is_abnormal = '异常'
441
- this.msg.serviceacitivity[0].f_is_abnormal = '异常'
442
- }
443
- if(!this.msg.serviceacitivity[0].f_signname) {
444
- this.$showMessage(`请完成客户签名!`, ['confirm'])
445
- return
446
- }
447
- // 检测置换照片是否已拍
448
- // var imgflag = this.checkzhihuanimg()
449
- // if(!(imgflag.check)){
450
- // this.$showMessage(`${imgflag.title}未拍照!`, ['confirm'])
451
- // return
452
- // }
453
- }
454
- else if(this.msg.f_workorder_type == '报修单' && this.msg.f_repairtype != '换表' && param != '结案'){
455
- // 兼容之前模式 做线上线下处理选择
456
- let checkmust = true
457
- if(this.msg.serviceacitivity[0].f_dealtype && this.msg.serviceacitivity[0].f_dealtype == '线上处理'){
458
- checkmust = false
459
- }
460
- if(checkmust){
461
- let isfinish = this.checkismust()
462
- if(isfinish.ifmust){
463
- this.$showMessage(`请录入${isfinish.msg}信息!`, ['confirm'])
464
- return
465
- }
466
- if(!(this.msg.serviceacitivity[0].f_signname) && Vue.config.telephone.FaultAll.signature?Vue.config.telephone.FaultAll.signature:false) {
467
- this.$showMessage(`请完成客户签名!`, ['confirm'])
468
- return
469
- }
470
- let imgflag = this.checkzhihuanimg()
471
- if(!(imgflag.check)){
472
- this.$showMessage(`${imgflag.title}未拍照!`, ['confirm'])
473
- return
474
- }
475
- }
476
- }
477
-
478
- // }
479
- // 用户基本信息转字符串
480
- // if ((this.savevalid.uservalid && this.savevalid.doorvalid) || this.norepair || this.liGuanWeiXou || this.sheBeiRepairAll) {
481
- this.msg.serviceacitivity[0].f_date_leave = Util.toStandardTimeString()
482
- this.msg.serviceacitivity[0].f_result_status = param
483
- this.msg.serviceacitivity[0].f_order_man = Vue.user.name
484
- this.msg.loginid = Vue.user.id
485
- this.msg.ischeck = this.ischeck
486
- // if (!this.savevalid.changetable && this.model.servicerepair && this.model.servicerepair[0].f_if_change) {
487
- // this.$showMessage('未上传收费!', ['confirm'])
488
- // } else {
489
- this.deleteEmptyProperty(this.msg)
490
- //tag
491
- this.closely(false) // 保存本地,不删除录音文件停止录音
492
- // this.msg.f_recording1_path = this.data.f_recording1_path
493
- console.log("保存本地", this.msg.f_recording1_path)
494
- //tag)
495
- this.saveNoclick()
496
- //tag)
497
- this.msg.f_tablechange_id=this.tablechange_id
498
-
499
- let dataone = { flag: 0, row: this.msg }
500
- //tag)
501
- let paramStr = JSON.stringify(dataone)
502
- // 多长截断一次
503
- let subLength = 1000
504
- for (let i = 0; i < paramStr.length; i += subLength) {
505
- HostApp.param_cache(paramStr.slice(i, i + subLength))
506
- }
507
- HostApp.__this__ = this
508
- HostApp.syncLogic({
509
- // logic别名,key必须为logic
510
- 'logic': 'upload',
511
- // 回调执行方法名,key必须为callback
512
- 'callback': 'javascript:HostApp.__this__.uploadCallback()',
513
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
514
- // 执行回调方法传入key为backresult
515
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
516
- 'backresult': 1
517
- })
518
- },
519
- uploadCallback(res){
520
- let _this = this
521
- if(res.state == 'ok'){
522
- let result = JSON.parse(res.result)
523
- if (result.result === '成功' ) {
524
- const goSafe = this.$appdata.getSingleValue('维修后进行安检')
525
- if (goSafe){
526
- this.$showMessage(`是否前往安检`, ['confirm', 'cancel']).then((res) => {
527
- let info = this.msg
528
- if (res === 'confirm') {
529
- if (!this.msg.f_userinfo_id){
530
- var pardate = {
531
- _this:this.$parent.$parent,
532
- tittle:'在线安检',
533
- safe:false
534
- }
535
- this.$dispatch('gotoson',pardate)
536
- this.$parent.$parent.$goto('add-plan-item', {item: info}, 'self', function (){
537
- _this.$parent.$parent.$dispatch('confirm')
538
- _this.$parent.$parent.$dispatch('tijiao')
539
- }
540
- )
541
- }else {
542
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/查询计划项表信息`,{data:{f_userid:this.msg.f_userinfo_id}}).then((response)=>{
543
- if(response.data.length!=1){
544
- this.$showMessage("当前用户有多条表信息,请联系管理员核实进行处理!")
545
- }else {
546
- info.f_userinfoid = this.msg.f_userinfo_id
547
- info.f_userinfo_id = this.msg.f_userinfo_id
548
- info['f_plan_meters'] = response.data
549
- info.f_no_checkplan = '无计划安检'
550
- info.show_temporary_save = 'no'
551
- var pardate = {
552
- _this:this.$parent.$parent,
553
- tittle:'安检详情',
554
- safe:false
555
- }
556
- this.$dispatch('gotoson',pardate)
557
- this.$parent.$parent.$goto('safecheck-order-v', {item: info, role: 'inspect',parentPage:'CurrentCreate'}, 'self', function (){
558
- _this.$parent.$parent.$dispatch('confirm')
559
- _this.$parent.$parent.$dispatch('tijiao')
560
- }
561
- )
562
- }
563
- })
564
- }
565
- }else {
566
- this.$dispatch('tijiao')
567
- }
568
- })
569
- }else{
570
- this.$dispatch('tijiao')
571
- }
572
- } else {
573
- this.$showMessage(`保存提交失败!${result.errMsg}`, ['confirm'])
574
- }
575
- this.showNorepair = false
576
- this.showCannotrepair = false
577
- }else {
578
- this.$showMessage(`保存提交失败!`, ['confirm'])
579
- }
580
- },
581
- // 检验是否必填 返回 error:{msg:'111',ismust:true}
582
- checkismust(){
583
- var error ={
584
- msg:'',
585
- ifmust:false
586
- }
587
- for(var i = 0;i<this.msg.serviceacitivity[0].servicerepair.length;i++) {
588
- for (var j = 0; j < this.msg.serviceacitivity[0].servicerepair[i].details.length; j++) {
589
- if(this.msg.serviceacitivity[0].servicerepair[i].details[j].type == 'checkbox'&&this.msg.serviceacitivity[0].servicerepair[i].details[j].f_content == '无'){
590
- break;
591
- }
592
- if(this.msg.serviceacitivity[0].servicerepair[i].details[j].f_is_must == 'true' && this.msg.serviceacitivity[0].servicerepair[i].details[j].type == 'picture' && this.msg.serviceacitivity[0].servicerepair[i].imgs.length == 0){
593
- error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
594
- error.ifmust = true
595
- return error
596
- }
597
- if(this.msg.serviceacitivity[0].servicerepair[i].details[j].f_is_must == 'true' && !(this.msg.serviceacitivity[0].servicerepair[i].details[j].f_content) && this.msg.serviceacitivity[0].servicerepair[i].details[j].type != 'picture' ){
598
- error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
599
- error.ifmust = true
600
- return error
601
- }
602
- if(this.msg.f_source == '安检' && this.msg.serviceacitivity[0].servicerepair[i].details[j].f_defect_id && this.msg.serviceacitivity[0].servicerepair[i].details[j].f_content == '已处理'&& !this.msg.serviceacitivity[0].servicerepair[i].details[j].f_first_repairimg){
603
- error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}的维修照片`
604
- error.ifmust = true
605
- return error
606
- }
607
- if(this.msg.f_source == '安检' && this.msg.serviceacitivity[0].servicerepair[i].details[j].f_defect_id && !this.msg.serviceacitivity[0].servicerepair[i].details[j].f_content){
608
- error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
609
- error.ifmust = true
610
- return error
611
- }
612
- }
613
- }
614
- return error
615
- },
616
- // checkzhihuanwork 检测置换作业是否正常
617
- checkzhihuanwork(){
618
- var isstatus = true
619
- if(this.zhihuan){
620
- for(var i = 0;i<this.zhihuan.details.length;i++){
621
- if(this.zhihuan.details[i].type == 'radio' && this.zhihuan.details[i].f_content){
622
- if(this.zhihuan.details[i].f_status == 'false'){
623
- isstatus = false
624
- break;
625
- }
626
- }
627
- }
628
- }
629
- return isstatus
630
- },
631
- checkzhihuanimg(){
632
- var isstatus = {
633
- check: true,
634
- title:''
635
- }
636
- if(Vue.config.telephone.Outlay.data != undefined){
637
- let checkimgs = ''
638
- //tag
639
- //tag+'22222222222222222')
640
- if(this.service.f_user_type == '民用'){
641
- checkimgs = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.msg.f_workorder_type].civil)))
642
- }else{
643
- checkimgs = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.msg.f_workorder_type].nocivil)))
644
- }
645
- if(checkimgs.length>0){
646
- for(var i =0;i<checkimgs.length;i++){
647
- var checkimgstype = checkimgs[i].title
648
- if(checkimgs[i].checkmust){
649
- var flag = false
650
- for(var j =0;j<this.msg.serviceacitivity[0].imgs.length;j++){
651
- if(this.msg.serviceacitivity[0].imgs[j].imgpath == checkimgstype) {
652
- flag = true
653
- break;
654
- }
655
- }
656
- if(!flag){
657
- isstatus.check = false
658
- isstatus.title = checkimgstype
659
- break;
660
- }
661
- }
662
- }
663
- }
664
- }
665
- return isstatus
666
- },
667
- checkservice(){
668
- // 1.先判断灶具
669
- if(this.zaoju){
670
- var iszaoju = false
671
- for(var i = 0;i<this.zaoju.details.length;i++){
672
- if(this.zaoju.details[i].f_project == '有无灶具设备'){
673
- if(this.zaoju.details[i].f_content == '有'||this.zaoju.details[i].f_content == ''){
674
- iszaoju = true
675
- break;
676
- }
677
- }
678
- }
679
- if(iszaoju){
680
- for(var i = 0;i<this.zaoju.details.length;i++){
681
- if(this.zaoju.details[i].type == 'picture'){
682
- //tag
683
- //tag
684
- if(this.zaoju.imgs.length == 0){
685
- this.$showMessage('灶具设备未拍照!', ['confirm'])
686
- return false
687
- }
688
- }else{
689
- if(this.zaoju.details[i].f_content == '' || this.zaoju.details[i].f_content == undefined){
690
- this.$showMessage('灶具设备信息未填写完整!', ['confirm'])
691
- return false
692
- }
693
- }
694
- }
695
- }
696
- }
697
- // 2.判断热水器
698
- if(this.reshuiqi){
699
- var isreshuiqi = false
700
- for(var i = 0;i<this.reshuiqi.details.length;i++){
701
- if(this.reshuiqi.details[i].f_project == '有无热水器设备'){
702
- if(this.reshuiqi.details[i].f_content == '有'||this.reshuiqi.details[i].f_content == ''){
703
- isreshuiqi = true
704
- break;
705
- }
706
- }
707
- }
708
- if(isreshuiqi){
709
- for(var i = 0;i<this.reshuiqi.details.length;i++){
710
- if(this.reshuiqi.details[i].type == 'picture'){
711
- if(this.reshuiqi.imgs.length == 0){
712
- this.$showMessage('热水器设备未拍照!', ['confirm'])
713
- return false
714
- }
715
- }else{
716
- if(this.reshuiqi.details[i].f_content == '' || this.reshuiqi.details[i].f_content == undefined){
717
- this.$showMessage('热水器设备信息未填写完整!', ['confirm'])
718
- return false
719
- }
720
- }
721
- }
722
- }
723
- }
724
- // 3.判断壁挂炉
725
- if(this.bigualu){
726
- var isbigualu = false
727
- for(var i = 0;i<this.bigualu.details.length;i++){
728
- if(this.bigualu.details[i].f_project == '有无壁挂炉设备'){
729
- if(this.bigualu.details[i].f_content == '有'||this.bigualu.details[i].f_content == ''){
730
- isbigualu = true
731
- break;
732
- }
733
- }
734
- }
735
- if(isbigualu){
736
- for(var i = 0;i<this.bigualu.details.length;i++){
737
- if(this.bigualu.details[i].type == 'picture'){
738
- if(this.bigualu.imgs.length == 0){
739
- this.$showMessage('壁挂炉设备未拍照!', ['confirm'])
740
- return false
741
- }
742
- }else{
743
- if(this.bigualu.details[i].f_content == '' || this.bigualu.details[i].f_content == undefined){
744
- this.$showMessage('壁挂炉设备信息未填写完整!', ['confirm'])
745
- return false
746
- }
747
- }
748
- }
749
- }
750
- }
751
- return true
752
- },
753
- cannotRepaer() {
754
- this.msg.serviceacitivity[0].f_service_acitivity_type = '未维修'
755
- this.msg.loginid = Vue.user.id
756
- let result = this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg})
757
- if (result.result === '成功') {
758
- this.$showMessage('保存提交成功!', ['confirm'])
759
- } else {
760
- this.$showMessage(`保存提交失败!${JSON.stringify(result)}`, ['confirm'])
761
- }
762
- this.showNorepair = false
763
- this.showCannotrepair = false
764
- this.$dispatch('tijiao')
765
- },
766
- saveCompeleted() {
767
- this.msg.serviceacitivity[0].baseuserinfo.f_date_level = Util.toStandardTimeString()
768
- this.closely(false) // 保存本地,不删除录音文件停止录音
769
- this.$androidUtil.bzLogic('SaveCompeleted', { row: this.msg})
770
- },
771
- sortDetais(result, type) {
772
- let door = Object.assign({}, result)
773
- door.details = []
774
- for (let i = 0; i < result.details.length; i++) {
775
- if (typeof (result.details[i].f_contentmessage) === 'object') {
776
- for (let j = 0; j < result.details[i].f_contentmessage.length; j++) {
777
- if (result.details[i].f_contentmessage[j].indexOf('-') !== -1) {
778
- let k = result.details[i].f_contentmessage[j].indexOf('-')
779
- let newObj = {}
780
- newObj.f_content = result.details[i].f_contentmessage[j].substring(k + 1, result.details[i].f_contentmessage[j].length)
781
- newObj.f_contentmessage = result.details[i].f_contentmessage[j].substring(0, k)
782
- newObj.f_project = result.details[i].f_project
783
- newObj.f_type = type
784
- door.details.push(newObj)
785
- }
786
- }
787
- }
788
- if (typeof (result.details[i].f_content) === 'object' && !result.details[i].f_contentmessage) {
789
- // //tag
790
- for (let l = 0; l < result.details[i].f_content.length; l++) {
791
- let new0bj = {}
792
- new0bj.f_content = result.details[i].f_content[l]
793
- new0bj.f_project = result.details[i].f_project
794
- new0bj.f_type = 'a'
795
- door.details.push(new0bj)
796
- }
797
- }
798
- if (typeof(result.details[i].f_content) === 'string') {
799
- door.details.push(result.details[i])
800
- }
801
- }
802
- return door
803
- },
804
- close() {
805
- this.showhead = true
806
- this.showNorepair = false
807
- }
808
- ,
809
- close1() {
810
- this.showhead = true
811
- this.showCannotrepair = false
812
- },
813
- showmateria(){
814
- this.selectdata = {
815
- f_process_id :this.msg.f_processid,
816
- model:this.msg
817
- }
818
- console.log("传递数据",this.msg)
819
- this.showmaterial = true
820
- },
821
- close2(){
822
- this.showmaterial = false
823
- this.selectdata ={}
824
- }
825
- },
826
- async ready () {
827
- this.$root.$on('tableChenge', (id) => {
828
- this.tablechange_id = id
829
- });
830
- this.savebutten = Vue.config2.telephone.FaultAll.savebutten
831
- this.sfbutten = Vue.config2.telephone.FaultAll.sfbutten?true:false
832
- },
833
- computed: {
834
- stateNoRepair() {
835
- return this.msg.serviceacitivity.find((row) => {
836
- return row.f_result_status === '未维修'
837
- })
838
- },
839
- hunei() {
840
- let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
841
- return row.f_type === '户内维修' // 换表
842
- })
843
- return this.sortDetais(result, 'a')
844
- },
845
- hitchAll() {
846
- let hitchMsg = []
847
- let obj = this.msg.serviceacitivity[0].servicerepair.find((row) => {
848
- return row.f_type === '户内维修' // 户内维修
849
- })
850
- this.obj.details.forEach((row) => {
851
- hitchMsg.push(row)
852
- })
853
- return hitchMsg
854
- },
855
- gaiGuan() {
856
- return this.msg.serviceacitivity[0].servicerepair.find((row) => {
857
- // return row.f_service_type === '改管'
858
- return row.f_type === '改管'
859
- })
860
- },
861
- zhihuan() {
862
- return this.msg.serviceacitivity[0].servicerepair.find((row) => {
863
- // return row.f_service_type === '改管'
864
- return row.f_type === '置换作业'
865
- })
866
- },
867
- zaoju() {
868
- return this.msg.serviceacitivity[0].servicerepair.find((row) => {
869
- // return row.f_service_type === '立管维修'
870
- return row.f_type === '灶具信息'
871
- })
872
- },
873
- reshuiqi() {
874
- return this.msg.serviceacitivity[0].servicerepair.find((row) => {
875
- // return row.f_service_type === '立管维修'
876
- return row.f_type === '热水器信息'
877
- })
878
- },
879
- bigualu() {
880
- return this.msg.serviceacitivity[0].servicerepair.find((row) => {
881
- // return row.f_service_type === '立管维修'
882
- return row.f_type === '壁挂炉信息'
883
- })
884
- },
885
- sanhuanzhuang() {
886
- return this.msg.serviceacitivity[0].servicerepair.find((row) => {
887
- // return row.f_service_type === '立管维修'
888
- return row.f_type === '散户安装'
889
- })
890
- },
891
- sheBeiRepairAll() {
892
- let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
893
- return row.f_type === '设备维修' // 换表
894
- })
895
- //tag)
896
- return this.sortDetais(result, 'b')
897
- },
898
- zaoJuRepairAll() {
899
- let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
900
- return row.f_type === '灶具维修' // 换表
901
- })
902
- return this.sortDetais(result, 'c')
903
- },
904
- troubleDeal() {
905
- return this.msg.serviceacitivity[0].servicerepair.find((row) => {
906
- return row.f_type === '事故处理'
907
- })
908
- }
909
- },
910
- beforeDestroy() {
911
- this.$root.$off('tableChenge');
912
- },
913
- components: {
914
- 'failure-edit': FailureEdit,
915
- 'appinstallation-material': AppInstallationMaterial
916
- }
917
- }
918
- </script>
919
- <style scoped>
920
- .pd-top {
921
- padding-top: 7px;
922
- }
923
- </style>
1
+ <template>
2
+ <div class="auto select-overspread form-horizontal repair-bg " style="padding-bottom:5px;" id="savePhonebut" >
3
+ <div class="bq-parent">
4
+ <blockquote class="blockquote">
5
+ <p>工单上传<a @click="$parent.mute()" style="float:right" href="javascript:void(0)" class="repair-mute-class"><img
6
+ src="../../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a>
7
+ </p>
8
+ </blockquote>
9
+ </div>
10
+ <div class="panel panel-default auto repair-info-content"
11
+ v-if="showhead && msg.serviceacitivity[0].f_result_status != '已完成'">
12
+ <div class="panel-body ">
13
+ <div class="row auto compatible">
14
+ <div class="row auto">
15
+ <div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;" v-if="!show">
16
+ <div class="col-xs-3 col-sm-3 col-md-3">
17
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='confirm("已完成")'>
18
+ 工单完成
19
+ </button>
20
+ </div>
21
+ <div class="col-xs-3 col-sm-3 col-md-3" v-if="isNeedMaterial && !ischeck">
22
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='showmateria'>
23
+ 材料收费
24
+ </button>
25
+ </div>
26
+ <div class="col-xs-3 col-sm-3 col-md-3" v-show="sfbutten && !ischeck">
27
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='gotoOtherCharge'>
28
+ 工单收费
29
+ </button>
30
+ </div>
31
+ <div class="col-xs-3 col-sm-3 col-md-3" v-show="savebutten && !ischeck">
32
+ <button type="button" name="button" class="col-sm-3 btn btn-primary"
33
+ @click='workOrderSave'>
34
+ 临时保存
35
+ </button>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ <div class="panel panel-default auto repair-info-content"
43
+ v-if="msg.serviceacitivity[0].f_result_status == '已完成' && !show">
44
+ <div class="panel-body ">
45
+ <div class="row auto compatible">
46
+ <div class="row auto">
47
+ <div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;" v-show="false">
48
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='saveCompeleted()'>
49
+ 保存
50
+ </button>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <div class="panel panel-default auto repair-info-content form-horizontal" v-if="showNorepair">
57
+ <div>
58
+ <p><big><b>工单未完成</b></big></p>
59
+ </div>
60
+ <div class="row">
61
+ <div class="col-sm-12 form-group form-fix-width">
62
+ <label class="control-label">原因</label>
63
+ <textarea name="name" rows="2" class="form-control ver-textarea"
64
+ v-model="msg.serviceacitivity[0].f_reason"></textarea>
65
+ </div>
66
+ </div>
67
+ <failure-edit :value='msg.serviceacitivity[0].failure' @input='newFailure' v-if="msg.f_workorder_type == '报修单'">
68
+ </failure-edit>
69
+ <!--<div class="row">-->
70
+ <!--<div class="col-sm-12 form-group form-fix-width">-->
71
+ <!--<label class="control-label">选择站点</label>-->
72
+ <!--<v-select :value.sync="msg.serviceacitivity[0].f_department" :value-single="true"-->
73
+ <!--:options='repairers' placeholder='请选择站点'-->
74
+ <!--close-on-select></v-select>-->
75
+ <!--</div>-->
76
+ <!--</div>-->
77
+ <div class="form-group">
78
+ <button type="button" class="btn btn-default pull-right" @click='close'>取消</button>
79
+ <button type="button" class="btn btn-success pull-right" @click='confirm("未完成")'>确认</button>
80
+ </div>
81
+ </div>
82
+ <div class="panel panel-default auto repair-info-content form-horizontal" v-if="showCannotrepair">
83
+ <div>
84
+ <p><big><b>无法完成</b></big></p>
85
+ </div>
86
+ <div class="row">
87
+ <div class="col-sm-12 form-group form-fix-width">
88
+ <label class="control-label">原因</label>
89
+ <textarea name="name" rows="2" class="form-control ver-textarea"
90
+ v-model="msg.serviceacitivity[0].f_reason"></textarea>
91
+ </div>
92
+ </div>
93
+ <failure-edit :value='msg.serviceacitivity[0].failure' @input='newFailure' v-if="msg.f_workorder_type == '报修单'">
94
+ </failure-edit>
95
+ <!--<div class="row">-->
96
+ <!--<div class="col-sm-12 form-group form-fix-width">-->
97
+ <!--<label class="control-label">选择站点</label>-->
98
+ <!--<v-select :value.sync="msg.serviceacitivity[0].f_department" :value-single="true"-->
99
+ <!--:options='repairers' placeholder='请选择站点'-->
100
+ <!--close-on-select></v-select>-->
101
+ <!--</div>-->
102
+ <!--</div>-->
103
+ <div class="row">
104
+ <div class="col-sm-12">
105
+ <button type="button" class="btn btn-default pull-right" @click='close1'>取消</button>
106
+ <button type="button" class="btn btn-success pull-right" @click='cannotRepaer()'>确认</button>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ <modal :show.sync="showmaterial" backdrop="false" style="overflow: scroll;height: 100%">
112
+ <header slot="modal-header" class="modal-header text-center">
113
+ <button type="button" class="close" @click="close2"><span>&times;</span></button>
114
+ <h4 class="modal-title">添加材料</h4>
115
+ </header>
116
+ <article slot="modal-body">
117
+ <appinstallation-material v-if="showmaterial" :selectdata = "selectdata"></appinstallation-material>
118
+ </article>
119
+ <footer slot="modal-footer"></footer>
120
+ </modal>
121
+ </template>
122
+ <script>
123
+ import Vue from 'vue'
124
+ import * as Util from "../../../components/Util"
125
+ import {HttpResetClass} from 'vue-client'
126
+ import FailureEdit from '../../../components/pc/FailureEdit'
127
+ import AppInstallationMaterial from './AppInstallationMaterial'
128
+ import $ from "jquery"
129
+
130
+ export default {
131
+ title: '故障汇总',
132
+ props: {
133
+ msg: {
134
+ type: Object
135
+ },
136
+ savevalid: {
137
+ type: Object
138
+ },
139
+ model: {
140
+ type: Object
141
+ },
142
+ show: {
143
+ type: Boolean,
144
+ default: false
145
+ },
146
+ row: {
147
+ type: Object
148
+ },
149
+ system: '',
150
+ parentPage:'',
151
+ ischeck:{
152
+ type: Boolean,
153
+ default: false
154
+ }
155
+ },
156
+ data() {
157
+ return {
158
+ savebutten:false, // 工单保存按钮
159
+ sfbutten:false, //收费按钮
160
+ fileName: '',
161
+ datajson: '',
162
+ norepair: '',
163
+ showNorepair: false,
164
+ showCannotrepair: false,
165
+ showhead: true,
166
+ repairers : this.$appdata.getParam('站点管理员'),
167
+ config:{},
168
+ othercharge_id: '',
169
+ showmaterial:false,
170
+ tablechange_id: '',
171
+ selectdata:{},
172
+ isNeedMaterial: this.$appdata.getSingleValue('材料收费') == '是',
173
+ }
174
+ },
175
+ methods: {
176
+ saveNoclick() {
177
+ // 禁用点击事件
178
+ $("#savePhonebut").addClass("noclickbut");
179
+ //tag
180
+
181
+ // 5秒后启用点击事件
182
+ setTimeout(function(){
183
+ $("#savePhonebut").removeClass("noclickbut");
184
+ },5000);
185
+ },
186
+ // 停止录音
187
+ closely(isdelete){
188
+ try {
189
+ var startOrStopAudioClipStr;
190
+ if (isdelete===true) {
191
+ //tag
192
+ startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止并删除录音') //停止并删除录音
193
+ }else {
194
+ //tag
195
+ startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止录音') //停止录音
196
+ }
197
+ if (startOrStopAudioClipStr.code == 200) {
198
+ //tag
199
+ return true;
200
+ }else {
201
+ return false;
202
+ }
203
+ } catch (e) {
204
+ console.error("关闭录音方法异常")
205
+ console.error(e)
206
+ return false;
207
+ }
208
+ },
209
+ /* // 录音方法
210
+ record() {
211
+ //tag
212
+ let fileName
213
+ if (!this.f_recording1_path) {
214
+ fileName = Util.guid() + '.amr'
215
+ } else {
216
+ fileName = Util.getFileName(this.f_recording1_path)
217
+ }
218
+ //HostApp.__this__ = this
219
+ /!*调用无限制录音模块*!/
220
+ let startOrStopState = HostApp.startOrStopAudioClip(fileName,"开始录音")
221
+ //tag
222
+ if (startOrStopState.code == 200) {
223
+ this.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
224
+ console.log("录音文件地址"+this.f_recording1_path)
225
+ //tag
226
+ return true;
227
+ }else {
228
+ return false;
229
+ }
230
+ },*/
231
+ // 工单收费
232
+ async gotoOtherCharge() {
233
+ //tag
234
+ let con = {
235
+ conndition: ` f_userinfo_id = '${this.msg.f_userinfo_id}' `
236
+ }
237
+ let http1 = new HttpResetClass()
238
+ let row = await http1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/onlinequeryuser`, {data: con},{
239
+ resolveMsg: '物联网收费成功!!',
240
+ rejectMsg: '物联网收费出错!!!'
241
+ })
242
+ //tag))
243
+ // 去其他收费界面
244
+ let _this = this
245
+ var pardate = {
246
+ _this:_this,
247
+ title:'其他收费',
248
+ safe:false
249
+ }
250
+ this.closely(false)
251
+ _this.$dispatch('gotoson',pardate)
252
+ //tag
253
+ _this.$goto('other_charge', {row: row}, 'self',_this.payback)
254
+ // _this.$goto('create_qrcode', {row: parameter}, 'self',_this.payback)
255
+ },
256
+ payback(msg) {
257
+ if (msg) {
258
+ //tag)
259
+ this.othercharge_id = msg
260
+ }else {
261
+ //tag
262
+ this.$showMessage('支付失败!')
263
+ }
264
+ },
265
+ // 工单结案
266
+ finishRepair(){
267
+ var _this = this
268
+ this.$showMessage('请确认该工单结案!', ['confirm', 'cancel']).then((res) => {
269
+ if (res === 'confirm') {
270
+ this.closely(false)
271
+ _this.confirm("结案")
272
+ }
273
+ })
274
+ },
275
+ deleteEmptyProperty(object){
276
+ for (var i in object) {
277
+ var value = object[i];
278
+ if (typeof value === 'object') {
279
+ if (Array.isArray(value)) {
280
+ if (value.length == 0) {
281
+ delete object[i];
282
+ //tag;
283
+ continue;
284
+ }
285
+ }
286
+ this.deleteEmptyProperty(value);
287
+ if (this.isEmpty(value)) {
288
+ //tag;
289
+ delete object[i];
290
+ //tag;
291
+ }
292
+ } else {
293
+ if (value === '' || value === null || value === undefined) {
294
+ delete object[i];
295
+ //tag;
296
+ } else {
297
+ //tag;
298
+ }
299
+ }
300
+ }
301
+ },
302
+ isEmpty(object) {
303
+ for (var name in object) {
304
+ return false;
305
+ }
306
+ return true;
307
+ },
308
+ // 从图片中删除
309
+ remove(row) {
310
+ this.$androidUtil.delfile(row.android_file)
311
+ let pos = this.model.imgs.findIndex((value) => {
312
+ return value === row
313
+ })
314
+ this.model.imgs.splice(pos, 1)
315
+ },
316
+ // fileName: 回传文件名,传入的带安卓路径url
317
+ // prop: 传入的字段名,没做改动
318
+ cameraCallBack(prop, fileName) {
319
+ // 当前this只能通过HostApp.__tis__获取
320
+ let self = this.$androidUtil.getCallBack(this)
321
+ // 添加新图片
322
+ self.model.imgs.push({
323
+ android_file: self.fileName,
324
+ path: fileName
325
+ })
326
+ },
327
+ takePic() {
328
+ let prop = 'repair'
329
+ let idx = 'aofeng'
330
+ this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
331
+ this.$sandroidUtil.takePic(this, this.cameraCallBack, this.fileName)
332
+ },
333
+ newFailure(value) {
334
+ this.msg.serviceacitivity[0].failure = value
335
+ },
336
+ noRepair() {
337
+ this.showhead = false
338
+ this.showNorepair = true
339
+ this.closely()
340
+ HostApp.backupDatabase()
341
+ },
342
+ cannotRepair() {
343
+ this.showhead = false
344
+ this.showCannotrepair = true
345
+ this.closely()
346
+ // falg:0, 表示第一次上传,批量上传时,flag:1
347
+ // this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg})
348
+ },
349
+ // 测试环境下模拟上传失败
350
+ fail(param) {
351
+ this.msg.serviceacitivity[0].f_result_status = param
352
+ this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg, test: true})
353
+ },
354
+ async workOrderSave(){
355
+ this.norepair = false
356
+ if (this.hunei && this.hunei.details) {
357
+ for (let i = 0; i < this.hunei.details.length; i++) {
358
+ if (this.hunei.details[i].f_project === '未维修') {
359
+ this.norepair = true
360
+ }
361
+ }
362
+ }
363
+ // 用户基本信息转字符串
364
+ this.msg.serviceacitivity[0].f_date_leave = Util.toStandardTimeString()
365
+ this.msg.serviceacitivity[0].f_result_status = '工单保存'
366
+ this.msg.serviceacitivity[0].f_order_man = Vue.user.name
367
+ this.closely(true)
368
+ console.log("保存本地2"+this.msg.f_recording1_path)
369
+ this.deleteEmptyProperty(this.msg)
370
+ let dataone = {
371
+ row: this.msg
372
+ }
373
+ let paramStr = JSON.stringify(dataone)
374
+ // 多长截断一次
375
+ let subLength = 1000
376
+ for (let i = 0; i < paramStr.length; i += subLength) {
377
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
378
+ }
379
+ HostApp.__this__ = this
380
+ HostApp.syncLogic({
381
+ // logic别名,key必须为logic
382
+ 'logic': 'workOrderSave',
383
+ // 回调执行方法名,key必须为callback
384
+ 'callback': 'javascript:HostApp.__this__.localSaveCallBack()',
385
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
386
+ // 执行回调方法传入key为backresult
387
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
388
+ 'backresult': 1
389
+ })
390
+ },
391
+ localSaveCallBack(res){
392
+ if(res.state == 'ok'){
393
+ let result = JSON.parse(res.result)
394
+ if(result.result == '成功'){
395
+ this.$showMessage('工单保存成功!', ['confirm'])
396
+ }else{
397
+ this.$showMessage(`工单保存失败! ${result.errMsg}`, ['confirm'])
398
+ }
399
+ this.$dispatch('tijiao')
400
+ }else {
401
+ this.$showMessage(`保存提交失败!`, ['confirm'])
402
+ }
403
+ },
404
+ // 工单上传
405
+ async confirm(param) {
406
+ this.msg.f_dealtype = this.msg.serviceacitivity[0].f_dealtype || null
407
+ /*//tag)
408
+ if(!this.model.ischange) {
409
+ this.$showMessage('您还为进行换表操作,工单为完成!,')
410
+ return
411
+ }*/
412
+
413
+ this.norepair = false
414
+ if (this.hunei && this.hunei.details) {
415
+ for (let i = 0; i < this.hunei.details.length; i++) {
416
+ if (this.hunei.details[i].f_project === '未维修') {
417
+ this.norepair = true
418
+ }
419
+ }
420
+ }
421
+ if(param != '结案'&& (this.msg.f_workorder_type == '置换通气单'||this.msg.f_workorder_type == '安装单')) {
422
+ // 检测验证是否必填
423
+ var isfinish = this.checkismust()
424
+ if(isfinish.ifmust){
425
+ this.$showMessage(`请录入${isfinish.msg}信息!`, ['confirm'])
426
+ return
427
+ }
428
+ // 检测签名是否完成
429
+ // if(!(this.msg.serviceacitivity[0].f_signname)) {
430
+ // this.$showMessage(`请完成客户签名!`, ['confirm'])
431
+ // return
432
+ // }
433
+ // 检测置换作业是否有异常
434
+ var yinhuanflag = this.checkzhihuanwork()
435
+ if(!yinhuanflag){
436
+ var resy = await this.$showMessage('是否确认该户置换作业异常?', ['confirm', 'cancel'])
437
+ if(resy == 'cancel'){
438
+ return
439
+ }
440
+ this.msg.f_is_abnormal = '异常'
441
+ this.msg.serviceacitivity[0].f_is_abnormal = '异常'
442
+ }
443
+ if(!this.msg.serviceacitivity[0].f_signname) {
444
+ this.$showMessage(`请完成客户签名!`, ['confirm'])
445
+ return
446
+ }
447
+ // 检测置换照片是否已拍
448
+ // var imgflag = this.checkzhihuanimg()
449
+ // if(!(imgflag.check)){
450
+ // this.$showMessage(`${imgflag.title}未拍照!`, ['confirm'])
451
+ // return
452
+ // }
453
+ }
454
+ else if(this.msg.f_workorder_type == '报修单' && this.msg.f_repairtype != '换表' && param != '结案'){
455
+ // 兼容之前模式 做线上线下处理选择
456
+ let checkmust = true
457
+ if(this.msg.serviceacitivity[0].f_dealtype && this.msg.serviceacitivity[0].f_dealtype == '线上处理'){
458
+ checkmust = false
459
+ }
460
+ if(checkmust){
461
+ let isfinish = this.checkismust()
462
+ if(isfinish.ifmust){
463
+ this.$showMessage(`请录入${isfinish.msg}信息!`, ['confirm'])
464
+ return
465
+ }
466
+ if(!(this.msg.serviceacitivity[0].f_signname) && Vue.config.telephone.FaultAll.signature?Vue.config.telephone.FaultAll.signature:false) {
467
+ this.$showMessage(`请完成客户签名!`, ['confirm'])
468
+ return
469
+ }
470
+ let imgflag = this.checkzhihuanimg()
471
+ if(!(imgflag.check)){
472
+ this.$showMessage(`${imgflag.title}未拍照!`, ['confirm'])
473
+ return
474
+ }
475
+ }
476
+ }
477
+
478
+ // }
479
+ // 用户基本信息转字符串
480
+ // if ((this.savevalid.uservalid && this.savevalid.doorvalid) || this.norepair || this.liGuanWeiXou || this.sheBeiRepairAll) {
481
+ this.msg.serviceacitivity[0].f_date_leave = Util.toStandardTimeString()
482
+ this.msg.serviceacitivity[0].f_result_status = param
483
+ this.msg.serviceacitivity[0].f_order_man = Vue.user.name
484
+ this.msg.loginid = Vue.user.id
485
+ this.msg.ischeck = this.ischeck
486
+ // if (!this.savevalid.changetable && this.model.servicerepair && this.model.servicerepair[0].f_if_change) {
487
+ // this.$showMessage('未上传收费!', ['confirm'])
488
+ // } else {
489
+ this.deleteEmptyProperty(this.msg)
490
+ //tag
491
+ this.closely(false) // 保存本地,不删除录音文件停止录音
492
+ // this.msg.f_recording1_path = this.data.f_recording1_path
493
+ console.log("保存本地", this.msg.f_recording1_path)
494
+ //tag)
495
+ this.saveNoclick()
496
+ //tag)
497
+ this.msg.f_tablechange_id=this.tablechange_id
498
+
499
+ let dataone = { flag: 0, row: this.msg }
500
+ //tag)
501
+ let paramStr = JSON.stringify(dataone)
502
+ // 多长截断一次
503
+ let subLength = 1000
504
+ for (let i = 0; i < paramStr.length; i += subLength) {
505
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
506
+ }
507
+ HostApp.__this__ = this
508
+ HostApp.syncLogic({
509
+ // logic别名,key必须为logic
510
+ 'logic': 'upload',
511
+ // 回调执行方法名,key必须为callback
512
+ 'callback': 'javascript:HostApp.__this__.uploadCallback()',
513
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
514
+ // 执行回调方法传入key为backresult
515
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
516
+ 'backresult': 1
517
+ })
518
+ },
519
+ uploadCallback(res){
520
+ let _this = this
521
+ if(res.state == 'ok'){
522
+ let result = JSON.parse(res.result)
523
+ if (result.result === '成功' ) {
524
+ const goSafe = this.$appdata.getSingleValue('维修后进行安检')
525
+ if (goSafe){
526
+ this.$showMessage(`是否前往安检`, ['confirm', 'cancel']).then((res) => {
527
+ let info = this.msg
528
+ if (res === 'confirm') {
529
+ if (!this.msg.f_userinfo_id){
530
+ var pardate = {
531
+ _this:this.$parent.$parent,
532
+ tittle:'在线安检',
533
+ safe:false
534
+ }
535
+ this.$dispatch('gotoson',pardate)
536
+ this.$parent.$parent.$goto('add-plan-item', {item: info}, 'self', function (){
537
+ _this.$parent.$parent.$dispatch('confirm')
538
+ _this.$parent.$parent.$dispatch('tijiao')
539
+ }
540
+ )
541
+ }else {
542
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/查询计划项表信息`,{data:{f_userid:this.msg.f_userinfo_id}}).then((response)=>{
543
+ if(response.data.length!=1){
544
+ this.$showMessage("当前用户有多条表信息,请联系管理员核实进行处理!")
545
+ }else {
546
+ info.f_userinfoid = this.msg.f_userinfo_id
547
+ info.f_userinfo_id = this.msg.f_userinfo_id
548
+ info['f_plan_meters'] = response.data
549
+ info.f_no_checkplan = '无计划安检'
550
+ info.show_temporary_save = 'no'
551
+ var pardate = {
552
+ _this:this.$parent.$parent,
553
+ tittle:'安检详情',
554
+ safe:false
555
+ }
556
+ this.$dispatch('gotoson',pardate)
557
+ this.$parent.$parent.$goto('safecheck-order-v', {item: info, role: 'inspect',parentPage:'CurrentCreate'}, 'self', function (){
558
+ _this.$parent.$parent.$dispatch('confirm')
559
+ _this.$parent.$parent.$dispatch('tijiao')
560
+ }
561
+ )
562
+ }
563
+ })
564
+ }
565
+ }else {
566
+ this.$dispatch('tijiao')
567
+ }
568
+ })
569
+ }else{
570
+ this.$dispatch('tijiao')
571
+ }
572
+ } else {
573
+ this.$showMessage(`保存提交失败!${result.errMsg}`, ['confirm'])
574
+ }
575
+ this.showNorepair = false
576
+ this.showCannotrepair = false
577
+ }else {
578
+ this.$showMessage(`保存提交失败!`, ['confirm'])
579
+ }
580
+ },
581
+ // 检验是否必填 返回 error:{msg:'111',ismust:true}
582
+ checkismust(){
583
+ var error ={
584
+ msg:'',
585
+ ifmust:false
586
+ }
587
+ for(var i = 0;i<this.msg.serviceacitivity[0].servicerepair.length;i++) {
588
+ for (var j = 0; j < this.msg.serviceacitivity[0].servicerepair[i].details.length; j++) {
589
+ if(this.msg.serviceacitivity[0].servicerepair[i].details[j].type == 'checkbox'&&this.msg.serviceacitivity[0].servicerepair[i].details[j].f_content == '无'){
590
+ break;
591
+ }
592
+ if(this.msg.serviceacitivity[0].servicerepair[i].details[j].f_is_must == 'true' && this.msg.serviceacitivity[0].servicerepair[i].details[j].type == 'picture' && this.msg.serviceacitivity[0].servicerepair[i].imgs.length == 0){
593
+ error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
594
+ error.ifmust = true
595
+ return error
596
+ }
597
+ if(this.msg.serviceacitivity[0].servicerepair[i].details[j].f_is_must == 'true' && !(this.msg.serviceacitivity[0].servicerepair[i].details[j].f_content) && this.msg.serviceacitivity[0].servicerepair[i].details[j].type != 'picture' ){
598
+ error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
599
+ error.ifmust = true
600
+ return error
601
+ }
602
+ if(this.msg.f_source == '安检' && this.msg.serviceacitivity[0].servicerepair[i].details[j].f_defect_id && this.msg.serviceacitivity[0].servicerepair[i].details[j].f_content == '已处理'&& !this.msg.serviceacitivity[0].servicerepair[i].details[j].f_first_repairimg){
603
+ error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}的维修照片`
604
+ error.ifmust = true
605
+ return error
606
+ }
607
+ if(this.msg.f_source == '安检' && this.msg.serviceacitivity[0].servicerepair[i].details[j].f_defect_id && !this.msg.serviceacitivity[0].servicerepair[i].details[j].f_content){
608
+ error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
609
+ error.ifmust = true
610
+ return error
611
+ }
612
+ }
613
+ }
614
+ return error
615
+ },
616
+ // checkzhihuanwork 检测置换作业是否正常
617
+ checkzhihuanwork(){
618
+ var isstatus = true
619
+ if(this.zhihuan){
620
+ for(var i = 0;i<this.zhihuan.details.length;i++){
621
+ if(this.zhihuan.details[i].type == 'radio' && this.zhihuan.details[i].f_content){
622
+ if(this.zhihuan.details[i].f_status == 'false'){
623
+ isstatus = false
624
+ break;
625
+ }
626
+ }
627
+ }
628
+ }
629
+ return isstatus
630
+ },
631
+ checkzhihuanimg(){
632
+ var isstatus = {
633
+ check: true,
634
+ title:''
635
+ }
636
+ if(Vue.config.telephone.Outlay.data != undefined){
637
+ let checkimgs = ''
638
+ //tag
639
+ //tag+'22222222222222222')
640
+ if(this.service.f_user_type == '民用'){
641
+ checkimgs = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.msg.f_workorder_type].civil)))
642
+ }else{
643
+ checkimgs = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.msg.f_workorder_type].nocivil)))
644
+ }
645
+ if(checkimgs.length>0){
646
+ for(var i =0;i<checkimgs.length;i++){
647
+ var checkimgstype = checkimgs[i].title
648
+ if(checkimgs[i].checkmust){
649
+ var flag = false
650
+ for(var j =0;j<this.msg.serviceacitivity[0].imgs.length;j++){
651
+ if(this.msg.serviceacitivity[0].imgs[j].imgpath == checkimgstype) {
652
+ flag = true
653
+ break;
654
+ }
655
+ }
656
+ if(!flag){
657
+ isstatus.check = false
658
+ isstatus.title = checkimgstype
659
+ break;
660
+ }
661
+ }
662
+ }
663
+ }
664
+ }
665
+ return isstatus
666
+ },
667
+ checkservice(){
668
+ // 1.先判断灶具
669
+ if(this.zaoju){
670
+ var iszaoju = false
671
+ for(var i = 0;i<this.zaoju.details.length;i++){
672
+ if(this.zaoju.details[i].f_project == '有无灶具设备'){
673
+ if(this.zaoju.details[i].f_content == '有'||this.zaoju.details[i].f_content == ''){
674
+ iszaoju = true
675
+ break;
676
+ }
677
+ }
678
+ }
679
+ if(iszaoju){
680
+ for(var i = 0;i<this.zaoju.details.length;i++){
681
+ if(this.zaoju.details[i].type == 'picture'){
682
+ //tag
683
+ //tag
684
+ if(this.zaoju.imgs.length == 0){
685
+ this.$showMessage('灶具设备未拍照!', ['confirm'])
686
+ return false
687
+ }
688
+ }else{
689
+ if(this.zaoju.details[i].f_content == '' || this.zaoju.details[i].f_content == undefined){
690
+ this.$showMessage('灶具设备信息未填写完整!', ['confirm'])
691
+ return false
692
+ }
693
+ }
694
+ }
695
+ }
696
+ }
697
+ // 2.判断热水器
698
+ if(this.reshuiqi){
699
+ var isreshuiqi = false
700
+ for(var i = 0;i<this.reshuiqi.details.length;i++){
701
+ if(this.reshuiqi.details[i].f_project == '有无热水器设备'){
702
+ if(this.reshuiqi.details[i].f_content == '有'||this.reshuiqi.details[i].f_content == ''){
703
+ isreshuiqi = true
704
+ break;
705
+ }
706
+ }
707
+ }
708
+ if(isreshuiqi){
709
+ for(var i = 0;i<this.reshuiqi.details.length;i++){
710
+ if(this.reshuiqi.details[i].type == 'picture'){
711
+ if(this.reshuiqi.imgs.length == 0){
712
+ this.$showMessage('热水器设备未拍照!', ['confirm'])
713
+ return false
714
+ }
715
+ }else{
716
+ if(this.reshuiqi.details[i].f_content == '' || this.reshuiqi.details[i].f_content == undefined){
717
+ this.$showMessage('热水器设备信息未填写完整!', ['confirm'])
718
+ return false
719
+ }
720
+ }
721
+ }
722
+ }
723
+ }
724
+ // 3.判断壁挂炉
725
+ if(this.bigualu){
726
+ var isbigualu = false
727
+ for(var i = 0;i<this.bigualu.details.length;i++){
728
+ if(this.bigualu.details[i].f_project == '有无壁挂炉设备'){
729
+ if(this.bigualu.details[i].f_content == '有'||this.bigualu.details[i].f_content == ''){
730
+ isbigualu = true
731
+ break;
732
+ }
733
+ }
734
+ }
735
+ if(isbigualu){
736
+ for(var i = 0;i<this.bigualu.details.length;i++){
737
+ if(this.bigualu.details[i].type == 'picture'){
738
+ if(this.bigualu.imgs.length == 0){
739
+ this.$showMessage('壁挂炉设备未拍照!', ['confirm'])
740
+ return false
741
+ }
742
+ }else{
743
+ if(this.bigualu.details[i].f_content == '' || this.bigualu.details[i].f_content == undefined){
744
+ this.$showMessage('壁挂炉设备信息未填写完整!', ['confirm'])
745
+ return false
746
+ }
747
+ }
748
+ }
749
+ }
750
+ }
751
+ return true
752
+ },
753
+ cannotRepaer() {
754
+ this.msg.serviceacitivity[0].f_service_acitivity_type = '未维修'
755
+ this.msg.loginid = Vue.user.id
756
+ let result = this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg})
757
+ if (result.result === '成功') {
758
+ this.$showMessage('保存提交成功!', ['confirm'])
759
+ } else {
760
+ this.$showMessage(`保存提交失败!${JSON.stringify(result)}`, ['confirm'])
761
+ }
762
+ this.showNorepair = false
763
+ this.showCannotrepair = false
764
+ this.$dispatch('tijiao')
765
+ },
766
+ saveCompeleted() {
767
+ this.msg.serviceacitivity[0].baseuserinfo.f_date_level = Util.toStandardTimeString()
768
+ this.closely(false) // 保存本地,不删除录音文件停止录音
769
+ this.$androidUtil.bzLogic('SaveCompeleted', { row: this.msg})
770
+ },
771
+ sortDetais(result, type) {
772
+ let door = Object.assign({}, result)
773
+ door.details = []
774
+ for (let i = 0; i < result.details.length; i++) {
775
+ if (typeof (result.details[i].f_contentmessage) === 'object') {
776
+ for (let j = 0; j < result.details[i].f_contentmessage.length; j++) {
777
+ if (result.details[i].f_contentmessage[j].indexOf('-') !== -1) {
778
+ let k = result.details[i].f_contentmessage[j].indexOf('-')
779
+ let newObj = {}
780
+ newObj.f_content = result.details[i].f_contentmessage[j].substring(k + 1, result.details[i].f_contentmessage[j].length)
781
+ newObj.f_contentmessage = result.details[i].f_contentmessage[j].substring(0, k)
782
+ newObj.f_project = result.details[i].f_project
783
+ newObj.f_type = type
784
+ door.details.push(newObj)
785
+ }
786
+ }
787
+ }
788
+ if (typeof (result.details[i].f_content) === 'object' && !result.details[i].f_contentmessage) {
789
+ // //tag
790
+ for (let l = 0; l < result.details[i].f_content.length; l++) {
791
+ let new0bj = {}
792
+ new0bj.f_content = result.details[i].f_content[l]
793
+ new0bj.f_project = result.details[i].f_project
794
+ new0bj.f_type = 'a'
795
+ door.details.push(new0bj)
796
+ }
797
+ }
798
+ if (typeof(result.details[i].f_content) === 'string') {
799
+ door.details.push(result.details[i])
800
+ }
801
+ }
802
+ return door
803
+ },
804
+ close() {
805
+ this.showhead = true
806
+ this.showNorepair = false
807
+ }
808
+ ,
809
+ close1() {
810
+ this.showhead = true
811
+ this.showCannotrepair = false
812
+ },
813
+ showmateria(){
814
+ this.selectdata = {
815
+ f_process_id :this.msg.f_processid,
816
+ model:this.msg
817
+ }
818
+ console.log("传递数据",this.msg)
819
+ this.showmaterial = true
820
+ },
821
+ close2(){
822
+ this.showmaterial = false
823
+ this.selectdata ={}
824
+ }
825
+ },
826
+ async ready () {
827
+ this.$root.$on('tableChenge', (id) => {
828
+ this.tablechange_id = id
829
+ });
830
+ this.savebutten = Vue.config2.telephone.FaultAll.savebutten
831
+ this.sfbutten = Vue.config2.telephone.FaultAll.sfbutten?true:false
832
+ },
833
+ computed: {
834
+ stateNoRepair() {
835
+ return this.msg.serviceacitivity.find((row) => {
836
+ return row.f_result_status === '未维修'
837
+ })
838
+ },
839
+ hunei() {
840
+ let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
841
+ return row.f_type === '户内维修' // 换表
842
+ })
843
+ return this.sortDetais(result, 'a')
844
+ },
845
+ hitchAll() {
846
+ let hitchMsg = []
847
+ let obj = this.msg.serviceacitivity[0].servicerepair.find((row) => {
848
+ return row.f_type === '户内维修' // 户内维修
849
+ })
850
+ this.obj.details.forEach((row) => {
851
+ hitchMsg.push(row)
852
+ })
853
+ return hitchMsg
854
+ },
855
+ gaiGuan() {
856
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
857
+ // return row.f_service_type === '改管'
858
+ return row.f_type === '改管'
859
+ })
860
+ },
861
+ zhihuan() {
862
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
863
+ // return row.f_service_type === '改管'
864
+ return row.f_type === '置换作业'
865
+ })
866
+ },
867
+ zaoju() {
868
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
869
+ // return row.f_service_type === '立管维修'
870
+ return row.f_type === '灶具信息'
871
+ })
872
+ },
873
+ reshuiqi() {
874
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
875
+ // return row.f_service_type === '立管维修'
876
+ return row.f_type === '热水器信息'
877
+ })
878
+ },
879
+ bigualu() {
880
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
881
+ // return row.f_service_type === '立管维修'
882
+ return row.f_type === '壁挂炉信息'
883
+ })
884
+ },
885
+ sanhuanzhuang() {
886
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
887
+ // return row.f_service_type === '立管维修'
888
+ return row.f_type === '散户安装'
889
+ })
890
+ },
891
+ sheBeiRepairAll() {
892
+ let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
893
+ return row.f_type === '设备维修' // 换表
894
+ })
895
+ //tag)
896
+ return this.sortDetais(result, 'b')
897
+ },
898
+ zaoJuRepairAll() {
899
+ let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
900
+ return row.f_type === '灶具维修' // 换表
901
+ })
902
+ return this.sortDetais(result, 'c')
903
+ },
904
+ troubleDeal() {
905
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
906
+ return row.f_type === '事故处理'
907
+ })
908
+ }
909
+ },
910
+ beforeDestroy() {
911
+ this.$root.$off('tableChenge');
912
+ },
913
+ components: {
914
+ 'failure-edit': FailureEdit,
915
+ 'appinstallation-material': AppInstallationMaterial
916
+ }
917
+ }
918
+ </script>
919
+ <style scoped>
920
+ .pd-top {
921
+ padding-top: 7px;
922
+ }
923
+ </style>