safecheck-client 3.0.35-7 → 3.0.35-8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +31 -31
  3. package/src/components/android/AddPlanItemYy.vue +451 -451
  4. package/src/components/android/CivilCurrentCreate.vue +1031 -1031
  5. package/src/components/android/examples/SafeListExamples.vue +296 -296
  6. package/src/components/android/examples/UserExamples.vue +136 -136
  7. package/src/components/rongcheng/AspiratedAreaPlan.vue +574 -574
  8. package/src/components/rongcheng/PhoneUpUserinfo.vue +1236 -1236
  9. package/src/filiale/bayan/android/AddPlanItem.vue +441 -441
  10. package/src/filiale/bayan/android/PaperFeedback.vue +1669 -1669
  11. package/src/filiale/bayan/android/PhoneUpUserinfo.vue +1380 -1380
  12. package/src/filiale/bayan/android/SafecheckOrderV.vue +2922 -2922
  13. package/src/filiale/bayan/android/SafecheckUserInfo.vue +872 -872
  14. package/src/filiale/bayan/pc/CheckPlanAreaList.vue +607 -607
  15. package/src/filiale/bayan/pc/HiddenSituation.vue +295 -295
  16. package/src/filiale/bayan/pc/NewCheckpaper.vue +1992 -1992
  17. package/src/filiale/bayan/pc/PaperList.vue +900 -900
  18. package/src/filiale/bayan/pc/SelectCheckPlan.vue +391 -391
  19. package/src/filiale/siyang/android/AddPlanItem.vue +450 -450
  20. package/src/filiale/tongchuan/android/SafecheckDevices.vue +1207 -1207
  21. package/src/filiale/tongchuan/android/SafecheckOrderV.vue +3035 -3035
  22. package/src/filiale/tongchuan/pc/CheckSearchUser.vue +1053 -1053
  23. package/src/filiale/tongchuan/pc/checkUserList.vue +639 -639
  24. package/src/filiale/xilan/android.js +11 -11
  25. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +642 -642
  26. package/src/safecheck-android.js +307 -307
@@ -1,1053 +1,1053 @@
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="uf.f_gas_data {}"
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
- </tr>
457
- </template>
458
- <template partial='body'>
459
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_userinfo_code }}</td>
460
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_name }}</td>
461
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_phone }}</td>
462
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meternumber }}</td>
463
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meter_brand }}</td>
464
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_user_type }}</td>
465
- <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
466
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_slice_area }}</td>
467
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_residential_area }}</td>
468
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_address }}</td>
469
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_checker_name }}</td>
470
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_comments }}</td>
471
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_date }}</td>
472
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_state }}</td>
473
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">
474
- {{ $parent.$parent.$parent.getDefect(row.f_last_check_result) }}
475
- </td>
476
- </template>
477
- </data-grid>
478
- </criteria-paged>
479
- </div>
480
- </template>
481
-
482
- <script>
483
- import {PagedList} from 'vue-client'
484
- import {HttpResetClass} from 'vue-client'
485
- import co from 'co'
486
- import * as Util from '../../Util'
487
- import Vue from 'vue'
488
-
489
- // let select = function * (self,userid) {
490
- // let http = new HttpResetClass()
491
- // let getGasman = yield http.load('POST','/rs/search', {
492
- // source: 'this.getChildByName($安检员$).getUsers()',
493
- // userid: userid
494
- // }, {resolveMsg: null, rejectMsg: null})
495
- // //tag
496
- // getGasman.data.forEach((checker)=>{
497
- // self.checkersid.push({label:checker.name,value:checker.id})
498
- // })
499
- // self.checkersid.push({label:'全部',value:''})
500
- // }
501
-
502
-
503
- export default {
504
- title: '用户安检情况',
505
- data() {
506
- let options = []
507
- let year = (new Date()).getFullYear()
508
- for (let i = year; i <= year + 3; i++)
509
- options.push({label: i + '', value: i + ''})
510
- let moptions = []
511
- for (let i = 1; i <= 12; i++)
512
- moptions.push({label: i + '', value: i + ''})
513
-
514
- return {
515
- searchData: {
516
- condition: '1=1',
517
- orderitem: "f_userinfo_code",
518
- timetype: "dd",
519
- 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"
520
-
521
- },
522
- excelHeaders: {
523
- //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
524
-
525
- 'f_userinfo_code': '用户编号',
526
- 'f_user_name': '用户名称',
527
- 'f_user_phone': '用户电话',
528
- 'f_meternumber': '燃气表号',
529
- 'f_meter_brand': '气表品牌',
530
- // 'count_item': '安检次数',
531
- 'f_user_type': '用户类型',
532
- 'f_checker_name': '安检员',
533
- 'f_comments': '安检备注',
534
- 'f_slice_area': '区域',
535
- 'f_residential_area': '小区名称',
536
- 'f_address': '地址',
537
- 'f_last_check_date': '最后一次安检日期',
538
- 'f_last_check_state': '最后一次安检状态',
539
- 'f_defect_content': '安检结果'
540
- },
541
- model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
542
- orderitem: "'f_last_check_date desc'",
543
- timetype: "'dd'",
544
- f_defect_content: 'this.f_defect_content'
545
- }),
546
- 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",
547
- orgstrs: [{label: '全部', value: ''}],
548
- checkersid: [],
549
- SafeCheckXZ: '',
550
- civil: '', //民用安检周期
551
- civilian: '', //非民用安检周期
552
- SafeCheckXZs: [{label: '全部', value: ''}, {label: '未安检', value: '未安检'}, {label: '已安检', value: '已安检'}], // 安检筛选选项
553
- SafeCheckSXs: [{label: '是', value: '是'}, {label: '否', value: '否'}, {label: '全部', value: ''}],
554
- // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
555
- IsShares: [{label: '是', value: '是'}, {label: '否', value: '否'}],
556
- IsShare: '否',
557
- checker: {},
558
- NoBuys: [{label: '是', value: '是'}, {label: '否', value: '否'}],
559
- criteriaShow: false,
560
- checkers: [],
561
- chosenOrg: {id: 0},
562
- showModal: false,
563
- checkedAll: false,
564
- checkrows: [],
565
- adjustables: [],
566
- f_plan_year: year + '',
567
- f_plan_month: moptions[new Date().getMonth()].value,
568
- f_effective_start_time: '', //计划有效起始时间
569
- f_effective_end_time: '', //计划有效结束时间
570
- checkboxModel: {},
571
- c_year_list: options,
572
- c_month_list: moptions,
573
- areas: this.areas(),
574
- checkstatus: this.checkstatus(),
575
- usertypes: this.usertypes(),
576
- userstates: this.userstates(),
577
- sqlname: '',
578
- f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '有隐患', value: '有隐患'}],
579
- creatPlanWay: '',
580
- userTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
581
- tableTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')],
582
- tableBrands: [{label: '全部', value: ''}],
583
- sliceArea: [],
584
- cbcs: [],
585
- cbc: [],
586
- pcds: [],
587
- isgas: [{label: '全部', value: ''},{label: '是', value: 'is not null '},{label: '否', value: ' is null '}]
588
-
589
- }
590
- },
591
- props: {
592
- style: {
593
- type: String,
594
- default: 'col-sm-2 form-group'
595
- },
596
- style2: {
597
- type: String,
598
- default: 'col-sm-4 form-group'
599
- },
600
- checkplan: { // 传入一条安检计划信息
601
- type: Object
602
- },
603
- additemshow: {
604
- type: Boolean,
605
- default: false
606
- }
607
- },
608
- ready() {
609
- // 获取分公司信息
610
- this.model.f_defect_content = this.f_defect_content
611
-
612
- //this.getfengongsi()
613
- this.model.chosenOrg = {id: 0}
614
- this.model.f_filialeids = this.$login.f.f_orgids
615
- this.model.f_filiale = this.$login.f.f_fengongsi
616
- this.model.f_OrgStr = this.$login.f.orgpathstr
617
- this.Mreadibook(`('${this.$login.f.orgid}')`)
618
- this.getAllMeterBook(`('${this.$login.f.orgid}')`)
619
- this.getTableBrands()
620
- },
621
- methods: {
622
- getTableBrands() {
623
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
624
- {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
625
- {resolveMsg: null, rejectMsg: null}).then((resp) => {
626
- resp.data.forEach((result) => {
627
- this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
628
- })
629
- })
630
- },
631
- //获取省市区列表
632
- getPcd(val) {
633
- this.pcds = [{label: '全部', value: ''}]
634
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
635
- {data: {items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}`}},
636
- {resolveMsg: null, rejectMsg: null}).then((pcdlist) => {
637
- pcdlist.data.forEach((result) => {
638
- this.pcds.push({label: result.f_pcd, value: result.id})
639
- })
640
- })
641
- },
642
- getmeterbook(val) {
643
-
644
- //tag
645
- this.cbc = []
646
- this.cbc.push({
647
- label: '全部',
648
- value: ''
649
- })
650
- if (val == '') {
651
-
652
- this.cbcs.forEach(res => {
653
- this.cbc.push({
654
- label: res.f_book_name,
655
- value: res.id
656
- })
657
- })
658
- } else {
659
- this.cbcs.forEach(res => {
660
- if (res.f_book_slice_area == val) {
661
- this.cbc.push({
662
- label: res.f_book_name,
663
- value: res.id
664
- })
665
- }
666
- })
667
- }
668
- },
669
- Mreadibook(val) {
670
- ////tag
671
- ////tag
672
- this.sliceArea = []
673
- if (val) {
674
- new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
675
- data: {
676
- items: 'name',
677
- tablename: 't_zone',
678
- condition: `parentid in ${val}`,
679
- orderitem: 'id'
680
- }
681
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
682
- this.sliceArea.push({
683
- label: '全部',
684
- value: ''
685
- })
686
- res.data.forEach(ress => {
687
- this.sliceArea.push({
688
- label: ress.name,
689
- value: ress.name
690
- })
691
- })
692
-
693
- })
694
- }
695
- },
696
- // 获取县域分公司内容
697
- getfengongsi() {
698
- let val = {
699
- source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
700
- userid: `${this.$login.f.id}`
701
- }
702
- let http = new HttpResetClass()
703
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
704
- res.data.forEach((item) => {
705
- this.orgstrs.push({label: item.name, value: item.id})
706
- })
707
- //tag
708
- })
709
- },
710
- // 县域分公司发生改变
711
- // orgstrchange(val){
712
- // if(val == undefined || val == ''){
713
- // return
714
- // }else {
715
- // this.checkersid = []
716
- // let gen = select(this,val)
717
- // return co(gen)
718
- // }
719
- // },
720
- getDefect(val) {
721
- if (val) {
722
- try {
723
- var defect = JSON.parse(val)
724
- return defect.result
725
- } catch (e) {
726
- //tag
727
- return '正常'
728
- }
729
- }
730
- return '正常'
731
- },
732
- checkerchange(val) {
733
- this.checkboxModel.f_checker = val.name
734
- this.checkboxModel.f_checker_id = val.id
735
- },
736
- search(args) {
737
- if (this.model.f_filialeids){
738
- args.condition += ` and f_orgid in ${this.model.f_filialeids}`
739
- }
740
- if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
741
- this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
742
- return
743
- }
744
- if ((args.model.f_check_start || args.model.f_check_end) && !this.SafeCheckXZ) {
745
- this.$showMessage('如果录入 安检起始时间,需要选择 安检筛选条件!')
746
- return
747
- }
748
- //args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
749
- // let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
750
- let con = '1=1'
751
- this.$emit('filiale-change', con)
752
- con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'` : ''
753
- con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
754
- con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
755
- con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
756
- con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
757
- if (this.SafeCheckXZ) {
758
- con += ` and f_offsite_time >= '${args.model.f_check_start}' and f_offsite_time <= '${args.model.f_check_end}' `
759
- if (this.SafeCheckXZ == '未安检') {
760
- args.condition += ' and ruhuid is null'
761
- } else {
762
- args.condition += ' and ruhuid is not null'
763
- }
764
- }
765
- con += args.model.f_last_check_state ? ` and f_entry_status = '${args.model.f_last_check_state}'` : ''
766
- con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ''
767
- let condition = {
768
- condition1: args.condition,
769
- condition2: con
770
- }
771
- this.searchData.condition = condition
772
- return this.model.search(condition, args.model)
773
- },
774
- checkstatus() {
775
- return this.$appdata.getParam('安检状态') ? [{
776
- label: '全部',
777
- value: ''
778
- }, ...this.$appdata.getParam('安检状态')] : [{label: '全部', value: ''}]
779
- },
780
- usertypes() {
781
- return this.$appdata.getParam('用户类型') ? [{
782
- label: '全部',
783
- value: ''
784
- }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
785
- },
786
- userstates() {
787
- return this.$appdata.getParam('用户状态') ? [{
788
- label: '全部',
789
- value: ''
790
- }, ...this.$appdata.getParam('用户状态')] : [{label: '全部', value: ''}]
791
- },
792
- hiddenr() {
793
- this.$parent.showItem = !this.$parent.showItem
794
- },
795
- hidden() {
796
- this.criteriaShow = !this.criteriaShow
797
- },
798
- confirm() {
799
- if (!this.checkboxModel.f_plan_name) {
800
- this.$showMessage('请填写安检计划名称!')
801
- return
802
- }
803
- // if(this.f_effective_start_time == ''){
804
- // this.$showMessage('请选择有效起始日期!')
805
- // return
806
- // }
807
- // if(this.f_effective_end_time == ''){
808
- // this.$showMessage('请选择有效结束日期!')
809
- // return
810
- // }
811
- if (this.IsShare == '否') {
812
- if (!this.checkboxModel.f_checker_id) {
813
- this.$showMessage('请选择安检员!')
814
- return
815
- }
816
- }
817
- let gen = saveGen(this)
818
- return co(gen)
819
- },
820
- changeStates() {
821
- if (this.checkedAll) {//实现反选/
822
- this.checkrows = [];
823
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
824
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
825
- }
826
- } else {//实现全选
827
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
828
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
829
- }
830
- let _this = this
831
- let condition = this.$refs.paged.$refs.criteria.condition
832
- let url = this.model.url
833
- this.$resetpost(`${url}?pageSize=9999999`, {
834
- data: {
835
- condition: condition,
836
- groupitem: '',
837
- orderitem: 'f_residential_area',
838
- f_usertype: this.model.f_usertype,
839
- f_filialeids: this.model.f_filialeids,
840
- month: this.model.month,
841
- safeCycle: this.model.safeCycle,
842
- f_checktime_start: this.model.f_checktime_start,
843
- f_checktime_end: this.model.f_checktime_end,
844
- SafeCheckSX: this.model.SafeCheckSX,
845
- f_last_check_state: this.model.f_last_check_state
846
- },
847
- }, {resolveMsg: null, rejectMsg: null}, -1).then(
848
- (respanse) => {
849
- if (respanse.data.length >= 5000) {
850
- this.$showMessage("数据量太大,请重新选择")
851
- } else {
852
- _this.checkrows = []
853
- for (let j = 0; j < respanse.data.length; j++) {
854
- _this.checkrows.push(respanse.data[j])
855
- }
856
- //tag;
857
- }
858
- })
859
- }
860
- },
861
- addChecked(item) {
862
- //tag;
863
- if (!item.checked) {
864
- this.checkrows.push(item);
865
- //tag;
866
- } else {
867
- for (let i = 0; i < this.checkrows.length; i++) {
868
- if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
869
- this.checkrows.splice(i, 1)
870
- }
871
- }
872
- }
873
- },
874
- ToshowModal() {
875
- this.creatPlanWay = 'single'
876
- if (this.checkrows.length > 0) {
877
- this.showModal = true
878
- } else {
879
- this.$showMessage("请选择需要安检的用户!")
880
- }
881
- },
882
- FiltrationPlan() {
883
- if (this.model.rows.length == 0) {
884
- this.$showMessage("暂无可生成的计划!")
885
- return
886
- }
887
- this.creatPlanWay = 'filtration'
888
- this.showModal = true
889
- },
890
- AllPlan() {
891
- if (this.model.rows.length == 0) {
892
- this.$showMessage("暂无可生成的计划!")
893
- return
894
- }
895
- this.creatPlanWay = 'all'
896
- this.showModal = true
897
- },
898
- cancel() {
899
- this.showModal = false
900
- },
901
- areas() {
902
- let rs = []
903
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
904
- let temp = {
905
- label: this.$login.f.f_allArea[i].label,
906
- value: this.$login.f.f_allArea[i].label
907
- }
908
- rs.push(temp)
909
- }
910
- return [{label: '全部', value: ''}, ...rs]
911
- },
912
- initAdjustables() {
913
- //tag
914
- let arr = []
915
- let filter = this.$login.f.f_orgids
916
- this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
917
- let temp = {}
918
- temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
919
- temp.value = `${item.value.id}`
920
- arr.push(temp)
921
- })
922
- this.adjustables = [{label: '全部', value: ''}, ...arr]
923
- },
924
- getAllMeterBook(val) {
925
- ////tag
926
- ////tag
927
- this.cbcs = []
928
- if (val) {
929
- new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
930
- data: {
931
- items: 'f_book_name,f_book_slice_area,id',
932
- tablename: 't_meter_book',
933
- condition: `f_filiale_id in ${val}`,
934
- orderitem: 'id'
935
- }
936
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
937
- res.data.forEach(ress => {
938
- this.cbcs.push({
939
- id: ress.id,
940
- f_book_name: ress.f_book_name,
941
- f_book_slice_area: ress.f_book_slice_area
942
- })
943
- })
944
- this.cbc = []
945
- this.cbc.push({
946
- label: '全部',
947
- value: ''
948
- })
949
- this.cbcs.forEach(res => {
950
- this.cbc.push({
951
- label: res.f_book_name,
952
- value: res.id
953
- })
954
- })
955
- })
956
- }
957
- },
958
- getRes(obj) {
959
- this.model.f_filialeids = this.$login.convertToIn(obj.resids);
960
- this.Mreadibook(this.model.f_filialeids)
961
- this.getAllMeterBook(this.model.f_filialeids)
962
- this.getPcd(this.model.f_filialeids)
963
- }
964
- },
965
-
966
- watch: {
967
- 'model.f_usertype'(val) {
968
- if (val == '民用') {
969
- this.model.safeCycle = this.civil
970
- } else if (val == '非民用') {
971
- this.model.safeCycle = this.civilian
972
- }
973
- },
974
- 'model.SafeCheckXZ'(val) {
975
- this.model.SafeCheckSC = ''
976
- if (val == '已安检') {
977
- this.model.SafeCheckCQ = ''
978
- this.model.SafeCheckSX = {
979
- f_check_end: '', // 安检时间 查询起始条件
980
- f_check_start: ''// 安检时间 查询终止条件
981
- }
982
- } else {
983
- // 当使用筛选条件时,清空不需要的条件选项
984
- this.model.f_issue_start = ''
985
- this.model.f_issue_end = ''
986
- this.$refs.paged.$refs.criteria.model.f_check_start = ''
987
- this.$refs.paged.$refs.criteria.model.f_check_end = ''
988
- this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
989
- this.model.month = ''
990
- if (val == '应安检') {
991
- this.model.SafeCheckSC = '否'
992
-
993
- this.model.f_issue_start = Util.toStartDateString()
994
- this.model.f_issue_end = Util.toStandardDateString()
995
- }
996
- // this.model.f_checktime_start = ''
997
- // this.model.f_checktime_end = ''
998
- }
999
- },
1000
- 'model.SafeCheckSC'(val) {
1001
- if (val == '') {
1002
- this.model.f_issue_start = ''
1003
- this.model.f_issue_end = ''
1004
- }
1005
- },
1006
- // 'checker'(val){
1007
- // //tag
1008
- // if(val){
1009
- // this.checkboxModel.f_checker = this.checker[0].name
1010
- // this.checkboxModel.f_checker_id = this.checker[0].id
1011
- // }
1012
- // },
1013
- 'model.rows'() {
1014
- // if (!this.checkedAll) {//实现反选/
1015
- // this.checkrows = [];
1016
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1017
- var k = false
1018
- for (let j = 0; j < this.checkrows.length; j++) {
1019
- if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1020
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1021
- k = true
1022
- continue
1023
- }
1024
- }
1025
- if (!k) {
1026
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1027
- }
1028
- }
1029
- // } else {//实现全选
1030
- // // this.checkboxModel = {};
1031
- // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1032
- // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1033
- // }
1034
- // }
1035
- }
1036
- },
1037
- computed: {
1038
- selected() {
1039
- return this.$refs.paged.$refs.grid.selected
1040
- }
1041
- }
1042
- }
1043
- </script>
1044
- <style scoped>
1045
- .newcolor {
1046
- color: red;
1047
- }
1048
-
1049
- .table th {
1050
- background-color: #f2f6fa;
1051
- color: black;
1052
- }
1053
- </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
+ </tr>
457
+ </template>
458
+ <template partial='body'>
459
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_userinfo_code }}</td>
460
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_name }}</td>
461
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_phone }}</td>
462
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meternumber }}</td>
463
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meter_brand }}</td>
464
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_user_type }}</td>
465
+ <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
466
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_slice_area }}</td>
467
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_residential_area }}</td>
468
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_address }}</td>
469
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_checker_name }}</td>
470
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_comments }}</td>
471
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_date }}</td>
472
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_state }}</td>
473
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">
474
+ {{ $parent.$parent.$parent.getDefect(row.f_last_check_result) }}
475
+ </td>
476
+ </template>
477
+ </data-grid>
478
+ </criteria-paged>
479
+ </div>
480
+ </template>
481
+
482
+ <script>
483
+ import {PagedList} from 'vue-client'
484
+ import {HttpResetClass} from 'vue-client'
485
+ import co from 'co'
486
+ import * as Util from '../../Util'
487
+ import Vue from 'vue'
488
+
489
+ // let select = function * (self,userid) {
490
+ // let http = new HttpResetClass()
491
+ // let getGasman = yield http.load('POST','/rs/search', {
492
+ // source: 'this.getChildByName($安检员$).getUsers()',
493
+ // userid: userid
494
+ // }, {resolveMsg: null, rejectMsg: null})
495
+ // //tag
496
+ // getGasman.data.forEach((checker)=>{
497
+ // self.checkersid.push({label:checker.name,value:checker.id})
498
+ // })
499
+ // self.checkersid.push({label:'全部',value:''})
500
+ // }
501
+
502
+
503
+ export default {
504
+ title: '用户安检情况',
505
+ data() {
506
+ let options = []
507
+ let year = (new Date()).getFullYear()
508
+ for (let i = year; i <= year + 3; i++)
509
+ options.push({label: i + '', value: i + ''})
510
+ let moptions = []
511
+ for (let i = 1; i <= 12; i++)
512
+ moptions.push({label: i + '', value: i + ''})
513
+
514
+ return {
515
+ searchData: {
516
+ condition: '1=1',
517
+ orderitem: "f_userinfo_code",
518
+ timetype: "dd",
519
+ 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"
520
+
521
+ },
522
+ excelHeaders: {
523
+ //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
524
+
525
+ 'f_userinfo_code': '用户编号',
526
+ 'f_user_name': '用户名称',
527
+ 'f_user_phone': '用户电话',
528
+ 'f_meternumber': '燃气表号',
529
+ 'f_meter_brand': '气表品牌',
530
+ // 'count_item': '安检次数',
531
+ 'f_user_type': '用户类型',
532
+ 'f_checker_name': '安检员',
533
+ 'f_comments': '安检备注',
534
+ 'f_slice_area': '区域',
535
+ 'f_residential_area': '小区名称',
536
+ 'f_address': '地址',
537
+ 'f_last_check_date': '最后一次安检日期',
538
+ 'f_last_check_state': '最后一次安检状态',
539
+ 'f_defect_content': '安检结果'
540
+ },
541
+ model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
542
+ orderitem: "'f_last_check_date desc'",
543
+ timetype: "'dd'",
544
+ f_defect_content: 'this.f_defect_content'
545
+ }),
546
+ 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",
547
+ orgstrs: [{label: '全部', value: ''}],
548
+ checkersid: [],
549
+ SafeCheckXZ: '',
550
+ civil: '', //民用安检周期
551
+ civilian: '', //非民用安检周期
552
+ SafeCheckXZs: [{label: '全部', value: ''}, {label: '未安检', value: '未安检'}, {label: '已安检', value: '已安检'}], // 安检筛选选项
553
+ SafeCheckSXs: [{label: '是', value: '是'}, {label: '否', value: '否'}, {label: '全部', value: ''}],
554
+ // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
555
+ IsShares: [{label: '是', value: '是'}, {label: '否', value: '否'}],
556
+ IsShare: '否',
557
+ checker: {},
558
+ NoBuys: [{label: '是', value: '是'}, {label: '否', value: '否'}],
559
+ criteriaShow: false,
560
+ checkers: [],
561
+ chosenOrg: {id: 0},
562
+ showModal: false,
563
+ checkedAll: false,
564
+ checkrows: [],
565
+ adjustables: [],
566
+ f_plan_year: year + '',
567
+ f_plan_month: moptions[new Date().getMonth()].value,
568
+ f_effective_start_time: '', //计划有效起始时间
569
+ f_effective_end_time: '', //计划有效结束时间
570
+ checkboxModel: {},
571
+ c_year_list: options,
572
+ c_month_list: moptions,
573
+ areas: this.areas(),
574
+ checkstatus: this.checkstatus(),
575
+ usertypes: this.usertypes(),
576
+ userstates: this.userstates(),
577
+ sqlname: '',
578
+ f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '有隐患', value: '有隐患'}],
579
+ creatPlanWay: '',
580
+ userTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
581
+ tableTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')],
582
+ tableBrands: [{label: '全部', value: ''}],
583
+ sliceArea: [],
584
+ cbcs: [],
585
+ cbc: [],
586
+ pcds: [],
587
+ isgas: [{label: '全部', value: ''},{label: '是', value: 'is not null '},{label: '否', value: ' is null '}]
588
+
589
+ }
590
+ },
591
+ props: {
592
+ style: {
593
+ type: String,
594
+ default: 'col-sm-2 form-group'
595
+ },
596
+ style2: {
597
+ type: String,
598
+ default: 'col-sm-4 form-group'
599
+ },
600
+ checkplan: { // 传入一条安检计划信息
601
+ type: Object
602
+ },
603
+ additemshow: {
604
+ type: Boolean,
605
+ default: false
606
+ }
607
+ },
608
+ ready() {
609
+ // 获取分公司信息
610
+ this.model.f_defect_content = this.f_defect_content
611
+
612
+ //this.getfengongsi()
613
+ this.model.chosenOrg = {id: 0}
614
+ this.model.f_filialeids = this.$login.f.f_orgids
615
+ this.model.f_filiale = this.$login.f.f_fengongsi
616
+ this.model.f_OrgStr = this.$login.f.orgpathstr
617
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
618
+ this.getAllMeterBook(`('${this.$login.f.orgid}')`)
619
+ this.getTableBrands()
620
+ },
621
+ methods: {
622
+ getTableBrands() {
623
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
624
+ {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
625
+ {resolveMsg: null, rejectMsg: null}).then((resp) => {
626
+ resp.data.forEach((result) => {
627
+ this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
628
+ })
629
+ })
630
+ },
631
+ //获取省市区列表
632
+ getPcd(val) {
633
+ this.pcds = [{label: '全部', value: ''}]
634
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
635
+ {data: {items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}`}},
636
+ {resolveMsg: null, rejectMsg: null}).then((pcdlist) => {
637
+ pcdlist.data.forEach((result) => {
638
+ this.pcds.push({label: result.f_pcd, value: result.id})
639
+ })
640
+ })
641
+ },
642
+ getmeterbook(val) {
643
+
644
+ //tag
645
+ this.cbc = []
646
+ this.cbc.push({
647
+ label: '全部',
648
+ value: ''
649
+ })
650
+ if (val == '') {
651
+
652
+ this.cbcs.forEach(res => {
653
+ this.cbc.push({
654
+ label: res.f_book_name,
655
+ value: res.id
656
+ })
657
+ })
658
+ } else {
659
+ this.cbcs.forEach(res => {
660
+ if (res.f_book_slice_area == val) {
661
+ this.cbc.push({
662
+ label: res.f_book_name,
663
+ value: res.id
664
+ })
665
+ }
666
+ })
667
+ }
668
+ },
669
+ Mreadibook(val) {
670
+ ////tag
671
+ ////tag
672
+ this.sliceArea = []
673
+ if (val) {
674
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
675
+ data: {
676
+ items: 'name',
677
+ tablename: 't_zone',
678
+ condition: `parentid in ${val}`,
679
+ orderitem: 'id'
680
+ }
681
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
682
+ this.sliceArea.push({
683
+ label: '全部',
684
+ value: ''
685
+ })
686
+ res.data.forEach(ress => {
687
+ this.sliceArea.push({
688
+ label: ress.name,
689
+ value: ress.name
690
+ })
691
+ })
692
+
693
+ })
694
+ }
695
+ },
696
+ // 获取县域分公司内容
697
+ getfengongsi() {
698
+ let val = {
699
+ source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
700
+ userid: `${this.$login.f.id}`
701
+ }
702
+ let http = new HttpResetClass()
703
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
704
+ res.data.forEach((item) => {
705
+ this.orgstrs.push({label: item.name, value: item.id})
706
+ })
707
+ //tag
708
+ })
709
+ },
710
+ // 县域分公司发生改变
711
+ // orgstrchange(val){
712
+ // if(val == undefined || val == ''){
713
+ // return
714
+ // }else {
715
+ // this.checkersid = []
716
+ // let gen = select(this,val)
717
+ // return co(gen)
718
+ // }
719
+ // },
720
+ getDefect(val) {
721
+ if (val) {
722
+ try {
723
+ var defect = JSON.parse(val)
724
+ return defect.result
725
+ } catch (e) {
726
+ //tag
727
+ return '正常'
728
+ }
729
+ }
730
+ return '正常'
731
+ },
732
+ checkerchange(val) {
733
+ this.checkboxModel.f_checker = val.name
734
+ this.checkboxModel.f_checker_id = val.id
735
+ },
736
+ search(args) {
737
+ if (this.model.f_filialeids){
738
+ args.condition += ` and f_orgid in ${this.model.f_filialeids}`
739
+ }
740
+ if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
741
+ this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
742
+ return
743
+ }
744
+ if ((args.model.f_check_start || args.model.f_check_end) && !this.SafeCheckXZ) {
745
+ this.$showMessage('如果录入 安检起始时间,需要选择 安检筛选条件!')
746
+ return
747
+ }
748
+ //args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
749
+ // let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
750
+ let con = '1=1'
751
+ this.$emit('filiale-change', con)
752
+ con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'` : ''
753
+ con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
754
+ con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
755
+ con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
756
+ con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
757
+ if (this.SafeCheckXZ) {
758
+ con += ` and f_offsite_time >= '${args.model.f_check_start}' and f_offsite_time <= '${args.model.f_check_end}' `
759
+ if (this.SafeCheckXZ == '未安检') {
760
+ args.condition += ' and ruhuid is null'
761
+ } else {
762
+ args.condition += ' and ruhuid is not null'
763
+ }
764
+ }
765
+ con += args.model.f_last_check_state ? ` and f_entry_status = '${args.model.f_last_check_state}'` : ''
766
+ con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ''
767
+ let condition = {
768
+ condition1: args.condition,
769
+ condition2: con
770
+ }
771
+ this.searchData.condition = condition
772
+ return this.model.search(condition, args.model)
773
+ },
774
+ checkstatus() {
775
+ return this.$appdata.getParam('安检状态') ? [{
776
+ label: '全部',
777
+ value: ''
778
+ }, ...this.$appdata.getParam('安检状态')] : [{label: '全部', value: ''}]
779
+ },
780
+ usertypes() {
781
+ return this.$appdata.getParam('用户类型') ? [{
782
+ label: '全部',
783
+ value: ''
784
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
785
+ },
786
+ userstates() {
787
+ return this.$appdata.getParam('用户状态') ? [{
788
+ label: '全部',
789
+ value: ''
790
+ }, ...this.$appdata.getParam('用户状态')] : [{label: '全部', value: ''}]
791
+ },
792
+ hiddenr() {
793
+ this.$parent.showItem = !this.$parent.showItem
794
+ },
795
+ hidden() {
796
+ this.criteriaShow = !this.criteriaShow
797
+ },
798
+ confirm() {
799
+ if (!this.checkboxModel.f_plan_name) {
800
+ this.$showMessage('请填写安检计划名称!')
801
+ return
802
+ }
803
+ // if(this.f_effective_start_time == ''){
804
+ // this.$showMessage('请选择有效起始日期!')
805
+ // return
806
+ // }
807
+ // if(this.f_effective_end_time == ''){
808
+ // this.$showMessage('请选择有效结束日期!')
809
+ // return
810
+ // }
811
+ if (this.IsShare == '否') {
812
+ if (!this.checkboxModel.f_checker_id) {
813
+ this.$showMessage('请选择安检员!')
814
+ return
815
+ }
816
+ }
817
+ let gen = saveGen(this)
818
+ return co(gen)
819
+ },
820
+ changeStates() {
821
+ if (this.checkedAll) {//实现反选/
822
+ this.checkrows = [];
823
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
824
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
825
+ }
826
+ } else {//实现全选
827
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
828
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
829
+ }
830
+ let _this = this
831
+ let condition = this.$refs.paged.$refs.criteria.condition
832
+ let url = this.model.url
833
+ this.$resetpost(`${url}?pageSize=9999999`, {
834
+ data: {
835
+ condition: condition,
836
+ groupitem: '',
837
+ orderitem: 'f_residential_area',
838
+ f_usertype: this.model.f_usertype,
839
+ f_filialeids: this.model.f_filialeids,
840
+ month: this.model.month,
841
+ safeCycle: this.model.safeCycle,
842
+ f_checktime_start: this.model.f_checktime_start,
843
+ f_checktime_end: this.model.f_checktime_end,
844
+ SafeCheckSX: this.model.SafeCheckSX,
845
+ f_last_check_state: this.model.f_last_check_state
846
+ },
847
+ }, {resolveMsg: null, rejectMsg: null}, -1).then(
848
+ (respanse) => {
849
+ if (respanse.data.length >= 5000) {
850
+ this.$showMessage("数据量太大,请重新选择")
851
+ } else {
852
+ _this.checkrows = []
853
+ for (let j = 0; j < respanse.data.length; j++) {
854
+ _this.checkrows.push(respanse.data[j])
855
+ }
856
+ //tag;
857
+ }
858
+ })
859
+ }
860
+ },
861
+ addChecked(item) {
862
+ //tag;
863
+ if (!item.checked) {
864
+ this.checkrows.push(item);
865
+ //tag;
866
+ } else {
867
+ for (let i = 0; i < this.checkrows.length; i++) {
868
+ if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
869
+ this.checkrows.splice(i, 1)
870
+ }
871
+ }
872
+ }
873
+ },
874
+ ToshowModal() {
875
+ this.creatPlanWay = 'single'
876
+ if (this.checkrows.length > 0) {
877
+ this.showModal = true
878
+ } else {
879
+ this.$showMessage("请选择需要安检的用户!")
880
+ }
881
+ },
882
+ FiltrationPlan() {
883
+ if (this.model.rows.length == 0) {
884
+ this.$showMessage("暂无可生成的计划!")
885
+ return
886
+ }
887
+ this.creatPlanWay = 'filtration'
888
+ this.showModal = true
889
+ },
890
+ AllPlan() {
891
+ if (this.model.rows.length == 0) {
892
+ this.$showMessage("暂无可生成的计划!")
893
+ return
894
+ }
895
+ this.creatPlanWay = 'all'
896
+ this.showModal = true
897
+ },
898
+ cancel() {
899
+ this.showModal = false
900
+ },
901
+ areas() {
902
+ let rs = []
903
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
904
+ let temp = {
905
+ label: this.$login.f.f_allArea[i].label,
906
+ value: this.$login.f.f_allArea[i].label
907
+ }
908
+ rs.push(temp)
909
+ }
910
+ return [{label: '全部', value: ''}, ...rs]
911
+ },
912
+ initAdjustables() {
913
+ //tag
914
+ let arr = []
915
+ let filter = this.$login.f.f_orgids
916
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
917
+ let temp = {}
918
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
919
+ temp.value = `${item.value.id}`
920
+ arr.push(temp)
921
+ })
922
+ this.adjustables = [{label: '全部', value: ''}, ...arr]
923
+ },
924
+ getAllMeterBook(val) {
925
+ ////tag
926
+ ////tag
927
+ this.cbcs = []
928
+ if (val) {
929
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
930
+ data: {
931
+ items: 'f_book_name,f_book_slice_area,id',
932
+ tablename: 't_meter_book',
933
+ condition: `f_filiale_id in ${val}`,
934
+ orderitem: 'id'
935
+ }
936
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
937
+ res.data.forEach(ress => {
938
+ this.cbcs.push({
939
+ id: ress.id,
940
+ f_book_name: ress.f_book_name,
941
+ f_book_slice_area: ress.f_book_slice_area
942
+ })
943
+ })
944
+ this.cbc = []
945
+ this.cbc.push({
946
+ label: '全部',
947
+ value: ''
948
+ })
949
+ this.cbcs.forEach(res => {
950
+ this.cbc.push({
951
+ label: res.f_book_name,
952
+ value: res.id
953
+ })
954
+ })
955
+ })
956
+ }
957
+ },
958
+ getRes(obj) {
959
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
960
+ this.Mreadibook(this.model.f_filialeids)
961
+ this.getAllMeterBook(this.model.f_filialeids)
962
+ this.getPcd(this.model.f_filialeids)
963
+ }
964
+ },
965
+
966
+ watch: {
967
+ 'model.f_usertype'(val) {
968
+ if (val == '民用') {
969
+ this.model.safeCycle = this.civil
970
+ } else if (val == '非民用') {
971
+ this.model.safeCycle = this.civilian
972
+ }
973
+ },
974
+ 'model.SafeCheckXZ'(val) {
975
+ this.model.SafeCheckSC = ''
976
+ if (val == '已安检') {
977
+ this.model.SafeCheckCQ = ''
978
+ this.model.SafeCheckSX = {
979
+ f_check_end: '', // 安检时间 查询起始条件
980
+ f_check_start: ''// 安检时间 查询终止条件
981
+ }
982
+ } else {
983
+ // 当使用筛选条件时,清空不需要的条件选项
984
+ this.model.f_issue_start = ''
985
+ this.model.f_issue_end = ''
986
+ this.$refs.paged.$refs.criteria.model.f_check_start = ''
987
+ this.$refs.paged.$refs.criteria.model.f_check_end = ''
988
+ this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
989
+ this.model.month = ''
990
+ if (val == '应安检') {
991
+ this.model.SafeCheckSC = '否'
992
+
993
+ this.model.f_issue_start = Util.toStartDateString()
994
+ this.model.f_issue_end = Util.toStandardDateString()
995
+ }
996
+ // this.model.f_checktime_start = ''
997
+ // this.model.f_checktime_end = ''
998
+ }
999
+ },
1000
+ 'model.SafeCheckSC'(val) {
1001
+ if (val == '') {
1002
+ this.model.f_issue_start = ''
1003
+ this.model.f_issue_end = ''
1004
+ }
1005
+ },
1006
+ // 'checker'(val){
1007
+ // //tag
1008
+ // if(val){
1009
+ // this.checkboxModel.f_checker = this.checker[0].name
1010
+ // this.checkboxModel.f_checker_id = this.checker[0].id
1011
+ // }
1012
+ // },
1013
+ 'model.rows'() {
1014
+ // if (!this.checkedAll) {//实现反选/
1015
+ // this.checkrows = [];
1016
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1017
+ var k = false
1018
+ for (let j = 0; j < this.checkrows.length; j++) {
1019
+ if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1020
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1021
+ k = true
1022
+ continue
1023
+ }
1024
+ }
1025
+ if (!k) {
1026
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1027
+ }
1028
+ }
1029
+ // } else {//实现全选
1030
+ // // this.checkboxModel = {};
1031
+ // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1032
+ // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1033
+ // }
1034
+ // }
1035
+ }
1036
+ },
1037
+ computed: {
1038
+ selected() {
1039
+ return this.$refs.paged.$refs.grid.selected
1040
+ }
1041
+ }
1042
+ }
1043
+ </script>
1044
+ <style scoped>
1045
+ .newcolor {
1046
+ color: red;
1047
+ }
1048
+
1049
+ .table th {
1050
+ background-color: #f2f6fa;
1051
+ color: black;
1052
+ }
1053
+ </style>