safecheck-client 3.0.33-50 → 3.0.33-53

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