safecheck-client 4.0.0-117 → 4.0.0-118

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