telephone-clients 3.0.104-10 → 3.0.104-100

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 (99) hide show
  1. package/package.json +3 -3
  2. package/src/App.vue +54 -54
  3. package/src/components/android/ImgArea.vue +80 -0
  4. package/src/components/guoxin/Console.vue +42 -14
  5. package/src/components/guoxin/call.state.api.js +3 -1
  6. package/src/components/pc/ComplainWork.vue +3 -0
  7. package/src/components/pc/RecordListLeft.vue +80 -10
  8. package/src/components/pc/RepairsWork.vue +33 -3
  9. package/src/components/pc/RoleSelector.vue +7 -1
  10. package/src/components/pc/Seekwork.vue +3 -0
  11. package/src/components/pc/SiteSend.vue +38 -1
  12. package/src/components/pc/TelLossList.vue +20 -3
  13. package/src/components/pc/WorkHistory.vue +1 -1
  14. package/src/components/pc/WorkList.vue +4 -3
  15. package/src/components/pc/WorkListAllNew.vue +16 -8
  16. package/src/components/pc/WorkListNew.vue +722 -712
  17. package/src/components/sendsingle/onlinequeryuser.vue +1 -1
  18. package/src/components/telcount/TelByOrderMan.vue +22 -4
  19. package/src/components/telreport/RepairsDetailsReport.vue +2 -2
  20. package/src/components/telreport/TrafficClassificationReport.vue +13 -13
  21. package/src/components/telreport/Trafficassess.vue +2 -2
  22. package/src/components/temp/HandplanInfo.vue +5 -1
  23. package/src/components/temp/InstructInfo.vue +1 -1
  24. package/src/components/temp/SecuritycheckInfo.vue +14 -0
  25. package/src/components/workorder/RepairDetails.vue +8 -2
  26. package/src/components/workorder/RepairInfo.vue +3 -3
  27. package/src/components/workorder/RepairPaperAndroid.vue +351 -0
  28. package/src/components/workorder/ServiceOnlineQuery.vue +306 -0
  29. package/src/components/workorder/TemporarySingle.vue +346 -302
  30. package/src/filiale/furuike/pc/QueryVisitHistory.vue +14 -1
  31. package/src/filiale/furuike/pc/WorkHistory.vue +576 -576
  32. package/src/filiale/hanzhong/telephone.js +1 -1
  33. package/src/filiale/jiaocheng/android/createQRcode.vue +204 -0
  34. package/src/filiale/jiaocheng/android/onlineBuyGas.vue +637 -0
  35. package/src/filiale/jiaocheng/telephone.js +8 -0
  36. package/src/filiale/jiaocheng/telephoneAndroid.js +15 -0
  37. package/src/filiale/lixian/onlineChangeMeter.vue +481 -0
  38. package/src/filiale/lixian/onlineoperation.vue +606 -0
  39. package/src/filiale/lixian/onlinequeryuser.vue +509 -0
  40. package/src/filiale/lixian/telephoneAndroid.js +23 -0
  41. package/src/filiale/qianneng/android/AppInstallationMaterial.vue +880 -845
  42. package/src/filiale/qianneng/android/TemporarySingle.vue +537 -537
  43. package/src/filiale/qianneng/pc/MaterialDetailed.vue +260 -260
  44. package/src/filiale/qianneng/pc/NewRepairPaper.vue +467 -467
  45. package/src/filiale/qianneng/pc/RepairsWork.vue +992 -992
  46. package/src/filiale/qianneng/pc/WorkListAllNew.vue +757 -757
  47. package/src/filiale/qianneng/pc/changetable.vue +273 -273
  48. package/src/filiale/qianneng/telephone.js +22 -22
  49. package/src/filiale/rizhao/pc/IgnitionVentilation.vue +0 -1
  50. package/src/filiale/rizhao/pc/RepairsWork.vue +0 -1
  51. package/src/filiale/rizhao/pc/WorkListAllNew.vue +11 -5
  52. package/src/filiale/rizhao/telephone.js +1 -1
  53. package/src/filiale/shanxian/android/RepairFirstV.vue +3 -0
  54. package/src/filiale/shanxian/pc/TelFindUser.vue +310 -0
  55. package/src/filiale/shanxian/pc/WorkList.vue +2 -2
  56. package/src/filiale/shanxian/telephone.js +1 -0
  57. package/src/filiale/shexian/android/AddMyTask.vue +7 -0
  58. package/src/filiale/shexian/android/RepairFirstV.vue +5 -0
  59. package/src/filiale/shexian/android/RepairInfo.vue +1 -0
  60. package/src/filiale/shexian/pc/TelAgentVoiceReport.vue +9 -9
  61. package/src/filiale/shexian/pc/TelByRepairType.vue +3 -3
  62. package/src/filiale/shexian/pc/WorkList.vue +4 -1
  63. package/src/filiale/shexian/pc/WorkListAllNew.vue +14 -1
  64. package/src/filiale/tongchuan/android/RepairDetails.vue +623 -0
  65. package/src/filiale/tongchuan/pc/AnalysisMain.vue +7 -7
  66. package/src/filiale/tongchuan/pc/RepairsWork.vue +8 -0
  67. package/src/filiale/tongchuan/pc/UserWork.vue +8 -0
  68. package/src/filiale/tongchuan/telephoneAndroid.js +1 -0
  69. package/src/filiale/wenxi/android/FaultAll.vue +710 -0
  70. package/src/filiale/wenxi/android/PhoneUpUserinfo.vue +73 -162
  71. package/src/filiale/wenxi/android/RepairOrderV.vue +1 -1
  72. package/src/filiale/wenxi/android/ZHihuanFirst.vue +149 -129
  73. package/src/filiale/wenxi/pc/DistributeWork.vue +1 -1
  74. package/src/filiale/wenxi/pc/RecordListLeft.vue +272 -0
  75. package/src/filiale/wenxi/pc/RepairsWork.vue +143 -64
  76. package/src/filiale/wenxi/pc/TelAgentVoiceReport.vue +290 -0
  77. package/src/filiale/wenxi/pc/TelLossList.vue +272 -0
  78. package/src/filiale/wenxi/telephone.js +4 -0
  79. package/src/filiale/wenxi/telephoneAndroid.js +2 -1
  80. package/src/filiale/wuhai/telephone.js +1 -1
  81. package/src/filiale/yuncheng/android/LdapHelper.js +75 -0
  82. package/src/filiale/yuncheng/android/Outlay.vue +201 -0
  83. package/src/filiale/yuncheng/android/RepairInfo.vue +163 -0
  84. package/src/filiale/yuncheng/android/RepairOrderV.vue +1483 -0
  85. package/src/filiale/yuncheng/android/RepairUserInfo.vue +390 -0
  86. package/src/filiale/yuncheng/android/RightTree.vue +218 -0
  87. package/src/filiale/yuncheng/android/TemporarySingle.vue +522 -0
  88. package/src/filiale/yuncheng/android/ZHihuanFirst.vue +541 -0
  89. package/src/filiale/yuncheng/pc/DistributeWork.vue +199 -0
  90. package/src/filiale/yuncheng/pc/GasWork.vue +773 -0
  91. package/src/filiale/yuncheng/pc/TelFindUser.vue +31 -11
  92. package/src/filiale/yuncheng/pc/WorkList.vue +823 -0
  93. package/src/filiale/yuncheng/pc/WorkListAllNew.vue +781 -0
  94. package/src/filiale/yuncheng/telephone.js +5 -1
  95. package/src/filiale/yuncheng/telephoneAndroid.js +19 -0
  96. package/src/filiale/zhongyi/pc/WorkListAllNew.vue +2 -1
  97. package/src/main.js +1 -1
  98. package/src/telephone-android.js +7 -0
  99. package/src/telephone.js +1 -1
@@ -0,0 +1,710 @@
1
+ <template>
2
+ <div class="auto select-overspread form-horizontal repair-bg " style="padding-bottom:5px;">
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">
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">
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">
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="form-group">
70
+ <button type="button" class="btn btn-default pull-right" @click='close'>取消</button>
71
+ <button type="button" class="btn btn-success pull-right" @click='confirm("未完成")'>确认</button>
72
+ </div>
73
+ </div>
74
+ <div class="panel panel-default auto repair-info-content form-horizontal" v-if="showCannotrepair">
75
+ <div>
76
+ <p><big><b>无法完成</b></big></p>
77
+ </div>
78
+ <div class="row">
79
+ <div class="col-sm-12 form-group form-fix-width">
80
+ <label class="control-label">原因</label>
81
+ <textarea name="name" rows="2" class="form-control ver-textarea"
82
+ v-model="msg.serviceacitivity[0].f_reason"></textarea>
83
+ </div>
84
+ </div>
85
+ <failure-edit :value='msg.serviceacitivity[0].failure' @input='newFailure' v-if="msg.f_workorder_type == '报修单'">
86
+ </failure-edit>
87
+ <div class="row">
88
+ <div class="col-sm-12">
89
+ <button type="button" class="btn btn-default pull-right" @click='close1'>取消</button>
90
+ <button type="button" class="btn btn-success pull-right" @click='cannotRepaer()'>确认</button>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ <modal :show.sync="showmaterial" backdrop="false" style="overflow: scroll;height: 100%">
96
+ <header slot="modal-header" class="modal-header text-center">
97
+ <button type="button" class="close" @click="close2"><span>&times;</span></button>
98
+ <h4 class="modal-title">添加材料</h4>
99
+ </header>
100
+ <article slot="modal-body">
101
+ <appinstallation-material v-if="showmaterial" :selectdata = "selectdata"></appinstallation-material>
102
+ </article>
103
+ <footer slot="modal-footer"></footer>
104
+ </modal>
105
+ </template>
106
+ <script>
107
+ import Vue from 'vue'
108
+ import * as Util from '../../../components/Util'
109
+ import {HttpResetClass} from 'vue-client'
110
+ import FailureEdit from '../../../components/pc/FailureEdit'
111
+ import AppInstallationMaterial from './../../../components/workorder/AppInstallationMaterial'
112
+ export default {
113
+ title: '故障汇总',
114
+ props: {
115
+ msg: {
116
+ type: Object
117
+ },
118
+ savevalid: {
119
+ type: Object
120
+ },
121
+ model: {
122
+ type: Object
123
+ },
124
+ show: {
125
+ type: Boolean,
126
+ default: false
127
+ },
128
+ row: {
129
+ type: Object
130
+ },
131
+ system: '',
132
+ parentPage:''
133
+ },
134
+ data() {
135
+ return {
136
+ savebutten:false, // 工单保存按钮
137
+ sfbutten:false, //收费按钮
138
+ fileName: '',
139
+ datajson: '',
140
+ norepair: '',
141
+ showNorepair: false,
142
+ showCannotrepair: false,
143
+ showhead: true,
144
+ repairers : this.$appdata.getParam('站点管理员'),
145
+ config:{},
146
+ othercharge_id: '',
147
+ showmaterial:false,
148
+ selectdata:{},
149
+ isNeedMaterial: this.$appdata.getSingleValue('材料收费') == '是',
150
+ }
151
+ },
152
+ methods: {
153
+ closely(isdelete){
154
+ try {
155
+ var startOrStopAudioClipStr;
156
+ if (isdelete===true) {
157
+ startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止并删除录音') //停止并删除录音
158
+ }else {
159
+ startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止录音') //停止录音
160
+ }
161
+ if (startOrStopAudioClipStr.code == 200) {
162
+ return true;
163
+ }else {
164
+ return false;
165
+ }
166
+ } catch (e) {
167
+ console.error("关闭录音方法异常")
168
+ console.error(e)
169
+ return false;
170
+ }
171
+ },
172
+ async gotoOtherCharge() {
173
+ let con = {
174
+ conndition: ` f_userinfo_id = '${this.msg.f_userinfo_id}' and f_table_state = '正常' `
175
+ }
176
+ let http1 = new HttpResetClass()
177
+ let row = await http1.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/sql/onlinequeryuser`, {data: con},{
178
+ resolveMsg: '物联网收费成功!!',
179
+ rejectMsg: '物联网收费出错!!!'
180
+ })
181
+ let _this = this
182
+ var pardate = {
183
+ _this:_this,
184
+ title:'其他收费',
185
+ safe:false
186
+ }
187
+ this.closely(false)
188
+ _this.$dispatch('gotoson',pardate)
189
+ _this.$goto('other_charge', {row: row}, 'self',_this.payback)
190
+ },
191
+ payback(msg) {
192
+ if (msg) {
193
+ this.othercharge_id = msg
194
+ }else {
195
+ this.$showMessage('支付失败!')
196
+ }
197
+ },
198
+ finishRepair(){
199
+ var _this = this
200
+ this.$showMessage('请确认该工单结案!', ['confirm', 'cancel']).then((res) => {
201
+ if (res === 'confirm') {
202
+ this.closely(false)
203
+ _this.confirm("结案")
204
+ }
205
+ })
206
+ },
207
+ deleteEmptyProperty(object){
208
+ for (var i in object) {
209
+ var value = object[i];
210
+ if (typeof value === 'object') {
211
+ if (Array.isArray(value)) {
212
+ if (value.length == 0) {
213
+ delete object[i];
214
+ continue;
215
+ }
216
+ }
217
+ this.deleteEmptyProperty(value);
218
+ if (this.isEmpty(value)) {
219
+ delete object[i];
220
+ }
221
+ } else {
222
+ if (value === '' || value === null || value === undefined) {
223
+ delete object[i];
224
+ } else {
225
+ }
226
+ }
227
+ }
228
+ },
229
+ isEmpty(object) {
230
+ for (var name in object) {
231
+ return false;
232
+ }
233
+ return true;
234
+ },
235
+ remove(row) {
236
+ this.$androidUtil.delfile(row.android_file)
237
+ let pos = this.model.imgs.findIndex((value) => {
238
+ return value === row
239
+ })
240
+ this.model.imgs.splice(pos, 1)
241
+ },
242
+ cameraCallBack(prop, fileName) {
243
+ let self = this.$androidUtil.getCallBack(this)
244
+ self.model.imgs.push({
245
+ android_file: self.fileName,
246
+ path: fileName
247
+ })
248
+ },
249
+ takePic() {
250
+ let prop = 'repair'
251
+ let idx = 'aofeng'
252
+ this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
253
+ this.$sandroidUtil.takePic(this, this.cameraCallBack, this.fileName)
254
+ },
255
+ newFailure(value) {
256
+ this.msg.serviceacitivity[0].failure = value
257
+ },
258
+ noRepair() {
259
+ this.showhead = false
260
+ this.showNorepair = true
261
+ this.closely()
262
+ HostApp.backupDatabase()
263
+ },
264
+ cannotRepair() {
265
+ this.showhead = false
266
+ this.showCannotrepair = true
267
+ this.closely()
268
+ },
269
+ // 测试环境下模拟上传失败
270
+ fail(param) {
271
+ this.msg.serviceacitivity[0].f_result_status = param
272
+ this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg, test: true})
273
+ },
274
+ async workOrderSave(){
275
+ this.norepair = false
276
+ if (this.hunei && this.hunei.details) {
277
+ for (let i = 0; i < this.hunei.details.length; i++) {
278
+ if (this.hunei.details[i].f_project === '未维修') {
279
+ this.norepair = true
280
+ }
281
+ }
282
+ }
283
+ // 用户基本信息转字符串
284
+ this.msg.serviceacitivity[0].f_date_leave = Util.toStandardTimeString()
285
+ this.msg.serviceacitivity[0].f_result_status = '工单保存'
286
+ this.msg.serviceacitivity[0].f_order_man = Vue.user.name
287
+ this.closely(true)
288
+ console.log("保存本地2"+this.msg.f_recording1_path)
289
+ this.deleteEmptyProperty(this.msg)
290
+ HostApp.__this__ = this
291
+ HostApp.logicWithHint({
292
+ 'logic': 'workOrderSave',
293
+ 'callback': 'javascript:HostApp.__this__.localSaveCallBack()',
294
+ 'data': {row: this.msg},
295
+ 'backresult': 1
296
+ })
297
+ },
298
+ localSaveCallBack(res){
299
+ if(res.state == 'ok'){
300
+ let result = JSON.parse(res.result)
301
+ if(result.result == '成功'){
302
+ this.$showMessage('工单保存成功!', ['confirm'])
303
+ }else{
304
+ this.$showMessage(`工单保存失败! ${result.errMsg}`, ['confirm'])
305
+ }
306
+ this.$dispatch('tijiao')
307
+ }else {
308
+ this.$showMessage(`保存提交失败!`, ['confirm'])
309
+ }
310
+ },
311
+ async confirm(param) {
312
+ this.norepair = false
313
+ if (this.hunei && this.hunei.details) {
314
+ for (let i = 0; i < this.hunei.details.length; i++) {
315
+ if (this.hunei.details[i].f_project === '未维修') {
316
+ this.norepair = true
317
+ }
318
+ }
319
+ }
320
+ if(param != '结案'&& (this.msg.f_workorder_type == '置换通气单'||this.msg.f_workorder_type == '安装单')) {
321
+ var isfinish = this.checkismust()
322
+ if(isfinish.ifmust){
323
+ this.$showMessage(`请录入${isfinish.msg}信息!`, ['confirm'])
324
+ return
325
+ }
326
+ if(!(this.msg.serviceacitivity[0].f_signname) && this.msg.f_workorder_type == '置换通气单' && Vue.config.telephone.FaultAll.signature?Vue.config.telephone.FaultAll.signature:false) {
327
+ this.$showMessage(`请完成客户签名!`, ['confirm'])
328
+ return
329
+ }
330
+ let imgflag = this.checkzhihuanimg()
331
+ if(!(imgflag.check) && this.msg.f_workorder_type == '置换通气单'){
332
+ this.$showMessage(`${imgflag.title}未拍照!`, ['confirm'])
333
+ return
334
+ }
335
+ var yinhuanflag = this.checkzhihuanwork()
336
+ if(!yinhuanflag){
337
+ var resy = await this.$showMessage('是否确认该户置换作业异常?', ['confirm', 'cancel'])
338
+ if(resy == 'cancel'){
339
+ return
340
+ }
341
+ this.msg.f_is_abnormal = '异常'
342
+ this.msg.serviceacitivity[0].f_is_abnormal = '异常'
343
+ }
344
+ }
345
+ else if(this.msg.f_workorder_type == '报修单' && param != '结案'){
346
+ let isfinish = this.checkismust()
347
+ if(isfinish.ifmust){
348
+ this.$showMessage(`请录入${isfinish.msg}信息!`, ['confirm'])
349
+ return
350
+ }
351
+ if(!(this.msg.serviceacitivity[0].f_signname) && Vue.config.telephone.FaultAll.signature?Vue.config.telephone.FaultAll.signature:false) {
352
+ this.$showMessage(`请完成客户签名!`, ['confirm'])
353
+ return
354
+ }
355
+ let imgflag = this.checkzhihuanimg()
356
+ if(!(imgflag.check)){
357
+ this.$showMessage(`${imgflag.title}未拍照!`, ['confirm'])
358
+ return
359
+ }
360
+ }
361
+ this.msg.serviceacitivity[0].f_date_leave = Util.toStandardTimeString()
362
+ this.msg.serviceacitivity[0].f_result_status = param
363
+ this.msg.serviceacitivity[0].f_order_man = Vue.user.name
364
+ this.msg.loginid = Vue.user.id
365
+ this.deleteEmptyProperty(this.msg)
366
+ this.closely(false) // 保存本地,不删除录音文件停止录音
367
+ console.log("保存本地", this.msg.f_recording1_path)
368
+ HostApp.__this__ = this
369
+ HostApp.logicWithHint({
370
+ 'logic': 'upload',
371
+ 'callback': 'javascript:HostApp.__this__.uploadCallback()',
372
+ 'data': {flag: 0, row: this.msg},
373
+ 'backresult': 1
374
+ })
375
+ },
376
+ uploadCallback(res){
377
+ if(res.state == 'ok'){
378
+ let result = JSON.parse(res.result)
379
+ if (result.result === '成功') {
380
+ this.$showMessage('保存提交成功!', ['confirm'])
381
+ } else {
382
+ this.$showMessage(`保存提交失败!${result.errMsg}`, ['confirm'])
383
+ }
384
+ this.showNorepair = false
385
+ this.showCannotrepair = false
386
+ this.$dispatch('tijiao')
387
+ }else {
388
+ this.$showMessage(`保存提交失败!`, ['confirm'])
389
+ }
390
+ },
391
+ checkismust(){
392
+ var error ={
393
+ msg:'',
394
+ ifmust:false
395
+ }
396
+ for(var i = 0;i<this.msg.serviceacitivity[0].servicerepair.length;i++) {
397
+ for (var j = 0; j < this.msg.serviceacitivity[0].servicerepair[i].details.length; j++) {
398
+ if(this.msg.serviceacitivity[0].servicerepair[i].details[j].type == 'checkbox'&&this.msg.serviceacitivity[0].servicerepair[i].details[j].f_content == '无'){
399
+ break;
400
+ }
401
+ 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){
402
+ error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
403
+ error.ifmust = true
404
+ return error
405
+ }
406
+ 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' ){
407
+ error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
408
+ error.ifmust = true
409
+ return error
410
+ }
411
+ 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){
412
+ error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}的维修照片`
413
+ error.ifmust = true
414
+ return error
415
+ }
416
+ 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){
417
+ error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
418
+ error.ifmust = true
419
+ return error
420
+ }
421
+ }
422
+ }
423
+ return error
424
+ },
425
+ checkzhihuanwork(){
426
+ var isstatus = true
427
+ if(this.zhihuan){
428
+ for(var i = 0;i<this.zhihuan.details.length;i++){
429
+ if(this.zhihuan.details[i].type == 'radio' && this.zhihuan.details[i].f_content){
430
+ if(this.zhihuan.details[i].f_status == 'false'){
431
+ isstatus = false
432
+ break;
433
+ }
434
+ }
435
+ }
436
+ }
437
+ return isstatus
438
+ },
439
+ checkzhihuanimg(){
440
+ var isstatus = {
441
+ check: true,
442
+ title:''
443
+ }
444
+ if(Vue.config.telephone.Outlay.data != undefined){
445
+ let checkimgs = ''
446
+ if(this.service.f_user_type == '民用'){
447
+ checkimgs = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.msg.f_workorder_type].civil)))
448
+ }else{
449
+ checkimgs = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.msg.f_workorder_type].nocivil)))
450
+ }
451
+ if(checkimgs.length>0){
452
+ for(var i =0;i<checkimgs.length;i++){
453
+ var checkimgstype = checkimgs[i].title
454
+ if(checkimgs[i].checkmust){
455
+ var flag = false
456
+ for(var j =0;j<this.msg.serviceacitivity[0].imgs.length;j++){
457
+ if(this.msg.serviceacitivity[0].imgs[j].imgpath == checkimgstype) {
458
+ flag = true
459
+ break;
460
+ }
461
+ }
462
+ if(!flag){
463
+ isstatus.check = false
464
+ isstatus.title = checkimgstype
465
+ break;
466
+ }
467
+ }
468
+ }
469
+ }
470
+ }
471
+ return isstatus
472
+ },
473
+ checkservice(){
474
+ if(this.zaoju){
475
+ var iszaoju = false
476
+ for(var i = 0;i<this.zaoju.details.length;i++){
477
+ if(this.zaoju.details[i].f_project == '有无灶具设备'){
478
+ if(this.zaoju.details[i].f_content == '有'||this.zaoju.details[i].f_content == ''){
479
+ iszaoju = true
480
+ break;
481
+ }
482
+ }
483
+ }
484
+ if(iszaoju){
485
+ for(var i = 0;i<this.zaoju.details.length;i++){
486
+ if(this.zaoju.details[i].type == 'picture'){
487
+ if(this.zaoju.imgs.length == 0){
488
+ this.$showMessage('灶具设备未拍照!', ['confirm'])
489
+ return false
490
+ }
491
+ }else{
492
+ if(this.zaoju.details[i].f_content == '' || this.zaoju.details[i].f_content == undefined){
493
+ this.$showMessage('灶具设备信息未填写完整!', ['confirm'])
494
+ return false
495
+ }
496
+ }
497
+ }
498
+ }
499
+ }
500
+ if(this.reshuiqi){
501
+ var isreshuiqi = false
502
+ for(var i = 0;i<this.reshuiqi.details.length;i++){
503
+ if(this.reshuiqi.details[i].f_project == '有无热水器设备'){
504
+ if(this.reshuiqi.details[i].f_content == '有'||this.reshuiqi.details[i].f_content == ''){
505
+ isreshuiqi = true
506
+ break;
507
+ }
508
+ }
509
+ }
510
+ if(isreshuiqi){
511
+ for(var i = 0;i<this.reshuiqi.details.length;i++){
512
+ if(this.reshuiqi.details[i].type == 'picture'){
513
+ if(this.reshuiqi.imgs.length == 0){
514
+ this.$showMessage('热水器设备未拍照!', ['confirm'])
515
+ return false
516
+ }
517
+ }else{
518
+ if(this.reshuiqi.details[i].f_content == '' || this.reshuiqi.details[i].f_content == undefined){
519
+ this.$showMessage('热水器设备信息未填写完整!', ['confirm'])
520
+ return false
521
+ }
522
+ }
523
+ }
524
+ }
525
+ }
526
+ if(this.bigualu){
527
+ var isbigualu = false
528
+ for(var i = 0;i<this.bigualu.details.length;i++){
529
+ if(this.bigualu.details[i].f_project == '有无壁挂炉设备'){
530
+ if(this.bigualu.details[i].f_content == '有'||this.bigualu.details[i].f_content == ''){
531
+ isbigualu = true
532
+ break;
533
+ }
534
+ }
535
+ }
536
+ if(isbigualu){
537
+ for(var i = 0;i<this.bigualu.details.length;i++){
538
+ if(this.bigualu.details[i].type == 'picture'){
539
+ if(this.bigualu.imgs.length == 0){
540
+ this.$showMessage('壁挂炉设备未拍照!', ['confirm'])
541
+ return false
542
+ }
543
+ }else{
544
+ if(this.bigualu.details[i].f_content == '' || this.bigualu.details[i].f_content == undefined){
545
+ this.$showMessage('壁挂炉设备信息未填写完整!', ['confirm'])
546
+ return false
547
+ }
548
+ }
549
+ }
550
+ }
551
+ }
552
+ return true
553
+ },
554
+ cannotRepaer() {
555
+ this.msg.serviceacitivity[0].f_service_acitivity_type = '未维修'
556
+ this.msg.loginid = Vue.user.id
557
+ let result = this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg})
558
+ if (result.result === '成功') {
559
+ this.$showMessage('保存提交成功!', ['confirm'])
560
+ } else {
561
+ this.$showMessage(`保存提交失败!${JSON.stringify(result)}`, ['confirm'])
562
+ }
563
+ this.showNorepair = false
564
+ this.showCannotrepair = false
565
+ this.$dispatch('tijiao')
566
+ },
567
+ saveCompeleted() {
568
+ this.msg.serviceacitivity[0].baseuserinfo.f_date_level = Util.toStandardTimeString()
569
+ this.closely(false) // 保存本地,不删除录音文件停止录音
570
+ this.$androidUtil.bzLogic('SaveCompeleted', { row: this.msg})
571
+ },
572
+ sortDetais(result, type) {
573
+ let door = Object.assign({}, result)
574
+ door.details = []
575
+ for (let i = 0; i < result.details.length; i++) {
576
+ if (typeof (result.details[i].f_contentmessage) === 'object') {
577
+ for (let j = 0; j < result.details[i].f_contentmessage.length; j++) {
578
+ if (result.details[i].f_contentmessage[j].indexOf('-') !== -1) {
579
+ let k = result.details[i].f_contentmessage[j].indexOf('-')
580
+ let newObj = {}
581
+ newObj.f_content = result.details[i].f_contentmessage[j].substring(k + 1, result.details[i].f_contentmessage[j].length)
582
+ newObj.f_contentmessage = result.details[i].f_contentmessage[j].substring(0, k)
583
+ newObj.f_project = result.details[i].f_project
584
+ newObj.f_type = type
585
+ door.details.push(newObj)
586
+ }
587
+ }
588
+ }
589
+ if (typeof (result.details[i].f_content) === 'object' && !result.details[i].f_contentmessage) {
590
+ for (let l = 0; l < result.details[i].f_content.length; l++) {
591
+ let new0bj = {}
592
+ new0bj.f_content = result.details[i].f_content[l]
593
+ new0bj.f_project = result.details[i].f_project
594
+ new0bj.f_type = 'a'
595
+ door.details.push(new0bj)
596
+ }
597
+ }
598
+ if (typeof(result.details[i].f_content) === 'string') {
599
+ door.details.push(result.details[i])
600
+ }
601
+ }
602
+ return door
603
+ },
604
+ close() {
605
+ this.showhead = true
606
+ this.showNorepair = false
607
+ }
608
+ ,
609
+ close1() {
610
+ this.showhead = true
611
+ this.showCannotrepair = false
612
+ },
613
+ showmateria(){
614
+ this.selectdata = {
615
+ f_process_id :this.msg.f_processid,
616
+ model:this.msg
617
+ }
618
+ console.log("传递数据",this.msg)
619
+ this.showmaterial = true
620
+ },
621
+ close2(){
622
+ this.showmaterial = false
623
+ this.selectdata ={}
624
+ }
625
+ },
626
+ async ready () {
627
+ this.savebutten = Vue.config2.telephone.FaultAll.savebutten
628
+ this.sfbutten = Vue.config2.telephone.FaultAll.sfbutten?true:false
629
+ },
630
+ computed: {
631
+ stateNoRepair() {
632
+ return this.msg.serviceacitivity.find((row) => {
633
+ return row.f_result_status === '未维修'
634
+ })
635
+ },
636
+ hunei() {
637
+ let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
638
+ return row.f_type === '户内维修' // 换表
639
+ })
640
+ return this.sortDetais(result, 'a')
641
+ },
642
+ hitchAll() {
643
+ let hitchMsg = []
644
+ let obj = this.msg.serviceacitivity[0].servicerepair.find((row) => {
645
+ return row.f_type === '户内维修' // 户内维修
646
+ })
647
+ this.obj.details.forEach((row) => {
648
+ hitchMsg.push(row)
649
+ })
650
+ return hitchMsg
651
+ },
652
+ gaiGuan() {
653
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
654
+ return row.f_type === '改管'
655
+ })
656
+ },
657
+ zhihuan() {
658
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
659
+ return row.f_type === '置换作业'
660
+ })
661
+ },
662
+ zaoju() {
663
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
664
+ return row.f_type === '灶具信息'
665
+ })
666
+ },
667
+ reshuiqi() {
668
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
669
+ return row.f_type === '热水器信息'
670
+ })
671
+ },
672
+ bigualu() {
673
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
674
+ return row.f_type === '壁挂炉信息'
675
+ })
676
+ },
677
+ sanhuanzhuang() {
678
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
679
+ return row.f_type === '散户安装'
680
+ })
681
+ },
682
+ sheBeiRepairAll() {
683
+ let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
684
+ return row.f_type === '设备维修' // 换表
685
+ })
686
+ return this.sortDetais(result, 'b')
687
+ },
688
+ zaoJuRepairAll() {
689
+ let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
690
+ return row.f_type === '灶具维修' // 换表
691
+ })
692
+ return this.sortDetais(result, 'c')
693
+ },
694
+ troubleDeal() {
695
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
696
+ return row.f_type === '事故处理'
697
+ })
698
+ }
699
+ },
700
+ components: {
701
+ 'failure-edit': FailureEdit,
702
+ 'appinstallation-material': AppInstallationMaterial
703
+ }
704
+ }
705
+ </script>
706
+ <style scoped>
707
+ .pd-top {
708
+ padding-top: 7px;
709
+ }
710
+ </style>