safecheck-client 3.0.34-67 → 3.0.34-70

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,502 @@
1
+ <style scoped>
2
+ .bg {
3
+ background-color: blue;
4
+ height: 1px;
5
+ border: 0;
6
+ }
7
+
8
+ .app-row {
9
+ background-color: white;
10
+ padding: 10px 10px 0 10px;
11
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
12
+ }
13
+
14
+ .search_input {
15
+ border: 0;
16
+ outline: none;
17
+ }
18
+
19
+ .font {
20
+ font: 15px PingFang-SC-Medium;
21
+ color: #666666;
22
+ }
23
+
24
+ .input-font {
25
+ font: 15px PingFang-SC-Medium;
26
+ color: #333333;
27
+ }
28
+
29
+ .btn-font {
30
+ font: 600 16px PingFang-SC-Bold;
31
+ color: #499EDF;
32
+ }
33
+
34
+ .btn-color {
35
+ background-color: #FFFFFF;
36
+ border-radius: 10px;
37
+ border: 1px solid #499EDF;
38
+ }
39
+
40
+ .app-text {
41
+ font-size: 12px;
42
+ }
43
+
44
+ .panel-self {
45
+ border-radius: 10px;
46
+ border: 1px solid #499EDF;
47
+ background-color: #F8F8F8;
48
+ }
49
+
50
+ .yybtn-color {
51
+ background-color: #499edf;
52
+ border-radius: 4px;
53
+ border: 1px solid #499EDF;
54
+ color: #FFFFFF;
55
+ font: 14px PingFang-SC-Bold;
56
+ }
57
+
58
+ .qxbtn-color {
59
+ background-color: #FFFFFF;
60
+ border-radius: 4px;
61
+ color: #499edf;
62
+ font: 14px PingFang-SC-Bold;
63
+ border: 1px solid #499EDF;
64
+ }
65
+
66
+ .button_shrink_top {
67
+ width: 35px;
68
+ height: 35px;
69
+ background-size: 100%;
70
+ background-image: url("../../../static/newStyle/stretch_top.png")
71
+ }
72
+
73
+ .button_shrink_bottom {
74
+ width: 35px;
75
+ height: 35px;
76
+ background-size: 100%;
77
+ background-image: url("../../../static/newStyle/stretch_bottom.png")
78
+ }
79
+
80
+ .button_shrink_left {
81
+ width: 35px;
82
+ height: 35px;
83
+ background-size: 100%;
84
+ background-image: url("../../../static/newStyle/stretch_left.png")
85
+ }
86
+
87
+ .button_shrink_right {
88
+ width: 35px;
89
+ height: 35px;
90
+ background-size: 100%;
91
+ background-image: url("../../../static/newStyle/stretch_right.png")
92
+ }
93
+ </style>
94
+ <template>
95
+ <div style="height: auto;width: 100%">
96
+ <criteria-paged :model="model" v-ref:paged :pager="false">
97
+ <list :model="model" partial='list'>
98
+ <div partial>
99
+ <div class="auto app-text" style="margin-top: 5px;">
100
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
101
+ <div class="panel-body panel-self">
102
+ <div class="col-xs-12">
103
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
104
+ <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}</p>
105
+ </div>
106
+ <div class="col-xs-12">
107
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
108
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
109
+ </div>
110
+ <div class="col-xs-12">
111
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b></p>
112
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone }}</p>
113
+ </div>
114
+ <div class="col-xs-12">
115
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>安检时间:</b></p>
116
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_create_time }}</p>
117
+ </div>
118
+ <div class="col-xs-12">
119
+ <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
120
+ <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}</p>
121
+ </div>
122
+ <div class="col-xs-12">
123
+ <p class="panel-title text-left font" style="width: 21%;float: left"><b>所属安检:</b></p>
124
+ <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_checker_name }}</p>
125
+ </div>
126
+ <div class="col-xs-6">
127
+ <p class="panel-title col-xs-5 text-left font"><b>检&ensp;查&ensp;项:</b></p>
128
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_device_type }}</p>
129
+ </div>
130
+ <div class="col-xs-6">
131
+ <p class="panel-title col-xs-5 text-left font"><b>隐&ensp;患&ensp;项:</b></p>
132
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_item_name }}</p>
133
+ </div>
134
+ <div class="col-xs-12">
135
+ <p class="panel-title col-xs-5 text-left font"><b>备注:</b></p>
136
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_comments }}</p>
137
+ </div>
138
+ <div class="col-xs-12">
139
+ <p class="panel-title col-xs-5 text-left font"><b>隐患原因:</b></p>
140
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_item_value }}</p>
141
+ </div>
142
+
143
+ <div class="col-xs-12">
144
+ <button type="button" name="button" class="btn btn-primary"
145
+ style="background-color:#499edf;float: right"
146
+ @click="$parent.$parent.$parent.openshowModal(row)">查看
147
+ </button>
148
+ <button type="button" name="button" class="btn btn-primary"
149
+ style="background-color:#499edf;float: right;margin-right:10px;"
150
+ @click="$parent.$parent.$parent.openshowModal1(row)">处理
151
+ </button>
152
+ <!--<button type="button" class="btn btn-default" @click="$parent.$parent.$parent.ceshi">确认2</button>-->
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ </div>
158
+ </list>
159
+ </criteria-paged>
160
+ </div>
161
+ <modal :show.sync="showModal">
162
+ <div slot="modal-header" class="modal-header">
163
+ <h4 class="modal-title">
164
+ 隐患照片
165
+ </h4>
166
+ </div>
167
+ <div slot="modal-body" class="modal-body">
168
+ <div class="from-group">
169
+ <div class="row">
170
+ <div class="col-md-6">
171
+ <img-self v-if="row.f_path" :src="`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+row.f_path" width="300" height="400"></img-self>
172
+ <img-self v-if="row.f_p1_path" :src="`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+row.f_p1_path" width="300" height="400"></img-self>
173
+ <img-self v-if="row.f_p2_path" :src="`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+row.f_p2_path" width="300" height="400"></img-self>
174
+ </div>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ <div slot="modal-footer" class="modal-footer">
179
+ <button type="button" class="btn btn-default" @click="closeshowModal">确认</button>
180
+ </div>
181
+ </modal>
182
+ <modal :show.sync="showModal1">
183
+ <div slot="modal-header" class="modal-header">
184
+ <h4 class="modal-title">
185
+ 处理结果
186
+ </h4>
187
+ </div>
188
+ <div slot="modal-body" class="modal-body">
189
+ <div class="row" style="margin-bottom: 10px">
190
+ <p class="panel-title col-xs-3 text-left font"><b>隐&ensp;患&ensp;项:</b></p>
191
+ <p class="panel-title col-xs-9 text-left input-font">{{ deal.result.f_item_name }}</p>
192
+ </div>
193
+ <div class="row" style="margin-bottom: 10px">
194
+ <p class="panel-title col-xs-3 text-left font"><b>隐患原因:</b></p>
195
+ <p class="panel-title col-xs-9 text-left input-font">{{ deal.result.f_item_value }}</p>
196
+ </div>
197
+ <div class="form-group col-sm-12">
198
+ <div class="auto">
199
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
200
+ <div class="panel-body panel-self"
201
+ style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
202
+ <img-self :src="deal.f_deal_path" alt="整改照片" :width="140" :height="170" capture="camera"
203
+ type="file"></img-self>
204
+ <div class="row text-right div-photo" style="height: 50px;margin-top: -30px">
205
+ <img src="../../assets/remove.png" @click="delfile('f_deal_path', deal.f_deal_path)"></img>
206
+ <button type="button" name="button" class="btn btn-primary btn-photo"
207
+ @click="takePic('f_deal_path','整改照片')">拍照
208
+ </button>
209
+ </div>
210
+ </div>
211
+ <div class="panel-body panel-self"
212
+ style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
213
+ <img-self :src="deal.f_other_dealpath1" alt="整改照片" :width="140" :height="170" capture="camera"
214
+ type="file"></img-self>
215
+ <div class="row text-right div-photo" style="height: 50px;margin-top: -30px">
216
+ <img src="../../assets/remove.png" @click="delfile('f_other_dealpath1', deal.f_other_dealpath1)"></img>
217
+ <button type="button" name="button" class="btn btn-primary btn-photo"
218
+ @click="takePic('f_other_dealpath1','整改照片')">拍照
219
+ </button>
220
+ </div>
221
+ </div>
222
+ <div class="panel-body panel-self"
223
+ style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
224
+ <img-self :src="deal.f_other_dealpath2" alt="整改照片" :width="140" :height="170" capture="camera"
225
+ type="file"></img-self>
226
+ <div class="row text-right div-photo" style="height: 50px;margin-top: -30px">
227
+ <img src="../../assets/remove.png" @click="delfile('f_other_dealpath2', deal.f_other_dealpath2)"></img>
228
+ <button type="button" name="button" class="btn btn-primary btn-photo"
229
+ @click="takePic('f_other_dealpath2','整改照片')">拍照
230
+ </button>
231
+ </div>
232
+ </div>
233
+ </div>
234
+ </div>
235
+ </div>
236
+ <div class="form-group col-sm-12" v-if="isNeedDealSign">
237
+ <p class="panel-title text-left font" style="text-align: center">用户签名:</p>
238
+ <div class="auto">
239
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
240
+ <div class="panel-body panel-self"
241
+ style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
242
+ <img :src="deal.f_dealsign_path" :width="200" :height="150"/>
243
+ <div class="row text-right div-photo" style="height: 50px;margin-top: 60px">
244
+ <button type="button" name="button" class="btn btn-primary btn-photo" @click="sign">签名</button>
245
+ </div>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ <div class="row">
251
+ <div class="col-xs-2">
252
+ <p class="panel-title text-left font" style="text-align: center">处理结果</p>
253
+ </div>
254
+ <div class="col-xs-9">
255
+ <textarea class="input-font " v-model=deal.f_deal_remark style="width: 100%"></textarea>
256
+ </div>
257
+ </div>
258
+ <div v-if="isCancelLimitGas" style="display: flex;align-items: end;height: 30px;gap: 10px;padding-left: 16px;">
259
+ <input type="checkbox" v-model="deletebacklistisselect"/>
260
+ <div style="height: 18px">取消限制该用户购气</div>
261
+ </div>
262
+ </div>
263
+ <div slot="modal-footer" class="modal-footer">
264
+ <button type="button" class="btn btn-default" @click="commitDealDefect">确认</button>
265
+ <button type="button" class="btn btn-default" @click="closeshowModal1">取消</button>
266
+ </div>
267
+ </modal>
268
+ </template>
269
+
270
+ <script>
271
+ import Vue from 'vue'
272
+ import {HttpResetClass, PagedList} from 'vue-client'
273
+ import * as Util from '../Util'
274
+
275
+ export default {
276
+ props:['row'],
277
+ title: '无计划安检查询',
278
+ data() {
279
+ return {
280
+ row:{},
281
+ showModal: false,
282
+ showModal1: false,
283
+ showimg: '',
284
+ deal: {
285
+ result: {},
286
+ f_deal_path: '',
287
+ f_other_dealpath1: '',
288
+ f_other_dealpath2: '',
289
+ f_deal_remark: '',
290
+ f_dealsign_path: '', //签名
291
+ f_dealer: Vue.user.name,
292
+ f_dealer_id: Vue.user.id
293
+ },
294
+ user_types: [
295
+ {label: '请选择用户类型', value: ''},
296
+ {label: '民用', value: '民用'},
297
+ {label: '非民用', value: '非民用'},
298
+ ],
299
+ f_filialeids: '',
300
+ model: new PagedList(`${this.$androidUtil.getProxyUrl()}/rs/sql/AndroidDealWith`, 20, {
301
+ condition: 'this.condition',
302
+ f_filialeids: `'${Vue.user.orgid}'`,
303
+ f_checker_id: `'${Vue.user.id}'`
304
+ }),
305
+ criteriaShow: false,
306
+ isNeedDealSign: this.$appdata.getSingleValue('隐患处理是否需要签名') == 'true',
307
+ isCancelLimitGas: this.$appdata.getSingleValue('隐患处理-取消限制购气') == '是',
308
+ deletebacklistisselect: false
309
+ }
310
+ },
311
+ ready() {
312
+ debugger
313
+ this.selfSearch()
314
+ },
315
+ methods: {
316
+ async deletebacklist() {
317
+ ////tag)
318
+ let http = new HttpResetClass()
319
+ ////tag
320
+ let res1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
321
+ data: {
322
+ items: "*",
323
+ tablename: "t_userinfo",
324
+ condition: `f_userinfo_code = ${this.deal.result.f_userinfo_code}`,
325
+ orderitem: "f_userinfo_code"
326
+ }
327
+ }, {resolveMsg: null, rejectMsg: null})
328
+ ////tag)
329
+ ////tag
330
+ let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/backlistOperate`, {
331
+ data: {
332
+ "f_operat_type": "取消拉黑",
333
+ "f_state": "有效",
334
+ "f_user_name": this.deal.result.f_user_name,
335
+ "f_comments": '',
336
+ "f_operator": Vue.user.name,
337
+ "f_operatorid": Vue.user.id,
338
+ "f_orgid": Vue.user.orgid,
339
+ "f_orgname": Vue.user.orgs,
340
+ "f_depid": Vue.user.depids,
341
+ "f_depname": Vue.user.deps,
342
+ "f_describe": `${Vue.user.name}对用户${this.deal.result.f_user_name}进行取消拉黑`,
343
+ "f_userinfo_id": {
344
+ "f_userinfo_id": res1.data[0].f_userinfo_id,
345
+ "f_user_state": "正常",
346
+ "version": res1.data[0].version
347
+ },
348
+ "f_limit_times":"",
349
+ "f_limit_value":""
350
+ }
351
+ }, {resolveMsg: null, rejectMsg: null})
352
+ },
353
+ // 签名回调
354
+ signCallback(prop, fileName) {
355
+ console.log("签名回调地址" + fileName)
356
+ // HostApp.alert('绑定属性:' + prop + ' 文件全路径如file:///storage/sdcard0/safecheck/abc.jpg:' + fullFileName)
357
+ HostApp.__this__.$set('deal.f_dealsign_path', fileName)
358
+ HostApp.__callback__ = null
359
+ HostApp.__this__ = null
360
+ },
361
+ // 用户签名
362
+ sign() {
363
+ if (!this.deal.f_deal_path) {
364
+ this.$showMessage('请先拍摄处理后照片!!!')
365
+ return
366
+ }
367
+ this.delAudioFile('f_dealsign_path', this.deal.f_dealsign_path)
368
+ let prop = 'f_dealsign_path'
369
+ let idx = 'aofeng'
370
+ let fileName
371
+ if (!this.deal.f_dealsign_path) {
372
+ fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
373
+ } else {
374
+ fileName = Util.getFileName(this.deal.f_dealsign_path)
375
+ }
376
+ HostApp.__callback__ = this.signCallback
377
+ HostApp.__this__ = this
378
+ HostApp.getSignature({
379
+ file: fileName,
380
+ requestCode: 111,
381
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");'
382
+ })
383
+ },
384
+ delAudioFile(prop, fileName) {
385
+ if (!fileName)
386
+ return
387
+ else {
388
+ HostApp.delfile(fileName)
389
+ this.deal[prop] = null
390
+ }
391
+ },
392
+ commitDealDefect() {
393
+ //tag
394
+ //tag)
395
+ // if (!this.deal.f_deal_path) {
396
+ // this.$showMessage('处理后照片必须上传')
397
+ // return
398
+ // }
399
+ if (this.isNeedDealSign && !this.deal.f_dealsign_path) {
400
+ this.$showMessage('签名必须上传')
401
+ return
402
+ }
403
+ if (this.deletebacklistisselect){
404
+ this.deletebacklist()
405
+ }
406
+ this.deal.f_other_dealpath = this.deal.f_deal_path
407
+ HostApp.__this__ = this
408
+ HostApp.logicWithHint({
409
+ 'logic': 'safe_dealWithDefect', 'callback': 'javascript: HostApp.__this__.commitCallBack()',
410
+ 'data': this.deal, 'backresult': 1
411
+ })
412
+ },
413
+ commitCallBack(jo) {
414
+ //tag
415
+ //tag)
416
+ if (jo.state == 'ok') {
417
+ let ress = JSON.parse(jo.result)
418
+ if (ress.code == 200) {
419
+ this.$showMessage(ress.msg)
420
+ this.closeshowModal1()
421
+ } else {
422
+ this.$showMessage(ress.msg)
423
+ }
424
+ } else {
425
+ this.$showMessage('本地服务调用失败')
426
+ }
427
+ },
428
+ delfile(prop, fileName) {
429
+ if (fileName == Vue.nopic)
430
+ return
431
+ else {
432
+ HostApp.delfile(fileName)
433
+ this.deal[prop] = Vue.nopic
434
+ }
435
+ },
436
+ openshowModal(val) {
437
+ this.row = val
438
+ this.showModal = true
439
+ },
440
+ closeshowModal() {
441
+ this.showimg = ''
442
+ this.showModal = false
443
+ },
444
+ openshowModal1(val) {
445
+ this.deal.result = val
446
+ //tag
447
+ //tag
448
+ this.deletebacklistisselect = false
449
+ this.showModal1 = true
450
+ },
451
+ closeshowModal1() {
452
+ this.deal = {
453
+ result: {},
454
+ f_deal_path: '',
455
+ f_other_dealpath1: '',
456
+ f_other_dealpath2: '',
457
+ f_deal_remark: '',
458
+ f_dealsign_path: '', //签名
459
+ f_dealer: Vue.user.name,
460
+ f_dealer_id: Vue.user.id
461
+ }
462
+ this.showModal1 = false
463
+ this.selfSearch()
464
+ },
465
+ cameraCallBack(prop, fileName) {
466
+ HostApp.__this__.$set( 'deal.'+prop+'', fileName)
467
+ HostApp.__callback__ = null
468
+ HostApp.__this__ = null
469
+ },
470
+ takePic(prop, title) {
471
+ HostApp.__callback__ = this.cameraCallBack
472
+ HostApp.__this__ = this
473
+ let fileName
474
+ if (!this.deal[prop] || this.deal[prop].includes("nopic.png")) {
475
+ fileName = Util.guid() + '-' + prop + '.jpg'
476
+ } else {
477
+ fileName = Util.getFileName(this.deal[prop])
478
+ }
479
+ //tag
480
+ //tag
481
+ HostApp._open_a_page({
482
+ type: 'boomerang',
483
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
484
+ param: {
485
+ file: fileName,
486
+ requestCode: 111,
487
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
488
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
489
+ }
490
+ })
491
+ },
492
+ selfSearch() {
493
+ let condition = `tcp.f_userinfo_code = '${this.row.f_userinfo_code}'`
494
+ this.model.search(condition)
495
+ },
496
+
497
+ hidden() {
498
+ this.criteriaShow = !this.criteriaShow
499
+ }
500
+ }
501
+ }
502
+ </script>
@@ -261,7 +261,7 @@
261
261
  <div class="col-xs-12">
262
262
  <button type="button" name="button" class="btn btn-primary"
263
263
  style="background-color:#499edf;float: right"
264
- @click="$parent.$parent.$parent.inspect(row)">处理</button>
264
+ @click="$parent.$parent.$parent.inspectRepair (row)">处理</button>
265
265
  </div>
266
266
  </div>
267
267
  </div>
@@ -368,6 +368,36 @@ export default {
368
368
  window.removeEventListener('popstate', this.fun, false)
369
369
  },
370
370
  methods: {
371
+ inspectRepair(row){
372
+ var _this = this
373
+ let http = new HttpResetClass()
374
+ http.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/sql/AndroidDealWith`, {data: {condition: `tcp.f_userinfo_code = '${row.f_userinfo_code}'`,f_filialeids:Vue.user.orgid}},
375
+ {resolveMsg: null, rejectMsg: null}).then(resp=>{
376
+ if (resp.data.length>0){
377
+ this.$showMessage('该用户有隐患未处理,是否先处理隐患?', ['cancel', 'confirm']).then(
378
+ (response) => {
379
+ if (response === 'confirm') {
380
+ var pardate = {
381
+ _this:_this,
382
+ title:'隐患处理',
383
+ safe:true
384
+ }
385
+ _this.$dispatch('gotoson',pardate)
386
+ _this.$goto('android-defect-deal-before-safe', {row: row}, 'self', function () {
387
+ _this.inspect(row)
388
+ })
389
+ }else {
390
+ this.inspect(row)
391
+ }
392
+ }
393
+ )
394
+ }else {
395
+ this.inspect(row)
396
+ }
397
+ }).catch(()=>{
398
+ this.inspect(row)
399
+ })
400
+ },
371
401
  scan() {
372
402
  HostApp.__this__ = this,
373
403
  HostApp.scanCode({ callback: "javascript:HostApp.__this__.getCode();" })