safecheck-client 3.0.35-14 → 3.0.35-15

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,1067 +1,1067 @@
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-4">
231
- <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
232
- <label for="f_user_type" class="font text-left">用户类型:</label>
233
- </div>
234
- <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
235
- :width="'60%'"
236
- :options='$parent.$parent.user_types' placeholder='请选择用户类型'
237
- v-model="model.f_user_type" condition="f_user_type='{}'" close-on-select clear-button></v-select>
238
- </div>
239
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
240
- <div class="col-xs-6">
241
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
242
- <label class="font text-left">到访不遇:</label>
243
- </div>
244
- <div class="col-xs-8" >
245
- <input class="search_input input-font" type="number"
246
- v-model=model.f_check_version condition="f_check_version <= '{}'" />
247
- </div>
248
- </div>
249
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
250
- <div class="col-xs-6" style="text-align: center">
251
- <span class="font text-left">待办{{$parent.$parent.upcomingCount}}条</span>
252
- </div>
253
- <div class="col-xs-6" style="text-align: center">
254
- <span class="font text-left">已办{{$parent.$parent.doneCount}}条</span>
255
- </div>
256
- <div class="col-xs-6" style="text-align: center">
257
- <span class="font text-left">临时保存{{$parent.$parent.tempSaveCount}}条</span>
258
- </div>
259
- <div class="col-xs-6" style="text-align: center">
260
- <span class="font text-left">总共{{$parent.$parent.allPlanCount}}条</span>
261
- </div>
262
- </div>
263
-
264
- <div class="row text-center" style="margin-top: 20px;">
265
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="$parent.$parent.selfSearch">查询</button>
266
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%; margin-left: 10px" @click="$parent.$parent.queryplanmany">转发</button>
267
- <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>
268
- <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">
269
- </div>
270
- <div class="col-sm-12">
271
-
272
- </div>
273
- <!--<div class="row app-btn">-->
274
- <!--<button class="btn btn-primary col-xs-6" type="button" @click="search"><span class="glyphicon glyphicon-search" style="margin-right: 20px;">查询</span></button>-->
275
- <!--</div>-->
276
- <div style="height:30px;"></div>
277
- </form>
278
- </div>
279
- </criteria>
280
- <list :model="model" partial='list'>
281
- <div partial>
282
- <div class="auto app-text" style="margin-top: 5px;">
283
- <div class="panel" style="padding: 10px 10px 5px 10px;">
284
- <div class="panel-body panel-self">
285
-
286
- <div class="col-xs-12">
287
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
288
- <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}</p>
289
- <p class="panel-title col-xs-2 text-left input-font" style="width: 5%;float:right">
290
- <input type="checkbox" @click="$parent.$parent.$parent.setPlanParam(row.id, $event)"/>
291
- </p>
292
- </div>
293
- <div class="col-xs-12">
294
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
295
- <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
296
- </div>
297
- <div class="col-xs-12">
298
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>签订供气合同:</b></p>
299
- <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.0?'是':'否' }}</p>
300
- </div>
301
- <div class="col-xs-6">
302
- <p class="panel-title col-xs-5 text-left font"><b>用户类型:</b></p>
303
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_user_type }}
304
- </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_plan_name }}</p>
309
- </div>
310
- <!-- <div class="col-xs-6">-->
311
- <!-- <p class="panel-title col-xs-5 text-left font"><b>小区名称:</b></p>-->
312
- <!-- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_residential_area }}</p>-->
313
- <!-- </div>-->
314
- <div class="col-xs-12">
315
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b></p>
316
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone2 ? row.f_user_phone2 : row.f_user_phone }}
317
- <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>
318
- </p>
319
- </div>
320
- <div class="col-xs-12">
321
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>备用电话:</b></p>
322
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_rent_phone}}
323
- <img v-if="row.f_rent_phone" src="../../../assets/phone.png" style="width: 6%" v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_rent_phone)'></img>
324
- </p>
325
- </div>
326
- <div class="col-xs-12">
327
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>租户电话:</b></p>
328
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_zuhu_phone }}
329
- <img v-if="row.f_zuhu_phone" src="../../../assets/phone.png" style="width: 6%" v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_zuhu_phone)'></img>
330
- </p>
331
- </div>
332
-
333
- <div class="col-xs-12">
334
- <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
335
- <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}</p>
336
- </div>
337
-
338
- <!-- <div class="row">-->
339
- <!-- <p class="panel-title col-xs-4 text-left font">计划年份</p>-->
340
- <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_year }}</p>-->
341
- <!-- </div>-->
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_month }}</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_prearranged_date }}</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_last_check_state }}</p>-->
353
- <!--</div>-->
354
- <div class="col-xs-6">
355
- <p class="panel-title col-xs-5 text-left font"><b>安检状态:</b></p>
356
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_state == '已检'?'临时保存':row.f_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_upload_state }}</p>
361
- </div>
362
- <div class="col-xs-12" v-if="row.f_prearranged_date !=null">
363
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>预约时间:</b></p>
364
- <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_prearranged_date }}</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_check_version }}</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_prearranged_date }}</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_remark }}</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">{{timeSet(row.f_issue_time)}}</p>-->
385
- <!--</div>-->
386
- <div class="col-xs-12">
387
- <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right" @click="$parent.$parent.$parent.inspect(row)">处理</button>
388
- <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>
389
- <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right" @click="$parent.$parent.$parent.waitInspect(row)">稍候处理</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
- </div>
406
- <div slot="modal-body" class="modal-body">
407
- <div class="form-group col-sm-12" >
408
- <label class="font_normal_body">选择预约时间</label>
409
- <datepicker
410
- :value.sync="tempItem.f_prearranged_date"
411
- placeholder='选择预约时间' style="width: 60%"
412
- :disabled-days-of-week="[]"
413
- :format="'yyyy-MM-dd'"
414
- :show-rest-button="reset"
415
- v-model="tempItem.f_prearranged_date">
416
- </datepicker>
417
- </div>
418
- <div class="form-group col-sm-12" >
419
- <label class="font_normal_body">填写备注</label>
420
- <input type="text" v-model="tempItem.f_remark">
421
- </div>
422
- </div>
423
- <div slot="modal-footer" class="modal-footer">
424
- <button type="button" class="btn btn-default" @click="genuineReserve">确认</button>
425
- </div>
426
- </modal>
427
- <!--<back-page :need-back='true' @flag="$back()"></back-page>-->
428
- <modal :show.sync="showModal2" v-ref:modal>
429
- <div slot="modal-header" class="modal-header">
430
- <h4 class="modal-title">
431
- 选择计划
432
- </h4>
433
- </div>
434
- <div slot="modal-body" class="modal-body">
435
- <div class="col-xs-12">
436
-
437
- <div class="col-xs-4">
438
- <v-select :value.sync="check" v-model='check'
439
- :value-single="true"
440
- class="select_list select"
441
- :options='checkers' placeholder='安检员'
442
- close-on-select width="100%"></v-select>
443
- </div>
444
-
445
- <div class="col-xs-1">
446
- <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
447
- </div>
448
- <div class="col-xs-4" style="padding-left: 2px">
449
- <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
450
- </div>
451
- <div class="col-xs-1" >
452
- <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
453
- </div>
454
- <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
455
- <div class="col-xs-2" style="float: right">
456
- <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>
457
- </div>
458
- </div>
459
- <table class="table table_sy">
460
- <thead>
461
- <tr>
462
- <th style="width: 30px"></th>
463
- <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
464
- </tr>
465
- </thead>
466
- <tbody>
467
- <tr v-for="row in planoption">
468
- <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
469
- <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
470
- </tr>
471
- </tbody>
472
- </table>
473
- </div>
474
- <div slot="modal-footer" class="modal-footer">
475
- <button class="btn btn-default" @click="isok()">确认</button>
476
- <button class="btn btn-default" @click="iscancel()">取消</button>
477
- </div>
478
- </modal>
479
- <modal :show.sync="showModal3" v-ref:modal>
480
- <div slot="modal-header" class="modal-header">
481
- <h4 class="modal-title">
482
- 选择计划
483
- </h4>
484
- </div>
485
- <div slot="modal-body" class="modal-body">
486
- <div class="col-xs-12">
487
-
488
- <div class="col-xs-4">
489
- <v-select :value.sync="check" v-model='check'
490
- :value-single="true"
491
- class="select_list select"
492
- :options='checkers' placeholder='安检员'
493
- close-on-select width="100%"></v-select>
494
- </div>
495
-
496
- <div class="col-xs-1">
497
- <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
498
- </div>
499
- <div class="col-xs-4" style="padding-left: 2px">
500
- <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
501
- </div>
502
- <div class="col-xs-1" >
503
- <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
504
- </div>
505
- <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
506
- <div class="col-xs-2" style="float: right">
507
- <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>
508
- </div>
509
- </div>
510
- <table class="table table_sy">
511
- <thead>
512
- <tr>
513
- <th style="width: 30px"></th>
514
- <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
515
- </tr>
516
- </thead>
517
- <tbody>
518
- <tr v-for="row in planoption">
519
- <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
520
- <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
521
- </tr>
522
- </tbody>
523
- </table>
524
- </div>
525
- <div slot="modal-footer" class="modal-footer">
526
- <button class="btn btn-default" @click="manyisok()">确认</button>
527
- <button class="btn btn-default" @click="iscancel()">取消</button>
528
- </div>
529
- </modal>
530
- </div>
531
-
532
- </template>
533
-
534
- <script>
535
- import LocalPagedList from '../../../plugins/LocalPagedList'
536
- import Vue from 'vue'
537
- import { PagedList,HttpResetClass } from 'vue-client'
538
- import * as Util from '../../Util'
539
- import co from 'co'
540
- let select = function * (self) {
541
- let http = new HttpResetClass()
542
- http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
543
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
544
- userid: Vue.user.id
545
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
546
- //tag
547
- self.checkers.push({label:'全部',value:''})
548
- if(res.code=!500){
549
- res.data.forEach((checker)=>{
550
- self.checkers.push({label:checker.name,value:checker.id})
551
- })
552
- }
553
-
554
- })
555
- }
556
- export default {
557
- title: '无计划安检查询',
558
- props: ['planName'],
559
- data() {
560
- return {
561
- f_filialeids:'('+Vue.user.orgid+')',
562
- //f_filialeids:'(305)',
563
- planparam:[],
564
- check:'',
565
- tempItem:{},
566
- plan:'',
567
- planid:'',
568
- model:Vue.android? new LocalPagedList('androidGetuserinfo',20,{condition:'this.condition'}): new PagedList( 'AndroidRest/rs/sql/androidGetuserinfo',20,{condition:'this.condition'}),
569
- showModal: false,
570
- showModal2:false,
571
- showModal3:false,
572
- needid:'',
573
- criteriaShow: false,
574
- planoption:[],
575
- condition:'',
576
- checkers:[],
577
- param: null,
578
- f_preset_dt : Util.to3339TimeString(),
579
- flow_direction:[
580
- {label: '请选择挂表方式', value: ''},
581
- {label: '左表', value: '左表'},
582
- {label: '右表', value: '右表'}
583
- ],
584
- check_states: [
585
- {label: '请选择安检状态', value: ''},
586
- {label: '未检', value: '未检'},
587
- {label: '临时保存', value: '已检'},
588
- ],
589
- last_check_states: [
590
- {label: '请选择上次安检状态', value: ''},
591
- {label: '入户', value: '入户'},
592
- {label: '拒检', value: '拒检'},
593
- {label: '到访不遇', value: '到访不遇'},
594
- {label: '未使用天然气', value: '未使用天然气'}
595
- ],
596
- upload_states: [
597
- {label: '请选择上传状态', value: ''},
598
- {label: '未传', value: '未传'},
599
- {label: '已传', value: '已传'}
600
- ],
601
- user_types: [
602
- {label: '请选择用户类型', value: ''},
603
- {label: '民用', value: '民用'},
604
- {label: '非民用', value: '非民用'},
605
- ],
606
- verify_state: [
607
- {label: '请选择审核状态', value: ''},
608
- {label: '未审核', value: '未审核'},
609
- {label: '打回', value: '打回'}
610
- ],
611
- residentialAreaOptions: [],
612
- buildOptions: [],
613
- unitOptions: [],
614
- planNameOptions: [],
615
- upcomingCount: 0,
616
- doneCount: 0,
617
- tempSaveCount: 0,
618
- allPlanCount: 0
619
- }
620
- },
621
- ready(){
622
- this.getAllArea()
623
- this.getAllPlanName()
624
- this.selfSearch()
625
- let gen = select(this)
626
- co(gen)
627
- },
628
- mounted(){
629
- //tag
630
- if (window.history && window.history.pushState) {
631
- history.pushState(null, null, document.URL);
632
- window.addEventListener('popstate', this.fun, false);//false阻止默认事件
633
- }
634
- },
635
- destroyed(){
636
- //tag
637
- window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
638
- },
639
- methods: {
640
- waitInspect(row){
641
- this.showModal=true
642
- this.tempItem = row
643
- },
644
- scan(){
645
- HostApp.__this__=this,
646
- HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
647
- },
648
- getCode(){
649
- const datapa = HostApp.getCode().data;
650
- //tag
651
- this.$refs.paged.$refs.cri.model.f_meter_no = datapa
652
-
653
- },
654
- fun () {
655
- //tag
656
- //tag
657
- },
658
- iscancel(){
659
- this.showModal2=false
660
- this.showModal3=false
661
- this.planoption=[]
662
- },
663
- timeSet(val){
664
- return val
665
- },
666
- async isok(){
667
- if(this.planoption.length==0){
668
- this.$showMessage("请选择计划")
669
- return false
670
- }
671
- for (let i = 0; i <this.planoption.length ; i++) {
672
- if (this.planoption[i]["selected"]==true){
673
- this.planid=this.planoption[i].value
674
- break
675
- }
676
- }
677
- if(this.planid==''){
678
- this.$showMessage("请选择计划")
679
- return false
680
- }
681
- await this.okput()
682
- },
683
- async manyisok(){
684
- if(this.planoption.length==0){
685
- this.$showMessage("请选择计划")
686
- return false
687
- }
688
- for (let i = 0; i <this.planoption.length ; i++) {
689
- if (this.planoption[i]["selected"]==true){
690
- this.planid=this.planoption[i].value
691
- break
692
- }
693
- }
694
- if(this.planid==''){
695
- this.$showMessage("请选择计划")
696
- return false
697
- }
698
- await this.manyokput()
699
- },
700
- changenull(){
701
- this.showModal2=false
702
- this.showModal3=false
703
- this.planoption=[]
704
- this.plan=''
705
- this.check=''
706
- },
707
- async okput(){
708
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
709
-
710
- condition:`i.id='`+this.needid+`'`,
711
- f_plan_id:this.planid,
712
- switchCheckAll:false,
713
- checkAll:false,
714
- f_operator:Vue.user.name
715
- }
716
- })
717
- await this.changenull()
718
- await this.getNewOrder()
719
- },
720
- async manyokput(){
721
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
722
- columnName:"i.id",
723
- condition:"1=1",
724
- f_plan_id:this.planid,
725
- switchCheckAll:true,
726
- param:this.planparam,
727
- checkAll:false,
728
- f_operator:Vue.user.name
729
- }
730
- })
731
- await this.changenull()
732
- await this.getNewOrder()
733
- },
734
- async plansearch(){
735
- this.planoption=[]
736
- let condition= ` f_plan_year=${new Date().getFullYear()}`
737
- if(this.check){
738
- condition += ` and f_checker_id= '${this.check}'`
739
- }
740
- if(this.plan){
741
- condition += ` and f_plan_name like '%${this.plan}%'`
742
- }
743
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {data:{
744
- condition:condition,
745
- f_filialeids:this.f_filialeids,
746
- groupitem:'',
747
- orderitem:'id'
748
- }})
749
- let resoult=res.data
750
- for (let i = 0; i < resoult.length; i++) {
751
- this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
752
- }
753
- },
754
-
755
- select(row, idx) {
756
- this.$set('planoption[' + idx + '].selected', true)
757
- for (let i = 0; i <this.planoption.length ; i++) {
758
- if (i!=idx){
759
- this.planoption[i]["selected"]=false
760
- }
761
- }
762
- },
763
- planclose(){
764
- this.showModal2=false
765
- this.showModal3=false
766
- },
767
- queryplan(val){
768
- this.needid=val
769
- this.showModal2 = true
770
- },
771
- queryplanmany(){
772
-
773
- this.showModal3 = true
774
- },
775
- reload(){
776
- // this.getAllArea()
777
- // this.getAllPlanName()
778
- this.selfSearch()
779
- },
780
- cancelReserve (idx, id) {
781
- if(Vue.android){
782
- let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
783
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
784
- if (res.code == 200) {
785
- this.$showMessage("取消预约成功")
786
- }
787
- }else {
788
- this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
789
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
790
- if (repanse.data.code == 200) {
791
- alert("取消预约成功!")
792
- }
793
- })
794
- }},
795
- genuineReserve () {
796
- new HttpResetClass().load('post',`${this.$androidUtil.getProxyUrl()}/rs/logic/PCbookingCheck`,{data:{
797
- id:this.tempItem.id,
798
- f_prearranged_date:this.tempItem.f_prearranged_date,
799
- f_remark:this.tempItem.f_remark
800
- }}).then(()=>{
801
- let res = this.$androidUtil.bzLogic('BookingCheck', {
802
- id:this.tempItem.id,
803
- f_prearranged_date:this.tempItem.f_prearranged_date,
804
- f_remark:this.tempItem.f_remark
805
- })
806
- this.$showMessage("修改预约成功!")
807
- this.getNewOrder()
808
- }).catch(()=>{
809
- this.$showMessage("修改预约失败!")
810
- })
811
- this.showModal = false
812
- },
813
- inspect(row) {
814
- var _this = this
815
- let http = new HttpResetClass()
816
- http.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: {
817
- items: 'id',
818
- tablename: 't_check_plan_item',
819
- condition: `id = '${row.id}'`
820
- }}, {resolveMsg: null, rejectMsg: null}).then((getcheckplan) => {
821
- this.getcheckplandata = getcheckplan.data[0]
822
- if(this.getcheckplandata){
823
- if (row.f_upload_state == '未传' || (row.f_upload_state == '已传' && row.f_state == '未检' && row.f_no_checkplan != '无计划安检' ) ) {
824
- _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
825
- row['f_plan_meters'] = response.data
826
- var pardate = {
827
- _this:_this,
828
- title:'安全检查',
829
- safe:true
830
- }
831
- _this.$dispatch('gotoson',pardate)
832
- //tag
833
- _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate',openpaper:true}, 'self', _this.reload)
834
- }).catch ((msg)=>{
835
- this.$showMessage("网络异常,请检查网络后再试!")
836
- })
837
- }else{
838
- this.$showMessage("该安检单已被上传!")
839
- }
840
- }else {
841
- this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
842
- }
843
- })
844
- },
845
- makeAPhoneCall(phoneNumber) {
846
- this.$androidUtil.makeAPhoneCall(phoneNumber)
847
- },
848
- reserve (idx) {
849
- this.param = idx
850
- this.showModal = true
851
- },
852
- search(args) {
853
- this.model.rows = []
854
- this.model.search(args.condition, args.model)
855
- },
856
- selfSearch () {
857
- this.getPlanCount()
858
- let condition = ""
859
- if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length >0){
860
- condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area[0]+"'"
861
- }else if(this.$refs.paged.$refs.cri.model.f_residential_area instanceof String && this.$refs.paged.$refs.cri.model.f_residential_area){
862
- condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area+"'"
863
- }
864
- if(this.$refs.paged.$refs.cri.model.f_building)
865
- condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
866
- if(this.$refs.paged.$refs.cri.model.f_unit)
867
- condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
868
- if (this.planName){
869
- condition += " and f_plan_name like '%"+this.planName +"%'"
870
- }else {
871
- if(this.$refs.paged.$refs.cri.model.f_plan_name)
872
- condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
873
- }
874
- // if(this.$refs.paged.$refs.cri.model.f_plan_year)
875
- // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
876
- // if(this.$refs.paged.$refs.cri.model.f_plan_month)
877
- // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
878
- if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
879
- condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
880
- if(this.$refs.paged.$refs.cri.model.f_keyword)
881
- condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
882
- if(this.$refs.paged.$refs.cri.model.f_user_name)
883
- condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
884
- if(this.$refs.paged.$refs.cri.model.f_state[0])
885
- condition += " and ti.f_state='"+this.$refs.paged.$refs.cri.model.f_state[0]+"'"
886
- // if(this.$refs.paged.$refs.cri.model.f_last_state[0])
887
- // condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
888
- if(this.$refs.paged.$refs.cri.model.f_user_type[0])
889
- condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
890
- if(this.$refs.paged.$refs.cri.model.f_meter_no)
891
- condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
892
- // if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
893
- // condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
894
-
895
- if(this.$refs.paged.$refs.cri.model.f_enter_number)
896
- condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
897
- if(this.$refs.paged.$refs.cri.model.f_check_version)
898
- condition += " and ti.f_check_version <= "+this.$refs.paged.$refs.cri.model.f_check_version
899
- //tag
900
- this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成') or (f_state = '未检')) and ti.f_no_checkplan = '有计划安检'" + condition)
901
- },
902
- getNewOrder(){
903
- HostApp.__this__ = this
904
- HostApp.logicWithHint({
905
- 'logic': 'SafeCheckServiceTimeOut',
906
- 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
907
- 'data': {params: ''},
908
- 'backresult': 1
909
- })
910
- },
911
- getNewOrderCallBack() {
912
- this.selfSearch()
913
- this.getAllArea()
914
- this.getAllPlanName()
915
- },
916
- hidden() {
917
- this.criteriaShow = !this.criteriaShow
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_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_state <> '已检' AND f_residential_area = '${f_residential_area}'`,
952
- groupitem: 'f_building order by f_building+0'
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
- this.buildOptions.sort((a,b)=>{
959
- return Number(a.label)- Number(b.label)
960
- })
961
- //tag)
962
- },
963
- getUnits(f_building){
964
- f_building = f_building[0]
965
- //tag)
966
- this.unitOptions = []
967
- this.$refs.paged.$refs.cri.model.f_unit = ''
968
- if(!f_building){
969
- return
970
- }
971
- let criteria = {
972
- items: 'f_unit',
973
- tablename: 't_check_plan_item',
974
- 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}'`,
975
- groupitem: 'f_unit'
976
- }
977
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
978
- if(result.code == 200){
979
- result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
980
- }
981
- this.unitOptions.sort((a,b)=>{
982
- return Number(a.label)- Number(b.label)
983
- })
984
- },
985
- getPlanCount(){
986
- this.upcomingCount = 0
987
- this.tempSaveCount = 0
988
- this.doneCount = 0
989
- this.allPlanCount = 0
990
- let criteria = {
991
- items: 'count(id) count',
992
- tablename: 't_check_plan_item',
993
- condition: `f_state = '未检'`,
994
- groupitem: 'f_state'
995
- }
996
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
997
- if(result.code && result.code == 200){
998
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
999
- this.upcomingCount = result.data.rows[0].count
1000
- }
1001
- }
1002
- criteria = {
1003
- items: 'count(id) count',
1004
- tablename: 't_check_plan_item',
1005
- condition: `(f_complete = '' or f_complete = null or f_complete = '未完成') AND f_state = '已检'`,
1006
- groupitem: 'f_state'
1007
- }
1008
- result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1009
- if(result.code && result.code == 200){
1010
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1011
- this.tempSaveCount = result.data.rows[0].count
1012
- }
1013
- }
1014
- criteria = {
1015
- items: 'count(id) count',
1016
- tablename: 't_check_plan_item',
1017
- condition: `f_complete = '已完成' AND f_state = '已检'`,
1018
- groupitem: 'f_state'
1019
- }
1020
- result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1021
- if(result.code && result.code == 200){
1022
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1023
- this.doneCount = result.data.rows[0].count
1024
- }
1025
- }
1026
- this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
1027
-
1028
- //tag
1029
- //tag
1030
- //tag
1031
- //tag
1032
- },
1033
- getAllPlanName(){
1034
- this.planNameOptions = []
1035
- this.$refs.paged.$refs.cri.model.f_plan_name = ''
1036
- let criteria = {
1037
- items: 'f_plan_name',
1038
- tablename: 't_check_plan',
1039
- condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
1040
- groupitem: 'f_plan_name'
1041
- }
1042
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1043
- //tag)
1044
- if(result.code == 200){
1045
- result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
1046
- }
1047
- //tag)
1048
- },
1049
- setPlanParam(detailsType, event) {
1050
- if (event.srcElement.checked) {
1051
- this.planparam.push(detailsType)
1052
- //tag
1053
- } else {
1054
- if(this.planparam.length>0){
1055
- let planid= this.planparam.findIndex((value) => {
1056
- return value === detailsType
1057
- })
1058
- this.planparam.splice(planid, 1)
1059
- //tag
1060
-
1061
- }
1062
-
1063
- }
1064
- }
1065
- }
1066
- }
1067
- </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-4">
231
+ <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
232
+ <label for="f_user_type" class="font text-left">用户类型:</label>
233
+ </div>
234
+ <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
235
+ :width="'60%'"
236
+ :options='$parent.$parent.user_types' placeholder='请选择用户类型'
237
+ v-model="model.f_user_type" condition="f_user_type='{}'" close-on-select clear-button></v-select>
238
+ </div>
239
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
240
+ <div class="col-xs-6">
241
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
242
+ <label class="font text-left">到访不遇:</label>
243
+ </div>
244
+ <div class="col-xs-8" >
245
+ <input class="search_input input-font" type="number"
246
+ v-model=model.f_check_version condition="f_check_version <= '{}'" />
247
+ </div>
248
+ </div>
249
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
250
+ <div class="col-xs-6" style="text-align: center">
251
+ <span class="font text-left">待办{{$parent.$parent.upcomingCount}}条</span>
252
+ </div>
253
+ <div class="col-xs-6" style="text-align: center">
254
+ <span class="font text-left">已办{{$parent.$parent.doneCount}}条</span>
255
+ </div>
256
+ <div class="col-xs-6" style="text-align: center">
257
+ <span class="font text-left">临时保存{{$parent.$parent.tempSaveCount}}条</span>
258
+ </div>
259
+ <div class="col-xs-6" style="text-align: center">
260
+ <span class="font text-left">总共{{$parent.$parent.allPlanCount}}条</span>
261
+ </div>
262
+ </div>
263
+
264
+ <div class="row text-center" style="margin-top: 20px;">
265
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="$parent.$parent.selfSearch">查询</button>
266
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%; margin-left: 10px" @click="$parent.$parent.queryplanmany">转发</button>
267
+ <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>
268
+ <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">
269
+ </div>
270
+ <div class="col-sm-12">
271
+
272
+ </div>
273
+ <!--<div class="row app-btn">-->
274
+ <!--<button class="btn btn-primary col-xs-6" type="button" @click="search"><span class="glyphicon glyphicon-search" style="margin-right: 20px;">查询</span></button>-->
275
+ <!--</div>-->
276
+ <div style="height:30px;"></div>
277
+ </form>
278
+ </div>
279
+ </criteria>
280
+ <list :model="model" partial='list'>
281
+ <div partial>
282
+ <div class="auto app-text" style="margin-top: 5px;">
283
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
284
+ <div class="panel-body panel-self">
285
+
286
+ <div class="col-xs-12">
287
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
288
+ <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}</p>
289
+ <p class="panel-title col-xs-2 text-left input-font" style="width: 5%;float:right">
290
+ <input type="checkbox" @click="$parent.$parent.$parent.setPlanParam(row.id, $event)"/>
291
+ </p>
292
+ </div>
293
+ <div class="col-xs-12">
294
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
295
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
296
+ </div>
297
+ <div class="col-xs-12">
298
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>签订供气合同:</b></p>
299
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.0?'是':'否' }}</p>
300
+ </div>
301
+ <div class="col-xs-6">
302
+ <p class="panel-title col-xs-5 text-left font"><b>用户类型:</b></p>
303
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_user_type }}
304
+ </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_plan_name }}</p>
309
+ </div>
310
+ <!-- <div class="col-xs-6">-->
311
+ <!-- <p class="panel-title col-xs-5 text-left font"><b>小区名称:</b></p>-->
312
+ <!-- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_residential_area }}</p>-->
313
+ <!-- </div>-->
314
+ <div class="col-xs-12">
315
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b></p>
316
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone2 ? row.f_user_phone2 : row.f_user_phone }}
317
+ <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>
318
+ </p>
319
+ </div>
320
+ <div class="col-xs-12">
321
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>备用电话:</b></p>
322
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_rent_phone}}
323
+ <img v-if="row.f_rent_phone" src="../../../assets/phone.png" style="width: 6%" v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_rent_phone)'></img>
324
+ </p>
325
+ </div>
326
+ <div class="col-xs-12">
327
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>租户电话:</b></p>
328
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_zuhu_phone }}
329
+ <img v-if="row.f_zuhu_phone" src="../../../assets/phone.png" style="width: 6%" v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_zuhu_phone)'></img>
330
+ </p>
331
+ </div>
332
+
333
+ <div class="col-xs-12">
334
+ <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
335
+ <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}</p>
336
+ </div>
337
+
338
+ <!-- <div class="row">-->
339
+ <!-- <p class="panel-title col-xs-4 text-left font">计划年份</p>-->
340
+ <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_year }}</p>-->
341
+ <!-- </div>-->
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_month }}</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_prearranged_date }}</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_last_check_state }}</p>-->
353
+ <!--</div>-->
354
+ <div class="col-xs-6">
355
+ <p class="panel-title col-xs-5 text-left font"><b>安检状态:</b></p>
356
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_state == '已检'?'临时保存':row.f_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_upload_state }}</p>
361
+ </div>
362
+ <div class="col-xs-12" v-if="row.f_prearranged_date !=null">
363
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>预约时间:</b></p>
364
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_prearranged_date }}</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_check_version }}</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_prearranged_date }}</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_remark }}</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">{{timeSet(row.f_issue_time)}}</p>-->
385
+ <!--</div>-->
386
+ <div class="col-xs-12">
387
+ <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right" @click="$parent.$parent.$parent.inspect(row)">处理</button>
388
+ <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>
389
+ <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right" @click="$parent.$parent.$parent.waitInspect(row)">稍候处理</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
+ </div>
406
+ <div slot="modal-body" class="modal-body">
407
+ <div class="form-group col-sm-12" >
408
+ <label class="font_normal_body">选择预约时间</label>
409
+ <datepicker
410
+ :value.sync="tempItem.f_prearranged_date"
411
+ placeholder='选择预约时间' style="width: 60%"
412
+ :disabled-days-of-week="[]"
413
+ :format="'yyyy-MM-dd'"
414
+ :show-rest-button="reset"
415
+ v-model="tempItem.f_prearranged_date">
416
+ </datepicker>
417
+ </div>
418
+ <div class="form-group col-sm-12" >
419
+ <label class="font_normal_body">填写备注</label>
420
+ <input type="text" v-model="tempItem.f_remark">
421
+ </div>
422
+ </div>
423
+ <div slot="modal-footer" class="modal-footer">
424
+ <button type="button" class="btn btn-default" @click="genuineReserve">确认</button>
425
+ </div>
426
+ </modal>
427
+ <!--<back-page :need-back='true' @flag="$back()"></back-page>-->
428
+ <modal :show.sync="showModal2" v-ref:modal>
429
+ <div slot="modal-header" class="modal-header">
430
+ <h4 class="modal-title">
431
+ 选择计划
432
+ </h4>
433
+ </div>
434
+ <div slot="modal-body" class="modal-body">
435
+ <div class="col-xs-12">
436
+
437
+ <div class="col-xs-4">
438
+ <v-select :value.sync="check" v-model='check'
439
+ :value-single="true"
440
+ class="select_list select"
441
+ :options='checkers' placeholder='安检员'
442
+ close-on-select width="100%"></v-select>
443
+ </div>
444
+
445
+ <div class="col-xs-1">
446
+ <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
447
+ </div>
448
+ <div class="col-xs-4" style="padding-left: 2px">
449
+ <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
450
+ </div>
451
+ <div class="col-xs-1" >
452
+ <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
453
+ </div>
454
+ <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
455
+ <div class="col-xs-2" style="float: right">
456
+ <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>
457
+ </div>
458
+ </div>
459
+ <table class="table table_sy">
460
+ <thead>
461
+ <tr>
462
+ <th style="width: 30px"></th>
463
+ <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
464
+ </tr>
465
+ </thead>
466
+ <tbody>
467
+ <tr v-for="row in planoption">
468
+ <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
469
+ <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
470
+ </tr>
471
+ </tbody>
472
+ </table>
473
+ </div>
474
+ <div slot="modal-footer" class="modal-footer">
475
+ <button class="btn btn-default" @click="isok()">确认</button>
476
+ <button class="btn btn-default" @click="iscancel()">取消</button>
477
+ </div>
478
+ </modal>
479
+ <modal :show.sync="showModal3" v-ref:modal>
480
+ <div slot="modal-header" class="modal-header">
481
+ <h4 class="modal-title">
482
+ 选择计划
483
+ </h4>
484
+ </div>
485
+ <div slot="modal-body" class="modal-body">
486
+ <div class="col-xs-12">
487
+
488
+ <div class="col-xs-4">
489
+ <v-select :value.sync="check" v-model='check'
490
+ :value-single="true"
491
+ class="select_list select"
492
+ :options='checkers' placeholder='安检员'
493
+ close-on-select width="100%"></v-select>
494
+ </div>
495
+
496
+ <div class="col-xs-1">
497
+ <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
498
+ </div>
499
+ <div class="col-xs-4" style="padding-left: 2px">
500
+ <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
501
+ </div>
502
+ <div class="col-xs-1" >
503
+ <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
504
+ </div>
505
+ <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
506
+ <div class="col-xs-2" style="float: right">
507
+ <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>
508
+ </div>
509
+ </div>
510
+ <table class="table table_sy">
511
+ <thead>
512
+ <tr>
513
+ <th style="width: 30px"></th>
514
+ <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
515
+ </tr>
516
+ </thead>
517
+ <tbody>
518
+ <tr v-for="row in planoption">
519
+ <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
520
+ <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
521
+ </tr>
522
+ </tbody>
523
+ </table>
524
+ </div>
525
+ <div slot="modal-footer" class="modal-footer">
526
+ <button class="btn btn-default" @click="manyisok()">确认</button>
527
+ <button class="btn btn-default" @click="iscancel()">取消</button>
528
+ </div>
529
+ </modal>
530
+ </div>
531
+
532
+ </template>
533
+
534
+ <script>
535
+ import LocalPagedList from '../../../plugins/LocalPagedList'
536
+ import Vue from 'vue'
537
+ import { PagedList,HttpResetClass } from 'vue-client'
538
+ import * as Util from '../../Util'
539
+ import co from 'co'
540
+ let select = function * (self) {
541
+ let http = new HttpResetClass()
542
+ http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
543
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
544
+ userid: Vue.user.id
545
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
546
+ //tag
547
+ self.checkers.push({label:'全部',value:''})
548
+ if(res.code=!500){
549
+ res.data.forEach((checker)=>{
550
+ self.checkers.push({label:checker.name,value:checker.id})
551
+ })
552
+ }
553
+
554
+ })
555
+ }
556
+ export default {
557
+ title: '无计划安检查询',
558
+ props: ['planName'],
559
+ data() {
560
+ return {
561
+ f_filialeids:'('+Vue.user.orgid+')',
562
+ //f_filialeids:'(305)',
563
+ planparam:[],
564
+ check:'',
565
+ tempItem:{},
566
+ plan:'',
567
+ planid:'',
568
+ model:Vue.android? new LocalPagedList('androidGetuserinfo',20,{condition:'this.condition'}): new PagedList( 'AndroidRest/rs/sql/androidGetuserinfo',20,{condition:'this.condition'}),
569
+ showModal: false,
570
+ showModal2:false,
571
+ showModal3:false,
572
+ needid:'',
573
+ criteriaShow: false,
574
+ planoption:[],
575
+ condition:'',
576
+ checkers:[],
577
+ param: null,
578
+ f_preset_dt : Util.to3339TimeString(),
579
+ flow_direction:[
580
+ {label: '请选择挂表方式', value: ''},
581
+ {label: '左表', value: '左表'},
582
+ {label: '右表', value: '右表'}
583
+ ],
584
+ check_states: [
585
+ {label: '请选择安检状态', value: ''},
586
+ {label: '未检', value: '未检'},
587
+ {label: '临时保存', value: '已检'},
588
+ ],
589
+ last_check_states: [
590
+ {label: '请选择上次安检状态', value: ''},
591
+ {label: '入户', value: '入户'},
592
+ {label: '拒检', value: '拒检'},
593
+ {label: '到访不遇', value: '到访不遇'},
594
+ {label: '未使用天然气', value: '未使用天然气'}
595
+ ],
596
+ upload_states: [
597
+ {label: '请选择上传状态', value: ''},
598
+ {label: '未传', value: '未传'},
599
+ {label: '已传', value: '已传'}
600
+ ],
601
+ user_types: [
602
+ {label: '请选择用户类型', value: ''},
603
+ {label: '民用', value: '民用'},
604
+ {label: '非民用', value: '非民用'},
605
+ ],
606
+ verify_state: [
607
+ {label: '请选择审核状态', value: ''},
608
+ {label: '未审核', value: '未审核'},
609
+ {label: '打回', value: '打回'}
610
+ ],
611
+ residentialAreaOptions: [],
612
+ buildOptions: [],
613
+ unitOptions: [],
614
+ planNameOptions: [],
615
+ upcomingCount: 0,
616
+ doneCount: 0,
617
+ tempSaveCount: 0,
618
+ allPlanCount: 0
619
+ }
620
+ },
621
+ ready(){
622
+ this.getAllArea()
623
+ this.getAllPlanName()
624
+ this.selfSearch()
625
+ let gen = select(this)
626
+ co(gen)
627
+ },
628
+ mounted(){
629
+ //tag
630
+ if (window.history && window.history.pushState) {
631
+ history.pushState(null, null, document.URL);
632
+ window.addEventListener('popstate', this.fun, false);//false阻止默认事件
633
+ }
634
+ },
635
+ destroyed(){
636
+ //tag
637
+ window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
638
+ },
639
+ methods: {
640
+ waitInspect(row){
641
+ this.showModal=true
642
+ this.tempItem = row
643
+ },
644
+ scan(){
645
+ HostApp.__this__=this,
646
+ HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
647
+ },
648
+ getCode(){
649
+ const datapa = HostApp.getCode().data;
650
+ //tag
651
+ this.$refs.paged.$refs.cri.model.f_meter_no = datapa
652
+
653
+ },
654
+ fun () {
655
+ //tag
656
+ //tag
657
+ },
658
+ iscancel(){
659
+ this.showModal2=false
660
+ this.showModal3=false
661
+ this.planoption=[]
662
+ },
663
+ timeSet(val){
664
+ return val
665
+ },
666
+ async isok(){
667
+ if(this.planoption.length==0){
668
+ this.$showMessage("请选择计划")
669
+ return false
670
+ }
671
+ for (let i = 0; i <this.planoption.length ; i++) {
672
+ if (this.planoption[i]["selected"]==true){
673
+ this.planid=this.planoption[i].value
674
+ break
675
+ }
676
+ }
677
+ if(this.planid==''){
678
+ this.$showMessage("请选择计划")
679
+ return false
680
+ }
681
+ await this.okput()
682
+ },
683
+ async manyisok(){
684
+ if(this.planoption.length==0){
685
+ this.$showMessage("请选择计划")
686
+ return false
687
+ }
688
+ for (let i = 0; i <this.planoption.length ; i++) {
689
+ if (this.planoption[i]["selected"]==true){
690
+ this.planid=this.planoption[i].value
691
+ break
692
+ }
693
+ }
694
+ if(this.planid==''){
695
+ this.$showMessage("请选择计划")
696
+ return false
697
+ }
698
+ await this.manyokput()
699
+ },
700
+ changenull(){
701
+ this.showModal2=false
702
+ this.showModal3=false
703
+ this.planoption=[]
704
+ this.plan=''
705
+ this.check=''
706
+ },
707
+ async okput(){
708
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
709
+
710
+ condition:`i.id='`+this.needid+`'`,
711
+ f_plan_id:this.planid,
712
+ switchCheckAll:false,
713
+ checkAll:false,
714
+ f_operator:Vue.user.name
715
+ }
716
+ })
717
+ await this.changenull()
718
+ await this.getNewOrder()
719
+ },
720
+ async manyokput(){
721
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
722
+ columnName:"i.id",
723
+ condition:"1=1",
724
+ f_plan_id:this.planid,
725
+ switchCheckAll:true,
726
+ param:this.planparam,
727
+ checkAll:false,
728
+ f_operator:Vue.user.name
729
+ }
730
+ })
731
+ await this.changenull()
732
+ await this.getNewOrder()
733
+ },
734
+ async plansearch(){
735
+ this.planoption=[]
736
+ let condition= ` f_plan_year=${new Date().getFullYear()}`
737
+ if(this.check){
738
+ condition += ` and f_checker_id= '${this.check}'`
739
+ }
740
+ if(this.plan){
741
+ condition += ` and f_plan_name like '%${this.plan}%'`
742
+ }
743
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {data:{
744
+ condition:condition,
745
+ f_filialeids:this.f_filialeids,
746
+ groupitem:'',
747
+ orderitem:'id'
748
+ }})
749
+ let resoult=res.data
750
+ for (let i = 0; i < resoult.length; i++) {
751
+ this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
752
+ }
753
+ },
754
+
755
+ select(row, idx) {
756
+ this.$set('planoption[' + idx + '].selected', true)
757
+ for (let i = 0; i <this.planoption.length ; i++) {
758
+ if (i!=idx){
759
+ this.planoption[i]["selected"]=false
760
+ }
761
+ }
762
+ },
763
+ planclose(){
764
+ this.showModal2=false
765
+ this.showModal3=false
766
+ },
767
+ queryplan(val){
768
+ this.needid=val
769
+ this.showModal2 = true
770
+ },
771
+ queryplanmany(){
772
+
773
+ this.showModal3 = true
774
+ },
775
+ reload(){
776
+ // this.getAllArea()
777
+ // this.getAllPlanName()
778
+ this.selfSearch()
779
+ },
780
+ cancelReserve (idx, id) {
781
+ if(Vue.android){
782
+ let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
783
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
784
+ if (res.code == 200) {
785
+ this.$showMessage("取消预约成功")
786
+ }
787
+ }else {
788
+ this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
789
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
790
+ if (repanse.data.code == 200) {
791
+ alert("取消预约成功!")
792
+ }
793
+ })
794
+ }},
795
+ genuineReserve () {
796
+ new HttpResetClass().load('post',`${this.$androidUtil.getProxyUrl()}/rs/logic/PCbookingCheck`,{data:{
797
+ id:this.tempItem.id,
798
+ f_prearranged_date:this.tempItem.f_prearranged_date,
799
+ f_remark:this.tempItem.f_remark
800
+ }}).then(()=>{
801
+ let res = this.$androidUtil.bzLogic('BookingCheck', {
802
+ id:this.tempItem.id,
803
+ f_prearranged_date:this.tempItem.f_prearranged_date,
804
+ f_remark:this.tempItem.f_remark
805
+ })
806
+ this.$showMessage("修改预约成功!")
807
+ this.getNewOrder()
808
+ }).catch(()=>{
809
+ this.$showMessage("修改预约失败!")
810
+ })
811
+ this.showModal = false
812
+ },
813
+ inspect(row) {
814
+ var _this = this
815
+ let http = new HttpResetClass()
816
+ http.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: {
817
+ items: 'id',
818
+ tablename: 't_check_plan_item',
819
+ condition: `id = '${row.id}'`
820
+ }}, {resolveMsg: null, rejectMsg: null}).then((getcheckplan) => {
821
+ this.getcheckplandata = getcheckplan.data[0]
822
+ if(this.getcheckplandata){
823
+ if (row.f_upload_state == '未传' || (row.f_upload_state == '已传' && row.f_state == '未检' && row.f_no_checkplan != '无计划安检' ) ) {
824
+ _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
825
+ row['f_plan_meters'] = response.data
826
+ var pardate = {
827
+ _this:_this,
828
+ title:'安全检查',
829
+ safe:true
830
+ }
831
+ _this.$dispatch('gotoson',pardate)
832
+ //tag
833
+ _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate',openpaper:true}, 'self', _this.reload)
834
+ }).catch ((msg)=>{
835
+ this.$showMessage("网络异常,请检查网络后再试!")
836
+ })
837
+ }else{
838
+ this.$showMessage("该安检单已被上传!")
839
+ }
840
+ }else {
841
+ this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
842
+ }
843
+ })
844
+ },
845
+ makeAPhoneCall(phoneNumber) {
846
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
847
+ },
848
+ reserve (idx) {
849
+ this.param = idx
850
+ this.showModal = true
851
+ },
852
+ search(args) {
853
+ this.model.rows = []
854
+ this.model.search(args.condition, args.model)
855
+ },
856
+ selfSearch () {
857
+ this.getPlanCount()
858
+ let condition = ""
859
+ if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length >0){
860
+ condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area[0]+"'"
861
+ }else if(this.$refs.paged.$refs.cri.model.f_residential_area instanceof String && this.$refs.paged.$refs.cri.model.f_residential_area){
862
+ condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area+"'"
863
+ }
864
+ if(this.$refs.paged.$refs.cri.model.f_building)
865
+ condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
866
+ if(this.$refs.paged.$refs.cri.model.f_unit)
867
+ condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
868
+ if (this.planName){
869
+ condition += " and f_plan_name like '%"+this.planName +"%'"
870
+ }else {
871
+ if(this.$refs.paged.$refs.cri.model.f_plan_name)
872
+ condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
873
+ }
874
+ // if(this.$refs.paged.$refs.cri.model.f_plan_year)
875
+ // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
876
+ // if(this.$refs.paged.$refs.cri.model.f_plan_month)
877
+ // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
878
+ if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
879
+ condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
880
+ if(this.$refs.paged.$refs.cri.model.f_keyword)
881
+ condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
882
+ if(this.$refs.paged.$refs.cri.model.f_user_name)
883
+ condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
884
+ if(this.$refs.paged.$refs.cri.model.f_state[0])
885
+ condition += " and ti.f_state='"+this.$refs.paged.$refs.cri.model.f_state[0]+"'"
886
+ // if(this.$refs.paged.$refs.cri.model.f_last_state[0])
887
+ // condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
888
+ if(this.$refs.paged.$refs.cri.model.f_user_type[0])
889
+ condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
890
+ if(this.$refs.paged.$refs.cri.model.f_meter_no)
891
+ condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
892
+ // if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
893
+ // condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
894
+
895
+ if(this.$refs.paged.$refs.cri.model.f_enter_number)
896
+ condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
897
+ if(this.$refs.paged.$refs.cri.model.f_check_version)
898
+ condition += " and ti.f_check_version <= "+this.$refs.paged.$refs.cri.model.f_check_version
899
+ //tag
900
+ this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成') or (f_state = '未检')) and ti.f_no_checkplan = '有计划安检'" + condition)
901
+ },
902
+ getNewOrder(){
903
+ HostApp.__this__ = this
904
+ HostApp.logicWithHint({
905
+ 'logic': 'SafeCheckServiceTimeOut',
906
+ 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
907
+ 'data': {params: ''},
908
+ 'backresult': 1
909
+ })
910
+ },
911
+ getNewOrderCallBack() {
912
+ this.selfSearch()
913
+ this.getAllArea()
914
+ this.getAllPlanName()
915
+ },
916
+ hidden() {
917
+ this.criteriaShow = !this.criteriaShow
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_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_state <> '已检' AND f_residential_area = '${f_residential_area}'`,
952
+ groupitem: 'f_building order by f_building+0'
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
+ this.buildOptions.sort((a,b)=>{
959
+ return Number(a.label)- Number(b.label)
960
+ })
961
+ //tag)
962
+ },
963
+ getUnits(f_building){
964
+ f_building = f_building[0]
965
+ //tag)
966
+ this.unitOptions = []
967
+ this.$refs.paged.$refs.cri.model.f_unit = ''
968
+ if(!f_building){
969
+ return
970
+ }
971
+ let criteria = {
972
+ items: 'f_unit',
973
+ tablename: 't_check_plan_item',
974
+ 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}'`,
975
+ groupitem: 'f_unit'
976
+ }
977
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
978
+ if(result.code == 200){
979
+ result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
980
+ }
981
+ this.unitOptions.sort((a,b)=>{
982
+ return Number(a.label)- Number(b.label)
983
+ })
984
+ },
985
+ getPlanCount(){
986
+ this.upcomingCount = 0
987
+ this.tempSaveCount = 0
988
+ this.doneCount = 0
989
+ this.allPlanCount = 0
990
+ let criteria = {
991
+ items: 'count(id) count',
992
+ tablename: 't_check_plan_item',
993
+ condition: `f_state = '未检'`,
994
+ groupitem: 'f_state'
995
+ }
996
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
997
+ if(result.code && result.code == 200){
998
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
999
+ this.upcomingCount = result.data.rows[0].count
1000
+ }
1001
+ }
1002
+ criteria = {
1003
+ items: 'count(id) count',
1004
+ tablename: 't_check_plan_item',
1005
+ condition: `(f_complete = '' or f_complete = null or f_complete = '未完成') AND f_state = '已检'`,
1006
+ groupitem: 'f_state'
1007
+ }
1008
+ result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1009
+ if(result.code && result.code == 200){
1010
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1011
+ this.tempSaveCount = result.data.rows[0].count
1012
+ }
1013
+ }
1014
+ criteria = {
1015
+ items: 'count(id) count',
1016
+ tablename: 't_check_plan_item',
1017
+ condition: `f_complete = '已完成' AND f_state = '已检'`,
1018
+ groupitem: 'f_state'
1019
+ }
1020
+ result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1021
+ if(result.code && result.code == 200){
1022
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1023
+ this.doneCount = result.data.rows[0].count
1024
+ }
1025
+ }
1026
+ this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
1027
+
1028
+ //tag
1029
+ //tag
1030
+ //tag
1031
+ //tag
1032
+ },
1033
+ getAllPlanName(){
1034
+ this.planNameOptions = []
1035
+ this.$refs.paged.$refs.cri.model.f_plan_name = ''
1036
+ let criteria = {
1037
+ items: 'f_plan_name',
1038
+ tablename: 't_check_plan',
1039
+ condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
1040
+ groupitem: 'f_plan_name'
1041
+ }
1042
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1043
+ //tag)
1044
+ if(result.code == 200){
1045
+ result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
1046
+ }
1047
+ //tag)
1048
+ },
1049
+ setPlanParam(detailsType, event) {
1050
+ if (event.srcElement.checked) {
1051
+ this.planparam.push(detailsType)
1052
+ //tag
1053
+ } else {
1054
+ if(this.planparam.length>0){
1055
+ let planid= this.planparam.findIndex((value) => {
1056
+ return value === detailsType
1057
+ })
1058
+ this.planparam.splice(planid, 1)
1059
+ //tag
1060
+
1061
+ }
1062
+
1063
+ }
1064
+ }
1065
+ }
1066
+ }
1067
+ </script>