safecheck-client 4.0.0-66 → 4.0.0-68

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