safecheck-client 3.0.33-159 → 3.0.33-160

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.
@@ -1,1055 +1,1055 @@
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
-
95
- <template>
96
- <div style="height: auto;width: 100%">
97
- <criteria-paged :model="model" v-ref:paged>
98
- <criteria partial='criteria' @condition-changed='search' v-ref:cri>
99
- <div partial>
100
- <form>
101
- <div class="row app-row">
102
- <!--小区名称-->
103
- <v-select :value.sync="model.f_residential_area"
104
- class="input-font"
105
- :options='$parent.$parent.residentialAreaOptions'
106
- placeholder='小区名称'
107
- :width="'32.5%'"
108
- v-model="model.f_residential_area"
109
- condition="ti.f_residential_area = '{}'"
110
- @change="$parent.$parent.getbuilds"
111
- close-on-select clear-button>
112
- </v-select>
113
- <!--楼栋-->
114
- <v-select :value.sync="model.f_building"
115
- class="input-font"
116
- :options='$parent.$parent.buildOptions'
117
- placeholder='楼栋'
118
- :width="'32.5%'"
119
- v-model="model.f_building"
120
- condition="ti.f_building = '{}'"
121
- @change="$parent.$parent.getUnits"
122
- close-on-select clear-button>
123
- </v-select>
124
- <!--单元-->
125
- <v-select :value.sync="model.f_unit"
126
- class="input-font"
127
- :options='$parent.$parent.unitOptions'
128
- placeholder='单元'
129
- :width="'32.5%'"
130
- v-model="model.f_unit"
131
- condition="ti.f_unit = '{}'"
132
- close-on-select clear-button>
133
- </v-select>
134
- </div>
135
- <div class="row app-row">
136
- <div class="col-xs-4">
137
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
138
- <label for="f_userinfo_code" class="font text-left">用户编号:</label>
139
- </div>
140
- <div class="col-xs-8">
141
- <input id="f_userinfo_code" class="search_input input-font"
142
- v-model=model.f_userinfo_code condition="f_userinfo_code like '%{}%'"/>
143
- </div>
144
- </div>
145
- <div class="row app-row">
146
- <div class="col-xs-4">
147
- <img src="../../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
148
- <label class="font text-left">用户姓名:</label>
149
- </div>
150
- <div class="col-xs-8">
151
- <input class="search_input input-font" v-model=model.f_user_name condition="f_user_name like '%{}%'"/>
152
- </div>
153
- </div>
154
-
155
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
156
- <div class="col-xs-4">
157
- <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
158
- <label for="f_plan_name" class="font text-left">计划名称:</label>
159
- </div>
160
- <v-select
161
- id="f_plan_name"
162
- :value.sync="model.f_plan_name"
163
- class="input-font"
164
- :options='$parent.$parent.planNameOptions'
165
- placeholder='计划名称'
166
- :width="'60%'"
167
- v-model="model.f_plan_name"
168
- condition="f_plan_name like '%{}%'"
169
- close-on-select clear-button>
170
- </v-select>
171
- </div>
172
-
173
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
174
- <div class="col-xs-4">
175
- <img src="../../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
176
- <label for="f_state" class="font text-left">是否已检:</label>
177
- </div>
178
- <v-select id="f_state"
179
- :value.sync="model.f_state"
180
- class="input-font"
181
- :options='$parent.$parent.check_states'
182
- placeholder='是否已检'
183
- :width="'60%'"
184
- v-model="model.f_state"
185
- condition="f_state='{}'"
186
- close-on-select clear-button>
187
- </v-select>
188
- </div>
189
-
190
-
191
- <!--<div class="row app-row">-->
192
- <!--<div class="col-xs-4">-->
193
- <!--<img src="../../assets/shijian.png" style="width: 20px;margin-bottom: 5px" alt="">-->
194
- <!--<label for="f_plan_year" class="font text-left">计划年份:</label>-->
195
- <!--</div>-->
196
- <!--<div class="col-xs-8" >-->
197
- <!--<input id="f_plan_year" class="search_input input-font"-->
198
- <!--v-model="model.f_plan_year" condition="f_plan_year = '{}'" />-->
199
- <!--</div>-->
200
- <!--</div>-->
201
- <!--<div class="row app-row">-->
202
- <!--<div class="col-xs-4">-->
203
- <!--<img src="../../assets/shijian.png" style="width: 20px;margin-bottom: 5px" alt="">-->
204
- <!--<label for="f_plan_month" class="font text-left">计划月份:</label>-->
205
- <!--</div>-->
206
- <!--<div class="col-xs-8" >-->
207
- <!--<input id="f_plan_month" class="search_input input-font"-->
208
- <!--v-model="model.f_plan_month" condition="f_plan_month = '{}'" />-->
209
- <!--</div>-->
210
- <!--</div>-->
211
-
212
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
213
- <div class="col-xs-4">
214
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
215
- <label class="font text-left">表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:</label>
216
- </div>
217
- <div class="col-xs-8">
218
- <input class="search_input input-font"
219
- v-model=model.f_meter_no condition="f_meter_no like '%{}%'"/>
220
- </div>
221
- </div>
222
-
223
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
224
- <div class="col-xs-4">
225
- <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
226
- <label class="font text-left">用户地址:</label>
227
- </div>
228
- <div class="col-xs-8">
229
- <input class="search_input input-font"
230
- v-model=model.f_keyword condition="f_address like '%{}%'"/>
231
- </div>
232
- </div>
233
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
234
- <div class="col-xs-4">
235
- <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
236
- <label for="f_user_type" class="font text-left">用户类型:</label>
237
- </div>
238
- <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
239
- :width="'60%'"
240
- :options='$parent.$parent.user_types' placeholder='请选择用户类型'
241
- v-model="model.f_user_type" condition="f_user_type='{}'" close-on-select
242
- clear-button></v-select>
243
- </div>
244
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
245
- <div class="col-xs-6" style="text-align: center">
246
- <span class="font text-left">待办{{ $parent.$parent.upcomingCount }}条</span>
247
- </div>
248
- <div class="col-xs-6" style="text-align: center">
249
- <span class="font text-left">已办{{ $parent.$parent.doneCount }}条</span>
250
- </div>
251
- <div class="col-xs-6" style="text-align: center">
252
- <span class="font text-left">临时保存{{ $parent.$parent.tempSaveCount }}条</span>
253
- </div>
254
- <div class="col-xs-6" style="text-align: center">
255
- <span class="font text-left">总共{{ $parent.$parent.allPlanCount }}条</span>
256
- </div>
257
- </div>
258
-
259
- <div class="row text-center" style="margin-top: 20px;">
260
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;"
261
- @click="$parent.$parent.selfSearch">查询
262
- </button>
263
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%; margin-left: 10px"
264
- @click="$parent.$parent.queryplanmany">转发
265
- </button>
266
- <div style="float: right;margin-right: 3% " class="button_spacing"
267
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
268
- @click="$parent.$parent.hidden()"></div>
269
- <img style="float: right;margin-right: 3% " @click="$parent.$parent.getNewOrder"
270
- src="../../../assets/shuaxindaiban1.png" style="width: 40px;padding: 5px; float:right">
271
- </div>
272
- <div class="col-sm-12">
273
-
274
- </div>
275
- <!--<div class="row app-btn">-->
276
- <!--<button class="btn btn-primary col-xs-6" type="button" @click="search"><span class="glyphicon glyphicon-search" style="margin-right: 20px;">查询</span></button>-->
277
- <!--</div>-->
278
- <div style="height:30px;"></div>
279
- </form>
280
- </div>
281
- </criteria>
282
- <list :model="model" partial='list'>
283
- <div partial>
284
- <div class="auto app-text" style="margin-top: 5px;">
285
- <div class="panel" style="padding: 10px 10px 5px 10px;">
286
- <div class="panel-body panel-self">
287
-
288
- <div class="col-xs-12">
289
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
290
- <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}</p>
291
- <p class="panel-title col-xs-2 text-left input-font" style="width: 5%;float:right">
292
- <input type="checkbox" @click="$parent.$parent.$parent.setPlanParam(row.id, $event)"/>
293
- </p>
294
- </div>
295
- <div class="col-xs-12">
296
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
297
- <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
298
- </div>
299
- <div class="col-xs-6">
300
- <p class="panel-title col-xs-5 text-left font"><b>用户类型:</b></p>
301
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_user_type }}
302
- </p>
303
- </div>
304
- <div class="col-xs-6">
305
- <p class="panel-title col-xs-5 text-left font"><b>表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:</b></p>
306
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_meter_no }}
307
- </p>
308
- </div>
309
- <div class="col-xs-6">
310
- <p class="panel-title col-xs-5 text-left font"><b>计划名称:</b></p>
311
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_plan_name }}</p>
312
- </div>
313
- <!-- <div class="col-xs-6">-->
314
- <!-- <p class="panel-title col-xs-5 text-left font"><b>小区名称:</b></p>-->
315
- <!-- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_residential_area }}</p>-->
316
- <!-- </div>-->
317
- <div class="col-xs-12">
318
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b></p>
319
- <p class="panel-title text-left input-font" style="width: 77%">
320
- {{ row.f_user_phone2 ? row.f_user_phone2 : row.f_user_phone }}
321
- <img src="../../../assets/phone.png" style="width: 6%"
322
- v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_user_phone2 ? row.f_user_phone2 : row.f_user_phone)'/>
323
- </p>
324
- </div>
325
-
326
- <div class="col-xs-12">
327
- <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
328
- <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}</p>
329
- </div>
330
-
331
- <!-- <div class="row">-->
332
- <!-- <p class="panel-title col-xs-4 text-left font">计划年份</p>-->
333
- <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_year }}</p>-->
334
- <!-- </div>-->
335
- <!-- <div class="row">-->
336
- <!-- <p class="panel-title col-xs-4 text-left font">计划月份</p>-->
337
- <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_month }}</p>-->
338
- <!-- </div>-->
339
- <!-- <div class="row">-->
340
- <!-- <p class="panel-title col-xs-4 text-left font">预约时间</p>-->
341
- <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_prearranged_date }}</p>-->
342
- <!-- </div>-->
343
- <!--<div class="row">-->
344
- <!--<p class="panel-title col-xs-4 text-left font">上次安检状态</p>-->
345
- <!--<p class="panel-title col-xs-8 text-left input-font">{{ row.f_last_check_state }}</p>-->
346
- <!--</div>-->
347
- <div class="col-xs-6">
348
- <p class="panel-title col-xs-5 text-left font"><b>安检状态:</b></p>
349
- <p class="panel-title col-xs-7 text-left input-font">{{
350
- row.f_state == '已检' ? '临时保存' : row.f_state
351
- }}</p>
352
- </div>
353
- <div class="col-xs-6">
354
- <p class="panel-title col-xs-5 text-left font"><b>上传状态:</b></p>
355
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_upload_state }}</p>
356
- </div>
357
- <div class="col-xs-6">
358
- <p class="panel-title col-xs-5 text-left font"><b>安检类型:</b></p>
359
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_safecheck_type }}</p>
360
- </div>
361
- <!--<div class="col-xs-12">-->
362
- <!--<p class="panel-title col-xs-5 text-left font"><b>送气期限:</b></p>-->
363
- <!--<p class="panel-title col-xs-7 text-left input-font">{{timeSet(row.f_issue_time)}}</p>-->
364
- <!--</div>-->
365
- <div class="col-xs-12">
366
- <button type="button" name="button" class="btn btn-primary"
367
- style="background-color:#499edf;float: right" @click="$parent.$parent.$parent.inspect(row)">处理
368
- </button>
369
- <button type="button" name="button" class="btn btn-primary"
370
- style="background-color:#499edf;float: right;margin-right:10px;"
371
- @click="$parent.$parent.$parent.queryplan(row.id)">转发
372
- </button>
373
- <!--<button type="button" class="btn btn-default" @click="$parent.$parent.$parent.ceshi">确认2</button>-->
374
- </div>
375
- <!-- <div class="row text-right" v-show="row.f_upload_state != '已传'" >-->
376
- <!-- <button type="button" class="btn yybtn-color" v-on:click.stop.prevent='$parent.$parent.$parent.reserve($index)'>预约</button>&nbsp;-->
377
- <!-- <button type="button" class="btn qxbtn-color" v-if ='row.f_prearranged_date'-->
378
- <!-- v-on:click.stop.prevent='$parent.$parent.$parent.cancelReserve($index, row.id)'>取消预约</button>-->
379
- <!-- </div>-->
380
- </div>
381
- </div>
382
- </div>
383
- </div>
384
- </list>
385
- </criteria-paged>
386
- <modal :show.sync="showModal">
387
- <div slot="modal-header" class="modal-header">
388
- <h4 class="modal-title">
389
- 选择预约时间
390
- </h4>
391
- </div>
392
- <div slot="modal-body" class="modal-body">
393
- <input type="datetime-local" v-model="f_preset_dt">
394
- </div>
395
- <div slot="modal-footer" class="modal-footer">
396
- <button type="button" class="btn btn-default" @click="genuineReserve">确认</button>
397
- </div>
398
- </modal>
399
- <!--<back-page :need-back='true' @flag="$back()"></back-page>-->
400
- <modal :show.sync="showModal2" v-ref:modal>
401
- <div slot="modal-header" class="modal-header">
402
- <h4 class="modal-title">
403
- 选择计划
404
- </h4>
405
- </div>
406
- <div slot="modal-body" class="modal-body">
407
- <div class="col-xs-12">
408
-
409
- <div class="col-xs-4">
410
- <v-select :value.sync="check" v-model='check'
411
- :value-single="true"
412
- class="select_list select"
413
- :options='checkers' placeholder='安检员'
414
- close-on-select width="100%"></v-select>
415
- </div>
416
-
417
- <div class="col-xs-1">
418
- <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
419
- </div>
420
- <div class="col-xs-4" style="padding-left: 2px">
421
- <input class="select-style" placeholder="计划名称" type="text" v-model="plan"
422
- style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
423
- </div>
424
- <div class="col-xs-1">
425
- <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
426
- </div>
427
- <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
428
- <div class="col-xs-2" style="float: right">
429
- <button type="button" class="btn btn-primary" @click="plansearch"
430
- style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">
431
- 查询
432
- </button>
433
- </div>
434
- </div>
435
- <table class="table table_sy">
436
- <thead>
437
- <tr>
438
- <th style="width: 30px"></th>
439
- <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
440
- </tr>
441
- </thead>
442
- <tbody>
443
- <tr v-for="row in planoption">
444
- <td @click="select(row, $index)">{{ row.selected == true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;' }}</td>
445
- <td @click="select(row, $index)" style="text-align: center">{{ row.label }}</td>
446
-
447
-
448
- </tr>
449
- </tbody>
450
- </table>
451
- </div>
452
- <div slot="modal-footer" class="modal-footer">
453
- <button class="btn btn-default" @click="isok()">确认</button>
454
- <button class="btn btn-default" @click="iscancel()">取消</button>
455
- </div>
456
- </modal>
457
- <modal :show.sync="showModal3" v-ref:modal>
458
- <div slot="modal-header" class="modal-header">
459
- <h4 class="modal-title">
460
- 选择计划
461
- </h4>
462
- </div>
463
- <div slot="modal-body" class="modal-body">
464
- <div class="col-xs-12">
465
-
466
- <div class="col-xs-4">
467
- <v-select :value.sync="check" v-model='check'
468
- :value-single="true"
469
- class="select_list select"
470
- :options='checkers' placeholder='安检员'
471
- close-on-select width="100%"></v-select>
472
- </div>
473
-
474
- <div class="col-xs-1">
475
- <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
476
- </div>
477
- <div class="col-xs-4" style="padding-left: 2px">
478
- <input class="select-style" placeholder="计划名称" type="text" v-model="plan"
479
- style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
480
- </div>
481
- <div class="col-xs-1">
482
- <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
483
- </div>
484
- <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
485
- <div class="col-xs-2" style="float: right">
486
- <button type="button" class="btn btn-primary" @click="plansearch"
487
- style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">
488
- 查询
489
- </button>
490
- </div>
491
- </div>
492
- <table class="table table_sy">
493
- <thead>
494
- <tr>
495
- <th style="width: 30px"></th>
496
- <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
497
- </tr>
498
- </thead>
499
- <tbody>
500
- <tr v-for="row in planoption">
501
- <td @click="select(row, $index)">{{ row.selected == true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;' }}</td>
502
- <td @click="select(row, $index)" style="text-align: center">{{ row.label }}</td>
503
-
504
-
505
- </tr>
506
- </tbody>
507
- </table>
508
- </div>
509
- <div slot="modal-footer" class="modal-footer">
510
- <button class="btn btn-default" @click="manyisok()">确认</button>
511
- <button class="btn btn-default" @click="iscancel()">取消</button>
512
- </div>
513
- </modal>
514
- </div>
515
-
516
- </template>
517
-
518
- <script>
519
- import LocalPagedList from '../../../plugins/LocalPagedList'
520
- import Vue from 'vue'
521
- import {PagedList, HttpResetClass} from 'vue-client'
522
- import * as Util from '../../Util'
523
- import co from 'co'
524
-
525
- let select = function* (self) {
526
- let http = new HttpResetClass()
527
- http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
528
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
529
- userid: Vue.user.id
530
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
531
- //tag
532
- self.checkers.push({label: '全部', value: ''})
533
- res.data.forEach((checker) => {
534
- self.checkers.push({label: checker.name, value: checker.id})
535
- })
536
- })
537
- }
538
- export default {
539
- title: '无计划安检查询',
540
- data() {
541
- return {
542
- f_filialeids: '(' + Vue.user.orgid + ')',
543
- //f_filialeids:'(305)',
544
- planparam: [],
545
- check: '',
546
- plan: '',
547
- planid: '',
548
- model: Vue.android ? new LocalPagedList('androidGetuserinfo', 20, {condition: 'this.condition'}) : new PagedList('AndroidRest/rs/sql/androidGetuserinfo', 20, {condition: 'this.condition'}),
549
- showModal: false,
550
- showModal2: false,
551
- showModal3: false,
552
- needid: '',
553
- criteriaShow: false,
554
- planoption: [],
555
- condition: '',
556
- checkers: [],
557
- param: null,
558
- f_preset_dt: Util.to3339TimeString(),
559
- flow_direction: [
560
- {label: '请选择挂表方式', value: ''},
561
- {label: '左表', value: '左表'},
562
- {label: '右表', value: '右表'}
563
- ],
564
- check_states: [
565
- {label: '请选择安检状态', value: ''},
566
- {label: '未检', value: '未检'},
567
- {label: '临时保存', value: '已检'},
568
- ],
569
- last_check_states: [
570
- {label: '请选择上次安检状态', value: ''},
571
- {label: '入户', value: '入户'},
572
- {label: '拒检', value: '拒检'},
573
- {label: '到访不遇', value: '到访不遇'},
574
- {label: '未使用天然气', value: '未使用天然气'}
575
- ],
576
- upload_states: [
577
- {label: '请选择上传状态', value: ''},
578
- {label: '未传', value: '未传'},
579
- {label: '已传', value: '已传'}
580
- ],
581
- user_types: [
582
- {label: '请选择用户类型', value: ''},
583
- {label: '民用', value: '民用'},
584
- {label: '非民用', value: '非民用'},
585
- ],
586
- verify_state: [
587
- {label: '请选择审核状态', value: ''},
588
- {label: '未审核', value: '未审核'},
589
- {label: '打回', value: '打回'}
590
- ],
591
- residentialAreaOptions: [],
592
- buildOptions: [],
593
- unitOptions: [],
594
- planNameOptions: [],
595
- upcomingCount: 0,
596
- doneCount: 0,
597
- tempSaveCount: 0,
598
- allPlanCount: 0
599
- }
600
- },
601
- ready() {
602
- this.getAllArea()
603
- this.getAllPlanName()
604
- this.selfSearch()
605
- let gen = select(this)
606
- co(gen)
607
- },
608
- mounted() {
609
- //tag
610
- if (window.history && window.history.pushState) {
611
- history.pushState(null, null, document.URL);
612
- window.addEventListener('popstate', this.fun, false);//false阻止默认事件
613
- }
614
- },
615
- destroyed() {
616
- //tag
617
- window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
618
- },
619
- methods: {
620
- fun() {
621
- //tag
622
- //tag
623
- },
624
- iscancel() {
625
- this.showModal2 = false
626
- this.showModal3 = false
627
- this.planoption = []
628
- },
629
- timeSet(val) {
630
- return val
631
- },
632
- async isok() {
633
- if (this.planoption.length == 0) {
634
- this.$showMessage("请选择计划")
635
- return false
636
- }
637
- for (let i = 0; i < this.planoption.length; i++) {
638
- if (this.planoption[i]["selected"] == true) {
639
- this.planid = this.planoption[i].value
640
- break
641
- }
642
- }
643
- if (this.planid == '') {
644
- this.$showMessage("请选择计划")
645
- return false
646
- }
647
- await this.okput()
648
- },
649
- async manyisok() {
650
- if (this.planoption.length == 0) {
651
- this.$showMessage("请选择计划")
652
- return false
653
- }
654
- for (let i = 0; i < this.planoption.length; i++) {
655
- if (this.planoption[i]["selected"] == true) {
656
- this.planid = this.planoption[i].value
657
- break
658
- }
659
- }
660
- if (this.planid == '') {
661
- this.$showMessage("请选择计划")
662
- return false
663
- }
664
- await this.manyokput()
665
- },
666
- changenull() {
667
- this.showModal2 = false
668
- this.showModal3 = false
669
- this.planoption = []
670
- this.plan = ''
671
- this.check = ''
672
- },
673
- async okput() {
674
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {
675
- data: {
676
- condition: `it.id='` + this.needid + `'`,
677
- f_plan_id: this.planid,
678
- switchCheckAll: false,
679
- checkAll: false,
680
- f_operator: Vue.user.name
681
- }
682
- })
683
- await this.changenull()
684
- await this.getNewOrder()
685
- },
686
- async manyokput() {
687
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {
688
- data: {
689
- columnName: "it.id",
690
- condition: "1=1",
691
- f_plan_id: this.planid,
692
- switchCheckAll: true,
693
- param: this.planparam,
694
- checkAll: false,
695
- f_operator: Vue.user.name
696
- }
697
- })
698
- await this.changenull()
699
- await this.getNewOrder()
700
- },
701
- async plansearch() {
702
- this.planoption = []
703
- let condition = `f_checker_id=` + this.check + ` and f_plan_name like '%` + this.plan + `%'`
704
- if (!this.check) {
705
- condition = `f_plan_name like '%` + this.plan + `%'`
706
- }
707
- let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {
708
- data: {
709
- condition: condition,
710
- f_filialeids: this.f_filialeids,
711
- groupitem: '',
712
- orderitem: 'id'
713
- }
714
- })
715
- let resoult = res.data
716
- for (let i = 0; i < resoult.length; i++) {
717
- this.planoption.push({label: resoult[i].f_plan_name, selected: false, value: resoult[i].id})
718
- }
719
- },
720
-
721
- select(row, idx) {
722
- this.$set('planoption[' + idx + '].selected', true)
723
- for (let i = 0; i < this.planoption.length; i++) {
724
- if (i != idx) {
725
- this.planoption[i]["selected"] = false
726
- }
727
- }
728
- },
729
- planclose() {
730
- this.showModal2 = false
731
- this.showModal3 = false
732
- },
733
- queryplan(val) {
734
- this.needid = val
735
- this.showModal2 = true
736
- },
737
- queryplanmany() {
738
-
739
- this.showModal3 = true
740
- },
741
- reload() {
742
- // this.getAllArea()
743
- // this.getAllPlanName()
744
- this.selfSearch()
745
- },
746
- cancelReserve(idx, id) {
747
- if (Vue.android) {
748
- let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
749
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
750
- if (res.code == 200) {
751
- this.$showMessage("取消预约成功")
752
- }
753
- } else {
754
- this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
755
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
756
- if (repanse.data.code == 200) {
757
- alert("取消预约成功!")
758
- }
759
- })
760
- }
761
- },
762
- genuineReserve() {
763
- if (Vue.android) {
764
- if (!this.f_preset_dt) {
765
- this.$showMessage('请选择一个日期')
766
- return
767
- }
768
- let pdt = this.f_preset_dt.replace('T', ' ')
769
- let respanse = this.$androidUtil.bzLogic('BookingCheck', {id: this.model.rows[this.param].id, dt: pdt})
770
- this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
771
- if (respanse.code == 200) {
772
- this.$showMessage("预约成功!")
773
- }
774
- this.showModal = false
775
- } else {
776
- if (!this.f_preset_dt) {
777
- alert('请选择一个日期')
778
- return
779
- }
780
- let pdt = this.f_preset_dt.replace('T', ' ')
781
- this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: pdt}).then((res) => {
782
- this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
783
- if (res.data.code == 200) {
784
- alert("预约成功!")
785
- }
786
- this.showModal = false
787
- })
788
- }
789
- },
790
- inspect(row) {
791
- var _this = this
792
- //tag
793
- if (row.f_upload_state == '未传' || (row.f_upload_state == '已传' && row.f_state == '未检' && row.f_no_checkplan != '无计划安检')) {
794
- _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/wxFetchPlanUserfiles`, {data: {f_userid: row.f_userinfoid}}).then((response) => {
795
- if(response.data.length == 0){
796
- this.$showMessage("表档案信息有误!请联系管理员")
797
- return
798
- }
799
- //tag)
800
- row['f_plan_meters'] = response.data
801
- var pardate = {
802
- _this: _this,
803
- title: '安全检查',
804
- safe: true
805
- }
806
- _this.$dispatch('gotoson', pardate)
807
- //tag
808
- _this.$goto('safecheck-order-v', {
809
- f_plan_id: row.f_plan_id,
810
- item: row,
811
- role: 'inspect',
812
- recording: 'ready',
813
- parentPage: 'CurrentCreate'
814
- }, 'self', _this.reload)
815
- })
816
- } else {
817
- this.$showMessage("该安检单已被上传!")
818
- }
819
- },
820
- makeAPhoneCall(phoneNumber) {
821
- this.$androidUtil.makeAPhoneCall(phoneNumber)
822
- },
823
- reserve(idx) {
824
- this.param = idx
825
- this.showModal = true
826
- },
827
- search(args) {
828
- this.model.rows = []
829
- this.model.search(args.condition, args.model)
830
- },
831
- selfSearch() {
832
- this.getPlanCount()
833
- let condition = ""
834
- if (this.$refs.paged.$refs.cri.model.f_residential_area)
835
- condition += " and ti.f_residential_area like '" + this.$refs.paged.$refs.cri.model.f_residential_area + "'"
836
- if (this.$refs.paged.$refs.cri.model.f_building)
837
- condition += " and ti.f_building like '%" + this.$refs.paged.$refs.cri.model.f_building + "%'"
838
- if (this.$refs.paged.$refs.cri.model.f_unit)
839
- condition += " and ti.f_unit like '%" + this.$refs.paged.$refs.cri.model.f_unit + "%'"
840
- if (this.$refs.paged.$refs.cri.model.f_plan_name)
841
- condition += " and f_plan_name like '%" + this.$refs.paged.$refs.cri.model.f_plan_name + "%'"
842
- // if(this.$refs.paged.$refs.cri.model.f_plan_year)
843
- // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
844
- // if(this.$refs.paged.$refs.cri.model.f_plan_month)
845
- // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
846
- if (this.$refs.paged.$refs.cri.model.f_userinfo_code)
847
- condition += " and ti.f_userinfo_code like '%" + this.$refs.paged.$refs.cri.model.f_userinfo_code + "%'"
848
- if (this.$refs.paged.$refs.cri.model.f_keyword)
849
- condition += " and ti.f_address like '%" + this.$refs.paged.$refs.cri.model.f_keyword + "%'"
850
- if (this.$refs.paged.$refs.cri.model.f_user_name)
851
- condition += " and ti.f_user_name like '%" + this.$refs.paged.$refs.cri.model.f_user_name + "%'"
852
- if (this.$refs.paged.$refs.cri.model.f_state[0])
853
- condition += " and ti.f_state='" + this.$refs.paged.$refs.cri.model.f_state[0] + "'"
854
- // if(this.$refs.paged.$refs.cri.model.f_last_state[0])
855
- // condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
856
- if (this.$refs.paged.$refs.cri.model.f_user_type[0])
857
- condition += " and ti.f_user_type='" + this.$refs.paged.$refs.cri.model.f_user_type[0] + "'"
858
- if (this.$refs.paged.$refs.cri.model.f_meter_no)
859
- condition += " and tm.f_meter_no like '%" + this.$refs.paged.$refs.cri.model.f_meter_no + "%'"
860
- // if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
861
- // condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
862
- //tag
863
- this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成') or (f_state = '未检')) and ti.f_no_checkplan = '有计划安检'" + condition)
864
- },
865
- getNewOrder() {
866
- HostApp.__this__ = this
867
- HostApp.logicWithHint({
868
- // logic别名,key必须为logic
869
- 'logic': 'SafeCheckServiceTimeOut',
870
- // 回调执行方法名,key必须为callback
871
- 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
872
- // logic执行需要的业务参数
873
- 'data': {params: ''},
874
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
875
- // 执行回调方法传入key为backresult
876
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
877
- 'backresult': 1
878
- })
879
- },
880
- getNewOrderCallBack() {
881
- this.selfSearch()
882
- this.getAllArea()
883
- this.getAllPlanName()
884
- },
885
- hidden() {
886
- this.criteriaShow = !this.criteriaShow
887
- },
888
- getAllArea() {
889
- this.residentialAreaOptions = []
890
- this.buildOptions = []
891
- this.unitOptions = []
892
- this.$refs.paged.$refs.cri.model.f_residential_area = ''
893
- this.$refs.paged.$refs.cri.model.f_building = ''
894
- this.$refs.paged.$refs.cri.model.f_unit = ''
895
- let criteria = {
896
- items: 'f_residential_area',
897
- tablename: 't_check_plan_item',
898
- condition: `f_residential_area IS NOT NULL AND f_residential_area != '' AND f_state <> '已检'`,
899
- groupitem: 'f_residential_area'
900
- }
901
- let result = HostApp._executeTask({
902
- 'type': 'sql',
903
- 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
904
- })
905
- //tag)
906
- if (result.code == 200) {
907
- result.data.rows.forEach(item => this.residentialAreaOptions.push({
908
- label: item.f_residential_area,
909
- value: item.f_residential_area
910
- }))
911
- }
912
- //tag)
913
- },
914
- getbuilds(f_residential_area) {
915
- //tag)
916
- this.buildOptions = []
917
- this.unitOptions = []
918
- this.$refs.paged.$refs.cri.model.f_building = ''
919
- this.$refs.paged.$refs.cri.model.f_unit = ''
920
- if (!f_residential_area) {
921
- return
922
- }
923
- let criteria = {
924
- items: 'f_building',
925
- tablename: 't_check_plan_item',
926
- condition: `f_building IS NOT NULL AND f_building != '' AND f_state <> '已检' AND f_residential_area = '${f_residential_area}'`,
927
- groupitem: 'f_building'
928
- }
929
- let result = HostApp._executeTask({
930
- 'type': 'sql',
931
- 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
932
- })
933
- if (result.code == 200) {
934
- result.data.rows.forEach(item => this.buildOptions.push({label: item.f_building, value: item.f_building}))
935
- }
936
- //tag)
937
- },
938
- getUnits(f_building) {
939
- f_building = f_building[0]
940
- //tag)
941
- this.unitOptions = []
942
- this.$refs.paged.$refs.cri.model.f_unit = ''
943
- if (!f_building) {
944
- return
945
- }
946
- let criteria = {
947
- items: 'f_unit',
948
- tablename: 't_check_plan_item',
949
- condition: `f_unit IS NOT NULL AND f_unit != '' AND f_state <> '已检' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
950
- groupitem: 'f_unit'
951
- }
952
- let result = HostApp._executeTask({
953
- 'type': 'sql',
954
- 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
955
- })
956
- if (result.code == 200) {
957
- result.data.rows.forEach(item => this.unitOptions.push({label: item.f_unit, value: item.f_unit}))
958
- }
959
- //tag)
960
- },
961
- getPlanCount() {
962
- this.upcomingCount = 0
963
- this.tempSaveCount = 0
964
- this.doneCount = 0
965
- this.allPlanCount = 0
966
- let criteria = {
967
- items: 'count(id) count',
968
- tablename: 't_check_plan_item',
969
- condition: `f_state = '未检'`,
970
- groupitem: 'f_state'
971
- }
972
- let result = HostApp._executeTask({
973
- 'type': 'sql',
974
- 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
975
- })
976
- if (result.code && result.code == 200) {
977
- if (result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
978
- this.upcomingCount = result.data.rows[0].count
979
- }
980
- }
981
- criteria = {
982
- items: 'count(id) count',
983
- tablename: 't_check_plan_item',
984
- condition: `(f_complete = '' or f_complete = null or f_complete = '未完成') AND f_state = '已检'`,
985
- groupitem: 'f_state'
986
- }
987
- result = HostApp._executeTask({
988
- 'type': 'sql',
989
- 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
990
- })
991
- if (result.code && result.code == 200) {
992
- if (result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
993
- this.tempSaveCount = result.data.rows[0].count
994
- }
995
- }
996
- criteria = {
997
- items: 'count(id) count',
998
- tablename: 't_check_plan_item',
999
- condition: `f_complete = '已完成' AND f_state = '已检'`,
1000
- groupitem: 'f_state'
1001
- }
1002
- result = HostApp._executeTask({
1003
- 'type': 'sql',
1004
- 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
1005
- })
1006
- if (result.code && result.code == 200) {
1007
- if (result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
1008
- this.doneCount = result.data.rows[0].count
1009
- }
1010
- }
1011
- this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
1012
-
1013
- //tag
1014
- //tag
1015
- //tag
1016
- //tag
1017
- },
1018
- getAllPlanName() {
1019
- this.planNameOptions = []
1020
- this.$refs.paged.$refs.cri.model.f_plan_name = ''
1021
- let criteria = {
1022
- items: 'f_plan_name',
1023
- tablename: 't_check_plan',
1024
- condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
1025
- groupitem: 'f_plan_name'
1026
- }
1027
- let result = HostApp._executeTask({
1028
- 'type': 'sql',
1029
- 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
1030
- })
1031
- //tag)
1032
- if (result.code == 200) {
1033
- result.data.rows.forEach(item => this.planNameOptions.push({label: item.f_plan_name, value: item.f_plan_name}))
1034
- }
1035
- //tag)
1036
- },
1037
- setPlanParam(detailsType, event) {
1038
- if (event.srcElement.checked) {
1039
- this.planparam.push(detailsType)
1040
- //tag
1041
- } else {
1042
- if (this.planparam.length > 0) {
1043
- let planid = this.planparam.findIndex((value) => {
1044
- return value === detailsType
1045
- })
1046
- this.planparam.splice(planid, 1)
1047
- //tag
1048
-
1049
- }
1050
-
1051
- }
1052
- }
1053
- }
1054
- }
1055
- </script>
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
+
95
+ <template>
96
+ <div style="height: auto;width: 100%">
97
+ <criteria-paged :model="model" v-ref:paged>
98
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri>
99
+ <div partial>
100
+ <form>
101
+ <div class="row app-row">
102
+ <!--小区名称-->
103
+ <v-select :value.sync="model.f_residential_area"
104
+ class="input-font"
105
+ :options='$parent.$parent.residentialAreaOptions'
106
+ placeholder='小区名称'
107
+ :width="'32.5%'"
108
+ v-model="model.f_residential_area"
109
+ condition="ti.f_residential_area = '{}'"
110
+ @change="$parent.$parent.getbuilds"
111
+ close-on-select clear-button>
112
+ </v-select>
113
+ <!--楼栋-->
114
+ <v-select :value.sync="model.f_building"
115
+ class="input-font"
116
+ :options='$parent.$parent.buildOptions'
117
+ placeholder='楼栋'
118
+ :width="'32.5%'"
119
+ v-model="model.f_building"
120
+ condition="ti.f_building = '{}'"
121
+ @change="$parent.$parent.getUnits"
122
+ close-on-select clear-button>
123
+ </v-select>
124
+ <!--单元-->
125
+ <v-select :value.sync="model.f_unit"
126
+ class="input-font"
127
+ :options='$parent.$parent.unitOptions'
128
+ placeholder='单元'
129
+ :width="'32.5%'"
130
+ v-model="model.f_unit"
131
+ condition="ti.f_unit = '{}'"
132
+ close-on-select clear-button>
133
+ </v-select>
134
+ </div>
135
+ <div class="row app-row">
136
+ <div class="col-xs-4">
137
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
138
+ <label for="f_userinfo_code" class="font text-left">用户编号:</label>
139
+ </div>
140
+ <div class="col-xs-8">
141
+ <input id="f_userinfo_code" class="search_input input-font"
142
+ v-model=model.f_userinfo_code condition="f_userinfo_code like '%{}%'"/>
143
+ </div>
144
+ </div>
145
+ <div class="row app-row">
146
+ <div class="col-xs-4">
147
+ <img src="../../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
148
+ <label class="font text-left">用户姓名:</label>
149
+ </div>
150
+ <div class="col-xs-8">
151
+ <input class="search_input input-font" v-model=model.f_user_name condition="f_user_name like '%{}%'"/>
152
+ </div>
153
+ </div>
154
+
155
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
156
+ <div class="col-xs-4">
157
+ <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
158
+ <label for="f_plan_name" class="font text-left">计划名称:</label>
159
+ </div>
160
+ <v-select
161
+ id="f_plan_name"
162
+ :value.sync="model.f_plan_name"
163
+ class="input-font"
164
+ :options='$parent.$parent.planNameOptions'
165
+ placeholder='计划名称'
166
+ :width="'60%'"
167
+ v-model="model.f_plan_name"
168
+ condition="f_plan_name like '%{}%'"
169
+ close-on-select clear-button>
170
+ </v-select>
171
+ </div>
172
+
173
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
174
+ <div class="col-xs-4">
175
+ <img src="../../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
176
+ <label for="f_state" class="font text-left">是否已检:</label>
177
+ </div>
178
+ <v-select id="f_state"
179
+ :value.sync="model.f_state"
180
+ class="input-font"
181
+ :options='$parent.$parent.check_states'
182
+ placeholder='是否已检'
183
+ :width="'60%'"
184
+ v-model="model.f_state"
185
+ condition="f_state='{}'"
186
+ close-on-select clear-button>
187
+ </v-select>
188
+ </div>
189
+
190
+
191
+ <!--<div class="row app-row">-->
192
+ <!--<div class="col-xs-4">-->
193
+ <!--<img src="../../assets/shijian.png" style="width: 20px;margin-bottom: 5px" alt="">-->
194
+ <!--<label for="f_plan_year" class="font text-left">计划年份:</label>-->
195
+ <!--</div>-->
196
+ <!--<div class="col-xs-8" >-->
197
+ <!--<input id="f_plan_year" class="search_input input-font"-->
198
+ <!--v-model="model.f_plan_year" condition="f_plan_year = '{}'" />-->
199
+ <!--</div>-->
200
+ <!--</div>-->
201
+ <!--<div class="row app-row">-->
202
+ <!--<div class="col-xs-4">-->
203
+ <!--<img src="../../assets/shijian.png" style="width: 20px;margin-bottom: 5px" alt="">-->
204
+ <!--<label for="f_plan_month" class="font text-left">计划月份:</label>-->
205
+ <!--</div>-->
206
+ <!--<div class="col-xs-8" >-->
207
+ <!--<input id="f_plan_month" class="search_input input-font"-->
208
+ <!--v-model="model.f_plan_month" condition="f_plan_month = '{}'" />-->
209
+ <!--</div>-->
210
+ <!--</div>-->
211
+
212
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
213
+ <div class="col-xs-4">
214
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
215
+ <label class="font text-left">表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:</label>
216
+ </div>
217
+ <div class="col-xs-8">
218
+ <input class="search_input input-font"
219
+ v-model=model.f_meter_no condition="f_meter_no like '%{}%'"/>
220
+ </div>
221
+ </div>
222
+
223
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
224
+ <div class="col-xs-4">
225
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
226
+ <label class="font text-left">用户地址:</label>
227
+ </div>
228
+ <div class="col-xs-8">
229
+ <input class="search_input input-font"
230
+ v-model=model.f_keyword condition="f_address like '%{}%'"/>
231
+ </div>
232
+ </div>
233
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
234
+ <div class="col-xs-4">
235
+ <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
236
+ <label for="f_user_type" class="font text-left">用户类型:</label>
237
+ </div>
238
+ <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
239
+ :width="'60%'"
240
+ :options='$parent.$parent.user_types' placeholder='请选择用户类型'
241
+ v-model="model.f_user_type" condition="f_user_type='{}'" close-on-select
242
+ clear-button></v-select>
243
+ </div>
244
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
245
+ <div class="col-xs-6" style="text-align: center">
246
+ <span class="font text-left">待办{{ $parent.$parent.upcomingCount }}条</span>
247
+ </div>
248
+ <div class="col-xs-6" style="text-align: center">
249
+ <span class="font text-left">已办{{ $parent.$parent.doneCount }}条</span>
250
+ </div>
251
+ <div class="col-xs-6" style="text-align: center">
252
+ <span class="font text-left">临时保存{{ $parent.$parent.tempSaveCount }}条</span>
253
+ </div>
254
+ <div class="col-xs-6" style="text-align: center">
255
+ <span class="font text-left">总共{{ $parent.$parent.allPlanCount }}条</span>
256
+ </div>
257
+ </div>
258
+
259
+ <div class="row text-center" style="margin-top: 20px;">
260
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;"
261
+ @click="$parent.$parent.selfSearch">查询
262
+ </button>
263
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%; margin-left: 10px"
264
+ @click="$parent.$parent.queryplanmany">转发
265
+ </button>
266
+ <div style="float: right;margin-right: 3% " class="button_spacing"
267
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
268
+ @click="$parent.$parent.hidden()"></div>
269
+ <img style="float: right;margin-right: 3% " @click="$parent.$parent.getNewOrder"
270
+ src="../../../assets/shuaxindaiban1.png" style="width: 40px;padding: 5px; float:right">
271
+ </div>
272
+ <div class="col-sm-12">
273
+
274
+ </div>
275
+ <!--<div class="row app-btn">-->
276
+ <!--<button class="btn btn-primary col-xs-6" type="button" @click="search"><span class="glyphicon glyphicon-search" style="margin-right: 20px;">查询</span></button>-->
277
+ <!--</div>-->
278
+ <div style="height:30px;"></div>
279
+ </form>
280
+ </div>
281
+ </criteria>
282
+ <list :model="model" partial='list'>
283
+ <div partial>
284
+ <div class="auto app-text" style="margin-top: 5px;">
285
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
286
+ <div class="panel-body panel-self">
287
+
288
+ <div class="col-xs-12">
289
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
290
+ <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}</p>
291
+ <p class="panel-title col-xs-2 text-left input-font" style="width: 5%;float:right">
292
+ <input type="checkbox" @click="$parent.$parent.$parent.setPlanParam(row.id, $event)"/>
293
+ </p>
294
+ </div>
295
+ <div class="col-xs-12">
296
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
297
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
298
+ </div>
299
+ <div class="col-xs-6">
300
+ <p class="panel-title col-xs-5 text-left font"><b>用户类型:</b></p>
301
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_user_type }}
302
+ </p>
303
+ </div>
304
+ <div class="col-xs-6">
305
+ <p class="panel-title col-xs-5 text-left font"><b>表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:</b></p>
306
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_meter_no }}
307
+ </p>
308
+ </div>
309
+ <div class="col-xs-6">
310
+ <p class="panel-title col-xs-5 text-left font"><b>计划名称:</b></p>
311
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_plan_name }}</p>
312
+ </div>
313
+ <!-- <div class="col-xs-6">-->
314
+ <!-- <p class="panel-title col-xs-5 text-left font"><b>小区名称:</b></p>-->
315
+ <!-- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_residential_area }}</p>-->
316
+ <!-- </div>-->
317
+ <div class="col-xs-12">
318
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b></p>
319
+ <p class="panel-title text-left input-font" style="width: 77%">
320
+ {{ row.f_user_phone2 ? row.f_user_phone2 : row.f_user_phone }}
321
+ <img src="../../../assets/phone.png" style="width: 6%"
322
+ v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_user_phone2 ? row.f_user_phone2 : row.f_user_phone)'/>
323
+ </p>
324
+ </div>
325
+
326
+ <div class="col-xs-12">
327
+ <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
328
+ <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}</p>
329
+ </div>
330
+
331
+ <!-- <div class="row">-->
332
+ <!-- <p class="panel-title col-xs-4 text-left font">计划年份</p>-->
333
+ <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_year }}</p>-->
334
+ <!-- </div>-->
335
+ <!-- <div class="row">-->
336
+ <!-- <p class="panel-title col-xs-4 text-left font">计划月份</p>-->
337
+ <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_month }}</p>-->
338
+ <!-- </div>-->
339
+ <!-- <div class="row">-->
340
+ <!-- <p class="panel-title col-xs-4 text-left font">预约时间</p>-->
341
+ <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_prearranged_date }}</p>-->
342
+ <!-- </div>-->
343
+ <!--<div class="row">-->
344
+ <!--<p class="panel-title col-xs-4 text-left font">上次安检状态</p>-->
345
+ <!--<p class="panel-title col-xs-8 text-left input-font">{{ row.f_last_check_state }}</p>-->
346
+ <!--</div>-->
347
+ <div class="col-xs-6">
348
+ <p class="panel-title col-xs-5 text-left font"><b>安检状态:</b></p>
349
+ <p class="panel-title col-xs-7 text-left input-font">{{
350
+ row.f_state == '已检' ? '临时保存' : row.f_state
351
+ }}</p>
352
+ </div>
353
+ <div class="col-xs-6">
354
+ <p class="panel-title col-xs-5 text-left font"><b>上传状态:</b></p>
355
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_upload_state }}</p>
356
+ </div>
357
+ <div class="col-xs-6">
358
+ <p class="panel-title col-xs-5 text-left font"><b>安检类型:</b></p>
359
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_safecheck_type }}</p>
360
+ </div>
361
+ <!--<div class="col-xs-12">-->
362
+ <!--<p class="panel-title col-xs-5 text-left font"><b>送气期限:</b></p>-->
363
+ <!--<p class="panel-title col-xs-7 text-left input-font">{{timeSet(row.f_issue_time)}}</p>-->
364
+ <!--</div>-->
365
+ <div class="col-xs-12">
366
+ <button type="button" name="button" class="btn btn-primary"
367
+ style="background-color:#499edf;float: right" @click="$parent.$parent.$parent.inspect(row)">处理
368
+ </button>
369
+ <button type="button" name="button" class="btn btn-primary"
370
+ style="background-color:#499edf;float: right;margin-right:10px;"
371
+ @click="$parent.$parent.$parent.queryplan(row.id)">转发
372
+ </button>
373
+ <!--<button type="button" class="btn btn-default" @click="$parent.$parent.$parent.ceshi">确认2</button>-->
374
+ </div>
375
+ <!-- <div class="row text-right" v-show="row.f_upload_state != '已传'" >-->
376
+ <!-- <button type="button" class="btn yybtn-color" v-on:click.stop.prevent='$parent.$parent.$parent.reserve($index)'>预约</button>&nbsp;-->
377
+ <!-- <button type="button" class="btn qxbtn-color" v-if ='row.f_prearranged_date'-->
378
+ <!-- v-on:click.stop.prevent='$parent.$parent.$parent.cancelReserve($index, row.id)'>取消预约</button>-->
379
+ <!-- </div>-->
380
+ </div>
381
+ </div>
382
+ </div>
383
+ </div>
384
+ </list>
385
+ </criteria-paged>
386
+ <modal :show.sync="showModal">
387
+ <div slot="modal-header" class="modal-header">
388
+ <h4 class="modal-title">
389
+ 选择预约时间
390
+ </h4>
391
+ </div>
392
+ <div slot="modal-body" class="modal-body">
393
+ <input type="datetime-local" v-model="f_preset_dt">
394
+ </div>
395
+ <div slot="modal-footer" class="modal-footer">
396
+ <button type="button" class="btn btn-default" @click="genuineReserve">确认</button>
397
+ </div>
398
+ </modal>
399
+ <!--<back-page :need-back='true' @flag="$back()"></back-page>-->
400
+ <modal :show.sync="showModal2" v-ref:modal>
401
+ <div slot="modal-header" class="modal-header">
402
+ <h4 class="modal-title">
403
+ 选择计划
404
+ </h4>
405
+ </div>
406
+ <div slot="modal-body" class="modal-body">
407
+ <div class="col-xs-12">
408
+
409
+ <div class="col-xs-4">
410
+ <v-select :value.sync="check" v-model='check'
411
+ :value-single="true"
412
+ class="select_list select"
413
+ :options='checkers' placeholder='安检员'
414
+ close-on-select width="100%"></v-select>
415
+ </div>
416
+
417
+ <div class="col-xs-1">
418
+ <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
419
+ </div>
420
+ <div class="col-xs-4" style="padding-left: 2px">
421
+ <input class="select-style" placeholder="计划名称" type="text" v-model="plan"
422
+ style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
423
+ </div>
424
+ <div class="col-xs-1">
425
+ <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
426
+ </div>
427
+ <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
428
+ <div class="col-xs-2" style="float: right">
429
+ <button type="button" class="btn btn-primary" @click="plansearch"
430
+ style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">
431
+ 查询
432
+ </button>
433
+ </div>
434
+ </div>
435
+ <table class="table table_sy">
436
+ <thead>
437
+ <tr>
438
+ <th style="width: 30px"></th>
439
+ <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
440
+ </tr>
441
+ </thead>
442
+ <tbody>
443
+ <tr v-for="row in planoption">
444
+ <td @click="select(row, $index)">{{ row.selected == true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;' }}</td>
445
+ <td @click="select(row, $index)" style="text-align: center">{{ row.label }}</td>
446
+
447
+
448
+ </tr>
449
+ </tbody>
450
+ </table>
451
+ </div>
452
+ <div slot="modal-footer" class="modal-footer">
453
+ <button class="btn btn-default" @click="isok()">确认</button>
454
+ <button class="btn btn-default" @click="iscancel()">取消</button>
455
+ </div>
456
+ </modal>
457
+ <modal :show.sync="showModal3" v-ref:modal>
458
+ <div slot="modal-header" class="modal-header">
459
+ <h4 class="modal-title">
460
+ 选择计划
461
+ </h4>
462
+ </div>
463
+ <div slot="modal-body" class="modal-body">
464
+ <div class="col-xs-12">
465
+
466
+ <div class="col-xs-4">
467
+ <v-select :value.sync="check" v-model='check'
468
+ :value-single="true"
469
+ class="select_list select"
470
+ :options='checkers' placeholder='安检员'
471
+ close-on-select width="100%"></v-select>
472
+ </div>
473
+
474
+ <div class="col-xs-1">
475
+ <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
476
+ </div>
477
+ <div class="col-xs-4" style="padding-left: 2px">
478
+ <input class="select-style" placeholder="计划名称" type="text" v-model="plan"
479
+ style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
480
+ </div>
481
+ <div class="col-xs-1">
482
+ <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
483
+ </div>
484
+ <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
485
+ <div class="col-xs-2" style="float: right">
486
+ <button type="button" class="btn btn-primary" @click="plansearch"
487
+ style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">
488
+ 查询
489
+ </button>
490
+ </div>
491
+ </div>
492
+ <table class="table table_sy">
493
+ <thead>
494
+ <tr>
495
+ <th style="width: 30px"></th>
496
+ <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
497
+ </tr>
498
+ </thead>
499
+ <tbody>
500
+ <tr v-for="row in planoption">
501
+ <td @click="select(row, $index)">{{ row.selected == true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;' }}</td>
502
+ <td @click="select(row, $index)" style="text-align: center">{{ row.label }}</td>
503
+
504
+
505
+ </tr>
506
+ </tbody>
507
+ </table>
508
+ </div>
509
+ <div slot="modal-footer" class="modal-footer">
510
+ <button class="btn btn-default" @click="manyisok()">确认</button>
511
+ <button class="btn btn-default" @click="iscancel()">取消</button>
512
+ </div>
513
+ </modal>
514
+ </div>
515
+
516
+ </template>
517
+
518
+ <script>
519
+ import LocalPagedList from '../../../plugins/LocalPagedList'
520
+ import Vue from 'vue'
521
+ import {PagedList, HttpResetClass} from 'vue-client'
522
+ import * as Util from '../../Util'
523
+ import co from 'co'
524
+
525
+ let select = function* (self) {
526
+ let http = new HttpResetClass()
527
+ http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
528
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
529
+ userid: Vue.user.id
530
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
531
+ //tag
532
+ self.checkers.push({label: '全部', value: ''})
533
+ res.data.forEach((checker) => {
534
+ self.checkers.push({label: checker.name, value: checker.id})
535
+ })
536
+ })
537
+ }
538
+ export default {
539
+ title: '无计划安检查询',
540
+ data() {
541
+ return {
542
+ f_filialeids: '(' + Vue.user.orgid + ')',
543
+ //f_filialeids:'(305)',
544
+ planparam: [],
545
+ check: '',
546
+ plan: '',
547
+ planid: '',
548
+ model: Vue.android ? new LocalPagedList('androidGetuserinfo', 20, {condition: 'this.condition'}) : new PagedList('AndroidRest/rs/sql/androidGetuserinfo', 20, {condition: 'this.condition'}),
549
+ showModal: false,
550
+ showModal2: false,
551
+ showModal3: false,
552
+ needid: '',
553
+ criteriaShow: false,
554
+ planoption: [],
555
+ condition: '',
556
+ checkers: [],
557
+ param: null,
558
+ f_preset_dt: Util.to3339TimeString(),
559
+ flow_direction: [
560
+ {label: '请选择挂表方式', value: ''},
561
+ {label: '左表', value: '左表'},
562
+ {label: '右表', value: '右表'}
563
+ ],
564
+ check_states: [
565
+ {label: '请选择安检状态', value: ''},
566
+ {label: '未检', value: '未检'},
567
+ {label: '临时保存', value: '已检'},
568
+ ],
569
+ last_check_states: [
570
+ {label: '请选择上次安检状态', value: ''},
571
+ {label: '入户', value: '入户'},
572
+ {label: '拒检', value: '拒检'},
573
+ {label: '到访不遇', value: '到访不遇'},
574
+ {label: '未使用天然气', value: '未使用天然气'}
575
+ ],
576
+ upload_states: [
577
+ {label: '请选择上传状态', value: ''},
578
+ {label: '未传', value: '未传'},
579
+ {label: '已传', value: '已传'}
580
+ ],
581
+ user_types: [
582
+ {label: '请选择用户类型', value: ''},
583
+ {label: '民用', value: '民用'},
584
+ {label: '非民用', value: '非民用'},
585
+ ],
586
+ verify_state: [
587
+ {label: '请选择审核状态', value: ''},
588
+ {label: '未审核', value: '未审核'},
589
+ {label: '打回', value: '打回'}
590
+ ],
591
+ residentialAreaOptions: [],
592
+ buildOptions: [],
593
+ unitOptions: [],
594
+ planNameOptions: [],
595
+ upcomingCount: 0,
596
+ doneCount: 0,
597
+ tempSaveCount: 0,
598
+ allPlanCount: 0
599
+ }
600
+ },
601
+ ready() {
602
+ this.getAllArea()
603
+ this.getAllPlanName()
604
+ this.selfSearch()
605
+ let gen = select(this)
606
+ co(gen)
607
+ },
608
+ mounted() {
609
+ //tag
610
+ if (window.history && window.history.pushState) {
611
+ history.pushState(null, null, document.URL);
612
+ window.addEventListener('popstate', this.fun, false);//false阻止默认事件
613
+ }
614
+ },
615
+ destroyed() {
616
+ //tag
617
+ window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
618
+ },
619
+ methods: {
620
+ fun() {
621
+ //tag
622
+ //tag
623
+ },
624
+ iscancel() {
625
+ this.showModal2 = false
626
+ this.showModal3 = false
627
+ this.planoption = []
628
+ },
629
+ timeSet(val) {
630
+ return val
631
+ },
632
+ async isok() {
633
+ if (this.planoption.length == 0) {
634
+ this.$showMessage("请选择计划")
635
+ return false
636
+ }
637
+ for (let i = 0; i < this.planoption.length; i++) {
638
+ if (this.planoption[i]["selected"] == true) {
639
+ this.planid = this.planoption[i].value
640
+ break
641
+ }
642
+ }
643
+ if (this.planid == '') {
644
+ this.$showMessage("请选择计划")
645
+ return false
646
+ }
647
+ await this.okput()
648
+ },
649
+ async manyisok() {
650
+ if (this.planoption.length == 0) {
651
+ this.$showMessage("请选择计划")
652
+ return false
653
+ }
654
+ for (let i = 0; i < this.planoption.length; i++) {
655
+ if (this.planoption[i]["selected"] == true) {
656
+ this.planid = this.planoption[i].value
657
+ break
658
+ }
659
+ }
660
+ if (this.planid == '') {
661
+ this.$showMessage("请选择计划")
662
+ return false
663
+ }
664
+ await this.manyokput()
665
+ },
666
+ changenull() {
667
+ this.showModal2 = false
668
+ this.showModal3 = false
669
+ this.planoption = []
670
+ this.plan = ''
671
+ this.check = ''
672
+ },
673
+ async okput() {
674
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {
675
+ data: {
676
+ condition: `it.id='` + this.needid + `'`,
677
+ f_plan_id: this.planid,
678
+ switchCheckAll: false,
679
+ checkAll: false,
680
+ f_operator: Vue.user.name
681
+ }
682
+ })
683
+ await this.changenull()
684
+ await this.getNewOrder()
685
+ },
686
+ async manyokput() {
687
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {
688
+ data: {
689
+ columnName: "it.id",
690
+ condition: "1=1",
691
+ f_plan_id: this.planid,
692
+ switchCheckAll: true,
693
+ param: this.planparam,
694
+ checkAll: false,
695
+ f_operator: Vue.user.name
696
+ }
697
+ })
698
+ await this.changenull()
699
+ await this.getNewOrder()
700
+ },
701
+ async plansearch() {
702
+ this.planoption = []
703
+ let condition = `f_checker_id=` + this.check + ` and f_plan_name like '%` + this.plan + `%'`
704
+ if (!this.check) {
705
+ condition = `f_plan_name like '%` + this.plan + `%'`
706
+ }
707
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {
708
+ data: {
709
+ condition: condition,
710
+ f_filialeids: this.f_filialeids,
711
+ groupitem: '',
712
+ orderitem: 'id'
713
+ }
714
+ })
715
+ let resoult = res.data
716
+ for (let i = 0; i < resoult.length; i++) {
717
+ this.planoption.push({label: resoult[i].f_plan_name, selected: false, value: resoult[i].id})
718
+ }
719
+ },
720
+
721
+ select(row, idx) {
722
+ this.$set('planoption[' + idx + '].selected', true)
723
+ for (let i = 0; i < this.planoption.length; i++) {
724
+ if (i != idx) {
725
+ this.planoption[i]["selected"] = false
726
+ }
727
+ }
728
+ },
729
+ planclose() {
730
+ this.showModal2 = false
731
+ this.showModal3 = false
732
+ },
733
+ queryplan(val) {
734
+ this.needid = val
735
+ this.showModal2 = true
736
+ },
737
+ queryplanmany() {
738
+
739
+ this.showModal3 = true
740
+ },
741
+ reload() {
742
+ // this.getAllArea()
743
+ // this.getAllPlanName()
744
+ this.selfSearch()
745
+ },
746
+ cancelReserve(idx, id) {
747
+ if (Vue.android) {
748
+ let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
749
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
750
+ if (res.code == 200) {
751
+ this.$showMessage("取消预约成功")
752
+ }
753
+ } else {
754
+ this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
755
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
756
+ if (repanse.data.code == 200) {
757
+ alert("取消预约成功!")
758
+ }
759
+ })
760
+ }
761
+ },
762
+ genuineReserve() {
763
+ if (Vue.android) {
764
+ if (!this.f_preset_dt) {
765
+ this.$showMessage('请选择一个日期')
766
+ return
767
+ }
768
+ let pdt = this.f_preset_dt.replace('T', ' ')
769
+ let respanse = this.$androidUtil.bzLogic('BookingCheck', {id: this.model.rows[this.param].id, dt: pdt})
770
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
771
+ if (respanse.code == 200) {
772
+ this.$showMessage("预约成功!")
773
+ }
774
+ this.showModal = false
775
+ } else {
776
+ if (!this.f_preset_dt) {
777
+ alert('请选择一个日期')
778
+ return
779
+ }
780
+ let pdt = this.f_preset_dt.replace('T', ' ')
781
+ this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: pdt}).then((res) => {
782
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
783
+ if (res.data.code == 200) {
784
+ alert("预约成功!")
785
+ }
786
+ this.showModal = false
787
+ })
788
+ }
789
+ },
790
+ inspect(row) {
791
+ var _this = this
792
+ //tag
793
+ if (row.f_upload_state == '未传' || (row.f_upload_state == '已传' && row.f_state == '未检' && row.f_no_checkplan != '无计划安检')) {
794
+ _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/wxFetchPlanUserfiles`, {data: {f_userid: row.f_userinfoid}}).then((response) => {
795
+ if(response.data.length == 0){
796
+ this.$showMessage("表档案信息有误!请联系管理员")
797
+ return
798
+ }
799
+ //tag)
800
+ row['f_plan_meters'] = response.data
801
+ var pardate = {
802
+ _this: _this,
803
+ title: '安全检查',
804
+ safe: true
805
+ }
806
+ _this.$dispatch('gotoson', pardate)
807
+ //tag
808
+ _this.$goto('safecheck-order-v', {
809
+ f_plan_id: row.f_plan_id,
810
+ item: row,
811
+ role: 'inspect',
812
+ recording: 'ready',
813
+ parentPage: 'CurrentCreate'
814
+ }, 'self', _this.reload)
815
+ })
816
+ } else {
817
+ this.$showMessage("该安检单已被上传!")
818
+ }
819
+ },
820
+ makeAPhoneCall(phoneNumber) {
821
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
822
+ },
823
+ reserve(idx) {
824
+ this.param = idx
825
+ this.showModal = true
826
+ },
827
+ search(args) {
828
+ this.model.rows = []
829
+ this.model.search(args.condition, args.model)
830
+ },
831
+ selfSearch() {
832
+ this.getPlanCount()
833
+ let condition = ""
834
+ if (this.$refs.paged.$refs.cri.model.f_residential_area)
835
+ condition += " and ti.f_residential_area like '" + this.$refs.paged.$refs.cri.model.f_residential_area + "'"
836
+ if (this.$refs.paged.$refs.cri.model.f_building)
837
+ condition += " and ti.f_building like '%" + this.$refs.paged.$refs.cri.model.f_building + "%'"
838
+ if (this.$refs.paged.$refs.cri.model.f_unit)
839
+ condition += " and ti.f_unit like '%" + this.$refs.paged.$refs.cri.model.f_unit + "%'"
840
+ if (this.$refs.paged.$refs.cri.model.f_plan_name)
841
+ condition += " and f_plan_name like '%" + this.$refs.paged.$refs.cri.model.f_plan_name + "%'"
842
+ // if(this.$refs.paged.$refs.cri.model.f_plan_year)
843
+ // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
844
+ // if(this.$refs.paged.$refs.cri.model.f_plan_month)
845
+ // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
846
+ if (this.$refs.paged.$refs.cri.model.f_userinfo_code)
847
+ condition += " and ti.f_userinfo_code like '%" + this.$refs.paged.$refs.cri.model.f_userinfo_code + "%'"
848
+ if (this.$refs.paged.$refs.cri.model.f_keyword)
849
+ condition += " and ti.f_address like '%" + this.$refs.paged.$refs.cri.model.f_keyword + "%'"
850
+ if (this.$refs.paged.$refs.cri.model.f_user_name)
851
+ condition += " and ti.f_user_name like '%" + this.$refs.paged.$refs.cri.model.f_user_name + "%'"
852
+ if (this.$refs.paged.$refs.cri.model.f_state[0])
853
+ condition += " and ti.f_state='" + this.$refs.paged.$refs.cri.model.f_state[0] + "'"
854
+ // if(this.$refs.paged.$refs.cri.model.f_last_state[0])
855
+ // condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
856
+ if (this.$refs.paged.$refs.cri.model.f_user_type[0])
857
+ condition += " and ti.f_user_type='" + this.$refs.paged.$refs.cri.model.f_user_type[0] + "'"
858
+ if (this.$refs.paged.$refs.cri.model.f_meter_no)
859
+ condition += " and tm.f_meter_no like '%" + this.$refs.paged.$refs.cri.model.f_meter_no + "%'"
860
+ // if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
861
+ // condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
862
+ //tag
863
+ this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成') or (f_state = '未检'))" + condition)
864
+ },
865
+ getNewOrder() {
866
+ HostApp.__this__ = this
867
+ HostApp.logicWithHint({
868
+ // logic别名,key必须为logic
869
+ 'logic': 'SafeCheckServiceTimeOut',
870
+ // 回调执行方法名,key必须为callback
871
+ 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
872
+ // logic执行需要的业务参数
873
+ 'data': {params: ''},
874
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
875
+ // 执行回调方法传入key为backresult
876
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
877
+ 'backresult': 1
878
+ })
879
+ },
880
+ getNewOrderCallBack() {
881
+ this.selfSearch()
882
+ this.getAllArea()
883
+ this.getAllPlanName()
884
+ },
885
+ hidden() {
886
+ this.criteriaShow = !this.criteriaShow
887
+ },
888
+ getAllArea() {
889
+ this.residentialAreaOptions = []
890
+ this.buildOptions = []
891
+ this.unitOptions = []
892
+ this.$refs.paged.$refs.cri.model.f_residential_area = ''
893
+ this.$refs.paged.$refs.cri.model.f_building = ''
894
+ this.$refs.paged.$refs.cri.model.f_unit = ''
895
+ let criteria = {
896
+ items: 'f_residential_area',
897
+ tablename: 't_check_plan_item',
898
+ condition: `f_residential_area IS NOT NULL AND f_residential_area != '' AND f_state <> '已检'`,
899
+ groupitem: 'f_residential_area'
900
+ }
901
+ let result = HostApp._executeTask({
902
+ 'type': 'sql',
903
+ 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
904
+ })
905
+ //tag)
906
+ if (result.code == 200) {
907
+ result.data.rows.forEach(item => this.residentialAreaOptions.push({
908
+ label: item.f_residential_area,
909
+ value: item.f_residential_area
910
+ }))
911
+ }
912
+ //tag)
913
+ },
914
+ getbuilds(f_residential_area) {
915
+ //tag)
916
+ this.buildOptions = []
917
+ this.unitOptions = []
918
+ this.$refs.paged.$refs.cri.model.f_building = ''
919
+ this.$refs.paged.$refs.cri.model.f_unit = ''
920
+ if (!f_residential_area) {
921
+ return
922
+ }
923
+ let criteria = {
924
+ items: 'f_building',
925
+ tablename: 't_check_plan_item',
926
+ condition: `f_building IS NOT NULL AND f_building != '' AND f_state <> '已检' AND f_residential_area = '${f_residential_area}'`,
927
+ groupitem: 'f_building'
928
+ }
929
+ let result = HostApp._executeTask({
930
+ 'type': 'sql',
931
+ 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
932
+ })
933
+ if (result.code == 200) {
934
+ result.data.rows.forEach(item => this.buildOptions.push({label: item.f_building, value: item.f_building}))
935
+ }
936
+ //tag)
937
+ },
938
+ getUnits(f_building) {
939
+ f_building = f_building[0]
940
+ //tag)
941
+ this.unitOptions = []
942
+ this.$refs.paged.$refs.cri.model.f_unit = ''
943
+ if (!f_building) {
944
+ return
945
+ }
946
+ let criteria = {
947
+ items: 'f_unit',
948
+ tablename: 't_check_plan_item',
949
+ condition: `f_unit IS NOT NULL AND f_unit != '' AND f_state <> '已检' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
950
+ groupitem: 'f_unit'
951
+ }
952
+ let result = HostApp._executeTask({
953
+ 'type': 'sql',
954
+ 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
955
+ })
956
+ if (result.code == 200) {
957
+ result.data.rows.forEach(item => this.unitOptions.push({label: item.f_unit, value: item.f_unit}))
958
+ }
959
+ //tag)
960
+ },
961
+ getPlanCount() {
962
+ this.upcomingCount = 0
963
+ this.tempSaveCount = 0
964
+ this.doneCount = 0
965
+ this.allPlanCount = 0
966
+ let criteria = {
967
+ items: 'count(id) count',
968
+ tablename: 't_check_plan_item',
969
+ condition: `f_state = '未检'`,
970
+ groupitem: 'f_state'
971
+ }
972
+ let result = HostApp._executeTask({
973
+ 'type': 'sql',
974
+ 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
975
+ })
976
+ if (result.code && result.code == 200) {
977
+ if (result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
978
+ this.upcomingCount = result.data.rows[0].count
979
+ }
980
+ }
981
+ criteria = {
982
+ items: 'count(id) count',
983
+ tablename: 't_check_plan_item',
984
+ condition: `(f_complete = '' or f_complete = null or f_complete = '未完成') AND f_state = '已检'`,
985
+ groupitem: 'f_state'
986
+ }
987
+ result = HostApp._executeTask({
988
+ 'type': 'sql',
989
+ 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
990
+ })
991
+ if (result.code && result.code == 200) {
992
+ if (result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
993
+ this.tempSaveCount = result.data.rows[0].count
994
+ }
995
+ }
996
+ criteria = {
997
+ items: 'count(id) count',
998
+ tablename: 't_check_plan_item',
999
+ condition: `f_complete = '已完成' AND f_state = '已检'`,
1000
+ groupitem: 'f_state'
1001
+ }
1002
+ result = HostApp._executeTask({
1003
+ 'type': 'sql',
1004
+ 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
1005
+ })
1006
+ if (result.code && result.code == 200) {
1007
+ if (result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
1008
+ this.doneCount = result.data.rows[0].count
1009
+ }
1010
+ }
1011
+ this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
1012
+
1013
+ //tag
1014
+ //tag
1015
+ //tag
1016
+ //tag
1017
+ },
1018
+ getAllPlanName() {
1019
+ this.planNameOptions = []
1020
+ this.$refs.paged.$refs.cri.model.f_plan_name = ''
1021
+ let criteria = {
1022
+ items: 'f_plan_name',
1023
+ tablename: 't_check_plan',
1024
+ condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
1025
+ groupitem: 'f_plan_name'
1026
+ }
1027
+ let result = HostApp._executeTask({
1028
+ 'type': 'sql',
1029
+ 'data': {'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}
1030
+ })
1031
+ //tag)
1032
+ if (result.code == 200) {
1033
+ result.data.rows.forEach(item => this.planNameOptions.push({label: item.f_plan_name, value: item.f_plan_name}))
1034
+ }
1035
+ //tag)
1036
+ },
1037
+ setPlanParam(detailsType, event) {
1038
+ if (event.srcElement.checked) {
1039
+ this.planparam.push(detailsType)
1040
+ //tag
1041
+ } else {
1042
+ if (this.planparam.length > 0) {
1043
+ let planid = this.planparam.findIndex((value) => {
1044
+ return value === detailsType
1045
+ })
1046
+ this.planparam.splice(planid, 1)
1047
+ //tag
1048
+
1049
+ }
1050
+
1051
+ }
1052
+ }
1053
+ }
1054
+ }
1055
+ </script>