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
@@ -0,0 +1,741 @@
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="#" 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-show="wwcbutten">
22
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='noRepair'>
23
+ 工单未完
24
+ </button>
25
+ </div>
26
+ <div class="col-xs-3 col-sm-3 col-md-3" v-show="jabutten">
27
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='finishRepair'>
28
+ 工单结案
29
+ </button>
30
+ </div>
31
+ <div class="col-xs-3 col-sm-3 col-md-3" v-show="wwxbutten">
32
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='cannotRepair'>
33
+ 无法完成
34
+ </button>
35
+ </div>
36
+ <div class="col-xs-3 col-sm-3 col-md-3" v-show="sfbutten">
37
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click='gotoOtherCharge'>
38
+ 工单收费
39
+ </button>
40
+ </div>
41
+ <div class="col-xs-3 col-sm-3 col-md-3" v-show="savebutten">
42
+ <button type="button" name="button" class="col-sm-3 btn btn-primary"
43
+ @click='workOrderSave'>
44
+ 临时保存
45
+ </button>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <div class="panel panel-default auto repair-info-content"
53
+ v-if="msg.serviceacitivity[0].f_result_status == '已完成' && !show">
54
+ <div class="panel-body ">
55
+ <div class="row auto compatible">
56
+ <div class="row auto">
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="form-group">
80
+ <button type="button" class="btn btn-default pull-right" @click='close'>取消</button>
81
+ <button type="button" class="btn btn-success pull-right" @click='confirm("未完成")'>确认</button>
82
+ </div>
83
+ </div>
84
+ <div class="panel panel-default auto repair-info-content form-horizontal" v-if="showCannotrepair">
85
+ <div>
86
+ <p><big><b>无法完成</b></big></p>
87
+ </div>
88
+ <div class="row">
89
+ <div class="col-sm-12 form-group form-fix-width">
90
+ <label class="control-label">原因</label>
91
+ <textarea name="name" rows="2" class="form-control ver-textarea"
92
+ v-model="msg.serviceacitivity[0].f_reason"></textarea>
93
+ </div>
94
+ </div>
95
+ <failure-edit :value='msg.serviceacitivity[0].failure' @input='newFailure' v-if="msg.f_workorder_type == '报修单'">
96
+ </failure-edit>
97
+ <div class="row">
98
+ <div class="col-sm-12">
99
+ <button type="button" class="btn btn-default pull-right" @click='close1'>取消</button>
100
+ <button type="button" class="btn btn-success pull-right" @click='cannotRepaer()'>确认</button>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ </div>
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
+
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
+ system: ''
129
+ },
130
+ data() {
131
+ return {
132
+ savebutten:false, // 工单保存按钮
133
+ wwcbutten:false, // 未完成按钮
134
+ wwxbutten:false, // 未维修按钮
135
+ jabutten:false, //结案按钮
136
+ sfbutten:false, //收费按钮
137
+ fileName: '',
138
+ datajson: '',
139
+ norepair: '',
140
+ showNorepair: false,
141
+ showCannotrepair: false,
142
+ showhead: true,
143
+ repairers : this.$appdata.getParam('站点管理员'),
144
+ config:{},
145
+ othercharge_id: ''
146
+ }
147
+ },
148
+ methods: {
149
+ // 工单收费
150
+ async gotoOtherCharge() {
151
+ console.log('去工单收费界面!')
152
+ let con = {
153
+ conndition: ` f_userinfo_id = '${this.msg.f_userinfo_id}' and f_table_state = '正常' `
154
+ }
155
+ let http1 = new HttpResetClass()
156
+ let row = await http1.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/sql/onlinequeryuser`, {data: con},{
157
+ resolveMsg: '物联网收费成功!!',
158
+ rejectMsg: '物联网收费出错!!!'
159
+ })
160
+ console.log(JSON.stringify('获取用户信息返回==='+JSON.stringify(row)))
161
+ // 去其他收费界面
162
+ let _this = this
163
+ var pardate = {
164
+ _this:_this,
165
+ title:'其他收费',
166
+ safe:false
167
+ }
168
+ _this.$dispatch('gotoson',pardate)
169
+ console.log('进入other_charge')
170
+ _this.$goto('other_charge', {row: row}, 'self',_this.payback)
171
+ // _this.$goto('create_qrcode', {row: parameter}, 'self',_this.payback)
172
+ },
173
+ payback(msg) {
174
+ if (msg) {
175
+ console.log('q其他收费记录id555555555'+JSON.stringify(msg))
176
+ this.othercharge_id = msg
177
+ }else {
178
+ console.log('支付未成功!')
179
+ this.$showMessage('支付失败!')
180
+ }
181
+ },
182
+ // 工单结案
183
+ finishRepair(){
184
+ var _this = this
185
+ this.$showMessage('请确认该工单结案!', ['confirm', 'cancel']).then((res) => {
186
+ if (res === 'confirm') {
187
+ _this.confirm("结案")
188
+ }
189
+ })
190
+ },
191
+ deleteEmptyProperty(object){
192
+ for (var i in object) {
193
+ var value = object[i];
194
+ if (typeof value === 'object') {
195
+ if (Array.isArray(value)) {
196
+ if (value.length == 0) {
197
+ delete object[i];
198
+ console.log('delete Array', i);
199
+ continue;
200
+ }
201
+ }
202
+ this.deleteEmptyProperty(value);
203
+ if (this.isEmpty(value)) {
204
+ console.log('isEmpty true', i, value);
205
+ delete object[i];
206
+ console.log('delete a empty object');
207
+ }
208
+ } else {
209
+ if (value === '' || value === null || value === undefined) {
210
+ delete object[i];
211
+ console.log('delete ', i);
212
+ } else {
213
+ console.log('check ', i, value);
214
+ }
215
+ }
216
+ }
217
+ },
218
+ isEmpty(object) {
219
+ for (var name in object) {
220
+ return false;
221
+ }
222
+ return true;
223
+ },
224
+ // 从图片中删除
225
+ remove(row) {
226
+ this.$androidUtil.delfile(row.android_file)
227
+ let pos = this.model.imgs.findIndex((value) => {
228
+ return value === row
229
+ })
230
+ this.model.imgs.splice(pos, 1)
231
+ },
232
+ // fileName: 回传文件名,传入的带安卓路径url
233
+ // prop: 传入的字段名,没做改动
234
+ cameraCallBack(prop, fileName) {
235
+ // 当前this只能通过HostApp.__tis__获取
236
+ let self = this.$androidUtil.getCallBack(this)
237
+ // 添加新图片
238
+ self.model.imgs.push({
239
+ android_file: self.fileName,
240
+ path: fileName
241
+ })
242
+ },
243
+ takePic() {
244
+ let prop = 'repair'
245
+ let idx = 'aofeng'
246
+ this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
247
+ this.$sandroidUtil.takePic(this, this.cameraCallBack, this.fileName)
248
+ },
249
+ newFailure(value) {
250
+ this.msg.serviceacitivity[0].failure = value
251
+ },
252
+ noRepair() {
253
+ this.showhead = false
254
+ this.showNorepair = true
255
+ HostApp.backupDatabase()
256
+ },
257
+ cannotRepair() {
258
+ this.showhead = false
259
+ this.showCannotrepair = true
260
+ // falg:0, 表示第一次上传,批量上传时,flag:1
261
+ // this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg})
262
+ },
263
+ // 测试环境下模拟上传失败
264
+ fail(param) {
265
+ this.msg.serviceacitivity[0].f_result_status = param
266
+ this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg, test: true})
267
+ },
268
+ async workOrderSave(){
269
+ this.norepair = false
270
+ if (this.hunei && this.hunei.details) {
271
+ for (let i = 0; i < this.hunei.details.length; i++) {
272
+ if (this.hunei.details[i].f_project === '未维修') {
273
+ this.norepair = true
274
+ }
275
+ }
276
+ }
277
+ // 用户基本信息转字符串
278
+ this.msg.serviceacitivity[0].f_date_leave = Util.toStandardTimeString()
279
+ this.msg.serviceacitivity[0].f_result_status = '工单保存'
280
+ this.msg.serviceacitivity[0].f_order_man = Vue.user.name
281
+ this.deleteEmptyProperty(this.msg)
282
+ HostApp.__this__ = this
283
+ HostApp.logicWithHint({
284
+ // logic别名,key必须为logic
285
+ 'logic': 'workOrderSave',
286
+ // 回调执行方法名,key必须为callback
287
+ 'callback': 'javascript:HostApp.__this__.localSaveCallBack()',
288
+ // logic执行需要的业务参数
289
+ 'data': {row: this.msg},
290
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
291
+ // 执行回调方法传入key为backresult
292
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
293
+ 'backresult': 1
294
+ })
295
+ },
296
+ localSaveCallBack(res){
297
+ if(res.state == 'ok'){
298
+ let result = JSON.parse(res.result)
299
+ if(result.result == '成功'){
300
+ this.$showMessage('工单保存成功!', ['confirm'])
301
+ this.$dispatch('tijiao')
302
+ }else{
303
+ this.$showMessage(`工单保存失败! ${result.errMsg}`, ['confirm'])
304
+ }
305
+ this.$dispatch('tijiao')
306
+ }else {
307
+ this.$showMessage(`保存提交失败!`, ['confirm'])
308
+ }
309
+ },
310
+ // 工单上传
311
+ async confirm(param) {
312
+ /*console.log('是否换表----'+JSON.stringify(this.model.ischange))
313
+ if(!this.model.ischange) {
314
+ this.$showMessage('您还为进行换表操作,工单为完成!,')
315
+ return
316
+ }*/
317
+
318
+ this.norepair = false
319
+ if (this.hunei && this.hunei.details) {
320
+ for (let i = 0; i < this.hunei.details.length; i++) {
321
+ if (this.hunei.details[i].f_project === '未维修') {
322
+ this.norepair = true
323
+ }
324
+ }
325
+ }
326
+ if(param != '结案'&& (this.msg.f_workorder_type == '置换通气单'||this.msg.f_workorder_type == '安装单')) {
327
+ // 检测验证是否必填
328
+ var isfinish = this.checkismust()
329
+ if(isfinish.ifmust){
330
+ this.$showMessage(`请录入${isfinish.msg}信息!`, ['confirm'])
331
+ return
332
+ }
333
+ // 检测签名是否完成
334
+ // if(!(this.msg.serviceacitivity[0].f_signname)) {
335
+ // this.$showMessage(`请完成客户签名!`, ['confirm'])
336
+ // return
337
+ // }
338
+ // 检测置换作业是否有异常
339
+ var yinhuanflag = this.checkzhihuanwork()
340
+ if(!yinhuanflag){
341
+ var resy = await this.$showMessage('是否确认该户置换作业异常?', ['confirm', 'cancel'])
342
+ if(resy == 'cancel'){
343
+ return
344
+ }
345
+ this.msg.f_is_abnormal = '异常'
346
+ this.msg.serviceacitivity[0].f_is_abnormal = '异常'
347
+ }
348
+ // 检测置换照片是否已拍
349
+ // var imgflag = this.checkzhihuanimg()
350
+ // if(!(imgflag.check)){
351
+ // this.$showMessage(`${imgflag.title}未拍照!`, ['confirm'])
352
+ // return
353
+ // }
354
+ }
355
+ else if(this.msg.f_workorder_type == '报修单' && param != '结案'){
356
+ let isfinish = this.checkismust()
357
+ if(isfinish.ifmust){
358
+ this.$showMessage(`请录入${isfinish.msg}信息!`, ['confirm'])
359
+ return
360
+ }
361
+ // if(!(this.msg.serviceacitivity[0].f_signname)) {
362
+ // this.$showMessage(`请完成客户签名!`, ['confirm'])
363
+ // return
364
+ // }
365
+ // let imgflag = this.checkzhihuanimg()
366
+ // if(!(imgflag.check)){
367
+ // this.$showMessage(`${imgflag.title}未拍照!`, ['confirm'])
368
+ // return
369
+ // }
370
+ }
371
+ // }
372
+ // 用户基本信息转字符串
373
+ // if ((this.savevalid.uservalid && this.savevalid.doorvalid) || this.norepair || this.liGuanWeiXou || this.sheBeiRepairAll) {
374
+ this.msg.serviceacitivity[0].f_date_leave = Util.toStandardTimeString()
375
+ this.msg.serviceacitivity[0].f_result_status = param
376
+ this.msg.serviceacitivity[0].f_order_man = Vue.user.name
377
+ this.msg.loginid = Vue.user.id
378
+ // if (!this.savevalid.changetable && this.model.servicerepair && this.model.servicerepair[0].f_if_change) {
379
+ // this.$showMessage('未上传收费!', ['confirm'])
380
+ // } else {
381
+ this.deleteEmptyProperty(this.msg)
382
+ console.log('上传参数11111111111')
383
+ console.log(JSON.stringify(this.msg))
384
+ HostApp.__this__ = this
385
+ HostApp.logicWithHint({
386
+ // logic别名,key必须为logic
387
+ 'logic': 'upload',
388
+ // 回调执行方法名,key必须为callback
389
+ 'callback': 'javascript:HostApp.__this__.uploadCallback()',
390
+ // logic执行需要的业务参数
391
+ 'data': {flag: 0, row: this.msg},
392
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
393
+ // 执行回调方法传入key为backresult
394
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
395
+ 'backresult': 1
396
+ })
397
+ // let result = this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg})
398
+ // } else {
399
+ // this.$showMessage('有未填写项', ['confirm'])
400
+ // }
401
+ },
402
+ async uploadCallback(res){
403
+ if(res.state == 'ok'){
404
+ let result = JSON.parse(res.result)
405
+ if (result.result === '成功') {
406
+ this.$showMessage('保存提交成功!', ['confirm'])
407
+ } else {
408
+ this.$showMessage(`保存提交失败!${result.errMsg}`, ['confirm'])
409
+ }
410
+ this.showNorepair = false
411
+ this.showCannotrepair = false
412
+ this.$dispatch('tijiao')
413
+ }else {
414
+ this.$showMessage(`保存提交失败!`, ['confirm'])
415
+ }
416
+ },
417
+ // 检验是否必填 返回 error:{msg:'111',ismust:true}
418
+ checkismust(){
419
+ var error ={
420
+ msg:'',
421
+ ifmust:false
422
+ }
423
+ for(var i = 0;i<this.msg.serviceacitivity[0].servicerepair.length;i++) {
424
+ for (var j = 0; j < this.msg.serviceacitivity[0].servicerepair[i].details.length; j++) {
425
+ if(this.msg.serviceacitivity[0].servicerepair[i].details[j].type == 'checkbox'&&this.msg.serviceacitivity[0].servicerepair[i].details[j].f_content == '无'){
426
+ break;
427
+ }
428
+ 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){
429
+ error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
430
+ error.ifmust = true
431
+ return error
432
+ }
433
+ 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' ){
434
+ error.msg = `${this.msg.serviceacitivity[0].servicerepair[i].f_type}中${this.msg.serviceacitivity[0].servicerepair[i].details[j].f_project}`
435
+ error.ifmust = true
436
+ return error
437
+ }
438
+ }
439
+ }
440
+ return error
441
+ },
442
+ // checkzhihuanwork 检测置换作业是否正常
443
+ checkzhihuanwork(){
444
+ var isstatus = true
445
+ if(this.zhihuan){
446
+ for(var i = 0;i<this.zhihuan.details.length;i++){
447
+ if(this.zhihuan.details[i].type == 'radio' && this.zhihuan.details[i].f_content){
448
+ if(this.zhihuan.details[i].f_status == 'false'){
449
+ isstatus = false
450
+ break;
451
+ }
452
+ }
453
+ }
454
+ }
455
+ return isstatus
456
+ },
457
+ checkzhihuanimg(){
458
+ var isstatus = {
459
+ check: true,
460
+ title:''
461
+ }
462
+ if(Vue.config.telephone.Outlay.data != undefined){
463
+ let checkimgs = ''
464
+ console.log('获取拍照配置文件')
465
+ console.log(JSON.stringify(this.msg.f_workorder_type)+'22222222222222222')
466
+ if(this.service.f_user_type == '民用'){
467
+ checkimgs = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.msg.f_workorder_type].civil)))
468
+ }else{
469
+ checkimgs = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.msg.f_workorder_type].nocivil)))
470
+ }
471
+ if(checkimgs.length>0){
472
+ for(var i =0;i<checkimgs.length;i++){
473
+ var checkimgstype = checkimgs[i].title
474
+ if(checkimgs[i].checkmust){
475
+ var flag = false
476
+ for(var j =0;j<this.msg.serviceacitivity[0].imgs.length;j++){
477
+ if(this.msg.serviceacitivity[0].imgs[j].imgpath == checkimgstype) {
478
+ flag = true
479
+ break;
480
+ }
481
+ }
482
+ if(!flag){
483
+ isstatus.check = false
484
+ isstatus.title = checkimgstype
485
+ break;
486
+ }
487
+ }
488
+ }
489
+ }
490
+ }
491
+ return isstatus
492
+ },
493
+ checkservice(){
494
+ // 1.先判断灶具
495
+ if(this.zaoju){
496
+ var iszaoju = false
497
+ for(var i = 0;i<this.zaoju.details.length;i++){
498
+ if(this.zaoju.details[i].f_project == '有无灶具设备'){
499
+ if(this.zaoju.details[i].f_content == '有'||this.zaoju.details[i].f_content == ''){
500
+ iszaoju = true
501
+ break;
502
+ }
503
+ }
504
+ }
505
+ if(iszaoju){
506
+ for(var i = 0;i<this.zaoju.details.length;i++){
507
+ if(this.zaoju.details[i].type == 'picture'){
508
+ console.log('照片长度')
509
+ console.log(this.zaoju.imgs.length)
510
+ if(this.zaoju.imgs.length == 0){
511
+ this.$showMessage('灶具设备未拍照!', ['confirm'])
512
+ return false
513
+ }
514
+ }else{
515
+ if(this.zaoju.details[i].f_content == '' || this.zaoju.details[i].f_content == undefined){
516
+ this.$showMessage('灶具设备信息未填写完整!', ['confirm'])
517
+ return false
518
+ }
519
+ }
520
+ }
521
+ }
522
+ }
523
+ // 2.判断热水器
524
+ if(this.reshuiqi){
525
+ var isreshuiqi = false
526
+ for(var i = 0;i<this.reshuiqi.details.length;i++){
527
+ if(this.reshuiqi.details[i].f_project == '有无热水器设备'){
528
+ if(this.reshuiqi.details[i].f_content == '有'||this.reshuiqi.details[i].f_content == ''){
529
+ isreshuiqi = true
530
+ break;
531
+ }
532
+ }
533
+ }
534
+ if(isreshuiqi){
535
+ for(var i = 0;i<this.reshuiqi.details.length;i++){
536
+ if(this.reshuiqi.details[i].type == 'picture'){
537
+ if(this.reshuiqi.imgs.length == 0){
538
+ this.$showMessage('热水器设备未拍照!', ['confirm'])
539
+ return false
540
+ }
541
+ }else{
542
+ if(this.reshuiqi.details[i].f_content == '' || this.reshuiqi.details[i].f_content == undefined){
543
+ this.$showMessage('热水器设备信息未填写完整!', ['confirm'])
544
+ return false
545
+ }
546
+ }
547
+ }
548
+ }
549
+ }
550
+ // 3.判断壁挂炉
551
+ if(this.bigualu){
552
+ var isbigualu = false
553
+ for(var i = 0;i<this.bigualu.details.length;i++){
554
+ if(this.bigualu.details[i].f_project == '有无壁挂炉设备'){
555
+ if(this.bigualu.details[i].f_content == '有'||this.bigualu.details[i].f_content == ''){
556
+ isbigualu = true
557
+ break;
558
+ }
559
+ }
560
+ }
561
+ if(isbigualu){
562
+ for(var i = 0;i<this.bigualu.details.length;i++){
563
+ if(this.bigualu.details[i].type == 'picture'){
564
+ if(this.bigualu.imgs.length == 0){
565
+ this.$showMessage('壁挂炉设备未拍照!', ['confirm'])
566
+ return false
567
+ }
568
+ }else{
569
+ if(this.bigualu.details[i].f_content == '' || this.bigualu.details[i].f_content == undefined){
570
+ this.$showMessage('壁挂炉设备信息未填写完整!', ['confirm'])
571
+ return false
572
+ }
573
+ }
574
+ }
575
+ }
576
+ }
577
+ return true
578
+ },
579
+ cannotRepaer() {
580
+ this.msg.serviceacitivity[0].f_service_acitivity_type = '未维修'
581
+ this.msg.loginid = Vue.user.id
582
+ let result = this.$androidUtil.bzLogic('upload', {flag: 0, row: this.msg})
583
+ if (result.result === '成功') {
584
+ this.$showMessage('保存提交成功!', ['confirm'])
585
+ } else {
586
+ this.$showMessage(`保存提交失败!${JSON.stringify(result)}`, ['confirm'])
587
+ }
588
+ this.showNorepair = false
589
+ this.showCannotrepair = false
590
+ this.$dispatch('tijiao')
591
+ },
592
+ saveCompeleted() {
593
+ this.msg.serviceacitivity[0].baseuserinfo.f_date_level = Util.toStandardTimeString()
594
+ this.$androidUtil.bzLogic('SaveCompeleted', {row: this.msg})
595
+ },
596
+ sortDetais(result, type) {
597
+ let door = Object.assign({}, result)
598
+ door.details = []
599
+ for (let i = 0; i < result.details.length; i++) {
600
+ if (typeof (result.details[i].f_contentmessage) === 'object') {
601
+ for (let j = 0; j < result.details[i].f_contentmessage.length; j++) {
602
+ if (result.details[i].f_contentmessage[j].indexOf('-') !== -1) {
603
+ let k = result.details[i].f_contentmessage[j].indexOf('-')
604
+ let newObj = {}
605
+ newObj.f_content = result.details[i].f_contentmessage[j].substring(k + 1, result.details[i].f_contentmessage[j].length)
606
+ newObj.f_contentmessage = result.details[i].f_contentmessage[j].substring(0, k)
607
+ newObj.f_project = result.details[i].f_project
608
+ newObj.f_type = type
609
+ door.details.push(newObj)
610
+ }
611
+ }
612
+ }
613
+ if (typeof (result.details[i].f_content) === 'object' && !result.details[i].f_contentmessage) {
614
+ // console.log('好了')
615
+ for (let l = 0; l < result.details[i].f_content.length; l++) {
616
+ let new0bj = {}
617
+ new0bj.f_content = result.details[i].f_content[l]
618
+ new0bj.f_project = result.details[i].f_project
619
+ new0bj.f_type = 'a'
620
+ door.details.push(new0bj)
621
+ }
622
+ }
623
+ if (typeof(result.details[i].f_content) === 'string') {
624
+ door.details.push(result.details[i])
625
+ }
626
+ }
627
+ return door
628
+ },
629
+ close() {
630
+ this.showhead = true
631
+ this.showNorepair = false
632
+ }
633
+ ,
634
+ close1() {
635
+ this.showhead = true
636
+ this.showCannotrepair = false
637
+ }
638
+ },
639
+ ready () {
640
+ this.wwcbutten = Vue.config2.telephone.FaultAll.wwcbutten
641
+ this.wwxbutten = Vue.config2.telephone.FaultAll.wwxbutten
642
+ this.savebutten = Vue.config2.telephone.FaultAll.savebutten
643
+ this.jabutten = Vue.config2.telephone.FaultAll.jabutten
644
+ this.sfbutten = Vue.config2.telephone.FaultAll.sfbutten?true:false
645
+ // this.wwcbutten = true
646
+ // this.wwxbutten = true
647
+ // this.savebutten = false
648
+ console.log(`未完成按钮:${this.wwcbutten} 无法维修按钮:${this.wwxbutten} 工单保存按钮:${this.savebutten} 结案按钮:${this.jabutten}` )
649
+ },
650
+ computed: {
651
+ stateNoRepair() {
652
+ return this.msg.serviceacitivity.find((row) => {
653
+ return row.f_result_status === '未维修'
654
+ })
655
+ },
656
+ hunei() {
657
+ let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
658
+ return row.f_type === '户内维修' // 换表
659
+ })
660
+ return this.sortDetais(result, 'a')
661
+ // return door
662
+ },
663
+ hitchAll() {
664
+ let hitchMsg = []
665
+ let obj = this.msg.serviceacitivity[0].servicerepair.find((row) => {
666
+ return row.f_type === '户内维修' // 户内维修
667
+ })
668
+ this.obj.details.forEach((row) => {
669
+ hitchMsg.push(row)
670
+ })
671
+ return hitchMsg
672
+ }
673
+ ,
674
+ gaiGuan() {
675
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
676
+ // return row.f_service_type === '改管'
677
+ return row.f_type === '改管'
678
+ })
679
+ }
680
+ ,
681
+ zhihuan() {
682
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
683
+ // return row.f_service_type === '改管'
684
+ return row.f_type === '置换作业'
685
+ })
686
+ },
687
+ zaoju() {
688
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
689
+ // return row.f_service_type === '立管维修'
690
+ return row.f_type === '灶具信息'
691
+ })
692
+ },
693
+ reshuiqi() {
694
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
695
+ // return row.f_service_type === '立管维修'
696
+ return row.f_type === '热水器信息'
697
+ })
698
+ },
699
+ bigualu() {
700
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
701
+ // return row.f_service_type === '立管维修'
702
+ return row.f_type === '壁挂炉信息'
703
+ })
704
+ },
705
+ sanhuanzhuang() {
706
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
707
+ // return row.f_service_type === '立管维修'
708
+ return row.f_type === '散户安装'
709
+ })
710
+ },
711
+ sheBeiRepairAll() {
712
+ let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
713
+ return row.f_type === '设备维修' // 换表
714
+ })
715
+ console.log('设备' + JSON.stringify(result))
716
+ return this.sortDetais(result, 'b')
717
+ },
718
+ zaoJuRepairAll() {
719
+ let result = this.msg.serviceacitivity[0].servicerepair.find((row) => {
720
+ return row.f_type === '灶具维修' // 换表
721
+ })
722
+ return this.sortDetais(result, 'c')
723
+ },
724
+ troubleDeal() {
725
+ return this.msg.serviceacitivity[0].servicerepair.find((row) => {
726
+ return row.f_type === '事故处理'
727
+ })
728
+ }
729
+ }
730
+ ,
731
+ components: {
732
+ 'failure-edit':
733
+ FailureEdit
734
+ }
735
+ }
736
+ </script>
737
+ <style scoped>
738
+ .pd-top {
739
+ padding-top: 7px;
740
+ }
741
+ </style>