safecheck-client 3.0.30-85 → 3.0.30-86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,854 +1,854 @@
1
- <template>
2
- <div>
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
- <div partial>
6
- <div class="row " >
7
- <label class="form-group font_normal_body"><b>用户信息</b></label>
8
-
9
- <div class="form-group col-sm-1" >
10
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
- style="width: 95%" placeholder="客户编号" condition="ui.f_userinfo_code='{}'">
12
- </div>
13
- <div class="form-group col-sm-1" >
14
- <input type="text" class="input_search" v-model="model.f_user_name"
15
- style="width: 95%" placeholder="客户名称" condition="ui.f_user_name like '%{}%'">
16
- </div>
17
- <div class="form-group col-sm-1" >
18
- <input type="text" class="input_search" v-model="model.f_address"
19
- style="width: 95%" placeholder="客户地址" condition="ua.f_address like '%{}%'">
20
- </div>
21
- <div class="form-group col-sm-1 upuserinfo_sel" >
22
- <v-select
23
- class="select select_list"
24
- :width="'95%'"
25
- :value.sync="model.f_area"
26
- v-model="model.f_area"
27
- :options='$parent.$parent.areaList'
28
- :timeout="500"
29
- @select-search="$parent.$parent.select_search"
30
- placeholder='小区选择'
31
- condition="ua.f_residential_area = '{}'"
32
- close-on-select
33
- value-single
34
- >
35
- </v-select>
36
- </div>
37
- <div class="form-group col-sm-4" >
38
- <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUserCondition()">更多条件</button>
39
- <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUploadCodeCondition()">导入编号</button>
40
- <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.clearUserInfoId()">清空编号</button>
41
- <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
42
- </div>
43
- <div class="form-group col-sm-1" style="float: right">
44
- <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.dragtoPlanItem()">添入计划</button>
45
- </div>
46
- <modal :show.sync="$parent.$parent.showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
47
- <div slot="modal-header" class="modal-header">
48
- <h4 class="modal-title">
49
- 用户查询条件
50
- </h4>
51
- </div>
52
- <div slot="modal-body" class="modal-body">
53
- <div class="row">
54
- <div class="form-group col-sm-4" >
55
- <label class="font_normal_body">用户类型:</label>
56
- <v-select
57
- class="select select_list"
58
- :value.sync="model.f_user_type"
59
- v-model="model.f_user_type"
60
- :options='$parent.$parent.userTypes'
61
- placeholder='请选择'
62
- condition="uf.f_user_type='{}'"
63
- :search="false"
64
- close-on-select
65
- value-single
66
- >
67
- </v-select>
68
- </div>
69
- <div class="form-group col-sm-4" >
70
- <label class="font_normal_body">用户标签:</label>
71
- <v-select
72
- class="select select_list"
73
- :value.sync="model.f_user_tags"
74
- v-model="model.f_user_tags"
75
- :options='$parent.$parent.userTags'
76
- placeholder='请选择'
77
- condition="ui.f_user_tags='{}'"
78
- :search="false"
79
- close-on-select
80
- value-single
81
- >
82
- </v-select>
83
- </div>
84
- <div class="form-group col-sm-4" >
85
- <label class="font_normal_body">用气类型:</label>
86
- <v-select
87
- class="select select_list"
88
- :value.sync="model.f_user_gas_type"
89
- v-model="model.f_user_gas_type"
90
- :options='$parent.$parent.userGasType'
91
- placeholder='请选择'
92
- condition="ui.f_user_gas_type='{}'"
93
- :search="false"
94
- close-on-select
95
- value-single
96
- >
97
- </v-select>
98
- </div>
99
- <div class="form-group col-sm-4" >
100
- <label class="font_normal_body">用户类型:</label>
101
- <v-select
102
- class="select select_list"
103
- :value.sync="model.f_user_type"
104
- v-model="model.f_user_type"
105
- :options='$parent.$parent.userTypes'
106
- placeholder='请选择'
107
- condition="uf.f_user_type='{}'"
108
- :search="false"
109
- close-on-select
110
- value-single
111
- >
112
- </v-select>
113
- </div>
114
- <div class="form-group col-sm-4" >
115
- <label class="font_normal_body">用户状态:</label>
116
- <v-select
117
- class="select select_list"
118
- :value.sync="model.f_user_state"
119
- v-model="model.f_user_state"
120
- :options='$parent.$parent.userStates'
121
- placeholder='请选择'
122
- condition="ui.f_user_state='{}'"
123
- :search="false"
124
- close-on-select
125
- value-single
126
- >
127
- </v-select>
128
- </div>
129
- <div class="form-group col-sm-4" >
130
- <label class="font_normal_body">用气性质:</label>
131
- <v-select
132
- class="select select_list"
133
- :value.sync="model.f_gasproperties"
134
- v-model="model.f_gasproperties"
135
- :options='$parent.$parent.gasproperties'
136
- placeholder='请选择'
137
- condition="uf.f_gasproperties='{}'"
138
- :search="false"
139
- close-on-select
140
- value-single
141
- >
142
- </v-select>
143
- </div>
144
- <div class="form-group col-sm-4" >
145
- <label class="font_normal_body">气表类型:</label>
146
- <v-select
147
- class="select select_list"
148
- :value.sync="model.meter_classify"
149
- v-model="model.meter_classify"
150
- :options='$parent.$parent.meter_classifys'
151
- placeholder='请选择'
152
- condition="uf.F_METER_CLASSIFY='{}'"
153
- :search="false"
154
- close-on-select
155
- value-single
156
- >
157
- </v-select>
158
- </div>
159
- <!--<div class="form-group col-sm-4" >
160
- <label class="font_normal_body">小区名称:</label>
161
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
162
- style="width: 60%" placeholder="请选择" condition="ua.f_residential_area = '{}'">
163
- </div>-->
164
- <div class="form-group col-sm-4" >
165
- <label class="font_normal_body">楼&ensp;栋&ensp;号:</label>
166
- <input type="text" class="input_search" v-model="model.f_building"
167
- style="width: 60%" placeholder="请选择" condition="ua.f_building='{}'">
168
- </div>
169
- <div class="form-group col-sm-4" >
170
- <label class="font_normal_body">单&ensp;元&ensp;号:</label>
171
- <input type="text" class="input_search" v-model="model.f_unit"
172
- style="width: 60%" placeholder="请选择" condition="ua.f_unit='{}'">
173
- </div>
174
- <div class="form-group col-sm-4" >
175
- <label class="font_normal_body">楼&ensp;层&ensp;号:</label>
176
- <input type="text" class="input_search" v-model="model.f_floor"
177
- style="width: 60%" placeholder="请选择" condition="ua.f_floor='{}'">
178
- </div>
179
- <div class="form-group col-sm-4" >
180
- <label class="font_normal_body">开户起始:</label>
181
- <datepicker
182
- placeholder='请选择'
183
- style="width:60%"
184
- :disabled-days-of-week="[]"
185
- :format="'yyyy-MM-dd'"
186
- :show-rest-button="reset"
187
- :value.sync="model.f_startfile_time"
188
- v-model="model.f_startfile_time"
189
- condition="ui.f_createfile_date >= '{} 00:00:00'">
190
- </datepicker>
191
- </div>
192
- <div class="form-group col-sm-4" >
193
- <label class="font_normal_body">开户截止:</label>
194
- <datepicker
195
- placeholder='请选择'
196
- :disabled-days-of-week="[]"
197
- style="width:60%"
198
- :format="'yyyy-MM-dd'"
199
- :show-rest-button="reset"
200
- :value.sync="model.f_endfile_time"
201
- v-model="model.f_endfile_time"
202
- condition="ui.f_createfile_date <= '{} 23:59:59'">
203
- </datepicker>
204
- </div>
205
- <div class="form-group col-sm-4" >
206
- <label class="font_normal_body">表&ensp;箱&ensp;号:</label>
207
- <input type="text" class="input_search" v-model="model.f_metertitles"
208
- style="width: 60%" placeholder="请输入" condition="uf.f_metertitles='{}'">
209
- </div>
210
- <div class="form-group col-sm-4" >
211
- <label class="font_normal_body">用户电话:</label>
212
- <input type="text" class="input_search" v-model="model.f_user_phone"
213
- style="width: 60%" placeholder="请输入" condition="ui.f_user_phone='{}'">
214
- </div>
215
- <div class="form-group col-sm-4" >
216
- <label class="font_normal_body">片&ensp;&ensp;&ensp;&ensp;区:</label>
217
- <v-select
218
- class="select select_list"
219
- :value.sync="model.f_book_slice_area"
220
- v-model="model.f_book_slice_area"
221
- :options='$parent.$parent.sliceArea'
222
- @change="$parent.$parent.slice_areaChange(model.f_book_slice_area)"
223
- placeholder='请选择'
224
- condition="ua.f_slice_area ='{}'"
225
- close-on-select
226
- value-single
227
- >
228
- </v-select>
229
- </div>
230
- <div class="form-group col-sm-4" >
231
- <label class="font_normal_body">抄&ensp;表&ensp;册:</label>
232
- <v-select
233
- class="select select_list"
234
- :value.sync="model.f_meter_book_num"
235
- v-model="model.f_meter_book_num"
236
- :options='$parent.$parent.cbc'
237
- placeholder='请选择'
238
- condition="uf.f_meter_book_num='{}'"
239
- close-on-select
240
- value-single
241
- >
242
- </v-select>
243
- </div>
244
- <div class="form-group col-sm-4" >
245
- <label class="font_normal_body">派发情况:</label>
246
- <v-select
247
- class="select select_list"
248
- :value.sync="model.yearCheck"
249
- v-model="model.yearCheck"
250
- :options='$parent.$parent.yearCheckList'
251
- placeholder='请选择'
252
- condition="{}"
253
- :search="false"
254
- close-on-select
255
- value-single
256
- >
257
- </v-select>
258
- </div>
259
- <div class="form-group col-sm-4" >
260
- <label class="font_normal_body">安检起始:</label>
261
- <datepicker
262
- placeholder='请选择'
263
- style="width:60%"
264
- :disabled-days-of-week="[]"
265
- :format="'yyyy-MM-dd'"
266
- :show-rest-button="reset"
267
- :value.sync="model.f_start_time"
268
- v-model="model.f_start_time"
269
- >
270
- </datepicker>
271
- </div>
272
- <div class="form-group col-sm-4" >
273
- <label class="font_normal_body">安检截止:</label>
274
- <datepicker
275
- placeholder='请选择'
276
- :disabled-days-of-week="[]"
277
- style="width:60%"
278
- :format="'yyyy-MM-dd'"
279
- :show-rest-button="reset"
280
- :value.sync="model.f_end_time"
281
- v-model="model.f_end_time"
282
- >
283
- </datepicker>
284
- </div>
285
- <div class="form-group col-sm-4">
286
- <label class="font_normal_body">安检状态:</label>
287
- <v-select
288
- class="select select_list"
289
- :value.sync="model.f_last_check_state"
290
- v-model="model.f_last_check_state"
291
- :options='$parent.$parent.entry_status'
292
- placeholder='请选择'
293
- :search="false"
294
- close-on-select
295
- value-single
296
- >
297
- </v-select>
298
- </div>
299
- <div class="form-group col-sm-4" v-if="$parent.$parent.hasCheckBooks == '是'">
300
- <label class="font_normal_body">安检册:</label>
301
- <v-select
302
- class="select select_list"
303
- :value.sync="model.checkBook"
304
- v-model="model.checkBook"
305
- :options='$parent.$parent.checkBooks'
306
- placeholder='请选择'
307
- :search="false"
308
- close-on-select
309
- value-single
310
- >
311
- </v-select>
312
- </div>
313
- <div class="form-group col-sm-4" >
314
- <label class="font_normal_body">通气起始:</label>
315
- <datepicker
316
- placeholder='通气开始时间'
317
- style="width:60%"
318
- :disabled-days-of-week="[]"
319
- :format="'yyyy-MM-dd'"
320
- :show-rest-button="reset"
321
- :value.sync="model.f_startgas_time"
322
- v-model="model.f_startgas_time"
323
- condition="ui.f_uservent_date >= '{} 00:00:00'">
324
- </datepicker>
325
- </div>
326
- <div class="form-group col-sm-4" >
327
- <label class="font_normal_body">通气截止:</label>
328
- <datepicker
329
- placeholder='通气结束时间'
330
- :disabled-days-of-week="[]"
331
- style="width:60%"
332
- :format="'yyyy-MM-dd'"
333
- :show-rest-button="reset"
334
- :value.sync="model.f_endgas_time"
335
- v-model="model.f_endgas_time"
336
- condition="ui.f_uservent_date <= '{} 23:59:59'">
337
- </datepicker>
338
- </div>
339
- <div class="form-group col-sm-4" >
340
- <label class="font_normal_body">行政村/片区:</label>
341
- <v-select
342
- class="select select_list"
343
- :value.sync="model.f_community_name"
344
- v-model="model.f_community_name"
345
- :options='$parent.$parent.community'
346
- placeholder='请选择'
347
- condition="area.f_community='{}'"
348
- :search="false"
349
- close-on-select
350
- value-single
351
- >
352
- </v-select>
353
- </div>
354
- <div class="form-group col-sm-4" >
355
- <label class="font_normal_body">用户标签:</label>
356
- <v-select
357
- class="select select_list"
358
- :value.sync="model.f_user_tags"
359
- v-model="model.f_user_tags"
360
- :options='$parent.$parent.user_tags'
361
- placeholder='请选择'
362
- condition="ui.f_user_tags='{}'"
363
- :search="false"
364
- close-on-select
365
- value-single
366
- >
367
- </v-select>
368
- </div>
369
- <div class="form-group col-sm-4" >
370
- <label class="font_normal_body">用气类型:</label>
371
- <v-select
372
- class="select select_list"
373
- :value.sync="model.f_user_gas_type"
374
- v-model="model.f_user_gas_type"
375
- :options='$parent.$parent.user_gas_types'
376
- placeholder='请选择'
377
- condition="ui.f_user_gas_type='{}'"
378
- :search="false"
379
- close-on-select
380
- value-single
381
- >
382
- </v-select>
383
- </div>
384
- <!--<div class="form-group col-sm-4" >
385
- <label class="font_normal_body">入户情况:</label>
386
- <v-select
387
- class="select select_list"
388
- :value.sync="model.f_hasHousehold"
389
- v-model="model.f_hasHousehold"
390
- :options='$parent.$parent.hasHousehold'
391
- placeholder='请选择'
392
- close-on-select
393
- :search="false"
394
- value-single
395
- >
396
- </v-select>
397
- </div>-->
398
-
399
- </div>
400
- </div>
401
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
402
- <button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
403
- <button class="button_search" @click="$parent.$parent.cancel">取消</button>
404
- </div>
405
- </modal>
406
- <modal :show.sync="$parent.$parent.excelUserCondtion" width="500px" v-ref:modal1 >
407
- <div slot="modal-header" class="modal-header">
408
- <h4 class="modal-title">
409
- 导入用户编号
410
- </h4>
411
- </div>
412
- <div slot="modal-body" class="modal-body">
413
- <div class="row">
414
- <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
415
- action="rs/file/uploadFile" tagname="档案信息导入" v-ref:file :headers="headers" multiple></file-upload>
416
- <img src="../../../assets/Excelformat.png" style="width: 100%"/>
417
- </div>
418
- </div>
419
- <footer slot="modal-footer" class="modal-footer">
420
- </footer>
421
- </modal>
422
- <!--<div class="form-group col-sm-4 button-range" >
423
-
424
- <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
425
- <export-excel-safe :data="$parent.$parent.exportParameter"
426
- :field="$parent.$parent.excelHeaders"
427
- sqlurl="rs/logic/SafeExportExcel" sql-name="planItem"
428
- template-name='安检计划明细' :choose-col="true">
429
- </export-excel-safe>
430
-
431
- </div>-->
432
- </div>
433
- </div>
434
- </criteria>
435
- <data-grid :model="model" partial='list' class="table_sy">
436
-
437
- <template partial='head'>
438
- <tr>
439
- <th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
440
- <th><nobr>用户编号</nobr></th>
441
- <th><nobr>用户名称</nobr></th>
442
- <th><nobr>用户类型</nobr></th>
443
- <th><nobr>用户电话</nobr></th>
444
- <th><nobr>表具类型</nobr></th>
445
- <th><nobr>小区名称</nobr></th>
446
- <th><nobr>片区</nobr></th>
447
- <th><nobr>抄表册</nobr></th>
448
- <th title="当前所在的安检计划名称"><nobr>所属计划</nobr></th>
449
- <th title="最后一次安检日期"><nobr>安检日期</nobr></th>
450
- <th><nobr>详细地址</nobr></th>
451
- </tr>
452
- </template>
453
- <template partial='body'>
454
- <td style="text-align: center;white-space:nowrap;"><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)" /></td>
455
- <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
456
- <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
457
- <td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
458
- <td style="text-align: center"><nobr>{{row.f_user_phone}}</nobr></td>
459
- <td style="text-align: center"><nobr>{{row.f_meter_classify}}</nobr></td>
460
- <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
461
- <td style="text-align: center"><nobr>{{row.f_book_slice_area}}</nobr></td>
462
- <td style="text-align: center"><nobr>{{row.f_book_name}}</nobr></td>
463
- <td style="text-align: center"><nobr>{{row.f_plan_name}}</nobr></td>
464
- <td style="text-align: center"><nobr>{{row.f_last_check_date}}</nobr></td>
465
- <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
466
- </template>
467
- </data-grid>
468
- </criteria-paged>
469
- </div>
470
- </template>
471
-
472
- <script>
473
- import {HttpResetClass, PagedList} from "vue-client";
474
- import * as Util from "../../Util";
475
- import Vue from "vue";
476
-
477
- export default {
478
- name: "PlanManage",
479
- title: '计划管理',
480
- data() {
481
- return {
482
- model:new PagedList('/rs/sql/FetchUserFileByOrgNoRuHuSXQ', 100, {
483
- "orderitem": "'f_residential_area,f_building,f_unit,f_floor,f_room'",
484
- "f_usertype": "''",
485
- "month": "''",
486
- "SafeCheckSX": {"f_check_start": '', "f_check_end": ''},
487
- "SafeCheckCQ": "''",
488
- "startday":"''",
489
- "endday":"''"}),
490
- a:'1',
491
- opt:[{label:"测试",value:"测试"}],
492
- showCondtion:false,
493
- userTypes:[],//用户类型
494
- community:[],
495
- user_tags:this.$appdata.getParam('用户标签')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用户标签')]:[{label: '全部', value: ''}],
496
- user_gas_types:this.$appdata.getParam('用气类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]:[{label: '全部', value: ''}],
497
- userTags:[],
498
- userStates:[],//用户状态
499
- userGasType:[],//用气类型
500
- gasproperties:[],//用气性质
501
- meter_classifys:[],//气表类型
502
- hasHousehold:[{label:"全部",value:""},{label:"已入户",value:"已入户"},{label:"未入户",value:"未入户"}],
503
- yearCheckList:[{label:"全部",value:""},{label:"已在计划中",value:"ua.f_plan_id is not null"},{label:"未在计划中",value:"ua.f_plan_id is null"}],
504
- entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
505
- sliceArea:[],
506
- meterbooks:[],
507
- hasCheckBooks:'否',
508
- checkBooks:[],
509
- cbc:[],
510
- areaList:[],
511
- checkAll:false,
512
- checkes:[],
513
- excelUserCondtion:false,
514
- uploadCodeCondition:''
515
- }
516
- },
517
- props:["selectplan","userlogin"],
518
- ready(){
519
- this.$refs.paged.$refs.criteria.model.f_user_state='正常'
520
- this.hasCheckBooks=this.$appdata.getSingleValue('是否使用安检册')
521
- // this.$refs.paged.$refs.criteria.model.f_endfile_time=Util.toStartDateYearString()
522
- //this.$refs.paged.$refs.criteria.model.f_hasHousehold='未入户'
523
- this.getCheckBook()
524
- this.setConList()
525
- this.loadpage()
526
- this.getCommunity()
527
- },
528
- methods: {
529
- getCommunity(){
530
- this.community=[]
531
- new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
532
- data: {
533
- items: '*',
534
- tablename: 't_community',
535
- condition: `f_filialeid = '${this.userlogin.orgid}'`,
536
- orderitem: 'id desc'
537
- }
538
- }, {resolveMsg: null, rejectMsg: null}).then(res => {
539
- this.community.push({label: '全部', value: ''})
540
- res.data.forEach(ress => {
541
- this.community.push({
542
- label: ress.f_community_name,
543
- value: ress.f_community_name
544
- })
545
- })
546
- })
547
- },
548
- getCheckBook(){
549
- this.checkBooks=[]
550
- new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
551
- data: {
552
- items: 'id,f_check_book_name,f_check_book_type',
553
- tablename: 't_check_book',
554
- condition: `f_orgid = '${this.userlogin.orgid}'`,
555
- orderitem: 'id desc'
556
- }
557
- }, {resolveMsg: null, rejectMsg: null}).then(res => {
558
- this.checkBooks.push({label: '全部', value: ''})
559
- res.data.forEach(ress => {
560
- this.checkBooks.push({
561
- label: ress.f_check_book_name,
562
- value: `${ress.id}-${ress.f_check_book_type}`
563
- })
564
- })
565
- })
566
- },
567
- loadpage(){
568
- this.select_search()
569
- this.Mreadibook()
570
- this.getSliceArea()
571
- },
572
- cancel(){
573
- this.showCondtion=false
574
- this.excelUserCondtion=false
575
- },
576
- //清空用户编号
577
- clearUserInfoId(){
578
- this.uploadCodeCondition=''
579
- Vue.showMessage("已清空用户编号")
580
- },
581
- showUploadCodeCondition(){
582
- this.excelUserCondtion=true
583
- },
584
- selfSearch (args) {
585
- //tag)
586
- args.condition += ` and ui.f_filialeid='${this.userlogin.orgid}'`
587
- /*if(args.model.f_hasHousehold=='已入户'){
588
- args.condition +=` and Extract(year from TO_DATE(ua.f_last_check_date,'yyyy-mm-dd hh24:mi:ss'))=2021 and ua.F_LAST_CHECK_STATE='入户'`
589
- }else if(args.model.f_hasHousehold=='未入户'){
590
- args.condition +=` and (Extract(year from nvl(TO_DATE(ua.f_last_check_date,'yyyy-mm-dd hh24:mi:ss'),'1990-01-01 00:00:00'))!=2021 or nvl(ua.F_LAST_CHECK_STATE,'未入户')!='入户')`
591
- }*/
592
-
593
- if (args.model.f_last_check_state == '未检') {
594
- let nocheckcon = 'and ( ui.f_last_check_date is null '
595
- if(args.model.f_start_time){
596
- nocheckcon += ` or ui.f_last_check_date <='${args.model.f_start_time} 00:00:00' `
597
- }
598
- if(args.model.f_end_time){
599
- nocheckcon += ` or ui.f_last_check_date >='${args.model.f_end_time} 23:59:59' `
600
- }
601
- nocheckcon += ')'
602
- args.condition += nocheckcon
603
- }else{
604
- if(args.model.f_last_check_state){
605
- args.condition += ` and ui.f_last_check_state = '${args.model.f_last_check_state}'`
606
- }
607
- if(args.model.f_start_time){
608
- args.condition += ` and ui.f_last_check_date >='${args.model.f_start_time} 00:00:00' `
609
- }
610
- if(args.model.f_end_time){
611
- args.condition += ` and ui.f_last_check_date <='${args.model.f_end_time} 23:59:59' `
612
- }
613
- }
614
-
615
- if(args.model.checkBook){
616
- let arr=args.model.checkBook.split('-')
617
- if(arr[1] == '用户'){
618
- args.condition +=` and ua.f_check_book_id='${arr[0]}'`
619
- }else{
620
- args.condition +=` and area.f_check_book_id=${arr[0]} and ua.f_check_book_id is null`
621
- }
622
- }
623
- if(this.uploadCodeCondition){
624
- args.condition +=` and ${this.uploadCodeCondition}`
625
- }
626
- this.cancel()
627
- this.checkes=[]
628
- this.checkAll=false
629
- this.model.search(args.condition, args.model, args.condValue)
630
- },
631
- showUserCondition(){
632
- this.showCondtion=true
633
- },
634
- setConList(){
635
- this.userTypes=this.$appdata.getParam('用户类型') ? [{
636
- label: '全部',
637
- value: ''
638
- }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
639
- this.userTags=this.$appdata.getParam('安检用户标签') ? [...this.$appdata.getParam('安检用户标签')] : []
640
- this.userGasType=this.$appdata.getParam('用气类型') ? [...this.$appdata.getParam('用气类型')] : []
641
- this.userStates=this.$appdata.getParam('安检用户状态') ? [...this.$appdata.getParam('安检用户状态')] : []
642
- this.gasproperties=this.$appdata.getParam('用气性质') ? [{
643
- label: '全部',
644
- value: ''
645
- }, ...this.$appdata.getParam('用气性质')] : [{label: '全部', value: ''}]
646
- this.meter_classifys=this.$appdata.getParam('气表类型') ? [{
647
- label: '全部',
648
- value: ''
649
- }, ...this.$appdata.getParam('气表类型')] : [{label: '全部', value: ''}]
650
- },
651
- select_search(text){
652
- //tag
653
- let pcdText=text?` and f_residential_area like '%${text}%'`:''
654
- new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {data:{items:"*",tablename:"t_area",orderitem:"id",condition:`f_orgid = '${this.userlogin.orgid}' ${pcdText} `}}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
655
- //tag)
656
- if(res.data.length>0){
657
- this.areaList=[]
658
- this.areaList.push({label:"全部",value:""})
659
- res.data.forEach((result)=>{
660
- this.areaList.push({label:result.f_residential_area,value:result.f_residential_area})
661
- })
662
- }
663
- //tag)
664
- })
665
- },
666
- //获取抄表册
667
- async Mreadibook(){
668
- this.cbc=[]
669
- this.sliceArea=[]
670
- let http = new HttpResetClass()
671
- let getMeterReadingBooks = await http.load('POST','rs/logic/getMeterBooksData',
672
- {data: {f_orgid: "('"+this.userlogin.orgid+"')"}},
673
- {resolveMsg: null, rejectMsg: '获取失败!!!'})
674
- this.cbc = [{label: '全部', value: ''}]
675
- //tag
676
- //tag)
677
- //tag
678
- this.meterbooks=[]
679
- this.meterbooks=getMeterReadingBooks.data.meterbooks
680
- this.meterbooks.forEach((res) => {
681
- this.cbc.push({label: res.f_book_name, value: res.id})
682
- /*if(res.f_book_slice_area){
683
- if(this.sliceArea.indexOf(res.f_book_slice_area)<0){
684
- this.sliceArea.push(res.f_book_slice_area)
685
- }
686
- }*/
687
- })
688
-
689
- },
690
- //片区获取
691
- async getSliceArea() {
692
- let http = new HttpResetClass()
693
- let getAllArea = await http.load('POST', '/rs/search', {
694
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
695
- userid: this.userlogin.id
696
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
697
- this.sliceArea = [{label: '全部', value: ''}]
698
- //tag
699
- //tag
700
- //tag
701
- getAllArea.data.forEach((res) => {
702
- if(res.parentid==this.userlogin.orgid){
703
- this.sliceArea.push({label:res.name,value:res.name})
704
- }
705
- })
706
- //tag
707
- },
708
- //片区改变-对应抄表册下拉重新赋值
709
- slice_areaChange(value) {
710
- //tag
711
- if(!value){
712
- this.cbc=[]
713
- this.meterbooks.forEach((res) => {
714
- this.cbc.push({label: res.f_book_name, value: res.id})
715
- })
716
- }else{
717
- this.cbc=[]
718
- this.meterbooks.forEach((res) => {
719
- if(res.f_book_slice_area==value){
720
- this.cbc.push({label: res.f_book_name, value: res.id})
721
- }
722
- })
723
- }
724
- },
725
- isChecked(v) {
726
- // 如果全选,不在的按选中算,否则,在的按选中算
727
- if (this.checkAll) {
728
- return this.checkes.indexOf(v) == -1
729
- } else {
730
- return this.checkes.indexOf(v) != -1
731
- }
732
- },
733
- setCheckAll() {
734
- this.checkAll=this.checkAll?false:true;
735
- // 全选改变后,清空选中数据
736
- this.checkes = []
737
- },
738
- setCheckes(id) {
739
- let index=this.checkes.indexOf(id)
740
- if(index<0){
741
- this.checkes.push(id)
742
- }else{
743
- this.checkes.splice(index,1)
744
- }
745
- },
746
- //将客户信息拖至计划中
747
- async dragtoPlanItem() {
748
- if(this.model.rows.length==0){
749
- Vue.showMessage("未检测到列表中有用户!")
750
- return
751
- }
752
- if(!this.checkAll && this.checkes.length==0){
753
- Vue.showMessage("请先勾选你要添入到上方计划中的用户!")
754
- return
755
- }
756
- if(this.selectplan && this.selectplan.id){
757
- this.$parent.isSend=true
758
- try{
759
- let res=await new HttpResetClass().load("POST", "/rs/logic/AddCheckPlanItem", {
760
- data:{
761
- f_operator:this.userlogin.name,
762
- f_plan_id:this.selectplan.id,
763
- f_safecheck_type:this.selectplan.f_safecheck_type,
764
- f_filialeid:this.userlogin.orgid,
765
- f_subscribe_date:'',
766
- condition:this.model.condition,
767
- switchCheckAll:true,
768
- checkAll:this.checkAll,
769
- param:this.checkes,
770
- columnName: "ua.id"
771
- }
772
- }, {resolveMsg: null, rejectMsg: null})
773
- //tag+"---"+res.data.result.length)
774
- this.$parent.isSend=false
775
- if(res.data.code==200){
776
- //alert("添加成功!有"+res.data.result.length+"条用户地址已经存在于其他计划中: \n"+res.data.result.reduce((c,v)=>{c += v.f_user_name+":"+v.f_address+"\n"}),0)
777
- this.$showMessage("添加成功!"+(res.data.result.length>0?"有"+res.data.result.length+"条用户地址已经存在于其他计划中":""))
778
- this.$parent.refresh()
779
- }else{
780
- this.$showMessage("添加失败!")
781
- }
782
- }catch (e) {
783
- this.$showMessage("添加失败!")
784
- }
785
- }else{
786
- this.$parent.isSend=false
787
- this.$showMessage("请先打开一个计划再进行操作")
788
- }
789
- }
790
- },
791
- events: {
792
- onFileUpload: function (file, res) {
793
- //tag)
794
- //tag)
795
- let data = {
796
- filepath: res.f_downloadpath
797
- }
798
- new HttpResetClass().load('POST','/rs/logic/safe_GetUserInfoFromExcel', {data: data}, {
799
- resolveMsg: '导入成功!已生成条件,若要去除导入条件请点击旁边 ‘清空用户编号’ 按钮。',
800
- rejectMsg: '导入失败'
801
- }).then((res) => {
802
- this.uploadCodeCondition=res.data.condition
803
- this.excelUserCondtion = false
804
- })
805
- },
806
-
807
- }
808
- }
809
- </script>
810
-
811
- <style scoped>
812
- .safe-planfont{
813
- font-family: MicrosoftYaHei;
814
- font-size: 15px;
815
- font-weight: normal;
816
- font-stretch: normal;
817
- letter-spacing: 2px;
818
- color: #333333;
819
- line-height: 25px;
820
- }
821
- .safe-bodyfont{
822
- font-family: MicrosoftYaHei;
823
- font-size: 14px;
824
- font-weight: normal;
825
- font-stretch: normal;
826
- letter-spacing: 0px;
827
- color: #999999;
828
- line-height: 30px;
829
- }
830
- .safe-leftplan{
831
- height:auto;
832
- border-bottom:1px solid #ececec;
833
- padding: 10px 5px
834
- }
835
- .leftplan-center{
836
- border-top:1px solid #ececec;
837
- border-bottom:1px solid #ececec;
838
- }
839
- .safe_p{
840
- white-space: nowrap;
841
- overflow: hidden;
842
- text-overflow: ellipsis;
843
- }
844
- .safe-div-p{
845
- color: #4792de;
846
- text-align: end;
847
- padding: 8px 15px;
848
- }
849
- </style>
850
- <style lang="less">
851
- .upuserinfo_sel ul{
852
- width: 150% !important;
853
- }
854
- </style>
1
+ <template>
2
+ <div>
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <div partial>
6
+ <div class="row " >
7
+ <label class="form-group font_normal_body"><b>用户信息</b></label>
8
+
9
+ <div class="form-group col-sm-1" >
10
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
+ style="width: 95%" placeholder="客户编号" condition="ui.f_userinfo_code='{}'">
12
+ </div>
13
+ <div class="form-group col-sm-1" >
14
+ <input type="text" class="input_search" v-model="model.f_user_name"
15
+ style="width: 95%" placeholder="客户名称" condition="ui.f_user_name like '%{}%'">
16
+ </div>
17
+ <div class="form-group col-sm-1" >
18
+ <input type="text" class="input_search" v-model="model.f_address"
19
+ style="width: 95%" placeholder="客户地址" condition="ua.f_address like '%{}%'">
20
+ </div>
21
+ <div class="form-group col-sm-1 upuserinfo_sel" >
22
+ <v-select
23
+ class="select select_list"
24
+ :width="'95%'"
25
+ :value.sync="model.f_area"
26
+ v-model="model.f_area"
27
+ :options='$parent.$parent.areaList'
28
+ :timeout="500"
29
+ @select-search="$parent.$parent.select_search"
30
+ placeholder='小区选择'
31
+ condition="ua.f_residential_area = '{}'"
32
+ close-on-select
33
+ value-single
34
+ >
35
+ </v-select>
36
+ </div>
37
+ <div class="form-group col-sm-4" >
38
+ <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUserCondition()">更多条件</button>
39
+ <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUploadCodeCondition()">导入编号</button>
40
+ <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.clearUserInfoId()">清空编号</button>
41
+ <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
42
+ </div>
43
+ <div class="form-group col-sm-1" style="float: right">
44
+ <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.dragtoPlanItem()">添入计划</button>
45
+ </div>
46
+ <modal :show.sync="$parent.$parent.showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
47
+ <div slot="modal-header" class="modal-header">
48
+ <h4 class="modal-title">
49
+ 用户查询条件
50
+ </h4>
51
+ </div>
52
+ <div slot="modal-body" class="modal-body">
53
+ <div class="row">
54
+ <div class="form-group col-sm-4" >
55
+ <label class="font_normal_body">用户类型:</label>
56
+ <v-select
57
+ class="select select_list"
58
+ :value.sync="model.f_user_type"
59
+ v-model="model.f_user_type"
60
+ :options='$parent.$parent.userTypes'
61
+ placeholder='请选择'
62
+ condition="uf.f_user_type='{}'"
63
+ :search="false"
64
+ close-on-select
65
+ value-single
66
+ >
67
+ </v-select>
68
+ </div>
69
+ <div class="form-group col-sm-4" >
70
+ <label class="font_normal_body">用户标签:</label>
71
+ <v-select
72
+ class="select select_list"
73
+ :value.sync="model.f_user_tags"
74
+ v-model="model.f_user_tags"
75
+ :options='$parent.$parent.userTags'
76
+ placeholder='请选择'
77
+ condition="ui.f_user_tags='{}'"
78
+ :search="false"
79
+ close-on-select
80
+ value-single
81
+ >
82
+ </v-select>
83
+ </div>
84
+ <div class="form-group col-sm-4" >
85
+ <label class="font_normal_body">用气类型:</label>
86
+ <v-select
87
+ class="select select_list"
88
+ :value.sync="model.f_user_gas_type"
89
+ v-model="model.f_user_gas_type"
90
+ :options='$parent.$parent.userGasType'
91
+ placeholder='请选择'
92
+ condition="ui.f_user_gas_type='{}'"
93
+ :search="false"
94
+ close-on-select
95
+ value-single
96
+ >
97
+ </v-select>
98
+ </div>
99
+ <div class="form-group col-sm-4" >
100
+ <label class="font_normal_body">用户类型:</label>
101
+ <v-select
102
+ class="select select_list"
103
+ :value.sync="model.f_user_type"
104
+ v-model="model.f_user_type"
105
+ :options='$parent.$parent.userTypes'
106
+ placeholder='请选择'
107
+ condition="uf.f_user_type='{}'"
108
+ :search="false"
109
+ close-on-select
110
+ value-single
111
+ >
112
+ </v-select>
113
+ </div>
114
+ <div class="form-group col-sm-4" >
115
+ <label class="font_normal_body">用户状态:</label>
116
+ <v-select
117
+ class="select select_list"
118
+ :value.sync="model.f_user_state"
119
+ v-model="model.f_user_state"
120
+ :options='$parent.$parent.userStates'
121
+ placeholder='请选择'
122
+ condition="ui.f_user_state='{}'"
123
+ :search="false"
124
+ close-on-select
125
+ value-single
126
+ >
127
+ </v-select>
128
+ </div>
129
+ <div class="form-group col-sm-4" >
130
+ <label class="font_normal_body">用气性质:</label>
131
+ <v-select
132
+ class="select select_list"
133
+ :value.sync="model.f_gasproperties"
134
+ v-model="model.f_gasproperties"
135
+ :options='$parent.$parent.gasproperties'
136
+ placeholder='请选择'
137
+ condition="uf.f_gasproperties='{}'"
138
+ :search="false"
139
+ close-on-select
140
+ value-single
141
+ >
142
+ </v-select>
143
+ </div>
144
+ <div class="form-group col-sm-4" >
145
+ <label class="font_normal_body">气表类型:</label>
146
+ <v-select
147
+ class="select select_list"
148
+ :value.sync="model.meter_classify"
149
+ v-model="model.meter_classify"
150
+ :options='$parent.$parent.meter_classifys'
151
+ placeholder='请选择'
152
+ condition="uf.F_METER_CLASSIFY='{}'"
153
+ :search="false"
154
+ close-on-select
155
+ value-single
156
+ >
157
+ </v-select>
158
+ </div>
159
+ <!--<div class="form-group col-sm-4" >
160
+ <label class="font_normal_body">小区名称:</label>
161
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
162
+ style="width: 60%" placeholder="请选择" condition="ua.f_residential_area = '{}'">
163
+ </div>-->
164
+ <div class="form-group col-sm-4" >
165
+ <label class="font_normal_body">楼&ensp;栋&ensp;号:</label>
166
+ <input type="text" class="input_search" v-model="model.f_building"
167
+ style="width: 60%" placeholder="请选择" condition="ua.f_building='{}'">
168
+ </div>
169
+ <div class="form-group col-sm-4" >
170
+ <label class="font_normal_body">单&ensp;元&ensp;号:</label>
171
+ <input type="text" class="input_search" v-model="model.f_unit"
172
+ style="width: 60%" placeholder="请选择" condition="ua.f_unit='{}'">
173
+ </div>
174
+ <div class="form-group col-sm-4" >
175
+ <label class="font_normal_body">楼&ensp;层&ensp;号:</label>
176
+ <input type="text" class="input_search" v-model="model.f_floor"
177
+ style="width: 60%" placeholder="请选择" condition="ua.f_floor='{}'">
178
+ </div>
179
+ <div class="form-group col-sm-4" >
180
+ <label class="font_normal_body">开户起始:</label>
181
+ <datepicker
182
+ placeholder='请选择'
183
+ style="width:60%"
184
+ :disabled-days-of-week="[]"
185
+ :format="'yyyy-MM-dd'"
186
+ :show-rest-button="reset"
187
+ :value.sync="model.f_startfile_time"
188
+ v-model="model.f_startfile_time"
189
+ condition="ui.f_createfile_date >= '{} 00:00:00'">
190
+ </datepicker>
191
+ </div>
192
+ <div class="form-group col-sm-4" >
193
+ <label class="font_normal_body">开户截止:</label>
194
+ <datepicker
195
+ placeholder='请选择'
196
+ :disabled-days-of-week="[]"
197
+ style="width:60%"
198
+ :format="'yyyy-MM-dd'"
199
+ :show-rest-button="reset"
200
+ :value.sync="model.f_endfile_time"
201
+ v-model="model.f_endfile_time"
202
+ condition="ui.f_createfile_date <= '{} 23:59:59'">
203
+ </datepicker>
204
+ </div>
205
+ <div class="form-group col-sm-4" >
206
+ <label class="font_normal_body">表&ensp;箱&ensp;号:</label>
207
+ <input type="text" class="input_search" v-model="model.f_metertitles"
208
+ style="width: 60%" placeholder="请输入" condition="uf.f_metertitles='{}'">
209
+ </div>
210
+ <div class="form-group col-sm-4" >
211
+ <label class="font_normal_body">用户电话:</label>
212
+ <input type="text" class="input_search" v-model="model.f_user_phone"
213
+ style="width: 60%" placeholder="请输入" condition="ui.f_user_phone='{}'">
214
+ </div>
215
+ <div class="form-group col-sm-4" >
216
+ <label class="font_normal_body">片&ensp;&ensp;&ensp;&ensp;区:</label>
217
+ <v-select
218
+ class="select select_list"
219
+ :value.sync="model.f_book_slice_area"
220
+ v-model="model.f_book_slice_area"
221
+ :options='$parent.$parent.sliceArea'
222
+ @change="$parent.$parent.slice_areaChange(model.f_book_slice_area)"
223
+ placeholder='请选择'
224
+ condition="ua.f_slice_area ='{}'"
225
+ close-on-select
226
+ value-single
227
+ >
228
+ </v-select>
229
+ </div>
230
+ <div class="form-group col-sm-4" >
231
+ <label class="font_normal_body">抄&ensp;表&ensp;册:</label>
232
+ <v-select
233
+ class="select select_list"
234
+ :value.sync="model.f_meter_book_num"
235
+ v-model="model.f_meter_book_num"
236
+ :options='$parent.$parent.cbc'
237
+ placeholder='请选择'
238
+ condition="uf.f_meter_book_num='{}'"
239
+ close-on-select
240
+ value-single
241
+ >
242
+ </v-select>
243
+ </div>
244
+ <div class="form-group col-sm-4" >
245
+ <label class="font_normal_body">派发情况:</label>
246
+ <v-select
247
+ class="select select_list"
248
+ :value.sync="model.yearCheck"
249
+ v-model="model.yearCheck"
250
+ :options='$parent.$parent.yearCheckList'
251
+ placeholder='请选择'
252
+ condition="{}"
253
+ :search="false"
254
+ close-on-select
255
+ value-single
256
+ >
257
+ </v-select>
258
+ </div>
259
+ <div class="form-group col-sm-4" >
260
+ <label class="font_normal_body">安检起始:</label>
261
+ <datepicker
262
+ placeholder='请选择'
263
+ style="width:60%"
264
+ :disabled-days-of-week="[]"
265
+ :format="'yyyy-MM-dd'"
266
+ :show-rest-button="reset"
267
+ :value.sync="model.f_start_time"
268
+ v-model="model.f_start_time"
269
+ >
270
+ </datepicker>
271
+ </div>
272
+ <div class="form-group col-sm-4" >
273
+ <label class="font_normal_body">安检截止:</label>
274
+ <datepicker
275
+ placeholder='请选择'
276
+ :disabled-days-of-week="[]"
277
+ style="width:60%"
278
+ :format="'yyyy-MM-dd'"
279
+ :show-rest-button="reset"
280
+ :value.sync="model.f_end_time"
281
+ v-model="model.f_end_time"
282
+ >
283
+ </datepicker>
284
+ </div>
285
+ <div class="form-group col-sm-4">
286
+ <label class="font_normal_body">安检状态:</label>
287
+ <v-select
288
+ class="select select_list"
289
+ :value.sync="model.f_last_check_state"
290
+ v-model="model.f_last_check_state"
291
+ :options='$parent.$parent.entry_status'
292
+ placeholder='请选择'
293
+ :search="false"
294
+ close-on-select
295
+ value-single
296
+ >
297
+ </v-select>
298
+ </div>
299
+ <div class="form-group col-sm-4" v-if="$parent.$parent.hasCheckBooks == '是'">
300
+ <label class="font_normal_body">安检册:</label>
301
+ <v-select
302
+ class="select select_list"
303
+ :value.sync="model.checkBook"
304
+ v-model="model.checkBook"
305
+ :options='$parent.$parent.checkBooks'
306
+ placeholder='请选择'
307
+ :search="false"
308
+ close-on-select
309
+ value-single
310
+ >
311
+ </v-select>
312
+ </div>
313
+ <div class="form-group col-sm-4" >
314
+ <label class="font_normal_body">通气起始:</label>
315
+ <datepicker
316
+ placeholder='通气开始时间'
317
+ style="width:60%"
318
+ :disabled-days-of-week="[]"
319
+ :format="'yyyy-MM-dd'"
320
+ :show-rest-button="reset"
321
+ :value.sync="model.f_startgas_time"
322
+ v-model="model.f_startgas_time"
323
+ condition="ui.f_uservent_date >= '{} 00:00:00'">
324
+ </datepicker>
325
+ </div>
326
+ <div class="form-group col-sm-4" >
327
+ <label class="font_normal_body">通气截止:</label>
328
+ <datepicker
329
+ placeholder='通气结束时间'
330
+ :disabled-days-of-week="[]"
331
+ style="width:60%"
332
+ :format="'yyyy-MM-dd'"
333
+ :show-rest-button="reset"
334
+ :value.sync="model.f_endgas_time"
335
+ v-model="model.f_endgas_time"
336
+ condition="ui.f_uservent_date <= '{} 23:59:59'">
337
+ </datepicker>
338
+ </div>
339
+ <div class="form-group col-sm-4" >
340
+ <label class="font_normal_body">行政村/片区:</label>
341
+ <v-select
342
+ class="select select_list"
343
+ :value.sync="model.f_community_name"
344
+ v-model="model.f_community_name"
345
+ :options='$parent.$parent.community'
346
+ placeholder='请选择'
347
+ condition="area.f_community='{}'"
348
+ :search="false"
349
+ close-on-select
350
+ value-single
351
+ >
352
+ </v-select>
353
+ </div>
354
+ <div class="form-group col-sm-4" >
355
+ <label class="font_normal_body">用户标签:</label>
356
+ <v-select
357
+ class="select select_list"
358
+ :value.sync="model.f_user_tags"
359
+ v-model="model.f_user_tags"
360
+ :options='$parent.$parent.user_tags'
361
+ placeholder='请选择'
362
+ condition="ui.f_user_tags='{}'"
363
+ :search="false"
364
+ close-on-select
365
+ value-single
366
+ >
367
+ </v-select>
368
+ </div>
369
+ <div class="form-group col-sm-4" >
370
+ <label class="font_normal_body">用气类型:</label>
371
+ <v-select
372
+ class="select select_list"
373
+ :value.sync="model.f_user_gas_type"
374
+ v-model="model.f_user_gas_type"
375
+ :options='$parent.$parent.user_gas_types'
376
+ placeholder='请选择'
377
+ condition="ui.f_user_gas_type='{}'"
378
+ :search="false"
379
+ close-on-select
380
+ value-single
381
+ >
382
+ </v-select>
383
+ </div>
384
+ <!--<div class="form-group col-sm-4" >
385
+ <label class="font_normal_body">入户情况:</label>
386
+ <v-select
387
+ class="select select_list"
388
+ :value.sync="model.f_hasHousehold"
389
+ v-model="model.f_hasHousehold"
390
+ :options='$parent.$parent.hasHousehold'
391
+ placeholder='请选择'
392
+ close-on-select
393
+ :search="false"
394
+ value-single
395
+ >
396
+ </v-select>
397
+ </div>-->
398
+
399
+ </div>
400
+ </div>
401
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
402
+ <button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
403
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
404
+ </div>
405
+ </modal>
406
+ <modal :show.sync="$parent.$parent.excelUserCondtion" width="500px" v-ref:modal1 >
407
+ <div slot="modal-header" class="modal-header">
408
+ <h4 class="modal-title">
409
+ 导入用户编号
410
+ </h4>
411
+ </div>
412
+ <div slot="modal-body" class="modal-body">
413
+ <div class="row">
414
+ <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
415
+ action="rs/file/uploadFile" tagname="档案信息导入" v-ref:file :headers="headers" multiple></file-upload>
416
+ <img src="../../../assets/Excelformat.png" style="width: 100%"/>
417
+ </div>
418
+ </div>
419
+ <footer slot="modal-footer" class="modal-footer">
420
+ </footer>
421
+ </modal>
422
+ <!--<div class="form-group col-sm-4 button-range" >
423
+
424
+ <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
425
+ <export-excel-safe :data="$parent.$parent.exportParameter"
426
+ :field="$parent.$parent.excelHeaders"
427
+ sqlurl="rs/logic/SafeExportExcel" sql-name="planItem"
428
+ template-name='安检计划明细' :choose-col="true">
429
+ </export-excel-safe>
430
+
431
+ </div>-->
432
+ </div>
433
+ </div>
434
+ </criteria>
435
+ <data-grid :model="model" partial='list' class="table_sy">
436
+
437
+ <template partial='head'>
438
+ <tr>
439
+ <th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
440
+ <th><nobr>用户编号</nobr></th>
441
+ <th><nobr>用户名称</nobr></th>
442
+ <th><nobr>用户类型</nobr></th>
443
+ <th><nobr>用户电话</nobr></th>
444
+ <th><nobr>表具类型</nobr></th>
445
+ <th><nobr>小区名称</nobr></th>
446
+ <th><nobr>片区</nobr></th>
447
+ <th><nobr>抄表册</nobr></th>
448
+ <th title="当前所在的安检计划名称"><nobr>所属计划</nobr></th>
449
+ <th title="最后一次安检日期"><nobr>安检日期</nobr></th>
450
+ <th><nobr>详细地址</nobr></th>
451
+ </tr>
452
+ </template>
453
+ <template partial='body'>
454
+ <td style="text-align: center;white-space:nowrap;"><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)" /></td>
455
+ <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
456
+ <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
457
+ <td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
458
+ <td style="text-align: center"><nobr>{{row.f_user_phone}}</nobr></td>
459
+ <td style="text-align: center"><nobr>{{row.f_meter_classify}}</nobr></td>
460
+ <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
461
+ <td style="text-align: center"><nobr>{{row.f_book_slice_area}}</nobr></td>
462
+ <td style="text-align: center"><nobr>{{row.f_book_name}}</nobr></td>
463
+ <td style="text-align: center"><nobr>{{row.f_plan_name}}</nobr></td>
464
+ <td style="text-align: center"><nobr>{{row.f_last_check_date}}</nobr></td>
465
+ <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
466
+ </template>
467
+ </data-grid>
468
+ </criteria-paged>
469
+ </div>
470
+ </template>
471
+
472
+ <script>
473
+ import {HttpResetClass, PagedList} from "vue-client";
474
+ import * as Util from "../../Util";
475
+ import Vue from "vue";
476
+
477
+ export default {
478
+ name: "PlanManage",
479
+ title: '计划管理',
480
+ data() {
481
+ return {
482
+ model:new PagedList('/rs/sql/FetchUserFileByOrgNoRuHuSXQ', 100, {
483
+ "orderitem": "'f_residential_area,f_building,f_unit,f_floor,f_room'",
484
+ "f_usertype": "''",
485
+ "month": "''",
486
+ "SafeCheckSX": {"f_check_start": '', "f_check_end": ''},
487
+ "SafeCheckCQ": "''",
488
+ "startday":"''",
489
+ "endday":"''"}),
490
+ a:'1',
491
+ opt:[{label:"测试",value:"测试"}],
492
+ showCondtion:false,
493
+ userTypes:[],//用户类型
494
+ community:[],
495
+ user_tags:this.$appdata.getParam('用户标签')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用户标签')]:[{label: '全部', value: ''}],
496
+ user_gas_types:this.$appdata.getParam('用气类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]:[{label: '全部', value: ''}],
497
+ userTags:[],
498
+ userStates:[],//用户状态
499
+ userGasType:[],//用气类型
500
+ gasproperties:[],//用气性质
501
+ meter_classifys:[],//气表类型
502
+ hasHousehold:[{label:"全部",value:""},{label:"已入户",value:"已入户"},{label:"未入户",value:"未入户"}],
503
+ yearCheckList:[{label:"全部",value:""},{label:"已在计划中",value:"ua.f_plan_id is not null"},{label:"未在计划中",value:"ua.f_plan_id is null"}],
504
+ entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
505
+ sliceArea:[],
506
+ meterbooks:[],
507
+ hasCheckBooks:'否',
508
+ checkBooks:[],
509
+ cbc:[],
510
+ areaList:[],
511
+ checkAll:false,
512
+ checkes:[],
513
+ excelUserCondtion:false,
514
+ uploadCodeCondition:''
515
+ }
516
+ },
517
+ props:["selectplan","userlogin"],
518
+ ready(){
519
+ this.$refs.paged.$refs.criteria.model.f_user_state='正常'
520
+ this.hasCheckBooks=this.$appdata.getSingleValue('是否使用安检册')
521
+ // this.$refs.paged.$refs.criteria.model.f_endfile_time=Util.toStartDateYearString()
522
+ //this.$refs.paged.$refs.criteria.model.f_hasHousehold='未入户'
523
+ this.getCheckBook()
524
+ this.setConList()
525
+ this.loadpage()
526
+ this.getCommunity()
527
+ },
528
+ methods: {
529
+ getCommunity(){
530
+ this.community=[]
531
+ new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
532
+ data: {
533
+ items: '*',
534
+ tablename: 't_community',
535
+ condition: `f_filialeid = '${this.userlogin.orgid}'`,
536
+ orderitem: 'id desc'
537
+ }
538
+ }, {resolveMsg: null, rejectMsg: null}).then(res => {
539
+ this.community.push({label: '全部', value: ''})
540
+ res.data.forEach(ress => {
541
+ this.community.push({
542
+ label: ress.f_community_name,
543
+ value: ress.f_community_name
544
+ })
545
+ })
546
+ })
547
+ },
548
+ getCheckBook(){
549
+ this.checkBooks=[]
550
+ new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
551
+ data: {
552
+ items: 'id,f_check_book_name,f_check_book_type',
553
+ tablename: 't_check_book',
554
+ condition: `f_orgid = '${this.userlogin.orgid}'`,
555
+ orderitem: 'id desc'
556
+ }
557
+ }, {resolveMsg: null, rejectMsg: null}).then(res => {
558
+ this.checkBooks.push({label: '全部', value: ''})
559
+ res.data.forEach(ress => {
560
+ this.checkBooks.push({
561
+ label: ress.f_check_book_name,
562
+ value: `${ress.id}-${ress.f_check_book_type}`
563
+ })
564
+ })
565
+ })
566
+ },
567
+ loadpage(){
568
+ this.select_search()
569
+ this.Mreadibook()
570
+ this.getSliceArea()
571
+ },
572
+ cancel(){
573
+ this.showCondtion=false
574
+ this.excelUserCondtion=false
575
+ },
576
+ //清空用户编号
577
+ clearUserInfoId(){
578
+ this.uploadCodeCondition=''
579
+ Vue.showMessage("已清空用户编号")
580
+ },
581
+ showUploadCodeCondition(){
582
+ this.excelUserCondtion=true
583
+ },
584
+ selfSearch (args) {
585
+ //tag)
586
+ args.condition += ` and ui.f_filialeid='${this.userlogin.orgid}'`
587
+ /*if(args.model.f_hasHousehold=='已入户'){
588
+ args.condition +=` and Extract(year from TO_DATE(ua.f_last_check_date,'yyyy-mm-dd hh24:mi:ss'))=2021 and ua.F_LAST_CHECK_STATE='入户'`
589
+ }else if(args.model.f_hasHousehold=='未入户'){
590
+ args.condition +=` and (Extract(year from nvl(TO_DATE(ua.f_last_check_date,'yyyy-mm-dd hh24:mi:ss'),'1990-01-01 00:00:00'))!=2021 or nvl(ua.F_LAST_CHECK_STATE,'未入户')!='入户')`
591
+ }*/
592
+
593
+ if (args.model.f_last_check_state == '未检') {
594
+ let nocheckcon = 'and ( ui.f_last_check_date is null '
595
+ if(args.model.f_start_time){
596
+ nocheckcon += ` or ui.f_last_check_date <='${args.model.f_start_time} 00:00:00' `
597
+ }
598
+ if(args.model.f_end_time){
599
+ nocheckcon += ` or ui.f_last_check_date >='${args.model.f_end_time} 23:59:59' `
600
+ }
601
+ nocheckcon += ')'
602
+ args.condition += nocheckcon
603
+ }else{
604
+ if(args.model.f_last_check_state){
605
+ args.condition += ` and ui.f_last_check_state = '${args.model.f_last_check_state}'`
606
+ }
607
+ if(args.model.f_start_time){
608
+ args.condition += ` and ui.f_last_check_date >='${args.model.f_start_time} 00:00:00' `
609
+ }
610
+ if(args.model.f_end_time){
611
+ args.condition += ` and ui.f_last_check_date <='${args.model.f_end_time} 23:59:59' `
612
+ }
613
+ }
614
+
615
+ if(args.model.checkBook){
616
+ let arr=args.model.checkBook.split('-')
617
+ if(arr[1] == '用户'){
618
+ args.condition +=` and ua.f_check_book_id='${arr[0]}'`
619
+ }else{
620
+ args.condition +=` and area.f_check_book_id=${arr[0]} and ua.f_check_book_id is null`
621
+ }
622
+ }
623
+ if(this.uploadCodeCondition){
624
+ args.condition +=` and ${this.uploadCodeCondition}`
625
+ }
626
+ this.cancel()
627
+ this.checkes=[]
628
+ this.checkAll=false
629
+ this.model.search(args.condition, args.model, args.condValue)
630
+ },
631
+ showUserCondition(){
632
+ this.showCondtion=true
633
+ },
634
+ setConList(){
635
+ this.userTypes=this.$appdata.getParam('用户类型') ? [{
636
+ label: '全部',
637
+ value: ''
638
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
639
+ this.userTags=this.$appdata.getParam('安检用户标签') ? [...this.$appdata.getParam('安检用户标签')] : []
640
+ this.userGasType=this.$appdata.getParam('用气类型') ? [...this.$appdata.getParam('用气类型')] : []
641
+ this.userStates=this.$appdata.getParam('安检用户状态') ? [...this.$appdata.getParam('安检用户状态')] : []
642
+ this.gasproperties=this.$appdata.getParam('用气性质') ? [{
643
+ label: '全部',
644
+ value: ''
645
+ }, ...this.$appdata.getParam('用气性质')] : [{label: '全部', value: ''}]
646
+ this.meter_classifys=this.$appdata.getParam('气表类型') ? [{
647
+ label: '全部',
648
+ value: ''
649
+ }, ...this.$appdata.getParam('气表类型')] : [{label: '全部', value: ''}]
650
+ },
651
+ select_search(text){
652
+ //tag
653
+ let pcdText=text?` and f_residential_area like '%${text}%'`:''
654
+ new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {data:{items:"*",tablename:"t_area",orderitem:"id",condition:`f_orgid = '${this.userlogin.orgid}' ${pcdText} `}}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
655
+ //tag)
656
+ if(res.data.length>0){
657
+ this.areaList=[]
658
+ this.areaList.push({label:"全部",value:""})
659
+ res.data.forEach((result)=>{
660
+ this.areaList.push({label:result.f_residential_area,value:result.f_residential_area})
661
+ })
662
+ }
663
+ //tag)
664
+ })
665
+ },
666
+ //获取抄表册
667
+ async Mreadibook(){
668
+ this.cbc=[]
669
+ this.sliceArea=[]
670
+ let http = new HttpResetClass()
671
+ let getMeterReadingBooks = await http.load('POST','rs/logic/getMeterBooksData',
672
+ {data: {f_orgid: "('"+this.userlogin.orgid+"')"}},
673
+ {resolveMsg: null, rejectMsg: '获取失败!!!'})
674
+ this.cbc = [{label: '全部', value: ''}]
675
+ //tag
676
+ //tag)
677
+ //tag
678
+ this.meterbooks=[]
679
+ this.meterbooks=getMeterReadingBooks.data.meterbooks
680
+ this.meterbooks.forEach((res) => {
681
+ this.cbc.push({label: res.f_book_name, value: res.id})
682
+ /*if(res.f_book_slice_area){
683
+ if(this.sliceArea.indexOf(res.f_book_slice_area)<0){
684
+ this.sliceArea.push(res.f_book_slice_area)
685
+ }
686
+ }*/
687
+ })
688
+
689
+ },
690
+ //片区获取
691
+ async getSliceArea() {
692
+ let http = new HttpResetClass()
693
+ let getAllArea = await http.load('POST', '/rs/search', {
694
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
695
+ userid: this.userlogin.id
696
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
697
+ this.sliceArea = [{label: '全部', value: ''}]
698
+ //tag
699
+ //tag
700
+ //tag
701
+ getAllArea.data.forEach((res) => {
702
+ if(res.parentid==this.userlogin.orgid){
703
+ this.sliceArea.push({label:res.name,value:res.name})
704
+ }
705
+ })
706
+ //tag
707
+ },
708
+ //片区改变-对应抄表册下拉重新赋值
709
+ slice_areaChange(value) {
710
+ //tag
711
+ if(!value){
712
+ this.cbc=[]
713
+ this.meterbooks.forEach((res) => {
714
+ this.cbc.push({label: res.f_book_name, value: res.id})
715
+ })
716
+ }else{
717
+ this.cbc=[]
718
+ this.meterbooks.forEach((res) => {
719
+ if(res.f_book_slice_area==value){
720
+ this.cbc.push({label: res.f_book_name, value: res.id})
721
+ }
722
+ })
723
+ }
724
+ },
725
+ isChecked(v) {
726
+ // 如果全选,不在的按选中算,否则,在的按选中算
727
+ if (this.checkAll) {
728
+ return this.checkes.indexOf(v) == -1
729
+ } else {
730
+ return this.checkes.indexOf(v) != -1
731
+ }
732
+ },
733
+ setCheckAll() {
734
+ this.checkAll=this.checkAll?false:true;
735
+ // 全选改变后,清空选中数据
736
+ this.checkes = []
737
+ },
738
+ setCheckes(id) {
739
+ let index=this.checkes.indexOf(id)
740
+ if(index<0){
741
+ this.checkes.push(id)
742
+ }else{
743
+ this.checkes.splice(index,1)
744
+ }
745
+ },
746
+ //将客户信息拖至计划中
747
+ async dragtoPlanItem() {
748
+ if(this.model.rows.length==0){
749
+ Vue.showMessage("未检测到列表中有用户!")
750
+ return
751
+ }
752
+ if(!this.checkAll && this.checkes.length==0){
753
+ Vue.showMessage("请先勾选你要添入到上方计划中的用户!")
754
+ return
755
+ }
756
+ if(this.selectplan && this.selectplan.id){
757
+ this.$parent.isSend=true
758
+ try{
759
+ let res=await new HttpResetClass().load("POST", "/rs/logic/AddCheckPlanItem", {
760
+ data:{
761
+ f_operator:this.userlogin.name,
762
+ f_plan_id:this.selectplan.id,
763
+ f_safecheck_type:this.selectplan.f_safecheck_type,
764
+ f_filialeid:this.userlogin.orgid,
765
+ f_subscribe_date:'',
766
+ condition:this.model.condition,
767
+ switchCheckAll:true,
768
+ checkAll:this.checkAll,
769
+ param:this.checkes,
770
+ columnName: "ua.id"
771
+ }
772
+ }, {resolveMsg: null, rejectMsg: null})
773
+ //tag+"---"+res.data.result.length)
774
+ this.$parent.isSend=false
775
+ if(res.data.code==200){
776
+ //alert("添加成功!有"+res.data.result.length+"条用户地址已经存在于其他计划中: \n"+res.data.result.reduce((c,v)=>{c += v.f_user_name+":"+v.f_address+"\n"}),0)
777
+ this.$showMessage("添加成功!"+(res.data.result.length>0?"有"+res.data.result.length+"条用户地址已经存在于其他计划中":""))
778
+ this.$parent.refresh()
779
+ }else{
780
+ this.$showMessage("添加失败!")
781
+ }
782
+ }catch (e) {
783
+ this.$showMessage("添加失败!")
784
+ }
785
+ }else{
786
+ this.$parent.isSend=false
787
+ this.$showMessage("请先打开一个计划再进行操作")
788
+ }
789
+ }
790
+ },
791
+ events: {
792
+ onFileUpload: function (file, res) {
793
+ //tag)
794
+ //tag)
795
+ let data = {
796
+ filepath: res.f_downloadpath
797
+ }
798
+ new HttpResetClass().load('POST','/rs/logic/safe_GetUserInfoFromExcel', {data: data}, {
799
+ resolveMsg: '导入成功!已生成条件,若要去除导入条件请点击旁边 ‘清空用户编号’ 按钮。',
800
+ rejectMsg: '导入失败'
801
+ }).then((res) => {
802
+ this.uploadCodeCondition=res.data.condition
803
+ this.excelUserCondtion = false
804
+ })
805
+ },
806
+
807
+ }
808
+ }
809
+ </script>
810
+
811
+ <style scoped>
812
+ .safe-planfont{
813
+ font-family: MicrosoftYaHei;
814
+ font-size: 15px;
815
+ font-weight: normal;
816
+ font-stretch: normal;
817
+ letter-spacing: 2px;
818
+ color: #333333;
819
+ line-height: 25px;
820
+ }
821
+ .safe-bodyfont{
822
+ font-family: MicrosoftYaHei;
823
+ font-size: 14px;
824
+ font-weight: normal;
825
+ font-stretch: normal;
826
+ letter-spacing: 0px;
827
+ color: #999999;
828
+ line-height: 30px;
829
+ }
830
+ .safe-leftplan{
831
+ height:auto;
832
+ border-bottom:1px solid #ececec;
833
+ padding: 10px 5px
834
+ }
835
+ .leftplan-center{
836
+ border-top:1px solid #ececec;
837
+ border-bottom:1px solid #ececec;
838
+ }
839
+ .safe_p{
840
+ white-space: nowrap;
841
+ overflow: hidden;
842
+ text-overflow: ellipsis;
843
+ }
844
+ .safe-div-p{
845
+ color: #4792de;
846
+ text-align: end;
847
+ padding: 8px 15px;
848
+ }
849
+ </style>
850
+ <style lang="less">
851
+ .upuserinfo_sel ul{
852
+ width: 150% !important;
853
+ }
854
+ </style>