safecheck-client 3.0.35-51 → 3.0.35-53
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/components/android/SafecheckDevices.vue +1298 -1298
- package/src/components/android/SafecheckOrderV.vue +2278 -2278
- package/src/components/pc/NewCheckpaper.vue +1998 -1998
- package/src/filiale/bayan/android/AddPlanItem.vue +450 -450
- package/src/filiale/weinan/android/SafecheckOrderV.vue +3343 -3340
- package/src/filiale/weinan/android/SafecheckUserInfo.vue +791 -778
- package/src/filiale/weinan/pc/PaperList.vue +687 -674
- package/src/filiale/xilan/pc/PaperList.vue +795 -795
- package/src/filiale/xilan/pc.js +13 -13
- package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +642 -642
@@ -1,2278 +1,2278 @@
|
|
1
|
-
<template>
|
2
|
-
<div id="savebut" class="no-close row android-repair-order" style="background-color: #f9f9f9">
|
3
|
-
<div class="col-sm-12 col-xs-12" >
|
4
|
-
<ul class="nav nav-tabs" style="background:#ffffff;overflow-y: hidden">
|
5
|
-
<li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
|
6
|
-
v-if="$index < number+1 && $index < faultshow.number" >
|
7
|
-
<a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
|
8
|
-
<span class="spanboder">{{row.header}}</span>
|
9
|
-
<img class="butt2" :src="imgback(row.complete === componentName,row.header === header)"></a>
|
10
|
-
<p></p>
|
11
|
-
</li>
|
12
|
-
<div class="col-sm-12 col-xs-12 repair-bg" v-show="routeShow">
|
13
|
-
<route name='repair' :reuse="false"></route>
|
14
|
-
</div>
|
15
|
-
<li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
|
16
|
-
v-if="$index > number && $index < faultshow.number ">
|
17
|
-
<a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
|
18
|
-
<span class="spanboder">{{row.header}}</span>
|
19
|
-
<img class="butt2" :src="imgback(row.complete === componentName,row.header === header)"></a>
|
20
|
-
<p></p>
|
21
|
-
</li>
|
22
|
-
<div class="col-sm-12 col-xs-12 repair-bg" v-if="actionEnabled ">
|
23
|
-
<div class="auto select-overspread form-horizontal repair-bg " style="padding-bottom:5px;">
|
24
|
-
<div class="bq-parent">
|
25
|
-
<blockquote class="blockquote">
|
26
|
-
<p>安检上传</p>
|
27
|
-
</blockquote>
|
28
|
-
</div>
|
29
|
-
<div class="panel panel-default auto repair-info-content">
|
30
|
-
<div class="panel-body ">
|
31
|
-
<div class="row auto">
|
32
|
-
<!--<div class="col-xs-12 col-sm-12 col-md-12" :style="timeSet(this.isneedDate)?'':'display:none'">-->
|
33
|
-
<!--<label>请输入超期原因:</label><br/>-->
|
34
|
-
<!--<textarea style="width: 100%;" v-model=""></textarea>-->
|
35
|
-
<!--</div>-->
|
36
|
-
<div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;">
|
37
|
-
<div class="col-xs-3 col-sm-3 col-md-3" v-if="parentPage=='CurrentCreate'">
|
38
|
-
<button type="button" name="button" class="col-sm-3 btn btn-primary" @click="save('temp')">
|
39
|
-
临时保存
|
40
|
-
</button>
|
41
|
-
</div>
|
42
|
-
<div class="col-xs-3 col-sm-3 col-md-3">
|
43
|
-
<button class="col-sm-3 btn btn-primary" @click="save('finish')">
|
44
|
-
本地缓存
|
45
|
-
</button>
|
46
|
-
</div>
|
47
|
-
<div class="col-xs-3 col-sm-3 col-md-3">
|
48
|
-
<button type="button" name="button" class="col-sm-3 btn btn-primary" @click="uploadCheckPaper">
|
49
|
-
上传
|
50
|
-
</button>
|
51
|
-
</div>
|
52
|
-
<div v-if="show_torepair">
|
53
|
-
<button type="button" name="button" class="col-sm-3 btn btn-primary" @click="showmod">
|
54
|
-
转维修
|
55
|
-
</button>
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
</div>
|
59
|
-
</div>
|
60
|
-
</div>
|
61
|
-
</div>
|
62
|
-
</div>
|
63
|
-
</ul>
|
64
|
-
</div>
|
65
|
-
<modal :show.sync="showModal2" :backdrop="false" style="font-size: 15px">
|
66
|
-
<div slot="modal-header" class="modal-header upuserinfo_sel">
|
67
|
-
<h4 class="modal-title">
|
68
|
-
转维修
|
69
|
-
</h4>
|
70
|
-
</div>
|
71
|
-
<div slot="modal-body" class="modal-body">
|
72
|
-
<div class="row">
|
73
|
-
<ol style="border: 1px solid green;padding: 15px 0 15px 20px">
|
74
|
-
<li v-for="row in repairDefect.data" >{{row}}</li>
|
75
|
-
</ol>
|
76
|
-
</div>
|
77
|
-
<div class="row" style="margin-top: 10px">
|
78
|
-
<label class="font_normal_body">派发类型</label>
|
79
|
-
<v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
|
80
|
-
:options='dispatchTypeOptions' placeholder='派发类型'
|
81
|
-
close-on-select>
|
82
|
-
</v-select>
|
83
|
-
</div>
|
84
|
-
<div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
|
85
|
-
<label class="font_normal_body">维 修 员</label>
|
86
|
-
<v-select
|
87
|
-
:value.sync="selectData.f_repairman"
|
88
|
-
:value-single="true"
|
89
|
-
:options='repairers'
|
90
|
-
placeholder='请选择维修员'
|
91
|
-
close-on-select></v-select>
|
92
|
-
</div>
|
93
|
-
<div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
|
94
|
-
<label class="font_normal_body">站    点</label>
|
95
|
-
<right-tree
|
96
|
-
islist
|
97
|
-
:source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
|
98
|
-
@re-res="getSiteRes"></right-tree>
|
99
|
-
</div>
|
100
|
-
<!--<div class="row" style="margin-top: 10px">
|
101
|
-
<label class="font_normal_body">报修类型</label>
|
102
|
-
<v-select :value.sync="selectData.f_repairtype"
|
103
|
-
class="select select_list"
|
104
|
-
:value-single="true"
|
105
|
-
:options='repairTypeOptions'
|
106
|
-
close-on-select>
|
107
|
-
</v-select>
|
108
|
-
</div>-->
|
109
|
-
<div class="row" style="margin-top: 10px">
|
110
|
-
<label class="font_normal_body" >备 注</label>
|
111
|
-
<div class="btn-group" style="width:60%">
|
112
|
-
<textarea style="width:100%;height: 100px" v-model="selectData.f_remarks"></textarea>
|
113
|
-
</div>
|
114
|
-
</div>
|
115
|
-
</div>
|
116
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
117
|
-
<button type="button" name="button" class="col-sm-3 btn btn-primary" @click="rectification">转维修</button>
|
118
|
-
<button type="button" name="button" class="col-sm-3 btn btn-primary" @click="cancel1">取消</button>
|
119
|
-
</div>
|
120
|
-
</modal>
|
121
|
-
</div>
|
122
|
-
</template>
|
123
|
-
|
124
|
-
<script>
|
125
|
-
import Vue from 'vue'
|
126
|
-
import * as Util from '../Util'
|
127
|
-
import { HttpResetClass } from 'vue-client'
|
128
|
-
import co from 'co'
|
129
|
-
import $ from "jquery";
|
130
|
-
let loadParamGem = async function (self) {
|
131
|
-
await self.$LoadParams.loadParam()
|
132
|
-
}
|
133
|
-
|
134
|
-
export default {
|
135
|
-
title: '安检单',
|
136
|
-
props: ['f_plan_id', 'item', 'role','parentPage','source'],
|
137
|
-
// props: ['f_plan_id', 'role'],
|
138
|
-
data() {
|
139
|
-
return {
|
140
|
-
//测试数据
|
141
|
-
// f_plan_id:'',
|
142
|
-
// role:'inspect',
|
143
|
-
// item:{"f_approved_time":null,"f_user_family_remarks":null,"f_street":"测试街道","f_repair_approved_time":null,
|
144
|
-
// "f_user_type":null,"f_approved_by":null,"f_card_id":null,"f_remark":null,"f_building":"1","f_batch_number":null,
|
145
|
-
// "f_idnumber":null,"f_state":"未检","id":"0EFE0EE2-B155-46F9-8DE0-38C022664A4D","f_complete":null,"f_check_state":null,"f_last_check_state":"拒检",
|
146
|
-
// "f_user_inhome_time":null,"f_residential_area":"测试小区1","version":1,"f_processid":null,"f_last_check_result":"{\"result\":\"正常\",\"data\":[]}",
|
147
|
-
// "f_area":null,"f_usegas":null,"f_user_phone":"16566546548","f_slice_area":"营业大区","f_approved":"未审核","f_upload_state":"未传","f_user_check_time":null,
|
148
|
-
// "f_unit":"1","f_user_spare_phone":null,"f_last_check_date":null,"f_userproperties":null,"f_userfile_id":null,"f_prearranged_date":null,"f_filialeid":"453",
|
149
|
-
// "f_branch":null,"f_orgstr":null,"f_plan_year":2020,"f_orgid":null,"f_approval_notified":null,"f_plan_month":4,"f_approved_note":null,"f_filialeids":null,
|
150
|
-
// "f_floor":"1","f_flag":null,"f_repair_approved_note":null,"f_userinfo_code":"00000002","f_create_time":"2020-05-10 18:56:03","f_meter_no":"","f_station":null,
|
151
|
-
// "f_repair_approved":"未审核","f_no_checkplan":"有计划安检","f_plan_name":"关于","f_repair_approved_by":null,"f_room":"1","f_office":null,"f_comments":null,
|
152
|
-
// "f_address":"兰山街道泰盛小区1栋1单元1层1室","id_back":null,"f_userinfoid":"2","f_subcompany":null,"f_addressid":null,"f_user_phone2":null,
|
153
|
-
// "f_user_equipment_remarks":null,"f_plan_id":"0819ea6707ad4d9dad217c06a87f4227","f_user_name":"用户二",
|
154
|
-
// "f_plan_meters":[{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2119035714","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":3,"f_maker":null,"f_metergasnums":0,"f_total_fee":100,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663},{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2118999901","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":1,"f_maker":null,"f_metergasnums":0,"f_total_fee":0,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663}]
|
155
|
-
// },
|
156
|
-
|
157
|
-
data: {
|
158
|
-
f_devices: [],
|
159
|
-
f_defect_content:'',
|
160
|
-
f_recording1_path:'',
|
161
|
-
f_visit_number:'',
|
162
|
-
f_remark:''
|
163
|
-
},
|
164
|
-
imgsnum:this.$appdata.getSingleValue('安检总体照片数量') ? this.$appdata.getSingleValue('安检总体照片数量'):1, // 安检整体照片默认必须拍1张
|
165
|
-
updateuserphone:false, //安检时是否更新用户电话
|
166
|
-
updatemetermodel:false, //安检时是否更新表型号
|
167
|
-
updatemeternumber:false, //安检时是否更新表号
|
168
|
-
beforephone:'',
|
169
|
-
isUpload:false,
|
170
|
-
show_torepair: false,
|
171
|
-
onlySave:true, //判断保存还是保存并上传
|
172
|
-
livedispose:'',
|
173
|
-
refuseinspection:'', // 拒捡拍照是否提示
|
174
|
-
notencountered:'', // 到访不遇拍照是否提示
|
175
|
-
startClick:false, //开始安检按钮是否可点击
|
176
|
-
isStrat: false, //是否开始安检
|
177
|
-
checkResult:{},//查询结果
|
178
|
-
newcheckResult:{},
|
179
|
-
repairDefect : {
|
180
|
-
result: '正常',
|
181
|
-
data: []
|
182
|
-
},
|
183
|
-
rowCodata:{},
|
184
|
-
repairers: [],
|
185
|
-
timer: null,
|
186
|
-
showModal: false,
|
187
|
-
showModal2:false,
|
188
|
-
pic_to_be_viewed: '',
|
189
|
-
showBack:true,
|
190
|
-
devices: [],
|
191
|
-
f_devices : [],
|
192
|
-
isToRepair:false,
|
193
|
-
clickBack:true, //是否点击返回按钮
|
194
|
-
isSafeCheckToRepair:false,//是否转维修
|
195
|
-
Url:this.$androidUtil.getProxyUrl(),
|
196
|
-
detail:{},
|
197
|
-
defectDevice:{},
|
198
|
-
user:{},
|
199
|
-
is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
|
200
|
-
dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'},{label: '派发给站点', value: '派发给站点'}],
|
201
|
-
selectData:{
|
202
|
-
dispatchType:'派发给维修员',
|
203
|
-
f_repairman:'',
|
204
|
-
f_remarks:'',
|
205
|
-
f_repairtype:'整改'
|
206
|
-
},
|
207
|
-
model: { //转维修数据
|
208
|
-
// 一次派单
|
209
|
-
serviceacitivity: [{
|
210
|
-
f_service_acitivity_type: '派单'
|
211
|
-
}],
|
212
|
-
f_source:'安检',
|
213
|
-
f_service_id: '',
|
214
|
-
f_contact_phone: '',
|
215
|
-
f_meetunit: '',
|
216
|
-
f_phone: '',
|
217
|
-
f_user_name: '',
|
218
|
-
f_address: '',
|
219
|
-
f_repair_date: Util.toStandardTimeString(),
|
220
|
-
f_card_id: '',
|
221
|
-
// f_department: '', 站点选择
|
222
|
-
f_reciever:'',
|
223
|
-
f_remarks: '',
|
224
|
-
f_user_type: '',
|
225
|
-
f_area: '',
|
226
|
-
f_unit_name:'',
|
227
|
-
f_street: '',
|
228
|
-
f_residential_area: '',
|
229
|
-
f_building: '',
|
230
|
-
f_unit: '',
|
231
|
-
f_floor: '',
|
232
|
-
f_room: '',
|
233
|
-
aState: null,
|
234
|
-
f_repairtype: '',
|
235
|
-
f_repairitems:{},
|
236
|
-
},
|
237
|
-
repairitems:[],
|
238
|
-
meading:'转站点',
|
239
|
-
config: {
|
240
|
-
"燃气表":{
|
241
|
-
"checkmust":true,
|
242
|
-
"index":1,
|
243
|
-
"items":{
|
244
|
-
//"燃气表照片":{"index":1,"type":"picture","remark":"(拍摄清晰的表具编号、字轮数、剩余气量等)"},
|
245
|
-
"基表编号":{"index":1,"type":"string","readonly":true},
|
246
|
-
"气表型号":{"index":2,"type":"string","readonly":true},
|
247
|
-
"气表品牌":{"index":3,"type":"string","readonly":true},
|
248
|
-
"进气方向":{"index":4,"type":"string","readonly":true},
|
249
|
-
"初始表底":{"index":5,"type":"number","isshow":false,"readonly":true},
|
250
|
-
"上期表读数":{"index":6,"type":"number","readonly":true,isshow:false},
|
251
|
-
"累购气量":{"index":7,"type":"number","readonly":true},
|
252
|
-
"累购金额":{"index":7,"type":"number","readonly":true},
|
253
|
-
"已用气量":{"index":8,"type":"number","checkmust": false},//基表数
|
254
|
-
"已用金额":{"index":8,"type":"number","checkmust": false},
|
255
|
-
"剩余气量":{"index":9,"type":"number","checkmust": false},//累购-已用
|
256
|
-
//显示屏数 --实际剩余气量
|
257
|
-
"剩余金额":{"index":9,"type":"number","checkmust": false},
|
258
|
-
"气量异常差值":{"index":10,"type":"number","readonly": true},
|
259
|
-
"金额异常差值":{"index":10,"type":"number","readonly": true},
|
260
|
-
"系统余额":{"index":10,"type":"number","readonly": true},
|
261
|
-
"表封号":{"index":11,"type":"string","readonly": true},
|
262
|
-
"燃气表照片":{"index":12,"type":"picture","checkmust": false}
|
263
|
-
}
|
264
|
-
// 注意,配置项的index必须与上面的固定配置保持'顺序'
|
265
|
-
},
|
266
|
-
// "燃气表2":{
|
267
|
-
// "checkmust":true,
|
268
|
-
// "index":2,src
|
269
|
-
// "items":{
|
270
|
-
// "燃气表照片":{"index":1,"type":"picture"},
|
271
|
-
// "表品牌":{"index":2,"type":"string","readonly":true},
|
272
|
-
// "表号":{"index":3,"type":"string","readonly":true},
|
273
|
-
// "表封号":{"index":4,"type":"number","readonly":true},
|
274
|
-
// "表型号":{"index":5,"type":"string","readonly":true},
|
275
|
-
// "位置":{"index":6,"type":"string","readonly":true},
|
276
|
-
// "表底数":{"index":7,"type":"number","readonly":true},
|
277
|
-
// "累购气量":{"index":8,"type":"number","readonly":true},
|
278
|
-
// "累购金额":{"index":8,"type":"number","readonly":true}
|
279
|
-
// }
|
280
|
-
// }
|
281
|
-
},
|
282
|
-
// 维修项
|
283
|
-
isneedDate:'',
|
284
|
-
routeShow:true,
|
285
|
-
number:0,
|
286
|
-
shupingshow:false,
|
287
|
-
pipeline: {},
|
288
|
-
details: [],
|
289
|
-
ids: '',
|
290
|
-
savevalid: {
|
291
|
-
uservalid: false,
|
292
|
-
doorvalid: true,
|
293
|
-
changetable: false
|
294
|
-
},
|
295
|
-
doordetails: {},
|
296
|
-
devicedetails: {},
|
297
|
-
cookdetails: {},
|
298
|
-
componentName: 'safecheck-userinfo',
|
299
|
-
header:'客户信息',
|
300
|
-
tabs: [
|
301
|
-
// 参数全部设置成空,在ready时,等model处理好了,再添加
|
302
|
-
{
|
303
|
-
header: '客户信息',complete:'safecheck-userinfo',class: 'repair-info-class', props: null
|
304
|
-
},
|
305
|
-
{
|
306
|
-
header: '拍照签名',complete:'paper-feedback', class: 'outlay-class', props: null
|
307
|
-
}
|
308
|
-
],
|
309
|
-
faultshow:{
|
310
|
-
number : 8
|
311
|
-
} // 控制 故障汇总 在 菜单里显示与否,
|
312
|
-
}
|
313
|
-
},
|
314
|
-
computed: {
|
315
|
-
actionEnabled: {
|
316
|
-
get() {
|
317
|
-
return this.role == 'inspect'
|
318
|
-
}
|
319
|
-
}
|
320
|
-
},
|
321
|
-
methods: {
|
322
|
-
showmod(){
|
323
|
-
// this.saveNoclick()
|
324
|
-
let errString = this.errorVerify()
|
325
|
-
if (errString) {
|
326
|
-
console.log(errString)
|
327
|
-
console.log('Vue.android',Vue.android)
|
328
|
-
console.log('this.isUpload',this.isUpload)
|
329
|
-
if (Vue.android){
|
330
|
-
this.$showMessage(errString)
|
331
|
-
}
|
332
|
-
return
|
333
|
-
}
|
334
|
-
//清空转维修列表重新进行数据组织
|
335
|
-
this.repairDefect = {
|
336
|
-
result: '正常',
|
337
|
-
data: []
|
338
|
-
}
|
339
|
-
this.data.f_complete = '已完成'
|
340
|
-
this.$set('data.f_offsite_time', Util.toStandardTimeString())
|
341
|
-
this.assemblyCodata()
|
342
|
-
if(this.repairDefect.result=='正常'){
|
343
|
-
this.$showMessage("未发现有选择需要转维修的隐患,请检查填写的数据。如需转维修请在处理方式中选择 '转维修' !")
|
344
|
-
return
|
345
|
-
}
|
346
|
-
console.log("准备保存!")
|
347
|
-
this.disableTimer()
|
348
|
-
this.getEmp()
|
349
|
-
this.showModal2=true
|
350
|
-
},
|
351
|
-
cancel1(){
|
352
|
-
this.showModal2=false
|
353
|
-
this.selectData={
|
354
|
-
dispatchType:'派发给维修员',
|
355
|
-
f_repairman:'',
|
356
|
-
f_remarks:'',
|
357
|
-
f_repairtype:'整改'
|
358
|
-
}
|
359
|
-
},
|
360
|
-
getSiteRes(obj) {
|
361
|
-
console.log('siteRes ---> ')
|
362
|
-
console.log(obj)
|
363
|
-
if(obj.resids[0]){
|
364
|
-
this.selectData.f_meetunit = obj.res.join('.')
|
365
|
-
this.selectData.f_reciever = obj.resids.join('.')
|
366
|
-
this.selectData.f_outlets = obj.res[obj.res.length - 1]
|
367
|
-
}else {
|
368
|
-
this.selectData.f_meetunit = ''
|
369
|
-
this.selectData.f_reciever = ''
|
370
|
-
this.selectData.f_outlets = ''
|
371
|
-
}
|
372
|
-
},
|
373
|
-
rectification(){
|
374
|
-
if(this.selectData.dispatchType){
|
375
|
-
if(this.selectData.dispatchType=='派发给站点'){
|
376
|
-
if(!this.selectData.f_reciever){
|
377
|
-
this.$showMessage('请选择部门!')
|
378
|
-
return
|
379
|
-
}
|
380
|
-
}else{
|
381
|
-
if(!this.selectData.f_repairman){
|
382
|
-
this.$showMessage('请选择维修员!')
|
383
|
-
return
|
384
|
-
}
|
385
|
-
}
|
386
|
-
}else {
|
387
|
-
this.$showMessage('请选择派发类型!')
|
388
|
-
return
|
389
|
-
}
|
390
|
-
/*if(!this.selectData.f_repairtype){
|
391
|
-
this.$showMessage('请选择报修类型!')
|
392
|
-
return
|
393
|
-
}*/
|
394
|
-
//关闭录音
|
395
|
-
this.closely(false) // 保存本地,不删除录音文件暂停录音
|
396
|
-
let act={}
|
397
|
-
let toRepair=''
|
398
|
-
if(this.selectData.dispatchType=='派发给站点'){
|
399
|
-
act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
|
400
|
-
toRepair=null
|
401
|
-
}else{
|
402
|
-
console.log('派发给维修员---------'+this.selectData.f_repairman)
|
403
|
-
act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
|
404
|
-
toRepair='一级派单'
|
405
|
-
}
|
406
|
-
let repData={
|
407
|
-
toRepair:toRepair,
|
408
|
-
activity:act,
|
409
|
-
deps:Vue.user.deps,
|
410
|
-
depids:Vue.user.depids,
|
411
|
-
f_remarks:this.selectData.f_remarks,
|
412
|
-
f_repairtype:this.selectData.f_repairtype,
|
413
|
-
f_attendant: Vue.user.name,
|
414
|
-
loginUser:{name:Vue.user.name,ename:Vue.user.id,id:Vue.user.id},
|
415
|
-
}
|
416
|
-
this.rowCodata.istoRepair='转维修'
|
417
|
-
this.rowCodata.repData=repData
|
418
|
-
console.log("当前组装好的转维修数据--"+JSON.stringify(repData))
|
419
|
-
this.onlySave = false
|
420
|
-
this.save()
|
421
|
-
},
|
422
|
-
// 获取维修员
|
423
|
-
getEmp() {
|
424
|
-
this.repairers=[]
|
425
|
-
let per = {source: 'this.getRights().where(row.getType()==$user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${Vue.user.id}`}
|
426
|
-
let http = new HttpResetClass()
|
427
|
-
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: per}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
428
|
-
res.data.forEach((user)=>{
|
429
|
-
this.repairers.push({label:user.name, value: user.name})
|
430
|
-
})
|
431
|
-
})
|
432
|
-
},
|
433
|
-
closely(isdelete){
|
434
|
-
try {
|
435
|
-
var startOrStopAudioClipStr;
|
436
|
-
if (isdelete===true) {
|
437
|
-
//tag
|
438
|
-
startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止并删除录音') //停止并删除录音
|
439
|
-
}else {
|
440
|
-
//tag
|
441
|
-
startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止录音') //停止录音
|
442
|
-
}
|
443
|
-
if (startOrStopAudioClipStr.code == 200) {
|
444
|
-
//tag
|
445
|
-
return true;
|
446
|
-
}else {
|
447
|
-
return false;
|
448
|
-
}
|
449
|
-
} catch (e) {
|
450
|
-
console.error("关闭录音方法异常")
|
451
|
-
console.error(e)
|
452
|
-
return false;
|
453
|
-
}
|
454
|
-
},
|
455
|
-
// 录音方法
|
456
|
-
record() {
|
457
|
-
//tag
|
458
|
-
if (this.role != 'inspect') {
|
459
|
-
if (this.data.f_recording1_path != '') {
|
460
|
-
window.location = "/rs/file"+this.data.f_recording1_path
|
461
|
-
}
|
462
|
-
} else {
|
463
|
-
//tag
|
464
|
-
let fileName
|
465
|
-
if (!this.data.f_recording1_path) {
|
466
|
-
fileName = Util.guid() + '.amr'
|
467
|
-
} else {
|
468
|
-
fileName = Util.getFileName(this.data.f_recording1_path)
|
469
|
-
}
|
470
|
-
//HostApp.__this__ = this
|
471
|
-
/*调用无限制录音模块*/
|
472
|
-
let startOrStopState = HostApp.startOrStopAudioClip(fileName,"开始录音")
|
473
|
-
//tag
|
474
|
-
if (startOrStopState.code == 200) {
|
475
|
-
this.data.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
|
476
|
-
//tag
|
477
|
-
return true;
|
478
|
-
}else {
|
479
|
-
return false;
|
480
|
-
}
|
481
|
-
}
|
482
|
-
},
|
483
|
-
saveNoclick() {
|
484
|
-
// 禁用点击事件
|
485
|
-
$("#savebut").addClass("noclickbut");
|
486
|
-
//tag
|
487
|
-
|
488
|
-
// 5秒后启用点击事件
|
489
|
-
setTimeout(function(){
|
490
|
-
$("#savebut").removeClass("noclickbut");
|
491
|
-
},5000);
|
492
|
-
},
|
493
|
-
timeSet(val){
|
494
|
-
if (!val){
|
495
|
-
return
|
496
|
-
}
|
497
|
-
let time =new Date(val).getTime()
|
498
|
-
let time2=new Date().getTime()
|
499
|
-
if (time2>time) {
|
500
|
-
return true
|
501
|
-
}
|
502
|
-
},
|
503
|
-
imgback(val,isheader){
|
504
|
-
if(val && this.routeShow && isheader){
|
505
|
-
return require('../../assets/xiangxia1.png')
|
506
|
-
}else{
|
507
|
-
return require('../../assets/xiangyou1.png')
|
508
|
-
}
|
509
|
-
},
|
510
|
-
changediv(val){
|
511
|
-
return val
|
512
|
-
},
|
513
|
-
// 选择tab
|
514
|
-
tabSelect (item,number) {
|
515
|
-
this.header = item.header
|
516
|
-
// 处理关闭/显示 内容
|
517
|
-
if(this.number == number && !this.routeShow ){
|
518
|
-
this.routeShow = true
|
519
|
-
}else if(this.number == number && this.routeShow){
|
520
|
-
this.routeShow = false
|
521
|
-
}else if(this.number != item.complete){
|
522
|
-
this.routeShow = true
|
523
|
-
}
|
524
|
-
this.number = number
|
525
|
-
this.componentName = item.complete
|
526
|
-
if(item.complete == 'safecheck-devices'){
|
527
|
-
if(item.header != '燃气表' && this.data['device'+item.number].length == 0){
|
528
|
-
this.data['device' + item.number].push({})
|
529
|
-
}
|
530
|
-
let idx=this.data['device' + item.number].length - 1
|
531
|
-
let itemprops = {
|
532
|
-
config:this.config,
|
533
|
-
device:this.devices[item.number-1],
|
534
|
-
idx:idx,
|
535
|
-
role:'inspect'
|
536
|
-
}
|
537
|
-
if(this.routeShow){
|
538
|
-
this.$goto(item.complete, itemprops, 'repair')
|
539
|
-
}
|
540
|
-
}else{
|
541
|
-
if(this.routeShow){
|
542
|
-
this.$goto(item.complete, {userinfo:this.data}, 'repair')
|
543
|
-
}
|
544
|
-
}
|
545
|
-
this.shupingshow = true
|
546
|
-
},
|
547
|
-
// 给组件添加参数
|
548
|
-
getImgPath() {
|
549
|
-
for (var i = 0; i < this.model.serviceacitivity[0].imgs.length; i++) {
|
550
|
-
this.ids += this.model.serviceacitivity[0].imgs[i].imgid + ','
|
551
|
-
}
|
552
|
-
this.ids = this.ids.substring(0, this.ids.length - 1)
|
553
|
-
if(this.ids){
|
554
|
-
this.getImgGen();
|
555
|
-
}
|
556
|
-
},
|
557
|
-
getImgGen(){
|
558
|
-
let http = new HttpResetClass()
|
559
|
-
http.load('POST','rs/sql/tel_singleTable_OrderBy', {data: {
|
560
|
-
items: '*',
|
561
|
-
tablename: 't_files',
|
562
|
-
condition: `id in (${this.ids})`,
|
563
|
-
orderitem: 'id'
|
564
|
-
}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
565
|
-
for (let i = 0; i < res.data.length; i++) {
|
566
|
-
for (let j = 0; j < this.model.serviceacitivity[0].imgs.length; j++) {
|
567
|
-
if (res.data[i].id.toString() === this.model.serviceacitivity[0].imgs[j].imgid) {
|
568
|
-
this.model.serviceacitivity[0].imgs[j] = Object.assign({}, res.data[i], this.model.serviceacitivity[0].imgs[j])
|
569
|
-
}
|
570
|
-
}
|
571
|
-
|
572
|
-
}
|
573
|
-
})
|
574
|
-
},
|
575
|
-
|
576
|
-
sortDetails(){
|
577
|
-
for (let i = 0; i < this.details.length; i++) {
|
578
|
-
if (this.details[i].details.length) {
|
579
|
-
for (let j = 0; j < this.details[i].details.length; j++) {
|
580
|
-
if (this.details[i].details[j].f_type === 'a') {
|
581
|
-
this.doordetails = {details: this.details[i].details}
|
582
|
-
break
|
583
|
-
}
|
584
|
-
if (this.details[i].details[j].f_type === 'b') {
|
585
|
-
this.devicedetails = {details: this.details[i].details}
|
586
|
-
break
|
587
|
-
}
|
588
|
-
if (this.details[i].details[j].f_type === 'c') {
|
589
|
-
this.cookdetails = {details: this.details[i].details}
|
590
|
-
break
|
591
|
-
}
|
592
|
-
}
|
593
|
-
}
|
594
|
-
}
|
595
|
-
},
|
596
|
-
// 复制数据
|
597
|
-
back () {
|
598
|
-
let _this = this
|
599
|
-
if(this.issee){
|
600
|
-
_this.$back()
|
601
|
-
return
|
602
|
-
}
|
603
|
-
this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
|
604
|
-
if (res === 'confirm') {
|
605
|
-
this.closely()
|
606
|
-
_this.$back()
|
607
|
-
}
|
608
|
-
})
|
609
|
-
},
|
610
|
-
confirm(){
|
611
|
-
this.$dispatch('confirm')
|
612
|
-
},
|
613
|
-
tick() {
|
614
|
-
this.timer = null
|
615
|
-
this.data.f_offsite_time = Util.toStandardTimeString()
|
616
|
-
this.timer = window.setTimeout(this.tick, 1000)
|
617
|
-
},
|
618
|
-
getRepairState() {
|
619
|
-
let repaired = true
|
620
|
-
this.data.f_defects.forEach((defect) => {
|
621
|
-
repaired = repaired & (defect.f_ratification == '已处理')
|
622
|
-
})
|
623
|
-
return repaired
|
624
|
-
},
|
625
|
-
verifyRepairDefects() {
|
626
|
-
this.data.f_repair_date = Util.toStandardTimeString()
|
627
|
-
this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
|
628
|
-
},
|
629
|
-
errorVerify() {
|
630
|
-
let hasError = this.verifyState()
|
631
|
-
if(hasError)
|
632
|
-
return hasError
|
633
|
-
|
634
|
-
if(this.data.f_entry_status != '入户' || this.data.f_usegas == '未用气')
|
635
|
-
return null
|
636
|
-
hasError = this.verifyUser()
|
637
|
-
if(hasError)
|
638
|
-
return hasError
|
639
|
-
hasError = this.verifyDevices()
|
640
|
-
if(hasError)
|
641
|
-
return hasError
|
642
|
-
hasError = this.verifyFeedback()
|
643
|
-
if(hasError)
|
644
|
-
return hasError
|
645
|
-
},
|
646
|
-
verifyState() {
|
647
|
-
if(Vue.android && this.data.f_usegas == '未用气' && (this.data.f_nongasuser_path == Vue.nopic || this.data.f_nongasuser_path == ''))
|
648
|
-
return '未使用天然气则必须拍照'
|
649
|
-
if(Vue.android && this.data.f_entry_status == '到访不遇' && this.notencountered && (this.data.f_noanswer_path == Vue.nopic || this.data.f_noanswer_path == ''))
|
650
|
-
return '到访不遇必须拍照'
|
651
|
-
if(Vue.android && this.data.f_entry_status == '拒检' && this.refuseinspection && (this.data.f_rejectcheck_path == Vue.nopic || this.data.f_rejectcheck_path == ''))
|
652
|
-
return '拒捡必须拍照'
|
653
|
-
},
|
654
|
-
verifyUser() {
|
655
|
-
let prefix = '用户基本信息:'
|
656
|
-
if(Util.required(this.data.f_user_name))
|
657
|
-
return prefix + '用户名必须输入'
|
658
|
-
if (!this.data.f_user_phone){
|
659
|
-
return '请输入正确的电话号码'
|
660
|
-
}
|
661
|
-
if(!(/^\d{11}$/.test(this.data.f_user_phone.trim()))) {
|
662
|
-
return '请输入正确的电话号码'
|
663
|
-
}
|
664
|
-
// if(Util.required(this.data.f_residential_area))
|
665
|
-
// return prefix + '小区名称必须输入'
|
666
|
-
// if(Util.required(this.data.f_address))
|
667
|
-
// return prefix + '地址必须输入'
|
668
|
-
},
|
669
|
-
verifyDevices() {
|
670
|
-
for (let dev in this.config) {
|
671
|
-
if (this.config[dev].checkmust == true) {
|
672
|
-
let error = true
|
673
|
-
for(let device in this.data) {
|
674
|
-
if (device.startsWith("device")) {
|
675
|
-
for (let item in this.data[device]) {
|
676
|
-
if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
|
677
|
-
error = false
|
678
|
-
}
|
679
|
-
}
|
680
|
-
}
|
681
|
-
}
|
682
|
-
if (error) {
|
683
|
-
return "请检查" + dev
|
684
|
-
}
|
685
|
-
}
|
686
|
-
}
|
687
|
-
|
688
|
-
for (let dev in this.config) {
|
689
|
-
for(let device in this.data) {
|
690
|
-
if (device.startsWith("device")) {
|
691
|
-
for (let item in this.data[device]) {
|
692
|
-
//检查每一条安检结果
|
693
|
-
if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
|
694
|
-
for (let i in this.data[device][item].f_items) {
|
695
|
-
for (let it in this.config[dev].items) {
|
696
|
-
if (it == this.data[device][item].f_items[i].f_item_name) {
|
697
|
-
let check=false
|
698
|
-
if (!this.data[device][item].f_items[i].f_item_value){
|
699
|
-
check=true
|
700
|
-
}else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)){
|
701
|
-
if (this.data[device][item].f_items[i].f_item_value.length==0){
|
702
|
-
check=true
|
703
|
-
}
|
704
|
-
}
|
705
|
-
|
706
|
-
if(this.config[dev].items[it].type=='picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path){
|
707
|
-
return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
|
708
|
-
}
|
709
|
-
if (this.config[dev].items[it].type !='picture' && this.config[dev].items[it].checkmust == true && check) {
|
710
|
-
return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
|
711
|
-
}
|
712
|
-
}
|
713
|
-
}
|
714
|
-
//检查安检下拉结果
|
715
|
-
if (this.data[device][item].f_items[i].type == 'selector' || this.data[device][item].f_items[i].type == 'radio') {
|
716
|
-
if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_path == Vue.nopic) {
|
717
|
-
return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + this.data[device][item].f_items[i].f_item_value + "选中必须拍照"
|
718
|
-
}
|
719
|
-
}
|
720
|
-
}
|
721
|
-
}
|
722
|
-
}
|
723
|
-
}
|
724
|
-
}
|
725
|
-
}
|
726
|
-
},
|
727
|
-
verifyFeedback() {
|
728
|
-
let prefix = '拍照签名:'
|
729
|
-
if(Vue.android && (!this.data.f_overall_imgs || this.data.f_overall_imgs.length < this.imgsnum) && this.data.f_entry_status == '入户')
|
730
|
-
return prefix + `必须有${this.imgsnum}安检总体照片`
|
731
|
-
if(Vue.android && (!this.data.f_sign_path || this.data.f_sign_path.length == 0) && this.data.f_entry_status == '入户')
|
732
|
-
return prefix + '必须有用户签名'
|
733
|
-
if(Vue.android && this.data.f_defect_notified && this.data.f_notified_path == Vue.nopic)
|
734
|
-
return prefix + '下发安检通知书则必须给通知书拍照'
|
735
|
-
if(Vue.android && this.data.f_blacklist && this.data.f_blocking_cause=='')
|
736
|
-
return prefix + '请填写拉黑原因'
|
737
|
-
if(!this.data.f_client_evaluation && this.data.f_entry_status == '入户')
|
738
|
-
return prefix + '请选择服务评价'
|
739
|
-
},
|
740
|
-
getAllDefect() {
|
741
|
-
let checkResults = {
|
742
|
-
result: '正常',
|
743
|
-
data: []
|
744
|
-
}
|
745
|
-
let value = ''
|
746
|
-
let codata = JSON.parse(JSON.stringify(this.data))
|
747
|
-
codata.f_devices = []
|
748
|
-
this.f_devices = []
|
749
|
-
for (let device in codata) {
|
750
|
-
let f_device_type
|
751
|
-
if (device.startsWith("device")) {
|
752
|
-
let hasOther = ''
|
753
|
-
let otherValue = null
|
754
|
-
for (let item in codata[device]) {
|
755
|
-
if(typeof codata[device][item]=='function'){
|
756
|
-
continue
|
757
|
-
}
|
758
|
-
codata[device][item].f_create_time = Util.toStandardTimeString()
|
759
|
-
if (codata[device].length > 1) {
|
760
|
-
let j = Number.parseInt(item) + 1
|
761
|
-
f_device_type = `${codata[device][item].f_device_type}${j}`
|
762
|
-
} else {
|
763
|
-
f_device_type = codata[device][item].f_device_type
|
764
|
-
}
|
765
|
-
if(item == 'sum' || item == 'removeEmpty'){
|
766
|
-
continue
|
767
|
-
}
|
768
|
-
for (let i = 0; i < codata[device][item].f_items.length ; i++) {
|
769
|
-
//tag
|
770
|
-
if(i == 'sum' || i == 'removeEmpty'){
|
771
|
-
continue
|
772
|
-
}
|
773
|
-
var items = codata[device][item].f_items[i]
|
774
|
-
items.f_create_time = Util.toStandardTimeString()
|
775
|
-
items.f_item_lists = []
|
776
|
-
if (items.type == 'selector') {
|
777
|
-
items.selected = []
|
778
|
-
} else if (items.type == 'inputSelector') {
|
779
|
-
items.selected = ''
|
780
|
-
}
|
781
|
-
//遍历配置项 将所选隐患项的配置信息放入保存的数据中
|
782
|
-
let f_is_defect //是否是隐患
|
783
|
-
let f_defect_level //是否是隐患
|
784
|
-
let f_item_name = items.f_item_name
|
785
|
-
let f_item_value
|
786
|
-
if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
|
787
|
-
for (let i in items.f_item_value) {
|
788
|
-
if(typeof items.f_item_value[i]=='function'){
|
789
|
-
continue
|
790
|
-
}
|
791
|
-
let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
|
792
|
-
//tag)
|
793
|
-
for (let k in configItems.options) {
|
794
|
-
if(typeof configItems.options[k]=='function'){
|
795
|
-
continue
|
796
|
-
}
|
797
|
-
//tag)
|
798
|
-
if (items.f_item_value[i] === configItems.options[k].data) {
|
799
|
-
|
800
|
-
f_is_defect = configItems.options[k].isdefect
|
801
|
-
f_item_value = items.f_item_value[i]
|
802
|
-
f_defect_level = configItems.options[k].level
|
803
|
-
if (f_is_defect) {
|
804
|
-
if (checkResults.result !== '有隐患') {
|
805
|
-
checkResults.result = '有隐患'
|
806
|
-
}
|
807
|
-
console.log('items'+items)
|
808
|
-
if(items.f_deal_dispose=='报修'){
|
809
|
-
console.log("检测到需要转维修++++++++++++")
|
810
|
-
this.repairDefect.result='未处理'
|
811
|
-
this.repairDefect.data.push(`${f_item_name} : ${f_item_value}`)
|
812
|
-
}
|
813
|
-
if (!this.checkResult.hasOwnProperty(f_device_type+'-'+f_item_name)) {
|
814
|
-
this.checkResult[f_device_type+'-'+f_item_name] = []
|
815
|
-
}
|
816
|
-
this.checkResult[f_device_type+'-'+f_item_name].push(f_item_value)
|
817
|
-
|
818
|
-
}
|
819
|
-
|
820
|
-
let items_list = {
|
821
|
-
f_is_defect: f_is_defect,
|
822
|
-
f_item_value: f_item_value,
|
823
|
-
f_defect_level: f_defect_level,
|
824
|
-
f_is_eliminate: null,
|
825
|
-
f_create_time: Util.toStandardTimeString()
|
826
|
-
}
|
827
|
-
if (!items.f_item_lists) {
|
828
|
-
items.f_item_lists = []
|
829
|
-
if (JSON.stringify(items_list) !== '{}') {
|
830
|
-
items.f_item_lists.push(items_list)
|
831
|
-
}
|
832
|
-
} else {
|
833
|
-
if (JSON.stringify(items_list) !== '{}') {
|
834
|
-
items.f_item_lists.push(items_list)
|
835
|
-
}
|
836
|
-
}
|
837
|
-
}
|
838
|
-
}
|
839
|
-
}
|
840
|
-
} else {
|
841
|
-
let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
|
842
|
-
f_is_defect = items.f_is_defect
|
843
|
-
f_defect_level = items.level
|
844
|
-
f_item_value = items.f_item_value
|
845
|
-
let items_list = {
|
846
|
-
f_is_defect: f_is_defect,
|
847
|
-
f_item_value: f_item_value,
|
848
|
-
f_defect_level: f_defect_level,
|
849
|
-
f_create_time: Util.toStandardTimeString()
|
850
|
-
}
|
851
|
-
if (f_is_defect && f_item_value) {
|
852
|
-
items.f_is_defect = true
|
853
|
-
if (checkResults.result !== '有隐患') {
|
854
|
-
checkResults.result = '有隐患'
|
855
|
-
}
|
856
|
-
if (!this.checkResult.hasOwnProperty(items.f_item_name)) {
|
857
|
-
this.checkResult[items.f_item_name] = []
|
858
|
-
}
|
859
|
-
|
860
|
-
this.checkResult[items.f_item_name].push(f_item_value)
|
861
|
-
|
862
|
-
}
|
863
|
-
if (!items.f_item_lists) {
|
864
|
-
items.f_item_lists = []
|
865
|
-
if (JSON.stringify(items_list) != '{}') {
|
866
|
-
items.f_item_lists.push(items_list)
|
867
|
-
}
|
868
|
-
} else {
|
869
|
-
if (JSON.stringify(items_list) != '{}') {
|
870
|
-
items.f_item_lists.push(items_list)
|
871
|
-
}
|
872
|
-
}
|
873
|
-
}
|
874
|
-
if (hasOther !== '' && otherValue !== null) {
|
875
|
-
this.checkResult[hasOther].push(otherValue)
|
876
|
-
hasOther = ''
|
877
|
-
otherValue = null
|
878
|
-
}
|
879
|
-
items.f_item_value = ''
|
880
|
-
}
|
881
|
-
this.f_devices.push(codata[device][item])
|
882
|
-
}
|
883
|
-
}
|
884
|
-
}
|
885
|
-
if (this.checkResult) {
|
886
|
-
for (let key in this.checkResult) {
|
887
|
-
if(typeof this.checkResult[key]=='function'){
|
888
|
-
continue
|
889
|
-
}
|
890
|
-
// 上次安检结果数据组织
|
891
|
-
let temp = {}
|
892
|
-
temp[key] = this.checkResult[key].join(',')
|
893
|
-
checkResults.data.push(temp)
|
894
|
-
}
|
895
|
-
this.checkResult = {}
|
896
|
-
}
|
897
|
-
if (checkResults.data.length > 0) {
|
898
|
-
let msg = ''
|
899
|
-
for (let a = 0; a < checkResults.data.length; a++) {
|
900
|
-
for (let datumKey in checkResults.data[a]) {
|
901
|
-
msg += datumKey + ':' + checkResults.data[a][datumKey] + ';'
|
902
|
-
}
|
903
|
-
}
|
904
|
-
this.data.f_defect_text = msg
|
905
|
-
codata.f_defect_text = msg
|
906
|
-
}
|
907
|
-
codata.f_defect_content = JSON.stringify(checkResults)
|
908
|
-
this.data.f_defect_content = JSON.stringify(checkResults)
|
909
|
-
return codata
|
910
|
-
},
|
911
|
-
uploadCheckPaper(){
|
912
|
-
this.saveNoclick()
|
913
|
-
this.closely(false) // 保存本地,不删除录音文件停止录音
|
914
|
-
let errString = this.errorVerify()
|
915
|
-
if (errString) {
|
916
|
-
if (Vue.android){
|
917
|
-
this.$showMessage(errString)
|
918
|
-
}
|
919
|
-
return
|
920
|
-
} else {
|
921
|
-
this.$set('data.f_offsite_time', Util.toStandardTimeString())
|
922
|
-
this.$set('data.f_upload_time', Util.toStandardTimeString())
|
923
|
-
this.$set('data.f_upload_date', Util.toStandardTimeString())
|
924
|
-
this.data.f_complete = '已完成'
|
925
|
-
this.disableTimer()
|
926
|
-
}
|
927
|
-
this.onlySave = false
|
928
|
-
this.assemblyCodata()
|
929
|
-
if (this.repairDefect.result != '正常') {
|
930
|
-
return this.$showMessage('有隐患的处理方式为转维修,请点击转维修')
|
931
|
-
}
|
932
|
-
this.save()
|
933
|
-
|
934
|
-
},
|
935
|
-
//将数据组装提出
|
936
|
-
assemblyCodata(){
|
937
|
-
let codata = this.getAllDefect()
|
938
|
-
console.log(`codata类型 开始组装codeta数据-->${typeof codata}`)
|
939
|
-
console.log(`codata内容-->${JSON.stringify(codata)}`)
|
940
|
-
for (let key in codata) {
|
941
|
-
if (key.startsWith("device")) {
|
942
|
-
console.log('this.data.' + key + JSON.stringify(codata[key]))
|
943
|
-
codata[key] = []
|
944
|
-
}
|
945
|
-
}
|
946
|
-
codata.f_devices = this.f_devices
|
947
|
-
this.rowCodata=codata
|
948
|
-
},
|
949
|
-
save(type) {
|
950
|
-
if (type == 'temp' || type == 'finish') {
|
951
|
-
this.assemblyCodata()
|
952
|
-
}
|
953
|
-
//禁用事件
|
954
|
-
this.saveNoclick()
|
955
|
-
if(type == 'temp'){
|
956
|
-
this.data.f_complete = '未完成'
|
957
|
-
this.rowCodata.f_complete = '未完成'
|
958
|
-
// 关闭录音方法
|
959
|
-
this.closely(true) //临时保存,删除录音文件并暂停录音
|
960
|
-
this.disableTimer()
|
961
|
-
}else {
|
962
|
-
// 关闭录音方法
|
963
|
-
this.closely(false) // 保存本地,不删除录音文件暂停录音
|
964
|
-
let errString = this.errorVerify()
|
965
|
-
if (errString) {
|
966
|
-
if (Vue.android){
|
967
|
-
this.$showMessage(errString)
|
968
|
-
}
|
969
|
-
return
|
970
|
-
} else {
|
971
|
-
this.data.f_complete = '已完成'
|
972
|
-
this.rowCodata.f_complete = '已完成'
|
973
|
-
this.$set('data.f_offsite_time', Util.toStandardTimeString())
|
974
|
-
this.$set('rowCodata.f_offsite_time', Util.toStandardTimeString())
|
975
|
-
this.disableTimer()
|
976
|
-
}
|
977
|
-
}
|
978
|
-
if(this.data.f_blacklist!='是'){
|
979
|
-
delete this.data.f_blocking_cause
|
980
|
-
}
|
981
|
-
if (this.data.f_entry_status == '入户') {
|
982
|
-
this.data.f_rejectchecks_path = []
|
983
|
-
this.data.f_rejectcheck_path = null
|
984
|
-
this.data.f_rejectcheck1_path = null
|
985
|
-
this.data.f_rejectcheck2_path = null
|
986
|
-
this.data.f_noanswers_path=[]
|
987
|
-
this.data.f_noanswer_path = null
|
988
|
-
this.data.f_noanswer1_path = null
|
989
|
-
this.data.f_noanswer2_path = null
|
990
|
-
}else if (this.data.f_entry_status == '到访不遇') {
|
991
|
-
this.data.f_rejectchecks_path = []
|
992
|
-
this.data.f_rejectcheck_path = null
|
993
|
-
this.data.f_rejectcheck1_path = null
|
994
|
-
this.data.f_rejectcheck2_path = null
|
995
|
-
}else if (this.data.f_entry_status == '拒检') {
|
996
|
-
this.data.f_noanswers_path=[]
|
997
|
-
this.data.f_noanswer_path = null
|
998
|
-
this.data.f_noanswer1_path = null
|
999
|
-
this.data.f_noanswer2_path = null
|
1000
|
-
}
|
1001
|
-
let codata = this.rowCodata
|
1002
|
-
for (let key in codata) {
|
1003
|
-
if (key.startsWith("device")) {
|
1004
|
-
codata[key] = []
|
1005
|
-
}
|
1006
|
-
}
|
1007
|
-
codata.f_complete = this.data.f_complete
|
1008
|
-
if (Vue.android) {
|
1009
|
-
let value = this.$androidUtil.path({
|
1010
|
-
alias: 'getUserinfomation',
|
1011
|
-
data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
|
1012
|
-
})
|
1013
|
-
if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && this.item.f_no_checkplan != '打回') {
|
1014
|
-
codata.f_devices = this.f_devices
|
1015
|
-
if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
|
1016
|
-
this.rowCodata = Object.assign({},this.rowCodata,codata)
|
1017
|
-
} else {
|
1018
|
-
this.rowCodata = codata
|
1019
|
-
}
|
1020
|
-
let param = {
|
1021
|
-
f_check_item_id: this.data.f_check_item_id,
|
1022
|
-
f_checker_id: this.data.f_checker_id,
|
1023
|
-
f_upload_state: '未传',
|
1024
|
-
row: this.rowCodata
|
1025
|
-
}
|
1026
|
-
let paramStr = JSON.stringify(param)
|
1027
|
-
// 多长截断一次
|
1028
|
-
let subLength = 800
|
1029
|
-
for (let i = 0; i < paramStr.length; i += subLength) {
|
1030
|
-
HostApp.param_cache(paramStr.slice(i, i + subLength))
|
1031
|
-
}
|
1032
|
-
HostApp.__this__ = this
|
1033
|
-
HostApp.syncLogic({
|
1034
|
-
// logic别名,key必须为logic
|
1035
|
-
'logic': 'SafeSaveNoPaper',
|
1036
|
-
// 回调执行方法名,key必须为callback
|
1037
|
-
'callback': 'javascript:HostApp.__this__.saveCallBack()',
|
1038
|
-
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
1039
|
-
// 执行回调方法传入key为backresult
|
1040
|
-
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
1041
|
-
'backresult': 1
|
1042
|
-
})
|
1043
|
-
} else {
|
1044
|
-
codata.f_devices = this.f_devices
|
1045
|
-
if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
|
1046
|
-
this.rowCodata = Object.assign({},this.rowCodata,codata)
|
1047
|
-
} else {
|
1048
|
-
this.rowCodata = codata
|
1049
|
-
}
|
1050
|
-
let param = {
|
1051
|
-
f_check_item_id: this.data.f_check_item_id,
|
1052
|
-
f_checker_id: this.data.f_checker_id,
|
1053
|
-
row: this.rowCodata
|
1054
|
-
}
|
1055
|
-
let paramStr = JSON.stringify(param)
|
1056
|
-
// 多长截断一次
|
1057
|
-
let subLength = 800
|
1058
|
-
for (let i = 0; i < paramStr.length; i += subLength) {
|
1059
|
-
HostApp.param_cache(paramStr.slice(i, i + subLength))
|
1060
|
-
}
|
1061
|
-
HostApp.__this__ = this
|
1062
|
-
HostApp.syncLogic({
|
1063
|
-
// logic别名,key必须为logic
|
1064
|
-
'logic': '保存安检单信息',
|
1065
|
-
// 回调执行方法名,key必须为callback
|
1066
|
-
'callback': 'javascript:HostApp.__this__.saveCallBack()',
|
1067
|
-
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
1068
|
-
// 执行回调方法传入key为backresult
|
1069
|
-
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
1070
|
-
'backresult': 1
|
1071
|
-
})
|
1072
|
-
}
|
1073
|
-
|
1074
|
-
} else {
|
1075
|
-
let value = this.$androidUtil.path({
|
1076
|
-
alias: 'getUserinfomation',
|
1077
|
-
data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
|
1078
|
-
})
|
1079
|
-
if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
|
1080
|
-
this.rowCodata = Object.assign({},this.rowCodata,codata)
|
1081
|
-
} else {
|
1082
|
-
this.rowCodata = codata
|
1083
|
-
}
|
1084
|
-
if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && value.data.length == 0 && this.item.f_no_checkplan != '打回') {
|
1085
|
-
this.$androidUtil.bzLogic('SafeSaveNoPaper', {
|
1086
|
-
f_check_item_id: this.data.f_check_item_id,
|
1087
|
-
f_checker_id: this.data.f_checker_id,
|
1088
|
-
f_upload_state: '未传',
|
1089
|
-
row: this.rowCodata
|
1090
|
-
}).then((res) => {
|
1091
|
-
if (res.data.code == 200) {
|
1092
|
-
//保存devices
|
1093
|
-
this.$androidUtil.bzLogic('getPaperInfo', {
|
1094
|
-
f_check_item_id: this.data.f_check_item_id
|
1095
|
-
}).then((res) => {
|
1096
|
-
if (res.data.code == 200) {
|
1097
|
-
let f_paper_id = res.data.data[0].id
|
1098
|
-
for (let device of this.f_devices) {
|
1099
|
-
device.f_paper_id = f_paper_id
|
1100
|
-
this.$androidUtil.bzLogic('saveDevice', {
|
1101
|
-
row: device
|
1102
|
-
}).then((ret) => {
|
1103
|
-
if (ret.code != 200) {
|
1104
|
-
//TODO 失败后处理
|
1105
|
-
this.$showMessage("保存失败!")
|
1106
|
-
return false
|
1107
|
-
}
|
1108
|
-
})
|
1109
|
-
}
|
1110
|
-
}
|
1111
|
-
})
|
1112
|
-
this.$showMessage('保存成功!')
|
1113
|
-
return true
|
1114
|
-
} else {
|
1115
|
-
this.$showMessage("保存失败!")
|
1116
|
-
return false
|
1117
|
-
}
|
1118
|
-
})
|
1119
|
-
}
|
1120
|
-
else {
|
1121
|
-
this.$androidUtil.bzLogic('保存安检单信息', {
|
1122
|
-
f_check_item_id: this.data.f_check_item_id,
|
1123
|
-
f_checker_id: this.data.f_checker_id,
|
1124
|
-
row: this.rowCodata
|
1125
|
-
}).then((res) => {
|
1126
|
-
if (res.data.code == 200) {
|
1127
|
-
//保存devices
|
1128
|
-
this.$androidUtil.bzLogic('getPaperInfo', {
|
1129
|
-
f_check_item_id: this.data.f_check_item_id
|
1130
|
-
}).then((res) => {
|
1131
|
-
if (res.data.code == 200) {
|
1132
|
-
|
1133
|
-
let f_paper_id = res.data.data[0].id
|
1134
|
-
for (let device of this.f_devices) {
|
1135
|
-
device.f_paper_id = f_paper_id
|
1136
|
-
this.$androidUtil.bzLogic('saveDevice', {
|
1137
|
-
row: device
|
1138
|
-
}).then((ret) => {
|
1139
|
-
if (ret.code != 200) {
|
1140
|
-
//TODO 失败后处理
|
1141
|
-
this.$showMessage("保存失败!")
|
1142
|
-
return false
|
1143
|
-
}
|
1144
|
-
})
|
1145
|
-
}
|
1146
|
-
}
|
1147
|
-
})
|
1148
|
-
this.$showMessage('保存成功!')
|
1149
|
-
return true
|
1150
|
-
} else {
|
1151
|
-
this.$showMessage("保存失败!")
|
1152
|
-
return false
|
1153
|
-
}
|
1154
|
-
})
|
1155
|
-
}
|
1156
|
-
}
|
1157
|
-
},
|
1158
|
-
runSyncLogic(logic,callback,backresult){
|
1159
|
-
HostApp.runSyncLogic({
|
1160
|
-
// logic别名,key必须为logic
|
1161
|
-
'logic': logic,
|
1162
|
-
// 回调执行方法名,key必须为callback
|
1163
|
-
'callback': callback,
|
1164
|
-
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
1165
|
-
// 执行回调方法传入key为backresult
|
1166
|
-
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
1167
|
-
'backresult':backresult
|
1168
|
-
})
|
1169
|
-
},
|
1170
|
-
logicWithHint(logic,data,callback,backresult){
|
1171
|
-
HostApp.logicWithHint({
|
1172
|
-
// logic别名,key必须为logic
|
1173
|
-
'logic': logic,
|
1174
|
-
// 回调执行方法名,key必须为callback
|
1175
|
-
'callback': callback,
|
1176
|
-
// logic执行需要的业务参数
|
1177
|
-
'data': data,
|
1178
|
-
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
1179
|
-
// 执行回调方法传入key为backresult
|
1180
|
-
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
1181
|
-
'backresult':backresult
|
1182
|
-
})
|
1183
|
-
},
|
1184
|
-
saveCallBack(jo){
|
1185
|
-
if(jo.state == 'ok'){
|
1186
|
-
let res = JSON.parse(jo.result)
|
1187
|
-
if(res.code == 200){
|
1188
|
-
if(!this.onlySave){
|
1189
|
-
let codata = this.getAllDefect()
|
1190
|
-
//获取微信推送内容
|
1191
|
-
// let WxResult = this.getWeixin(codata)
|
1192
|
-
let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
|
1193
|
-
f_check_item_id: this.data.f_check_item_id
|
1194
|
-
})
|
1195
|
-
//如果是转维修上传,则不做校验,上传完成后自动转维修
|
1196
|
-
if(!this.isToRepair){
|
1197
|
-
if(haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)){
|
1198
|
-
if(!this.isSafeCheckToRepair){
|
1199
|
-
|
1200
|
-
}
|
1201
|
-
}
|
1202
|
-
}
|
1203
|
-
for (let key in codata){
|
1204
|
-
if(key.startsWith("device")){
|
1205
|
-
codata[key] = []
|
1206
|
-
}
|
1207
|
-
}
|
1208
|
-
codata.f_devices = this.f_devices
|
1209
|
-
if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
|
1210
|
-
this.rowCodata = Object.assign({},this.rowCodata,codata)
|
1211
|
-
} else {
|
1212
|
-
this.rowCodata = codata
|
1213
|
-
}
|
1214
|
-
let param = {
|
1215
|
-
f_check_item_id: this.data.f_check_item_id,
|
1216
|
-
f_checker_id: this.data.f_checker_id,
|
1217
|
-
row: this.rowCodata
|
1218
|
-
}
|
1219
|
-
let paramStr = JSON.stringify(param)
|
1220
|
-
// 多长截断一次
|
1221
|
-
let subLength = 800
|
1222
|
-
for (let i = 0; i < paramStr.length; i += subLength) {
|
1223
|
-
HostApp.param_cache(paramStr.slice(i, i + subLength))
|
1224
|
-
}
|
1225
|
-
HostApp.__this__ = this
|
1226
|
-
HostApp.syncLogic({
|
1227
|
-
// logic别名,key必须为logic
|
1228
|
-
'logic': '上传安检信息',
|
1229
|
-
// 回调执行方法名,key必须为callback
|
1230
|
-
'callback': 'javascript:HostApp.__this__.uploadCallBack()',
|
1231
|
-
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
1232
|
-
// 执行回调方法传入key为backresult
|
1233
|
-
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
1234
|
-
'backresult': 1
|
1235
|
-
})
|
1236
|
-
}else{
|
1237
|
-
this.$showMessage('保存成功!')
|
1238
|
-
if(this.clickBack){
|
1239
|
-
this.isStrat = false
|
1240
|
-
this.$dispatch('confirm')
|
1241
|
-
}
|
1242
|
-
}
|
1243
|
-
}else{
|
1244
|
-
this.$showMessage('保存失败!')
|
1245
|
-
return
|
1246
|
-
}
|
1247
|
-
}else{
|
1248
|
-
this.$showMessage('服务器内部错误,保存失败!')
|
1249
|
-
return
|
1250
|
-
}
|
1251
|
-
},
|
1252
|
-
uploadCallBack(jo){
|
1253
|
-
//获取微信推送路径
|
1254
|
-
let url = ""
|
1255
|
-
if(Vue.config.safecheck != undefined) {
|
1256
|
-
if (Vue.config.safecheck.ApproveConfig != undefined) {
|
1257
|
-
if (Vue.config.safecheck.ApproveConfig.weixinurl != undefined) {
|
1258
|
-
url = Vue.config.safecheck.ApproveConfig.weixinurl
|
1259
|
-
}
|
1260
|
-
}
|
1261
|
-
}
|
1262
|
-
if(jo.state == 'ok'){
|
1263
|
-
let res = JSON.parse(jo.result)
|
1264
|
-
if(res.code == 200){
|
1265
|
-
this.$set('data.f_paper_id', res.id)
|
1266
|
-
this.isStrat=false
|
1267
|
-
if(url != ""){
|
1268
|
-
this.$resetpost(`${url}`,{data:WxResult})
|
1269
|
-
}
|
1270
|
-
// 预约安检回更预约安检单
|
1271
|
-
if(this.data.isupdateplanitem == 'true' && this.data.f_SafeToRepair_id){
|
1272
|
-
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/ReturnSafeService`, {data:{
|
1273
|
-
f_paper_id:this.data.f_paper_id,
|
1274
|
-
f_service_id:this.data.f_SafeToRepair_id
|
1275
|
-
}
|
1276
|
-
}).then((ret) => {
|
1277
|
-
if(ret.data && ret.data.code == 200){
|
1278
|
-
console.log('预约安检回更成功')
|
1279
|
-
}
|
1280
|
-
})
|
1281
|
-
}
|
1282
|
-
if(this.isToRepair){
|
1283
|
-
for (let device in this.data){
|
1284
|
-
if(device.startsWith("device")){
|
1285
|
-
this.data[device] = []
|
1286
|
-
if(res.data.length > 0){
|
1287
|
-
for(let i in res.data[0].f_devices){
|
1288
|
-
if(this.data[device].length > 0){
|
1289
|
-
if(this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type){
|
1290
|
-
this.data[device].push(res.data[0].f_devices[i])
|
1291
|
-
res.data[0].f_devices.splice(i,1)
|
1292
|
-
}
|
1293
|
-
}else{
|
1294
|
-
this.data[device].push(res.data[0].f_devices[i])
|
1295
|
-
res.data[0].f_devices.splice(i,1)
|
1296
|
-
}
|
1297
|
-
}
|
1298
|
-
}
|
1299
|
-
}
|
1300
|
-
}
|
1301
|
-
this.todo()
|
1302
|
-
}else{
|
1303
|
-
this.$showMessage('上传成功!')
|
1304
|
-
this.$dispatch('confirm')
|
1305
|
-
}
|
1306
|
-
}else if(res.code == 309){
|
1307
|
-
this.$showMessage('该安检单已作废!')
|
1308
|
-
this.$dispatch('confirm')
|
1309
|
-
}else if(res.code == 710){
|
1310
|
-
this.$showMessage('上传照片失败,请检查网络是否正常!'+res.msg)
|
1311
|
-
this.onlySave = true
|
1312
|
-
return
|
1313
|
-
}else if(res.code == 711){
|
1314
|
-
this.$showMessage('该安检单已被管理员调整,请联系管理员!')
|
1315
|
-
this.onlySave = true
|
1316
|
-
return
|
1317
|
-
}else if(res.code == 712){
|
1318
|
-
this.$showMessage('网络异常,请缓存后重新尝试上传,多次上传失败请联系管理员!')
|
1319
|
-
this.onlySave = true
|
1320
|
-
return
|
1321
|
-
}
|
1322
|
-
else{
|
1323
|
-
this.$showMessage('上传失败!')
|
1324
|
-
}
|
1325
|
-
}else {
|
1326
|
-
this.$showMessage('网络异常,上传失败!')
|
1327
|
-
}
|
1328
|
-
this.onlySave = true
|
1329
|
-
},
|
1330
|
-
safecheckToRepairCallBack(jo){
|
1331
|
-
//获取微信推送路径
|
1332
|
-
if(jo.state == 'ok'){
|
1333
|
-
let res = JSON.parse(jo.result)
|
1334
|
-
if(res.code == 200){
|
1335
|
-
if(res.data.code == 200){
|
1336
|
-
this.$showMessage('上传并转维修成功!')
|
1337
|
-
}else{
|
1338
|
-
this.$showMessage('上传并转维修成功,回写安检单失败!')
|
1339
|
-
}
|
1340
|
-
this.$dispatch('confirm')
|
1341
|
-
}else{
|
1342
|
-
this.$showMessage('上传失败!')
|
1343
|
-
this.onlySave = true
|
1344
|
-
}
|
1345
|
-
}else{
|
1346
|
-
this.$showMessage('网络异常,上传失败!')
|
1347
|
-
this.onlySave = true
|
1348
|
-
}
|
1349
|
-
},
|
1350
|
-
todo(){
|
1351
|
-
let gen = getRepairParam(this)
|
1352
|
-
co(gen)
|
1353
|
-
},
|
1354
|
-
undo(){
|
1355
|
-
this.showCheckToRepair = !this.showCheckToRepair
|
1356
|
-
this.model.serviceacitivity[0].f_reciever = ''
|
1357
|
-
this.model.serviceacitivity[0].f_meetunit = ''
|
1358
|
-
this.model.f_repairtype = ''
|
1359
|
-
this.meading = '转站点'
|
1360
|
-
},
|
1361
|
-
disableTimer() {
|
1362
|
-
if(this.timer) {
|
1363
|
-
window.clearTimeout(this.timer)
|
1364
|
-
this.timer = null
|
1365
|
-
}
|
1366
|
-
},
|
1367
|
-
loaded(paper) {
|
1368
|
-
if(!paper.hasOwnProperty('id')) {
|
1369
|
-
this.$showMessage("该安检单在手机上已经不存在,可能是卸载过程序。可以进入重新安检,或返回安检计划。")
|
1370
|
-
this.init()
|
1371
|
-
} else {
|
1372
|
-
Util.booleanFilter(paper)
|
1373
|
-
HostApp.__this__.$set('data', paper)
|
1374
|
-
HostApp.__this__.$goto('safecheck-userinfo', {}, 'paper-router')
|
1375
|
-
// 如果打回重检则重新计时
|
1376
|
-
if(HostApp.__this__.role == 'inspect'
|
1377
|
-
&& HostApp.__this__.data.f_approved
|
1378
|
-
&& HostApp.__this__.data.f_approved == '打回') {
|
1379
|
-
HostApp.__this__.data.f_onsite_time = Util.toStandardTimeString()
|
1380
|
-
HostApp.__this__.tick()
|
1381
|
-
}
|
1382
|
-
}
|
1383
|
-
HostApp.__callback__ = null
|
1384
|
-
HostApp.__this__ = null
|
1385
|
-
},
|
1386
|
-
S4() {
|
1387
|
-
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
|
1388
|
-
},
|
1389
|
-
extend(initalObj, finalObj) {
|
1390
|
-
var obj = finalObj || {};
|
1391
|
-
for (var i in initalObj) {
|
1392
|
-
var prop = initalObj[i];
|
1393
|
-
|
1394
|
-
// 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
|
1395
|
-
if (prop === obj) {
|
1396
|
-
continue;
|
1397
|
-
}
|
1398
|
-
|
1399
|
-
if (typeof prop === 'object') {
|
1400
|
-
if (obj[i]) {
|
1401
|
-
this.extend(obj[i], prop)
|
1402
|
-
} else {
|
1403
|
-
obj[i] = prop;
|
1404
|
-
}
|
1405
|
-
}
|
1406
|
-
}
|
1407
|
-
return obj;
|
1408
|
-
},
|
1409
|
-
putDevices() {
|
1410
|
-
this.$set('data.approve', "true")
|
1411
|
-
this.$set('data.writeback', "false")
|
1412
|
-
if (Vue.config.safecheck != undefined) {
|
1413
|
-
if (Vue.config.safecheck.ApproveConfig != undefined) {
|
1414
|
-
if (Vue.config.safecheck.ApproveConfig.approve != undefined) {
|
1415
|
-
this.$set('data.approve', Vue.config.safecheck.ApproveConfig.approve)
|
1416
|
-
}
|
1417
|
-
if (Vue.config.safecheck.ApproveConfig.writeback != undefined) {
|
1418
|
-
this.$set('data.writeback', Vue.config.safecheck.ApproveConfig.writeback)
|
1419
|
-
}
|
1420
|
-
if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
|
1421
|
-
this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
|
1422
|
-
}
|
1423
|
-
if (Vue.config.safecheck.ApproveConfig.showtorepair) {
|
1424
|
-
this.show_torepair = Vue.config.safecheck.ApproveConfig.showtorepair
|
1425
|
-
}
|
1426
|
-
if (Vue.config.safecheck.ApproveConfig.notencountered != undefined){
|
1427
|
-
this.notencountered = Vue.config.safecheck.ApproveConfig.notencountered
|
1428
|
-
}
|
1429
|
-
if (Vue.config.safecheck.ApproveConfig.refuseinspection != undefined){
|
1430
|
-
this.refuseinspection = Vue.config.safecheck.ApproveConfig.refuseinspection
|
1431
|
-
}
|
1432
|
-
}
|
1433
|
-
if(this.item.f_user_type == '非民用'){
|
1434
|
-
// 非民用
|
1435
|
-
if (Vue.config.safecheck.DevicesSetConfig != undefined){
|
1436
|
-
if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
|
1437
|
-
this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
|
1438
|
-
}else{
|
1439
|
-
this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type]])
|
1440
|
-
}
|
1441
|
-
}
|
1442
|
-
|
1443
|
-
}else{
|
1444
|
-
// 民用户
|
1445
|
-
if (Vue.config.safecheck.DevicesConfig != undefined){
|
1446
|
-
if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
|
1447
|
-
this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
|
1448
|
-
}else{
|
1449
|
-
this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type?this.item.f_user_type:'民用']])
|
1450
|
-
}
|
1451
|
-
}
|
1452
|
-
}
|
1453
|
-
|
1454
|
-
}
|
1455
|
-
// 预留设备项位置
|
1456
|
-
for (let i in this.config) {
|
1457
|
-
this.tabs.splice(1,0,null)
|
1458
|
-
}
|
1459
|
-
//遍历安检项配置
|
1460
|
-
for (let i in this.config) {
|
1461
|
-
//取得安检项索引值
|
1462
|
-
let n = this.config[i].index
|
1463
|
-
this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
|
1464
|
-
this.$set('data.' + 'device' + n, [])
|
1465
|
-
this.tabs[n] = {
|
1466
|
-
header: i,
|
1467
|
-
complete: 'safecheck-devices',
|
1468
|
-
class: 'repair-details-class',
|
1469
|
-
number: n
|
1470
|
-
}
|
1471
|
-
|
1472
|
-
if(this.config[i].quantity && this.config[i].quantity >0){
|
1473
|
-
let items = []
|
1474
|
-
for (let it in this.config[i].items) {
|
1475
|
-
//赋值下拉选项
|
1476
|
-
if (this.config[i].items[it].type == 'selector') {
|
1477
|
-
for (let op in this.config[i].items[it].options) {
|
1478
|
-
if (this.config[i].items[it].options[op].isdefault == true) {
|
1479
|
-
items.push({
|
1480
|
-
f_defect_level: this.config[i].items[it].options[op].level,
|
1481
|
-
f_is_defect: this.config[i].items[it].options[op].isdefect,
|
1482
|
-
f_item_name: it,
|
1483
|
-
f_item_value: this.config[i].items[it].options[op].data,
|
1484
|
-
f_path: "",
|
1485
|
-
type: "selector"
|
1486
|
-
})
|
1487
|
-
}
|
1488
|
-
}
|
1489
|
-
}
|
1490
|
-
}
|
1491
|
-
for(let q =0;q<this.config[i].quantity;q++) {
|
1492
|
-
this.data['device' + n].push(
|
1493
|
-
{f_device_type: i, f_items:items}
|
1494
|
-
)
|
1495
|
-
}
|
1496
|
-
}
|
1497
|
-
n = n + 1
|
1498
|
-
}
|
1499
|
-
this.faultshow.number = this.tabs.length
|
1500
|
-
},
|
1501
|
-
init () {
|
1502
|
-
// 无计划安检是否回更待办计划
|
1503
|
-
this.data.isupdateplanitem = this.$appdata.getSingleValue('在线安检回更有计划') ? this.$appdata.getSingleValue('在线安检回更有计划') : 'false'
|
1504
|
-
// 预约安检单工单编号
|
1505
|
-
this.data.f_SafeToRepair_id = this.item.f_service_id
|
1506
|
-
this.data.ename = Vue.user.ename
|
1507
|
-
this.data.f_outlets = Vue.user.f_parentname
|
1508
|
-
this.data.f_meetunit = Vue.user.orgpathnames
|
1509
|
-
this.data.orgpathstr = Vue.user.orgpathstr
|
1510
|
-
this.data.f_check_item_id = this.item.id
|
1511
|
-
this.data.f_check_plan_id = this.f_plan_id
|
1512
|
-
this.data.f_checker_id = Vue.user.id
|
1513
|
-
this.data.f_checker_name = Vue.user.name
|
1514
|
-
this.data.f_check_type = this.item.f_user_type
|
1515
|
-
this.data.f_safecheck_type = this.item.f_safecheck_type
|
1516
|
-
this.data.f_subcompany = this.item.f_subcompany
|
1517
|
-
this.data.f_approved = this.item.f_approvedf_read_instructions
|
1518
|
-
this.data.f_repair_approved = this.item.f_repair_approved
|
1519
|
-
this.data.f_no_checkplan = this.item.f_no_checkplan
|
1520
|
-
this.data.f_approved = this.item.f_approved
|
1521
|
-
this.data.f_filialeid = this.item.f_filialeid || Vue.user.orgid
|
1522
|
-
this.data.f_orgstr = this.item.f_orgstr
|
1523
|
-
this.data.version = this.item.version
|
1524
|
-
this.data.f_check_version=this.item.f_check_version
|
1525
|
-
this.$set('data.f_meters', this.item.f_plan_meters)
|
1526
|
-
this.$set('data.f_userinfo_code', this.item.f_userinfo_code)
|
1527
|
-
// 安检状态
|
1528
|
-
this.$set('data.f_entry_status', '入户')
|
1529
|
-
this.$set('data.f_safe_type', '年度安检')
|
1530
|
-
this.$set('data.f_usegas', '已使用')
|
1531
|
-
this.$set('data.f_state',this.item.f_state)
|
1532
|
-
this.$set('data.f_source', this.source?this.source:'安检')
|
1533
|
-
this.$set('data.f_other_checker_name', '')
|
1534
|
-
// 用户信息
|
1535
|
-
this.$set('data.f_user_name', this.item.f_user_name)
|
1536
|
-
this.$set('data.f_rent_phone', this.item.f_rent_phone)
|
1537
|
-
this.$set('data.f_user_phone', this.item.f_user_phone || this.item.f_plan_meters[0].f_user_phone)
|
1538
|
-
this.$set('data.f_userinfoid', this.item.f_userinfoid)
|
1539
|
-
this.$set('data.f_address', this.item.f_address)
|
1540
|
-
this.$set('data.f_card_id', this.item.f_card_id)
|
1541
|
-
this.$set('data.f_slice_area', this.item.f_slice_area)
|
1542
|
-
this.$set('data.f_recheck_id', this.item.id)
|
1543
|
-
this.$set('rowCodata.f_recheck_id', this.item.id)
|
1544
|
-
this.$set('data.f_street', this.item.f_street)
|
1545
|
-
this.$set('data.f_room', this.item.f_room)
|
1546
|
-
this.$set('data.f_building', this.item.f_building)
|
1547
|
-
this.$set('data.f_unit', this.item.f_unit)
|
1548
|
-
this.$set('data.f_floor', this.item.f_floor)
|
1549
|
-
this.$set('data.f_residential_area' , this.item.f_residential_area)
|
1550
|
-
this.$set('data.f_idnumber', this.item.f_idnumber)
|
1551
|
-
this.$set('data.f_comments', this.item.f_comments)
|
1552
|
-
this.$set('data.f_userproperties', this.item.f_userproperties)
|
1553
|
-
this.$set('data.f_client_evaluation', '满意')
|
1554
|
-
this.$set('data.f_userfiles_id', this.item.f_plan_meters[0].f_userfiles_id)
|
1555
|
-
this.$set('data.f_valve_state', this.item.f_plan_meters[0].f_valve_state)
|
1556
|
-
this.$set('data.f_off_valve_reason', this.item.f_plan_meters[0].f_off_valve_reason)
|
1557
|
-
// 处置方式
|
1558
|
-
this.$set('data.f_gas_guidelines', true)
|
1559
|
-
this.$set('data.f_safety_warning', true)
|
1560
|
-
this.$set('data.f_gas_manual', true)
|
1561
|
-
this.$set('data.f_no_gas_device', false)
|
1562
|
-
this.$set('data.f_close_valve', false)
|
1563
|
-
this.$set('data.f_unload_battery', false)
|
1564
|
-
if (this.data.f_check_item_id == '' && this.item.f_no_checkplan == '无计划安检' ) {
|
1565
|
-
this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
|
1566
|
-
}
|
1567
|
-
if(this.item.f_no_checkplan == '复检'){
|
1568
|
-
this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
|
1569
|
-
}
|
1570
|
-
if(this.item.f_plan_meters) {
|
1571
|
-
for (let de in this.devices) {
|
1572
|
-
if(typeof this.devices[de]=='function'){
|
1573
|
-
continue
|
1574
|
-
}
|
1575
|
-
this.$set('data.device' + this.devices[de].n, [])
|
1576
|
-
for (let i = 0; i < this.item.f_plan_meters.length; i++) {
|
1577
|
-
if (this.item.f_plan_meters[i].f_meter_type) {
|
1578
|
-
this.data.f_meter_type=this.item.f_plan_meters[i].f_meter_type
|
1579
|
-
//tag)
|
1580
|
-
if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') >= 0) {
|
1581
|
-
this.data['device' + this.devices[de].n].push({
|
1582
|
-
f_device_type: "燃气表",
|
1583
|
-
f_items: [
|
1584
|
-
{
|
1585
|
-
f_defect_level: null,
|
1586
|
-
f_device_id: "",
|
1587
|
-
f_is_defect: "",
|
1588
|
-
f_item_name: "基表编号",
|
1589
|
-
f_item_value: this.item.f_plan_meters[i].f_meter_no,
|
1590
|
-
f_path: "",
|
1591
|
-
type: "number"
|
1592
|
-
},
|
1593
|
-
{
|
1594
|
-
f_defect_level: null,
|
1595
|
-
f_device_id: "",
|
1596
|
-
f_is_defect: "",
|
1597
|
-
f_item_name: "气表型号",
|
1598
|
-
f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
|
1599
|
-
f_path: "",
|
1600
|
-
type: "string"
|
1601
|
-
},
|
1602
|
-
{
|
1603
|
-
f_defect_level: null,
|
1604
|
-
f_device_id: "",
|
1605
|
-
f_is_defect: "",
|
1606
|
-
f_item_name: "气表品牌",
|
1607
|
-
f_item_value: this.item.f_plan_meters[i].f_aliasname,
|
1608
|
-
f_path: "",
|
1609
|
-
type: "string"
|
1610
|
-
},
|
1611
|
-
{
|
1612
|
-
f_defect_level: null,
|
1613
|
-
f_device_id: "",
|
1614
|
-
f_is_defect: "",
|
1615
|
-
f_item_name: "进气方向",
|
1616
|
-
f_item_value: this.item.f_plan_meters[i].f_flow_direction,
|
1617
|
-
f_path: "",
|
1618
|
-
type: "string"
|
1619
|
-
},
|
1620
|
-
{
|
1621
|
-
f_defect_level: null,
|
1622
|
-
f_device_id: "",
|
1623
|
-
f_is_defect: "",
|
1624
|
-
f_item_name: "上期表读数",
|
1625
|
-
f_item_value: this.item.f_plan_meters[i].f_prior_reading,
|
1626
|
-
f_path: "",
|
1627
|
-
type: "number"
|
1628
|
-
},
|
1629
|
-
{
|
1630
|
-
f_defect_level: null,
|
1631
|
-
f_device_id: "",
|
1632
|
-
f_is_defect: "",
|
1633
|
-
f_item_name: "表封号",
|
1634
|
-
f_item_value: this.item.f_plan_meters[i].f_metertitles,
|
1635
|
-
f_path: "",
|
1636
|
-
type: "string"
|
1637
|
-
}
|
1638
|
-
]
|
1639
|
-
})
|
1640
|
-
}
|
1641
|
-
else if (this.devices[de].device == "燃气表") {
|
1642
|
-
this.data['device' + this.devices[de].n].push({
|
1643
|
-
f_device_type: "燃气表",
|
1644
|
-
f_items: [
|
1645
|
-
{
|
1646
|
-
f_defect_level: null,
|
1647
|
-
f_device_id: "",
|
1648
|
-
f_is_defect: "",
|
1649
|
-
f_item_name: "基表编号",
|
1650
|
-
f_item_value: this.item.f_plan_meters[i].f_meter_no,
|
1651
|
-
f_path: "",
|
1652
|
-
type: "number"
|
1653
|
-
},
|
1654
|
-
{
|
1655
|
-
f_defect_level: null,
|
1656
|
-
f_device_id: "",
|
1657
|
-
f_is_defect: "",
|
1658
|
-
f_item_name: "气表型号",
|
1659
|
-
f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
|
1660
|
-
f_path: "",
|
1661
|
-
type: "string"
|
1662
|
-
},
|
1663
|
-
{
|
1664
|
-
f_defect_level: null,
|
1665
|
-
f_device_id: "",
|
1666
|
-
f_is_defect: "",
|
1667
|
-
f_item_name: "气表品牌",
|
1668
|
-
f_item_value: this.item.f_plan_meters[i].f_aliasname,
|
1669
|
-
f_path: "",
|
1670
|
-
type: "string"
|
1671
|
-
},
|
1672
|
-
{
|
1673
|
-
f_defect_level: null,
|
1674
|
-
f_device_id: "",
|
1675
|
-
f_is_defect: "",
|
1676
|
-
f_item_name: "进气方向",
|
1677
|
-
f_item_value: this.item.f_plan_meters[i].f_flow_direction,
|
1678
|
-
f_path: "",
|
1679
|
-
type: "string"
|
1680
|
-
},
|
1681
|
-
{
|
1682
|
-
f_defect_level: null,
|
1683
|
-
f_device_id: "",
|
1684
|
-
f_is_defect: "",
|
1685
|
-
f_item_name: "上期表读数",
|
1686
|
-
f_item_value: this.item.f_plan_meters[i].f_prior_reading,
|
1687
|
-
f_path: "",
|
1688
|
-
type: "number"
|
1689
|
-
},
|
1690
|
-
{
|
1691
|
-
f_defect_level: null,
|
1692
|
-
f_device_id: "",
|
1693
|
-
f_is_defect: "",
|
1694
|
-
f_item_name: "表封号",
|
1695
|
-
f_item_value: this.item.f_plan_meters[i].f_metertitles,
|
1696
|
-
f_path: "",
|
1697
|
-
type: "string"
|
1698
|
-
}
|
1699
|
-
]
|
1700
|
-
})
|
1701
|
-
}
|
1702
|
-
if(this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('物联网表') >= 0){
|
1703
|
-
this.data['device' + this.devices[de].n].forEach(device => {
|
1704
|
-
if (!this.data.f_collection_type) {
|
1705
|
-
this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
|
1706
|
-
delete this.config['燃气表']['items']['累购气量']
|
1707
|
-
delete this.config['燃气表']['items']['已用金额']
|
1708
|
-
delete this.config['燃气表']['items']['剩余气量']
|
1709
|
-
delete this.config['燃气表']['items']['气量异常差值']
|
1710
|
-
delete this.config['燃气表']['items']['金额异常差值']
|
1711
|
-
device.f_items.push(
|
1712
|
-
{
|
1713
|
-
f_defect_level: null,
|
1714
|
-
f_device_id: "",
|
1715
|
-
f_is_defect: "",
|
1716
|
-
f_item_name: "初始表底",
|
1717
|
-
isshow: true,
|
1718
|
-
f_item_value: this.item.f_plan_meters[i].f_initial_base,
|
1719
|
-
f_path: "",
|
1720
|
-
type: "number"
|
1721
|
-
},
|
1722
|
-
{
|
1723
|
-
f_defect_level: null,
|
1724
|
-
f_device_id: "",
|
1725
|
-
f_is_defect: "",
|
1726
|
-
f_item_name: "累购金额",
|
1727
|
-
f_item_value: this.item.f_plan_meters[i].f_total_fee,
|
1728
|
-
f_path: "",
|
1729
|
-
type: "number"
|
1730
|
-
},
|
1731
|
-
{
|
1732
|
-
f_defect_level: null,
|
1733
|
-
f_device_id: "",
|
1734
|
-
f_is_defect: "",
|
1735
|
-
f_item_name: "已用气量",
|
1736
|
-
f_item_value: this.item.f_plan_meters[i].f_meter_base,
|
1737
|
-
f_path: "",
|
1738
|
-
type: "number"
|
1739
|
-
},
|
1740
|
-
{
|
1741
|
-
f_defect_level: null,
|
1742
|
-
f_device_id: "",
|
1743
|
-
f_is_defect: "",
|
1744
|
-
f_item_name: "剩余金额",
|
1745
|
-
f_item_value: '',
|
1746
|
-
f_path: "",
|
1747
|
-
type: "number"
|
1748
|
-
},
|
1749
|
-
{
|
1750
|
-
f_defect_level: null,
|
1751
|
-
f_device_id: "",
|
1752
|
-
f_is_defect: "",
|
1753
|
-
f_item_name: "系统余额",
|
1754
|
-
f_item_value: this.item.f_plan_meters[i].f_balance_amount,
|
1755
|
-
f_path: "",
|
1756
|
-
type: "number"
|
1757
|
-
}
|
1758
|
-
)
|
1759
|
-
}
|
1760
|
-
})
|
1761
|
-
} else if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_collection_type) {
|
1762
|
-
this.data['device' + this.devices[de].n].forEach(device => {
|
1763
|
-
/*
|
1764
|
-
"累购气量":{"index":8,"type":"number","readonly":true},
|
1765
|
-
"累购金额":{"index":8,"type":"number","readonly":true},
|
1766
|
-
"字轮读数":{"index":9,"type":"number","checkmust": true},
|
1767
|
-
"已用金额":{"index":9,"type":"number","checkmust": true},
|
1768
|
-
"剩余气量":{"index":10,"type":"number","checkmust": true},
|
1769
|
-
"剩余金额":{"index":10,"type":"number","checkmust": true},
|
1770
|
-
"气量异常差值":{"index":11,"type":"number","readonly": true},
|
1771
|
-
"金额异常差值":{"index":11,"type":"number","readonly": true}
|
1772
|
-
*/
|
1773
|
-
if (this.item.f_plan_meters[i].f_collection_type == '按金额') {
|
1774
|
-
if (!this.data.f_collection_type) {
|
1775
|
-
this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
|
1776
|
-
delete this.config['燃气表']['items']['累购气量']
|
1777
|
-
delete this.config['燃气表']['items']['已用气量']
|
1778
|
-
delete this.config['燃气表']['items']['剩余气量']
|
1779
|
-
delete this.config['燃气表']['items']['气量异常差值']
|
1780
|
-
delete this.config['燃气表']['items']['系统余额']
|
1781
|
-
device.f_items.push(
|
1782
|
-
{
|
1783
|
-
f_defect_level: null,
|
1784
|
-
f_device_id: "",
|
1785
|
-
f_is_defect: "",
|
1786
|
-
f_item_name: "初始表底",
|
1787
|
-
isshow: false,
|
1788
|
-
f_item_value: '',
|
1789
|
-
f_path: "",
|
1790
|
-
type: "number"
|
1791
|
-
},
|
1792
|
-
{
|
1793
|
-
f_defect_level: null,
|
1794
|
-
f_device_id: "",
|
1795
|
-
f_is_defect: "",
|
1796
|
-
f_item_name: "累购金额",
|
1797
|
-
f_item_value: this.item.f_plan_meters[i].f_total_fee,
|
1798
|
-
f_path: "",
|
1799
|
-
type: "number"
|
1800
|
-
},
|
1801
|
-
{
|
1802
|
-
f_defect_level: null,
|
1803
|
-
f_device_id: "",
|
1804
|
-
f_is_defect: "",
|
1805
|
-
f_item_name: "已用金额",
|
1806
|
-
f_item_value: null,
|
1807
|
-
f_path: "",
|
1808
|
-
type: "number"
|
1809
|
-
},
|
1810
|
-
{
|
1811
|
-
f_defect_level: null,
|
1812
|
-
f_device_id: "",
|
1813
|
-
f_is_defect: "",
|
1814
|
-
f_item_name: "剩余金额",
|
1815
|
-
f_item_value: null,
|
1816
|
-
f_path: "",
|
1817
|
-
type: "number"
|
1818
|
-
},
|
1819
|
-
{
|
1820
|
-
f_defect_level: null,
|
1821
|
-
f_device_id: "",
|
1822
|
-
f_is_defect: "",
|
1823
|
-
f_item_name: "金额异常差值",
|
1824
|
-
f_item_value: null,
|
1825
|
-
f_path: "",
|
1826
|
-
type: "number"
|
1827
|
-
}
|
1828
|
-
)
|
1829
|
-
}
|
1830
|
-
} else
|
1831
|
-
if (this.item.f_plan_meters[i].f_collection_type == '按气量') {
|
1832
|
-
if (!this.data.f_collection_type) {
|
1833
|
-
this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
|
1834
|
-
delete this.config['燃气表']['items']['累购金额']
|
1835
|
-
delete this.config['燃气表']['items']['已用金额']
|
1836
|
-
delete this.config['燃气表']['items']['剩余金额']
|
1837
|
-
delete this.config['燃气表']['items']['金额异常差值']
|
1838
|
-
delete this.config['燃气表']['items']['系统余额']
|
1839
|
-
device.f_items.push(
|
1840
|
-
{
|
1841
|
-
f_defect_level: null,
|
1842
|
-
f_device_id: "",
|
1843
|
-
f_is_defect: "",
|
1844
|
-
f_item_name: "初始表底",
|
1845
|
-
isshow: true,
|
1846
|
-
f_item_value: this.item.f_plan_meters[i].f_initial_base,
|
1847
|
-
f_path: "",
|
1848
|
-
type: "number"
|
1849
|
-
},
|
1850
|
-
{
|
1851
|
-
f_defect_level: null,
|
1852
|
-
f_device_id: "",
|
1853
|
-
f_is_defect: "",
|
1854
|
-
f_item_name: "累购气量",
|
1855
|
-
f_item_value: this.item.f_plan_meters[i].f_total_gas,
|
1856
|
-
f_path: "",
|
1857
|
-
type: "number"
|
1858
|
-
},
|
1859
|
-
{
|
1860
|
-
f_defect_level: null,
|
1861
|
-
f_device_id: "",
|
1862
|
-
f_is_defect: "",
|
1863
|
-
f_item_name: "已用气量",
|
1864
|
-
f_item_value: this.item.f_plan_meters[i].f_meter_base,
|
1865
|
-
f_path: "",
|
1866
|
-
type: "number"
|
1867
|
-
},
|
1868
|
-
{
|
1869
|
-
f_defect_level: null,
|
1870
|
-
f_device_id: "",
|
1871
|
-
f_is_defect: "",
|
1872
|
-
f_item_name: "剩余气量",
|
1873
|
-
f_item_value: "",
|
1874
|
-
f_path: "",
|
1875
|
-
type: "number"
|
1876
|
-
},
|
1877
|
-
{
|
1878
|
-
f_defect_level: null,
|
1879
|
-
f_device_id: "",
|
1880
|
-
f_is_defect: "",
|
1881
|
-
f_item_name: "气量异常差值",
|
1882
|
-
f_item_value: null,
|
1883
|
-
f_path: "",
|
1884
|
-
type: "number"
|
1885
|
-
}
|
1886
|
-
)
|
1887
|
-
}
|
1888
|
-
}
|
1889
|
-
})
|
1890
|
-
} else if(this.devices[de].device == "燃气表"){
|
1891
|
-
this.data['device' + this.devices[de].n].forEach(device => {
|
1892
|
-
if (!this.data.f_collection_type) {
|
1893
|
-
this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
|
1894
|
-
delete this.config['燃气表']['items']['累购金额']
|
1895
|
-
delete this.config['燃气表']['items']['已用金额']
|
1896
|
-
delete this.config['燃气表']['items']['剩余金额']
|
1897
|
-
delete this.config['燃气表']['items']['金额异常差值']
|
1898
|
-
delete this.config['燃气表']['items']['系统余额']
|
1899
|
-
device.f_items.push(
|
1900
|
-
{
|
1901
|
-
f_defect_level: null,
|
1902
|
-
f_device_id: "",
|
1903
|
-
f_is_defect: "",
|
1904
|
-
f_item_name: "初始表底",
|
1905
|
-
isshow: true,
|
1906
|
-
f_item_value: this.item.f_plan_meters[i].f_initial_base,
|
1907
|
-
f_path: "",
|
1908
|
-
type: "number"
|
1909
|
-
},
|
1910
|
-
{
|
1911
|
-
f_defect_level: null,
|
1912
|
-
f_device_id: "",
|
1913
|
-
f_is_defect: "",
|
1914
|
-
f_item_name: "累购气量",
|
1915
|
-
f_item_value: this.item.f_plan_meters[i].f_total_gas,
|
1916
|
-
f_path: "",
|
1917
|
-
type: "number"
|
1918
|
-
},
|
1919
|
-
{
|
1920
|
-
f_defect_level: null,
|
1921
|
-
f_device_id: "",
|
1922
|
-
f_is_defect: "",
|
1923
|
-
f_item_name: "已用气量",
|
1924
|
-
f_item_value: this.item.f_plan_meters[i].f_meter_base,
|
1925
|
-
f_path: "",
|
1926
|
-
type: "number"
|
1927
|
-
},
|
1928
|
-
{
|
1929
|
-
f_defect_level: null,
|
1930
|
-
f_device_id: "",
|
1931
|
-
f_is_defect: "",
|
1932
|
-
f_item_name: "剩余气量",
|
1933
|
-
f_item_value: '',
|
1934
|
-
f_path: "",
|
1935
|
-
type: "number"
|
1936
|
-
},
|
1937
|
-
{
|
1938
|
-
f_defect_level: null,
|
1939
|
-
f_device_id: "",
|
1940
|
-
f_is_defect: "",
|
1941
|
-
f_item_name: "气量异常差值",
|
1942
|
-
isshow:false,
|
1943
|
-
f_item_value: null,
|
1944
|
-
f_path: "",
|
1945
|
-
type: "number"
|
1946
|
-
}
|
1947
|
-
)
|
1948
|
-
}
|
1949
|
-
})
|
1950
|
-
}
|
1951
|
-
}
|
1952
|
-
}
|
1953
|
-
}
|
1954
|
-
}
|
1955
|
-
this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
|
1956
|
-
}
|
1957
|
-
},
|
1958
|
-
watch: {
|
1959
|
-
'row' () {
|
1960
|
-
//tag
|
1961
|
-
this.copy()
|
1962
|
-
}
|
1963
|
-
},
|
1964
|
-
async ready () {
|
1965
|
-
//送气超期功能
|
1966
|
-
//await this.isoverDate()
|
1967
|
-
this.putDevices()
|
1968
|
-
//如果已检,则提取安检单
|
1969
|
-
if (this.item.f_state != '未检') {
|
1970
|
-
if (this.role == 'inspect' || this.role == 'androidview') {
|
1971
|
-
HostApp.__callback__ = this.loaded
|
1972
|
-
HostApp.__this__ = this
|
1973
|
-
let that = this
|
1974
|
-
let value = {}
|
1975
|
-
if (this.role == 'inspect') {
|
1976
|
-
if (this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') {
|
1977
|
-
value = this.$androidUtil.path({
|
1978
|
-
alias: 'getUserinfomation',
|
1979
|
-
data: {condition: "f_check_item_id = '" + this.item.id + "' and f_no_checkplan in ('无计划安检','复检')"}
|
1980
|
-
})
|
1981
|
-
} else {
|
1982
|
-
value = this.$androidUtil.bzLogic('FetchCheckPaper', {id: this.item.id})
|
1983
|
-
}
|
1984
|
-
} else {
|
1985
|
-
value = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data: {condition: `id = '${this.item.f_paper_id}'`}})
|
1986
|
-
}
|
1987
|
-
Util.replaceFalse(value)
|
1988
|
-
if (value.data.length != 0) {
|
1989
|
-
that.$set('data', value.data[0])
|
1990
|
-
if (this.data.f_collection_type == '按气量') {
|
1991
|
-
delete this.config['燃气表']['items']['累购金额']
|
1992
|
-
delete this.config['燃气表']['items']['已用金额']
|
1993
|
-
delete this.config['燃气表']['items']['剩余金额']
|
1994
|
-
delete this.config['燃气表']['items']['金额异常差值']
|
1995
|
-
delete this.config['燃气表']['items']['系统余额']
|
1996
|
-
} else if (this.data.f_collection_type == '按金额') {
|
1997
|
-
delete this.config['燃气表']['items']['累购气量']
|
1998
|
-
delete this.config['燃气表']['items']['已用气量']
|
1999
|
-
delete this.config['燃气表']['items']['剩余气量']
|
2000
|
-
delete this.config['燃气表']['items']['气量异常差值']
|
2001
|
-
delete this.config['燃气表']['items']['系统余额']
|
2002
|
-
}
|
2003
|
-
//tag)
|
2004
|
-
if (value.data[0].f_devices) {
|
2005
|
-
for (let da in that.devices) {
|
2006
|
-
if(typeof that.devices[da]=='function'){
|
2007
|
-
continue
|
2008
|
-
}
|
2009
|
-
that.$set('data.device' + that.devices[da].n, [])
|
2010
|
-
}
|
2011
|
-
value.data[0].f_devices.forEach((item) => {
|
2012
|
-
for (let i in item.f_items) {
|
2013
|
-
if(typeof item.f_items[i]=='function'){
|
2014
|
-
continue
|
2015
|
-
}
|
2016
|
-
for (let de in that.config[item.f_device_type].items) {
|
2017
|
-
if(typeof that.config[item.f_device_type].items[de]=='function'){
|
2018
|
-
continue
|
2019
|
-
}
|
2020
|
-
if (item.f_items[i].f_item_name == de) {
|
2021
|
-
if (that.config[item.f_device_type].items[de].type == 'selector' || that.config[item.f_device_type].items[de].type == 'checkbox') {
|
2022
|
-
item.f_items[i].f_item_value = []
|
2023
|
-
} else {
|
2024
|
-
item.f_items[i].f_item_value = ''
|
2025
|
-
}
|
2026
|
-
}
|
2027
|
-
}
|
2028
|
-
for (let j in item.f_items[i].f_item_lists) {
|
2029
|
-
if(typeof item.f_items[i].f_item_lists[j]=='function'){
|
2030
|
-
continue
|
2031
|
-
}
|
2032
|
-
if (item.f_items[i].f_item_value instanceof Array) {
|
2033
|
-
item.f_items[i].f_item_value.push(item.f_items[i].f_item_lists[j].f_item_value)
|
2034
|
-
} else {
|
2035
|
-
item.f_items[i].f_item_value = item.f_items[i].f_item_lists[j].f_item_value
|
2036
|
-
}
|
2037
|
-
}
|
2038
|
-
|
2039
|
-
}
|
2040
|
-
for (let de in that.devices) {
|
2041
|
-
if(typeof that.devices[de]=='function'){
|
2042
|
-
continue
|
2043
|
-
}
|
2044
|
-
if (that.devices[de].device == item.f_device_type) {
|
2045
|
-
that.data['device' + that.devices[de].n].push({
|
2046
|
-
f_device_type: item.f_device_type,
|
2047
|
-
f_items: item.f_items
|
2048
|
-
})
|
2049
|
-
//tag)
|
2050
|
-
}
|
2051
|
-
}
|
2052
|
-
})
|
2053
|
-
if (this.role == 'androidview') {
|
2054
|
-
Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
|
2055
|
-
Util.androidRatifyPics(that.picture, this.$androidUtil.getProxyUrl())
|
2056
|
-
Util.booleanFilter(that.data)
|
2057
|
-
}
|
2058
|
-
//tag)
|
2059
|
-
}
|
2060
|
-
} else {
|
2061
|
-
this.init()
|
2062
|
-
}
|
2063
|
-
if(this.parentPage && this.parentPage=='CurrentCreate'){
|
2064
|
-
let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
|
2065
|
-
if (isRecodr) {
|
2066
|
-
if (isRecodr=='true') {
|
2067
|
-
this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
|
2068
|
-
// 初始化录音
|
2069
|
-
let resse = this.record()
|
2070
|
-
}
|
2071
|
-
}
|
2072
|
-
}
|
2073
|
-
this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
|
2074
|
-
} else {
|
2075
|
-
let that = this
|
2076
|
-
let id
|
2077
|
-
if (this.role == 'view') {
|
2078
|
-
id = this.item.id
|
2079
|
-
}
|
2080
|
-
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data:{condition:`id = '${id}'`}}).then((respanse)=> {
|
2081
|
-
if (respanse.data.length != 0) {
|
2082
|
-
that.data = Object.assign(that.data,respanse.data[0])
|
2083
|
-
if(respanse.data[0].f_devices) {
|
2084
|
-
for (let da in that.devices) {
|
2085
|
-
that.$set('data.device' + that.devices[da].n, [])
|
2086
|
-
}
|
2087
|
-
respanse.data[0].f_devices.forEach((item) => {
|
2088
|
-
for (let de in that.devices) {
|
2089
|
-
if (that.devices[de].device == item.f_device_type) {
|
2090
|
-
that.data['device' + that.devices[de].n].push({
|
2091
|
-
f_device_type: item.f_device_type,
|
2092
|
-
f_items: item.f_items
|
2093
|
-
})
|
2094
|
-
}
|
2095
|
-
}
|
2096
|
-
})
|
2097
|
-
}
|
2098
|
-
Util.replaceFalse(that.data)
|
2099
|
-
Util.booleanFilter(that.data)
|
2100
|
-
if(this.role == 'view'){
|
2101
|
-
Util.ratifyPics(that.data)
|
2102
|
-
}else{
|
2103
|
-
Util.androidRatifyPics(that.data,this.$androidUtil.getProxyUrl())
|
2104
|
-
}
|
2105
|
-
} else {
|
2106
|
-
alert("该安检单可能已不在本地!")
|
2107
|
-
this.init()
|
2108
|
-
}
|
2109
|
-
this.$goto('safecheck-userinfo', {userinfo:this.data}, 'paper-router')
|
2110
|
-
}
|
2111
|
-
).catch(
|
2112
|
-
(respanse) => {
|
2113
|
-
alert('查找安检单失败')
|
2114
|
-
})
|
2115
|
-
}
|
2116
|
-
}else{
|
2117
|
-
if(this.parentPage && (this.parentPage == 'CurrentCreate' || this.parentPage == 'AddPlanItem') ){
|
2118
|
-
//tag
|
2119
|
-
let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
|
2120
|
-
if (isRecodr) {
|
2121
|
-
if (isRecodr=='true') {
|
2122
|
-
// this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
|
2123
|
-
// 初始化录音
|
2124
|
-
let resse = this.record()
|
2125
|
-
}
|
2126
|
-
}
|
2127
|
-
}
|
2128
|
-
this.init()
|
2129
|
-
}
|
2130
|
-
},
|
2131
|
-
events: {
|
2132
|
-
'tijiao': function () {
|
2133
|
-
// 事件回调内的 `this` 自动绑定到注册它的实例上
|
2134
|
-
this.confirm()
|
2135
|
-
}
|
2136
|
-
}
|
2137
|
-
}
|
2138
|
-
</script>
|
2139
|
-
<style lang="less">
|
2140
|
-
@import "../../../src/bootstrap/less/variables.less";
|
2141
|
-
.noclickbut {
|
2142
|
-
pointer-events: none;
|
2143
|
-
}
|
2144
|
-
.tab-befor-img (@url) {
|
2145
|
-
content: '';
|
2146
|
-
background-image: url("@{url}");
|
2147
|
-
background-size: 20px;
|
2148
|
-
display: inline-block;
|
2149
|
-
margin-right: 8px;
|
2150
|
-
margin-top: 0.3em;
|
2151
|
-
height: 1.3em;
|
2152
|
-
width: 1.3em;
|
2153
|
-
vertical-align: -35%;
|
2154
|
-
}
|
2155
|
-
|
2156
|
-
@media screen and (min-width: 768px) {
|
2157
|
-
.android-repair-order > div > ul a {
|
2158
|
-
font-size: @font-size-h2;
|
2159
|
-
margin: 0.3em 0;
|
2160
|
-
}
|
2161
|
-
}
|
2162
|
-
.repair-details-class{
|
2163
|
-
&::before {
|
2164
|
-
.tab-befor-img("../../assets/huneiweixiu1.png");
|
2165
|
-
}
|
2166
|
-
}
|
2167
|
-
.repair-info-class {
|
2168
|
-
&::before {
|
2169
|
-
.tab-befor-img("../../assets/baoxiuxinxi1.png");
|
2170
|
-
}
|
2171
|
-
}
|
2172
|
-
.repair-user-info-class {
|
2173
|
-
&::before {
|
2174
|
-
.tab-befor-img("../../assets/jibenxinxi1.png")
|
2175
|
-
}
|
2176
|
-
}
|
2177
|
-
|
2178
|
-
.door-service-class {
|
2179
|
-
&::before {
|
2180
|
-
.tab-befor-img("../../assets/huneiweixiu1.png")
|
2181
|
-
}
|
2182
|
-
}
|
2183
|
-
|
2184
|
-
.pipeline-class {
|
2185
|
-
&::before {
|
2186
|
-
.tab-befor-img("../../assets/guandao1.png")
|
2187
|
-
}
|
2188
|
-
}
|
2189
|
-
|
2190
|
-
.device-service-class {
|
2191
|
-
&::before {
|
2192
|
-
.tab-befor-img("../../assets/shebeiweixiu1.png")
|
2193
|
-
}
|
2194
|
-
}
|
2195
|
-
|
2196
|
-
.trouble-removal-class {
|
2197
|
-
&::before {
|
2198
|
-
.tab-befor-img("../../assets/shiguchuli.png")
|
2199
|
-
}
|
2200
|
-
}
|
2201
|
-
|
2202
|
-
.cooking-utensils-class {
|
2203
|
-
&::before {
|
2204
|
-
.tab-befor-img("../../assets/zaoju1.png")
|
2205
|
-
}
|
2206
|
-
}
|
2207
|
-
|
2208
|
-
.outlay-class {
|
2209
|
-
&::before {
|
2210
|
-
.tab-befor-img("../../assets/feiyong1.png")
|
2211
|
-
}
|
2212
|
-
}
|
2213
|
-
|
2214
|
-
.fault-all-class {
|
2215
|
-
&::before {
|
2216
|
-
.tab-befor-img("../../assets/guzhanghuizong1.png")
|
2217
|
-
}
|
2218
|
-
}
|
2219
|
-
.photo-write-class {
|
2220
|
-
&::before {
|
2221
|
-
.tab-befor-img("../../assets/zaoju.png")
|
2222
|
-
}
|
2223
|
-
}
|
2224
|
-
.delay-apply-class {
|
2225
|
-
&::before {
|
2226
|
-
.tab-befor-img("../../assets/yonghubaoxiu.png")
|
2227
|
-
}
|
2228
|
-
}
|
2229
|
-
|
2230
|
-
.repair-back-class {
|
2231
|
-
&::before {
|
2232
|
-
.tab-befor-img("../../assets/fanhui.png")
|
2233
|
-
}
|
2234
|
-
}
|
2235
|
-
.butt2 {
|
2236
|
-
display: inline;
|
2237
|
-
float: right;
|
2238
|
-
width: 10px;
|
2239
|
-
text-align: center;
|
2240
|
-
align-items:center;
|
2241
|
-
position: absolute;
|
2242
|
-
top:50%;
|
2243
|
-
|
2244
|
-
left:90%;
|
2245
|
-
transform: translate(-50%,-50%);
|
2246
|
-
}
|
2247
|
-
.linesty{
|
2248
|
-
display: inline-block;
|
2249
|
-
height:1px;
|
2250
|
-
width:100%;
|
2251
|
-
background:#d0d0d0;
|
2252
|
-
overflow:hidden;
|
2253
|
-
vertical-align: middle;
|
2254
|
-
}
|
2255
|
-
.spanboder{
|
2256
|
-
border-bottom:2px solid #499edf;
|
2257
|
-
padding-bottom: 8px
|
2258
|
-
}
|
2259
|
-
.app-botton {
|
2260
|
-
position:fixed;
|
2261
|
-
background: #87b2dd;
|
2262
|
-
right:8px;
|
2263
|
-
color: #FFF;
|
2264
|
-
padding: 8px;
|
2265
|
-
text-align: center;
|
2266
|
-
font-size: 1.2em;
|
2267
|
-
z-index: 10;
|
2268
|
-
opacity:0.5;
|
2269
|
-
bottom: 50px;
|
2270
|
-
margin-top: -10px;
|
2271
|
-
height: 40px;
|
2272
|
-
}
|
2273
|
-
.android-repair-order > div > ul a {
|
2274
|
-
font-size: 12px;
|
2275
|
-
color: #333333;
|
2276
|
-
padding: 13px 16px;
|
2277
|
-
}
|
2278
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div id="savebut" class="no-close row android-repair-order" style="background-color: #f9f9f9">
|
3
|
+
<div class="col-sm-12 col-xs-12" >
|
4
|
+
<ul class="nav nav-tabs" style="background:#ffffff;overflow-y: hidden">
|
5
|
+
<li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
|
6
|
+
v-if="$index < number+1 && $index < faultshow.number" >
|
7
|
+
<a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
|
8
|
+
<span class="spanboder">{{row.header}}</span>
|
9
|
+
<img class="butt2" :src="imgback(row.complete === componentName,row.header === header)"></a>
|
10
|
+
<p></p>
|
11
|
+
</li>
|
12
|
+
<div class="col-sm-12 col-xs-12 repair-bg" v-show="routeShow">
|
13
|
+
<route name='repair' :reuse="false"></route>
|
14
|
+
</div>
|
15
|
+
<li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
|
16
|
+
v-if="$index > number && $index < faultshow.number ">
|
17
|
+
<a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
|
18
|
+
<span class="spanboder">{{row.header}}</span>
|
19
|
+
<img class="butt2" :src="imgback(row.complete === componentName,row.header === header)"></a>
|
20
|
+
<p></p>
|
21
|
+
</li>
|
22
|
+
<div class="col-sm-12 col-xs-12 repair-bg" v-if="actionEnabled ">
|
23
|
+
<div class="auto select-overspread form-horizontal repair-bg " style="padding-bottom:5px;">
|
24
|
+
<div class="bq-parent">
|
25
|
+
<blockquote class="blockquote">
|
26
|
+
<p>安检上传</p>
|
27
|
+
</blockquote>
|
28
|
+
</div>
|
29
|
+
<div class="panel panel-default auto repair-info-content">
|
30
|
+
<div class="panel-body ">
|
31
|
+
<div class="row auto">
|
32
|
+
<!--<div class="col-xs-12 col-sm-12 col-md-12" :style="timeSet(this.isneedDate)?'':'display:none'">-->
|
33
|
+
<!--<label>请输入超期原因:</label><br/>-->
|
34
|
+
<!--<textarea style="width: 100%;" v-model=""></textarea>-->
|
35
|
+
<!--</div>-->
|
36
|
+
<div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;">
|
37
|
+
<div class="col-xs-3 col-sm-3 col-md-3" v-if="parentPage=='CurrentCreate'">
|
38
|
+
<button type="button" name="button" class="col-sm-3 btn btn-primary" @click="save('temp')">
|
39
|
+
临时保存
|
40
|
+
</button>
|
41
|
+
</div>
|
42
|
+
<div class="col-xs-3 col-sm-3 col-md-3">
|
43
|
+
<button class="col-sm-3 btn btn-primary" @click="save('finish')">
|
44
|
+
本地缓存
|
45
|
+
</button>
|
46
|
+
</div>
|
47
|
+
<div class="col-xs-3 col-sm-3 col-md-3">
|
48
|
+
<button type="button" name="button" class="col-sm-3 btn btn-primary" @click="uploadCheckPaper">
|
49
|
+
上传
|
50
|
+
</button>
|
51
|
+
</div>
|
52
|
+
<div v-if="show_torepair">
|
53
|
+
<button type="button" name="button" class="col-sm-3 btn btn-primary" @click="showmod">
|
54
|
+
转维修
|
55
|
+
</button>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
</ul>
|
64
|
+
</div>
|
65
|
+
<modal :show.sync="showModal2" :backdrop="false" style="font-size: 15px">
|
66
|
+
<div slot="modal-header" class="modal-header upuserinfo_sel">
|
67
|
+
<h4 class="modal-title">
|
68
|
+
转维修
|
69
|
+
</h4>
|
70
|
+
</div>
|
71
|
+
<div slot="modal-body" class="modal-body">
|
72
|
+
<div class="row">
|
73
|
+
<ol style="border: 1px solid green;padding: 15px 0 15px 20px">
|
74
|
+
<li v-for="row in repairDefect.data" >{{row}}</li>
|
75
|
+
</ol>
|
76
|
+
</div>
|
77
|
+
<div class="row" style="margin-top: 10px">
|
78
|
+
<label class="font_normal_body">派发类型</label>
|
79
|
+
<v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
|
80
|
+
:options='dispatchTypeOptions' placeholder='派发类型'
|
81
|
+
close-on-select>
|
82
|
+
</v-select>
|
83
|
+
</div>
|
84
|
+
<div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
|
85
|
+
<label class="font_normal_body">维 修 员</label>
|
86
|
+
<v-select
|
87
|
+
:value.sync="selectData.f_repairman"
|
88
|
+
:value-single="true"
|
89
|
+
:options='repairers'
|
90
|
+
placeholder='请选择维修员'
|
91
|
+
close-on-select></v-select>
|
92
|
+
</div>
|
93
|
+
<div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
|
94
|
+
<label class="font_normal_body">站    点</label>
|
95
|
+
<right-tree
|
96
|
+
islist
|
97
|
+
:source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
|
98
|
+
@re-res="getSiteRes"></right-tree>
|
99
|
+
</div>
|
100
|
+
<!--<div class="row" style="margin-top: 10px">
|
101
|
+
<label class="font_normal_body">报修类型</label>
|
102
|
+
<v-select :value.sync="selectData.f_repairtype"
|
103
|
+
class="select select_list"
|
104
|
+
:value-single="true"
|
105
|
+
:options='repairTypeOptions'
|
106
|
+
close-on-select>
|
107
|
+
</v-select>
|
108
|
+
</div>-->
|
109
|
+
<div class="row" style="margin-top: 10px">
|
110
|
+
<label class="font_normal_body" >备 注</label>
|
111
|
+
<div class="btn-group" style="width:60%">
|
112
|
+
<textarea style="width:100%;height: 100px" v-model="selectData.f_remarks"></textarea>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
117
|
+
<button type="button" name="button" class="col-sm-3 btn btn-primary" @click="rectification">转维修</button>
|
118
|
+
<button type="button" name="button" class="col-sm-3 btn btn-primary" @click="cancel1">取消</button>
|
119
|
+
</div>
|
120
|
+
</modal>
|
121
|
+
</div>
|
122
|
+
</template>
|
123
|
+
|
124
|
+
<script>
|
125
|
+
import Vue from 'vue'
|
126
|
+
import * as Util from '../Util'
|
127
|
+
import { HttpResetClass } from 'vue-client'
|
128
|
+
import co from 'co'
|
129
|
+
import $ from "jquery";
|
130
|
+
let loadParamGem = async function (self) {
|
131
|
+
await self.$LoadParams.loadParam()
|
132
|
+
}
|
133
|
+
|
134
|
+
export default {
|
135
|
+
title: '安检单',
|
136
|
+
props: ['f_plan_id', 'item', 'role','parentPage','source'],
|
137
|
+
// props: ['f_plan_id', 'role'],
|
138
|
+
data() {
|
139
|
+
return {
|
140
|
+
//测试数据
|
141
|
+
// f_plan_id:'',
|
142
|
+
// role:'inspect',
|
143
|
+
// item:{"f_approved_time":null,"f_user_family_remarks":null,"f_street":"测试街道","f_repair_approved_time":null,
|
144
|
+
// "f_user_type":null,"f_approved_by":null,"f_card_id":null,"f_remark":null,"f_building":"1","f_batch_number":null,
|
145
|
+
// "f_idnumber":null,"f_state":"未检","id":"0EFE0EE2-B155-46F9-8DE0-38C022664A4D","f_complete":null,"f_check_state":null,"f_last_check_state":"拒检",
|
146
|
+
// "f_user_inhome_time":null,"f_residential_area":"测试小区1","version":1,"f_processid":null,"f_last_check_result":"{\"result\":\"正常\",\"data\":[]}",
|
147
|
+
// "f_area":null,"f_usegas":null,"f_user_phone":"16566546548","f_slice_area":"营业大区","f_approved":"未审核","f_upload_state":"未传","f_user_check_time":null,
|
148
|
+
// "f_unit":"1","f_user_spare_phone":null,"f_last_check_date":null,"f_userproperties":null,"f_userfile_id":null,"f_prearranged_date":null,"f_filialeid":"453",
|
149
|
+
// "f_branch":null,"f_orgstr":null,"f_plan_year":2020,"f_orgid":null,"f_approval_notified":null,"f_plan_month":4,"f_approved_note":null,"f_filialeids":null,
|
150
|
+
// "f_floor":"1","f_flag":null,"f_repair_approved_note":null,"f_userinfo_code":"00000002","f_create_time":"2020-05-10 18:56:03","f_meter_no":"","f_station":null,
|
151
|
+
// "f_repair_approved":"未审核","f_no_checkplan":"有计划安检","f_plan_name":"关于","f_repair_approved_by":null,"f_room":"1","f_office":null,"f_comments":null,
|
152
|
+
// "f_address":"兰山街道泰盛小区1栋1单元1层1室","id_back":null,"f_userinfoid":"2","f_subcompany":null,"f_addressid":null,"f_user_phone2":null,
|
153
|
+
// "f_user_equipment_remarks":null,"f_plan_id":"0819ea6707ad4d9dad217c06a87f4227","f_user_name":"用户二",
|
154
|
+
// "f_plan_meters":[{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2119035714","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":3,"f_maker":null,"f_metergasnums":0,"f_total_fee":100,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663},{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2118999901","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":1,"f_maker":null,"f_metergasnums":0,"f_total_fee":0,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663}]
|
155
|
+
// },
|
156
|
+
|
157
|
+
data: {
|
158
|
+
f_devices: [],
|
159
|
+
f_defect_content:'',
|
160
|
+
f_recording1_path:'',
|
161
|
+
f_visit_number:'',
|
162
|
+
f_remark:''
|
163
|
+
},
|
164
|
+
imgsnum:this.$appdata.getSingleValue('安检总体照片数量') ? this.$appdata.getSingleValue('安检总体照片数量'):1, // 安检整体照片默认必须拍1张
|
165
|
+
updateuserphone:false, //安检时是否更新用户电话
|
166
|
+
updatemetermodel:false, //安检时是否更新表型号
|
167
|
+
updatemeternumber:false, //安检时是否更新表号
|
168
|
+
beforephone:'',
|
169
|
+
isUpload:false,
|
170
|
+
show_torepair: false,
|
171
|
+
onlySave:true, //判断保存还是保存并上传
|
172
|
+
livedispose:'',
|
173
|
+
refuseinspection:'', // 拒捡拍照是否提示
|
174
|
+
notencountered:'', // 到访不遇拍照是否提示
|
175
|
+
startClick:false, //开始安检按钮是否可点击
|
176
|
+
isStrat: false, //是否开始安检
|
177
|
+
checkResult:{},//查询结果
|
178
|
+
newcheckResult:{},
|
179
|
+
repairDefect : {
|
180
|
+
result: '正常',
|
181
|
+
data: []
|
182
|
+
},
|
183
|
+
rowCodata:{},
|
184
|
+
repairers: [],
|
185
|
+
timer: null,
|
186
|
+
showModal: false,
|
187
|
+
showModal2:false,
|
188
|
+
pic_to_be_viewed: '',
|
189
|
+
showBack:true,
|
190
|
+
devices: [],
|
191
|
+
f_devices : [],
|
192
|
+
isToRepair:false,
|
193
|
+
clickBack:true, //是否点击返回按钮
|
194
|
+
isSafeCheckToRepair:false,//是否转维修
|
195
|
+
Url:this.$androidUtil.getProxyUrl(),
|
196
|
+
detail:{},
|
197
|
+
defectDevice:{},
|
198
|
+
user:{},
|
199
|
+
is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
|
200
|
+
dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'},{label: '派发给站点', value: '派发给站点'}],
|
201
|
+
selectData:{
|
202
|
+
dispatchType:'派发给维修员',
|
203
|
+
f_repairman:'',
|
204
|
+
f_remarks:'',
|
205
|
+
f_repairtype:'整改'
|
206
|
+
},
|
207
|
+
model: { //转维修数据
|
208
|
+
// 一次派单
|
209
|
+
serviceacitivity: [{
|
210
|
+
f_service_acitivity_type: '派单'
|
211
|
+
}],
|
212
|
+
f_source:'安检',
|
213
|
+
f_service_id: '',
|
214
|
+
f_contact_phone: '',
|
215
|
+
f_meetunit: '',
|
216
|
+
f_phone: '',
|
217
|
+
f_user_name: '',
|
218
|
+
f_address: '',
|
219
|
+
f_repair_date: Util.toStandardTimeString(),
|
220
|
+
f_card_id: '',
|
221
|
+
// f_department: '', 站点选择
|
222
|
+
f_reciever:'',
|
223
|
+
f_remarks: '',
|
224
|
+
f_user_type: '',
|
225
|
+
f_area: '',
|
226
|
+
f_unit_name:'',
|
227
|
+
f_street: '',
|
228
|
+
f_residential_area: '',
|
229
|
+
f_building: '',
|
230
|
+
f_unit: '',
|
231
|
+
f_floor: '',
|
232
|
+
f_room: '',
|
233
|
+
aState: null,
|
234
|
+
f_repairtype: '',
|
235
|
+
f_repairitems:{},
|
236
|
+
},
|
237
|
+
repairitems:[],
|
238
|
+
meading:'转站点',
|
239
|
+
config: {
|
240
|
+
"燃气表":{
|
241
|
+
"checkmust":true,
|
242
|
+
"index":1,
|
243
|
+
"items":{
|
244
|
+
//"燃气表照片":{"index":1,"type":"picture","remark":"(拍摄清晰的表具编号、字轮数、剩余气量等)"},
|
245
|
+
"基表编号":{"index":1,"type":"string","readonly":true},
|
246
|
+
"气表型号":{"index":2,"type":"string","readonly":true},
|
247
|
+
"气表品牌":{"index":3,"type":"string","readonly":true},
|
248
|
+
"进气方向":{"index":4,"type":"string","readonly":true},
|
249
|
+
"初始表底":{"index":5,"type":"number","isshow":false,"readonly":true},
|
250
|
+
"上期表读数":{"index":6,"type":"number","readonly":true,isshow:false},
|
251
|
+
"累购气量":{"index":7,"type":"number","readonly":true},
|
252
|
+
"累购金额":{"index":7,"type":"number","readonly":true},
|
253
|
+
"已用气量":{"index":8,"type":"number","checkmust": false},//基表数
|
254
|
+
"已用金额":{"index":8,"type":"number","checkmust": false},
|
255
|
+
"剩余气量":{"index":9,"type":"number","checkmust": false},//累购-已用
|
256
|
+
//显示屏数 --实际剩余气量
|
257
|
+
"剩余金额":{"index":9,"type":"number","checkmust": false},
|
258
|
+
"气量异常差值":{"index":10,"type":"number","readonly": true},
|
259
|
+
"金额异常差值":{"index":10,"type":"number","readonly": true},
|
260
|
+
"系统余额":{"index":10,"type":"number","readonly": true},
|
261
|
+
"表封号":{"index":11,"type":"string","readonly": true},
|
262
|
+
"燃气表照片":{"index":12,"type":"picture","checkmust": false}
|
263
|
+
}
|
264
|
+
// 注意,配置项的index必须与上面的固定配置保持'顺序'
|
265
|
+
},
|
266
|
+
// "燃气表2":{
|
267
|
+
// "checkmust":true,
|
268
|
+
// "index":2,src
|
269
|
+
// "items":{
|
270
|
+
// "燃气表照片":{"index":1,"type":"picture"},
|
271
|
+
// "表品牌":{"index":2,"type":"string","readonly":true},
|
272
|
+
// "表号":{"index":3,"type":"string","readonly":true},
|
273
|
+
// "表封号":{"index":4,"type":"number","readonly":true},
|
274
|
+
// "表型号":{"index":5,"type":"string","readonly":true},
|
275
|
+
// "位置":{"index":6,"type":"string","readonly":true},
|
276
|
+
// "表底数":{"index":7,"type":"number","readonly":true},
|
277
|
+
// "累购气量":{"index":8,"type":"number","readonly":true},
|
278
|
+
// "累购金额":{"index":8,"type":"number","readonly":true}
|
279
|
+
// }
|
280
|
+
// }
|
281
|
+
},
|
282
|
+
// 维修项
|
283
|
+
isneedDate:'',
|
284
|
+
routeShow:true,
|
285
|
+
number:0,
|
286
|
+
shupingshow:false,
|
287
|
+
pipeline: {},
|
288
|
+
details: [],
|
289
|
+
ids: '',
|
290
|
+
savevalid: {
|
291
|
+
uservalid: false,
|
292
|
+
doorvalid: true,
|
293
|
+
changetable: false
|
294
|
+
},
|
295
|
+
doordetails: {},
|
296
|
+
devicedetails: {},
|
297
|
+
cookdetails: {},
|
298
|
+
componentName: 'safecheck-userinfo',
|
299
|
+
header:'客户信息',
|
300
|
+
tabs: [
|
301
|
+
// 参数全部设置成空,在ready时,等model处理好了,再添加
|
302
|
+
{
|
303
|
+
header: '客户信息',complete:'safecheck-userinfo',class: 'repair-info-class', props: null
|
304
|
+
},
|
305
|
+
{
|
306
|
+
header: '拍照签名',complete:'paper-feedback', class: 'outlay-class', props: null
|
307
|
+
}
|
308
|
+
],
|
309
|
+
faultshow:{
|
310
|
+
number : 8
|
311
|
+
} // 控制 故障汇总 在 菜单里显示与否,
|
312
|
+
}
|
313
|
+
},
|
314
|
+
computed: {
|
315
|
+
actionEnabled: {
|
316
|
+
get() {
|
317
|
+
return this.role == 'inspect'
|
318
|
+
}
|
319
|
+
}
|
320
|
+
},
|
321
|
+
methods: {
|
322
|
+
showmod(){
|
323
|
+
// this.saveNoclick()
|
324
|
+
let errString = this.errorVerify()
|
325
|
+
if (errString) {
|
326
|
+
console.log(errString)
|
327
|
+
console.log('Vue.android',Vue.android)
|
328
|
+
console.log('this.isUpload',this.isUpload)
|
329
|
+
if (Vue.android){
|
330
|
+
this.$showMessage(errString)
|
331
|
+
}
|
332
|
+
return
|
333
|
+
}
|
334
|
+
//清空转维修列表重新进行数据组织
|
335
|
+
this.repairDefect = {
|
336
|
+
result: '正常',
|
337
|
+
data: []
|
338
|
+
}
|
339
|
+
this.data.f_complete = '已完成'
|
340
|
+
this.$set('data.f_offsite_time', Util.toStandardTimeString())
|
341
|
+
this.assemblyCodata()
|
342
|
+
if(this.repairDefect.result=='正常'){
|
343
|
+
this.$showMessage("未发现有选择需要转维修的隐患,请检查填写的数据。如需转维修请在处理方式中选择 '转维修' !")
|
344
|
+
return
|
345
|
+
}
|
346
|
+
console.log("准备保存!")
|
347
|
+
this.disableTimer()
|
348
|
+
this.getEmp()
|
349
|
+
this.showModal2=true
|
350
|
+
},
|
351
|
+
cancel1(){
|
352
|
+
this.showModal2=false
|
353
|
+
this.selectData={
|
354
|
+
dispatchType:'派发给维修员',
|
355
|
+
f_repairman:'',
|
356
|
+
f_remarks:'',
|
357
|
+
f_repairtype:'整改'
|
358
|
+
}
|
359
|
+
},
|
360
|
+
getSiteRes(obj) {
|
361
|
+
console.log('siteRes ---> ')
|
362
|
+
console.log(obj)
|
363
|
+
if(obj.resids[0]){
|
364
|
+
this.selectData.f_meetunit = obj.res.join('.')
|
365
|
+
this.selectData.f_reciever = obj.resids.join('.')
|
366
|
+
this.selectData.f_outlets = obj.res[obj.res.length - 1]
|
367
|
+
}else {
|
368
|
+
this.selectData.f_meetunit = ''
|
369
|
+
this.selectData.f_reciever = ''
|
370
|
+
this.selectData.f_outlets = ''
|
371
|
+
}
|
372
|
+
},
|
373
|
+
rectification(){
|
374
|
+
if(this.selectData.dispatchType){
|
375
|
+
if(this.selectData.dispatchType=='派发给站点'){
|
376
|
+
if(!this.selectData.f_reciever){
|
377
|
+
this.$showMessage('请选择部门!')
|
378
|
+
return
|
379
|
+
}
|
380
|
+
}else{
|
381
|
+
if(!this.selectData.f_repairman){
|
382
|
+
this.$showMessage('请选择维修员!')
|
383
|
+
return
|
384
|
+
}
|
385
|
+
}
|
386
|
+
}else {
|
387
|
+
this.$showMessage('请选择派发类型!')
|
388
|
+
return
|
389
|
+
}
|
390
|
+
/*if(!this.selectData.f_repairtype){
|
391
|
+
this.$showMessage('请选择报修类型!')
|
392
|
+
return
|
393
|
+
}*/
|
394
|
+
//关闭录音
|
395
|
+
this.closely(false) // 保存本地,不删除录音文件暂停录音
|
396
|
+
let act={}
|
397
|
+
let toRepair=''
|
398
|
+
if(this.selectData.dispatchType=='派发给站点'){
|
399
|
+
act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
|
400
|
+
toRepair=null
|
401
|
+
}else{
|
402
|
+
console.log('派发给维修员---------'+this.selectData.f_repairman)
|
403
|
+
act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
|
404
|
+
toRepair='一级派单'
|
405
|
+
}
|
406
|
+
let repData={
|
407
|
+
toRepair:toRepair,
|
408
|
+
activity:act,
|
409
|
+
deps:Vue.user.deps,
|
410
|
+
depids:Vue.user.depids,
|
411
|
+
f_remarks:this.selectData.f_remarks,
|
412
|
+
f_repairtype:this.selectData.f_repairtype,
|
413
|
+
f_attendant: Vue.user.name,
|
414
|
+
loginUser:{name:Vue.user.name,ename:Vue.user.id,id:Vue.user.id},
|
415
|
+
}
|
416
|
+
this.rowCodata.istoRepair='转维修'
|
417
|
+
this.rowCodata.repData=repData
|
418
|
+
console.log("当前组装好的转维修数据--"+JSON.stringify(repData))
|
419
|
+
this.onlySave = false
|
420
|
+
this.save()
|
421
|
+
},
|
422
|
+
// 获取维修员
|
423
|
+
getEmp() {
|
424
|
+
this.repairers=[]
|
425
|
+
let per = {source: 'this.getRights().where(row.getType()==$user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${Vue.user.id}`}
|
426
|
+
let http = new HttpResetClass()
|
427
|
+
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: per}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
428
|
+
res.data.forEach((user)=>{
|
429
|
+
this.repairers.push({label:user.name, value: user.name})
|
430
|
+
})
|
431
|
+
})
|
432
|
+
},
|
433
|
+
closely(isdelete){
|
434
|
+
try {
|
435
|
+
var startOrStopAudioClipStr;
|
436
|
+
if (isdelete===true) {
|
437
|
+
//tag
|
438
|
+
startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止并删除录音') //停止并删除录音
|
439
|
+
}else {
|
440
|
+
//tag
|
441
|
+
startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止录音') //停止录音
|
442
|
+
}
|
443
|
+
if (startOrStopAudioClipStr.code == 200) {
|
444
|
+
//tag
|
445
|
+
return true;
|
446
|
+
}else {
|
447
|
+
return false;
|
448
|
+
}
|
449
|
+
} catch (e) {
|
450
|
+
console.error("关闭录音方法异常")
|
451
|
+
console.error(e)
|
452
|
+
return false;
|
453
|
+
}
|
454
|
+
},
|
455
|
+
// 录音方法
|
456
|
+
record() {
|
457
|
+
//tag
|
458
|
+
if (this.role != 'inspect') {
|
459
|
+
if (this.data.f_recording1_path != '') {
|
460
|
+
window.location = "/rs/file"+this.data.f_recording1_path
|
461
|
+
}
|
462
|
+
} else {
|
463
|
+
//tag
|
464
|
+
let fileName
|
465
|
+
if (!this.data.f_recording1_path) {
|
466
|
+
fileName = Util.guid() + '.amr'
|
467
|
+
} else {
|
468
|
+
fileName = Util.getFileName(this.data.f_recording1_path)
|
469
|
+
}
|
470
|
+
//HostApp.__this__ = this
|
471
|
+
/*调用无限制录音模块*/
|
472
|
+
let startOrStopState = HostApp.startOrStopAudioClip(fileName,"开始录音")
|
473
|
+
//tag
|
474
|
+
if (startOrStopState.code == 200) {
|
475
|
+
this.data.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
|
476
|
+
//tag
|
477
|
+
return true;
|
478
|
+
}else {
|
479
|
+
return false;
|
480
|
+
}
|
481
|
+
}
|
482
|
+
},
|
483
|
+
saveNoclick() {
|
484
|
+
// 禁用点击事件
|
485
|
+
$("#savebut").addClass("noclickbut");
|
486
|
+
//tag
|
487
|
+
|
488
|
+
// 5秒后启用点击事件
|
489
|
+
setTimeout(function(){
|
490
|
+
$("#savebut").removeClass("noclickbut");
|
491
|
+
},5000);
|
492
|
+
},
|
493
|
+
timeSet(val){
|
494
|
+
if (!val){
|
495
|
+
return
|
496
|
+
}
|
497
|
+
let time =new Date(val).getTime()
|
498
|
+
let time2=new Date().getTime()
|
499
|
+
if (time2>time) {
|
500
|
+
return true
|
501
|
+
}
|
502
|
+
},
|
503
|
+
imgback(val,isheader){
|
504
|
+
if(val && this.routeShow && isheader){
|
505
|
+
return require('../../assets/xiangxia1.png')
|
506
|
+
}else{
|
507
|
+
return require('../../assets/xiangyou1.png')
|
508
|
+
}
|
509
|
+
},
|
510
|
+
changediv(val){
|
511
|
+
return val
|
512
|
+
},
|
513
|
+
// 选择tab
|
514
|
+
tabSelect (item,number) {
|
515
|
+
this.header = item.header
|
516
|
+
// 处理关闭/显示 内容
|
517
|
+
if(this.number == number && !this.routeShow ){
|
518
|
+
this.routeShow = true
|
519
|
+
}else if(this.number == number && this.routeShow){
|
520
|
+
this.routeShow = false
|
521
|
+
}else if(this.number != item.complete){
|
522
|
+
this.routeShow = true
|
523
|
+
}
|
524
|
+
this.number = number
|
525
|
+
this.componentName = item.complete
|
526
|
+
if(item.complete == 'safecheck-devices'){
|
527
|
+
if(item.header != '燃气表' && this.data['device'+item.number].length == 0){
|
528
|
+
this.data['device' + item.number].push({})
|
529
|
+
}
|
530
|
+
let idx=this.data['device' + item.number].length - 1
|
531
|
+
let itemprops = {
|
532
|
+
config:this.config,
|
533
|
+
device:this.devices[item.number-1],
|
534
|
+
idx:idx,
|
535
|
+
role:'inspect'
|
536
|
+
}
|
537
|
+
if(this.routeShow){
|
538
|
+
this.$goto(item.complete, itemprops, 'repair')
|
539
|
+
}
|
540
|
+
}else{
|
541
|
+
if(this.routeShow){
|
542
|
+
this.$goto(item.complete, {userinfo:this.data}, 'repair')
|
543
|
+
}
|
544
|
+
}
|
545
|
+
this.shupingshow = true
|
546
|
+
},
|
547
|
+
// 给组件添加参数
|
548
|
+
getImgPath() {
|
549
|
+
for (var i = 0; i < this.model.serviceacitivity[0].imgs.length; i++) {
|
550
|
+
this.ids += this.model.serviceacitivity[0].imgs[i].imgid + ','
|
551
|
+
}
|
552
|
+
this.ids = this.ids.substring(0, this.ids.length - 1)
|
553
|
+
if(this.ids){
|
554
|
+
this.getImgGen();
|
555
|
+
}
|
556
|
+
},
|
557
|
+
getImgGen(){
|
558
|
+
let http = new HttpResetClass()
|
559
|
+
http.load('POST','rs/sql/tel_singleTable_OrderBy', {data: {
|
560
|
+
items: '*',
|
561
|
+
tablename: 't_files',
|
562
|
+
condition: `id in (${this.ids})`,
|
563
|
+
orderitem: 'id'
|
564
|
+
}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
565
|
+
for (let i = 0; i < res.data.length; i++) {
|
566
|
+
for (let j = 0; j < this.model.serviceacitivity[0].imgs.length; j++) {
|
567
|
+
if (res.data[i].id.toString() === this.model.serviceacitivity[0].imgs[j].imgid) {
|
568
|
+
this.model.serviceacitivity[0].imgs[j] = Object.assign({}, res.data[i], this.model.serviceacitivity[0].imgs[j])
|
569
|
+
}
|
570
|
+
}
|
571
|
+
|
572
|
+
}
|
573
|
+
})
|
574
|
+
},
|
575
|
+
|
576
|
+
sortDetails(){
|
577
|
+
for (let i = 0; i < this.details.length; i++) {
|
578
|
+
if (this.details[i].details.length) {
|
579
|
+
for (let j = 0; j < this.details[i].details.length; j++) {
|
580
|
+
if (this.details[i].details[j].f_type === 'a') {
|
581
|
+
this.doordetails = {details: this.details[i].details}
|
582
|
+
break
|
583
|
+
}
|
584
|
+
if (this.details[i].details[j].f_type === 'b') {
|
585
|
+
this.devicedetails = {details: this.details[i].details}
|
586
|
+
break
|
587
|
+
}
|
588
|
+
if (this.details[i].details[j].f_type === 'c') {
|
589
|
+
this.cookdetails = {details: this.details[i].details}
|
590
|
+
break
|
591
|
+
}
|
592
|
+
}
|
593
|
+
}
|
594
|
+
}
|
595
|
+
},
|
596
|
+
// 复制数据
|
597
|
+
back () {
|
598
|
+
let _this = this
|
599
|
+
if(this.issee){
|
600
|
+
_this.$back()
|
601
|
+
return
|
602
|
+
}
|
603
|
+
this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
|
604
|
+
if (res === 'confirm') {
|
605
|
+
this.closely()
|
606
|
+
_this.$back()
|
607
|
+
}
|
608
|
+
})
|
609
|
+
},
|
610
|
+
confirm(){
|
611
|
+
this.$dispatch('confirm')
|
612
|
+
},
|
613
|
+
tick() {
|
614
|
+
this.timer = null
|
615
|
+
this.data.f_offsite_time = Util.toStandardTimeString()
|
616
|
+
this.timer = window.setTimeout(this.tick, 1000)
|
617
|
+
},
|
618
|
+
getRepairState() {
|
619
|
+
let repaired = true
|
620
|
+
this.data.f_defects.forEach((defect) => {
|
621
|
+
repaired = repaired & (defect.f_ratification == '已处理')
|
622
|
+
})
|
623
|
+
return repaired
|
624
|
+
},
|
625
|
+
verifyRepairDefects() {
|
626
|
+
this.data.f_repair_date = Util.toStandardTimeString()
|
627
|
+
this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
|
628
|
+
},
|
629
|
+
errorVerify() {
|
630
|
+
let hasError = this.verifyState()
|
631
|
+
if(hasError)
|
632
|
+
return hasError
|
633
|
+
|
634
|
+
if(this.data.f_entry_status != '入户' || this.data.f_usegas == '未用气')
|
635
|
+
return null
|
636
|
+
hasError = this.verifyUser()
|
637
|
+
if(hasError)
|
638
|
+
return hasError
|
639
|
+
hasError = this.verifyDevices()
|
640
|
+
if(hasError)
|
641
|
+
return hasError
|
642
|
+
hasError = this.verifyFeedback()
|
643
|
+
if(hasError)
|
644
|
+
return hasError
|
645
|
+
},
|
646
|
+
verifyState() {
|
647
|
+
if(Vue.android && this.data.f_usegas == '未用气' && (this.data.f_nongasuser_path == Vue.nopic || this.data.f_nongasuser_path == ''))
|
648
|
+
return '未使用天然气则必须拍照'
|
649
|
+
if(Vue.android && this.data.f_entry_status == '到访不遇' && this.notencountered && (this.data.f_noanswer_path == Vue.nopic || this.data.f_noanswer_path == ''))
|
650
|
+
return '到访不遇必须拍照'
|
651
|
+
if(Vue.android && this.data.f_entry_status == '拒检' && this.refuseinspection && (this.data.f_rejectcheck_path == Vue.nopic || this.data.f_rejectcheck_path == ''))
|
652
|
+
return '拒捡必须拍照'
|
653
|
+
},
|
654
|
+
verifyUser() {
|
655
|
+
let prefix = '用户基本信息:'
|
656
|
+
if(Util.required(this.data.f_user_name))
|
657
|
+
return prefix + '用户名必须输入'
|
658
|
+
if (!this.data.f_user_phone){
|
659
|
+
return '请输入正确的电话号码'
|
660
|
+
}
|
661
|
+
if(!(/^\d{11}$/.test(this.data.f_user_phone.trim()))) {
|
662
|
+
return '请输入正确的电话号码'
|
663
|
+
}
|
664
|
+
// if(Util.required(this.data.f_residential_area))
|
665
|
+
// return prefix + '小区名称必须输入'
|
666
|
+
// if(Util.required(this.data.f_address))
|
667
|
+
// return prefix + '地址必须输入'
|
668
|
+
},
|
669
|
+
verifyDevices() {
|
670
|
+
for (let dev in this.config) {
|
671
|
+
if (this.config[dev].checkmust == true) {
|
672
|
+
let error = true
|
673
|
+
for(let device in this.data) {
|
674
|
+
if (device.startsWith("device")) {
|
675
|
+
for (let item in this.data[device]) {
|
676
|
+
if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
|
677
|
+
error = false
|
678
|
+
}
|
679
|
+
}
|
680
|
+
}
|
681
|
+
}
|
682
|
+
if (error) {
|
683
|
+
return "请检查" + dev
|
684
|
+
}
|
685
|
+
}
|
686
|
+
}
|
687
|
+
|
688
|
+
for (let dev in this.config) {
|
689
|
+
for(let device in this.data) {
|
690
|
+
if (device.startsWith("device")) {
|
691
|
+
for (let item in this.data[device]) {
|
692
|
+
//检查每一条安检结果
|
693
|
+
if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
|
694
|
+
for (let i in this.data[device][item].f_items) {
|
695
|
+
for (let it in this.config[dev].items) {
|
696
|
+
if (it == this.data[device][item].f_items[i].f_item_name) {
|
697
|
+
let check=false
|
698
|
+
if (!this.data[device][item].f_items[i].f_item_value){
|
699
|
+
check=true
|
700
|
+
}else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)){
|
701
|
+
if (this.data[device][item].f_items[i].f_item_value.length==0){
|
702
|
+
check=true
|
703
|
+
}
|
704
|
+
}
|
705
|
+
|
706
|
+
if(this.config[dev].items[it].type=='picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path){
|
707
|
+
return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
|
708
|
+
}
|
709
|
+
if (this.config[dev].items[it].type !='picture' && this.config[dev].items[it].checkmust == true && check) {
|
710
|
+
return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
|
711
|
+
}
|
712
|
+
}
|
713
|
+
}
|
714
|
+
//检查安检下拉结果
|
715
|
+
if (this.data[device][item].f_items[i].type == 'selector' || this.data[device][item].f_items[i].type == 'radio') {
|
716
|
+
if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_path == Vue.nopic) {
|
717
|
+
return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + this.data[device][item].f_items[i].f_item_value + "选中必须拍照"
|
718
|
+
}
|
719
|
+
}
|
720
|
+
}
|
721
|
+
}
|
722
|
+
}
|
723
|
+
}
|
724
|
+
}
|
725
|
+
}
|
726
|
+
},
|
727
|
+
verifyFeedback() {
|
728
|
+
let prefix = '拍照签名:'
|
729
|
+
if(Vue.android && (!this.data.f_overall_imgs || this.data.f_overall_imgs.length < this.imgsnum) && this.data.f_entry_status == '入户')
|
730
|
+
return prefix + `必须有${this.imgsnum}安检总体照片`
|
731
|
+
if(Vue.android && (!this.data.f_sign_path || this.data.f_sign_path.length == 0) && this.data.f_entry_status == '入户')
|
732
|
+
return prefix + '必须有用户签名'
|
733
|
+
if(Vue.android && this.data.f_defect_notified && this.data.f_notified_path == Vue.nopic)
|
734
|
+
return prefix + '下发安检通知书则必须给通知书拍照'
|
735
|
+
if(Vue.android && this.data.f_blacklist && this.data.f_blocking_cause=='')
|
736
|
+
return prefix + '请填写拉黑原因'
|
737
|
+
if(!this.data.f_client_evaluation && this.data.f_entry_status == '入户')
|
738
|
+
return prefix + '请选择服务评价'
|
739
|
+
},
|
740
|
+
getAllDefect() {
|
741
|
+
let checkResults = {
|
742
|
+
result: '正常',
|
743
|
+
data: []
|
744
|
+
}
|
745
|
+
let value = ''
|
746
|
+
let codata = JSON.parse(JSON.stringify(this.data))
|
747
|
+
codata.f_devices = []
|
748
|
+
this.f_devices = []
|
749
|
+
for (let device in codata) {
|
750
|
+
let f_device_type
|
751
|
+
if (device.startsWith("device")) {
|
752
|
+
let hasOther = ''
|
753
|
+
let otherValue = null
|
754
|
+
for (let item in codata[device]) {
|
755
|
+
if(typeof codata[device][item]=='function'){
|
756
|
+
continue
|
757
|
+
}
|
758
|
+
codata[device][item].f_create_time = Util.toStandardTimeString()
|
759
|
+
if (codata[device].length > 1) {
|
760
|
+
let j = Number.parseInt(item) + 1
|
761
|
+
f_device_type = `${codata[device][item].f_device_type}${j}`
|
762
|
+
} else {
|
763
|
+
f_device_type = codata[device][item].f_device_type
|
764
|
+
}
|
765
|
+
if(item == 'sum' || item == 'removeEmpty'){
|
766
|
+
continue
|
767
|
+
}
|
768
|
+
for (let i = 0; i < codata[device][item].f_items.length ; i++) {
|
769
|
+
//tag
|
770
|
+
if(i == 'sum' || i == 'removeEmpty'){
|
771
|
+
continue
|
772
|
+
}
|
773
|
+
var items = codata[device][item].f_items[i]
|
774
|
+
items.f_create_time = Util.toStandardTimeString()
|
775
|
+
items.f_item_lists = []
|
776
|
+
if (items.type == 'selector') {
|
777
|
+
items.selected = []
|
778
|
+
} else if (items.type == 'inputSelector') {
|
779
|
+
items.selected = ''
|
780
|
+
}
|
781
|
+
//遍历配置项 将所选隐患项的配置信息放入保存的数据中
|
782
|
+
let f_is_defect //是否是隐患
|
783
|
+
let f_defect_level //是否是隐患
|
784
|
+
let f_item_name = items.f_item_name
|
785
|
+
let f_item_value
|
786
|
+
if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
|
787
|
+
for (let i in items.f_item_value) {
|
788
|
+
if(typeof items.f_item_value[i]=='function'){
|
789
|
+
continue
|
790
|
+
}
|
791
|
+
let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
|
792
|
+
//tag)
|
793
|
+
for (let k in configItems.options) {
|
794
|
+
if(typeof configItems.options[k]=='function'){
|
795
|
+
continue
|
796
|
+
}
|
797
|
+
//tag)
|
798
|
+
if (items.f_item_value[i] === configItems.options[k].data) {
|
799
|
+
|
800
|
+
f_is_defect = configItems.options[k].isdefect
|
801
|
+
f_item_value = items.f_item_value[i]
|
802
|
+
f_defect_level = configItems.options[k].level
|
803
|
+
if (f_is_defect) {
|
804
|
+
if (checkResults.result !== '有隐患') {
|
805
|
+
checkResults.result = '有隐患'
|
806
|
+
}
|
807
|
+
console.log('items'+items)
|
808
|
+
if(items.f_deal_dispose=='报修'){
|
809
|
+
console.log("检测到需要转维修++++++++++++")
|
810
|
+
this.repairDefect.result='未处理'
|
811
|
+
this.repairDefect.data.push(`${f_item_name} : ${f_item_value}`)
|
812
|
+
}
|
813
|
+
if (!this.checkResult.hasOwnProperty(f_device_type+'-'+f_item_name)) {
|
814
|
+
this.checkResult[f_device_type+'-'+f_item_name] = []
|
815
|
+
}
|
816
|
+
this.checkResult[f_device_type+'-'+f_item_name].push(f_item_value)
|
817
|
+
|
818
|
+
}
|
819
|
+
|
820
|
+
let items_list = {
|
821
|
+
f_is_defect: f_is_defect,
|
822
|
+
f_item_value: f_item_value,
|
823
|
+
f_defect_level: f_defect_level,
|
824
|
+
f_is_eliminate: null,
|
825
|
+
f_create_time: Util.toStandardTimeString()
|
826
|
+
}
|
827
|
+
if (!items.f_item_lists) {
|
828
|
+
items.f_item_lists = []
|
829
|
+
if (JSON.stringify(items_list) !== '{}') {
|
830
|
+
items.f_item_lists.push(items_list)
|
831
|
+
}
|
832
|
+
} else {
|
833
|
+
if (JSON.stringify(items_list) !== '{}') {
|
834
|
+
items.f_item_lists.push(items_list)
|
835
|
+
}
|
836
|
+
}
|
837
|
+
}
|
838
|
+
}
|
839
|
+
}
|
840
|
+
} else {
|
841
|
+
let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
|
842
|
+
f_is_defect = items.f_is_defect
|
843
|
+
f_defect_level = items.level
|
844
|
+
f_item_value = items.f_item_value
|
845
|
+
let items_list = {
|
846
|
+
f_is_defect: f_is_defect,
|
847
|
+
f_item_value: f_item_value,
|
848
|
+
f_defect_level: f_defect_level,
|
849
|
+
f_create_time: Util.toStandardTimeString()
|
850
|
+
}
|
851
|
+
if (f_is_defect && f_item_value) {
|
852
|
+
items.f_is_defect = true
|
853
|
+
if (checkResults.result !== '有隐患') {
|
854
|
+
checkResults.result = '有隐患'
|
855
|
+
}
|
856
|
+
if (!this.checkResult.hasOwnProperty(items.f_item_name)) {
|
857
|
+
this.checkResult[items.f_item_name] = []
|
858
|
+
}
|
859
|
+
|
860
|
+
this.checkResult[items.f_item_name].push(f_item_value)
|
861
|
+
|
862
|
+
}
|
863
|
+
if (!items.f_item_lists) {
|
864
|
+
items.f_item_lists = []
|
865
|
+
if (JSON.stringify(items_list) != '{}') {
|
866
|
+
items.f_item_lists.push(items_list)
|
867
|
+
}
|
868
|
+
} else {
|
869
|
+
if (JSON.stringify(items_list) != '{}') {
|
870
|
+
items.f_item_lists.push(items_list)
|
871
|
+
}
|
872
|
+
}
|
873
|
+
}
|
874
|
+
if (hasOther !== '' && otherValue !== null) {
|
875
|
+
this.checkResult[hasOther].push(otherValue)
|
876
|
+
hasOther = ''
|
877
|
+
otherValue = null
|
878
|
+
}
|
879
|
+
items.f_item_value = ''
|
880
|
+
}
|
881
|
+
this.f_devices.push(codata[device][item])
|
882
|
+
}
|
883
|
+
}
|
884
|
+
}
|
885
|
+
if (this.checkResult) {
|
886
|
+
for (let key in this.checkResult) {
|
887
|
+
if(typeof this.checkResult[key]=='function'){
|
888
|
+
continue
|
889
|
+
}
|
890
|
+
// 上次安检结果数据组织
|
891
|
+
let temp = {}
|
892
|
+
temp[key] = this.checkResult[key].join(',')
|
893
|
+
checkResults.data.push(temp)
|
894
|
+
}
|
895
|
+
this.checkResult = {}
|
896
|
+
}
|
897
|
+
if (checkResults.data.length > 0) {
|
898
|
+
let msg = ''
|
899
|
+
for (let a = 0; a < checkResults.data.length; a++) {
|
900
|
+
for (let datumKey in checkResults.data[a]) {
|
901
|
+
msg += datumKey + ':' + checkResults.data[a][datumKey] + ';'
|
902
|
+
}
|
903
|
+
}
|
904
|
+
this.data.f_defect_text = msg
|
905
|
+
codata.f_defect_text = msg
|
906
|
+
}
|
907
|
+
codata.f_defect_content = JSON.stringify(checkResults)
|
908
|
+
this.data.f_defect_content = JSON.stringify(checkResults)
|
909
|
+
return codata
|
910
|
+
},
|
911
|
+
uploadCheckPaper(){
|
912
|
+
this.saveNoclick()
|
913
|
+
this.closely(false) // 保存本地,不删除录音文件停止录音
|
914
|
+
let errString = this.errorVerify()
|
915
|
+
if (errString) {
|
916
|
+
if (Vue.android){
|
917
|
+
this.$showMessage(errString)
|
918
|
+
}
|
919
|
+
return
|
920
|
+
} else {
|
921
|
+
this.$set('data.f_offsite_time', Util.toStandardTimeString())
|
922
|
+
this.$set('data.f_upload_time', Util.toStandardTimeString())
|
923
|
+
this.$set('data.f_upload_date', Util.toStandardTimeString())
|
924
|
+
this.data.f_complete = '已完成'
|
925
|
+
this.disableTimer()
|
926
|
+
}
|
927
|
+
this.onlySave = false
|
928
|
+
this.assemblyCodata()
|
929
|
+
if (this.repairDefect.result != '正常') {
|
930
|
+
return this.$showMessage('有隐患的处理方式为转维修,请点击转维修')
|
931
|
+
}
|
932
|
+
this.save()
|
933
|
+
|
934
|
+
},
|
935
|
+
//将数据组装提出
|
936
|
+
assemblyCodata(){
|
937
|
+
let codata = this.getAllDefect()
|
938
|
+
console.log(`codata类型 开始组装codeta数据-->${typeof codata}`)
|
939
|
+
console.log(`codata内容-->${JSON.stringify(codata)}`)
|
940
|
+
for (let key in codata) {
|
941
|
+
if (key.startsWith("device")) {
|
942
|
+
console.log('this.data.' + key + JSON.stringify(codata[key]))
|
943
|
+
codata[key] = []
|
944
|
+
}
|
945
|
+
}
|
946
|
+
codata.f_devices = this.f_devices
|
947
|
+
this.rowCodata=codata
|
948
|
+
},
|
949
|
+
save(type) {
|
950
|
+
if (type == 'temp' || type == 'finish') {
|
951
|
+
this.assemblyCodata()
|
952
|
+
}
|
953
|
+
//禁用事件
|
954
|
+
this.saveNoclick()
|
955
|
+
if(type == 'temp'){
|
956
|
+
this.data.f_complete = '未完成'
|
957
|
+
this.rowCodata.f_complete = '未完成'
|
958
|
+
// 关闭录音方法
|
959
|
+
this.closely(true) //临时保存,删除录音文件并暂停录音
|
960
|
+
this.disableTimer()
|
961
|
+
}else {
|
962
|
+
// 关闭录音方法
|
963
|
+
this.closely(false) // 保存本地,不删除录音文件暂停录音
|
964
|
+
let errString = this.errorVerify()
|
965
|
+
if (errString) {
|
966
|
+
if (Vue.android){
|
967
|
+
this.$showMessage(errString)
|
968
|
+
}
|
969
|
+
return
|
970
|
+
} else {
|
971
|
+
this.data.f_complete = '已完成'
|
972
|
+
this.rowCodata.f_complete = '已完成'
|
973
|
+
this.$set('data.f_offsite_time', Util.toStandardTimeString())
|
974
|
+
this.$set('rowCodata.f_offsite_time', Util.toStandardTimeString())
|
975
|
+
this.disableTimer()
|
976
|
+
}
|
977
|
+
}
|
978
|
+
if(this.data.f_blacklist!='是'){
|
979
|
+
delete this.data.f_blocking_cause
|
980
|
+
}
|
981
|
+
if (this.data.f_entry_status == '入户') {
|
982
|
+
this.data.f_rejectchecks_path = []
|
983
|
+
this.data.f_rejectcheck_path = null
|
984
|
+
this.data.f_rejectcheck1_path = null
|
985
|
+
this.data.f_rejectcheck2_path = null
|
986
|
+
this.data.f_noanswers_path=[]
|
987
|
+
this.data.f_noanswer_path = null
|
988
|
+
this.data.f_noanswer1_path = null
|
989
|
+
this.data.f_noanswer2_path = null
|
990
|
+
}else if (this.data.f_entry_status == '到访不遇') {
|
991
|
+
this.data.f_rejectchecks_path = []
|
992
|
+
this.data.f_rejectcheck_path = null
|
993
|
+
this.data.f_rejectcheck1_path = null
|
994
|
+
this.data.f_rejectcheck2_path = null
|
995
|
+
}else if (this.data.f_entry_status == '拒检') {
|
996
|
+
this.data.f_noanswers_path=[]
|
997
|
+
this.data.f_noanswer_path = null
|
998
|
+
this.data.f_noanswer1_path = null
|
999
|
+
this.data.f_noanswer2_path = null
|
1000
|
+
}
|
1001
|
+
let codata = this.rowCodata
|
1002
|
+
for (let key in codata) {
|
1003
|
+
if (key.startsWith("device")) {
|
1004
|
+
codata[key] = []
|
1005
|
+
}
|
1006
|
+
}
|
1007
|
+
codata.f_complete = this.data.f_complete
|
1008
|
+
if (Vue.android) {
|
1009
|
+
let value = this.$androidUtil.path({
|
1010
|
+
alias: 'getUserinfomation',
|
1011
|
+
data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
|
1012
|
+
})
|
1013
|
+
if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && this.item.f_no_checkplan != '打回') {
|
1014
|
+
codata.f_devices = this.f_devices
|
1015
|
+
if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
|
1016
|
+
this.rowCodata = Object.assign({},this.rowCodata,codata)
|
1017
|
+
} else {
|
1018
|
+
this.rowCodata = codata
|
1019
|
+
}
|
1020
|
+
let param = {
|
1021
|
+
f_check_item_id: this.data.f_check_item_id,
|
1022
|
+
f_checker_id: this.data.f_checker_id,
|
1023
|
+
f_upload_state: '未传',
|
1024
|
+
row: this.rowCodata
|
1025
|
+
}
|
1026
|
+
let paramStr = JSON.stringify(param)
|
1027
|
+
// 多长截断一次
|
1028
|
+
let subLength = 800
|
1029
|
+
for (let i = 0; i < paramStr.length; i += subLength) {
|
1030
|
+
HostApp.param_cache(paramStr.slice(i, i + subLength))
|
1031
|
+
}
|
1032
|
+
HostApp.__this__ = this
|
1033
|
+
HostApp.syncLogic({
|
1034
|
+
// logic别名,key必须为logic
|
1035
|
+
'logic': 'SafeSaveNoPaper',
|
1036
|
+
// 回调执行方法名,key必须为callback
|
1037
|
+
'callback': 'javascript:HostApp.__this__.saveCallBack()',
|
1038
|
+
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
1039
|
+
// 执行回调方法传入key为backresult
|
1040
|
+
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
1041
|
+
'backresult': 1
|
1042
|
+
})
|
1043
|
+
} else {
|
1044
|
+
codata.f_devices = this.f_devices
|
1045
|
+
if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
|
1046
|
+
this.rowCodata = Object.assign({},this.rowCodata,codata)
|
1047
|
+
} else {
|
1048
|
+
this.rowCodata = codata
|
1049
|
+
}
|
1050
|
+
let param = {
|
1051
|
+
f_check_item_id: this.data.f_check_item_id,
|
1052
|
+
f_checker_id: this.data.f_checker_id,
|
1053
|
+
row: this.rowCodata
|
1054
|
+
}
|
1055
|
+
let paramStr = JSON.stringify(param)
|
1056
|
+
// 多长截断一次
|
1057
|
+
let subLength = 800
|
1058
|
+
for (let i = 0; i < paramStr.length; i += subLength) {
|
1059
|
+
HostApp.param_cache(paramStr.slice(i, i + subLength))
|
1060
|
+
}
|
1061
|
+
HostApp.__this__ = this
|
1062
|
+
HostApp.syncLogic({
|
1063
|
+
// logic别名,key必须为logic
|
1064
|
+
'logic': '保存安检单信息',
|
1065
|
+
// 回调执行方法名,key必须为callback
|
1066
|
+
'callback': 'javascript:HostApp.__this__.saveCallBack()',
|
1067
|
+
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
1068
|
+
// 执行回调方法传入key为backresult
|
1069
|
+
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
1070
|
+
'backresult': 1
|
1071
|
+
})
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
} else {
|
1075
|
+
let value = this.$androidUtil.path({
|
1076
|
+
alias: 'getUserinfomation',
|
1077
|
+
data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
|
1078
|
+
})
|
1079
|
+
if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
|
1080
|
+
this.rowCodata = Object.assign({},this.rowCodata,codata)
|
1081
|
+
} else {
|
1082
|
+
this.rowCodata = codata
|
1083
|
+
}
|
1084
|
+
if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && value.data.length == 0 && this.item.f_no_checkplan != '打回') {
|
1085
|
+
this.$androidUtil.bzLogic('SafeSaveNoPaper', {
|
1086
|
+
f_check_item_id: this.data.f_check_item_id,
|
1087
|
+
f_checker_id: this.data.f_checker_id,
|
1088
|
+
f_upload_state: '未传',
|
1089
|
+
row: this.rowCodata
|
1090
|
+
}).then((res) => {
|
1091
|
+
if (res.data.code == 200) {
|
1092
|
+
//保存devices
|
1093
|
+
this.$androidUtil.bzLogic('getPaperInfo', {
|
1094
|
+
f_check_item_id: this.data.f_check_item_id
|
1095
|
+
}).then((res) => {
|
1096
|
+
if (res.data.code == 200) {
|
1097
|
+
let f_paper_id = res.data.data[0].id
|
1098
|
+
for (let device of this.f_devices) {
|
1099
|
+
device.f_paper_id = f_paper_id
|
1100
|
+
this.$androidUtil.bzLogic('saveDevice', {
|
1101
|
+
row: device
|
1102
|
+
}).then((ret) => {
|
1103
|
+
if (ret.code != 200) {
|
1104
|
+
//TODO 失败后处理
|
1105
|
+
this.$showMessage("保存失败!")
|
1106
|
+
return false
|
1107
|
+
}
|
1108
|
+
})
|
1109
|
+
}
|
1110
|
+
}
|
1111
|
+
})
|
1112
|
+
this.$showMessage('保存成功!')
|
1113
|
+
return true
|
1114
|
+
} else {
|
1115
|
+
this.$showMessage("保存失败!")
|
1116
|
+
return false
|
1117
|
+
}
|
1118
|
+
})
|
1119
|
+
}
|
1120
|
+
else {
|
1121
|
+
this.$androidUtil.bzLogic('保存安检单信息', {
|
1122
|
+
f_check_item_id: this.data.f_check_item_id,
|
1123
|
+
f_checker_id: this.data.f_checker_id,
|
1124
|
+
row: this.rowCodata
|
1125
|
+
}).then((res) => {
|
1126
|
+
if (res.data.code == 200) {
|
1127
|
+
//保存devices
|
1128
|
+
this.$androidUtil.bzLogic('getPaperInfo', {
|
1129
|
+
f_check_item_id: this.data.f_check_item_id
|
1130
|
+
}).then((res) => {
|
1131
|
+
if (res.data.code == 200) {
|
1132
|
+
|
1133
|
+
let f_paper_id = res.data.data[0].id
|
1134
|
+
for (let device of this.f_devices) {
|
1135
|
+
device.f_paper_id = f_paper_id
|
1136
|
+
this.$androidUtil.bzLogic('saveDevice', {
|
1137
|
+
row: device
|
1138
|
+
}).then((ret) => {
|
1139
|
+
if (ret.code != 200) {
|
1140
|
+
//TODO 失败后处理
|
1141
|
+
this.$showMessage("保存失败!")
|
1142
|
+
return false
|
1143
|
+
}
|
1144
|
+
})
|
1145
|
+
}
|
1146
|
+
}
|
1147
|
+
})
|
1148
|
+
this.$showMessage('保存成功!')
|
1149
|
+
return true
|
1150
|
+
} else {
|
1151
|
+
this.$showMessage("保存失败!")
|
1152
|
+
return false
|
1153
|
+
}
|
1154
|
+
})
|
1155
|
+
}
|
1156
|
+
}
|
1157
|
+
},
|
1158
|
+
runSyncLogic(logic,callback,backresult){
|
1159
|
+
HostApp.runSyncLogic({
|
1160
|
+
// logic别名,key必须为logic
|
1161
|
+
'logic': logic,
|
1162
|
+
// 回调执行方法名,key必须为callback
|
1163
|
+
'callback': callback,
|
1164
|
+
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
1165
|
+
// 执行回调方法传入key为backresult
|
1166
|
+
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
1167
|
+
'backresult':backresult
|
1168
|
+
})
|
1169
|
+
},
|
1170
|
+
logicWithHint(logic,data,callback,backresult){
|
1171
|
+
HostApp.logicWithHint({
|
1172
|
+
// logic别名,key必须为logic
|
1173
|
+
'logic': logic,
|
1174
|
+
// 回调执行方法名,key必须为callback
|
1175
|
+
'callback': callback,
|
1176
|
+
// logic执行需要的业务参数
|
1177
|
+
'data': data,
|
1178
|
+
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
1179
|
+
// 执行回调方法传入key为backresult
|
1180
|
+
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
1181
|
+
'backresult':backresult
|
1182
|
+
})
|
1183
|
+
},
|
1184
|
+
saveCallBack(jo){
|
1185
|
+
if(jo.state == 'ok'){
|
1186
|
+
let res = JSON.parse(jo.result)
|
1187
|
+
if(res.code == 200){
|
1188
|
+
if(!this.onlySave){
|
1189
|
+
let codata = this.getAllDefect()
|
1190
|
+
//获取微信推送内容
|
1191
|
+
// let WxResult = this.getWeixin(codata)
|
1192
|
+
let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
|
1193
|
+
f_check_item_id: this.data.f_check_item_id
|
1194
|
+
})
|
1195
|
+
//如果是转维修上传,则不做校验,上传完成后自动转维修
|
1196
|
+
if(!this.isToRepair){
|
1197
|
+
if(haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)){
|
1198
|
+
if(!this.isSafeCheckToRepair){
|
1199
|
+
|
1200
|
+
}
|
1201
|
+
}
|
1202
|
+
}
|
1203
|
+
for (let key in codata){
|
1204
|
+
if(key.startsWith("device")){
|
1205
|
+
codata[key] = []
|
1206
|
+
}
|
1207
|
+
}
|
1208
|
+
codata.f_devices = this.f_devices
|
1209
|
+
if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
|
1210
|
+
this.rowCodata = Object.assign({},this.rowCodata,codata)
|
1211
|
+
} else {
|
1212
|
+
this.rowCodata = codata
|
1213
|
+
}
|
1214
|
+
let param = {
|
1215
|
+
f_check_item_id: this.data.f_check_item_id,
|
1216
|
+
f_checker_id: this.data.f_checker_id,
|
1217
|
+
row: this.rowCodata
|
1218
|
+
}
|
1219
|
+
let paramStr = JSON.stringify(param)
|
1220
|
+
// 多长截断一次
|
1221
|
+
let subLength = 800
|
1222
|
+
for (let i = 0; i < paramStr.length; i += subLength) {
|
1223
|
+
HostApp.param_cache(paramStr.slice(i, i + subLength))
|
1224
|
+
}
|
1225
|
+
HostApp.__this__ = this
|
1226
|
+
HostApp.syncLogic({
|
1227
|
+
// logic别名,key必须为logic
|
1228
|
+
'logic': '上传安检信息',
|
1229
|
+
// 回调执行方法名,key必须为callback
|
1230
|
+
'callback': 'javascript:HostApp.__this__.uploadCallBack()',
|
1231
|
+
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
1232
|
+
// 执行回调方法传入key为backresult
|
1233
|
+
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
1234
|
+
'backresult': 1
|
1235
|
+
})
|
1236
|
+
}else{
|
1237
|
+
this.$showMessage('保存成功!')
|
1238
|
+
if(this.clickBack){
|
1239
|
+
this.isStrat = false
|
1240
|
+
this.$dispatch('confirm')
|
1241
|
+
}
|
1242
|
+
}
|
1243
|
+
}else{
|
1244
|
+
this.$showMessage('保存失败!')
|
1245
|
+
return
|
1246
|
+
}
|
1247
|
+
}else{
|
1248
|
+
this.$showMessage('服务器内部错误,保存失败!')
|
1249
|
+
return
|
1250
|
+
}
|
1251
|
+
},
|
1252
|
+
uploadCallBack(jo){
|
1253
|
+
//获取微信推送路径
|
1254
|
+
let url = ""
|
1255
|
+
if(Vue.config.safecheck != undefined) {
|
1256
|
+
if (Vue.config.safecheck.ApproveConfig != undefined) {
|
1257
|
+
if (Vue.config.safecheck.ApproveConfig.weixinurl != undefined) {
|
1258
|
+
url = Vue.config.safecheck.ApproveConfig.weixinurl
|
1259
|
+
}
|
1260
|
+
}
|
1261
|
+
}
|
1262
|
+
if(jo.state == 'ok'){
|
1263
|
+
let res = JSON.parse(jo.result)
|
1264
|
+
if(res.code == 200){
|
1265
|
+
this.$set('data.f_paper_id', res.id)
|
1266
|
+
this.isStrat=false
|
1267
|
+
if(url != ""){
|
1268
|
+
this.$resetpost(`${url}`,{data:WxResult})
|
1269
|
+
}
|
1270
|
+
// 预约安检回更预约安检单
|
1271
|
+
if(this.data.isupdateplanitem == 'true' && this.data.f_SafeToRepair_id){
|
1272
|
+
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/ReturnSafeService`, {data:{
|
1273
|
+
f_paper_id:this.data.f_paper_id,
|
1274
|
+
f_service_id:this.data.f_SafeToRepair_id
|
1275
|
+
}
|
1276
|
+
}).then((ret) => {
|
1277
|
+
if(ret.data && ret.data.code == 200){
|
1278
|
+
console.log('预约安检回更成功')
|
1279
|
+
}
|
1280
|
+
})
|
1281
|
+
}
|
1282
|
+
if(this.isToRepair){
|
1283
|
+
for (let device in this.data){
|
1284
|
+
if(device.startsWith("device")){
|
1285
|
+
this.data[device] = []
|
1286
|
+
if(res.data.length > 0){
|
1287
|
+
for(let i in res.data[0].f_devices){
|
1288
|
+
if(this.data[device].length > 0){
|
1289
|
+
if(this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type){
|
1290
|
+
this.data[device].push(res.data[0].f_devices[i])
|
1291
|
+
res.data[0].f_devices.splice(i,1)
|
1292
|
+
}
|
1293
|
+
}else{
|
1294
|
+
this.data[device].push(res.data[0].f_devices[i])
|
1295
|
+
res.data[0].f_devices.splice(i,1)
|
1296
|
+
}
|
1297
|
+
}
|
1298
|
+
}
|
1299
|
+
}
|
1300
|
+
}
|
1301
|
+
this.todo()
|
1302
|
+
}else{
|
1303
|
+
this.$showMessage('上传成功!')
|
1304
|
+
this.$dispatch('confirm')
|
1305
|
+
}
|
1306
|
+
}else if(res.code == 309){
|
1307
|
+
this.$showMessage('该安检单已作废!')
|
1308
|
+
this.$dispatch('confirm')
|
1309
|
+
}else if(res.code == 710){
|
1310
|
+
this.$showMessage('上传照片失败,请检查网络是否正常!'+res.msg)
|
1311
|
+
this.onlySave = true
|
1312
|
+
return
|
1313
|
+
}else if(res.code == 711){
|
1314
|
+
this.$showMessage('该安检单已被管理员调整,请联系管理员!')
|
1315
|
+
this.onlySave = true
|
1316
|
+
return
|
1317
|
+
}else if(res.code == 712){
|
1318
|
+
this.$showMessage('网络异常,请缓存后重新尝试上传,多次上传失败请联系管理员!')
|
1319
|
+
this.onlySave = true
|
1320
|
+
return
|
1321
|
+
}
|
1322
|
+
else{
|
1323
|
+
this.$showMessage('上传失败!')
|
1324
|
+
}
|
1325
|
+
}else {
|
1326
|
+
this.$showMessage('网络异常,上传失败!')
|
1327
|
+
}
|
1328
|
+
this.onlySave = true
|
1329
|
+
},
|
1330
|
+
safecheckToRepairCallBack(jo){
|
1331
|
+
//获取微信推送路径
|
1332
|
+
if(jo.state == 'ok'){
|
1333
|
+
let res = JSON.parse(jo.result)
|
1334
|
+
if(res.code == 200){
|
1335
|
+
if(res.data.code == 200){
|
1336
|
+
this.$showMessage('上传并转维修成功!')
|
1337
|
+
}else{
|
1338
|
+
this.$showMessage('上传并转维修成功,回写安检单失败!')
|
1339
|
+
}
|
1340
|
+
this.$dispatch('confirm')
|
1341
|
+
}else{
|
1342
|
+
this.$showMessage('上传失败!')
|
1343
|
+
this.onlySave = true
|
1344
|
+
}
|
1345
|
+
}else{
|
1346
|
+
this.$showMessage('网络异常,上传失败!')
|
1347
|
+
this.onlySave = true
|
1348
|
+
}
|
1349
|
+
},
|
1350
|
+
todo(){
|
1351
|
+
let gen = getRepairParam(this)
|
1352
|
+
co(gen)
|
1353
|
+
},
|
1354
|
+
undo(){
|
1355
|
+
this.showCheckToRepair = !this.showCheckToRepair
|
1356
|
+
this.model.serviceacitivity[0].f_reciever = ''
|
1357
|
+
this.model.serviceacitivity[0].f_meetunit = ''
|
1358
|
+
this.model.f_repairtype = ''
|
1359
|
+
this.meading = '转站点'
|
1360
|
+
},
|
1361
|
+
disableTimer() {
|
1362
|
+
if(this.timer) {
|
1363
|
+
window.clearTimeout(this.timer)
|
1364
|
+
this.timer = null
|
1365
|
+
}
|
1366
|
+
},
|
1367
|
+
loaded(paper) {
|
1368
|
+
if(!paper.hasOwnProperty('id')) {
|
1369
|
+
this.$showMessage("该安检单在手机上已经不存在,可能是卸载过程序。可以进入重新安检,或返回安检计划。")
|
1370
|
+
this.init()
|
1371
|
+
} else {
|
1372
|
+
Util.booleanFilter(paper)
|
1373
|
+
HostApp.__this__.$set('data', paper)
|
1374
|
+
HostApp.__this__.$goto('safecheck-userinfo', {}, 'paper-router')
|
1375
|
+
// 如果打回重检则重新计时
|
1376
|
+
if(HostApp.__this__.role == 'inspect'
|
1377
|
+
&& HostApp.__this__.data.f_approved
|
1378
|
+
&& HostApp.__this__.data.f_approved == '打回') {
|
1379
|
+
HostApp.__this__.data.f_onsite_time = Util.toStandardTimeString()
|
1380
|
+
HostApp.__this__.tick()
|
1381
|
+
}
|
1382
|
+
}
|
1383
|
+
HostApp.__callback__ = null
|
1384
|
+
HostApp.__this__ = null
|
1385
|
+
},
|
1386
|
+
S4() {
|
1387
|
+
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
|
1388
|
+
},
|
1389
|
+
extend(initalObj, finalObj) {
|
1390
|
+
var obj = finalObj || {};
|
1391
|
+
for (var i in initalObj) {
|
1392
|
+
var prop = initalObj[i];
|
1393
|
+
|
1394
|
+
// 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
|
1395
|
+
if (prop === obj) {
|
1396
|
+
continue;
|
1397
|
+
}
|
1398
|
+
|
1399
|
+
if (typeof prop === 'object') {
|
1400
|
+
if (obj[i]) {
|
1401
|
+
this.extend(obj[i], prop)
|
1402
|
+
} else {
|
1403
|
+
obj[i] = prop;
|
1404
|
+
}
|
1405
|
+
}
|
1406
|
+
}
|
1407
|
+
return obj;
|
1408
|
+
},
|
1409
|
+
putDevices() {
|
1410
|
+
this.$set('data.approve', "true")
|
1411
|
+
this.$set('data.writeback', "false")
|
1412
|
+
if (Vue.config.safecheck != undefined) {
|
1413
|
+
if (Vue.config.safecheck.ApproveConfig != undefined) {
|
1414
|
+
if (Vue.config.safecheck.ApproveConfig.approve != undefined) {
|
1415
|
+
this.$set('data.approve', Vue.config.safecheck.ApproveConfig.approve)
|
1416
|
+
}
|
1417
|
+
if (Vue.config.safecheck.ApproveConfig.writeback != undefined) {
|
1418
|
+
this.$set('data.writeback', Vue.config.safecheck.ApproveConfig.writeback)
|
1419
|
+
}
|
1420
|
+
if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
|
1421
|
+
this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
|
1422
|
+
}
|
1423
|
+
if (Vue.config.safecheck.ApproveConfig.showtorepair) {
|
1424
|
+
this.show_torepair = Vue.config.safecheck.ApproveConfig.showtorepair
|
1425
|
+
}
|
1426
|
+
if (Vue.config.safecheck.ApproveConfig.notencountered != undefined){
|
1427
|
+
this.notencountered = Vue.config.safecheck.ApproveConfig.notencountered
|
1428
|
+
}
|
1429
|
+
if (Vue.config.safecheck.ApproveConfig.refuseinspection != undefined){
|
1430
|
+
this.refuseinspection = Vue.config.safecheck.ApproveConfig.refuseinspection
|
1431
|
+
}
|
1432
|
+
}
|
1433
|
+
if(this.item.f_user_type == '非民用'){
|
1434
|
+
// 非民用
|
1435
|
+
if (Vue.config.safecheck.DevicesSetConfig != undefined){
|
1436
|
+
if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
|
1437
|
+
this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
|
1438
|
+
}else{
|
1439
|
+
this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type]])
|
1440
|
+
}
|
1441
|
+
}
|
1442
|
+
|
1443
|
+
}else{
|
1444
|
+
// 民用户
|
1445
|
+
if (Vue.config.safecheck.DevicesConfig != undefined){
|
1446
|
+
if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
|
1447
|
+
this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
|
1448
|
+
}else{
|
1449
|
+
this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type?this.item.f_user_type:'民用']])
|
1450
|
+
}
|
1451
|
+
}
|
1452
|
+
}
|
1453
|
+
|
1454
|
+
}
|
1455
|
+
// 预留设备项位置
|
1456
|
+
for (let i in this.config) {
|
1457
|
+
this.tabs.splice(1,0,null)
|
1458
|
+
}
|
1459
|
+
//遍历安检项配置
|
1460
|
+
for (let i in this.config) {
|
1461
|
+
//取得安检项索引值
|
1462
|
+
let n = this.config[i].index
|
1463
|
+
this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
|
1464
|
+
this.$set('data.' + 'device' + n, [])
|
1465
|
+
this.tabs[n] = {
|
1466
|
+
header: i,
|
1467
|
+
complete: 'safecheck-devices',
|
1468
|
+
class: 'repair-details-class',
|
1469
|
+
number: n
|
1470
|
+
}
|
1471
|
+
|
1472
|
+
if(this.config[i].quantity && this.config[i].quantity >0){
|
1473
|
+
let items = []
|
1474
|
+
for (let it in this.config[i].items) {
|
1475
|
+
//赋值下拉选项
|
1476
|
+
if (this.config[i].items[it].type == 'selector') {
|
1477
|
+
for (let op in this.config[i].items[it].options) {
|
1478
|
+
if (this.config[i].items[it].options[op].isdefault == true) {
|
1479
|
+
items.push({
|
1480
|
+
f_defect_level: this.config[i].items[it].options[op].level,
|
1481
|
+
f_is_defect: this.config[i].items[it].options[op].isdefect,
|
1482
|
+
f_item_name: it,
|
1483
|
+
f_item_value: this.config[i].items[it].options[op].data,
|
1484
|
+
f_path: "",
|
1485
|
+
type: "selector"
|
1486
|
+
})
|
1487
|
+
}
|
1488
|
+
}
|
1489
|
+
}
|
1490
|
+
}
|
1491
|
+
for(let q =0;q<this.config[i].quantity;q++) {
|
1492
|
+
this.data['device' + n].push(
|
1493
|
+
{f_device_type: i, f_items:items}
|
1494
|
+
)
|
1495
|
+
}
|
1496
|
+
}
|
1497
|
+
n = n + 1
|
1498
|
+
}
|
1499
|
+
this.faultshow.number = this.tabs.length
|
1500
|
+
},
|
1501
|
+
init () {
|
1502
|
+
// 无计划安检是否回更待办计划
|
1503
|
+
this.data.isupdateplanitem = this.$appdata.getSingleValue('在线安检回更有计划') ? this.$appdata.getSingleValue('在线安检回更有计划') : 'false'
|
1504
|
+
// 预约安检单工单编号
|
1505
|
+
this.data.f_SafeToRepair_id = this.item.f_service_id
|
1506
|
+
this.data.ename = Vue.user.ename
|
1507
|
+
this.data.f_outlets = Vue.user.f_parentname
|
1508
|
+
this.data.f_meetunit = Vue.user.orgpathnames
|
1509
|
+
this.data.orgpathstr = Vue.user.orgpathstr
|
1510
|
+
this.data.f_check_item_id = this.item.id
|
1511
|
+
this.data.f_check_plan_id = this.f_plan_id
|
1512
|
+
this.data.f_checker_id = Vue.user.id
|
1513
|
+
this.data.f_checker_name = Vue.user.name
|
1514
|
+
this.data.f_check_type = this.item.f_user_type
|
1515
|
+
this.data.f_safecheck_type = this.item.f_safecheck_type
|
1516
|
+
this.data.f_subcompany = this.item.f_subcompany
|
1517
|
+
this.data.f_approved = this.item.f_approvedf_read_instructions
|
1518
|
+
this.data.f_repair_approved = this.item.f_repair_approved
|
1519
|
+
this.data.f_no_checkplan = this.item.f_no_checkplan
|
1520
|
+
this.data.f_approved = this.item.f_approved
|
1521
|
+
this.data.f_filialeid = this.item.f_filialeid || Vue.user.orgid
|
1522
|
+
this.data.f_orgstr = this.item.f_orgstr
|
1523
|
+
this.data.version = this.item.version
|
1524
|
+
this.data.f_check_version=this.item.f_check_version
|
1525
|
+
this.$set('data.f_meters', this.item.f_plan_meters)
|
1526
|
+
this.$set('data.f_userinfo_code', this.item.f_userinfo_code)
|
1527
|
+
// 安检状态
|
1528
|
+
this.$set('data.f_entry_status', '入户')
|
1529
|
+
this.$set('data.f_safe_type', '年度安检')
|
1530
|
+
this.$set('data.f_usegas', '已使用')
|
1531
|
+
this.$set('data.f_state',this.item.f_state)
|
1532
|
+
this.$set('data.f_source', this.source?this.source:'安检')
|
1533
|
+
this.$set('data.f_other_checker_name', '')
|
1534
|
+
// 用户信息
|
1535
|
+
this.$set('data.f_user_name', this.item.f_user_name)
|
1536
|
+
this.$set('data.f_rent_phone', this.item.f_rent_phone)
|
1537
|
+
this.$set('data.f_user_phone', this.item.f_user_phone || this.item.f_plan_meters[0].f_user_phone)
|
1538
|
+
this.$set('data.f_userinfoid', this.item.f_userinfoid)
|
1539
|
+
this.$set('data.f_address', this.item.f_address)
|
1540
|
+
this.$set('data.f_card_id', this.item.f_card_id)
|
1541
|
+
this.$set('data.f_slice_area', this.item.f_slice_area)
|
1542
|
+
this.$set('data.f_recheck_id', this.item.id)
|
1543
|
+
this.$set('rowCodata.f_recheck_id', this.item.id)
|
1544
|
+
this.$set('data.f_street', this.item.f_street)
|
1545
|
+
this.$set('data.f_room', this.item.f_room)
|
1546
|
+
this.$set('data.f_building', this.item.f_building)
|
1547
|
+
this.$set('data.f_unit', this.item.f_unit)
|
1548
|
+
this.$set('data.f_floor', this.item.f_floor)
|
1549
|
+
this.$set('data.f_residential_area' , this.item.f_residential_area)
|
1550
|
+
this.$set('data.f_idnumber', this.item.f_idnumber)
|
1551
|
+
this.$set('data.f_comments', this.item.f_comments)
|
1552
|
+
this.$set('data.f_userproperties', this.item.f_userproperties)
|
1553
|
+
this.$set('data.f_client_evaluation', '满意')
|
1554
|
+
this.$set('data.f_userfiles_id', this.item.f_plan_meters[0].f_userfiles_id)
|
1555
|
+
this.$set('data.f_valve_state', this.item.f_plan_meters[0].f_valve_state)
|
1556
|
+
this.$set('data.f_off_valve_reason', this.item.f_plan_meters[0].f_off_valve_reason)
|
1557
|
+
// 处置方式
|
1558
|
+
this.$set('data.f_gas_guidelines', true)
|
1559
|
+
this.$set('data.f_safety_warning', true)
|
1560
|
+
this.$set('data.f_gas_manual', true)
|
1561
|
+
this.$set('data.f_no_gas_device', false)
|
1562
|
+
this.$set('data.f_close_valve', false)
|
1563
|
+
this.$set('data.f_unload_battery', false)
|
1564
|
+
if (this.data.f_check_item_id == '' && this.item.f_no_checkplan == '无计划安检' ) {
|
1565
|
+
this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
|
1566
|
+
}
|
1567
|
+
if(this.item.f_no_checkplan == '复检'){
|
1568
|
+
this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
|
1569
|
+
}
|
1570
|
+
if(this.item.f_plan_meters) {
|
1571
|
+
for (let de in this.devices) {
|
1572
|
+
if(typeof this.devices[de]=='function'){
|
1573
|
+
continue
|
1574
|
+
}
|
1575
|
+
this.$set('data.device' + this.devices[de].n, [])
|
1576
|
+
for (let i = 0; i < this.item.f_plan_meters.length; i++) {
|
1577
|
+
if (this.item.f_plan_meters[i].f_meter_type) {
|
1578
|
+
this.data.f_meter_type=this.item.f_plan_meters[i].f_meter_type
|
1579
|
+
//tag)
|
1580
|
+
if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') >= 0) {
|
1581
|
+
this.data['device' + this.devices[de].n].push({
|
1582
|
+
f_device_type: "燃气表",
|
1583
|
+
f_items: [
|
1584
|
+
{
|
1585
|
+
f_defect_level: null,
|
1586
|
+
f_device_id: "",
|
1587
|
+
f_is_defect: "",
|
1588
|
+
f_item_name: "基表编号",
|
1589
|
+
f_item_value: this.item.f_plan_meters[i].f_meter_no,
|
1590
|
+
f_path: "",
|
1591
|
+
type: "number"
|
1592
|
+
},
|
1593
|
+
{
|
1594
|
+
f_defect_level: null,
|
1595
|
+
f_device_id: "",
|
1596
|
+
f_is_defect: "",
|
1597
|
+
f_item_name: "气表型号",
|
1598
|
+
f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
|
1599
|
+
f_path: "",
|
1600
|
+
type: "string"
|
1601
|
+
},
|
1602
|
+
{
|
1603
|
+
f_defect_level: null,
|
1604
|
+
f_device_id: "",
|
1605
|
+
f_is_defect: "",
|
1606
|
+
f_item_name: "气表品牌",
|
1607
|
+
f_item_value: this.item.f_plan_meters[i].f_aliasname,
|
1608
|
+
f_path: "",
|
1609
|
+
type: "string"
|
1610
|
+
},
|
1611
|
+
{
|
1612
|
+
f_defect_level: null,
|
1613
|
+
f_device_id: "",
|
1614
|
+
f_is_defect: "",
|
1615
|
+
f_item_name: "进气方向",
|
1616
|
+
f_item_value: this.item.f_plan_meters[i].f_flow_direction,
|
1617
|
+
f_path: "",
|
1618
|
+
type: "string"
|
1619
|
+
},
|
1620
|
+
{
|
1621
|
+
f_defect_level: null,
|
1622
|
+
f_device_id: "",
|
1623
|
+
f_is_defect: "",
|
1624
|
+
f_item_name: "上期表读数",
|
1625
|
+
f_item_value: this.item.f_plan_meters[i].f_prior_reading,
|
1626
|
+
f_path: "",
|
1627
|
+
type: "number"
|
1628
|
+
},
|
1629
|
+
{
|
1630
|
+
f_defect_level: null,
|
1631
|
+
f_device_id: "",
|
1632
|
+
f_is_defect: "",
|
1633
|
+
f_item_name: "表封号",
|
1634
|
+
f_item_value: this.item.f_plan_meters[i].f_metertitles,
|
1635
|
+
f_path: "",
|
1636
|
+
type: "string"
|
1637
|
+
}
|
1638
|
+
]
|
1639
|
+
})
|
1640
|
+
}
|
1641
|
+
else if (this.devices[de].device == "燃气表") {
|
1642
|
+
this.data['device' + this.devices[de].n].push({
|
1643
|
+
f_device_type: "燃气表",
|
1644
|
+
f_items: [
|
1645
|
+
{
|
1646
|
+
f_defect_level: null,
|
1647
|
+
f_device_id: "",
|
1648
|
+
f_is_defect: "",
|
1649
|
+
f_item_name: "基表编号",
|
1650
|
+
f_item_value: this.item.f_plan_meters[i].f_meter_no,
|
1651
|
+
f_path: "",
|
1652
|
+
type: "number"
|
1653
|
+
},
|
1654
|
+
{
|
1655
|
+
f_defect_level: null,
|
1656
|
+
f_device_id: "",
|
1657
|
+
f_is_defect: "",
|
1658
|
+
f_item_name: "气表型号",
|
1659
|
+
f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
|
1660
|
+
f_path: "",
|
1661
|
+
type: "string"
|
1662
|
+
},
|
1663
|
+
{
|
1664
|
+
f_defect_level: null,
|
1665
|
+
f_device_id: "",
|
1666
|
+
f_is_defect: "",
|
1667
|
+
f_item_name: "气表品牌",
|
1668
|
+
f_item_value: this.item.f_plan_meters[i].f_aliasname,
|
1669
|
+
f_path: "",
|
1670
|
+
type: "string"
|
1671
|
+
},
|
1672
|
+
{
|
1673
|
+
f_defect_level: null,
|
1674
|
+
f_device_id: "",
|
1675
|
+
f_is_defect: "",
|
1676
|
+
f_item_name: "进气方向",
|
1677
|
+
f_item_value: this.item.f_plan_meters[i].f_flow_direction,
|
1678
|
+
f_path: "",
|
1679
|
+
type: "string"
|
1680
|
+
},
|
1681
|
+
{
|
1682
|
+
f_defect_level: null,
|
1683
|
+
f_device_id: "",
|
1684
|
+
f_is_defect: "",
|
1685
|
+
f_item_name: "上期表读数",
|
1686
|
+
f_item_value: this.item.f_plan_meters[i].f_prior_reading,
|
1687
|
+
f_path: "",
|
1688
|
+
type: "number"
|
1689
|
+
},
|
1690
|
+
{
|
1691
|
+
f_defect_level: null,
|
1692
|
+
f_device_id: "",
|
1693
|
+
f_is_defect: "",
|
1694
|
+
f_item_name: "表封号",
|
1695
|
+
f_item_value: this.item.f_plan_meters[i].f_metertitles,
|
1696
|
+
f_path: "",
|
1697
|
+
type: "string"
|
1698
|
+
}
|
1699
|
+
]
|
1700
|
+
})
|
1701
|
+
}
|
1702
|
+
if(this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('物联网表') >= 0){
|
1703
|
+
this.data['device' + this.devices[de].n].forEach(device => {
|
1704
|
+
if (!this.data.f_collection_type) {
|
1705
|
+
this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
|
1706
|
+
delete this.config['燃气表']['items']['累购气量']
|
1707
|
+
delete this.config['燃气表']['items']['已用金额']
|
1708
|
+
delete this.config['燃气表']['items']['剩余气量']
|
1709
|
+
delete this.config['燃气表']['items']['气量异常差值']
|
1710
|
+
delete this.config['燃气表']['items']['金额异常差值']
|
1711
|
+
device.f_items.push(
|
1712
|
+
{
|
1713
|
+
f_defect_level: null,
|
1714
|
+
f_device_id: "",
|
1715
|
+
f_is_defect: "",
|
1716
|
+
f_item_name: "初始表底",
|
1717
|
+
isshow: true,
|
1718
|
+
f_item_value: this.item.f_plan_meters[i].f_initial_base,
|
1719
|
+
f_path: "",
|
1720
|
+
type: "number"
|
1721
|
+
},
|
1722
|
+
{
|
1723
|
+
f_defect_level: null,
|
1724
|
+
f_device_id: "",
|
1725
|
+
f_is_defect: "",
|
1726
|
+
f_item_name: "累购金额",
|
1727
|
+
f_item_value: this.item.f_plan_meters[i].f_total_fee,
|
1728
|
+
f_path: "",
|
1729
|
+
type: "number"
|
1730
|
+
},
|
1731
|
+
{
|
1732
|
+
f_defect_level: null,
|
1733
|
+
f_device_id: "",
|
1734
|
+
f_is_defect: "",
|
1735
|
+
f_item_name: "已用气量",
|
1736
|
+
f_item_value: this.item.f_plan_meters[i].f_meter_base,
|
1737
|
+
f_path: "",
|
1738
|
+
type: "number"
|
1739
|
+
},
|
1740
|
+
{
|
1741
|
+
f_defect_level: null,
|
1742
|
+
f_device_id: "",
|
1743
|
+
f_is_defect: "",
|
1744
|
+
f_item_name: "剩余金额",
|
1745
|
+
f_item_value: '',
|
1746
|
+
f_path: "",
|
1747
|
+
type: "number"
|
1748
|
+
},
|
1749
|
+
{
|
1750
|
+
f_defect_level: null,
|
1751
|
+
f_device_id: "",
|
1752
|
+
f_is_defect: "",
|
1753
|
+
f_item_name: "系统余额",
|
1754
|
+
f_item_value: this.item.f_plan_meters[i].f_balance_amount,
|
1755
|
+
f_path: "",
|
1756
|
+
type: "number"
|
1757
|
+
}
|
1758
|
+
)
|
1759
|
+
}
|
1760
|
+
})
|
1761
|
+
} else if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_collection_type) {
|
1762
|
+
this.data['device' + this.devices[de].n].forEach(device => {
|
1763
|
+
/*
|
1764
|
+
"累购气量":{"index":8,"type":"number","readonly":true},
|
1765
|
+
"累购金额":{"index":8,"type":"number","readonly":true},
|
1766
|
+
"字轮读数":{"index":9,"type":"number","checkmust": true},
|
1767
|
+
"已用金额":{"index":9,"type":"number","checkmust": true},
|
1768
|
+
"剩余气量":{"index":10,"type":"number","checkmust": true},
|
1769
|
+
"剩余金额":{"index":10,"type":"number","checkmust": true},
|
1770
|
+
"气量异常差值":{"index":11,"type":"number","readonly": true},
|
1771
|
+
"金额异常差值":{"index":11,"type":"number","readonly": true}
|
1772
|
+
*/
|
1773
|
+
if (this.item.f_plan_meters[i].f_collection_type == '按金额') {
|
1774
|
+
if (!this.data.f_collection_type) {
|
1775
|
+
this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
|
1776
|
+
delete this.config['燃气表']['items']['累购气量']
|
1777
|
+
delete this.config['燃气表']['items']['已用气量']
|
1778
|
+
delete this.config['燃气表']['items']['剩余气量']
|
1779
|
+
delete this.config['燃气表']['items']['气量异常差值']
|
1780
|
+
delete this.config['燃气表']['items']['系统余额']
|
1781
|
+
device.f_items.push(
|
1782
|
+
{
|
1783
|
+
f_defect_level: null,
|
1784
|
+
f_device_id: "",
|
1785
|
+
f_is_defect: "",
|
1786
|
+
f_item_name: "初始表底",
|
1787
|
+
isshow: false,
|
1788
|
+
f_item_value: '',
|
1789
|
+
f_path: "",
|
1790
|
+
type: "number"
|
1791
|
+
},
|
1792
|
+
{
|
1793
|
+
f_defect_level: null,
|
1794
|
+
f_device_id: "",
|
1795
|
+
f_is_defect: "",
|
1796
|
+
f_item_name: "累购金额",
|
1797
|
+
f_item_value: this.item.f_plan_meters[i].f_total_fee,
|
1798
|
+
f_path: "",
|
1799
|
+
type: "number"
|
1800
|
+
},
|
1801
|
+
{
|
1802
|
+
f_defect_level: null,
|
1803
|
+
f_device_id: "",
|
1804
|
+
f_is_defect: "",
|
1805
|
+
f_item_name: "已用金额",
|
1806
|
+
f_item_value: null,
|
1807
|
+
f_path: "",
|
1808
|
+
type: "number"
|
1809
|
+
},
|
1810
|
+
{
|
1811
|
+
f_defect_level: null,
|
1812
|
+
f_device_id: "",
|
1813
|
+
f_is_defect: "",
|
1814
|
+
f_item_name: "剩余金额",
|
1815
|
+
f_item_value: null,
|
1816
|
+
f_path: "",
|
1817
|
+
type: "number"
|
1818
|
+
},
|
1819
|
+
{
|
1820
|
+
f_defect_level: null,
|
1821
|
+
f_device_id: "",
|
1822
|
+
f_is_defect: "",
|
1823
|
+
f_item_name: "金额异常差值",
|
1824
|
+
f_item_value: null,
|
1825
|
+
f_path: "",
|
1826
|
+
type: "number"
|
1827
|
+
}
|
1828
|
+
)
|
1829
|
+
}
|
1830
|
+
} else
|
1831
|
+
if (this.item.f_plan_meters[i].f_collection_type == '按气量') {
|
1832
|
+
if (!this.data.f_collection_type) {
|
1833
|
+
this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
|
1834
|
+
delete this.config['燃气表']['items']['累购金额']
|
1835
|
+
delete this.config['燃气表']['items']['已用金额']
|
1836
|
+
delete this.config['燃气表']['items']['剩余金额']
|
1837
|
+
delete this.config['燃气表']['items']['金额异常差值']
|
1838
|
+
delete this.config['燃气表']['items']['系统余额']
|
1839
|
+
device.f_items.push(
|
1840
|
+
{
|
1841
|
+
f_defect_level: null,
|
1842
|
+
f_device_id: "",
|
1843
|
+
f_is_defect: "",
|
1844
|
+
f_item_name: "初始表底",
|
1845
|
+
isshow: true,
|
1846
|
+
f_item_value: this.item.f_plan_meters[i].f_initial_base,
|
1847
|
+
f_path: "",
|
1848
|
+
type: "number"
|
1849
|
+
},
|
1850
|
+
{
|
1851
|
+
f_defect_level: null,
|
1852
|
+
f_device_id: "",
|
1853
|
+
f_is_defect: "",
|
1854
|
+
f_item_name: "累购气量",
|
1855
|
+
f_item_value: this.item.f_plan_meters[i].f_total_gas,
|
1856
|
+
f_path: "",
|
1857
|
+
type: "number"
|
1858
|
+
},
|
1859
|
+
{
|
1860
|
+
f_defect_level: null,
|
1861
|
+
f_device_id: "",
|
1862
|
+
f_is_defect: "",
|
1863
|
+
f_item_name: "已用气量",
|
1864
|
+
f_item_value: this.item.f_plan_meters[i].f_meter_base,
|
1865
|
+
f_path: "",
|
1866
|
+
type: "number"
|
1867
|
+
},
|
1868
|
+
{
|
1869
|
+
f_defect_level: null,
|
1870
|
+
f_device_id: "",
|
1871
|
+
f_is_defect: "",
|
1872
|
+
f_item_name: "剩余气量",
|
1873
|
+
f_item_value: "",
|
1874
|
+
f_path: "",
|
1875
|
+
type: "number"
|
1876
|
+
},
|
1877
|
+
{
|
1878
|
+
f_defect_level: null,
|
1879
|
+
f_device_id: "",
|
1880
|
+
f_is_defect: "",
|
1881
|
+
f_item_name: "气量异常差值",
|
1882
|
+
f_item_value: null,
|
1883
|
+
f_path: "",
|
1884
|
+
type: "number"
|
1885
|
+
}
|
1886
|
+
)
|
1887
|
+
}
|
1888
|
+
}
|
1889
|
+
})
|
1890
|
+
} else if(this.devices[de].device == "燃气表"){
|
1891
|
+
this.data['device' + this.devices[de].n].forEach(device => {
|
1892
|
+
if (!this.data.f_collection_type) {
|
1893
|
+
this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
|
1894
|
+
delete this.config['燃气表']['items']['累购金额']
|
1895
|
+
delete this.config['燃气表']['items']['已用金额']
|
1896
|
+
delete this.config['燃气表']['items']['剩余金额']
|
1897
|
+
delete this.config['燃气表']['items']['金额异常差值']
|
1898
|
+
delete this.config['燃气表']['items']['系统余额']
|
1899
|
+
device.f_items.push(
|
1900
|
+
{
|
1901
|
+
f_defect_level: null,
|
1902
|
+
f_device_id: "",
|
1903
|
+
f_is_defect: "",
|
1904
|
+
f_item_name: "初始表底",
|
1905
|
+
isshow: true,
|
1906
|
+
f_item_value: this.item.f_plan_meters[i].f_initial_base,
|
1907
|
+
f_path: "",
|
1908
|
+
type: "number"
|
1909
|
+
},
|
1910
|
+
{
|
1911
|
+
f_defect_level: null,
|
1912
|
+
f_device_id: "",
|
1913
|
+
f_is_defect: "",
|
1914
|
+
f_item_name: "累购气量",
|
1915
|
+
f_item_value: this.item.f_plan_meters[i].f_total_gas,
|
1916
|
+
f_path: "",
|
1917
|
+
type: "number"
|
1918
|
+
},
|
1919
|
+
{
|
1920
|
+
f_defect_level: null,
|
1921
|
+
f_device_id: "",
|
1922
|
+
f_is_defect: "",
|
1923
|
+
f_item_name: "已用气量",
|
1924
|
+
f_item_value: this.item.f_plan_meters[i].f_meter_base,
|
1925
|
+
f_path: "",
|
1926
|
+
type: "number"
|
1927
|
+
},
|
1928
|
+
{
|
1929
|
+
f_defect_level: null,
|
1930
|
+
f_device_id: "",
|
1931
|
+
f_is_defect: "",
|
1932
|
+
f_item_name: "剩余气量",
|
1933
|
+
f_item_value: '',
|
1934
|
+
f_path: "",
|
1935
|
+
type: "number"
|
1936
|
+
},
|
1937
|
+
{
|
1938
|
+
f_defect_level: null,
|
1939
|
+
f_device_id: "",
|
1940
|
+
f_is_defect: "",
|
1941
|
+
f_item_name: "气量异常差值",
|
1942
|
+
isshow:false,
|
1943
|
+
f_item_value: null,
|
1944
|
+
f_path: "",
|
1945
|
+
type: "number"
|
1946
|
+
}
|
1947
|
+
)
|
1948
|
+
}
|
1949
|
+
})
|
1950
|
+
}
|
1951
|
+
}
|
1952
|
+
}
|
1953
|
+
}
|
1954
|
+
}
|
1955
|
+
this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
|
1956
|
+
}
|
1957
|
+
},
|
1958
|
+
watch: {
|
1959
|
+
'row' () {
|
1960
|
+
//tag
|
1961
|
+
this.copy()
|
1962
|
+
}
|
1963
|
+
},
|
1964
|
+
async ready () {
|
1965
|
+
//送气超期功能
|
1966
|
+
//await this.isoverDate()
|
1967
|
+
this.putDevices()
|
1968
|
+
//如果已检,则提取安检单
|
1969
|
+
if (this.item.f_state != '未检') {
|
1970
|
+
if (this.role == 'inspect' || this.role == 'androidview') {
|
1971
|
+
HostApp.__callback__ = this.loaded
|
1972
|
+
HostApp.__this__ = this
|
1973
|
+
let that = this
|
1974
|
+
let value = {}
|
1975
|
+
if (this.role == 'inspect') {
|
1976
|
+
if (this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') {
|
1977
|
+
value = this.$androidUtil.path({
|
1978
|
+
alias: 'getUserinfomation',
|
1979
|
+
data: {condition: "f_check_item_id = '" + this.item.id + "' and f_no_checkplan in ('无计划安检','复检')"}
|
1980
|
+
})
|
1981
|
+
} else {
|
1982
|
+
value = this.$androidUtil.bzLogic('FetchCheckPaper', {id: this.item.id})
|
1983
|
+
}
|
1984
|
+
} else {
|
1985
|
+
value = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data: {condition: `id = '${this.item.f_paper_id}'`}})
|
1986
|
+
}
|
1987
|
+
Util.replaceFalse(value)
|
1988
|
+
if (value.data.length != 0) {
|
1989
|
+
that.$set('data', value.data[0])
|
1990
|
+
if (this.data.f_collection_type == '按气量') {
|
1991
|
+
delete this.config['燃气表']['items']['累购金额']
|
1992
|
+
delete this.config['燃气表']['items']['已用金额']
|
1993
|
+
delete this.config['燃气表']['items']['剩余金额']
|
1994
|
+
delete this.config['燃气表']['items']['金额异常差值']
|
1995
|
+
delete this.config['燃气表']['items']['系统余额']
|
1996
|
+
} else if (this.data.f_collection_type == '按金额') {
|
1997
|
+
delete this.config['燃气表']['items']['累购气量']
|
1998
|
+
delete this.config['燃气表']['items']['已用气量']
|
1999
|
+
delete this.config['燃气表']['items']['剩余气量']
|
2000
|
+
delete this.config['燃气表']['items']['气量异常差值']
|
2001
|
+
delete this.config['燃气表']['items']['系统余额']
|
2002
|
+
}
|
2003
|
+
//tag)
|
2004
|
+
if (value.data[0].f_devices) {
|
2005
|
+
for (let da in that.devices) {
|
2006
|
+
if(typeof that.devices[da]=='function'){
|
2007
|
+
continue
|
2008
|
+
}
|
2009
|
+
that.$set('data.device' + that.devices[da].n, [])
|
2010
|
+
}
|
2011
|
+
value.data[0].f_devices.forEach((item) => {
|
2012
|
+
for (let i in item.f_items) {
|
2013
|
+
if(typeof item.f_items[i]=='function'){
|
2014
|
+
continue
|
2015
|
+
}
|
2016
|
+
for (let de in that.config[item.f_device_type].items) {
|
2017
|
+
if(typeof that.config[item.f_device_type].items[de]=='function'){
|
2018
|
+
continue
|
2019
|
+
}
|
2020
|
+
if (item.f_items[i].f_item_name == de) {
|
2021
|
+
if (that.config[item.f_device_type].items[de].type == 'selector' || that.config[item.f_device_type].items[de].type == 'checkbox') {
|
2022
|
+
item.f_items[i].f_item_value = []
|
2023
|
+
} else {
|
2024
|
+
item.f_items[i].f_item_value = ''
|
2025
|
+
}
|
2026
|
+
}
|
2027
|
+
}
|
2028
|
+
for (let j in item.f_items[i].f_item_lists) {
|
2029
|
+
if(typeof item.f_items[i].f_item_lists[j]=='function'){
|
2030
|
+
continue
|
2031
|
+
}
|
2032
|
+
if (item.f_items[i].f_item_value instanceof Array) {
|
2033
|
+
item.f_items[i].f_item_value.push(item.f_items[i].f_item_lists[j].f_item_value)
|
2034
|
+
} else {
|
2035
|
+
item.f_items[i].f_item_value = item.f_items[i].f_item_lists[j].f_item_value
|
2036
|
+
}
|
2037
|
+
}
|
2038
|
+
|
2039
|
+
}
|
2040
|
+
for (let de in that.devices) {
|
2041
|
+
if(typeof that.devices[de]=='function'){
|
2042
|
+
continue
|
2043
|
+
}
|
2044
|
+
if (that.devices[de].device == item.f_device_type) {
|
2045
|
+
that.data['device' + that.devices[de].n].push({
|
2046
|
+
f_device_type: item.f_device_type,
|
2047
|
+
f_items: item.f_items
|
2048
|
+
})
|
2049
|
+
//tag)
|
2050
|
+
}
|
2051
|
+
}
|
2052
|
+
})
|
2053
|
+
if (this.role == 'androidview') {
|
2054
|
+
Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
|
2055
|
+
Util.androidRatifyPics(that.picture, this.$androidUtil.getProxyUrl())
|
2056
|
+
Util.booleanFilter(that.data)
|
2057
|
+
}
|
2058
|
+
//tag)
|
2059
|
+
}
|
2060
|
+
} else {
|
2061
|
+
this.init()
|
2062
|
+
}
|
2063
|
+
if(this.parentPage && this.parentPage=='CurrentCreate'){
|
2064
|
+
let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
|
2065
|
+
if (isRecodr) {
|
2066
|
+
if (isRecodr=='true') {
|
2067
|
+
this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
|
2068
|
+
// 初始化录音
|
2069
|
+
let resse = this.record()
|
2070
|
+
}
|
2071
|
+
}
|
2072
|
+
}
|
2073
|
+
this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
|
2074
|
+
} else {
|
2075
|
+
let that = this
|
2076
|
+
let id
|
2077
|
+
if (this.role == 'view') {
|
2078
|
+
id = this.item.id
|
2079
|
+
}
|
2080
|
+
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data:{condition:`id = '${id}'`}}).then((respanse)=> {
|
2081
|
+
if (respanse.data.length != 0) {
|
2082
|
+
that.data = Object.assign(that.data,respanse.data[0])
|
2083
|
+
if(respanse.data[0].f_devices) {
|
2084
|
+
for (let da in that.devices) {
|
2085
|
+
that.$set('data.device' + that.devices[da].n, [])
|
2086
|
+
}
|
2087
|
+
respanse.data[0].f_devices.forEach((item) => {
|
2088
|
+
for (let de in that.devices) {
|
2089
|
+
if (that.devices[de].device == item.f_device_type) {
|
2090
|
+
that.data['device' + that.devices[de].n].push({
|
2091
|
+
f_device_type: item.f_device_type,
|
2092
|
+
f_items: item.f_items
|
2093
|
+
})
|
2094
|
+
}
|
2095
|
+
}
|
2096
|
+
})
|
2097
|
+
}
|
2098
|
+
Util.replaceFalse(that.data)
|
2099
|
+
Util.booleanFilter(that.data)
|
2100
|
+
if(this.role == 'view'){
|
2101
|
+
Util.ratifyPics(that.data)
|
2102
|
+
}else{
|
2103
|
+
Util.androidRatifyPics(that.data,this.$androidUtil.getProxyUrl())
|
2104
|
+
}
|
2105
|
+
} else {
|
2106
|
+
alert("该安检单可能已不在本地!")
|
2107
|
+
this.init()
|
2108
|
+
}
|
2109
|
+
this.$goto('safecheck-userinfo', {userinfo:this.data}, 'paper-router')
|
2110
|
+
}
|
2111
|
+
).catch(
|
2112
|
+
(respanse) => {
|
2113
|
+
alert('查找安检单失败')
|
2114
|
+
})
|
2115
|
+
}
|
2116
|
+
}else{
|
2117
|
+
if(this.parentPage && (this.parentPage == 'CurrentCreate' || this.parentPage == 'AddPlanItem') ){
|
2118
|
+
//tag
|
2119
|
+
let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
|
2120
|
+
if (isRecodr) {
|
2121
|
+
if (isRecodr=='true') {
|
2122
|
+
// this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
|
2123
|
+
// 初始化录音
|
2124
|
+
let resse = this.record()
|
2125
|
+
}
|
2126
|
+
}
|
2127
|
+
}
|
2128
|
+
this.init()
|
2129
|
+
}
|
2130
|
+
},
|
2131
|
+
events: {
|
2132
|
+
'tijiao': function () {
|
2133
|
+
// 事件回调内的 `this` 自动绑定到注册它的实例上
|
2134
|
+
this.confirm()
|
2135
|
+
}
|
2136
|
+
}
|
2137
|
+
}
|
2138
|
+
</script>
|
2139
|
+
<style lang="less">
|
2140
|
+
@import "../../../src/bootstrap/less/variables.less";
|
2141
|
+
.noclickbut {
|
2142
|
+
pointer-events: none;
|
2143
|
+
}
|
2144
|
+
.tab-befor-img (@url) {
|
2145
|
+
content: '';
|
2146
|
+
background-image: url("@{url}");
|
2147
|
+
background-size: 20px;
|
2148
|
+
display: inline-block;
|
2149
|
+
margin-right: 8px;
|
2150
|
+
margin-top: 0.3em;
|
2151
|
+
height: 1.3em;
|
2152
|
+
width: 1.3em;
|
2153
|
+
vertical-align: -35%;
|
2154
|
+
}
|
2155
|
+
|
2156
|
+
@media screen and (min-width: 768px) {
|
2157
|
+
.android-repair-order > div > ul a {
|
2158
|
+
font-size: @font-size-h2;
|
2159
|
+
margin: 0.3em 0;
|
2160
|
+
}
|
2161
|
+
}
|
2162
|
+
.repair-details-class{
|
2163
|
+
&::before {
|
2164
|
+
.tab-befor-img("../../assets/huneiweixiu1.png");
|
2165
|
+
}
|
2166
|
+
}
|
2167
|
+
.repair-info-class {
|
2168
|
+
&::before {
|
2169
|
+
.tab-befor-img("../../assets/baoxiuxinxi1.png");
|
2170
|
+
}
|
2171
|
+
}
|
2172
|
+
.repair-user-info-class {
|
2173
|
+
&::before {
|
2174
|
+
.tab-befor-img("../../assets/jibenxinxi1.png")
|
2175
|
+
}
|
2176
|
+
}
|
2177
|
+
|
2178
|
+
.door-service-class {
|
2179
|
+
&::before {
|
2180
|
+
.tab-befor-img("../../assets/huneiweixiu1.png")
|
2181
|
+
}
|
2182
|
+
}
|
2183
|
+
|
2184
|
+
.pipeline-class {
|
2185
|
+
&::before {
|
2186
|
+
.tab-befor-img("../../assets/guandao1.png")
|
2187
|
+
}
|
2188
|
+
}
|
2189
|
+
|
2190
|
+
.device-service-class {
|
2191
|
+
&::before {
|
2192
|
+
.tab-befor-img("../../assets/shebeiweixiu1.png")
|
2193
|
+
}
|
2194
|
+
}
|
2195
|
+
|
2196
|
+
.trouble-removal-class {
|
2197
|
+
&::before {
|
2198
|
+
.tab-befor-img("../../assets/shiguchuli.png")
|
2199
|
+
}
|
2200
|
+
}
|
2201
|
+
|
2202
|
+
.cooking-utensils-class {
|
2203
|
+
&::before {
|
2204
|
+
.tab-befor-img("../../assets/zaoju1.png")
|
2205
|
+
}
|
2206
|
+
}
|
2207
|
+
|
2208
|
+
.outlay-class {
|
2209
|
+
&::before {
|
2210
|
+
.tab-befor-img("../../assets/feiyong1.png")
|
2211
|
+
}
|
2212
|
+
}
|
2213
|
+
|
2214
|
+
.fault-all-class {
|
2215
|
+
&::before {
|
2216
|
+
.tab-befor-img("../../assets/guzhanghuizong1.png")
|
2217
|
+
}
|
2218
|
+
}
|
2219
|
+
.photo-write-class {
|
2220
|
+
&::before {
|
2221
|
+
.tab-befor-img("../../assets/zaoju.png")
|
2222
|
+
}
|
2223
|
+
}
|
2224
|
+
.delay-apply-class {
|
2225
|
+
&::before {
|
2226
|
+
.tab-befor-img("../../assets/yonghubaoxiu.png")
|
2227
|
+
}
|
2228
|
+
}
|
2229
|
+
|
2230
|
+
.repair-back-class {
|
2231
|
+
&::before {
|
2232
|
+
.tab-befor-img("../../assets/fanhui.png")
|
2233
|
+
}
|
2234
|
+
}
|
2235
|
+
.butt2 {
|
2236
|
+
display: inline;
|
2237
|
+
float: right;
|
2238
|
+
width: 10px;
|
2239
|
+
text-align: center;
|
2240
|
+
align-items:center;
|
2241
|
+
position: absolute;
|
2242
|
+
top:50%;
|
2243
|
+
|
2244
|
+
left:90%;
|
2245
|
+
transform: translate(-50%,-50%);
|
2246
|
+
}
|
2247
|
+
.linesty{
|
2248
|
+
display: inline-block;
|
2249
|
+
height:1px;
|
2250
|
+
width:100%;
|
2251
|
+
background:#d0d0d0;
|
2252
|
+
overflow:hidden;
|
2253
|
+
vertical-align: middle;
|
2254
|
+
}
|
2255
|
+
.spanboder{
|
2256
|
+
border-bottom:2px solid #499edf;
|
2257
|
+
padding-bottom: 8px
|
2258
|
+
}
|
2259
|
+
.app-botton {
|
2260
|
+
position:fixed;
|
2261
|
+
background: #87b2dd;
|
2262
|
+
right:8px;
|
2263
|
+
color: #FFF;
|
2264
|
+
padding: 8px;
|
2265
|
+
text-align: center;
|
2266
|
+
font-size: 1.2em;
|
2267
|
+
z-index: 10;
|
2268
|
+
opacity:0.5;
|
2269
|
+
bottom: 50px;
|
2270
|
+
margin-top: -10px;
|
2271
|
+
height: 40px;
|
2272
|
+
}
|
2273
|
+
.android-repair-order > div > ul a {
|
2274
|
+
font-size: 12px;
|
2275
|
+
color: #333333;
|
2276
|
+
padding: 13px 16px;
|
2277
|
+
}
|
2278
|
+
</style>
|