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.
@@ -196,20 +196,20 @@
196
196
  >
197
197
  </v-select>
198
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>-->
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
213
  <div class="form-group col-sm-4" >
214
214
  <label class="font_normal_body">派发情况:</label>
215
215
  <v-select
@@ -235,7 +235,7 @@
235
235
  :show-rest-button="reset"
236
236
  :value.sync="model.f_start_time"
237
237
  v-model="model.f_start_time"
238
- >
238
+ >
239
239
  </datepicker>
240
240
  </div>
241
241
  <div class="form-group col-sm-4" >
@@ -248,7 +248,7 @@
248
248
  :show-rest-button="reset"
249
249
  :value.sync="model.f_end_time"
250
250
  v-model="model.f_end_time"
251
- >
251
+ >
252
252
  </datepicker>
253
253
  </div>
254
254
  <div class="form-group col-sm-4">
@@ -265,7 +265,7 @@
265
265
  >
266
266
  </v-select>
267
267
  </div>
268
- <div class="form-group col-sm-4">
268
+ <div class="form-group col-sm-4" v-if="$parent.$parent.hasCheckBooks == '是'">
269
269
  <label class="font_normal_body">安检册:</label>
270
270
  <v-select
271
271
  class="select select_list"
@@ -396,383 +396,378 @@
396
396
  </template>
397
397
 
398
398
  <script>
399
- import {HttpResetClass, PagedList} from "vue-client";
400
- import * as Util from "../Util";
401
- import Vue from "vue";
399
+ import {HttpResetClass, PagedList} from "vue-client";
400
+ import * as Util from "../Util";
401
+ import Vue from "vue";
402
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()
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
+
449
+ },
450
+ methods: {
451
+ getCheckBook(){
452
+ this.checkBooks=[]
453
+ new HttpResetClass().load('POST', `/api/af-safecheck/sql/safe_singleTable_OrderBy`, {
454
+ data: {
455
+ items: 'id,f_check_book_name,f_check_book_type',
456
+ tablename: 't_check_book',
457
+ condition: `f_orgid = '${this.userlogin.orgid}'`,
458
+ orderitem: 'id desc'
454
459
  }
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
- })
460
+ }, {resolveMsg: null, rejectMsg: null}).then(res => {
461
+ this.checkBooks.push({label: '全部', value: ''})
462
+ res.data.forEach(ress => {
463
+ this.checkBooks.push({
464
+ label: ress.f_check_book_name,
465
+ value: `${ress.id}-${ress.f_check_book_type}`
472
466
  })
473
467
  })
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
- }*/
468
+ })
469
+ },
470
+ loadpage(){
471
+ this.select_search()
472
+ this.select_street()
473
+ this.Mreadibook()
474
+ this.getSliceArea()
475
+ },
476
+ cancel(){
477
+ this.showCondtion=false
478
+ this.excelUserCondtion=false
479
+ },
480
+ //清空用户编号
481
+ clearUserInfoId(){
482
+ this.uploadCodeCondition=''
483
+ Vue.showMessage("已清空用户编号")
484
+ },
485
+ showUploadCodeCondition(){
486
+ this.excelUserCondtion=true
487
+ },
488
+ selfSearch (args) {
489
+ //tag)
490
+ args.condition += ` and ui.f_filialeid='${this.userlogin.orgid}'`
491
+ /*if(args.model.f_hasHousehold=='已入户'){
492
+ 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='入户'`
493
+ }else if(args.model.f_hasHousehold=='未入户'){
494
+ 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,'未入户')!='入户')`
495
+ }*/
501
496
 
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
497
+ if (args.model.f_last_check_state == '未检') {
498
+ let nocheckcon = 'and ( ui.f_last_check_date is null '
499
+ if(args.model.f_start_time){
500
+ nocheckcon += ` or ui.f_last_check_date <='${args.model.f_start_time} 00:00:00' `
501
+ }
502
+ if(args.model.f_end_time){
503
+ nocheckcon += ` or ui.f_last_check_date >='${args.model.f_end_time} 23:59:59' `
504
+ }
505
+ nocheckcon += ')'
506
+ args.condition += nocheckcon
507
+ }else{
508
+ if(args.model.f_last_check_state){
509
+ args.condition += ` and ui.f_last_check_state = '${args.model.f_last_check_state}'`
510
+ }
511
+ if(args.model.f_start_time){
512
+ args.condition += ` and ui.f_last_check_date >='${args.model.f_start_time} 00:00:00' `
513
+ }
514
+ if(args.model.f_end_time){
515
+ args.condition += ` and ui.f_last_check_date <='${args.model.f_end_time} 23:59:59' `
516
+ }
517
+ }
518
+
519
+ if(args.model.checkBook){
520
+ let arr=args.model.checkBook.split('-')
521
+ if(arr[1] == '用户'){
522
+ args.condition +=` and ua.f_check_book_id='${arr[0]}'`
512
523
  }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
- }
524
+ args.condition +=` and area.f_check_book_id=${arr[0]} and ua.f_check_book_id is null`
522
525
  }
526
+ }
527
+ if(this.uploadCodeCondition){
528
+ args.condition +=` and ${this.uploadCodeCondition}`
529
+ }
530
+ this.cancel()
531
+ this.checkes=[]
532
+ this.checkAll=false
533
+ this.model.search(args.condition, args.model, args.condValue)
534
+ },
535
+ showUserCondition(){
536
+ this.showCondtion=true
537
+ },
538
+ setConList(){
539
+ this.userTypes=this.$appdata.getParam('用户类型') ? [{
540
+ label: '全部',
541
+ value: ''
542
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
523
543
 
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
- }
544
+ this.userStates=this.$appdata.getParam('安检用户状态') ? [{
545
+ label: '全部',
546
+ value: ''
547
+ },...this.$appdata.getParam('安检用户状态')] : [{label: '全部', value: ''}]
548
+ this.gasproperties=this.$appdata.getParam('用气性质') ? [{
549
+ label: '全部',
550
+ value: ''
551
+ }, ...this.$appdata.getParam('用气性质')] : [{label: '全部', value: ''}]
552
+ this.meter_classifys=this.$appdata.getParam('气表类型') ? [{
553
+ label: '全部',
554
+ value: ''
555
+ }, ...this.$appdata.getParam('气表类型')] : [{label: '全部', value: ''}]
556
+ },
557
+ select_search(text){
558
+ //tag
559
+ let pcdText=text?` and f_residential_area like '%${text}%'`:''
560
+ 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)=>{
561
+ //tag)
562
+ if(res.data.length>0){
563
+ this.areaList=[]
564
+ this.areaList.push({label:"全部",value:""})
565
+ res.data.forEach((result)=>{
566
+ this.areaList.push({label:result.f_residential_area,value:result.f_residential_area})
567
+ })
531
568
  }
532
- if(this.uploadCodeCondition){
533
- args.condition +=` and ${this.uploadCodeCondition}`
569
+ //tag)
570
+ })
571
+ },
572
+ select_street(){
573
+ //tag
574
+ 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)=>{
575
+ //tag)
576
+ if(res.data.length>0){
577
+ this.streets=[]
578
+ this.streets.push({label:"全部",value:""})
579
+ res.data.forEach((result)=>{
580
+ this.streets.push({label:result.f_street,value:result.id})
581
+ })
534
582
  }
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
- })
583
+ })
584
+ },
585
+ //获取抄表册
586
+ async Mreadibook(){
587
+ this.cbc=[]
588
+ this.sliceArea=[]
589
+ let http = new HttpResetClass()
590
+ let getMeterReadingBooks = await http.load('POST','api/af-safecheck/logic/getMeterBooksData',
591
+ {data: {f_orgid: "('"+this.userlogin.orgid+"')"}},
592
+ {resolveMsg: null, rejectMsg: '获取失败!!!'})
593
+ this.cbc = [{label: '全部', value: ''}]
594
+ //tag
595
+ //tag)
596
+ //tag
597
+ this.meterbooks=[]
598
+ this.meterbooks=getMeterReadingBooks.data.meterbooks
599
+ this.meterbooks.forEach((res) => {
600
+ this.cbc.push({label: res.f_book_name, value: res.id})
601
+ /*if(res.f_book_slice_area){
602
+ if(this.sliceArea.indexOf(res.f_book_slice_area)<0){
603
+ this.sliceArea.push(res.f_book_slice_area)
587
604
  }
588
- })
589
- },
590
- //获取抄表册
591
- async Mreadibook(){
605
+ }*/
606
+ })
607
+
608
+ },
609
+ //片区获取
610
+ async getSliceArea() {
611
+ let http = new HttpResetClass()
612
+ let getAllArea = await http.load('POST', '/rs/search', {
613
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
614
+ userid: this.userlogin.id
615
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
616
+ this.sliceArea = [{label: '全部', value: ''}]
617
+ //tag
618
+ //tag
619
+ //tag
620
+ getAllArea.data.forEach((res) => {
621
+ if(res.parentid==this.userlogin.orgid){
622
+ this.sliceArea.push({label:res.name,value:res.name})
623
+ }
624
+ })
625
+ //tag
626
+ },
627
+ //片区改变-对应抄表册下拉重新赋值
628
+ slice_areaChange(value) {
629
+ //tag
630
+ if(!value){
592
631
  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
632
  this.meterbooks.forEach((res) => {
605
633
  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
634
  })
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})
635
+ }else{
636
+ this.cbc=[]
637
+ this.meterbooks.forEach((res) => {
638
+ if(res.f_book_slice_area==value){
639
+ this.cbc.push({label: res.f_book_name, value: res.id})
628
640
  }
629
641
  })
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("添加失败!")
642
+ }
643
+ },
644
+ isChecked(v) {
645
+ // 如果全选,不在的按选中算,否则,在的按选中算
646
+ if (this.checkAll) {
647
+ return this.checkes.indexOf(v) == -1
648
+ } else {
649
+ return this.checkes.indexOf(v) != -1
650
+ }
651
+ },
652
+ setCheckAll() {
653
+ this.checkAll=this.checkAll?false:true;
654
+ // 全选改变后,清空选中数据
655
+ this.checkes = []
656
+ },
657
+ setCheckes(id) {
658
+ let index=this.checkes.indexOf(id)
659
+ if(index<0){
660
+ this.checkes.push(id)
661
+ }else{
662
+ this.checkes.splice(index,1)
663
+ }
664
+ },
665
+ //将客户信息拖至计划中
666
+ async dragtoPlanItem() {
667
+ if(this.model.rows.length==0){
668
+ Vue.showMessage("未检测到列表中有用户!")
669
+ return
670
+ }
671
+ if(!this.checkAll && this.checkes.length==0){
672
+ Vue.showMessage("请先勾选你要添入到上方计划中的用户!")
673
+ return
674
+ }
675
+ if(this.selectplan && this.selectplan.id){
676
+ this.$parent.isSend=true
677
+ try{
678
+ let res=await new HttpResetClass().load("POST", "/api/af-safecheck/logic/AddCheckPlanItem", {
679
+ data:{
680
+ f_operator:this.userlogin.name,
681
+ f_plan_id:this.selectplan.id,
682
+ f_safecheck_type:this.selectplan.f_safecheck_type,
683
+ f_filialeid:this.userlogin.orgid,
684
+ f_subscribe_date:'',
685
+ condition:this.model.condition,
686
+ switchCheckAll:true,
687
+ checkAll:this.checkAll,
688
+ param:this.checkes,
689
+ columnName: "ua.id"
705
690
  }
706
- }catch (e) {
691
+ }, {resolveMsg: null, rejectMsg: null})
692
+ //tag+"---"+res.data.result.length)
693
+ this.$parent.isSend=false
694
+ if(res.data.code==200){
695
+ //alert("添加成功!有"+res.data.result.length+"条用户地址已经存在于其他计划中: \n"+res.data.result.reduce((c,v)=>{c += v.f_user_name+":"+v.f_address+"\n"}),0)
696
+ this.$showMessage("添加成功!"+(res.data.result.length>0?"有"+res.data.result.length+"条用户地址已经存在于其他计划中":""))
697
+ this.$parent.refresh()
698
+ }else{
707
699
  this.$showMessage("添加失败!")
708
700
  }
709
- }else{
710
- this.$parent.isSend=false
711
- this.$showMessage("请先打开一个计划再进行操作")
701
+ }catch (e) {
702
+ this.$showMessage("添加失败!")
712
703
  }
704
+ }else{
705
+ this.$parent.isSend=false
706
+ this.$showMessage("请先打开一个计划再进行操作")
707
+ }
708
+ }
709
+ },
710
+ events: {
711
+ onFileUpload: function (file, res) {
712
+ //tag)
713
+ //tag)
714
+ let data = {
715
+ filepath: res.f_downloadpath
713
716
  }
717
+ new HttpResetClass().load('POST','/api/af-safecheck/logic/safe_GetUserInfoFromExcel', {data: data}, {
718
+ resolveMsg: '导入成功!已生成条件,若要去除导入条件请点击旁边 ‘清空用户编号’ 按钮。',
719
+ rejectMsg: '导入失败'
720
+ }).then((res) => {
721
+ this.uploadCodeCondition=res.data.condition
722
+ this.excelUserCondtion = false
723
+ })
714
724
  },
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
725
 
731
- }
732
726
  }
727
+ }
733
728
  </script>
734
729
 
735
730
  <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
- }
731
+ .safe-planfont{
732
+ font-family: MicrosoftYaHei;
733
+ font-size: 15px;
734
+ font-weight: normal;
735
+ font-stretch: normal;
736
+ letter-spacing: 2px;
737
+ color: #333333;
738
+ line-height: 25px;
739
+ }
740
+ .safe-bodyfont{
741
+ font-family: MicrosoftYaHei;
742
+ font-size: 14px;
743
+ font-weight: normal;
744
+ font-stretch: normal;
745
+ letter-spacing: 0px;
746
+ color: #999999;
747
+ line-height: 30px;
748
+ }
749
+ .safe-leftplan{
750
+ height:auto;
751
+ border-bottom:1px solid #ececec;
752
+ padding: 10px 5px
753
+ }
754
+ .leftplan-center{
755
+ border-top:1px solid #ececec;
756
+ border-bottom:1px solid #ececec;
757
+ }
758
+ .safe_p{
759
+ white-space: nowrap;
760
+ overflow: hidden;
761
+ text-overflow: ellipsis;
762
+ }
763
+ .safe-div-p{
764
+ color: #4792de;
765
+ text-align: end;
766
+ padding: 8px 15px;
767
+ }
773
768
  </style>
774
769
  <style lang="less">
775
- .upuserinfo_sel ul{
776
- width: 150% !important;
777
- }
770
+ .upuserinfo_sel ul{
771
+ width: 150% !important;
772
+ }
778
773
  </style>