safecheck-client 3.0.39-1 → 3.0.39-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/src/components/android/AreaPlan.vue +567 -566
  3. package/src/components/android/SafecheckDevices.vue +1300 -1300
  4. package/src/components/android/SealBind.vue +392 -392
  5. package/src/components/android/SealManage.vue +250 -250
  6. package/src/components/map/checkScreen.vue +920 -920
  7. package/src/filiale/dexin/android/AreaPlan.vue +567 -0
  8. package/src/filiale/dexin/android/SafecheckOrderV.vue +2983 -2983
  9. package/src/filiale/dexin/android.js +21 -20
  10. package/src/filiale/dexin/pc/PlanManage.vue +894 -894
  11. package/src/filiale/dexin/pc.js +15 -15
  12. package/src/filiale/fugu/android/SafecheckOrderV.vue +2484 -2484
  13. package/src/filiale/huayin/android/AddPlanItem.vue +509 -509
  14. package/src/filiale/huayin/android/AreaPlan.vue +572 -572
  15. package/src/filiale/huayin/android/CurrentCreate.vue +1121 -1121
  16. package/src/filiale/huayin/android.js +16 -16
  17. package/src/filiale/huayin/pc/PaperList.vue +635 -635
  18. package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1231 -1231
  19. package/src/filiale/tongchuan/android/AddPlanItemset.vue +484 -484
  20. package/src/filiale/tongchuan/android/PaperFeedback.vue +1317 -1317
  21. package/src/filiale/tongchuan/android/PhoneUpUserinfo.vue +1343 -1343
  22. package/src/filiale/tongchuan/android/SafecheckDevices.vue +1209 -1209
  23. package/src/filiale/tongchuan/android.js +22 -22
  24. package/src/filiale/tongchuan/pc/CheckBookList.vue +377 -377
  25. package/src/filiale/tongchuan/pc/CheckSearchUser.vue +1045 -1045
  26. package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +618 -618
  27. package/src/filiale/tongchuan/pc/NewCheckpaper.vue +1524 -1524
  28. package/src/filiale/tongchuan/pc/PaperList.vue +684 -684
  29. package/src/filiale/wenxi/android/SafecheckOrderV.vue +2682 -2680
  30. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +278 -278
  31. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +1136 -1136
@@ -1,1045 +1,1045 @@
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">区&emsp;&emsp;域</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>
221
-
222
- <div class="row" v-show="$parent.$parent.$parent.showItem">
223
- <div :class="$parent.$parent.style">
224
- <label class="font_normal_body">用户编号</label>
225
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
226
-
227
- placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
228
- </div>
229
- <div :class="$parent.$parent.style">
230
- <label class="font_normal_body">用户姓名</label>
231
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name"
232
- placeholder="用户姓名" condition="f_user_name like '%{}%'">
233
- </div>
234
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
235
- <export-excel-safe :data="$parent.$parent.searchData"
236
- :field="$parent.$parent.excelHeaders"
237
- sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
238
- template-name='用户安检情况' :choose-col="true"></export-excel-safe>
239
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
240
- <div style="float: right" class="button_spacing"
241
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
242
- @click="$parent.$parent.hiddenr()"></div>
243
- <div style="float: right" class="button_spacing"
244
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
245
- @click="$parent.$parent.hidden()">
246
-
247
- </div>
248
- </div>
249
-
250
- </div>
251
- <div class="row" v-show="$parent.$parent.$parent.showItem">
252
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
253
- <label class="font_normal_body">小&emsp;&emsp;区</label>
254
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
255
-
256
- placeholder="小区" condition="f_residential_area like '%{}%'">
257
- </div>
258
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
259
- <label class="font_normal_body">地&emsp;&emsp;址</label>
260
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_address"
261
-
262
- placeholder="地址" condition="f_address like '%{}%'">
263
- </div>
264
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
265
- <label class="font_normal_body">用户类型</label>
266
- <v-select
267
- placeholder='用户类型'
268
- class="select select_list"
269
-
270
- :value.sync="model.f_usertype"
271
- :value-single="true"
272
- :options='$parent.$parent.usertypes'
273
- v-model="model.f_usertype"
274
- condition="f_user_type = '{}'"
275
- close-on-select clear-button></v-select>
276
- </div>
277
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
278
-
279
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
280
- <label class="font_normal_body" style="color: red;">安检筛选</label>
281
- <v-select
282
- placeholder='安检筛选'
283
- :value-single="true"
284
-
285
- class="select select_list"
286
- :value.sync="$parent.$parent.SafeCheckXZ"
287
- :options='$parent.$parent.SafeCheckXZs'
288
- v-model="$parent.$parent.SafeCheckXZ"
289
- close-on-select clear-button></v-select>
290
- </div>
291
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
292
- <label class="font_normal_body">用气性质</label>
293
- <v-select
294
- class="select_list select"
295
- placeholder='用气性质' style="width: 60%"
296
- v-model='model.userType'
297
- :value.sync="model.userType"
298
- :options='$parent.$parent.userTypes'
299
- condition="f_gasproperties = '{}'"
300
- :value-single="true"
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.tableType'
309
- :value.sync="model.tableType"
310
- :options='$parent.$parent.tableTypes'
311
- condition="f_meter_classify = '{}'"
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.tableBrand'
321
- :value.sync="model.tableBrand"
322
- :options='$parent.$parent.tableBrands'
323
- condition="f_meter_brand = '{}'"
324
- :value-single="true"
325
- close-on-select clear-button></v-select>
326
- </div>
327
-
328
- </div>
329
- <div class="row" v-show="$parent.$parent.$parent.showItem">
330
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
331
- <label class="font_normal_body">安检起始</label>
332
- <datepicker
333
- :value.sync="model.f_check_start"
334
- placeholder='最后安检时间起始'
335
- :disabled-days-of-week="[]"
336
- style="width: 60%"
337
- :format="'yyyy-MM-dd'"
338
- :show-rest-button="reset"
339
- v-model="model.f_check_start">
340
- </datepicker>
341
- </div>
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_end"
346
- placeholder='最后安检时间结束'
347
- style="width: 60%"
348
- :disabled-days-of-week="[]"
349
- :format="'yyyy-MM-dd'"
350
- :show-rest-button="reset"
351
- v-model="model.f_check_end">
352
- </datepicker>
353
- </div>
354
-
355
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
356
- <label class="font_normal_body">安检状态</label>
357
- <v-select
358
- placeholder='安检状态'
359
- class="select select_list"
360
-
361
- :value.sync="model.f_last_check_state"
362
- :value-single="true"
363
- :options='$parent.$parent.checkstatus'
364
- v-model="model.f_last_check_state"
365
- condition="f_last_check_state = '{}'"
366
- close-on-select clear-button></v-select>
367
- </div>
368
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
369
- <label class="font_normal_body">隐患情况</label>
370
- <v-select
371
- placeholder='隐患情况'
372
- class="select select_list"
373
-
374
- :value-single="true"
375
- v-model='model.f_check_result'
376
- :value.sync="model.f_check_result"
377
- :options='$parent.$parent.f_check_results'
378
- condition="f_last_check_result like '%{}%'"
379
- close-on-select clear-button></v-select>
380
- </div>
381
-
382
- </div>
383
- <!--<div class="row" v-show="$parent.$parent.$parent.showItem">
384
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
385
- <label class="font_normal_body">公&emsp;&emsp;司</label>
386
- <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">
387
- </right-tree>
388
- </div>
389
-
390
- </div>-->
391
- </div>
392
- </criteria>
393
- <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
394
- <template partial='head'>
395
- <tr>
396
- <th>
397
- <nobr>用户编号</nobr>
398
- </th>
399
- <th>
400
- <nobr>用户名称</nobr>
401
- </th>
402
- <th>
403
- <nobr>用户电话</nobr>
404
- </th>
405
- <th>
406
- <nobr>燃气表号</nobr>
407
- </th>
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 style="padding: 0 40px">
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>
439
- <nobr>最后一次安检日期</nobr>
440
- </th>
441
- <th>
442
- <nobr>最后一次安检状态</nobr>
443
- </th>
444
- <th>
445
- <nobr>安检结果</nobr>
446
- </th>
447
- </tr>
448
- </template>
449
- <template partial='body'>
450
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_userinfo_code }}</td>
451
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_name }}</td>
452
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_phone }}</td>
453
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meternumber }}</td>
454
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meter_brand }}</td>
455
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_user_type }}</td>
456
- <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
457
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_slice_area }}</td>
458
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_residential_area }}</td>
459
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_address }}</td>
460
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_checker_name }}</td>
461
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_comments }}</td>
462
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_factory_date }}</td>
463
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_date }}</td>
464
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_state }}</td>
465
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">
466
- {{ $parent.$parent.$parent.getDefect(row.f_last_check_result) }}
467
- </td>
468
- </template>
469
- </data-grid>
470
- </criteria-paged>
471
- </div>
472
- </template>
473
-
474
- <script>
475
- import {PagedList} from 'vue-client'
476
- import {HttpResetClass} from 'vue-client'
477
- import co from 'co'
478
- import * as Util from '../../Util'
479
- import Vue from 'vue'
480
-
481
- // let select = function * (self,userid) {
482
- // let http = new HttpResetClass()
483
- // let getGasman = yield http.load('POST','/rs/search', {
484
- // source: 'this.getChildByName($安检员$).getUsers()',
485
- // userid: userid
486
- // }, {resolveMsg: null, rejectMsg: null})
487
- // //tag
488
- // getGasman.data.forEach((checker)=>{
489
- // self.checkersid.push({label:checker.name,value:checker.id})
490
- // })
491
- // self.checkersid.push({label:'全部',value:''})
492
- // }
493
-
494
-
495
- export default {
496
- title: '用户安检情况',
497
- data() {
498
- let options = []
499
- let year = (new Date()).getFullYear()
500
- for (let i = year; i <= year + 3; i++)
501
- options.push({label: i + '', value: i + ''})
502
- let moptions = []
503
- for (let i = 1; i <= 12; i++)
504
- moptions.push({label: i + '', value: i + ''})
505
-
506
- return {
507
- searchData: {
508
- condition: '1=1',
509
- orderitem: "f_userinfo_code",
510
- timetype: "dd",
511
- 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"
512
-
513
- },
514
- excelHeaders: {
515
- //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
516
-
517
- 'f_userinfo_code': '用户编号',
518
- 'f_user_name': '用户名称',
519
- 'f_user_phone': '用户电话',
520
- 'f_meternumber': '燃气表号',
521
- 'f_meter_brand': '气表品牌',
522
- // 'count_item': '安检次数',
523
- 'f_user_type': '用户类型',
524
- 'f_checker_name': '安检员',
525
- 'f_comments': '安检备注',
526
- 'f_slice_area': '区域',
527
- 'f_residential_area': '小区名称',
528
- 'f_address': '地址',
529
- 'f_factory_date': '表具出厂日期',
530
- 'f_last_check_date': '最后一次安检日期',
531
- 'f_last_check_state': '最后一次安检状态',
532
- 'f_defect_content': '安检结果'
533
- },
534
- model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
535
- orderitem: "'f_last_check_date desc'",
536
- timetype: "'dd'",
537
- f_defect_content: 'this.f_defect_content'
538
- }),
539
- 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",
540
- orgstrs: [{label: '全部', value: ''}],
541
- checkersid: [],
542
- SafeCheckXZ: '',
543
- civil: '', //民用安检周期
544
- civilian: '', //非民用安检周期
545
- SafeCheckXZs: [{label: '全部', value: ''}, {label: '未安检', value: '未安检'}, {label: '已安检', value: '已安检'}], // 安检筛选选项
546
- SafeCheckSXs: [{label: '是', value: '是'}, {label: '否', value: '否'}, {label: '全部', value: ''}],
547
- // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
548
- IsShares: [{label: '是', value: '是'}, {label: '否', value: '否'}],
549
- IsShare: '否',
550
- checker: {},
551
- NoBuys: [{label: '是', value: '是'}, {label: '否', value: '否'}],
552
- criteriaShow: false,
553
- checkers: [],
554
- chosenOrg: {id: 0},
555
- showModal: false,
556
- checkedAll: false,
557
- checkrows: [],
558
- adjustables: [],
559
- f_plan_year: year + '',
560
- f_plan_month: moptions[new Date().getMonth()].value,
561
- f_effective_start_time: '', //计划有效起始时间
562
- f_effective_end_time: '', //计划有效结束时间
563
- checkboxModel: {},
564
- c_year_list: options,
565
- c_month_list: moptions,
566
- areas: this.areas(),
567
- checkstatus: this.checkstatus(),
568
- usertypes: this.usertypes(),
569
- userstates: this.userstates(),
570
- sqlname: '',
571
- f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '有隐患', value: '有隐患'}],
572
- creatPlanWay: '',
573
- userTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
574
- tableTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')],
575
- tableBrands: [{label: '全部', value: ''}],
576
- sliceArea: [],
577
- cbcs: [],
578
- cbc: [],
579
- pcds: [],
580
-
581
- }
582
- },
583
- props: {
584
- style: {
585
- type: String,
586
- default: 'col-sm-2 form-group'
587
- },
588
- style2: {
589
- type: String,
590
- default: 'col-sm-4 form-group'
591
- },
592
- checkplan: { // 传入一条安检计划信息
593
- type: Object
594
- },
595
- additemshow: {
596
- type: Boolean,
597
- default: false
598
- }
599
- },
600
- ready() {
601
- // 获取分公司信息
602
- this.model.f_defect_content = this.f_defect_content
603
-
604
- //this.getfengongsi()
605
- this.model.chosenOrg = {id: 0}
606
- this.model.f_filialeids = this.$login.f.f_orgids
607
- this.model.f_filiale = this.$login.f.f_fengongsi
608
- this.model.f_OrgStr = this.$login.f.orgpathstr
609
- this.Mreadibook(`('${this.$login.f.orgid}')`)
610
- this.getAllMeterBook(`('${this.$login.f.orgid}')`)
611
- this.getTableBrands()
612
- },
613
- methods: {
614
- getTableBrands() {
615
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
616
- {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
617
- {resolveMsg: null, rejectMsg: null}).then((resp) => {
618
- resp.data.forEach((result) => {
619
- this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
620
- })
621
- })
622
- },
623
- //获取省市区列表
624
- getPcd(val) {
625
- this.pcds = [{label: '全部', value: ''}]
626
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
627
- {data: {items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}`}},
628
- {resolveMsg: null, rejectMsg: null}).then((pcdlist) => {
629
- pcdlist.data.forEach((result) => {
630
- this.pcds.push({label: result.f_pcd, value: result.id})
631
- })
632
- })
633
- },
634
- getmeterbook(val) {
635
-
636
- //tag
637
- this.cbc = []
638
- this.cbc.push({
639
- label: '全部',
640
- value: ''
641
- })
642
- if (val == '') {
643
-
644
- this.cbcs.forEach(res => {
645
- this.cbc.push({
646
- label: res.f_book_name,
647
- value: res.id
648
- })
649
- })
650
- } else {
651
- this.cbcs.forEach(res => {
652
- if (res.f_book_slice_area == val) {
653
- this.cbc.push({
654
- label: res.f_book_name,
655
- value: res.id
656
- })
657
- }
658
- })
659
- }
660
- },
661
- Mreadibook(val) {
662
- ////tag
663
- ////tag
664
- this.sliceArea = []
665
- if (val) {
666
- new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
667
- data: {
668
- items: 'name',
669
- tablename: 't_zone',
670
- condition: `parentid in ${val}`,
671
- orderitem: 'id'
672
- }
673
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
674
- this.sliceArea.push({
675
- label: '全部',
676
- value: ''
677
- })
678
- res.data.forEach(ress => {
679
- this.sliceArea.push({
680
- label: ress.name,
681
- value: ress.name
682
- })
683
- })
684
-
685
- })
686
- }
687
- },
688
- // 获取县域分公司内容
689
- getfengongsi() {
690
- let val = {
691
- source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
692
- userid: `${this.$login.f.id}`
693
- }
694
- let http = new HttpResetClass()
695
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
696
- res.data.forEach((item) => {
697
- this.orgstrs.push({label: item.name, value: item.id})
698
- })
699
- //tag
700
- })
701
- },
702
- // 县域分公司发生改变
703
- // orgstrchange(val){
704
- // if(val == undefined || val == ''){
705
- // return
706
- // }else {
707
- // this.checkersid = []
708
- // let gen = select(this,val)
709
- // return co(gen)
710
- // }
711
- // },
712
- getDefect(val) {
713
- if (val) {
714
- try {
715
- var defect = JSON.parse(val)
716
- return defect.result
717
- } catch (e) {
718
- //tag
719
- return '正常'
720
- }
721
- }
722
- return '正常'
723
- },
724
- checkerchange(val) {
725
- this.checkboxModel.f_checker = val.name
726
- this.checkboxModel.f_checker_id = val.id
727
- },
728
- search(args) {
729
- if (this.model.f_filialeids){
730
- args.condition += ` and f_orgid in ${this.model.f_filialeids}`
731
- }
732
- if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
733
- this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
734
- return
735
- }
736
- if ((args.model.f_check_start || args.model.f_check_end) && !this.SafeCheckXZ) {
737
- this.$showMessage('如果录入 安检起始时间,需要选择 安检筛选条件!')
738
- return
739
- }
740
- //args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
741
- // let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
742
- let con = '1=1'
743
- this.$emit('filiale-change', con)
744
- con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'` : ''
745
- con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
746
- con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
747
- con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
748
- con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
749
- if (this.SafeCheckXZ) {
750
- con += ` and f_offsite_time >= '${args.model.f_check_start}' and f_offsite_time <= '${args.model.f_check_end}' `
751
- if (this.SafeCheckXZ == '未安检') {
752
- args.condition += ' and ruhuid is null'
753
- } else {
754
- args.condition += ' and ruhuid is not null'
755
- }
756
- }
757
- con += args.model.f_last_check_state ? ` and f_entry_status = '${args.model.f_last_check_state}'` : ''
758
- con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ''
759
- let condition = {
760
- condition1: args.condition,
761
- condition2: con
762
- }
763
- this.searchData.condition = condition
764
- return this.model.search(condition, args.model)
765
- },
766
- checkstatus() {
767
- return this.$appdata.getParam('安检状态') ? [{
768
- label: '全部',
769
- value: ''
770
- }, ...this.$appdata.getParam('安检状态')] : [{label: '全部', value: ''}]
771
- },
772
- usertypes() {
773
- return this.$appdata.getParam('用户类型') ? [{
774
- label: '全部',
775
- value: ''
776
- }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
777
- },
778
- userstates() {
779
- return this.$appdata.getParam('用户状态') ? [{
780
- label: '全部',
781
- value: ''
782
- }, ...this.$appdata.getParam('用户状态')] : [{label: '全部', value: ''}]
783
- },
784
- hiddenr() {
785
- this.$parent.showItem = !this.$parent.showItem
786
- },
787
- hidden() {
788
- this.criteriaShow = !this.criteriaShow
789
- },
790
- confirm() {
791
- if (!this.checkboxModel.f_plan_name) {
792
- this.$showMessage('请填写安检计划名称!')
793
- return
794
- }
795
- // if(this.f_effective_start_time == ''){
796
- // this.$showMessage('请选择有效起始日期!')
797
- // return
798
- // }
799
- // if(this.f_effective_end_time == ''){
800
- // this.$showMessage('请选择有效结束日期!')
801
- // return
802
- // }
803
- if (this.IsShare == '否') {
804
- if (!this.checkboxModel.f_checker_id) {
805
- this.$showMessage('请选择安检员!')
806
- return
807
- }
808
- }
809
- let gen = saveGen(this)
810
- return co(gen)
811
- },
812
- changeStates() {
813
- if (this.checkedAll) {//实现反选/
814
- this.checkrows = [];
815
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
816
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
817
- }
818
- } else {//实现全选
819
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
820
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
821
- }
822
- let _this = this
823
- let condition = this.$refs.paged.$refs.criteria.condition
824
- let url = this.model.url
825
- this.$resetpost(`${url}?pageSize=9999999`, {
826
- data: {
827
- condition: condition,
828
- groupitem: '',
829
- orderitem: 'f_residential_area',
830
- f_usertype: this.model.f_usertype,
831
- f_filialeids: this.model.f_filialeids,
832
- month: this.model.month,
833
- safeCycle: this.model.safeCycle,
834
- f_checktime_start: this.model.f_checktime_start,
835
- f_checktime_end: this.model.f_checktime_end,
836
- SafeCheckSX: this.model.SafeCheckSX,
837
- f_last_check_state: this.model.f_last_check_state
838
- },
839
- }, {resolveMsg: null, rejectMsg: null}, -1).then(
840
- (respanse) => {
841
- if (respanse.data.length >= 5000) {
842
- this.$showMessage("数据量太大,请重新选择")
843
- } else {
844
- _this.checkrows = []
845
- for (let j = 0; j < respanse.data.length; j++) {
846
- _this.checkrows.push(respanse.data[j])
847
- }
848
- //tag;
849
- }
850
- })
851
- }
852
- },
853
- addChecked(item) {
854
- //tag;
855
- if (!item.checked) {
856
- this.checkrows.push(item);
857
- //tag;
858
- } else {
859
- for (let i = 0; i < this.checkrows.length; i++) {
860
- if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
861
- this.checkrows.splice(i, 1)
862
- }
863
- }
864
- }
865
- },
866
- ToshowModal() {
867
- this.creatPlanWay = 'single'
868
- if (this.checkrows.length > 0) {
869
- this.showModal = true
870
- } else {
871
- this.$showMessage("请选择需要安检的用户!")
872
- }
873
- },
874
- FiltrationPlan() {
875
- if (this.model.rows.length == 0) {
876
- this.$showMessage("暂无可生成的计划!")
877
- return
878
- }
879
- this.creatPlanWay = 'filtration'
880
- this.showModal = true
881
- },
882
- AllPlan() {
883
- if (this.model.rows.length == 0) {
884
- this.$showMessage("暂无可生成的计划!")
885
- return
886
- }
887
- this.creatPlanWay = 'all'
888
- this.showModal = true
889
- },
890
- cancel() {
891
- this.showModal = false
892
- },
893
- areas() {
894
- let rs = []
895
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
896
- let temp = {
897
- label: this.$login.f.f_allArea[i].label,
898
- value: this.$login.f.f_allArea[i].label
899
- }
900
- rs.push(temp)
901
- }
902
- return [{label: '全部', value: ''}, ...rs]
903
- },
904
- initAdjustables() {
905
- //tag
906
- let arr = []
907
- let filter = this.$login.f.f_orgids
908
- this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
909
- let temp = {}
910
- temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
911
- temp.value = `${item.value.id}`
912
- arr.push(temp)
913
- })
914
- this.adjustables = [{label: '全部', value: ''}, ...arr]
915
- },
916
- getAllMeterBook(val) {
917
- ////tag
918
- ////tag
919
- this.cbcs = []
920
- if (val) {
921
- new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
922
- data: {
923
- items: 'f_book_name,f_book_slice_area,id',
924
- tablename: 't_meter_book',
925
- condition: `f_filiale_id in ${val}`,
926
- orderitem: 'id'
927
- }
928
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
929
- res.data.forEach(ress => {
930
- this.cbcs.push({
931
- id: ress.id,
932
- f_book_name: ress.f_book_name,
933
- f_book_slice_area: ress.f_book_slice_area
934
- })
935
- })
936
- this.cbc = []
937
- this.cbc.push({
938
- label: '全部',
939
- value: ''
940
- })
941
- this.cbcs.forEach(res => {
942
- this.cbc.push({
943
- label: res.f_book_name,
944
- value: res.id
945
- })
946
- })
947
- })
948
- }
949
- },
950
- getRes(obj) {
951
- this.model.f_filialeids = this.$login.convertToIn(obj.resids);
952
- this.Mreadibook(this.model.f_filialeids)
953
- this.getAllMeterBook(this.model.f_filialeids)
954
- this.getPcd(this.model.f_filialeids)
955
- }
956
- },
957
-
958
- watch: {
959
- 'model.f_usertype'(val) {
960
- if (val == '民用') {
961
- this.model.safeCycle = this.civil
962
- } else if (val == '非民用') {
963
- this.model.safeCycle = this.civilian
964
- }
965
- },
966
- 'model.SafeCheckXZ'(val) {
967
- this.model.SafeCheckSC = ''
968
- if (val == '已安检') {
969
- this.model.SafeCheckCQ = ''
970
- this.model.SafeCheckSX = {
971
- f_check_end: '', // 安检时间 查询起始条件
972
- f_check_start: ''// 安检时间 查询终止条件
973
- }
974
- } else {
975
- // 当使用筛选条件时,清空不需要的条件选项
976
- this.model.f_issue_start = ''
977
- this.model.f_issue_end = ''
978
- this.$refs.paged.$refs.criteria.model.f_check_start = ''
979
- this.$refs.paged.$refs.criteria.model.f_check_end = ''
980
- this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
981
- this.model.month = ''
982
- if (val == '应安检') {
983
- this.model.SafeCheckSC = '否'
984
-
985
- this.model.f_issue_start = Util.toStartDateString()
986
- this.model.f_issue_end = Util.toStandardDateString()
987
- }
988
- // this.model.f_checktime_start = ''
989
- // this.model.f_checktime_end = ''
990
- }
991
- },
992
- 'model.SafeCheckSC'(val) {
993
- if (val == '') {
994
- this.model.f_issue_start = ''
995
- this.model.f_issue_end = ''
996
- }
997
- },
998
- // 'checker'(val){
999
- // //tag
1000
- // if(val){
1001
- // this.checkboxModel.f_checker = this.checker[0].name
1002
- // this.checkboxModel.f_checker_id = this.checker[0].id
1003
- // }
1004
- // },
1005
- 'model.rows'() {
1006
- // if (!this.checkedAll) {//实现反选/
1007
- // this.checkrows = [];
1008
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1009
- var k = false
1010
- for (let j = 0; j < this.checkrows.length; j++) {
1011
- if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1012
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1013
- k = true
1014
- continue
1015
- }
1016
- }
1017
- if (!k) {
1018
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1019
- }
1020
- }
1021
- // } else {//实现全选
1022
- // // this.checkboxModel = {};
1023
- // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1024
- // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1025
- // }
1026
- // }
1027
- }
1028
- },
1029
- computed: {
1030
- selected() {
1031
- return this.$refs.paged.$refs.grid.selected
1032
- }
1033
- }
1034
- }
1035
- </script>
1036
- <style scoped>
1037
- .newcolor {
1038
- color: red;
1039
- }
1040
-
1041
- .table th {
1042
- background-color: #f2f6fa;
1043
- color: black;
1044
- }
1045
- </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">区&emsp;&emsp;域</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>
221
+
222
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
223
+ <div :class="$parent.$parent.style">
224
+ <label class="font_normal_body">用户编号</label>
225
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
226
+
227
+ placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
228
+ </div>
229
+ <div :class="$parent.$parent.style">
230
+ <label class="font_normal_body">用户姓名</label>
231
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name"
232
+ placeholder="用户姓名" condition="f_user_name like '%{}%'">
233
+ </div>
234
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
235
+ <export-excel-safe :data="$parent.$parent.searchData"
236
+ :field="$parent.$parent.excelHeaders"
237
+ sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
238
+ template-name='用户安检情况' :choose-col="true"></export-excel-safe>
239
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
240
+ <div style="float: right" class="button_spacing"
241
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
242
+ @click="$parent.$parent.hiddenr()"></div>
243
+ <div style="float: right" class="button_spacing"
244
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
245
+ @click="$parent.$parent.hidden()">
246
+
247
+ </div>
248
+ </div>
249
+
250
+ </div>
251
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
252
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
253
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
254
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
255
+
256
+ placeholder="小区" condition="f_residential_area like '%{}%'">
257
+ </div>
258
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
259
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
260
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_address"
261
+
262
+ placeholder="地址" condition="f_address like '%{}%'">
263
+ </div>
264
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
265
+ <label class="font_normal_body">用户类型</label>
266
+ <v-select
267
+ placeholder='用户类型'
268
+ class="select select_list"
269
+
270
+ :value.sync="model.f_usertype"
271
+ :value-single="true"
272
+ :options='$parent.$parent.usertypes'
273
+ v-model="model.f_usertype"
274
+ condition="f_user_type = '{}'"
275
+ close-on-select clear-button></v-select>
276
+ </div>
277
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
278
+
279
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
280
+ <label class="font_normal_body" style="color: red;">安检筛选</label>
281
+ <v-select
282
+ placeholder='安检筛选'
283
+ :value-single="true"
284
+
285
+ class="select select_list"
286
+ :value.sync="$parent.$parent.SafeCheckXZ"
287
+ :options='$parent.$parent.SafeCheckXZs'
288
+ v-model="$parent.$parent.SafeCheckXZ"
289
+ close-on-select clear-button></v-select>
290
+ </div>
291
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
292
+ <label class="font_normal_body">用气性质</label>
293
+ <v-select
294
+ class="select_list select"
295
+ placeholder='用气性质' style="width: 60%"
296
+ v-model='model.userType'
297
+ :value.sync="model.userType"
298
+ :options='$parent.$parent.userTypes'
299
+ condition="f_gasproperties = '{}'"
300
+ :value-single="true"
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.tableType'
309
+ :value.sync="model.tableType"
310
+ :options='$parent.$parent.tableTypes'
311
+ condition="f_meter_classify = '{}'"
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.tableBrand'
321
+ :value.sync="model.tableBrand"
322
+ :options='$parent.$parent.tableBrands'
323
+ condition="f_meter_brand = '{}'"
324
+ :value-single="true"
325
+ close-on-select clear-button></v-select>
326
+ </div>
327
+
328
+ </div>
329
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
330
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
331
+ <label class="font_normal_body">安检起始</label>
332
+ <datepicker
333
+ :value.sync="model.f_check_start"
334
+ placeholder='最后安检时间起始'
335
+ :disabled-days-of-week="[]"
336
+ style="width: 60%"
337
+ :format="'yyyy-MM-dd'"
338
+ :show-rest-button="reset"
339
+ v-model="model.f_check_start">
340
+ </datepicker>
341
+ </div>
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_end"
346
+ placeholder='最后安检时间结束'
347
+ style="width: 60%"
348
+ :disabled-days-of-week="[]"
349
+ :format="'yyyy-MM-dd'"
350
+ :show-rest-button="reset"
351
+ v-model="model.f_check_end">
352
+ </datepicker>
353
+ </div>
354
+
355
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
356
+ <label class="font_normal_body">安检状态</label>
357
+ <v-select
358
+ placeholder='安检状态'
359
+ class="select select_list"
360
+
361
+ :value.sync="model.f_last_check_state"
362
+ :value-single="true"
363
+ :options='$parent.$parent.checkstatus'
364
+ v-model="model.f_last_check_state"
365
+ condition="f_last_check_state = '{}'"
366
+ close-on-select clear-button></v-select>
367
+ </div>
368
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
369
+ <label class="font_normal_body">隐患情况</label>
370
+ <v-select
371
+ placeholder='隐患情况'
372
+ class="select select_list"
373
+
374
+ :value-single="true"
375
+ v-model='model.f_check_result'
376
+ :value.sync="model.f_check_result"
377
+ :options='$parent.$parent.f_check_results'
378
+ condition="f_last_check_result like '%{}%'"
379
+ close-on-select clear-button></v-select>
380
+ </div>
381
+
382
+ </div>
383
+ <!--<div class="row" v-show="$parent.$parent.$parent.showItem">
384
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
385
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
386
+ <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">
387
+ </right-tree>
388
+ </div>
389
+
390
+ </div>-->
391
+ </div>
392
+ </criteria>
393
+ <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
394
+ <template partial='head'>
395
+ <tr>
396
+ <th>
397
+ <nobr>用户编号</nobr>
398
+ </th>
399
+ <th>
400
+ <nobr>用户名称</nobr>
401
+ </th>
402
+ <th>
403
+ <nobr>用户电话</nobr>
404
+ </th>
405
+ <th>
406
+ <nobr>燃气表号</nobr>
407
+ </th>
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 style="padding: 0 40px">
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>
439
+ <nobr>最后一次安检日期</nobr>
440
+ </th>
441
+ <th>
442
+ <nobr>最后一次安检状态</nobr>
443
+ </th>
444
+ <th>
445
+ <nobr>安检结果</nobr>
446
+ </th>
447
+ </tr>
448
+ </template>
449
+ <template partial='body'>
450
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_userinfo_code }}</td>
451
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_name }}</td>
452
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_phone }}</td>
453
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meternumber }}</td>
454
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meter_brand }}</td>
455
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_user_type }}</td>
456
+ <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
457
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_slice_area }}</td>
458
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_residential_area }}</td>
459
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_address }}</td>
460
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_checker_name }}</td>
461
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_comments }}</td>
462
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_factory_date }}</td>
463
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_date }}</td>
464
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_state }}</td>
465
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">
466
+ {{ $parent.$parent.$parent.getDefect(row.f_last_check_result) }}
467
+ </td>
468
+ </template>
469
+ </data-grid>
470
+ </criteria-paged>
471
+ </div>
472
+ </template>
473
+
474
+ <script>
475
+ import {PagedList} from 'vue-client'
476
+ import {HttpResetClass} from 'vue-client'
477
+ import co from 'co'
478
+ import * as Util from '../../Util'
479
+ import Vue from 'vue'
480
+
481
+ // let select = function * (self,userid) {
482
+ // let http = new HttpResetClass()
483
+ // let getGasman = yield http.load('POST','/rs/search', {
484
+ // source: 'this.getChildByName($安检员$).getUsers()',
485
+ // userid: userid
486
+ // }, {resolveMsg: null, rejectMsg: null})
487
+ // //tag
488
+ // getGasman.data.forEach((checker)=>{
489
+ // self.checkersid.push({label:checker.name,value:checker.id})
490
+ // })
491
+ // self.checkersid.push({label:'全部',value:''})
492
+ // }
493
+
494
+
495
+ export default {
496
+ title: '用户安检情况',
497
+ data() {
498
+ let options = []
499
+ let year = (new Date()).getFullYear()
500
+ for (let i = year; i <= year + 3; i++)
501
+ options.push({label: i + '', value: i + ''})
502
+ let moptions = []
503
+ for (let i = 1; i <= 12; i++)
504
+ moptions.push({label: i + '', value: i + ''})
505
+
506
+ return {
507
+ searchData: {
508
+ condition: '1=1',
509
+ orderitem: "f_userinfo_code",
510
+ timetype: "dd",
511
+ 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"
512
+
513
+ },
514
+ excelHeaders: {
515
+ //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
516
+
517
+ 'f_userinfo_code': '用户编号',
518
+ 'f_user_name': '用户名称',
519
+ 'f_user_phone': '用户电话',
520
+ 'f_meternumber': '燃气表号',
521
+ 'f_meter_brand': '气表品牌',
522
+ // 'count_item': '安检次数',
523
+ 'f_user_type': '用户类型',
524
+ 'f_checker_name': '安检员',
525
+ 'f_comments': '安检备注',
526
+ 'f_slice_area': '区域',
527
+ 'f_residential_area': '小区名称',
528
+ 'f_address': '地址',
529
+ 'f_factory_date': '表具出厂日期',
530
+ 'f_last_check_date': '最后一次安检日期',
531
+ 'f_last_check_state': '最后一次安检状态',
532
+ 'f_defect_content': '安检结果'
533
+ },
534
+ model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
535
+ orderitem: "'f_last_check_date desc'",
536
+ timetype: "'dd'",
537
+ f_defect_content: 'this.f_defect_content'
538
+ }),
539
+ 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",
540
+ orgstrs: [{label: '全部', value: ''}],
541
+ checkersid: [],
542
+ SafeCheckXZ: '',
543
+ civil: '', //民用安检周期
544
+ civilian: '', //非民用安检周期
545
+ SafeCheckXZs: [{label: '全部', value: ''}, {label: '未安检', value: '未安检'}, {label: '已安检', value: '已安检'}], // 安检筛选选项
546
+ SafeCheckSXs: [{label: '是', value: '是'}, {label: '否', value: '否'}, {label: '全部', value: ''}],
547
+ // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
548
+ IsShares: [{label: '是', value: '是'}, {label: '否', value: '否'}],
549
+ IsShare: '否',
550
+ checker: {},
551
+ NoBuys: [{label: '是', value: '是'}, {label: '否', value: '否'}],
552
+ criteriaShow: false,
553
+ checkers: [],
554
+ chosenOrg: {id: 0},
555
+ showModal: false,
556
+ checkedAll: false,
557
+ checkrows: [],
558
+ adjustables: [],
559
+ f_plan_year: year + '',
560
+ f_plan_month: moptions[new Date().getMonth()].value,
561
+ f_effective_start_time: '', //计划有效起始时间
562
+ f_effective_end_time: '', //计划有效结束时间
563
+ checkboxModel: {},
564
+ c_year_list: options,
565
+ c_month_list: moptions,
566
+ areas: this.areas(),
567
+ checkstatus: this.checkstatus(),
568
+ usertypes: this.usertypes(),
569
+ userstates: this.userstates(),
570
+ sqlname: '',
571
+ f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '有隐患', value: '有隐患'}],
572
+ creatPlanWay: '',
573
+ userTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
574
+ tableTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')],
575
+ tableBrands: [{label: '全部', value: ''}],
576
+ sliceArea: [],
577
+ cbcs: [],
578
+ cbc: [],
579
+ pcds: [],
580
+
581
+ }
582
+ },
583
+ props: {
584
+ style: {
585
+ type: String,
586
+ default: 'col-sm-2 form-group'
587
+ },
588
+ style2: {
589
+ type: String,
590
+ default: 'col-sm-4 form-group'
591
+ },
592
+ checkplan: { // 传入一条安检计划信息
593
+ type: Object
594
+ },
595
+ additemshow: {
596
+ type: Boolean,
597
+ default: false
598
+ }
599
+ },
600
+ ready() {
601
+ // 获取分公司信息
602
+ this.model.f_defect_content = this.f_defect_content
603
+
604
+ //this.getfengongsi()
605
+ this.model.chosenOrg = {id: 0}
606
+ this.model.f_filialeids = this.$login.f.f_orgids
607
+ this.model.f_filiale = this.$login.f.f_fengongsi
608
+ this.model.f_OrgStr = this.$login.f.orgpathstr
609
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
610
+ this.getAllMeterBook(`('${this.$login.f.orgid}')`)
611
+ this.getTableBrands()
612
+ },
613
+ methods: {
614
+ getTableBrands() {
615
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
616
+ {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
617
+ {resolveMsg: null, rejectMsg: null}).then((resp) => {
618
+ resp.data.forEach((result) => {
619
+ this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
620
+ })
621
+ })
622
+ },
623
+ //获取省市区列表
624
+ getPcd(val) {
625
+ this.pcds = [{label: '全部', value: ''}]
626
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
627
+ {data: {items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}`}},
628
+ {resolveMsg: null, rejectMsg: null}).then((pcdlist) => {
629
+ pcdlist.data.forEach((result) => {
630
+ this.pcds.push({label: result.f_pcd, value: result.id})
631
+ })
632
+ })
633
+ },
634
+ getmeterbook(val) {
635
+
636
+ //tag
637
+ this.cbc = []
638
+ this.cbc.push({
639
+ label: '全部',
640
+ value: ''
641
+ })
642
+ if (val == '') {
643
+
644
+ this.cbcs.forEach(res => {
645
+ this.cbc.push({
646
+ label: res.f_book_name,
647
+ value: res.id
648
+ })
649
+ })
650
+ } else {
651
+ this.cbcs.forEach(res => {
652
+ if (res.f_book_slice_area == val) {
653
+ this.cbc.push({
654
+ label: res.f_book_name,
655
+ value: res.id
656
+ })
657
+ }
658
+ })
659
+ }
660
+ },
661
+ Mreadibook(val) {
662
+ ////tag
663
+ ////tag
664
+ this.sliceArea = []
665
+ if (val) {
666
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
667
+ data: {
668
+ items: 'name',
669
+ tablename: 't_zone',
670
+ condition: `parentid in ${val}`,
671
+ orderitem: 'id'
672
+ }
673
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
674
+ this.sliceArea.push({
675
+ label: '全部',
676
+ value: ''
677
+ })
678
+ res.data.forEach(ress => {
679
+ this.sliceArea.push({
680
+ label: ress.name,
681
+ value: ress.name
682
+ })
683
+ })
684
+
685
+ })
686
+ }
687
+ },
688
+ // 获取县域分公司内容
689
+ getfengongsi() {
690
+ let val = {
691
+ source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
692
+ userid: `${this.$login.f.id}`
693
+ }
694
+ let http = new HttpResetClass()
695
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
696
+ res.data.forEach((item) => {
697
+ this.orgstrs.push({label: item.name, value: item.id})
698
+ })
699
+ //tag
700
+ })
701
+ },
702
+ // 县域分公司发生改变
703
+ // orgstrchange(val){
704
+ // if(val == undefined || val == ''){
705
+ // return
706
+ // }else {
707
+ // this.checkersid = []
708
+ // let gen = select(this,val)
709
+ // return co(gen)
710
+ // }
711
+ // },
712
+ getDefect(val) {
713
+ if (val) {
714
+ try {
715
+ var defect = JSON.parse(val)
716
+ return defect.result
717
+ } catch (e) {
718
+ //tag
719
+ return '正常'
720
+ }
721
+ }
722
+ return '正常'
723
+ },
724
+ checkerchange(val) {
725
+ this.checkboxModel.f_checker = val.name
726
+ this.checkboxModel.f_checker_id = val.id
727
+ },
728
+ search(args) {
729
+ if (this.model.f_filialeids){
730
+ args.condition += ` and f_orgid in ${this.model.f_filialeids}`
731
+ }
732
+ if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
733
+ this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
734
+ return
735
+ }
736
+ if ((args.model.f_check_start || args.model.f_check_end) && !this.SafeCheckXZ) {
737
+ this.$showMessage('如果录入 安检起始时间,需要选择 安检筛选条件!')
738
+ return
739
+ }
740
+ //args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
741
+ // let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
742
+ let con = '1=1'
743
+ this.$emit('filiale-change', con)
744
+ con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'` : ''
745
+ con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
746
+ con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
747
+ con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
748
+ con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
749
+ if (this.SafeCheckXZ) {
750
+ con += ` and f_offsite_time >= '${args.model.f_check_start}' and f_offsite_time <= '${args.model.f_check_end}' `
751
+ if (this.SafeCheckXZ == '未安检') {
752
+ args.condition += ' and ruhuid is null'
753
+ } else {
754
+ args.condition += ' and ruhuid is not null'
755
+ }
756
+ }
757
+ con += args.model.f_last_check_state ? ` and f_entry_status = '${args.model.f_last_check_state}'` : ''
758
+ con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ''
759
+ let condition = {
760
+ condition1: args.condition,
761
+ condition2: con
762
+ }
763
+ this.searchData.condition = condition
764
+ return this.model.search(condition, args.model)
765
+ },
766
+ checkstatus() {
767
+ return this.$appdata.getParam('安检状态') ? [{
768
+ label: '全部',
769
+ value: ''
770
+ }, ...this.$appdata.getParam('安检状态')] : [{label: '全部', value: ''}]
771
+ },
772
+ usertypes() {
773
+ return this.$appdata.getParam('用户类型') ? [{
774
+ label: '全部',
775
+ value: ''
776
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
777
+ },
778
+ userstates() {
779
+ return this.$appdata.getParam('用户状态') ? [{
780
+ label: '全部',
781
+ value: ''
782
+ }, ...this.$appdata.getParam('用户状态')] : [{label: '全部', value: ''}]
783
+ },
784
+ hiddenr() {
785
+ this.$parent.showItem = !this.$parent.showItem
786
+ },
787
+ hidden() {
788
+ this.criteriaShow = !this.criteriaShow
789
+ },
790
+ confirm() {
791
+ if (!this.checkboxModel.f_plan_name) {
792
+ this.$showMessage('请填写安检计划名称!')
793
+ return
794
+ }
795
+ // if(this.f_effective_start_time == ''){
796
+ // this.$showMessage('请选择有效起始日期!')
797
+ // return
798
+ // }
799
+ // if(this.f_effective_end_time == ''){
800
+ // this.$showMessage('请选择有效结束日期!')
801
+ // return
802
+ // }
803
+ if (this.IsShare == '否') {
804
+ if (!this.checkboxModel.f_checker_id) {
805
+ this.$showMessage('请选择安检员!')
806
+ return
807
+ }
808
+ }
809
+ let gen = saveGen(this)
810
+ return co(gen)
811
+ },
812
+ changeStates() {
813
+ if (this.checkedAll) {//实现反选/
814
+ this.checkrows = [];
815
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
816
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
817
+ }
818
+ } else {//实现全选
819
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
820
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
821
+ }
822
+ let _this = this
823
+ let condition = this.$refs.paged.$refs.criteria.condition
824
+ let url = this.model.url
825
+ this.$resetpost(`${url}?pageSize=9999999`, {
826
+ data: {
827
+ condition: condition,
828
+ groupitem: '',
829
+ orderitem: 'f_residential_area',
830
+ f_usertype: this.model.f_usertype,
831
+ f_filialeids: this.model.f_filialeids,
832
+ month: this.model.month,
833
+ safeCycle: this.model.safeCycle,
834
+ f_checktime_start: this.model.f_checktime_start,
835
+ f_checktime_end: this.model.f_checktime_end,
836
+ SafeCheckSX: this.model.SafeCheckSX,
837
+ f_last_check_state: this.model.f_last_check_state
838
+ },
839
+ }, {resolveMsg: null, rejectMsg: null}, -1).then(
840
+ (respanse) => {
841
+ if (respanse.data.length >= 5000) {
842
+ this.$showMessage("数据量太大,请重新选择")
843
+ } else {
844
+ _this.checkrows = []
845
+ for (let j = 0; j < respanse.data.length; j++) {
846
+ _this.checkrows.push(respanse.data[j])
847
+ }
848
+ //tag;
849
+ }
850
+ })
851
+ }
852
+ },
853
+ addChecked(item) {
854
+ //tag;
855
+ if (!item.checked) {
856
+ this.checkrows.push(item);
857
+ //tag;
858
+ } else {
859
+ for (let i = 0; i < this.checkrows.length; i++) {
860
+ if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
861
+ this.checkrows.splice(i, 1)
862
+ }
863
+ }
864
+ }
865
+ },
866
+ ToshowModal() {
867
+ this.creatPlanWay = 'single'
868
+ if (this.checkrows.length > 0) {
869
+ this.showModal = true
870
+ } else {
871
+ this.$showMessage("请选择需要安检的用户!")
872
+ }
873
+ },
874
+ FiltrationPlan() {
875
+ if (this.model.rows.length == 0) {
876
+ this.$showMessage("暂无可生成的计划!")
877
+ return
878
+ }
879
+ this.creatPlanWay = 'filtration'
880
+ this.showModal = true
881
+ },
882
+ AllPlan() {
883
+ if (this.model.rows.length == 0) {
884
+ this.$showMessage("暂无可生成的计划!")
885
+ return
886
+ }
887
+ this.creatPlanWay = 'all'
888
+ this.showModal = true
889
+ },
890
+ cancel() {
891
+ this.showModal = false
892
+ },
893
+ areas() {
894
+ let rs = []
895
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
896
+ let temp = {
897
+ label: this.$login.f.f_allArea[i].label,
898
+ value: this.$login.f.f_allArea[i].label
899
+ }
900
+ rs.push(temp)
901
+ }
902
+ return [{label: '全部', value: ''}, ...rs]
903
+ },
904
+ initAdjustables() {
905
+ //tag
906
+ let arr = []
907
+ let filter = this.$login.f.f_orgids
908
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
909
+ let temp = {}
910
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
911
+ temp.value = `${item.value.id}`
912
+ arr.push(temp)
913
+ })
914
+ this.adjustables = [{label: '全部', value: ''}, ...arr]
915
+ },
916
+ getAllMeterBook(val) {
917
+ ////tag
918
+ ////tag
919
+ this.cbcs = []
920
+ if (val) {
921
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
922
+ data: {
923
+ items: 'f_book_name,f_book_slice_area,id',
924
+ tablename: 't_meter_book',
925
+ condition: `f_filiale_id in ${val}`,
926
+ orderitem: 'id'
927
+ }
928
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
929
+ res.data.forEach(ress => {
930
+ this.cbcs.push({
931
+ id: ress.id,
932
+ f_book_name: ress.f_book_name,
933
+ f_book_slice_area: ress.f_book_slice_area
934
+ })
935
+ })
936
+ this.cbc = []
937
+ this.cbc.push({
938
+ label: '全部',
939
+ value: ''
940
+ })
941
+ this.cbcs.forEach(res => {
942
+ this.cbc.push({
943
+ label: res.f_book_name,
944
+ value: res.id
945
+ })
946
+ })
947
+ })
948
+ }
949
+ },
950
+ getRes(obj) {
951
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
952
+ this.Mreadibook(this.model.f_filialeids)
953
+ this.getAllMeterBook(this.model.f_filialeids)
954
+ this.getPcd(this.model.f_filialeids)
955
+ }
956
+ },
957
+
958
+ watch: {
959
+ 'model.f_usertype'(val) {
960
+ if (val == '民用') {
961
+ this.model.safeCycle = this.civil
962
+ } else if (val == '非民用') {
963
+ this.model.safeCycle = this.civilian
964
+ }
965
+ },
966
+ 'model.SafeCheckXZ'(val) {
967
+ this.model.SafeCheckSC = ''
968
+ if (val == '已安检') {
969
+ this.model.SafeCheckCQ = ''
970
+ this.model.SafeCheckSX = {
971
+ f_check_end: '', // 安检时间 查询起始条件
972
+ f_check_start: ''// 安检时间 查询终止条件
973
+ }
974
+ } else {
975
+ // 当使用筛选条件时,清空不需要的条件选项
976
+ this.model.f_issue_start = ''
977
+ this.model.f_issue_end = ''
978
+ this.$refs.paged.$refs.criteria.model.f_check_start = ''
979
+ this.$refs.paged.$refs.criteria.model.f_check_end = ''
980
+ this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
981
+ this.model.month = ''
982
+ if (val == '应安检') {
983
+ this.model.SafeCheckSC = '否'
984
+
985
+ this.model.f_issue_start = Util.toStartDateString()
986
+ this.model.f_issue_end = Util.toStandardDateString()
987
+ }
988
+ // this.model.f_checktime_start = ''
989
+ // this.model.f_checktime_end = ''
990
+ }
991
+ },
992
+ 'model.SafeCheckSC'(val) {
993
+ if (val == '') {
994
+ this.model.f_issue_start = ''
995
+ this.model.f_issue_end = ''
996
+ }
997
+ },
998
+ // 'checker'(val){
999
+ // //tag
1000
+ // if(val){
1001
+ // this.checkboxModel.f_checker = this.checker[0].name
1002
+ // this.checkboxModel.f_checker_id = this.checker[0].id
1003
+ // }
1004
+ // },
1005
+ 'model.rows'() {
1006
+ // if (!this.checkedAll) {//实现反选/
1007
+ // this.checkrows = [];
1008
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1009
+ var k = false
1010
+ for (let j = 0; j < this.checkrows.length; j++) {
1011
+ if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1012
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1013
+ k = true
1014
+ continue
1015
+ }
1016
+ }
1017
+ if (!k) {
1018
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1019
+ }
1020
+ }
1021
+ // } else {//实现全选
1022
+ // // this.checkboxModel = {};
1023
+ // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1024
+ // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1025
+ // }
1026
+ // }
1027
+ }
1028
+ },
1029
+ computed: {
1030
+ selected() {
1031
+ return this.$refs.paged.$refs.grid.selected
1032
+ }
1033
+ }
1034
+ }
1035
+ </script>
1036
+ <style scoped>
1037
+ .newcolor {
1038
+ color: red;
1039
+ }
1040
+
1041
+ .table th {
1042
+ background-color: #f2f6fa;
1043
+ color: black;
1044
+ }
1045
+ </style>