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