safecheck-client 3.0.30-78 → 3.0.30-79

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