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