safecheck-client 3.0.34-65 → 3.0.34-67

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,672 +1,672 @@
1
- <style scoped>
2
- .app-row {
3
- background-color: white;
4
- padding: 10px 10px 0 10px;
5
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
6
- }
7
-
8
- .search_input {
9
- border: 0;
10
- outline: none;
11
- }
12
-
13
- .font {
14
- font: 15px PingFang-SC-Medium;
15
- color: #666666;
16
- }
17
-
18
- .input-font {
19
- font: 15px PingFang-SC-Medium;
20
- color: #333333;
21
- }
22
-
23
- .btn-font {
24
- font: 600 16px PingFang-SC-Bold;
25
- color: #499EDF;
26
- }
27
-
28
- .btn-color {
29
- background-color: #FFFFFF;
30
- border-radius: 10px;
31
- border: 1px solid #499EDF;
32
- }
33
-
34
- .app-text {
35
- font-size: 12px;
36
- }
37
-
38
- .panel-self {
39
- border-radius: 10px;
40
- border: 1px solid #499EDF;
41
- background-color: #F8F8F8;
42
- }
43
-
44
- .button_shrink_top {
45
- width: 35px;
46
- height: 35px;
47
- background-size: 100%;
48
- background-image: url("../../../static/newStyle/stretch_top.png")
49
- }
50
-
51
- .button_shrink_bottom {
52
- width: 35px;
53
- height: 35px;
54
- background-size: 100%;
55
- background-image: url("../../../static/newStyle/stretch_bottom.png")
56
- }
57
- </style>
58
- <template>
59
- <div style="height: auto;width: 100%">
60
- <criteria-paged :model="model" v-ref:paged>
61
- <criteria partial='criteria' @condition-changed='search' v-ref:cri>
62
- <div partial>
63
- <form>
64
- <div class="row app-row">
65
- <div class="col-xs-4">
66
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
67
- <label for="f_userinfo_code" class="font text-left">用户编号:</label>
68
- </div>
69
- <div class="col-xs-8">
70
- <input id="f_userinfo_code" class="search_input input-font"
71
- v-model=model.f_userinfo_code condition="f_userinfo_code like '%{}%'" />
72
- </div>
73
- </div>
74
- <div class="row app-row">
75
- <div class="col-xs-4">
76
- <img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
77
- <label class="font text-left">用户姓名:</label>
78
- </div>
79
- <div class="col-xs-8">
80
- <input class="search_input input-font" v-model=model.f_user_name
81
- condition="f_user_name like '%{}%'" />
82
- </div>
83
- </div>
84
-
85
- <div class="row app-row">
86
- <div class="col-xs-4">
87
- <img src="../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
88
- <label class="font text-left">用户证号:</label>
89
- </div>
90
- <div class="col-xs-8">
91
- <input class="search_input input-font" v-model=model.f_enter_number
92
- condition="f_enter_number like '%{}%'" />
93
- </div>
94
- </div>
95
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
96
- <div class="col-xs-4">
97
- <img src="../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
98
- <label for="f_state" class="font text-left">是否已检:</label>
99
- </div>
100
- <v-select id="f_state" :value.sync="model.f_state" class="input-font"
101
- :options='$parent.$parent.check_states' placeholder='是否已检' :width="'60%'"
102
- v-model="model.f_state" condition="f_state='{}'" close-on-select clear-button>
103
- </v-select>
104
- </div>
105
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
106
- <div class="col-xs-4">
107
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
108
- <label class="font text-left">表&emsp;&emsp;号:</label>
109
- </div>
110
- <div class="col-xs-5">
111
- <input class="search_input input-font" v-model=model.f_meter_no
112
- condition="f_meter_no like '%{}%'" />
113
- </div>
114
- <div class="col-xs-3">
115
- <button type="button" class="btn btn-lg btn-font btn-color"
116
- @click="$parent.$parent.scan()">扫码</button>
117
- </div>
118
- </div>
119
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
120
- <div class="col-xs-4">
121
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
122
- <label class="font text-left">客户电话:</label>
123
- </div>
124
- <div class="col-xs-8">
125
- <input class="search_input input-font" v-model=model.f_user_phone
126
- condition="f_user_phone like '%{}%'" />
127
- </div>
128
- </div>
129
-
130
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
131
- <div class="col-xs-4">
132
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
133
- <label class="font text-left">用户地址:</label>
134
- </div>
135
- <div class="col-xs-8">
136
- <input class="search_input input-font" v-model=model.f_keyword
137
- condition="f_address like '%{}%'" />
138
- </div>
139
- </div>
140
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
141
- <div class="col-xs-4">
142
- <img src="../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
143
- <label for="f_user_type" class="font text-left">用户类型:</label>
144
- </div>
145
- <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font" :width="'60%'"
146
- :options='$parent.$parent.user_types' placeholder='请选择用户类型' v-model="model.f_user_type"
147
- condition="f_user_type='{}'" close-on-select clear-button></v-select>
148
- </div>
149
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
150
- <div class="col-xs-6">
151
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
152
- <label class="font text-left">到访不遇:</label>
153
- </div>
154
- <div class="col-xs-8">
155
- <input class="search_input input-font" type="number" v-model=model.f_check_version
156
- condition="f_check_version <= '{}'" />
157
- </div>
158
- </div>
159
- <div class="row text-center" style="margin-top: 20px;">
160
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;"
161
- @click="$parent.$parent.selfSearch">查询</button>
162
- <div style="float: right;margin-right: 3% " class="button_spacing"
163
- :class="{ 'button_shrink_top': $parent.$parent.criteriaShow, 'button_shrink_bottom': !$parent.$parent.criteriaShow }"
164
- @click="$parent.$parent.hidden()"></div>
165
- <img v-if="!$parent.$parent.planName" style="float: right;margin-right: 3% "
166
- @click="$parent.$parent.getNewOrder" src="../../assets/shuaxindaiban1.png"
167
- style="width: 40px;padding: 5px; float:right">
168
- </div>
169
- <div class="col-sm-12">
170
-
171
- </div>
172
- <div style="height:30px;"></div>
173
- </form>
174
- </div>
175
- </criteria>
176
- <list :model="model" partial='list'>
177
- <div partial>
178
- <div class="auto app-text" style="margin-top: 5px;">
179
- <div class="panel" style="padding: 10px 10px 5px 10px;">
180
- <div class="panel-body panel-self">
181
- <div class="col-xs-12">
182
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left">
183
- <b>用户编号:</b></p>
184
- <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{
185
- row.f_userinfo_code }}</p>
186
- <p class="panel-title col-xs-2 text-left input-font" style="width: 5%;float:right">
187
- <input type="checkbox"
188
- @click="$parent.$parent.$parent.setPlanParam(row.id, $event)" />
189
- </p>
190
- </div>
191
- <div class="col-xs-12">
192
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left">
193
- <b>用户名称:</b></p>
194
- <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{
195
- row.f_user_name }}</p>
196
- </div>
197
- <div class="col-xs-6">
198
- <p class="panel-title col-xs-5 text-left font"><b>用户类型:</b></p>
199
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_user_type }}
200
- </p>
201
- </div>
202
- <div class="col-xs-6">
203
- <p class="panel-title col-xs-5 text-left font"><b>计划名称:</b></p>
204
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_plan_name }}</p>
205
- </div>
206
- <div class="col-xs-12">
207
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b>
208
- </p>
209
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone
210
- }}
211
- <img src="../../assets/phone.png" style="width: 6%"
212
- v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_user_phone)' />
213
- </p>
214
- </div>
215
- <div class="col-xs-12">
216
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>备用电话:</b>
217
- </p>
218
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_rent_phone }}
219
- <img v-if="row.f_rent_phone" src="../../assets/phone.png" style="width: 6%"
220
- v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_rent_phone)' />
221
- </p>
222
- </div>
223
- <div class="col-xs-12">
224
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>租户电话:</b>
225
- </p>
226
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_zuhu_phone
227
- }}
228
- <img v-if="row.f_zuhu_phone" src="../../assets/phone.png" style="width: 6%"
229
- v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_zuhu_phone)' />
230
- </p>
231
- </div>
232
- <div class="col-xs-12">
233
- <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b>
234
- </p>
235
- <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}
236
- </p>
237
- </div>
238
- <div class="col-xs-6">
239
- <p class="panel-title col-xs-5 text-left font"><b>安检状态:</b></p>
240
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_state ==
241
- '已检'?'临时保存':row.f_state }}</p>
242
- </div>
243
- <div class="col-xs-6">
244
- <p class="panel-title col-xs-5 text-left font"><b>上传状态:</b></p>
245
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_upload_state }}</p>
246
- </div>
247
- <div class="col-xs-12" v-if="row.f_prearranged_date != null">
248
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left">
249
- <b>预约时间:</b></p>
250
- <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{
251
- row.f_prearranged_date }}</p>
252
- </div>
253
- <div class="col-xs-6">
254
- <p class="panel-title col-xs-5 text-left font"><b>安检类型:</b></p>
255
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_safecheck_type }}</p>
256
- </div>
257
- <div class="col-xs-12">
258
- <p class="panel-title col-xs-5 text-left font"><b>到访不遇次数:</b></p>
259
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_check_version }}</p>
260
- </div>
261
- <div class="col-xs-12">
262
- <button type="button" name="button" class="btn btn-primary"
263
- style="background-color:#499edf;float: right"
264
- @click="$parent.$parent.$parent.inspect(row)">处理</button>
265
- </div>
266
- </div>
267
- </div>
268
- </div>
269
- </div>
270
- </list>
271
- </criteria-paged>
272
- </div>
273
- </template>
274
-
275
- <script>
276
- import LocalPagedList from '../../plugins/LocalPagedList'
277
- import Vue from 'vue'
278
- import { PagedList, HttpResetClass } from 'vue-client'
279
- import * as Util from '../Util'
280
- import co from 'co'
281
- let select = function* (self) {
282
- let http = new HttpResetClass()
283
- http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
284
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
285
- userid: Vue.user.id
286
- }, { resolveMsg: null, rejectMsg: null }).then((res) => {
287
- self.checkers.push({ label: '全部', value: '' })
288
- res.data.forEach((checker) => {
289
- self.checkers.push({ label: checker.name, value: checker.id })
290
- })
291
- })
292
- }
293
- export default {
294
- title: 'userinfo-select',
295
- props: ['row'],
296
- data() {
297
- return {
298
- f_filialeids: '(' + Vue.user.orgid + ')',
299
- planparam: [],
300
- check: '',
301
- plan: '',
302
- planid: '',
303
- model: Vue.android ? new LocalPagedList('androidGetuserinfo', 20, { condition: 'this.condition' }) : new PagedList('AndroidRest/rs/sql/androidGetuserinfo', 20, { condition: 'this.condition' }),
304
- showModal: false,
305
- showModal2: false,
306
- showModal3: false,
307
- needid: '',
308
- criteriaShow: false,
309
- planoption: [],
310
- condition: '',
311
- checkers: [],
312
- param: null,
313
- f_preset_dt: Util.to3339TimeString(),
314
- flow_direction: [
315
- { label: '请选择挂表方式', value: '' },
316
- { label: '左表', value: '左表' },
317
- { label: '右表', value: '右表' }
318
- ],
319
- check_states: [
320
- { label: '请选择安检状态', value: '' },
321
- { label: '未检', value: '未检' },
322
- { label: '临时保存', value: '已检' },
323
- ],
324
- last_check_states: [
325
- { label: '请选择上次安检状态', value: '' },
326
- { label: '入户', value: '入户' },
327
- { label: '拒检', value: '拒检' },
328
- { label: '到访不遇', value: '到访不遇' },
329
- { label: '未使用天然气', value: '未使用天然气' }
330
- ],
331
- upload_states: [
332
- { label: '请选择上传状态', value: '' },
333
- { label: '未传', value: '未传' },
334
- { label: '已传', value: '已传' }
335
- ],
336
- user_types: [
337
- { label: '请选择用户类型', value: '' },
338
- { label: '民用', value: '民用' },
339
- { label: '非民用', value: '非民用' },
340
- ],
341
- verify_state: [
342
- { label: '请选择审核状态', value: '' },
343
- { label: '未审核', value: '未审核' },
344
- { label: '打回', value: '打回' }
345
- ],
346
- residentialAreaOptions: [],
347
- buildOptions: [],
348
- unitOptions: [],
349
- planNameOptions: [],
350
- upcomingCount: 0,
351
- doneCount: 0,
352
- tempSaveCount: 0,
353
- allPlanCount: 0
354
- }
355
- },
356
- ready() {
357
- this.selfSearch()
358
- let gen = select(this)
359
- co(gen)
360
- },
361
- mounted() {
362
- if (window.history && window.history.pushState) {
363
- history.pushState(null, null, document.URL);
364
- window.addEventListener('popstate', this.fun, false)
365
- }
366
- },
367
- destroyed() {
368
- window.removeEventListener('popstate', this.fun, false)
369
- },
370
- methods: {
371
- scan() {
372
- HostApp.__this__ = this,
373
- HostApp.scanCode({ callback: "javascript:HostApp.__this__.getCode();" })
374
- },
375
- getCode() {
376
- const datapa = HostApp.getCode().data;
377
- this.$refs.paged.$refs.cri.model.f_meter_no = datapa
378
-
379
- },
380
- fun() {
381
-
382
- },
383
- iscancel() {
384
- this.showModal2 = false
385
- this.showModal3 = false
386
- this.planoption = []
387
- },
388
- timeSet(val) {
389
- return val
390
- },
391
- async isok() {
392
- if (this.planoption.length == 0) {
393
- this.$showMessage("请选择计划")
394
- return false
395
- }
396
- for (let i = 0; i < this.planoption.length; i++) {
397
- if (this.planoption[i]["selected"] == true) {
398
- this.planid = this.planoption[i].value
399
- break
400
- }
401
- }
402
- if (this.planid == '') {
403
- this.$showMessage("请选择计划")
404
- return false
405
- }
406
- await this.okput()
407
- },
408
- async manyisok() {
409
- if (this.planoption.length == 0) {
410
- this.$showMessage("请选择计划")
411
- return false
412
- }
413
- for (let i = 0; i < this.planoption.length; i++) {
414
- if (this.planoption[i]["selected"] == true) {
415
- this.planid = this.planoption[i].value
416
- break
417
- }
418
- }
419
- if (this.planid == '') {
420
- this.$showMessage("请选择计划")
421
- return false
422
- }
423
- await this.manyokput()
424
- },
425
- changenull() {
426
- this.showModal2 = false
427
- this.showModal3 = false
428
- this.planoption = []
429
- this.plan = ''
430
- this.check = ''
431
- },
432
- async okput() {
433
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {
434
- data: {
435
- condition: `i.id='` + this.needid + `'`,
436
- f_plan_id: this.planid,
437
- switchCheckAll: false,
438
- checkAll: false,
439
- f_operator: Vue.user.name
440
- }
441
- })
442
- this.$showMessage("上传成功,请等待审核")
443
- await this.changenull()
444
- await this.getNewOrder()
445
- },
446
- async manyokput() {
447
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {
448
- data: {
449
- columnName: "i.id",
450
- condition: "1=1",
451
- f_plan_id: this.planid,
452
- switchCheckAll: true,
453
- param: this.planparam,
454
- checkAll: false,
455
- f_operator: Vue.user.name
456
- }
457
- })
458
- await this.changenull()
459
- await this.getNewOrder()
460
- },
461
- async plansearch() {
462
- this.planoption = []
463
- let condition = ` f_plan_year=${new Date().getFullYear()}`
464
- if (this.check) {
465
- condition += ` and f_checker_id= '${this.check}'`
466
- }
467
- if (this.plan) {
468
- condition += ` and f_plan_name like '%${this.plan}%'`
469
- }
470
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {
471
- data: {
472
- condition: condition,
473
- f_filialeids: this.f_filialeids,
474
- groupitem: '',
475
- orderitem: 'id'
476
- }
477
- })
478
- let resoult = res.data
479
- for (let i = 0; i < resoult.length; i++) {
480
- this.planoption.push({ label: resoult[i].f_plan_name, selected: false, value: resoult[i].id })
481
- }
482
- },
483
-
484
- select(row, idx) {
485
- this.$set('planoption[' + idx + '].selected', true)
486
- for (let i = 0; i < this.planoption.length; i++) {
487
- if (i != idx) {
488
- this.planoption[i]["selected"] = false
489
- }
490
- }
491
- },
492
- planclose() {
493
- this.showModal2 = false
494
- this.showModal3 = false
495
- },
496
- queryplan(val) {
497
- this.needid = val
498
- this.showModal2 = true
499
- },
500
- queryplanmany() {
501
-
502
- this.showModal3 = true
503
- },
504
- reload() {
505
- this.selfSearch()
506
- },
507
- cancelReserve(idx, id) {
508
- if (Vue.android) {
509
- let res = this.$androidUtil.bzLogic('BookingCheck', { dt: '', id: id })
510
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
511
- if (res.code == 200) {
512
- this.$showMessage("取消预约成功")
513
- }
514
- } else {
515
- this.$androidUtil.bzLogic('PCbookingCheck', { dt: '', id: id }).then((repanse) => {
516
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
517
- if (repanse.data.code == 200) {
518
- alert("取消预约成功!")
519
- }
520
- })
521
- }
522
- },
523
- genuineReserve() {
524
- if (Vue.android) {
525
- if (!this.f_preset_dt) {
526
- this.$showMessage('请选择一个日期')
527
- return
528
- }
529
- let pdt = this.f_preset_dt.replace('T', ' ')
530
- let respanse = this.$androidUtil.bzLogic('BookingCheck', { id: this.model.rows[this.param].id, dt: pdt })
531
- this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
532
- if (respanse.code == 200) {
533
- this.$showMessage("预约成功!")
534
- }
535
- this.showModal = false
536
- } else {
537
- if (!this.f_preset_dt) {
538
- alert('请选择一个日期')
539
- return
540
- }
541
- let pdt = this.f_preset_dt.replace('T', ' ')
542
- this.$androidUtil.bzLogic('PCbookingCheck', { id: this.model.rows[this.param].id, dt: pdt }).then((res) => {
543
- this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
544
- if (res.data.code == 200) {
545
- alert("预约成功!")
546
- }
547
- this.showModal = false
548
- })
549
- }
550
- },
551
- inspect(row) {
552
- var _this = this
553
- let http = new HttpResetClass()
554
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
555
- data: {
556
- items: 'id',
557
- tablename: 't_check_plan_item',
558
- condition: `id = '${row.id}'`,
559
- orderitem: ' id '
560
- }
561
- }, { resolveMsg: null, rejectMsg: null }).then((getcheckplan) => {
562
- console.log('getcheckplan=', JSON.stringify(getcheckplan))
563
- this.getcheckplandata = getcheckplan.data[0]
564
- if (this.getcheckplandata) {
565
- if (row.f_upload_state == '未传' || (row.f_upload_state == '已传' && row.f_state == '未检' && row.f_no_checkplan != '无计划安检')) {
566
- _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`, { data: { f_userid: row.f_userinfoid } }, { resolveMsg: null, rejectMsg: null }).then((response) => {
567
- row['f_plan_meters'] = response.data
568
- var pardate = {
569
- _this: _this,
570
- title: '安全检查',
571
- safe: true
572
- }
573
- _this.$dispatch('gotoson', pardate)
574
- _this.$goto('safecheck-order-v', { f_plan_id: row.f_plan_id, item: row, role: 'inspect', parentPage: 'CurrentCreate' }, 'self', _this.reload)
575
- }).catch((msg) => {
576
- this.$showMessage("网络异常,请检查网络后再试!")
577
- })
578
- } else {
579
- this.$showMessage("该安检单已被上传!")
580
- }
581
- } else {
582
- this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
583
- }
584
- })
585
- },
586
- makeAPhoneCall(phoneNumber) {
587
- this.$androidUtil.makeAPhoneCall(phoneNumber)
588
- },
589
- reserve(idx) {
590
- this.param = idx
591
- this.showModal = true
592
- },
593
- search(args) {
594
- this.model.rows = []
595
- this.model.search(args.condition, args.model)
596
- },
597
- selfSearch() {
598
- let condition = ""
599
- if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length > 0) {
600
- condition += " and ti.f_residential_area = '" + this.$refs.paged.$refs.cri.model.f_residential_area[0] + "'"
601
- } else if (this.$refs.paged.$refs.cri.model.f_residential_area instanceof String && this.$refs.paged.$refs.cri.model.f_residential_area) {
602
- condition += " and ti.f_residential_area = '" + this.$refs.paged.$refs.cri.model.f_residential_area + "'"
603
- }
604
- if (this.$refs.paged.$refs.cri.model.f_building)
605
- condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
606
- if (this.$refs.paged.$refs.cri.model.f_unit)
607
- condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
608
- if (this.planName) {
609
- condition += " and f_plan_name like '%" + this.planName + "%'"
610
- } else {
611
- if (this.$refs.paged.$refs.cri.model.f_plan_name)
612
- condition += " and f_plan_name like '%" + this.$refs.paged.$refs.cri.model.f_plan_name + "%'"
613
- }
614
- condition += " and ti.f_userinfo_code like '%" + this.$refs.paged.$refs.cri.model.f_userinfo_code + "%'"
615
- if (this.$refs.paged.$refs.cri.model.f_keyword)
616
- condition += " and ti.f_address like '%" + this.$refs.paged.$refs.cri.model.f_keyword + "%'"
617
- if (this.$refs.paged.$refs.cri.model.f_user_name)
618
- condition += " and ti.f_user_name like '%" + this.$refs.paged.$refs.cri.model.f_user_name + "%'"
619
- if (this.$refs.paged.$refs.cri.model.f_state[0])
620
- condition += " and ti.f_state='" + this.$refs.paged.$refs.cri.model.f_state[0] + "'"
621
- if (this.$refs.paged.$refs.cri.model.f_user_type[0])
622
- condition += " and ti.f_user_type='" + this.$refs.paged.$refs.cri.model.f_user_type[0] + "'"
623
- if (this.$refs.paged.$refs.cri.model.f_meter_no)
624
- condition += " and tm.f_meter_no like '%" + this.$refs.paged.$refs.cri.model.f_meter_no + "%'"
625
- if (this.$refs.paged.$refs.cri.model.f_user_phone) {
626
- condition += `and ti.f_user_phone like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%'`
627
- }
628
- if (this.$refs.paged.$refs.cri.model.f_enter_number)
629
- condition += " and ti.f_enter_number like '%" + this.$refs.paged.$refs.cri.model.f_enter_number + "%'"
630
- if (this.$refs.paged.$refs.cri.model.f_check_version)
631
- condition += " and ti.f_check_version <= " + this.$refs.paged.$refs.cri.model.f_check_version
632
- condition += ` and ti.f_plan_id = '${this.row.f_plan_id}' and ti.f_residential_area = '${this.row.f_residential_area}' and ti.f_building = '${this.row.f_building}'`
633
- this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成') or (f_state = '未检')) and ti.f_no_checkplan = '有计划安检'" + condition)
634
- },
635
- getNewOrder() {
636
- HostApp.__this__ = this
637
- HostApp.logicWithHint({
638
- 'logic': 'SafeCheckServiceTimeOut',
639
- 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
640
- 'data': { params: '' },
641
- 'backresult': 1
642
- })
643
- HostApp.logicWithHint({
644
- 'logic': 'FreshPlanItem',
645
- 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
646
- 'data': { params: '' },
647
- 'backresult': 1
648
- })
649
- },
650
- getNewOrderCallBack() {
651
- this.selfSearch()
652
- },
653
- hidden() {
654
- this.criteriaShow = !this.criteriaShow
655
- },
656
- setPlanParam(detailsType, event) {
657
- if (event.srcElement.checked) {
658
- this.planparam.push(detailsType)
659
- } else {
660
- if (this.planparam.length > 0) {
661
- let planid = this.planparam.findIndex((value) => {
662
- return value === detailsType
663
- })
664
- this.planparam.splice(planid, 1)
665
-
666
- }
667
-
668
- }
669
- }
670
- }
671
- }
672
- </script>
1
+ <style scoped>
2
+ .app-row {
3
+ background-color: white;
4
+ padding: 10px 10px 0 10px;
5
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
6
+ }
7
+
8
+ .search_input {
9
+ border: 0;
10
+ outline: none;
11
+ }
12
+
13
+ .font {
14
+ font: 15px PingFang-SC-Medium;
15
+ color: #666666;
16
+ }
17
+
18
+ .input-font {
19
+ font: 15px PingFang-SC-Medium;
20
+ color: #333333;
21
+ }
22
+
23
+ .btn-font {
24
+ font: 600 16px PingFang-SC-Bold;
25
+ color: #499EDF;
26
+ }
27
+
28
+ .btn-color {
29
+ background-color: #FFFFFF;
30
+ border-radius: 10px;
31
+ border: 1px solid #499EDF;
32
+ }
33
+
34
+ .app-text {
35
+ font-size: 12px;
36
+ }
37
+
38
+ .panel-self {
39
+ border-radius: 10px;
40
+ border: 1px solid #499EDF;
41
+ background-color: #F8F8F8;
42
+ }
43
+
44
+ .button_shrink_top {
45
+ width: 35px;
46
+ height: 35px;
47
+ background-size: 100%;
48
+ background-image: url("../../../static/newStyle/stretch_top.png")
49
+ }
50
+
51
+ .button_shrink_bottom {
52
+ width: 35px;
53
+ height: 35px;
54
+ background-size: 100%;
55
+ background-image: url("../../../static/newStyle/stretch_bottom.png")
56
+ }
57
+ </style>
58
+ <template>
59
+ <div style="height: auto;width: 100%">
60
+ <criteria-paged :model="model" v-ref:paged>
61
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri>
62
+ <div partial>
63
+ <form>
64
+ <div class="row app-row">
65
+ <div class="col-xs-4">
66
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
67
+ <label for="f_userinfo_code" class="font text-left">用户编号:</label>
68
+ </div>
69
+ <div class="col-xs-8">
70
+ <input id="f_userinfo_code" class="search_input input-font"
71
+ v-model=model.f_userinfo_code condition="f_userinfo_code like '%{}%'" />
72
+ </div>
73
+ </div>
74
+ <div class="row app-row">
75
+ <div class="col-xs-4">
76
+ <img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
77
+ <label class="font text-left">用户姓名:</label>
78
+ </div>
79
+ <div class="col-xs-8">
80
+ <input class="search_input input-font" v-model=model.f_user_name
81
+ condition="f_user_name like '%{}%'" />
82
+ </div>
83
+ </div>
84
+
85
+ <div class="row app-row">
86
+ <div class="col-xs-4">
87
+ <img src="../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
88
+ <label class="font text-left">用户证号:</label>
89
+ </div>
90
+ <div class="col-xs-8">
91
+ <input class="search_input input-font" v-model=model.f_enter_number
92
+ condition="f_enter_number like '%{}%'" />
93
+ </div>
94
+ </div>
95
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
96
+ <div class="col-xs-4">
97
+ <img src="../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
98
+ <label for="f_state" class="font text-left">是否已检:</label>
99
+ </div>
100
+ <v-select id="f_state" :value.sync="model.f_state" class="input-font"
101
+ :options='$parent.$parent.check_states' placeholder='是否已检' :width="'60%'"
102
+ v-model="model.f_state" condition="f_state='{}'" close-on-select clear-button>
103
+ </v-select>
104
+ </div>
105
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
106
+ <div class="col-xs-4">
107
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
108
+ <label class="font text-left">表&emsp;&emsp;号:</label>
109
+ </div>
110
+ <div class="col-xs-5">
111
+ <input class="search_input input-font" v-model=model.f_meter_no
112
+ condition="f_meter_no like '%{}%'" />
113
+ </div>
114
+ <div class="col-xs-3">
115
+ <button type="button" class="btn btn-lg btn-font btn-color"
116
+ @click="$parent.$parent.scan()">扫码</button>
117
+ </div>
118
+ </div>
119
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
120
+ <div class="col-xs-4">
121
+ <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
122
+ <label class="font text-left">客户电话:</label>
123
+ </div>
124
+ <div class="col-xs-8">
125
+ <input class="search_input input-font" v-model=model.f_user_phone
126
+ condition="f_user_phone like '%{}%'" />
127
+ </div>
128
+ </div>
129
+
130
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
131
+ <div class="col-xs-4">
132
+ <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
133
+ <label class="font text-left">用户地址:</label>
134
+ </div>
135
+ <div class="col-xs-8">
136
+ <input class="search_input input-font" v-model=model.f_keyword
137
+ condition="f_address like '%{}%'" />
138
+ </div>
139
+ </div>
140
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
141
+ <div class="col-xs-4">
142
+ <img src="../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
143
+ <label for="f_user_type" class="font text-left">用户类型:</label>
144
+ </div>
145
+ <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font" :width="'60%'"
146
+ :options='$parent.$parent.user_types' placeholder='请选择用户类型' v-model="model.f_user_type"
147
+ condition="f_user_type='{}'" close-on-select clear-button></v-select>
148
+ </div>
149
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
150
+ <div class="col-xs-6">
151
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
152
+ <label class="font text-left">到访不遇:</label>
153
+ </div>
154
+ <div class="col-xs-8">
155
+ <input class="search_input input-font" type="number" v-model=model.f_check_version
156
+ condition="f_check_version <= '{}'" />
157
+ </div>
158
+ </div>
159
+ <div class="row text-center" style="margin-top: 20px;">
160
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;"
161
+ @click="$parent.$parent.selfSearch">查询</button>
162
+ <div style="float: right;margin-right: 3% " class="button_spacing"
163
+ :class="{ 'button_shrink_top': $parent.$parent.criteriaShow, 'button_shrink_bottom': !$parent.$parent.criteriaShow }"
164
+ @click="$parent.$parent.hidden()"></div>
165
+ <img v-if="!$parent.$parent.planName" style="float: right;margin-right: 3% "
166
+ @click="$parent.$parent.getNewOrder" src="../../assets/shuaxindaiban1.png"
167
+ style="width: 40px;padding: 5px; float:right">
168
+ </div>
169
+ <div class="col-sm-12">
170
+
171
+ </div>
172
+ <div style="height:30px;"></div>
173
+ </form>
174
+ </div>
175
+ </criteria>
176
+ <list :model="model" partial='list'>
177
+ <div partial>
178
+ <div class="auto app-text" style="margin-top: 5px;">
179
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
180
+ <div class="panel-body panel-self">
181
+ <div class="col-xs-12">
182
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left">
183
+ <b>用户编号:</b></p>
184
+ <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{
185
+ row.f_userinfo_code }}</p>
186
+ <p class="panel-title col-xs-2 text-left input-font" style="width: 5%;float:right">
187
+ <input type="checkbox"
188
+ @click="$parent.$parent.$parent.setPlanParam(row.id, $event)" />
189
+ </p>
190
+ </div>
191
+ <div class="col-xs-12">
192
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left">
193
+ <b>用户名称:</b></p>
194
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{
195
+ row.f_user_name }}</p>
196
+ </div>
197
+ <div class="col-xs-6">
198
+ <p class="panel-title col-xs-5 text-left font"><b>用户类型:</b></p>
199
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_user_type }}
200
+ </p>
201
+ </div>
202
+ <div class="col-xs-6">
203
+ <p class="panel-title col-xs-5 text-left font"><b>计划名称:</b></p>
204
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_plan_name }}</p>
205
+ </div>
206
+ <div class="col-xs-12">
207
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b>
208
+ </p>
209
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone
210
+ }}
211
+ <img src="../../assets/phone.png" style="width: 6%"
212
+ v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_user_phone)' />
213
+ </p>
214
+ </div>
215
+ <div class="col-xs-12">
216
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>备用电话:</b>
217
+ </p>
218
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_rent_phone }}
219
+ <img v-if="row.f_rent_phone" src="../../assets/phone.png" style="width: 6%"
220
+ v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_rent_phone)' />
221
+ </p>
222
+ </div>
223
+ <div class="col-xs-12">
224
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>租户电话:</b>
225
+ </p>
226
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_zuhu_phone
227
+ }}
228
+ <img v-if="row.f_zuhu_phone" src="../../assets/phone.png" style="width: 6%"
229
+ v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_zuhu_phone)' />
230
+ </p>
231
+ </div>
232
+ <div class="col-xs-12">
233
+ <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b>
234
+ </p>
235
+ <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}
236
+ </p>
237
+ </div>
238
+ <div class="col-xs-6">
239
+ <p class="panel-title col-xs-5 text-left font"><b>安检状态:</b></p>
240
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_state ==
241
+ '已检'?'临时保存':row.f_state }}</p>
242
+ </div>
243
+ <div class="col-xs-6">
244
+ <p class="panel-title col-xs-5 text-left font"><b>上传状态:</b></p>
245
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_upload_state }}</p>
246
+ </div>
247
+ <div class="col-xs-12" v-if="row.f_prearranged_date != null">
248
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left">
249
+ <b>预约时间:</b></p>
250
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{
251
+ row.f_prearranged_date }}</p>
252
+ </div>
253
+ <div class="col-xs-6">
254
+ <p class="panel-title col-xs-5 text-left font"><b>安检类型:</b></p>
255
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_safecheck_type }}</p>
256
+ </div>
257
+ <div class="col-xs-12">
258
+ <p class="panel-title col-xs-5 text-left font"><b>到访不遇次数:</b></p>
259
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_check_version }}</p>
260
+ </div>
261
+ <div class="col-xs-12">
262
+ <button type="button" name="button" class="btn btn-primary"
263
+ style="background-color:#499edf;float: right"
264
+ @click="$parent.$parent.$parent.inspect(row)">处理</button>
265
+ </div>
266
+ </div>
267
+ </div>
268
+ </div>
269
+ </div>
270
+ </list>
271
+ </criteria-paged>
272
+ </div>
273
+ </template>
274
+
275
+ <script>
276
+ import LocalPagedList from '../../plugins/LocalPagedList'
277
+ import Vue from 'vue'
278
+ import { PagedList, HttpResetClass } from 'vue-client'
279
+ import * as Util from '../Util'
280
+ import co from 'co'
281
+ let select = function* (self) {
282
+ let http = new HttpResetClass()
283
+ http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
284
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
285
+ userid: Vue.user.id
286
+ }, { resolveMsg: null, rejectMsg: null }).then((res) => {
287
+ self.checkers.push({ label: '全部', value: '' })
288
+ res.data.forEach((checker) => {
289
+ self.checkers.push({ label: checker.name, value: checker.id })
290
+ })
291
+ })
292
+ }
293
+ export default {
294
+ title: 'userinfo-select',
295
+ props: ['row'],
296
+ data() {
297
+ return {
298
+ f_filialeids: '(' + Vue.user.orgid + ')',
299
+ planparam: [],
300
+ check: '',
301
+ plan: '',
302
+ planid: '',
303
+ model: Vue.android ? new LocalPagedList('androidGetuserinfo', 20, { condition: 'this.condition' }) : new PagedList('AndroidRest/rs/sql/androidGetuserinfo', 20, { condition: 'this.condition' }),
304
+ showModal: false,
305
+ showModal2: false,
306
+ showModal3: false,
307
+ needid: '',
308
+ criteriaShow: false,
309
+ planoption: [],
310
+ condition: '',
311
+ checkers: [],
312
+ param: null,
313
+ f_preset_dt: Util.to3339TimeString(),
314
+ flow_direction: [
315
+ { label: '请选择挂表方式', value: '' },
316
+ { label: '左表', value: '左表' },
317
+ { label: '右表', value: '右表' }
318
+ ],
319
+ check_states: [
320
+ { label: '请选择安检状态', value: '' },
321
+ { label: '未检', value: '未检' },
322
+ { label: '临时保存', value: '已检' },
323
+ ],
324
+ last_check_states: [
325
+ { label: '请选择上次安检状态', value: '' },
326
+ { label: '入户', value: '入户' },
327
+ { label: '拒检', value: '拒检' },
328
+ { label: '到访不遇', value: '到访不遇' },
329
+ { label: '未使用天然气', value: '未使用天然气' }
330
+ ],
331
+ upload_states: [
332
+ { label: '请选择上传状态', value: '' },
333
+ { label: '未传', value: '未传' },
334
+ { label: '已传', value: '已传' }
335
+ ],
336
+ user_types: [
337
+ { label: '请选择用户类型', value: '' },
338
+ { label: '民用', value: '民用' },
339
+ { label: '非民用', value: '非民用' },
340
+ ],
341
+ verify_state: [
342
+ { label: '请选择审核状态', value: '' },
343
+ { label: '未审核', value: '未审核' },
344
+ { label: '打回', value: '打回' }
345
+ ],
346
+ residentialAreaOptions: [],
347
+ buildOptions: [],
348
+ unitOptions: [],
349
+ planNameOptions: [],
350
+ upcomingCount: 0,
351
+ doneCount: 0,
352
+ tempSaveCount: 0,
353
+ allPlanCount: 0
354
+ }
355
+ },
356
+ ready() {
357
+ this.selfSearch()
358
+ let gen = select(this)
359
+ co(gen)
360
+ },
361
+ mounted() {
362
+ if (window.history && window.history.pushState) {
363
+ history.pushState(null, null, document.URL);
364
+ window.addEventListener('popstate', this.fun, false)
365
+ }
366
+ },
367
+ destroyed() {
368
+ window.removeEventListener('popstate', this.fun, false)
369
+ },
370
+ methods: {
371
+ scan() {
372
+ HostApp.__this__ = this,
373
+ HostApp.scanCode({ callback: "javascript:HostApp.__this__.getCode();" })
374
+ },
375
+ getCode() {
376
+ const datapa = HostApp.getCode().data;
377
+ this.$refs.paged.$refs.cri.model.f_meter_no = datapa
378
+
379
+ },
380
+ fun() {
381
+
382
+ },
383
+ iscancel() {
384
+ this.showModal2 = false
385
+ this.showModal3 = false
386
+ this.planoption = []
387
+ },
388
+ timeSet(val) {
389
+ return val
390
+ },
391
+ async isok() {
392
+ if (this.planoption.length == 0) {
393
+ this.$showMessage("请选择计划")
394
+ return false
395
+ }
396
+ for (let i = 0; i < this.planoption.length; i++) {
397
+ if (this.planoption[i]["selected"] == true) {
398
+ this.planid = this.planoption[i].value
399
+ break
400
+ }
401
+ }
402
+ if (this.planid == '') {
403
+ this.$showMessage("请选择计划")
404
+ return false
405
+ }
406
+ await this.okput()
407
+ },
408
+ async manyisok() {
409
+ if (this.planoption.length == 0) {
410
+ this.$showMessage("请选择计划")
411
+ return false
412
+ }
413
+ for (let i = 0; i < this.planoption.length; i++) {
414
+ if (this.planoption[i]["selected"] == true) {
415
+ this.planid = this.planoption[i].value
416
+ break
417
+ }
418
+ }
419
+ if (this.planid == '') {
420
+ this.$showMessage("请选择计划")
421
+ return false
422
+ }
423
+ await this.manyokput()
424
+ },
425
+ changenull() {
426
+ this.showModal2 = false
427
+ this.showModal3 = false
428
+ this.planoption = []
429
+ this.plan = ''
430
+ this.check = ''
431
+ },
432
+ async okput() {
433
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {
434
+ data: {
435
+ condition: `i.id='` + this.needid + `'`,
436
+ f_plan_id: this.planid,
437
+ switchCheckAll: false,
438
+ checkAll: false,
439
+ f_operator: Vue.user.name
440
+ }
441
+ })
442
+ this.$showMessage("上传成功,请等待审核")
443
+ await this.changenull()
444
+ await this.getNewOrder()
445
+ },
446
+ async manyokput() {
447
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {
448
+ data: {
449
+ columnName: "i.id",
450
+ condition: "1=1",
451
+ f_plan_id: this.planid,
452
+ switchCheckAll: true,
453
+ param: this.planparam,
454
+ checkAll: false,
455
+ f_operator: Vue.user.name
456
+ }
457
+ })
458
+ await this.changenull()
459
+ await this.getNewOrder()
460
+ },
461
+ async plansearch() {
462
+ this.planoption = []
463
+ let condition = ` f_plan_year=${new Date().getFullYear()}`
464
+ if (this.check) {
465
+ condition += ` and f_checker_id= '${this.check}'`
466
+ }
467
+ if (this.plan) {
468
+ condition += ` and f_plan_name like '%${this.plan}%'`
469
+ }
470
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {
471
+ data: {
472
+ condition: condition,
473
+ f_filialeids: this.f_filialeids,
474
+ groupitem: '',
475
+ orderitem: 'id'
476
+ }
477
+ })
478
+ let resoult = res.data
479
+ for (let i = 0; i < resoult.length; i++) {
480
+ this.planoption.push({ label: resoult[i].f_plan_name, selected: false, value: resoult[i].id })
481
+ }
482
+ },
483
+
484
+ select(row, idx) {
485
+ this.$set('planoption[' + idx + '].selected', true)
486
+ for (let i = 0; i < this.planoption.length; i++) {
487
+ if (i != idx) {
488
+ this.planoption[i]["selected"] = false
489
+ }
490
+ }
491
+ },
492
+ planclose() {
493
+ this.showModal2 = false
494
+ this.showModal3 = false
495
+ },
496
+ queryplan(val) {
497
+ this.needid = val
498
+ this.showModal2 = true
499
+ },
500
+ queryplanmany() {
501
+
502
+ this.showModal3 = true
503
+ },
504
+ reload() {
505
+ this.selfSearch()
506
+ },
507
+ cancelReserve(idx, id) {
508
+ if (Vue.android) {
509
+ let res = this.$androidUtil.bzLogic('BookingCheck', { dt: '', id: id })
510
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
511
+ if (res.code == 200) {
512
+ this.$showMessage("取消预约成功")
513
+ }
514
+ } else {
515
+ this.$androidUtil.bzLogic('PCbookingCheck', { dt: '', id: id }).then((repanse) => {
516
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
517
+ if (repanse.data.code == 200) {
518
+ alert("取消预约成功!")
519
+ }
520
+ })
521
+ }
522
+ },
523
+ genuineReserve() {
524
+ if (Vue.android) {
525
+ if (!this.f_preset_dt) {
526
+ this.$showMessage('请选择一个日期')
527
+ return
528
+ }
529
+ let pdt = this.f_preset_dt.replace('T', ' ')
530
+ let respanse = this.$androidUtil.bzLogic('BookingCheck', { id: this.model.rows[this.param].id, dt: pdt })
531
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
532
+ if (respanse.code == 200) {
533
+ this.$showMessage("预约成功!")
534
+ }
535
+ this.showModal = false
536
+ } else {
537
+ if (!this.f_preset_dt) {
538
+ alert('请选择一个日期')
539
+ return
540
+ }
541
+ let pdt = this.f_preset_dt.replace('T', ' ')
542
+ this.$androidUtil.bzLogic('PCbookingCheck', { id: this.model.rows[this.param].id, dt: pdt }).then((res) => {
543
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
544
+ if (res.data.code == 200) {
545
+ alert("预约成功!")
546
+ }
547
+ this.showModal = false
548
+ })
549
+ }
550
+ },
551
+ inspect(row) {
552
+ var _this = this
553
+ let http = new HttpResetClass()
554
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
555
+ data: {
556
+ items: 'id',
557
+ tablename: 't_check_plan_item',
558
+ condition: `id = '${row.id}'`,
559
+ orderitem: ' id '
560
+ }
561
+ }, { resolveMsg: null, rejectMsg: null }).then((getcheckplan) => {
562
+ console.log('getcheckplan=', JSON.stringify(getcheckplan))
563
+ this.getcheckplandata = getcheckplan.data[0]
564
+ if (this.getcheckplandata) {
565
+ if (row.f_upload_state == '未传' || (row.f_upload_state == '已传' && row.f_state == '未检' && row.f_no_checkplan != '无计划安检')) {
566
+ _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`, { data: { f_userid: row.f_userinfoid } }, { resolveMsg: null, rejectMsg: null }).then((response) => {
567
+ row['f_plan_meters'] = response.data
568
+ var pardate = {
569
+ _this: _this,
570
+ title: '安全检查',
571
+ safe: true
572
+ }
573
+ _this.$dispatch('gotoson', pardate)
574
+ _this.$goto('safecheck-order-v', { f_plan_id: row.f_plan_id, item: row, role: 'inspect', parentPage: 'CurrentCreate' }, 'self', _this.reload)
575
+ }).catch((msg) => {
576
+ this.$showMessage("网络异常,请检查网络后再试!")
577
+ })
578
+ } else {
579
+ this.$showMessage("该安检单已被上传!")
580
+ }
581
+ } else {
582
+ this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
583
+ }
584
+ })
585
+ },
586
+ makeAPhoneCall(phoneNumber) {
587
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
588
+ },
589
+ reserve(idx) {
590
+ this.param = idx
591
+ this.showModal = true
592
+ },
593
+ search(args) {
594
+ this.model.rows = []
595
+ this.model.search(args.condition, args.model)
596
+ },
597
+ selfSearch() {
598
+ let condition = ""
599
+ if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length > 0) {
600
+ condition += " and ti.f_residential_area = '" + this.$refs.paged.$refs.cri.model.f_residential_area[0] + "'"
601
+ } else if (this.$refs.paged.$refs.cri.model.f_residential_area instanceof String && this.$refs.paged.$refs.cri.model.f_residential_area) {
602
+ condition += " and ti.f_residential_area = '" + this.$refs.paged.$refs.cri.model.f_residential_area + "'"
603
+ }
604
+ if (this.$refs.paged.$refs.cri.model.f_building)
605
+ condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
606
+ if (this.$refs.paged.$refs.cri.model.f_unit)
607
+ condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
608
+ if (this.planName) {
609
+ condition += " and f_plan_name like '%" + this.planName + "%'"
610
+ } else {
611
+ if (this.$refs.paged.$refs.cri.model.f_plan_name)
612
+ condition += " and f_plan_name like '%" + this.$refs.paged.$refs.cri.model.f_plan_name + "%'"
613
+ }
614
+ condition += " and ti.f_userinfo_code like '%" + this.$refs.paged.$refs.cri.model.f_userinfo_code + "%'"
615
+ if (this.$refs.paged.$refs.cri.model.f_keyword)
616
+ condition += " and ti.f_address like '%" + this.$refs.paged.$refs.cri.model.f_keyword + "%'"
617
+ if (this.$refs.paged.$refs.cri.model.f_user_name)
618
+ condition += " and ti.f_user_name like '%" + this.$refs.paged.$refs.cri.model.f_user_name + "%'"
619
+ if (this.$refs.paged.$refs.cri.model.f_state[0])
620
+ condition += " and ti.f_state='" + this.$refs.paged.$refs.cri.model.f_state[0] + "'"
621
+ if (this.$refs.paged.$refs.cri.model.f_user_type[0])
622
+ condition += " and ti.f_user_type='" + this.$refs.paged.$refs.cri.model.f_user_type[0] + "'"
623
+ if (this.$refs.paged.$refs.cri.model.f_meter_no)
624
+ condition += " and tm.f_meter_no like '%" + this.$refs.paged.$refs.cri.model.f_meter_no + "%'"
625
+ if (this.$refs.paged.$refs.cri.model.f_user_phone) {
626
+ condition += `and ti.f_user_phone like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%'`
627
+ }
628
+ if (this.$refs.paged.$refs.cri.model.f_enter_number)
629
+ condition += " and ti.f_enter_number like '%" + this.$refs.paged.$refs.cri.model.f_enter_number + "%'"
630
+ if (this.$refs.paged.$refs.cri.model.f_check_version)
631
+ condition += " and ti.f_check_version <= " + this.$refs.paged.$refs.cri.model.f_check_version
632
+ condition += ` and ti.f_plan_id = '${this.row.f_plan_id}' and ti.f_residential_area = '${this.row.f_residential_area}' and ti.f_building = '${this.row.f_building}'`
633
+ this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成') or (f_state = '未检')) and ti.f_no_checkplan = '有计划安检'" + condition)
634
+ },
635
+ getNewOrder() {
636
+ HostApp.__this__ = this
637
+ HostApp.logicWithHint({
638
+ 'logic': 'SafeCheckServiceTimeOut',
639
+ 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
640
+ 'data': { params: '' },
641
+ 'backresult': 1
642
+ })
643
+ HostApp.logicWithHint({
644
+ 'logic': 'FreshPlanItem',
645
+ 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
646
+ 'data': { params: '' },
647
+ 'backresult': 1
648
+ })
649
+ },
650
+ getNewOrderCallBack() {
651
+ this.selfSearch()
652
+ },
653
+ hidden() {
654
+ this.criteriaShow = !this.criteriaShow
655
+ },
656
+ setPlanParam(detailsType, event) {
657
+ if (event.srcElement.checked) {
658
+ this.planparam.push(detailsType)
659
+ } else {
660
+ if (this.planparam.length > 0) {
661
+ let planid = this.planparam.findIndex((value) => {
662
+ return value === detailsType
663
+ })
664
+ this.planparam.splice(planid, 1)
665
+
666
+ }
667
+
668
+ }
669
+ }
670
+ }
671
+ }
672
+ </script>