safecheck-client 3.0.35-12 → 3.0.35-14

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,1058 +1,1058 @@
1
- <template>
2
- <div class="flex">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
7
- <div :class="$parent.$parent.style">
8
- <label class="font_normal_body">用户编号</label>
9
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
10
- id="f_userinfo_code"
11
-
12
- placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
13
- </div>
14
- <div :class="$parent.$parent.style">
15
- <label class="font_normal_body">用户姓名</label>
16
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name" id="f_user_name"
17
- placeholder="用户姓名" condition="f_user_name like '%{}%'">
18
- </div>
19
- <div :class="$parent.$parent.style">
20
- <label class="font_normal_body">小&emsp;&emsp;区</label>
21
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
22
- id="f_residential_area"
23
- placeholder="小区" condition="f_residential_area like '%{}%'">
24
- </div>
25
- <div :class="$parent.$parent.style">
26
- <label class="font_normal_body">地&emsp;&emsp;址</label>
27
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_address" id="f_address"
28
- placeholder="地址" condition="f_address like '%{}%'">
29
- </div>
30
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
31
- <export-excel-safe :data="$parent.$parent.searchData"
32
- :field="$parent.$parent.excelHeaders"
33
- sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
34
- template-name='用户安检情况' :choose-col="true"></export-excel-safe>
35
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
36
- <div style="float: right" class="button_spacing"
37
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
38
- @click="$parent.$parent.hiddenr()"></div>
39
- <div style="float: right" class="button_spacing"
40
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
41
- @click="$parent.$parent.hidden()">
42
-
43
- </div>
44
- </div>
45
-
46
-
47
- </div>
48
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
49
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
50
- <label class="font_normal_body">用户类型</label>
51
- <v-select id="f_usertype"
52
- placeholder='用户类型'
53
- class="select select_list"
54
- :value.sync="model.f_usertype"
55
- :value-single="true"
56
- :options='$parent.$parent.usertypes'
57
- v-model="model.f_usertype"
58
- condition="f_user_type = '{}'"
59
- close-on-select clear-button></v-select>
60
- </div>
61
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
62
-
63
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
64
- <label class="font_normal_body" style="color: red;">安检筛选</label>
65
- <v-select
66
- placeholder='安检筛选'
67
- :value-single="true"
68
- class="select select_list"
69
- :value.sync="$parent.$parent.SafeCheckXZ"
70
- :options='$parent.$parent.SafeCheckXZs'
71
- v-model="$parent.$parent.SafeCheckXZ"
72
- close-on-select clear-button></v-select>
73
- </div>
74
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
75
- <label class="font_normal_body">安检起始</label>
76
- <datepicker
77
- :value.sync="model.f_check_start"
78
- placeholder='最后安检时间起始'
79
- style="width: 60%"
80
- :format="'yyyy-MM-dd 00:00:00'"
81
- :show-rest-button="reset"
82
- v-model="model.f_check_start">
83
- </datepicker>
84
- </div>
85
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
86
- <label class="font_normal_body">安检结束</label>
87
- <datepicker
88
- :value.sync="model.f_check_end"
89
- placeholder='最后安检时间结束'
90
- style="width: 60%"
91
- :format="'yyyy-MM-dd 23:59:59'"
92
- :show-rest-button="reset"
93
- v-model="model.f_check_end">
94
- </datepicker>
95
- </div>
96
-
97
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
98
- <label class="font_normal_body">安检状态</label>
99
- <v-select id="f_entry"
100
- placeholder='安检状态'
101
- class="select select_list"
102
- :value.sync="model.f_last_check_state"
103
- :value-single="true"
104
- :options='$parent.$parent.checkstatus'
105
- v-model="model.f_last_check_state"
106
- condition="f_last_check_state = '{}'"
107
- close-on-select clear-button></v-select>
108
- </div>
109
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
110
- <label class="font_normal_body">隐患情况</label>
111
- <v-select
112
- placeholder='隐患情况'
113
- class="select select_list"
114
- :value-single="true"
115
- v-model='model.f_check_result'
116
- :value.sync="model.f_check_result"
117
- :options='$parent.$parent.f_check_results'
118
- condition="f_last_check_result like '%{}%'"
119
- close-on-select clear-button></v-select>
120
- </div>
121
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
122
- </div>
123
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
124
-
125
- <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
126
- <role-selector-safe
127
- role-name="安检员"
128
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
129
- @re-res="$parent.$parent.getRes"
130
- :value.sync="model.f_checker_id"
131
- v-model="model.f_checker_id"
132
- :value-multiple="true"
133
- condition=" f_checker_name in {}">
134
- </role-selector-safe>
135
- </div>
136
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
137
- <label class="font_normal_body">片&emsp;&emsp;区</label>
138
- <v-select class="select_list select"
139
- placeholder='片区/管理站' style="width: 60%"
140
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
141
- :options='$parent.$parent.sliceArea'
142
- filer-key="name"
143
- close-on-select clear-button
144
- condition="f_slice_area='{}'"
145
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
146
- :value-single="true">
147
- </v-select>
148
- </div>
149
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
150
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
151
- <v-select class="select_list select"
152
- placeholder='抄表册' style="width: 60%"
153
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
154
- :options='$parent.$parent.cbc'
155
- filer-key="name"
156
- close-on-select clear-button
157
- condition="f_meter_book_num={}"
158
- :value-single="true">
159
- </v-select>
160
- </div>
161
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
162
- <label class="font_normal_body">省&ensp;市&ensp;区</label>
163
- <v-select class="select_list select"
164
- placeholder='请选择' style="width: 60%"
165
- :value.sync="model.f_pcd" v-model="model.f_pcd"
166
- :options='$parent.$parent.pcds'
167
- filer-key="name"
168
- close-on-select clear-button
169
- condition="f_pcd_id ='{}'"
170
- :value-single="true">
171
- </v-select>
172
- </div>
173
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
174
- <label class="font_normal_body">用户状态</label>
175
- <v-select class="select_list select"
176
- placeholder='用户状态' style="width: 60%"
177
- :value.sync="model.f_user_state" v-model="model.f_user_state"
178
- :options='$parent.$parent.userstates'
179
- close-on-select clear-button
180
- condition="f_user_state = '{}'"
181
- :value-single="true">
182
- </v-select>
183
- </div>
184
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
185
- <label class="font_normal_body">用气性质</label>
186
- <v-select
187
- class="select_list select"
188
- placeholder='用气性质' style="width: 60%"
189
- v-model='model.userType'
190
- :value.sync="model.userType"
191
- :options='$parent.$parent.userTypes'
192
- condition="f_gasproperties = '{}'"
193
- :value-single="true"
194
- close-on-select clear-button></v-select>
195
- </div>
196
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
197
- <label class="font_normal_body">气表类型</label>
198
- <v-select
199
- class="select_list select"
200
- placeholder='气表类型' style="width: 60%"
201
- v-model='model.tableType'
202
- :value.sync="model.tableType"
203
- :options='$parent.$parent.tableTypes'
204
- condition="f_meter_classify = '{}'"
205
- :value-single="true"
206
- close-on-select clear-button></v-select>
207
- </div>
208
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
209
- <label class="font_normal_body">气表品牌</label>
210
- <v-select
211
- class="select_list select"
212
- placeholder='气表类型' style="width: 60%"
213
- v-model='model.tableBrand'
214
- :value.sync="model.tableBrand"
215
- :options='$parent.$parent.tableBrands'
216
- condition="f_meter_brand = '{}'"
217
- :value-single="true"
218
- close-on-select clear-button></v-select>
219
- </div>
220
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
221
- <label class="font_normal_body">是否通气</label>
222
- <v-select
223
- class="select_list select"
224
- placeholder='是否通气' style="width: 60%"
225
- v-model='model.f_is_gas'
226
- :value.sync="model.f_is_gas"
227
- :options='$parent.$parent.isgas'
228
- condition="f_gas_date {}"
229
- :value-single="true"
230
- close-on-select clear-button></v-select>
231
- </div>
232
- </div>
233
-
234
- <div class="row" v-show="$parent.$parent.$parent.showItem">
235
- <div :class="$parent.$parent.style">
236
- <label class="font_normal_body">用户编号</label>
237
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
238
-
239
- placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
240
- </div>
241
- <div :class="$parent.$parent.style">
242
- <label class="font_normal_body">用户姓名</label>
243
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name"
244
- placeholder="用户姓名" condition="f_user_name like '%{}%'">
245
- </div>
246
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
247
- <export-excel-safe :data="$parent.$parent.searchData"
248
- :field="$parent.$parent.excelHeaders"
249
- sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
250
- template-name='用户安检情况' :choose-col="true"></export-excel-safe>
251
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
252
- <div style="float: right" class="button_spacing"
253
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
254
- @click="$parent.$parent.hiddenr()"></div>
255
- <div style="float: right" class="button_spacing"
256
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
257
- @click="$parent.$parent.hidden()">
258
-
259
- </div>
260
- </div>
261
-
262
- </div>
263
- <div class="row" v-show="$parent.$parent.$parent.showItem">
264
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
265
- <label class="font_normal_body">小&emsp;&emsp;区</label>
266
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
267
-
268
- placeholder="小区" condition="f_residential_area like '%{}%'">
269
- </div>
270
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
271
- <label class="font_normal_body">地&emsp;&emsp;址</label>
272
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_address"
273
-
274
- placeholder="地址" condition="f_address like '%{}%'">
275
- </div>
276
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
277
- <label class="font_normal_body">用户类型</label>
278
- <v-select
279
- placeholder='用户类型'
280
- class="select select_list"
281
-
282
- :value.sync="model.f_usertype"
283
- :value-single="true"
284
- :options='$parent.$parent.usertypes'
285
- v-model="model.f_usertype"
286
- condition="f_user_type = '{}'"
287
- close-on-select clear-button></v-select>
288
- </div>
289
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
290
-
291
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
292
- <label class="font_normal_body" style="color: red;">安检筛选</label>
293
- <v-select
294
- placeholder='安检筛选'
295
- :value-single="true"
296
-
297
- class="select select_list"
298
- :value.sync="$parent.$parent.SafeCheckXZ"
299
- :options='$parent.$parent.SafeCheckXZs'
300
- v-model="$parent.$parent.SafeCheckXZ"
301
- close-on-select clear-button></v-select>
302
- </div>
303
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
304
- <label class="font_normal_body">用气性质</label>
305
- <v-select
306
- class="select_list select"
307
- placeholder='用气性质' style="width: 60%"
308
- v-model='model.userType'
309
- :value.sync="model.userType"
310
- :options='$parent.$parent.userTypes'
311
- condition="f_gasproperties = '{}'"
312
- :value-single="true"
313
- close-on-select clear-button></v-select>
314
- </div>
315
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
316
- <label class="font_normal_body">气表类型</label>
317
- <v-select
318
- class="select_list select"
319
- placeholder='气表类型' style="width: 60%"
320
- v-model='model.tableType'
321
- :value.sync="model.tableType"
322
- :options='$parent.$parent.tableTypes'
323
- condition="f_meter_classify = '{}'"
324
- :value-single="true"
325
- close-on-select clear-button></v-select>
326
- </div>
327
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
328
- <label class="font_normal_body">气表品牌</label>
329
- <v-select
330
- class="select_list select"
331
- placeholder='气表类型' style="width: 60%"
332
- v-model='model.tableBrand'
333
- :value.sync="model.tableBrand"
334
- :options='$parent.$parent.tableBrands'
335
- condition="f_meter_brand = '{}'"
336
- :value-single="true"
337
- close-on-select clear-button></v-select>
338
- </div>
339
-
340
- </div>
341
- <div class="row" v-show="$parent.$parent.$parent.showItem">
342
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
343
- <label class="font_normal_body">安检起始</label>
344
- <datepicker
345
- :value.sync="model.f_check_start"
346
- placeholder='最后安检时间起始'
347
- :disabled-days-of-week="[]"
348
- style="width: 60%"
349
- :format="'yyyy-MM-dd'"
350
- :show-rest-button="reset"
351
- v-model="model.f_check_start">
352
- </datepicker>
353
- </div>
354
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
355
- <label class="font_normal_body">安检结束</label>
356
- <datepicker
357
- :value.sync="model.f_check_end"
358
- placeholder='最后安检时间结束'
359
- style="width: 60%"
360
- :disabled-days-of-week="[]"
361
- :format="'yyyy-MM-dd'"
362
- :show-rest-button="reset"
363
- v-model="model.f_check_end">
364
- </datepicker>
365
- </div>
366
-
367
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
368
- <label class="font_normal_body">安检状态</label>
369
- <v-select
370
- placeholder='安检状态'
371
- class="select select_list"
372
-
373
- :value.sync="model.f_last_check_state"
374
- :value-single="true"
375
- :options='$parent.$parent.checkstatus'
376
- v-model="model.f_last_check_state"
377
- condition="f_last_check_state = '{}'"
378
- close-on-select clear-button></v-select>
379
- </div>
380
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
381
- <label class="font_normal_body">隐患情况</label>
382
- <v-select
383
- placeholder='隐患情况'
384
- class="select select_list"
385
-
386
- :value-single="true"
387
- v-model='model.f_check_result'
388
- :value.sync="model.f_check_result"
389
- :options='$parent.$parent.f_check_results'
390
- condition="f_last_check_result like '%{}%'"
391
- close-on-select clear-button></v-select>
392
- </div>
393
-
394
- </div>
395
- <!--<div class="row" v-show="$parent.$parent.$parent.showItem">
396
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
397
- <label class="font_normal_body">公&emsp;&emsp;司</label>
398
- <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">
399
- </right-tree>
400
- </div>
401
-
402
- </div>-->
403
- </div>
404
- </criteria>
405
- <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
406
- <template partial='head'>
407
- <tr>
408
- <th>
409
- <nobr>用户编号</nobr>
410
- </th>
411
- <th>
412
- <nobr>用户名称</nobr>
413
- </th>
414
- <th>
415
- <nobr>用户电话</nobr>
416
- </th>
417
- <th>
418
- <nobr>燃气表号</nobr>
419
- </th>
420
- <th>
421
- <nobr>气表品牌</nobr>
422
- </th>
423
- <th>
424
- <nobr>用户类型</nobr>
425
- </th>
426
- <!-- <th>-->
427
- <!-- <nobr>壁挂炉</nobr>-->
428
- <!-- </th>-->
429
- <!-- <th>-->
430
- <!-- <nobr>灶具</nobr>-->
431
- <!-- </th>-->
432
- <th>
433
- <nobr>区域</nobr>
434
- </th>
435
- <th>
436
- <nobr>小区名称</nobr>
437
- </th>
438
- <th style="padding: 0 40px">
439
- <nobr>地址</nobr>
440
- </th>
441
- <th>
442
- <nobr>安检员</nobr>
443
- </th>
444
- <th>
445
- <nobr>安检员备注</nobr>
446
- </th>
447
- <th>
448
- <nobr>表具出厂日期</nobr>
449
- </th>
450
- <th>
451
- <nobr>最后一次安检日期</nobr>
452
- </th>
453
- <th>
454
- <nobr>最后一次安检状态</nobr>
455
- </th>
456
- <th>
457
- <nobr>安检结果</nobr>
458
- </th>
459
- </tr>
460
- </template>
461
- <template partial='body'>
462
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_userinfo_code }}</td>
463
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_name }}</td>
464
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_phone }}</td>
465
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meternumber }}</td>
466
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meter_brand }}</td>
467
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_user_type }}</td>
468
- <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
469
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_slice_area }}</td>
470
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_residential_area }}</td>
471
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_address }}</td>
472
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_checker_name }}</td>
473
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_comments }}</td>
474
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_factory_date }}</td>
475
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_date }}</td>
476
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_state }}</td>
477
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">
478
- {{ $parent.$parent.$parent.getDefect(row.f_last_check_result) }}
479
- </td>
480
- </template>
481
- </data-grid>
482
- </criteria-paged>
483
- </div>
484
- </template>
485
-
486
- <script>
487
- import {PagedList} from 'vue-client'
488
- import {HttpResetClass} from 'vue-client'
489
- import co from 'co'
490
- import * as Util from '../../Util'
491
- import Vue from 'vue'
492
-
493
- // let select = function * (self,userid) {
494
- // let http = new HttpResetClass()
495
- // let getGasman = yield http.load('POST','/rs/search', {
496
- // source: 'this.getChildByName($安检员$).getUsers()',
497
- // userid: userid
498
- // }, {resolveMsg: null, rejectMsg: null})
499
- // //tag
500
- // getGasman.data.forEach((checker)=>{
501
- // self.checkersid.push({label:checker.name,value:checker.id})
502
- // })
503
- // self.checkersid.push({label:'全部',value:''})
504
- // }
505
-
506
-
507
- export default {
508
- title: '用户安检情况',
509
- data() {
510
- let options = []
511
- let year = (new Date()).getFullYear()
512
- for (let i = year; i <= year + 3; i++)
513
- options.push({label: i + '', value: i + ''})
514
- let moptions = []
515
- for (let i = 1; i <= 12; i++)
516
- moptions.push({label: i + '', value: i + ''})
517
-
518
- return {
519
- searchData: {
520
- condition: '1=1',
521
- orderitem: "f_userinfo_code",
522
- timetype: "dd",
523
- f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
524
-
525
- },
526
- excelHeaders: {
527
- //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
528
-
529
- 'f_userinfo_code': '用户编号',
530
- 'f_user_name': '用户名称',
531
- 'f_user_phone': '用户电话',
532
- 'f_meternumber': '燃气表号',
533
- 'f_meter_brand': '气表品牌',
534
- // 'count_item': '安检次数',
535
- 'f_user_type': '用户类型',
536
- 'f_checker_name': '安检员',
537
- 'f_comments': '安检备注',
538
- 'f_slice_area': '区域',
539
- 'f_residential_area': '小区名称',
540
- 'f_address': '地址',
541
- 'f_factory_date': '表具出厂日期',
542
- 'f_last_check_date': '最后一次安检日期',
543
- 'f_last_check_state': '最后一次安检状态',
544
- 'f_defect_content': '安检结果'
545
- },
546
- model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
547
- orderitem: "'f_last_check_date desc'",
548
- timetype: "'dd'",
549
- f_defect_content: 'this.f_defect_content'
550
- }),
551
- f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END",
552
- orgstrs: [{label: '全部', value: ''}],
553
- checkersid: [],
554
- SafeCheckXZ: '',
555
- civil: '', //民用安检周期
556
- civilian: '', //非民用安检周期
557
- SafeCheckXZs: [{label: '全部', value: ''}, {label: '未安检', value: '未安检'}, {label: '已安检', value: '已安检'}], // 安检筛选选项
558
- SafeCheckSXs: [{label: '是', value: '是'}, {label: '否', value: '否'}, {label: '全部', value: ''}],
559
- // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
560
- IsShares: [{label: '是', value: '是'}, {label: '否', value: '否'}],
561
- IsShare: '否',
562
- checker: {},
563
- NoBuys: [{label: '是', value: '是'}, {label: '否', value: '否'}],
564
- criteriaShow: false,
565
- checkers: [],
566
- chosenOrg: {id: 0},
567
- showModal: false,
568
- checkedAll: false,
569
- checkrows: [],
570
- adjustables: [],
571
- f_plan_year: year + '',
572
- f_plan_month: moptions[new Date().getMonth()].value,
573
- f_effective_start_time: '', //计划有效起始时间
574
- f_effective_end_time: '', //计划有效结束时间
575
- checkboxModel: {},
576
- c_year_list: options,
577
- c_month_list: moptions,
578
- areas: this.areas(),
579
- checkstatus: this.checkstatus(),
580
- usertypes: this.usertypes(),
581
- userstates: this.userstates(),
582
- sqlname: '',
583
- f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '有隐患', value: '有隐患'}],
584
- creatPlanWay: '',
585
- userTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
586
- tableTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')],
587
- tableBrands: [{label: '全部', value: ''}],
588
- sliceArea: [],
589
- cbcs: [],
590
- cbc: [],
591
- pcds: [],
592
- isgas: [{label: '全部', value: ''},{label: '是', value: 'is not null '},{label: '否', value: ' is null '}]
593
-
594
- }
595
- },
596
- props: {
597
- style: {
598
- type: String,
599
- default: 'col-sm-2 form-group'
600
- },
601
- style2: {
602
- type: String,
603
- default: 'col-sm-4 form-group'
604
- },
605
- checkplan: { // 传入一条安检计划信息
606
- type: Object
607
- },
608
- additemshow: {
609
- type: Boolean,
610
- default: false
611
- }
612
- },
613
- ready() {
614
- // 获取分公司信息
615
- this.model.f_defect_content = this.f_defect_content
616
-
617
- //this.getfengongsi()
618
- this.model.chosenOrg = {id: 0}
619
- this.model.f_filialeids = this.$login.f.f_orgids
620
- this.model.f_filiale = this.$login.f.f_fengongsi
621
- this.model.f_OrgStr = this.$login.f.orgpathstr
622
- this.Mreadibook(`('${this.$login.f.orgid}')`)
623
- this.getAllMeterBook(`('${this.$login.f.orgid}')`)
624
- this.getTableBrands()
625
- },
626
- methods: {
627
- getTableBrands() {
628
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
629
- {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
630
- {resolveMsg: null, rejectMsg: null}).then((resp) => {
631
- resp.data.forEach((result) => {
632
- this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
633
- })
634
- })
635
- },
636
- //获取省市区列表
637
- getPcd(val) {
638
- this.pcds = [{label: '全部', value: ''}]
639
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
640
- {data: {items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}`}},
641
- {resolveMsg: null, rejectMsg: null}).then((pcdlist) => {
642
- pcdlist.data.forEach((result) => {
643
- this.pcds.push({label: result.f_pcd, value: result.id})
644
- })
645
- })
646
- },
647
- getmeterbook(val) {
648
-
649
- //tag
650
- this.cbc = []
651
- this.cbc.push({
652
- label: '全部',
653
- value: ''
654
- })
655
- if (val == '') {
656
-
657
- this.cbcs.forEach(res => {
658
- this.cbc.push({
659
- label: res.f_book_name,
660
- value: res.id
661
- })
662
- })
663
- } else {
664
- this.cbcs.forEach(res => {
665
- if (res.f_book_slice_area == val) {
666
- this.cbc.push({
667
- label: res.f_book_name,
668
- value: res.id
669
- })
670
- }
671
- })
672
- }
673
- },
674
- Mreadibook(val) {
675
- ////tag
676
- ////tag
677
- this.sliceArea = []
678
- if (val) {
679
- new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
680
- data: {
681
- items: 'name',
682
- tablename: 't_zone',
683
- condition: `parentid in ${val}`,
684
- orderitem: 'id'
685
- }
686
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
687
- this.sliceArea.push({
688
- label: '全部',
689
- value: ''
690
- })
691
- res.data.forEach(ress => {
692
- this.sliceArea.push({
693
- label: ress.name,
694
- value: ress.name
695
- })
696
- })
697
-
698
- })
699
- }
700
- },
701
- // 获取县域分公司内容
702
- getfengongsi() {
703
- let val = {
704
- source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
705
- userid: `${this.$login.f.id}`
706
- }
707
- let http = new HttpResetClass()
708
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
709
- res.data.forEach((item) => {
710
- this.orgstrs.push({label: item.name, value: item.id})
711
- })
712
- //tag
713
- })
714
- },
715
- // 县域分公司发生改变
716
- // orgstrchange(val){
717
- // if(val == undefined || val == ''){
718
- // return
719
- // }else {
720
- // this.checkersid = []
721
- // let gen = select(this,val)
722
- // return co(gen)
723
- // }
724
- // },
725
- getDefect(val) {
726
- if (val) {
727
- try {
728
- var defect = JSON.parse(val)
729
- return defect.result
730
- } catch (e) {
731
- //tag
732
- return '正常'
733
- }
734
- }
735
- return '正常'
736
- },
737
- checkerchange(val) {
738
- this.checkboxModel.f_checker = val.name
739
- this.checkboxModel.f_checker_id = val.id
740
- },
741
- search(args) {
742
- if (this.model.f_filialeids){
743
- args.condition += ` and f_orgid in ${this.model.f_filialeids}`
744
- }
745
- if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
746
- this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
747
- return
748
- }
749
- if ((args.model.f_check_start || args.model.f_check_end) && !this.SafeCheckXZ) {
750
- this.$showMessage('如果录入 安检起始时间,需要选择 安检筛选条件!')
751
- return
752
- }
753
- //args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
754
- // let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
755
- let con = '1=1'
756
- this.$emit('filiale-change', con)
757
- con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'` : ''
758
- con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
759
- con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
760
- con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
761
- con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
762
- if (this.SafeCheckXZ) {
763
- con += ` and f_offsite_time >= '${args.model.f_check_start}' and f_offsite_time <= '${args.model.f_check_end}' `
764
- if (this.SafeCheckXZ == '未安检') {
765
- args.condition += ' and ruhuid is null'
766
- } else {
767
- args.condition += ' and ruhuid is not null'
768
- }
769
- }
770
- con += args.model.f_last_check_state ? ` and f_entry_status = '${args.model.f_last_check_state}'` : ''
771
- con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ''
772
- let condition = {
773
- condition1: args.condition,
774
- condition2: con
775
- }
776
- this.searchData.condition = condition
777
- return this.model.search(condition, args.model)
778
- },
779
- checkstatus() {
780
- return this.$appdata.getParam('安检状态') ? [{
781
- label: '全部',
782
- value: ''
783
- }, ...this.$appdata.getParam('安检状态')] : [{label: '全部', value: ''}]
784
- },
785
- usertypes() {
786
- return this.$appdata.getParam('用户类型') ? [{
787
- label: '全部',
788
- value: ''
789
- }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
790
- },
791
- userstates() {
792
- return this.$appdata.getParam('用户状态') ? [{
793
- label: '全部',
794
- value: ''
795
- }, ...this.$appdata.getParam('用户状态')] : [{label: '全部', value: ''}]
796
- },
797
- hiddenr() {
798
- this.$parent.showItem = !this.$parent.showItem
799
- },
800
- hidden() {
801
- this.criteriaShow = !this.criteriaShow
802
- },
803
- confirm() {
804
- if (!this.checkboxModel.f_plan_name) {
805
- this.$showMessage('请填写安检计划名称!')
806
- return
807
- }
808
- // if(this.f_effective_start_time == ''){
809
- // this.$showMessage('请选择有效起始日期!')
810
- // return
811
- // }
812
- // if(this.f_effective_end_time == ''){
813
- // this.$showMessage('请选择有效结束日期!')
814
- // return
815
- // }
816
- if (this.IsShare == '否') {
817
- if (!this.checkboxModel.f_checker_id) {
818
- this.$showMessage('请选择安检员!')
819
- return
820
- }
821
- }
822
- let gen = saveGen(this)
823
- return co(gen)
824
- },
825
- changeStates() {
826
- if (this.checkedAll) {//实现反选/
827
- this.checkrows = [];
828
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
829
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
830
- }
831
- } else {//实现全选
832
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
833
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
834
- }
835
- let _this = this
836
- let condition = this.$refs.paged.$refs.criteria.condition
837
- let url = this.model.url
838
- this.$resetpost(`${url}?pageSize=9999999`, {
839
- data: {
840
- condition: condition,
841
- groupitem: '',
842
- orderitem: 'f_residential_area',
843
- f_usertype: this.model.f_usertype,
844
- f_filialeids: this.model.f_filialeids,
845
- month: this.model.month,
846
- safeCycle: this.model.safeCycle,
847
- f_checktime_start: this.model.f_checktime_start,
848
- f_checktime_end: this.model.f_checktime_end,
849
- SafeCheckSX: this.model.SafeCheckSX,
850
- f_last_check_state: this.model.f_last_check_state
851
- },
852
- }, {resolveMsg: null, rejectMsg: null}, -1).then(
853
- (respanse) => {
854
- if (respanse.data.length >= 5000) {
855
- this.$showMessage("数据量太大,请重新选择")
856
- } else {
857
- _this.checkrows = []
858
- for (let j = 0; j < respanse.data.length; j++) {
859
- _this.checkrows.push(respanse.data[j])
860
- }
861
- //tag;
862
- }
863
- })
864
- }
865
- },
866
- addChecked(item) {
867
- //tag;
868
- if (!item.checked) {
869
- this.checkrows.push(item);
870
- //tag;
871
- } else {
872
- for (let i = 0; i < this.checkrows.length; i++) {
873
- if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
874
- this.checkrows.splice(i, 1)
875
- }
876
- }
877
- }
878
- },
879
- ToshowModal() {
880
- this.creatPlanWay = 'single'
881
- if (this.checkrows.length > 0) {
882
- this.showModal = true
883
- } else {
884
- this.$showMessage("请选择需要安检的用户!")
885
- }
886
- },
887
- FiltrationPlan() {
888
- if (this.model.rows.length == 0) {
889
- this.$showMessage("暂无可生成的计划!")
890
- return
891
- }
892
- this.creatPlanWay = 'filtration'
893
- this.showModal = true
894
- },
895
- AllPlan() {
896
- if (this.model.rows.length == 0) {
897
- this.$showMessage("暂无可生成的计划!")
898
- return
899
- }
900
- this.creatPlanWay = 'all'
901
- this.showModal = true
902
- },
903
- cancel() {
904
- this.showModal = false
905
- },
906
- areas() {
907
- let rs = []
908
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
909
- let temp = {
910
- label: this.$login.f.f_allArea[i].label,
911
- value: this.$login.f.f_allArea[i].label
912
- }
913
- rs.push(temp)
914
- }
915
- return [{label: '全部', value: ''}, ...rs]
916
- },
917
- initAdjustables() {
918
- //tag
919
- let arr = []
920
- let filter = this.$login.f.f_orgids
921
- this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
922
- let temp = {}
923
- temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
924
- temp.value = `${item.value.id}`
925
- arr.push(temp)
926
- })
927
- this.adjustables = [{label: '全部', value: ''}, ...arr]
928
- },
929
- getAllMeterBook(val) {
930
- ////tag
931
- ////tag
932
- this.cbcs = []
933
- if (val) {
934
- new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
935
- data: {
936
- items: 'f_book_name,f_book_slice_area,id',
937
- tablename: 't_meter_book',
938
- condition: `f_filiale_id in ${val}`,
939
- orderitem: 'id'
940
- }
941
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
942
- res.data.forEach(ress => {
943
- this.cbcs.push({
944
- id: ress.id,
945
- f_book_name: ress.f_book_name,
946
- f_book_slice_area: ress.f_book_slice_area
947
- })
948
- })
949
- this.cbc = []
950
- this.cbc.push({
951
- label: '全部',
952
- value: ''
953
- })
954
- this.cbcs.forEach(res => {
955
- this.cbc.push({
956
- label: res.f_book_name,
957
- value: res.id
958
- })
959
- })
960
- })
961
- }
962
- },
963
- getRes(obj) {
964
- this.model.f_filialeids = this.$login.convertToIn(obj.resids);
965
- this.Mreadibook(this.model.f_filialeids)
966
- this.getAllMeterBook(this.model.f_filialeids)
967
- this.getPcd(this.model.f_filialeids)
968
- }
969
- },
970
-
971
- watch: {
972
- 'model.f_usertype'(val) {
973
- if (val == '民用') {
974
- this.model.safeCycle = this.civil
975
- } else if (val == '非民用') {
976
- this.model.safeCycle = this.civilian
977
- }
978
- },
979
- 'model.SafeCheckXZ'(val) {
980
- this.model.SafeCheckSC = ''
981
- if (val == '已安检') {
982
- this.model.SafeCheckCQ = ''
983
- this.model.SafeCheckSX = {
984
- f_check_end: '', // 安检时间 查询起始条件
985
- f_check_start: ''// 安检时间 查询终止条件
986
- }
987
- } else {
988
- // 当使用筛选条件时,清空不需要的条件选项
989
- this.model.f_issue_start = ''
990
- this.model.f_issue_end = ''
991
- this.$refs.paged.$refs.criteria.model.f_check_start = ''
992
- this.$refs.paged.$refs.criteria.model.f_check_end = ''
993
- this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
994
- this.model.month = ''
995
- if (val == '应安检') {
996
- this.model.SafeCheckSC = '否'
997
-
998
- this.model.f_issue_start = Util.toStartDateString()
999
- this.model.f_issue_end = Util.toStandardDateString()
1000
- }
1001
- // this.model.f_checktime_start = ''
1002
- // this.model.f_checktime_end = ''
1003
- }
1004
- },
1005
- 'model.SafeCheckSC'(val) {
1006
- if (val == '') {
1007
- this.model.f_issue_start = ''
1008
- this.model.f_issue_end = ''
1009
- }
1010
- },
1011
- // 'checker'(val){
1012
- // //tag
1013
- // if(val){
1014
- // this.checkboxModel.f_checker = this.checker[0].name
1015
- // this.checkboxModel.f_checker_id = this.checker[0].id
1016
- // }
1017
- // },
1018
- 'model.rows'() {
1019
- // if (!this.checkedAll) {//实现反选/
1020
- // this.checkrows = [];
1021
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1022
- var k = false
1023
- for (let j = 0; j < this.checkrows.length; j++) {
1024
- if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1025
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1026
- k = true
1027
- continue
1028
- }
1029
- }
1030
- if (!k) {
1031
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1032
- }
1033
- }
1034
- // } else {//实现全选
1035
- // // this.checkboxModel = {};
1036
- // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1037
- // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1038
- // }
1039
- // }
1040
- }
1041
- },
1042
- computed: {
1043
- selected() {
1044
- return this.$refs.paged.$refs.grid.selected
1045
- }
1046
- }
1047
- }
1048
- </script>
1049
- <style scoped>
1050
- .newcolor {
1051
- color: red;
1052
- }
1053
-
1054
- .table th {
1055
- background-color: #f2f6fa;
1056
- color: black;
1057
- }
1058
- </style>
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
7
+ <div :class="$parent.$parent.style">
8
+ <label class="font_normal_body">用户编号</label>
9
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
10
+ id="f_userinfo_code"
11
+
12
+ placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
13
+ </div>
14
+ <div :class="$parent.$parent.style">
15
+ <label class="font_normal_body">用户姓名</label>
16
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name" id="f_user_name"
17
+ placeholder="用户姓名" condition="f_user_name like '%{}%'">
18
+ </div>
19
+ <div :class="$parent.$parent.style">
20
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
21
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
22
+ id="f_residential_area"
23
+ placeholder="小区" condition="f_residential_area like '%{}%'">
24
+ </div>
25
+ <div :class="$parent.$parent.style">
26
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
27
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_address" id="f_address"
28
+ placeholder="地址" condition="f_address like '%{}%'">
29
+ </div>
30
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
31
+ <export-excel-safe :data="$parent.$parent.searchData"
32
+ :field="$parent.$parent.excelHeaders"
33
+ sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
34
+ template-name='用户安检情况' :choose-col="true"></export-excel-safe>
35
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
36
+ <div style="float: right" class="button_spacing"
37
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
38
+ @click="$parent.$parent.hiddenr()"></div>
39
+ <div style="float: right" class="button_spacing"
40
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
41
+ @click="$parent.$parent.hidden()">
42
+
43
+ </div>
44
+ </div>
45
+
46
+
47
+ </div>
48
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
49
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
50
+ <label class="font_normal_body">用户类型</label>
51
+ <v-select id="f_usertype"
52
+ placeholder='用户类型'
53
+ class="select select_list"
54
+ :value.sync="model.f_usertype"
55
+ :value-single="true"
56
+ :options='$parent.$parent.usertypes'
57
+ v-model="model.f_usertype"
58
+ condition="f_user_type = '{}'"
59
+ close-on-select clear-button></v-select>
60
+ </div>
61
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
62
+
63
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
64
+ <label class="font_normal_body" style="color: red;">安检筛选</label>
65
+ <v-select
66
+ placeholder='安检筛选'
67
+ :value-single="true"
68
+ class="select select_list"
69
+ :value.sync="$parent.$parent.SafeCheckXZ"
70
+ :options='$parent.$parent.SafeCheckXZs'
71
+ v-model="$parent.$parent.SafeCheckXZ"
72
+ close-on-select clear-button></v-select>
73
+ </div>
74
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
75
+ <label class="font_normal_body">安检起始</label>
76
+ <datepicker
77
+ :value.sync="model.f_check_start"
78
+ placeholder='最后安检时间起始'
79
+ style="width: 60%"
80
+ :format="'yyyy-MM-dd 00:00:00'"
81
+ :show-rest-button="reset"
82
+ v-model="model.f_check_start">
83
+ </datepicker>
84
+ </div>
85
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
86
+ <label class="font_normal_body">安检结束</label>
87
+ <datepicker
88
+ :value.sync="model.f_check_end"
89
+ placeholder='最后安检时间结束'
90
+ style="width: 60%"
91
+ :format="'yyyy-MM-dd 23:59:59'"
92
+ :show-rest-button="reset"
93
+ v-model="model.f_check_end">
94
+ </datepicker>
95
+ </div>
96
+
97
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
98
+ <label class="font_normal_body">安检状态</label>
99
+ <v-select id="f_entry"
100
+ placeholder='安检状态'
101
+ class="select select_list"
102
+ :value.sync="model.f_last_check_state"
103
+ :value-single="true"
104
+ :options='$parent.$parent.checkstatus'
105
+ v-model="model.f_last_check_state"
106
+ condition="f_last_check_state = '{}'"
107
+ close-on-select clear-button></v-select>
108
+ </div>
109
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
110
+ <label class="font_normal_body">隐患情况</label>
111
+ <v-select
112
+ placeholder='隐患情况'
113
+ class="select select_list"
114
+ :value-single="true"
115
+ v-model='model.f_check_result'
116
+ :value.sync="model.f_check_result"
117
+ :options='$parent.$parent.f_check_results'
118
+ condition="f_last_check_result like '%{}%'"
119
+ close-on-select clear-button></v-select>
120
+ </div>
121
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
122
+ </div>
123
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
124
+
125
+ <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
126
+ <role-selector-safe
127
+ role-name="安检员"
128
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
129
+ @re-res="$parent.$parent.getRes"
130
+ :value.sync="model.f_checker_id"
131
+ v-model="model.f_checker_id"
132
+ :value-multiple="true"
133
+ condition=" f_checker_name in {}">
134
+ </role-selector-safe>
135
+ </div>
136
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
137
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
138
+ <v-select class="select_list select"
139
+ placeholder='片区/管理站' style="width: 60%"
140
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
141
+ :options='$parent.$parent.sliceArea'
142
+ filer-key="name"
143
+ close-on-select clear-button
144
+ condition="f_slice_area='{}'"
145
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
146
+ :value-single="true">
147
+ </v-select>
148
+ </div>
149
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
150
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
151
+ <v-select class="select_list select"
152
+ placeholder='抄表册' style="width: 60%"
153
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
154
+ :options='$parent.$parent.cbc'
155
+ filer-key="name"
156
+ close-on-select clear-button
157
+ condition="f_meter_book_num={}"
158
+ :value-single="true">
159
+ </v-select>
160
+ </div>
161
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
162
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
163
+ <v-select class="select_list select"
164
+ placeholder='请选择' style="width: 60%"
165
+ :value.sync="model.f_pcd" v-model="model.f_pcd"
166
+ :options='$parent.$parent.pcds'
167
+ filer-key="name"
168
+ close-on-select clear-button
169
+ condition="f_pcd_id ='{}'"
170
+ :value-single="true">
171
+ </v-select>
172
+ </div>
173
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
174
+ <label class="font_normal_body">用户状态</label>
175
+ <v-select class="select_list select"
176
+ placeholder='用户状态' style="width: 60%"
177
+ :value.sync="model.f_user_state" v-model="model.f_user_state"
178
+ :options='$parent.$parent.userstates'
179
+ close-on-select clear-button
180
+ condition="f_user_state = '{}'"
181
+ :value-single="true">
182
+ </v-select>
183
+ </div>
184
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
185
+ <label class="font_normal_body">用气性质</label>
186
+ <v-select
187
+ class="select_list select"
188
+ placeholder='用气性质' style="width: 60%"
189
+ v-model='model.userType'
190
+ :value.sync="model.userType"
191
+ :options='$parent.$parent.userTypes'
192
+ condition="f_gasproperties = '{}'"
193
+ :value-single="true"
194
+ close-on-select clear-button></v-select>
195
+ </div>
196
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
197
+ <label class="font_normal_body">气表类型</label>
198
+ <v-select
199
+ class="select_list select"
200
+ placeholder='气表类型' style="width: 60%"
201
+ v-model='model.tableType'
202
+ :value.sync="model.tableType"
203
+ :options='$parent.$parent.tableTypes'
204
+ condition="f_meter_classify = '{}'"
205
+ :value-single="true"
206
+ close-on-select clear-button></v-select>
207
+ </div>
208
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
209
+ <label class="font_normal_body">气表品牌</label>
210
+ <v-select
211
+ class="select_list select"
212
+ placeholder='气表类型' style="width: 60%"
213
+ v-model='model.tableBrand'
214
+ :value.sync="model.tableBrand"
215
+ :options='$parent.$parent.tableBrands'
216
+ condition="f_meter_brand = '{}'"
217
+ :value-single="true"
218
+ close-on-select clear-button></v-select>
219
+ </div>
220
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
221
+ <label class="font_normal_body">是否通气</label>
222
+ <v-select
223
+ class="select_list select"
224
+ placeholder='是否通气' style="width: 60%"
225
+ v-model='model.f_is_gas'
226
+ :value.sync="model.f_is_gas"
227
+ :options='$parent.$parent.isgas'
228
+ condition="f_gas_date {}"
229
+ :value-single="true"
230
+ close-on-select clear-button></v-select>
231
+ </div>
232
+ </div>
233
+
234
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
235
+ <div :class="$parent.$parent.style">
236
+ <label class="font_normal_body">用户编号</label>
237
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
238
+
239
+ placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
240
+ </div>
241
+ <div :class="$parent.$parent.style">
242
+ <label class="font_normal_body">用户姓名</label>
243
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name"
244
+ placeholder="用户姓名" condition="f_user_name like '%{}%'">
245
+ </div>
246
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
247
+ <export-excel-safe :data="$parent.$parent.searchData"
248
+ :field="$parent.$parent.excelHeaders"
249
+ sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
250
+ template-name='用户安检情况' :choose-col="true"></export-excel-safe>
251
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
252
+ <div style="float: right" class="button_spacing"
253
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
254
+ @click="$parent.$parent.hiddenr()"></div>
255
+ <div style="float: right" class="button_spacing"
256
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
257
+ @click="$parent.$parent.hidden()">
258
+
259
+ </div>
260
+ </div>
261
+
262
+ </div>
263
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
264
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
265
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
266
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
267
+
268
+ placeholder="小区" condition="f_residential_area like '%{}%'">
269
+ </div>
270
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
271
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
272
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_address"
273
+
274
+ placeholder="地址" condition="f_address like '%{}%'">
275
+ </div>
276
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
277
+ <label class="font_normal_body">用户类型</label>
278
+ <v-select
279
+ placeholder='用户类型'
280
+ class="select select_list"
281
+
282
+ :value.sync="model.f_usertype"
283
+ :value-single="true"
284
+ :options='$parent.$parent.usertypes'
285
+ v-model="model.f_usertype"
286
+ condition="f_user_type = '{}'"
287
+ close-on-select clear-button></v-select>
288
+ </div>
289
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
290
+
291
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
292
+ <label class="font_normal_body" style="color: red;">安检筛选</label>
293
+ <v-select
294
+ placeholder='安检筛选'
295
+ :value-single="true"
296
+
297
+ class="select select_list"
298
+ :value.sync="$parent.$parent.SafeCheckXZ"
299
+ :options='$parent.$parent.SafeCheckXZs'
300
+ v-model="$parent.$parent.SafeCheckXZ"
301
+ close-on-select clear-button></v-select>
302
+ </div>
303
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
304
+ <label class="font_normal_body">用气性质</label>
305
+ <v-select
306
+ class="select_list select"
307
+ placeholder='用气性质' style="width: 60%"
308
+ v-model='model.userType'
309
+ :value.sync="model.userType"
310
+ :options='$parent.$parent.userTypes'
311
+ condition="f_gasproperties = '{}'"
312
+ :value-single="true"
313
+ close-on-select clear-button></v-select>
314
+ </div>
315
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
316
+ <label class="font_normal_body">气表类型</label>
317
+ <v-select
318
+ class="select_list select"
319
+ placeholder='气表类型' style="width: 60%"
320
+ v-model='model.tableType'
321
+ :value.sync="model.tableType"
322
+ :options='$parent.$parent.tableTypes'
323
+ condition="f_meter_classify = '{}'"
324
+ :value-single="true"
325
+ close-on-select clear-button></v-select>
326
+ </div>
327
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
328
+ <label class="font_normal_body">气表品牌</label>
329
+ <v-select
330
+ class="select_list select"
331
+ placeholder='气表类型' style="width: 60%"
332
+ v-model='model.tableBrand'
333
+ :value.sync="model.tableBrand"
334
+ :options='$parent.$parent.tableBrands'
335
+ condition="f_meter_brand = '{}'"
336
+ :value-single="true"
337
+ close-on-select clear-button></v-select>
338
+ </div>
339
+
340
+ </div>
341
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
342
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
343
+ <label class="font_normal_body">安检起始</label>
344
+ <datepicker
345
+ :value.sync="model.f_check_start"
346
+ placeholder='最后安检时间起始'
347
+ :disabled-days-of-week="[]"
348
+ style="width: 60%"
349
+ :format="'yyyy-MM-dd'"
350
+ :show-rest-button="reset"
351
+ v-model="model.f_check_start">
352
+ </datepicker>
353
+ </div>
354
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
355
+ <label class="font_normal_body">安检结束</label>
356
+ <datepicker
357
+ :value.sync="model.f_check_end"
358
+ placeholder='最后安检时间结束'
359
+ style="width: 60%"
360
+ :disabled-days-of-week="[]"
361
+ :format="'yyyy-MM-dd'"
362
+ :show-rest-button="reset"
363
+ v-model="model.f_check_end">
364
+ </datepicker>
365
+ </div>
366
+
367
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
368
+ <label class="font_normal_body">安检状态</label>
369
+ <v-select
370
+ placeholder='安检状态'
371
+ class="select select_list"
372
+
373
+ :value.sync="model.f_last_check_state"
374
+ :value-single="true"
375
+ :options='$parent.$parent.checkstatus'
376
+ v-model="model.f_last_check_state"
377
+ condition="f_last_check_state = '{}'"
378
+ close-on-select clear-button></v-select>
379
+ </div>
380
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
381
+ <label class="font_normal_body">隐患情况</label>
382
+ <v-select
383
+ placeholder='隐患情况'
384
+ class="select select_list"
385
+
386
+ :value-single="true"
387
+ v-model='model.f_check_result'
388
+ :value.sync="model.f_check_result"
389
+ :options='$parent.$parent.f_check_results'
390
+ condition="f_last_check_result like '%{}%'"
391
+ close-on-select clear-button></v-select>
392
+ </div>
393
+
394
+ </div>
395
+ <!--<div class="row" v-show="$parent.$parent.$parent.showItem">
396
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
397
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
398
+ <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">
399
+ </right-tree>
400
+ </div>
401
+
402
+ </div>-->
403
+ </div>
404
+ </criteria>
405
+ <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
406
+ <template partial='head'>
407
+ <tr>
408
+ <th>
409
+ <nobr>用户编号</nobr>
410
+ </th>
411
+ <th>
412
+ <nobr>用户名称</nobr>
413
+ </th>
414
+ <th>
415
+ <nobr>用户电话</nobr>
416
+ </th>
417
+ <th>
418
+ <nobr>燃气表号</nobr>
419
+ </th>
420
+ <th>
421
+ <nobr>气表品牌</nobr>
422
+ </th>
423
+ <th>
424
+ <nobr>用户类型</nobr>
425
+ </th>
426
+ <!-- <th>-->
427
+ <!-- <nobr>壁挂炉</nobr>-->
428
+ <!-- </th>-->
429
+ <!-- <th>-->
430
+ <!-- <nobr>灶具</nobr>-->
431
+ <!-- </th>-->
432
+ <th>
433
+ <nobr>区域</nobr>
434
+ </th>
435
+ <th>
436
+ <nobr>小区名称</nobr>
437
+ </th>
438
+ <th style="padding: 0 40px">
439
+ <nobr>地址</nobr>
440
+ </th>
441
+ <th>
442
+ <nobr>安检员</nobr>
443
+ </th>
444
+ <th>
445
+ <nobr>安检员备注</nobr>
446
+ </th>
447
+ <th>
448
+ <nobr>表具出厂日期</nobr>
449
+ </th>
450
+ <th>
451
+ <nobr>最后一次安检日期</nobr>
452
+ </th>
453
+ <th>
454
+ <nobr>最后一次安检状态</nobr>
455
+ </th>
456
+ <th>
457
+ <nobr>安检结果</nobr>
458
+ </th>
459
+ </tr>
460
+ </template>
461
+ <template partial='body'>
462
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_userinfo_code }}</td>
463
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_name }}</td>
464
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_phone }}</td>
465
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meternumber }}</td>
466
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meter_brand }}</td>
467
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_user_type }}</td>
468
+ <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
469
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_slice_area }}</td>
470
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_residential_area }}</td>
471
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_address }}</td>
472
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_checker_name }}</td>
473
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_comments }}</td>
474
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_factory_date }}</td>
475
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_date }}</td>
476
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_state }}</td>
477
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">
478
+ {{ $parent.$parent.$parent.getDefect(row.f_last_check_result) }}
479
+ </td>
480
+ </template>
481
+ </data-grid>
482
+ </criteria-paged>
483
+ </div>
484
+ </template>
485
+
486
+ <script>
487
+ import {PagedList} from 'vue-client'
488
+ import {HttpResetClass} from 'vue-client'
489
+ import co from 'co'
490
+ import * as Util from '../../Util'
491
+ import Vue from 'vue'
492
+
493
+ // let select = function * (self,userid) {
494
+ // let http = new HttpResetClass()
495
+ // let getGasman = yield http.load('POST','/rs/search', {
496
+ // source: 'this.getChildByName($安检员$).getUsers()',
497
+ // userid: userid
498
+ // }, {resolveMsg: null, rejectMsg: null})
499
+ // //tag
500
+ // getGasman.data.forEach((checker)=>{
501
+ // self.checkersid.push({label:checker.name,value:checker.id})
502
+ // })
503
+ // self.checkersid.push({label:'全部',value:''})
504
+ // }
505
+
506
+
507
+ export default {
508
+ title: '用户安检情况',
509
+ data() {
510
+ let options = []
511
+ let year = (new Date()).getFullYear()
512
+ for (let i = year; i <= year + 3; i++)
513
+ options.push({label: i + '', value: i + ''})
514
+ let moptions = []
515
+ for (let i = 1; i <= 12; i++)
516
+ moptions.push({label: i + '', value: i + ''})
517
+
518
+ return {
519
+ searchData: {
520
+ condition: '1=1',
521
+ orderitem: "f_userinfo_code",
522
+ timetype: "dd",
523
+ f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
524
+
525
+ },
526
+ excelHeaders: {
527
+ //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
528
+
529
+ 'f_userinfo_code': '用户编号',
530
+ 'f_user_name': '用户名称',
531
+ 'f_user_phone': '用户电话',
532
+ 'f_meternumber': '燃气表号',
533
+ 'f_meter_brand': '气表品牌',
534
+ // 'count_item': '安检次数',
535
+ 'f_user_type': '用户类型',
536
+ 'f_checker_name': '安检员',
537
+ 'f_comments': '安检备注',
538
+ 'f_slice_area': '区域',
539
+ 'f_residential_area': '小区名称',
540
+ 'f_address': '地址',
541
+ 'f_factory_date': '表具出厂日期',
542
+ 'f_last_check_date': '最后一次安检日期',
543
+ 'f_last_check_state': '最后一次安检状态',
544
+ 'f_defect_content': '安检结果'
545
+ },
546
+ model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
547
+ orderitem: "'f_last_check_date desc'",
548
+ timetype: "'dd'",
549
+ f_defect_content: 'this.f_defect_content'
550
+ }),
551
+ f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END",
552
+ orgstrs: [{label: '全部', value: ''}],
553
+ checkersid: [],
554
+ SafeCheckXZ: '',
555
+ civil: '', //民用安检周期
556
+ civilian: '', //非民用安检周期
557
+ SafeCheckXZs: [{label: '全部', value: ''}, {label: '未安检', value: '未安检'}, {label: '已安检', value: '已安检'}], // 安检筛选选项
558
+ SafeCheckSXs: [{label: '是', value: '是'}, {label: '否', value: '否'}, {label: '全部', value: ''}],
559
+ // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
560
+ IsShares: [{label: '是', value: '是'}, {label: '否', value: '否'}],
561
+ IsShare: '否',
562
+ checker: {},
563
+ NoBuys: [{label: '是', value: '是'}, {label: '否', value: '否'}],
564
+ criteriaShow: false,
565
+ checkers: [],
566
+ chosenOrg: {id: 0},
567
+ showModal: false,
568
+ checkedAll: false,
569
+ checkrows: [],
570
+ adjustables: [],
571
+ f_plan_year: year + '',
572
+ f_plan_month: moptions[new Date().getMonth()].value,
573
+ f_effective_start_time: '', //计划有效起始时间
574
+ f_effective_end_time: '', //计划有效结束时间
575
+ checkboxModel: {},
576
+ c_year_list: options,
577
+ c_month_list: moptions,
578
+ areas: this.areas(),
579
+ checkstatus: this.checkstatus(),
580
+ usertypes: this.usertypes(),
581
+ userstates: this.userstates(),
582
+ sqlname: '',
583
+ f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '有隐患', value: '有隐患'}],
584
+ creatPlanWay: '',
585
+ userTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
586
+ tableTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')],
587
+ tableBrands: [{label: '全部', value: ''}],
588
+ sliceArea: [],
589
+ cbcs: [],
590
+ cbc: [],
591
+ pcds: [],
592
+ isgas: [{label: '全部', value: ''},{label: '是', value: 'is not null '},{label: '否', value: ' is null '}]
593
+
594
+ }
595
+ },
596
+ props: {
597
+ style: {
598
+ type: String,
599
+ default: 'col-sm-2 form-group'
600
+ },
601
+ style2: {
602
+ type: String,
603
+ default: 'col-sm-4 form-group'
604
+ },
605
+ checkplan: { // 传入一条安检计划信息
606
+ type: Object
607
+ },
608
+ additemshow: {
609
+ type: Boolean,
610
+ default: false
611
+ }
612
+ },
613
+ ready() {
614
+ // 获取分公司信息
615
+ this.model.f_defect_content = this.f_defect_content
616
+
617
+ //this.getfengongsi()
618
+ this.model.chosenOrg = {id: 0}
619
+ this.model.f_filialeids = this.$login.f.f_orgids
620
+ this.model.f_filiale = this.$login.f.f_fengongsi
621
+ this.model.f_OrgStr = this.$login.f.orgpathstr
622
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
623
+ this.getAllMeterBook(`('${this.$login.f.orgid}')`)
624
+ this.getTableBrands()
625
+ },
626
+ methods: {
627
+ getTableBrands() {
628
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
629
+ {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
630
+ {resolveMsg: null, rejectMsg: null}).then((resp) => {
631
+ resp.data.forEach((result) => {
632
+ this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
633
+ })
634
+ })
635
+ },
636
+ //获取省市区列表
637
+ getPcd(val) {
638
+ this.pcds = [{label: '全部', value: ''}]
639
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
640
+ {data: {items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}`}},
641
+ {resolveMsg: null, rejectMsg: null}).then((pcdlist) => {
642
+ pcdlist.data.forEach((result) => {
643
+ this.pcds.push({label: result.f_pcd, value: result.id})
644
+ })
645
+ })
646
+ },
647
+ getmeterbook(val) {
648
+
649
+ //tag
650
+ this.cbc = []
651
+ this.cbc.push({
652
+ label: '全部',
653
+ value: ''
654
+ })
655
+ if (val == '') {
656
+
657
+ this.cbcs.forEach(res => {
658
+ this.cbc.push({
659
+ label: res.f_book_name,
660
+ value: res.id
661
+ })
662
+ })
663
+ } else {
664
+ this.cbcs.forEach(res => {
665
+ if (res.f_book_slice_area == val) {
666
+ this.cbc.push({
667
+ label: res.f_book_name,
668
+ value: res.id
669
+ })
670
+ }
671
+ })
672
+ }
673
+ },
674
+ Mreadibook(val) {
675
+ ////tag
676
+ ////tag
677
+ this.sliceArea = []
678
+ if (val) {
679
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
680
+ data: {
681
+ items: 'name',
682
+ tablename: 't_zone',
683
+ condition: `parentid in ${val}`,
684
+ orderitem: 'id'
685
+ }
686
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
687
+ this.sliceArea.push({
688
+ label: '全部',
689
+ value: ''
690
+ })
691
+ res.data.forEach(ress => {
692
+ this.sliceArea.push({
693
+ label: ress.name,
694
+ value: ress.name
695
+ })
696
+ })
697
+
698
+ })
699
+ }
700
+ },
701
+ // 获取县域分公司内容
702
+ getfengongsi() {
703
+ let val = {
704
+ source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
705
+ userid: `${this.$login.f.id}`
706
+ }
707
+ let http = new HttpResetClass()
708
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
709
+ res.data.forEach((item) => {
710
+ this.orgstrs.push({label: item.name, value: item.id})
711
+ })
712
+ //tag
713
+ })
714
+ },
715
+ // 县域分公司发生改变
716
+ // orgstrchange(val){
717
+ // if(val == undefined || val == ''){
718
+ // return
719
+ // }else {
720
+ // this.checkersid = []
721
+ // let gen = select(this,val)
722
+ // return co(gen)
723
+ // }
724
+ // },
725
+ getDefect(val) {
726
+ if (val) {
727
+ try {
728
+ var defect = JSON.parse(val)
729
+ return defect.result
730
+ } catch (e) {
731
+ //tag
732
+ return '正常'
733
+ }
734
+ }
735
+ return '正常'
736
+ },
737
+ checkerchange(val) {
738
+ this.checkboxModel.f_checker = val.name
739
+ this.checkboxModel.f_checker_id = val.id
740
+ },
741
+ search(args) {
742
+ if (this.model.f_filialeids){
743
+ args.condition += ` and f_orgid in ${this.model.f_filialeids}`
744
+ }
745
+ if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
746
+ this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
747
+ return
748
+ }
749
+ if ((args.model.f_check_start || args.model.f_check_end) && !this.SafeCheckXZ) {
750
+ this.$showMessage('如果录入 安检起始时间,需要选择 安检筛选条件!')
751
+ return
752
+ }
753
+ //args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
754
+ // let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
755
+ let con = '1=1'
756
+ this.$emit('filiale-change', con)
757
+ con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'` : ''
758
+ con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
759
+ con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
760
+ con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
761
+ con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
762
+ if (this.SafeCheckXZ) {
763
+ con += ` and f_offsite_time >= '${args.model.f_check_start}' and f_offsite_time <= '${args.model.f_check_end}' `
764
+ if (this.SafeCheckXZ == '未安检') {
765
+ args.condition += ' and ruhuid is null'
766
+ } else {
767
+ args.condition += ' and ruhuid is not null'
768
+ }
769
+ }
770
+ con += args.model.f_last_check_state ? ` and f_entry_status = '${args.model.f_last_check_state}'` : ''
771
+ con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ''
772
+ let condition = {
773
+ condition1: args.condition,
774
+ condition2: con
775
+ }
776
+ this.searchData.condition = condition
777
+ return this.model.search(condition, args.model)
778
+ },
779
+ checkstatus() {
780
+ return this.$appdata.getParam('安检状态') ? [{
781
+ label: '全部',
782
+ value: ''
783
+ }, ...this.$appdata.getParam('安检状态')] : [{label: '全部', value: ''}]
784
+ },
785
+ usertypes() {
786
+ return this.$appdata.getParam('用户类型') ? [{
787
+ label: '全部',
788
+ value: ''
789
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
790
+ },
791
+ userstates() {
792
+ return this.$appdata.getParam('用户状态') ? [{
793
+ label: '全部',
794
+ value: ''
795
+ }, ...this.$appdata.getParam('用户状态')] : [{label: '全部', value: ''}]
796
+ },
797
+ hiddenr() {
798
+ this.$parent.showItem = !this.$parent.showItem
799
+ },
800
+ hidden() {
801
+ this.criteriaShow = !this.criteriaShow
802
+ },
803
+ confirm() {
804
+ if (!this.checkboxModel.f_plan_name) {
805
+ this.$showMessage('请填写安检计划名称!')
806
+ return
807
+ }
808
+ // if(this.f_effective_start_time == ''){
809
+ // this.$showMessage('请选择有效起始日期!')
810
+ // return
811
+ // }
812
+ // if(this.f_effective_end_time == ''){
813
+ // this.$showMessage('请选择有效结束日期!')
814
+ // return
815
+ // }
816
+ if (this.IsShare == '否') {
817
+ if (!this.checkboxModel.f_checker_id) {
818
+ this.$showMessage('请选择安检员!')
819
+ return
820
+ }
821
+ }
822
+ let gen = saveGen(this)
823
+ return co(gen)
824
+ },
825
+ changeStates() {
826
+ if (this.checkedAll) {//实现反选/
827
+ this.checkrows = [];
828
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
829
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
830
+ }
831
+ } else {//实现全选
832
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
833
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
834
+ }
835
+ let _this = this
836
+ let condition = this.$refs.paged.$refs.criteria.condition
837
+ let url = this.model.url
838
+ this.$resetpost(`${url}?pageSize=9999999`, {
839
+ data: {
840
+ condition: condition,
841
+ groupitem: '',
842
+ orderitem: 'f_residential_area',
843
+ f_usertype: this.model.f_usertype,
844
+ f_filialeids: this.model.f_filialeids,
845
+ month: this.model.month,
846
+ safeCycle: this.model.safeCycle,
847
+ f_checktime_start: this.model.f_checktime_start,
848
+ f_checktime_end: this.model.f_checktime_end,
849
+ SafeCheckSX: this.model.SafeCheckSX,
850
+ f_last_check_state: this.model.f_last_check_state
851
+ },
852
+ }, {resolveMsg: null, rejectMsg: null}, -1).then(
853
+ (respanse) => {
854
+ if (respanse.data.length >= 5000) {
855
+ this.$showMessage("数据量太大,请重新选择")
856
+ } else {
857
+ _this.checkrows = []
858
+ for (let j = 0; j < respanse.data.length; j++) {
859
+ _this.checkrows.push(respanse.data[j])
860
+ }
861
+ //tag;
862
+ }
863
+ })
864
+ }
865
+ },
866
+ addChecked(item) {
867
+ //tag;
868
+ if (!item.checked) {
869
+ this.checkrows.push(item);
870
+ //tag;
871
+ } else {
872
+ for (let i = 0; i < this.checkrows.length; i++) {
873
+ if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
874
+ this.checkrows.splice(i, 1)
875
+ }
876
+ }
877
+ }
878
+ },
879
+ ToshowModal() {
880
+ this.creatPlanWay = 'single'
881
+ if (this.checkrows.length > 0) {
882
+ this.showModal = true
883
+ } else {
884
+ this.$showMessage("请选择需要安检的用户!")
885
+ }
886
+ },
887
+ FiltrationPlan() {
888
+ if (this.model.rows.length == 0) {
889
+ this.$showMessage("暂无可生成的计划!")
890
+ return
891
+ }
892
+ this.creatPlanWay = 'filtration'
893
+ this.showModal = true
894
+ },
895
+ AllPlan() {
896
+ if (this.model.rows.length == 0) {
897
+ this.$showMessage("暂无可生成的计划!")
898
+ return
899
+ }
900
+ this.creatPlanWay = 'all'
901
+ this.showModal = true
902
+ },
903
+ cancel() {
904
+ this.showModal = false
905
+ },
906
+ areas() {
907
+ let rs = []
908
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
909
+ let temp = {
910
+ label: this.$login.f.f_allArea[i].label,
911
+ value: this.$login.f.f_allArea[i].label
912
+ }
913
+ rs.push(temp)
914
+ }
915
+ return [{label: '全部', value: ''}, ...rs]
916
+ },
917
+ initAdjustables() {
918
+ //tag
919
+ let arr = []
920
+ let filter = this.$login.f.f_orgids
921
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
922
+ let temp = {}
923
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
924
+ temp.value = `${item.value.id}`
925
+ arr.push(temp)
926
+ })
927
+ this.adjustables = [{label: '全部', value: ''}, ...arr]
928
+ },
929
+ getAllMeterBook(val) {
930
+ ////tag
931
+ ////tag
932
+ this.cbcs = []
933
+ if (val) {
934
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
935
+ data: {
936
+ items: 'f_book_name,f_book_slice_area,id',
937
+ tablename: 't_meter_book',
938
+ condition: `f_filiale_id in ${val}`,
939
+ orderitem: 'id'
940
+ }
941
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
942
+ res.data.forEach(ress => {
943
+ this.cbcs.push({
944
+ id: ress.id,
945
+ f_book_name: ress.f_book_name,
946
+ f_book_slice_area: ress.f_book_slice_area
947
+ })
948
+ })
949
+ this.cbc = []
950
+ this.cbc.push({
951
+ label: '全部',
952
+ value: ''
953
+ })
954
+ this.cbcs.forEach(res => {
955
+ this.cbc.push({
956
+ label: res.f_book_name,
957
+ value: res.id
958
+ })
959
+ })
960
+ })
961
+ }
962
+ },
963
+ getRes(obj) {
964
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
965
+ this.Mreadibook(this.model.f_filialeids)
966
+ this.getAllMeterBook(this.model.f_filialeids)
967
+ this.getPcd(this.model.f_filialeids)
968
+ }
969
+ },
970
+
971
+ watch: {
972
+ 'model.f_usertype'(val) {
973
+ if (val == '民用') {
974
+ this.model.safeCycle = this.civil
975
+ } else if (val == '非民用') {
976
+ this.model.safeCycle = this.civilian
977
+ }
978
+ },
979
+ 'model.SafeCheckXZ'(val) {
980
+ this.model.SafeCheckSC = ''
981
+ if (val == '已安检') {
982
+ this.model.SafeCheckCQ = ''
983
+ this.model.SafeCheckSX = {
984
+ f_check_end: '', // 安检时间 查询起始条件
985
+ f_check_start: ''// 安检时间 查询终止条件
986
+ }
987
+ } else {
988
+ // 当使用筛选条件时,清空不需要的条件选项
989
+ this.model.f_issue_start = ''
990
+ this.model.f_issue_end = ''
991
+ this.$refs.paged.$refs.criteria.model.f_check_start = ''
992
+ this.$refs.paged.$refs.criteria.model.f_check_end = ''
993
+ this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
994
+ this.model.month = ''
995
+ if (val == '应安检') {
996
+ this.model.SafeCheckSC = '否'
997
+
998
+ this.model.f_issue_start = Util.toStartDateString()
999
+ this.model.f_issue_end = Util.toStandardDateString()
1000
+ }
1001
+ // this.model.f_checktime_start = ''
1002
+ // this.model.f_checktime_end = ''
1003
+ }
1004
+ },
1005
+ 'model.SafeCheckSC'(val) {
1006
+ if (val == '') {
1007
+ this.model.f_issue_start = ''
1008
+ this.model.f_issue_end = ''
1009
+ }
1010
+ },
1011
+ // 'checker'(val){
1012
+ // //tag
1013
+ // if(val){
1014
+ // this.checkboxModel.f_checker = this.checker[0].name
1015
+ // this.checkboxModel.f_checker_id = this.checker[0].id
1016
+ // }
1017
+ // },
1018
+ 'model.rows'() {
1019
+ // if (!this.checkedAll) {//实现反选/
1020
+ // this.checkrows = [];
1021
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1022
+ var k = false
1023
+ for (let j = 0; j < this.checkrows.length; j++) {
1024
+ if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1025
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1026
+ k = true
1027
+ continue
1028
+ }
1029
+ }
1030
+ if (!k) {
1031
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1032
+ }
1033
+ }
1034
+ // } else {//实现全选
1035
+ // // this.checkboxModel = {};
1036
+ // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1037
+ // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1038
+ // }
1039
+ // }
1040
+ }
1041
+ },
1042
+ computed: {
1043
+ selected() {
1044
+ return this.$refs.paged.$refs.grid.selected
1045
+ }
1046
+ }
1047
+ }
1048
+ </script>
1049
+ <style scoped>
1050
+ .newcolor {
1051
+ color: red;
1052
+ }
1053
+
1054
+ .table th {
1055
+ background-color: #f2f6fa;
1056
+ color: black;
1057
+ }
1058
+ </style>