safecheck-client 3.0.35-12 → 3.0.35-14

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