safecheck-client 4.0.2-62 → 4.0.2-63

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