safecheck-client 3.0.34-3 → 3.0.34-30

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