safecheck-client 4.0.0-52 → 4.0.0-55

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