safecheck-client 3.0.33-5 → 3.0.33-51

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