safecheck-client 4.0.0-100 → 4.0.0-102

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