safecheck-client 3.0.30-7 → 3.0.30-71

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.
Files changed (79) hide show
  1. package/examples/SafePlan-liaoyuan/App.vue +3 -1
  2. package/package.json +4 -3
  3. package/src/components/Util.js +15 -0
  4. package/src/components/android/AddPlanItem.vue +5 -2
  5. package/src/components/android/AreaPlan.vue +2 -2
  6. package/src/components/android/CurrentCreate.vue +3 -2
  7. package/src/components/android/CurrentCreate_new.vue +563 -559
  8. package/src/components/android/PhoneotherInfo.vue +132 -132
  9. package/src/components/android/SafecheckOrderV.vue +2 -2
  10. package/src/components/android/UploadPage.vue +13 -123
  11. package/src/components/paper/PlanChooser.vue +8 -6
  12. package/src/components/pc/Edit.vue +126 -0
  13. package/src/components/pc/LodopFuncs.js +159 -0
  14. package/src/components/pc/NewCheckpaper.vue +9 -5
  15. package/src/components/pc/PaperEdit.vue +151 -0
  16. package/src/components/pc/PrintData.vue +243 -0
  17. package/src/components/pc/PrintTable.vue +241 -0
  18. package/src/components/pc/SelectCheckPlanAndNoPLan.vue +281 -278
  19. package/src/components/querycheckpaper/CheckSearchUser.vue +1067 -1067
  20. package/src/components/report/NoCheckplanSafecheck.vue +0 -2
  21. package/src/filiale/bayan/android/SafecheckDevices.vue +1303 -1303
  22. package/src/filiale/bayan/android/SafecheckOrderV.vue +2850 -2850
  23. package/src/filiale/bayan/android/SafecheckUserInfo.vue +806 -806
  24. package/src/filiale/fugou/android/AddPlanItem.vue +413 -0
  25. package/src/filiale/fugou/android.js +10 -0
  26. package/src/filiale/hanzhong/android/PaperFeedback.vue +1477 -1477
  27. package/src/filiale/hanzhong/android/SafecheckDevices.vue +1313 -1294
  28. package/src/filiale/hanzhong/android/SafecheckOrderV.vue +2683 -2683
  29. package/src/filiale/hanzhong/android.js +16 -16
  30. package/src/filiale/hanzhong/pc/NewCheckpaper.vue +1923 -0
  31. package/src/filiale/hanzhong/pc.js +4 -1
  32. package/src/filiale/huatong/android/CurrentCreate.vue +564 -564
  33. package/src/filiale/huatong/android/SafecheckOrderV.vue +8 -0
  34. package/src/filiale/jingyang/android/PhoneUpUserinfo.vue +34 -34
  35. package/src/filiale/jingyang/pc/PaperList.vue +1 -2
  36. package/src/filiale/kelai/android/AddPlanItem.vue +488 -0
  37. package/src/filiale/kelai/android.js +1 -0
  38. package/src/filiale/pingxiang/pc/DefectPaperNew.vue +1 -1
  39. package/src/filiale/qianneng/android/PaperFeedback.vue +40 -0
  40. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +6 -0
  41. package/src/filiale/tianke/pc/checkScreen.vue +781 -781
  42. package/src/filiale/tianke/pc/cq.jpg +0 -0
  43. package/src/filiale/tianke/pc/qy.jpg +0 -0
  44. package/src/filiale/tongchuan/android/SafecheckDevices.vue +1 -0
  45. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1095 -1090
  46. package/src/filiale/wensu/android/AndroidDefectDeal.vue +321 -366
  47. package/src/filiale/wensu/android/AndroidDefectDealItems.vue +480 -0
  48. package/src/filiale/wensu/android.js +1 -0
  49. package/src/filiale/wensu/pc/CheckSearchUser.vue +64 -0
  50. package/src/filiale/wensu/pc/DefectPaperNew.vue +16 -10
  51. package/src/filiale/wensu/pc/NewCheckpaper.vue +1936 -0
  52. package/src/filiale/wensu/pc/RoleSelector.vue +4 -1
  53. package/src/filiale/wensu/pc/checkUserList.vue +50 -0
  54. package/src/filiale/wensu/pc.js +2 -1
  55. package/src/filiale/wenxi/pc/DefectPaper.vue +1 -1
  56. package/src/filiale/wuhai/android/SafecheckOrderV.vue +2069 -2041
  57. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +20 -0
  58. package/src/filiale/yangchunboneng/pc/CheckBookDetails.vue +19 -0
  59. package/src/filiale/yongzhou/pc/CheckSearchUser.vue +1092 -0
  60. package/src/filiale/yongzhou/pc/LodopFuncs.js +159 -0
  61. package/src/filiale/yongzhou/pc/NoCheckplanSafecheck.vue +252 -0
  62. package/src/filiale/yongzhou/pc/PaperList.vue +798 -0
  63. package/src/filiale/yongzhou/pc/PrintData.vue +243 -0
  64. package/src/filiale/yongzhou/pc/PrintTable.vue +241 -0
  65. package/src/filiale/yongzhou/pc/communityDetail.vue +35 -12
  66. package/src/filiale/yongzhou/pc/communityTypeDetailG.vue +28 -14
  67. package/src/filiale/yongzhou/pc/communityTypeDetailM.vue +28 -14
  68. package/src/filiale/yongzhou/pc/safeDetail.vue +43 -15
  69. package/src/filiale/yongzhou/pc/safeStatistics.vue +16 -6
  70. package/src/filiale/yongzhou/pc/safeStatisticsDay.vue +88 -29
  71. package/src/filiale/yongzhou/pc/safeStatisticsMonth.vue +63 -27
  72. package/src/filiale/yongzhou/pc/safeStatisticsYear.vue +16 -6
  73. package/src/filiale/yongzhou/pc/safeTable.vue +10 -2
  74. package/src/filiale/yongzhou/pc.js +17 -12
  75. package/src/filiale/zhongsheng/android/CurrentCreate.vue +540 -536
  76. package/src/filiale/zhongsheng/android/SafecheckUserInfo.vue +151 -53
  77. package/src/filiale/zhongsheng/pc/NewCheckpaper.vue +14 -0
  78. package/src/safecheck-android.js +290 -290
  79. package/src/safecheck.js +12 -0
@@ -1,62 +1,62 @@
1
1
  <style scoped>
2
- .bg {
3
- background-color: blue;
4
- height: 1px;
5
- border: 0;
6
- }
7
- .app-row {
8
- background-color: white;
9
- padding: 10px 10px 0 10px;
10
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
11
- }
12
- .search_input {
13
- border: 0;
14
- outline: none;
15
- }
16
- .font{
17
- font: 15px PingFang-SC-Medium;
18
- color: #666666;
19
- }
20
- .input-font{
21
- font: 15px PingFang-SC-Medium;
22
- color: #333333;
23
- }
24
- .btn-font{
25
- font:600 16px PingFang-SC-Bold;
26
- color: #499EDF;
27
- }
28
- .btn-color{
29
- background-color: #FFFFFF;
30
- border-radius: 10px ;
31
- border: 1px solid #499EDF;
32
- }
33
- .app-text {
34
- font-size: 12px;
35
- }
36
- .panel-self{
37
- border-radius: 10px;
38
- border:1px solid #499EDF;
39
- background-color: #F8F8F8;
40
- }
41
- .yybtn-color{
42
- background-color:#499edf;
43
- border-radius: 4px ;
44
- border: 1px solid #499EDF;
45
- color: #FFFFFF;
46
- font: 14px PingFang-SC-Bold;
47
- }
48
- .qxbtn-color{
49
- background-color: #FFFFFF;
50
- border-radius: 4px ;
51
- color: #499edf;
52
- font: 14px PingFang-SC-Bold;
53
- border: 1px solid #499EDF;
54
- }
55
-
56
- .button_shrink_top {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_top.png")}
57
- .button_shrink_bottom {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_bottom.png")}
58
- .button_shrink_left {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_left.png")}
59
- .button_shrink_right {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_right.png")}
2
+ .bg {
3
+ background-color: blue;
4
+ height: 1px;
5
+ border: 0;
6
+ }
7
+ .app-row {
8
+ background-color: white;
9
+ padding: 10px 10px 0 10px;
10
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
11
+ }
12
+ .search_input {
13
+ border: 0;
14
+ outline: none;
15
+ }
16
+ .font{
17
+ font: 15px PingFang-SC-Medium;
18
+ color: #666666;
19
+ }
20
+ .input-font{
21
+ font: 15px PingFang-SC-Medium;
22
+ color: #333333;
23
+ }
24
+ .btn-font{
25
+ font:600 16px PingFang-SC-Bold;
26
+ color: #499EDF;
27
+ }
28
+ .btn-color{
29
+ background-color: #FFFFFF;
30
+ border-radius: 10px ;
31
+ border: 1px solid #499EDF;
32
+ }
33
+ .app-text {
34
+ font-size: 12px;
35
+ }
36
+ .panel-self{
37
+ border-radius: 10px;
38
+ border:1px solid #499EDF;
39
+ background-color: #F8F8F8;
40
+ }
41
+ .yybtn-color{
42
+ background-color:#499edf;
43
+ border-radius: 4px ;
44
+ border: 1px solid #499EDF;
45
+ color: #FFFFFF;
46
+ font: 14px PingFang-SC-Bold;
47
+ }
48
+ .qxbtn-color{
49
+ background-color: #FFFFFF;
50
+ border-radius: 4px ;
51
+ color: #499edf;
52
+ font: 14px PingFang-SC-Bold;
53
+ border: 1px solid #499EDF;
54
+ }
55
+
56
+ .button_shrink_top {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_top.png")}
57
+ .button_shrink_bottom {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_bottom.png")}
58
+ .button_shrink_left {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_left.png")}
59
+ .button_shrink_right {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_right.png")}
60
60
  </style>
61
61
 
62
62
  <template>
@@ -322,6 +322,10 @@
322
322
  <p class="panel-title col-xs-5 text-left font"><b>安检状态:</b></p>
323
323
  <p class="panel-title col-xs-7 text-left input-font">{{ row.f_state == '已检'?'临时保存':row.f_state }}</p>
324
324
  </div>
325
+ <div class="col-xs-6">
326
+ <p class="panel-title col-xs-5 text-left font"><b>到访不遇次数:</b></p>
327
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_check_version || 0 }}</p>
328
+ </div>
325
329
  <div class="col-xs-6">
326
330
  <p class="panel-title col-xs-5 text-left font"><b>上传状态:</b></p>
327
331
  <p class="panel-title col-xs-7 text-left input-font">{{ row.f_upload_state }}</p>
@@ -475,516 +479,516 @@
475
479
  </template>
476
480
 
477
481
  <script>
478
- import LocalPagedList from '../../../plugins/LocalPagedList'
479
- import Vue from 'vue'
480
- import { PagedList,HttpResetClass } from 'vue-client'
481
- import * as Util from '../../Util'
482
- import co from 'co'
483
- let select = function * (self) {
484
- let http = new HttpResetClass()
485
- http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
486
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
487
- userid: Vue.user.id
488
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
489
- //tag
490
- self.checkers.push({label:'全部',value:''})
491
- res.data.forEach((checker)=>{
492
- self.checkers.push({label:checker.name,value:checker.id})
482
+ import LocalPagedList from '../../../plugins/LocalPagedList'
483
+ import Vue from 'vue'
484
+ import { PagedList,HttpResetClass } from 'vue-client'
485
+ import * as Util from '../../Util'
486
+ import co from 'co'
487
+ let select = function * (self) {
488
+ let http = new HttpResetClass()
489
+ http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
490
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
491
+ userid: Vue.user.id
492
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
493
+ //tag
494
+ self.checkers.push({label:'全部',value:''})
495
+ res.data.forEach((checker)=>{
496
+ self.checkers.push({label:checker.name,value:checker.id})
497
+ })
493
498
  })
494
- })
495
- }
496
- export default {
497
- title: '无计划安检查询',
498
- data() {
499
- return {
500
- f_filialeids:'('+Vue.user.orgid+')',
501
- //f_filialeids:'(305)',
502
- planparam:[],
503
- check:'',
504
- plan:'',
505
- planid:'',
506
- model:Vue.android? new LocalPagedList('androidGetuserinfo',20,{condition:'this.condition'}): new PagedList( 'AndroidRest/rs/sql/androidGetuserinfo',20,{condition:'this.condition'}),
507
- showModal: false,
508
- showModal2:false,
509
- showModal3:false,
510
- needid:'',
511
- criteriaShow: false,
512
- planoption:[],
513
- condition:'',
514
- checkers:[],
515
- param: null,
516
- f_preset_dt : Util.to3339TimeString(),
517
- flow_direction:[
518
- {label: '请选择挂表方式', value: ''},
519
- {label: '左表', value: '左表'},
520
- {label: '右表', value: '右表'}
521
- ],
522
- check_states: [
523
- {label: '请选择安检状态', value: ''},
524
- {label: '未检', value: '未检'},
525
- {label: '临时保存', value: '已检'},
526
- ],
527
- last_check_states: [
528
- {label: '请选择上次安检状态', value: ''},
529
- {label: '入户', value: '入户'},
530
- {label: '拒检', value: '拒检'},
531
- {label: '到访不遇', value: '到访不遇'},
532
- {label: '未使用天然气', value: '未使用天然气'}
533
- ],
534
- upload_states: [
535
- {label: '请选择上传状态', value: ''},
536
- {label: '未传', value: '未传'},
537
- {label: '已传', value: '已传'}
538
- ],
539
- user_types: [
540
- {label: '请选择用户类型', value: ''},
541
- {label: '民用', value: '民用'},
542
- {label: '非民用', value: '非民用'},
543
- ],
544
- verify_state: [
545
- {label: '请选择审核状态', value: ''},
546
- {label: '未审核', value: '未审核'},
547
- {label: '打回', value: '打回'}
548
- ],
549
- residentialAreaOptions: [],
550
- buildOptions: [],
551
- unitOptions: [],
552
- planNameOptions: [],
553
- upcomingCount: 0,
554
- doneCount: 0,
555
- tempSaveCount: 0,
556
- allPlanCount: 0
557
- }
558
- },
559
- ready(){
560
- this.getAllArea()
561
- this.getAllPlanName()
562
- this.selfSearch()
563
- let gen = select(this)
564
- co(gen)
565
- },
566
- mounted(){
567
- //tag
568
- if (window.history && window.history.pushState) {
569
- history.pushState(null, null, document.URL);
570
- window.addEventListener('popstate', this.fun, false);//false阻止默认事件
571
- }
572
- },
573
- destroyed(){
574
- //tag
575
- window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
576
- },
577
- methods: {
578
- scan(){
579
- HostApp.__this__=this,
580
- HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
499
+ }
500
+ export default {
501
+ title: '无计划安检查询',
502
+ data() {
503
+ return {
504
+ f_filialeids:'('+Vue.user.orgid+')',
505
+ //f_filialeids:'(305)',
506
+ planparam:[],
507
+ check:'',
508
+ plan:'',
509
+ planid:'',
510
+ model:Vue.android? new LocalPagedList('androidGetuserinfo',20,{condition:'this.condition'}): new PagedList( 'AndroidRest/rs/sql/androidGetuserinfo',20,{condition:'this.condition'}),
511
+ showModal: false,
512
+ showModal2:false,
513
+ showModal3:false,
514
+ needid:'',
515
+ criteriaShow: false,
516
+ planoption:[],
517
+ condition:'',
518
+ checkers:[],
519
+ param: null,
520
+ f_preset_dt : Util.to3339TimeString(),
521
+ flow_direction:[
522
+ {label: '请选择挂表方式', value: ''},
523
+ {label: '左表', value: '左表'},
524
+ {label: '右表', value: '右表'}
525
+ ],
526
+ check_states: [
527
+ {label: '请选择安检状态', value: ''},
528
+ {label: '未检', value: '未检'},
529
+ {label: '临时保存', value: '已检'},
530
+ ],
531
+ last_check_states: [
532
+ {label: '请选择上次安检状态', value: ''},
533
+ {label: '入户', value: '入户'},
534
+ {label: '拒检', value: '拒检'},
535
+ {label: '到访不遇', value: '到访不遇'},
536
+ {label: '未使用天然气', value: '未使用天然气'}
537
+ ],
538
+ upload_states: [
539
+ {label: '请选择上传状态', value: ''},
540
+ {label: '未传', value: '未传'},
541
+ {label: '已传', value: '已传'}
542
+ ],
543
+ user_types: [
544
+ {label: '请选择用户类型', value: ''},
545
+ {label: '民用', value: '民用'},
546
+ {label: '非民用', value: '非民用'},
547
+ ],
548
+ verify_state: [
549
+ {label: '请选择审核状态', value: ''},
550
+ {label: '未审核', value: '未审核'},
551
+ {label: '打回', value: '打回'}
552
+ ],
553
+ residentialAreaOptions: [],
554
+ buildOptions: [],
555
+ unitOptions: [],
556
+ planNameOptions: [],
557
+ upcomingCount: 0,
558
+ doneCount: 0,
559
+ tempSaveCount: 0,
560
+ allPlanCount: 0
561
+ }
581
562
  },
582
- getCode(){
583
- const datapa = HostApp.getCode().data;
584
- //tag
585
- this.$refs.paged.$refs.cri.model.f_meter_no = datapa
586
-
563
+ ready(){
564
+ this.getAllArea()
565
+ this.getAllPlanName()
566
+ this.selfSearch()
567
+ let gen = select(this)
568
+ co(gen)
587
569
  },
588
- fun () {
589
- //tag
570
+ mounted(){
590
571
  //tag
572
+ if (window.history && window.history.pushState) {
573
+ history.pushState(null, null, document.URL);
574
+ window.addEventListener('popstate', this.fun, false);//false阻止默认事件
575
+ }
591
576
  },
592
- iscancel(){
593
- this.showModal2=false
594
- this.showModal3=false
595
- this.planoption=[]
596
- },
597
- timeSet(val){
598
- return val
577
+ destroyed(){
578
+ //tag
579
+ window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
599
580
  },
600
- async isok(){
601
- if(this.planoption.length==0){
602
- this.$showMessage("请选择计划")
603
- return false
604
- }
605
- for (let i = 0; i <this.planoption.length ; i++) {
606
- if (this.planoption[i]["selected"]==true){
607
- this.planid=this.planoption[i].value
608
- break
581
+ methods: {
582
+ scan(){
583
+ HostApp.__this__=this,
584
+ HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
585
+ },
586
+ getCode(){
587
+ const datapa = HostApp.getCode().data;
588
+ //tag
589
+ this.$refs.paged.$refs.cri.model.f_meter_no = datapa
590
+
591
+ },
592
+ fun () {
593
+ //tag
594
+ //tag
595
+ },
596
+ iscancel(){
597
+ this.showModal2=false
598
+ this.showModal3=false
599
+ this.planoption=[]
600
+ },
601
+ timeSet(val){
602
+ return val
603
+ },
604
+ async isok(){
605
+ if(this.planoption.length==0){
606
+ this.$showMessage("请选择计划")
607
+ return false
609
608
  }
610
- }
611
- if(this.planid==''){
612
- this.$showMessage("请选择计划")
613
- return false
614
- }
615
- await this.okput()
616
- },
617
- async manyisok(){
618
- if(this.planoption.length==0){
619
- this.$showMessage("请选择计划")
620
- return false
621
- }
622
- for (let i = 0; i <this.planoption.length ; i++) {
623
- if (this.planoption[i]["selected"]==true){
624
- this.planid=this.planoption[i].value
625
- break
609
+ for (let i = 0; i <this.planoption.length ; i++) {
610
+ if (this.planoption[i]["selected"]==true){
611
+ this.planid=this.planoption[i].value
612
+ break
613
+ }
626
614
  }
627
- }
628
- if(this.planid==''){
629
- this.$showMessage("请选择计划")
630
- return false
631
- }
632
- await this.manyokput()
633
- },
634
- changenull(){
635
- this.showModal2=false
636
- this.showModal3=false
637
- this.planoption=[]
638
- this.plan=''
639
- this.check=''
640
- },
641
- async okput(){
642
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
643
-
644
- condition:`i.id='`+this.needid+`'`,
645
- f_plan_id:this.planid,
646
- switchCheckAll:false,
647
- checkAll:false,
648
- f_operator:Vue.user.name
615
+ if(this.planid==''){
616
+ this.$showMessage("请选择计划")
617
+ return false
649
618
  }
650
- })
651
- await this.changenull()
652
- await this.getNewOrder()
653
- },
654
- async manyokput(){
655
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
656
- columnName:"i.id",
657
- condition:"1=1",
658
- f_plan_id:this.planid,
659
- switchCheckAll:true,
660
- param:this.planparam,
661
- checkAll:false,
662
- f_operator:Vue.user.name
619
+ await this.okput()
620
+ },
621
+ async manyisok(){
622
+ if(this.planoption.length==0){
623
+ this.$showMessage("请选择计划")
624
+ return false
663
625
  }
664
- })
665
- await this.changenull()
666
- await this.getNewOrder()
667
- },
668
- async plansearch(){
669
- this.planoption=[]
670
- let condition=`f_checker_id=`+this.check+` and f_plan_name like '%`+this.plan+`%'`
671
- if (!this.check){
672
- condition=`f_plan_name like '%`+this.plan+`%'`
673
- }
674
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {data:{
675
- condition:condition,
676
- f_filialeids:this.f_filialeids,
677
- groupitem:'',
678
- orderitem:'id'
679
- }})
680
- let resoult=res.data
681
- for (let i = 0; i < resoult.length; i++) {
682
- this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
683
- }
684
- },
685
-
686
- select(row, idx) {
687
- this.$set('planoption[' + idx + '].selected', true)
688
- for (let i = 0; i <this.planoption.length ; i++) {
689
- if (i!=idx){
690
- this.planoption[i]["selected"]=false
626
+ for (let i = 0; i <this.planoption.length ; i++) {
627
+ if (this.planoption[i]["selected"]==true){
628
+ this.planid=this.planoption[i].value
629
+ break
630
+ }
691
631
  }
692
- }
693
- },
694
- planclose(){
695
- this.showModal2=false
696
- this.showModal3=false
697
- },
698
- queryplan(val){
699
- this.needid=val
700
- this.showModal2 = true
701
- },
702
- queryplanmany(){
632
+ if(this.planid==''){
633
+ this.$showMessage("请选择计划")
634
+ return false
635
+ }
636
+ await this.manyokput()
637
+ },
638
+ changenull(){
639
+ this.showModal2=false
640
+ this.showModal3=false
641
+ this.planoption=[]
642
+ this.plan=''
643
+ this.check=''
644
+ },
645
+ async okput(){
646
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
647
+
648
+ condition:`i.id='`+this.needid+`'`,
649
+ f_plan_id:this.planid,
650
+ switchCheckAll:false,
651
+ checkAll:false,
652
+ f_operator:Vue.user.name
653
+ }
654
+ })
655
+ await this.changenull()
656
+ await this.getNewOrder()
657
+ },
658
+ async manyokput(){
659
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
660
+ columnName:"i.id",
661
+ condition:"1=1",
662
+ f_plan_id:this.planid,
663
+ switchCheckAll:true,
664
+ param:this.planparam,
665
+ checkAll:false,
666
+ f_operator:Vue.user.name
667
+ }
668
+ })
669
+ await this.changenull()
670
+ await this.getNewOrder()
671
+ },
672
+ async plansearch(){
673
+ this.planoption=[]
674
+ let condition=`f_checker_id=`+this.check+` and f_plan_name like '%`+this.plan+`%'`
675
+ if (!this.check){
676
+ condition=`f_plan_name like '%`+this.plan+`%'`
677
+ }
678
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {data:{
679
+ condition:condition,
680
+ f_filialeids:this.f_filialeids,
681
+ groupitem:'',
682
+ orderitem:'id'
683
+ }})
684
+ let resoult=res.data
685
+ for (let i = 0; i < resoult.length; i++) {
686
+ this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
687
+ }
688
+ },
703
689
 
704
- this.showModal3 = true
705
- },
706
- reload(){
707
- // this.getAllArea()
708
- // this.getAllPlanName()
709
- this.selfSearch()
710
- },
711
- cancelReserve (idx, id) {
712
- if(Vue.android){
713
- let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
714
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
715
- if (res.code == 200) {
716
- this.$showMessage("取消预约成功")
690
+ select(row, idx) {
691
+ this.$set('planoption[' + idx + '].selected', true)
692
+ for (let i = 0; i <this.planoption.length ; i++) {
693
+ if (i!=idx){
694
+ this.planoption[i]["selected"]=false
695
+ }
717
696
  }
718
- }else {
719
- this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
697
+ },
698
+ planclose(){
699
+ this.showModal2=false
700
+ this.showModal3=false
701
+ },
702
+ queryplan(val){
703
+ this.needid=val
704
+ this.showModal2 = true
705
+ },
706
+ queryplanmany(){
707
+
708
+ this.showModal3 = true
709
+ },
710
+ reload(){
711
+ // this.getAllArea()
712
+ // this.getAllPlanName()
713
+ this.selfSearch()
714
+ },
715
+ cancelReserve (idx, id) {
716
+ if(Vue.android){
717
+ let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
720
718
  this.$set('model.rows[' + idx + '].f_prearranged_date', null)
721
- if (repanse.data.code == 200) {
722
- alert("取消预约成功!")
719
+ if (res.code == 200) {
720
+ this.$showMessage("取消预约成功")
721
+ }
722
+ }else {
723
+ this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
724
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
725
+ if (repanse.data.code == 200) {
726
+ alert("取消预约成功!")
727
+ }
728
+ })
729
+ }},
730
+ genuineReserve () {
731
+ if(Vue.android){
732
+ if (!this.f_preset_dt) {
733
+ this.$showMessage('请选择一个日期')
734
+ return
735
+ }
736
+ let pdt = this.f_preset_dt.replace('T', ' ')
737
+ let respanse = this.$androidUtil.bzLogic('BookingCheck', {id: this.model.rows[this.param].id, dt: pdt})
738
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
739
+ if(respanse.code == 200) {
740
+ this.$showMessage("预约成功!")
741
+ }
742
+ this.showModal = false
743
+ }else {
744
+ if (!this.f_preset_dt) {
745
+ alert('请选择一个日期')
746
+ return
723
747
  }
748
+ let pdt = this.f_preset_dt.replace('T', ' ')
749
+ this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: pdt}).then((res) => {
750
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
751
+ if(res.data.code == 200) {
752
+ alert("预约成功!")
753
+ }
754
+ this.showModal = false
755
+ })
756
+ }
757
+ },
758
+ inspect(row) {
759
+ var _this = this
760
+ //tag
761
+ if (row.f_upload_state == '未传' || (row.f_upload_state == '已传' && row.f_state == '未检' && row.f_no_checkplan != '无计划安检' ) ) {
762
+ _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
763
+ //tag)
764
+ row['f_plan_meters'] = response.data
765
+ var pardate = {
766
+ _this:_this,
767
+ title:'安全检查',
768
+ safe:true
769
+ }
770
+ _this.$dispatch('gotoson',pardate)
771
+ //tag
772
+ _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self', _this.reload)
773
+ }).catch ((msg)=>{
774
+ this.$showMessage("网络异常,请检查网络后再试!")
775
+ })
776
+ }else{
777
+ this.$showMessage("该安检单已被上传!")
778
+ }
779
+ },
780
+ makeAPhoneCall(phoneNumber) {
781
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
782
+ },
783
+ reserve (idx) {
784
+ this.param = idx
785
+ this.showModal = true
786
+ },
787
+ search(args) {
788
+ this.model.rows = []
789
+ this.model.search(args.condition, args.model)
790
+ },
791
+ selfSearch () {
792
+ this.getPlanCount()
793
+ let condition = ""
794
+ if(this.$refs.paged.$refs.cri.model.f_residential_area)
795
+ condition += " and ti.f_residential_area like '%"+this.$refs.paged.$refs.cri.model.f_residential_area+"%'"
796
+ if(this.$refs.paged.$refs.cri.model.f_building)
797
+ condition += " and ti.f_building like '%"+this.$refs.paged.$refs.cri.model.f_building+"%'"
798
+ if(this.$refs.paged.$refs.cri.model.f_unit)
799
+ condition += " and ti.f_unit like '%"+this.$refs.paged.$refs.cri.model.f_unit+"%'"
800
+ if(this.$refs.paged.$refs.cri.model.f_plan_name)
801
+ condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
802
+ // if(this.$refs.paged.$refs.cri.model.f_plan_year)
803
+ // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
804
+ // if(this.$refs.paged.$refs.cri.model.f_plan_month)
805
+ // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
806
+ if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
807
+ condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
808
+ if(this.$refs.paged.$refs.cri.model.f_keyword)
809
+ condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
810
+ if(this.$refs.paged.$refs.cri.model.f_user_name)
811
+ condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
812
+ if(this.$refs.paged.$refs.cri.model.f_state[0])
813
+ condition += " and ti.f_state='"+this.$refs.paged.$refs.cri.model.f_state[0]+"'"
814
+ // if(this.$refs.paged.$refs.cri.model.f_last_state[0])
815
+ // condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
816
+ if(this.$refs.paged.$refs.cri.model.f_user_type[0])
817
+ condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
818
+ if(this.$refs.paged.$refs.cri.model.f_meter_no)
819
+ condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
820
+ if(this.$refs.paged.$refs.cri.model.f_metercard_id)
821
+ condition += " and tm.f_card_id like '%"+this.$refs.paged.$refs.cri.model.f_metercard_id+"%'"
822
+ if(this.$refs.paged.$refs.cri.model.f_enter_number)
823
+ condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
824
+
825
+ //tag
826
+ this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成') or (f_state = '未检')) and ti.f_no_checkplan = '有计划安检'" + condition)
827
+ },
828
+ getNewOrder(){
829
+ HostApp.__this__ = this
830
+ HostApp.logicWithHint({
831
+ // logic别名,key必须为logic
832
+ 'logic': 'SafeCheckServiceTimeOut',
833
+ // 回调执行方法名,key必须为callback
834
+ 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
835
+ // logic执行需要的业务参数
836
+ 'data': {params: ''},
837
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
838
+ // 执行回调方法传入key为backresult
839
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
840
+ 'backresult': 1
724
841
  })
725
- }},
726
- genuineReserve () {
727
- if(Vue.android){
728
- if (!this.f_preset_dt) {
729
- this.$showMessage('请选择一个日期')
842
+ },
843
+ getNewOrderCallBack() {
844
+ this.selfSearch()
845
+ this.getAllArea()
846
+ this.getAllPlanName()
847
+ },
848
+ hidden() {
849
+ this.criteriaShow = !this.criteriaShow
850
+ },
851
+ getAllArea(){
852
+ this.residentialAreaOptions = []
853
+ this.buildOptions = []
854
+ this.unitOptions = []
855
+ this.$refs.paged.$refs.cri.model.f_residential_area = ''
856
+ this.$refs.paged.$refs.cri.model.f_building = ''
857
+ this.$refs.paged.$refs.cri.model.f_unit = ''
858
+ let criteria = {
859
+ items: 'f_residential_area',
860
+ tablename: 't_check_plan_item',
861
+ condition: `f_residential_area IS NOT NULL AND f_residential_area != '' AND f_state <> '已检'`,
862
+ groupitem: 'f_residential_area'
863
+ }
864
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
865
+ //tag)
866
+ if(result.code == 200){
867
+ result.data.rows.forEach(item => this.residentialAreaOptions.push({label:item.f_residential_area,value:item.f_residential_area}))
868
+ }
869
+ //tag)
870
+ },
871
+ getbuilds(f_residential_area){
872
+ //tag)
873
+ this.buildOptions = []
874
+ this.unitOptions = []
875
+ this.$refs.paged.$refs.cri.model.f_building = ''
876
+ this.$refs.paged.$refs.cri.model.f_unit = ''
877
+ if(!f_residential_area){
730
878
  return
731
879
  }
732
- let pdt = this.f_preset_dt.replace('T', ' ')
733
- let respanse = this.$androidUtil.bzLogic('BookingCheck', {id: this.model.rows[this.param].id, dt: pdt})
734
- this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
735
- if(respanse.code == 200) {
736
- this.$showMessage("预约成功!")
880
+ let criteria = {
881
+ items: 'f_building',
882
+ tablename: 't_check_plan_item',
883
+ condition: `f_building IS NOT NULL AND f_building != '' AND f_state <> '已检' AND f_residential_area = '${f_residential_area}'`,
884
+ groupitem: 'f_building'
885
+ }
886
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
887
+ if(result.code == 200){
888
+ result.data.rows.forEach(item => this.buildOptions.push({label:item.f_building,value:item.f_building}))
737
889
  }
738
- this.showModal = false
739
- }else {
740
- if (!this.f_preset_dt) {
741
- alert('请选择一个日期')
890
+ //tag)
891
+ },
892
+ getUnits(f_building){
893
+ f_building = f_building[0]
894
+ //tag)
895
+ this.unitOptions = []
896
+ this.$refs.paged.$refs.cri.model.f_unit = ''
897
+ if(!f_building){
742
898
  return
743
899
  }
744
- let pdt = this.f_preset_dt.replace('T', ' ')
745
- this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: pdt}).then((res) => {
746
- this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
747
- if(res.data.code == 200) {
748
- alert("预约成功!")
900
+ let criteria = {
901
+ items: 'f_unit',
902
+ tablename: 't_check_plan_item',
903
+ condition: `f_unit IS NOT NULL AND f_unit != '' AND f_state <> '已检' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
904
+ groupitem: 'f_unit'
905
+ }
906
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
907
+ if(result.code == 200){
908
+ result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
909
+ }
910
+ //tag)
911
+ },
912
+ getPlanCount(){
913
+ this.upcomingCount = 0
914
+ this.tempSaveCount = 0
915
+ this.doneCount = 0
916
+ this.allPlanCount = 0
917
+ let criteria = {
918
+ items: 'count(id) count',
919
+ tablename: 't_check_plan_item',
920
+ condition: `f_state = '未检'`,
921
+ groupitem: 'f_state'
922
+ }
923
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
924
+ if(result.code && result.code == 200){
925
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
926
+ this.upcomingCount = result.data.rows[0].count
749
927
  }
750
- this.showModal = false
751
- })
752
- }
753
- },
754
- inspect(row) {
755
- var _this = this
756
- //tag
757
- if (row.f_upload_state == '未传' || (row.f_upload_state == '已传' && row.f_state == '未检' && row.f_no_checkplan != '无计划安检' ) ) {
758
- _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
759
- //tag)
760
- row['f_plan_meters'] = response.data
761
- var pardate = {
762
- _this:_this,
763
- title:'安全检查',
764
- safe:true
928
+ }
929
+ criteria = {
930
+ items: 'count(id) count',
931
+ tablename: 't_check_plan_item',
932
+ condition: `(f_complete = '' or f_complete = null or f_complete = '未完成') AND f_state = '已检'`,
933
+ groupitem: 'f_state'
934
+ }
935
+ result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
936
+ if(result.code && result.code == 200){
937
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
938
+ this.tempSaveCount = result.data.rows[0].count
765
939
  }
766
- _this.$dispatch('gotoson',pardate)
767
- //tag
768
- _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self', _this.reload)
769
- }).catch ((msg)=>{
770
- this.$showMessage("网络异常,请检查网络后再试!")
771
- })
772
- }else{
773
- this.$showMessage("该安检单已被上传!")
774
- }
775
- },
776
- makeAPhoneCall(phoneNumber) {
777
- this.$androidUtil.makeAPhoneCall(phoneNumber)
778
- },
779
- reserve (idx) {
780
- this.param = idx
781
- this.showModal = true
782
- },
783
- search(args) {
784
- this.model.rows = []
785
- this.model.search(args.condition, args.model)
786
- },
787
- selfSearch () {
788
- this.getPlanCount()
789
- let condition = ""
790
- if(this.$refs.paged.$refs.cri.model.f_residential_area)
791
- condition += " and ti.f_residential_area like '%"+this.$refs.paged.$refs.cri.model.f_residential_area+"%'"
792
- if(this.$refs.paged.$refs.cri.model.f_building)
793
- condition += " and ti.f_building like '%"+this.$refs.paged.$refs.cri.model.f_building+"%'"
794
- if(this.$refs.paged.$refs.cri.model.f_unit)
795
- condition += " and ti.f_unit like '%"+this.$refs.paged.$refs.cri.model.f_unit+"%'"
796
- if(this.$refs.paged.$refs.cri.model.f_plan_name)
797
- condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
798
- // if(this.$refs.paged.$refs.cri.model.f_plan_year)
799
- // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
800
- // if(this.$refs.paged.$refs.cri.model.f_plan_month)
801
- // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
802
- if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
803
- condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
804
- if(this.$refs.paged.$refs.cri.model.f_keyword)
805
- condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
806
- if(this.$refs.paged.$refs.cri.model.f_user_name)
807
- condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
808
- if(this.$refs.paged.$refs.cri.model.f_state[0])
809
- condition += " and ti.f_state='"+this.$refs.paged.$refs.cri.model.f_state[0]+"'"
810
- // if(this.$refs.paged.$refs.cri.model.f_last_state[0])
811
- // condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
812
- if(this.$refs.paged.$refs.cri.model.f_user_type[0])
813
- condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
814
- if(this.$refs.paged.$refs.cri.model.f_meter_no)
815
- condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
816
- if(this.$refs.paged.$refs.cri.model.f_metercard_id)
817
- condition += " and tm.f_card_id like '%"+this.$refs.paged.$refs.cri.model.f_metercard_id+"%'"
818
- if(this.$refs.paged.$refs.cri.model.f_enter_number)
819
- condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
820
-
821
- //tag
822
- this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成') or (f_state = '未检')) and ti.f_no_checkplan = '有计划安检'" + condition)
823
- },
824
- getNewOrder(){
825
- HostApp.__this__ = this
826
- HostApp.logicWithHint({
827
- // logic别名,key必须为logic
828
- 'logic': 'SafeCheckServiceTimeOut',
829
- // 回调执行方法名,key必须为callback
830
- 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
831
- // logic执行需要的业务参数
832
- 'data': {params: ''},
833
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
834
- // 执行回调方法传入key为backresult
835
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
836
- 'backresult': 1
837
- })
838
- },
839
- getNewOrderCallBack() {
840
- this.selfSearch()
841
- this.getAllArea()
842
- this.getAllPlanName()
843
- },
844
- hidden() {
845
- this.criteriaShow = !this.criteriaShow
846
- },
847
- getAllArea(){
848
- this.residentialAreaOptions = []
849
- this.buildOptions = []
850
- this.unitOptions = []
851
- this.$refs.paged.$refs.cri.model.f_residential_area = ''
852
- this.$refs.paged.$refs.cri.model.f_building = ''
853
- this.$refs.paged.$refs.cri.model.f_unit = ''
854
- let criteria = {
855
- items: 'f_residential_area',
856
- tablename: 't_check_plan_item',
857
- condition: `f_residential_area IS NOT NULL AND f_residential_area != '' AND f_state <> '已检'`,
858
- groupitem: 'f_residential_area'
859
- }
860
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
861
- //tag)
862
- if(result.code == 200){
863
- result.data.rows.forEach(item => this.residentialAreaOptions.push({label:item.f_residential_area,value:item.f_residential_area}))
864
- }
865
- //tag)
866
- },
867
- getbuilds(f_residential_area){
868
- //tag)
869
- this.buildOptions = []
870
- this.unitOptions = []
871
- this.$refs.paged.$refs.cri.model.f_building = ''
872
- this.$refs.paged.$refs.cri.model.f_unit = ''
873
- if(!f_residential_area){
874
- return
875
- }
876
- let criteria = {
877
- items: 'f_building',
878
- tablename: 't_check_plan_item',
879
- condition: `f_building IS NOT NULL AND f_building != '' AND f_state <> '已检' AND f_residential_area = '${f_residential_area}'`,
880
- groupitem: 'f_building'
881
- }
882
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
883
- if(result.code == 200){
884
- result.data.rows.forEach(item => this.buildOptions.push({label:item.f_building,value:item.f_building}))
885
- }
886
- //tag)
887
- },
888
- getUnits(f_building){
889
- f_building = f_building[0]
890
- //tag)
891
- this.unitOptions = []
892
- this.$refs.paged.$refs.cri.model.f_unit = ''
893
- if(!f_building){
894
- return
895
- }
896
- let criteria = {
897
- items: 'f_unit',
898
- tablename: 't_check_plan_item',
899
- condition: `f_unit IS NOT NULL AND f_unit != '' AND f_state <> '已检' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
900
- groupitem: 'f_unit'
901
- }
902
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
903
- if(result.code == 200){
904
- result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
905
- }
906
- //tag)
907
- },
908
- getPlanCount(){
909
- this.upcomingCount = 0
910
- this.tempSaveCount = 0
911
- this.doneCount = 0
912
- this.allPlanCount = 0
913
- let criteria = {
914
- items: 'count(id) count',
915
- tablename: 't_check_plan_item',
916
- condition: `f_state = '未检'`,
917
- groupitem: 'f_state'
918
- }
919
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
920
- if(result.code && result.code == 200){
921
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
922
- this.upcomingCount = result.data.rows[0].count
923
940
  }
924
- }
925
- criteria = {
926
- items: 'count(id) count',
927
- tablename: 't_check_plan_item',
928
- condition: `(f_complete = '' or f_complete = null or f_complete = '未完成') AND f_state = '已检'`,
929
- groupitem: 'f_state'
930
- }
931
- result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
932
- if(result.code && result.code == 200){
933
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
934
- this.tempSaveCount = result.data.rows[0].count
941
+ criteria = {
942
+ items: 'count(id) count',
943
+ tablename: 't_check_plan_item',
944
+ condition: `f_complete = '已完成' AND f_state = '已检'`,
945
+ groupitem: 'f_state'
935
946
  }
936
- }
937
- criteria = {
938
- items: 'count(id) count',
939
- tablename: 't_check_plan_item',
940
- condition: `f_complete = '已完成' AND f_state = '已检'`,
941
- groupitem: 'f_state'
942
- }
943
- result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
944
- if(result.code && result.code == 200){
945
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
946
- this.doneCount = result.data.rows[0].count
947
+ result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
948
+ if(result.code && result.code == 200){
949
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
950
+ this.doneCount = result.data.rows[0].count
951
+ }
947
952
  }
948
- }
949
- this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
953
+ this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
950
954
 
951
- //tag
952
- //tag
953
- //tag
954
- //tag
955
- },
956
- getAllPlanName(){
957
- this.planNameOptions = []
958
- this.$refs.paged.$refs.cri.model.f_plan_name = ''
959
- let criteria = {
960
- items: 'f_plan_name',
961
- tablename: 't_check_plan',
962
- condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
963
- groupitem: 'f_plan_name'
964
- }
965
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
966
- //tag)
967
- if(result.code == 200){
968
- result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
969
- }
970
- //tag)
971
- },
972
- setPlanParam(detailsType, event) {
973
- if (event.srcElement.checked) {
974
- this.planparam.push(detailsType)
975
955
  //tag
976
- } else {
977
- if(this.planparam.length>0){
978
- let planid= this.planparam.findIndex((value) => {
979
- return value === detailsType
980
- })
981
- this.planparam.splice(planid, 1)
956
+ //tag
957
+ //tag
958
+ //tag
959
+ },
960
+ getAllPlanName(){
961
+ this.planNameOptions = []
962
+ this.$refs.paged.$refs.cri.model.f_plan_name = ''
963
+ let criteria = {
964
+ items: 'f_plan_name',
965
+ tablename: 't_check_plan',
966
+ condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
967
+ groupitem: 'f_plan_name'
968
+ }
969
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
970
+ //tag)
971
+ if(result.code == 200){
972
+ result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
973
+ }
974
+ //tag)
975
+ },
976
+ setPlanParam(detailsType, event) {
977
+ if (event.srcElement.checked) {
978
+ this.planparam.push(detailsType)
982
979
  //tag
980
+ } else {
981
+ if(this.planparam.length>0){
982
+ let planid= this.planparam.findIndex((value) => {
983
+ return value === detailsType
984
+ })
985
+ this.planparam.splice(planid, 1)
986
+ //tag
983
987
 
984
- }
988
+ }
985
989
 
990
+ }
986
991
  }
987
992
  }
988
993
  }
989
- }
990
994
  </script>