telephone-clients 3.0.103 → 3.0.104-11

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