safecheck-client 3.0.32 → 3.0.33-2

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