safecheck-client 3.0.30-3 → 3.0.30-34

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 (46) hide show
  1. package/examples/SafePlan-liaoyuan/App.vue +3 -1
  2. package/package.json +4 -3
  3. package/src/components/android/AddPlanItem.vue +5 -2
  4. package/src/components/android/CurrentCreate.vue +3 -1
  5. package/src/components/android/UploadPage.vue +228 -338
  6. package/src/components/paper/PlanChooser.vue +2 -2
  7. package/src/components/pc/Edit.vue +50 -0
  8. package/src/components/pc/NewCheckpaper.vue +9 -5
  9. package/src/components/pc/PaperEdit.vue +148 -0
  10. package/src/components/pc/SelectCheckPlanAndNoPLan.vue +3 -0
  11. package/src/components/querycheckpaper/CheckSearchUser.vue +10 -1
  12. package/src/filiale/bayan/android/PhoneUpUserinfo.vue +1377 -1377
  13. package/src/filiale/hanzhong/android/PaperFeedback.vue +1477 -0
  14. package/src/filiale/hanzhong/android/SafecheckDevices.vue +1313 -0
  15. package/src/filiale/hanzhong/android/SafecheckOrderV.vue +2683 -0
  16. package/src/filiale/hanzhong/android.js +5 -1
  17. package/src/filiale/huatong/android/SafecheckOrderV.vue +2426 -2418
  18. package/src/filiale/jingyang/android/PhoneUpUserinfo.vue +34 -34
  19. package/src/filiale/jingyang/pc/PaperList.vue +1 -2
  20. package/src/filiale/kelai/android/AddPlanItem.vue +488 -0
  21. package/src/filiale/kelai/android.js +1 -0
  22. package/src/filiale/pingxiang/pc/DefectPaperNew.vue +1 -1
  23. package/src/filiale/qianneng/android/PaperFeedback.vue +40 -0
  24. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +9 -3
  25. package/src/filiale/tongchuan/android/SafecheckDevices.vue +1 -0
  26. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +2 -0
  27. package/src/filiale/wenxi/pc/DefectPaper.vue +1 -1
  28. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +600 -598
  29. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +20 -0
  30. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +1 -1
  31. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +2 -2
  32. package/src/filiale/yangchunboneng/pc/PaperList.vue +2 -2
  33. package/src/filiale/yongzhou/pc/NoCheckplanSafecheck.vue +230 -0
  34. package/src/filiale/yongzhou/pc/communityDetail.vue +16 -4
  35. package/src/filiale/yongzhou/pc/communityTypeDetailG.vue +8 -6
  36. package/src/filiale/yongzhou/pc/communityTypeDetailM.vue +8 -6
  37. package/src/filiale/yongzhou/pc/safeDetail.vue +18 -6
  38. package/src/filiale/yongzhou/pc/safeStatistics.vue +10 -0
  39. package/src/filiale/yongzhou/pc/safeStatisticsDay.vue +26 -6
  40. package/src/filiale/yongzhou/pc/safeStatisticsMonth.vue +20 -3
  41. package/src/filiale/yongzhou/pc/safeStatisticsYear.vue +10 -0
  42. package/src/filiale/yongzhou/pc/safeTable.vue +10 -2
  43. package/src/filiale/yongzhou/pc.js +1 -0
  44. package/src/filiale/zhongsheng/android/SafecheckUserInfo.vue +151 -53
  45. package/src/filiale/zhongsheng/pc/NewCheckpaper.vue +14 -0
  46. package/src/safecheck.js +6 -0
@@ -1,68 +1,68 @@
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
- }
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
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")}
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
  <style>
62
- .clear-select-with .dropdown-menu{
63
- left: 0px !important;
64
- width: 200% !important;
65
- }
62
+ .clear-select-with .dropdown-menu{
63
+ left: 0px !important;
64
+ width: 200% !important;
65
+ }
66
66
  </style>
67
67
  <template>
68
68
  <div style="height: auto;width: 100%">
@@ -574,575 +574,577 @@
574
574
  </template>
575
575
 
576
576
  <script>
577
- import LocalPagedList from '../../../plugins/LocalPagedList'
578
- import Vue from 'vue'
579
- import { PagedList,HttpResetClass } from 'vue-client'
580
- import * as Util from '../../Util'
581
- import co from 'co'
582
- import {toStandardTimeString} from "safecheck-client/src/filiale/Util";
583
- let select = function * (self) {
584
- let http = new HttpResetClass()
585
- http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
586
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
587
- userid: Vue.user.id
588
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
589
- //tag
590
- self.checkers.push({label:'全部',value:''})
591
- res.data.forEach((checker)=>{
592
- self.checkers.push({label:checker.name,value:checker.id})
577
+ import LocalPagedList from '../../../plugins/LocalPagedList'
578
+ import Vue from 'vue'
579
+ import { PagedList,HttpResetClass } from 'vue-client'
580
+ import * as Util from '../../Util'
581
+ import co from 'co'
582
+ import {toStandardTimeString} from "safecheck-client/src/filiale/Util";
583
+ let select = function * (self) {
584
+ let http = new HttpResetClass()
585
+ http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
586
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
587
+ userid: Vue.user.id
588
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
589
+ //tag
590
+ self.checkers.push({label:'全部',value:''})
591
+ res.data.forEach((checker)=>{
592
+ self.checkers.push({label:checker.name,value:checker.id})
593
+ })
593
594
  })
594
- })
595
- }
596
- export default {
597
- title: '无计划安检查询',
598
- props: ['planName'],
599
- data() {
600
- return {
601
- f_filialeids:'('+Vue.user.orgid+')',
602
- //f_filialeids:'(305)',
603
- planparam:[],
604
- check:'',
605
- plan:'',
606
- planid:'',
607
- model:Vue.android? new LocalPagedList('androidGetuserinfo',20,{condition:'this.condition'}): new PagedList( 'AndroidRest/rs/sql/androidGetuserinfo',20,{condition:'this.condition'}),
608
- showModal: false,
609
- showModal2:false,
610
- showModal3:false,
611
- needid:'',
612
- criteriaShow: false,
613
- planoption:[],
614
- condition:'',
615
- checkers:[],
616
- param: null,
617
- f_preset_dt : Util.toStandardTimeString(),
618
- flow_direction:[
619
- {label: '请选择挂表方式', value: ''},
620
- {label: '左表', value: '左表'},
621
- {label: '右表', value: '右表'}
622
- ],
623
- check_states: [
624
- {label: '请选择安检状态', value: ''},
625
- {label: '未检', value: '未检'},
626
- {label: '已检', value: '已检'},
627
- ],
628
- last_check_states: [
629
- {label: '请选择', value: ''},
630
- {label: '入户', value: '入户'},
631
- {label: '拒检', value: '拒检'},
632
- {label: '到访不遇', value: '到访不遇'},
633
- {label: '拆除', value: '拆除'},
634
- {label: '停用', value: '停用'},
635
- {label: '未通气', value: '未通气'}
636
- ],
637
- upload_states: [
638
- {label: '请选择上传状态', value: ''},
639
- {label: '未传', value: '未传'},
640
- {label: '已传', value: '已传'}
641
- ],
642
- user_types: [
643
- {label: '请选择用户类型', value: ''},
644
- {label: '民用', value: '民用'},
645
- {label: '非民用', value: '非民用'},
646
- ],
647
- verify_state: [
648
- {label: '请选择审核状态', value: ''},
649
- {label: '未审核', value: '未审核'},
650
- {label: '打回', value: '打回'}
651
- ],
652
- residentialAreaOptions: [],
653
- buildOptions: [],
654
- unitOptions: [],
655
- planNameOptions: [],
656
- upcomingCount: 0,
657
- doneCount: 0,
658
- tempSaveCount: 0,
659
- allPlanCount: 0
660
- }
661
- },
662
- ready(){
663
- this.getAllArea()
664
- this.getAllPlanName()
665
- this.selfSearch()
666
- let gen = select(this)
667
- co(gen)
668
- },
669
- mounted(){
670
- //tag
671
- if (window.history && window.history.pushState) {
672
- history.pushState(null, null, document.URL);
673
- window.addEventListener('popstate', this.fun, false);//false阻止默认事件
674
- }
675
- },
676
- destroyed(){
677
- //tag
678
- window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
679
- },
680
- methods: {
681
- safeState(state){
682
- if(state=='' ||state=='到访不遇' ||state=='拒检' ||state==null){
683
- return '未检'
684
- }else{
685
- return '已检'
686
- }
687
- },
688
- compare(val){
689
- //判断是否超期,val格式为 yyyy-MM-dd HH:mm:ss的字符串
690
- if(val){
691
- let now = new Date()
692
- let last = new Date(val)
693
- if(last.getTime() >now.getTime() ){
694
- return true
695
- }else{
696
- return false
697
- }
595
+ }
596
+ export default {
597
+ title: '无计划安检查询',
598
+ props: ['planName'],
599
+ data() {
600
+ return {
601
+ f_filialeids:'('+Vue.user.orgid+')',
602
+ //f_filialeids:'(305)',
603
+ planparam:[],
604
+ check:'',
605
+ plan:'',
606
+ planid:'',
607
+ model:Vue.android? new LocalPagedList('androidGetuserinfo',20,{condition:'this.condition'}): new PagedList( 'AndroidRest/rs/sql/androidGetuserinfo',20,{condition:'this.condition'}),
608
+ showModal: false,
609
+ showModal2:false,
610
+ showModal3:false,
611
+ needid:'',
612
+ criteriaShow: false,
613
+ planoption:[],
614
+ condition:'',
615
+ checkers:[],
616
+ param: null,
617
+ f_preset_dt : Util.toStandardTimeString(),
618
+ flow_direction:[
619
+ {label: '请选择挂表方式', value: ''},
620
+ {label: '左表', value: '左表'},
621
+ {label: '右表', value: '右表'}
622
+ ],
623
+ check_states: [
624
+ {label: '请选择安检状态', value: ''},
625
+ {label: '未检', value: '未检'},
626
+ {label: '已检', value: '已检'},
627
+ ],
628
+ last_check_states: [
629
+ {label: '请选择', value: ''},
630
+ {label: '入户', value: '入户'},
631
+ {label: '拒检', value: '拒检'},
632
+ {label: '到访不遇', value: '到访不遇'},
633
+ {label: '拆除', value: '拆除'},
634
+ {label: '停用', value: '停用'},
635
+ {label: '未通气', value: '未通气'}
636
+ ],
637
+ upload_states: [
638
+ {label: '请选择上传状态', value: ''},
639
+ {label: '未传', value: '未传'},
640
+ {label: '已传', value: '已传'}
641
+ ],
642
+ user_types: [
643
+ {label: '请选择用户类型', value: ''},
644
+ {label: '民用', value: '民用'},
645
+ {label: '非民用', value: '非民用'},
646
+ ],
647
+ verify_state: [
648
+ {label: '请选择审核状态', value: ''},
649
+ {label: '未审核', value: '未审核'},
650
+ {label: '打回', value: '打回'}
651
+ ],
652
+ residentialAreaOptions: [],
653
+ buildOptions: [],
654
+ unitOptions: [],
655
+ planNameOptions: [],
656
+ upcomingCount: 0,
657
+ doneCount: 0,
658
+ tempSaveCount: 0,
659
+ allPlanCount: 0
698
660
  }
699
661
  },
700
- ReserveNodo(){
701
- this.showModal=false
702
- this.f_preset_dt = Util.toStandardTimeString()
703
- },
704
- scan(){
705
- HostApp.__this__=this,
706
- HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
662
+ ready(){
663
+ this.getAllArea()
664
+ this.getAllPlanName()
665
+ this.selfSearch()
666
+ let gen = select(this)
667
+ co(gen)
707
668
  },
708
- getCode(){
709
- const datapa = HostApp.getCode().data;
669
+ mounted(){
710
670
  //tag
711
- this.$refs.paged.$refs.cri.model.f_meter_no = datapa
712
-
671
+ if (window.history && window.history.pushState) {
672
+ history.pushState(null, null, document.URL);
673
+ window.addEventListener('popstate', this.fun, false);//false阻止默认事件
674
+ }
713
675
  },
714
- fun () {
715
- //tag
676
+ destroyed(){
716
677
  //tag
678
+ window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
717
679
  },
718
- iscancel(){
719
- this.showModal2=false
720
- this.showModal3=false
721
- this.planoption=[]
722
- },
723
- timeSet(val){
724
- return val
725
- },
726
- async isok(){
727
- if(this.planoption.length==0){
728
- this.$showMessage("请选择计划")
729
- return false
730
- }
731
- for (let i = 0; i <this.planoption.length ; i++) {
732
- if (this.planoption[i]["selected"]==true){
733
- this.planid=this.planoption[i].value
734
- break
680
+ methods: {
681
+ safeState(state){
682
+ if(state=='' ||state=='到访不遇' ||state=='拒检' ||state==null){
683
+ return '未检'
684
+ }else{
685
+ return '已检'
735
686
  }
736
- }
737
- if(this.planid==''){
738
- this.$showMessage("请选择计划")
739
- return false
740
- }
741
- await this.okput()
742
- },
743
- async manyisok(){
744
- if(this.planoption.length==0){
745
- this.$showMessage("请选择计划")
746
- return false
747
- }
748
- for (let i = 0; i <this.planoption.length ; i++) {
749
- if (this.planoption[i]["selected"]==true){
750
- this.planid=this.planoption[i].value
751
- break
687
+ },
688
+ compare(val){
689
+ //判断是否超期,val格式为 yyyy-MM-dd HH:mm:ss的字符串
690
+ if(val){
691
+ let now = new Date()
692
+ let last = new Date(val)
693
+ if(last.getTime() >now.getTime() ){
694
+ return true
695
+ }else{
696
+ return false
697
+ }
752
698
  }
753
- }
754
- if(this.planid==''){
755
- this.$showMessage("请选择计划")
756
- return false
757
- }
758
- await this.manyokput()
759
- },
760
- changenull(){
761
- this.showModal2=false
762
- this.showModal3=false
763
- this.planoption=[]
764
- this.plan=''
765
- this.check=''
766
- },
767
- async okput(){
768
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
699
+ },
700
+ ReserveNodo(){
701
+ this.showModal=false
702
+ this.f_preset_dt = Util.toStandardTimeString()
703
+ },
704
+ scan(){
705
+ HostApp.__this__=this,
706
+ HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
707
+ },
708
+ getCode(){
709
+ const datapa = HostApp.getCode().data;
710
+ //tag
711
+ this.$refs.paged.$refs.cri.model.f_meter_no = datapa
769
712
 
770
- condition:`i.id='`+this.needid+`'`,
771
- f_plan_id:this.planid,
772
- switchCheckAll:false,
773
- checkAll:false,
774
- f_operator:Vue.user.name
713
+ },
714
+ fun () {
715
+ //tag
716
+ //tag
717
+ },
718
+ iscancel(){
719
+ this.showModal2=false
720
+ this.showModal3=false
721
+ this.planoption=[]
722
+ },
723
+ timeSet(val){
724
+ return val
725
+ },
726
+ async isok(){
727
+ if(this.planoption.length==0){
728
+ this.$showMessage("请选择计划")
729
+ return false
775
730
  }
776
- })
777
- await this.changenull()
778
- await this.getNewOrder()
779
- },
780
- async manyokput(){
781
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
782
- columnName:"i.id",
783
- condition:"1=1",
784
- f_plan_id:this.planid,
785
- switchCheckAll:true,
786
- param:this.planparam,
787
- checkAll:false,
788
- f_operator:Vue.user.name
731
+ for (let i = 0; i <this.planoption.length ; i++) {
732
+ if (this.planoption[i]["selected"]==true){
733
+ this.planid=this.planoption[i].value
734
+ break
735
+ }
789
736
  }
790
- })
791
- await this.changenull()
792
- await this.getNewOrder()
793
- },
794
- async plansearch(){
795
- this.planoption=[]
796
- let condition= ` f_plan_year=${new Date().getFullYear()}`
797
- if(this.check){
798
- condition += ` and f_checker_id= '${this.check}'`
799
- }
800
- if(this.plan){
801
- condition += ` and f_plan_name like '%${this.plan}%'`
802
- }
803
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {data:{
804
- condition:condition,
805
- f_filialeids:this.f_filialeids,
806
- groupitem:'',
807
- orderitem:'id'
808
- }})
809
- let resoult=res.data
810
- for (let i = 0; i < resoult.length; i++) {
811
- this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
812
- }
813
- },
737
+ if(this.planid==''){
738
+ this.$showMessage("请选择计划")
739
+ return false
740
+ }
741
+ await this.okput()
742
+ },
743
+ async manyisok(){
744
+ if(this.planoption.length==0){
745
+ this.$showMessage("请选择计划")
746
+ return false
747
+ }
748
+ for (let i = 0; i <this.planoption.length ; i++) {
749
+ if (this.planoption[i]["selected"]==true){
750
+ this.planid=this.planoption[i].value
751
+ break
752
+ }
753
+ }
754
+ if(this.planid==''){
755
+ this.$showMessage("请选择计划")
756
+ return false
757
+ }
758
+ await this.manyokput()
759
+ },
760
+ changenull(){
761
+ this.showModal2=false
762
+ this.showModal3=false
763
+ this.planoption=[]
764
+ this.plan=''
765
+ this.check=''
766
+ },
767
+ async okput(){
768
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
814
769
 
815
- select(row, idx) {
816
- this.$set('planoption[' + idx + '].selected', true)
817
- for (let i = 0; i <this.planoption.length ; i++) {
818
- if (i!=idx){
819
- this.planoption[i]["selected"]=false
770
+ condition:`i.id='`+this.needid+`'`,
771
+ f_plan_id:this.planid,
772
+ switchCheckAll:false,
773
+ checkAll:false,
774
+ f_operator:Vue.user.name
775
+ }
776
+ })
777
+ await this.changenull()
778
+ await this.getNewOrder()
779
+ },
780
+ async manyokput(){
781
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
782
+ columnName:"i.id",
783
+ condition:"1=1",
784
+ f_plan_id:this.planid,
785
+ switchCheckAll:true,
786
+ param:this.planparam,
787
+ checkAll:false,
788
+ f_operator:Vue.user.name
789
+ }
790
+ })
791
+ await this.changenull()
792
+ await this.getNewOrder()
793
+ },
794
+ async plansearch(){
795
+ this.planoption=[]
796
+ let condition= ` f_plan_year=${new Date().getFullYear()}`
797
+ if(this.check){
798
+ condition += ` and f_checker_id= '${this.check}'`
820
799
  }
821
- }
822
- },
823
- planclose(){
824
- this.showModal2=false
825
- this.showModal3=false
826
- },
827
- queryplan(val){
828
- this.needid=val
829
- this.showModal2 = true
830
- },
831
- queryplanmany(){
800
+ if(this.plan){
801
+ condition += ` and f_plan_name like '%${this.plan}%'`
802
+ }
803
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {data:{
804
+ condition:condition,
805
+ f_filialeids:this.f_filialeids,
806
+ groupitem:'',
807
+ orderitem:'id'
808
+ }})
809
+ let resoult=res.data
810
+ for (let i = 0; i < resoult.length; i++) {
811
+ this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
812
+ }
813
+ },
832
814
 
833
- this.showModal3 = true
834
- },
835
- reload(){
836
- // this.getAllArea()
837
- // this.getAllPlanName()
838
- this.selfSearch()
839
- },
840
- cancelReserve (idx, id) {
841
- if(Vue.android){
842
- let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
843
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
844
- if (res.code == 200) {
845
- this.$showMessage("取消预约成功")
815
+ select(row, idx) {
816
+ this.$set('planoption[' + idx + '].selected', true)
817
+ for (let i = 0; i <this.planoption.length ; i++) {
818
+ if (i!=idx){
819
+ this.planoption[i]["selected"]=false
820
+ }
846
821
  }
847
- }else {
848
- this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
822
+ },
823
+ planclose(){
824
+ this.showModal2=false
825
+ this.showModal3=false
826
+ },
827
+ queryplan(val){
828
+ this.needid=val
829
+ this.showModal2 = true
830
+ },
831
+ queryplanmany(){
832
+
833
+ this.showModal3 = true
834
+ },
835
+ reload(){
836
+ // this.getAllArea()
837
+ // this.getAllPlanName()
838
+ this.selfSearch()
839
+ },
840
+ cancelReserve (idx, id) {
841
+ if(Vue.android){
842
+ let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
849
843
  this.$set('model.rows[' + idx + '].f_prearranged_date', null)
850
- if (repanse.data.code == 200) {
851
- alert("取消预约成功!")
844
+ if (res.code == 200) {
845
+ this.$showMessage("取消预约成功")
852
846
  }
853
- })
854
- }},
855
- genuineReserve () {
856
- if (!this.f_preset_dt) {
857
- this.$showMessage('请选择一个日期')
858
- return
859
- }
860
- let res = this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: this.f_preset_dt})
861
- if(res.code == 200) {
862
- this.$set('model.rows[' + this.param + '].f_prearranged_date', this.f_preset_dt)
863
- this.showModal = false
864
- this.$showMessage("预约成功!")
865
- }else{
866
- this.$showMessage("预约失败,请重新预约!")
867
- }
868
- },
869
- inspect(row) {
870
- var _this = this
871
- let http = new HttpResetClass()
872
- http.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: {
873
- items: 'id',
874
- tablename: 't_check_plan_item',
875
- condition: `id = '${row.id}'`
876
- }}, {resolveMsg: null, rejectMsg: null}).then((getcheckplan) => {
877
- console.log('getcheckplan=', JSON.stringify(getcheckplan))
878
- this.getcheckplandata = getcheckplan.data[0]
879
- if(this.getcheckplandata){
880
- if (row.f_upload_state == '未传' || row.f_last_check_state === '到访不遇' || row.f_last_check_state === '拒检'|| (row.f_upload_state == '已传' && row.f_no_checkplan != '无计划安检' ) ) {
881
- _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
882
- row['f_plan_meters'] = response.data
883
- var pardate = {
884
- _this:_this,
885
- title:'安全检查',
886
- safe:true
887
- }
888
- _this.$dispatch('gotoson',pardate)
889
- //tag
890
- _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self', _this.reload)
891
- }).catch ((msg)=>{
892
- this.$showMessage("网络异常,请检查网络后再试!")
893
- })
894
- }else{
895
- this.$showMessage("该安检单已被上传!")
847
+ }else {
848
+ this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
849
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
850
+ if (repanse.data.code == 200) {
851
+ alert("取消预约成功!")
852
+ }
853
+ })
854
+ }},
855
+ genuineReserve () {
856
+ if (!this.f_preset_dt) {
857
+ this.$showMessage('请选择一个日期')
858
+ return
859
+ }
860
+ let res = this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: this.f_preset_dt})
861
+ if(res.code == 200) {
862
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', this.f_preset_dt)
863
+ this.showModal = false
864
+ this.$showMessage("预约成功!")
865
+ }else{
866
+ this.$showMessage("预约失败,请重新预约!")
867
+ }
868
+ },
869
+ inspect(row) {
870
+ var _this = this
871
+ let http = new HttpResetClass()
872
+ http.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: {
873
+ items: 'id',
874
+ tablename: 't_check_plan_item',
875
+ condition: `id = '${row.id}'`
876
+ }}, {resolveMsg: null, rejectMsg: null}).then((getcheckplan) => {
877
+ console.log('getcheckplan=', JSON.stringify(getcheckplan))
878
+ this.getcheckplandata = getcheckplan.data[0]
879
+ if(this.getcheckplandata){
880
+ if (row.f_upload_state == '未传' || row.f_last_check_state === '到访不遇' || row.f_last_check_state === '拒检'|| (row.f_upload_state == '已传' && row.f_no_checkplan != '无计划安检' ) ) {
881
+ _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
882
+ row['f_plan_meters'] = response.data
883
+ var pardate = {
884
+ _this:_this,
885
+ title:'安全检查',
886
+ safe:true
887
+ }
888
+ _this.$dispatch('gotoson',pardate)
889
+ //tag
890
+ _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self', _this.reload)
891
+ }).catch ((msg)=>{
892
+ this.$showMessage("网络异常,请检查网络后再试!")
893
+ })
894
+ }else{
895
+ this.$showMessage("该安检单已被上传!")
896
+ }
897
+ }else {
898
+ this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
896
899
  }
900
+ })
901
+ },
902
+ makeAPhoneCall(phoneNumber) {
903
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
904
+ },
905
+ reserve (rowdata,idx) {
906
+ this.param = idx
907
+ this.showModal = true
908
+ },
909
+ search(args) {
910
+ this.model.rows = []
911
+ this.model.search(args.condition, args.model)
912
+ },
913
+ selfSearch () {
914
+ this.getPlanCount()
915
+ let condition = ""
916
+ if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length >0){
917
+ condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area[0]+"'"
918
+ }else if(this.$refs.paged.$refs.cri.model.f_residential_area instanceof String && this.$refs.paged.$refs.cri.model.f_residential_area){
919
+ condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area+"'"
920
+ }
921
+ if(this.$refs.paged.$refs.cri.model.f_building)
922
+ condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
923
+ if(this.$refs.paged.$refs.cri.model.f_unit)
924
+ condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
925
+ if (this.planName){
926
+ condition += " and f_plan_name like '%"+this.planName +"%'"
897
927
  }else {
898
- this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
928
+ if(this.$refs.paged.$refs.cri.model.f_plan_name)
929
+ condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
899
930
  }
900
- })
901
- },
902
- makeAPhoneCall(phoneNumber) {
903
- this.$androidUtil.makeAPhoneCall(phoneNumber)
904
- },
905
- reserve (rowdata,idx) {
906
- this.param = idx
907
- this.showModal = true
908
- },
909
- search(args) {
910
- this.model.rows = []
911
- this.model.search(args.condition, args.model)
912
- },
913
- selfSearch () {
914
- this.getPlanCount()
915
- let condition = ""
916
- if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length >0){
917
- condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area[0]+"'"
918
- }else if(this.$refs.paged.$refs.cri.model.f_residential_area instanceof String && this.$refs.paged.$refs.cri.model.f_residential_area){
919
- condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area+"'"
920
- }
921
- if(this.$refs.paged.$refs.cri.model.f_building)
922
- condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
923
- if(this.$refs.paged.$refs.cri.model.f_unit)
924
- condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
925
- if (this.planName){
926
- condition += " and f_plan_name like '%"+this.planName +"%'"
927
- }else {
928
- if(this.$refs.paged.$refs.cri.model.f_plan_name)
929
- condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
930
- }
931
- // if(this.$refs.paged.$refs.cri.model.f_plan_year)
932
- // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
933
- // if(this.$refs.paged.$refs.cri.model.f_plan_month)
934
- // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
935
- if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
936
- condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
937
- if(this.$refs.paged.$refs.cri.model.f_keyword)
938
- condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
939
- if(this.$refs.paged.$refs.cri.model.f_user_name)
940
- condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
941
- if(this.$refs.paged.$refs.cri.model.f_state[0] =='已检'){
942
- condition += " and ti.f_last_check_state in ('入户','停用','拆除','未通气')"
943
- }
944
- if(this.$refs.paged.$refs.cri.model.f_state[0] =='未检'){
945
- condition += " and (ti.f_last_check_state in ('到访不遇','拒检') or ti.f_last_check_state is null)"
946
- }
947
- // if(this.$refs.paged.$refs.cri.model.f_last_state[0])
948
- // condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
949
- if(this.$refs.paged.$refs.cri.model.f_user_type[0])
950
- condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
951
- if(this.$refs.paged.$refs.cri.model.f_meter_no)
952
- condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
953
- // if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
954
- // condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
931
+ // if(this.$refs.paged.$refs.cri.model.f_plan_year)
932
+ // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
933
+ // if(this.$refs.paged.$refs.cri.model.f_plan_month)
934
+ // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
935
+ if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
936
+ condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
937
+ if(this.$refs.paged.$refs.cri.model.f_keyword)
938
+ condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
939
+ if(this.$refs.paged.$refs.cri.model.f_user_name)
940
+ condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
941
+ if(this.$refs.paged.$refs.cri.model.f_state[0] =='已检'){
942
+ condition += " and ti.f_last_check_state in ('入户','停用','拆除','未通气')"
943
+ }
944
+ if(this.$refs.paged.$refs.cri.model.f_state[0] =='未检'){
945
+ condition += " and (ti.f_last_check_state in ('到访不遇','拒检') or ti.f_last_check_state is null)"
946
+ }
947
+ // if(this.$refs.paged.$refs.cri.model.f_last_state[0])
948
+ // condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
949
+ if(this.$refs.paged.$refs.cri.model.f_user_type[0])
950
+ condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
951
+ if(this.$refs.paged.$refs.cri.model.f_meter_no)
952
+ condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
953
+ // if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
954
+ // condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
955
955
 
956
- if(this.$refs.paged.$refs.cri.model.f_enter_number)
957
- condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
958
- if(this.$refs.paged.$refs.cri.model.f_check_version)
959
- condition += " and ti.f_check_version >= "+this.$refs.paged.$refs.cri.model.f_check_version
960
- if(this.$refs.paged.$refs.cri.model.f_start_date)
961
- condition += " and ti.f_prearranged_date > '"+this.$refs.paged.$refs.cri.model.f_start_date + "'"
962
- if(this.$refs.paged.$refs.cri.model.f_end_date)
963
- condition += " and ti.f_prearranged_date < '"+this.$refs.paged.$refs.cri.model.f_end_date + "'"
964
- if(this.$refs.paged.$refs.cri.model.f_check_version1)
965
- condition += " and ti.f_check_version <= "+this.$refs.paged.$refs.cri.model.f_check_version1
966
- if(this.$refs.paged.$refs.cri.model.f_user_phone)
967
- condition += " and (ti.f_user_phone like '%"+this.$refs.paged.$refs.cri.model.f_user_phone +"%'or f_user_phone2 like '%"+this.$refs.paged.$refs.cri.model.f_user_phone+"')"
968
- //tag
969
- if(this.$refs.paged.$refs.cri.model.f_last_check_state !=''){
970
- condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_check_state+"'"
971
- }
972
- if(this.$refs.paged.$refs.cri.model.userinfo){
973
- condition += ` and (f_userinfo_code like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_user_name like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_user_phone like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_meter_no like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_address like '%${this.$refs.paged.$refs.cri.model.userinfo}%')`
974
- }
975
- this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成' or f_complete = '已完成') or (f_state = '未检' or f_state = '已检') or (f_last_check_state = '到访不遇' or f_last_check_state = '拒检' )) and ti.f_no_checkplan = '有计划安检'" + condition)
976
- },
977
- getNewOrder(){
978
- HostApp.__this__ = this
979
- HostApp.logicWithHint({
980
- // logic别名,key必须为logic
981
- 'logic': 'SafeCheckServiceTimeOut',
982
- // 回调执行方法名,key必须为callback
983
- 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
984
- // logic执行需要的业务参数
985
- 'data': {params: ''},
986
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
987
- // 执行回调方法传入key为backresult
988
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
989
- 'backresult': 1
990
- })
991
- },
992
- getNewOrderCallBack() {
993
- this.selfSearch()
994
- this.getAllArea()
995
- this.getAllPlanName()
996
- },
997
- hidden() {
998
- this.criteriaShow = !this.criteriaShow
999
- },
1000
- getAllArea(){
1001
- this.residentialAreaOptions = []
1002
- this.buildOptions = []
1003
- this.unitOptions = []
1004
- this.$refs.paged.$refs.cri.model.f_residential_area = ''
1005
- this.$refs.paged.$refs.cri.model.f_building = ''
1006
- this.$refs.paged.$refs.cri.model.f_unit = ''
1007
- let criteria = {
1008
- items: 'f_residential_area',
1009
- tablename: 't_check_plan_item',
1010
- condition: `f_residential_area IS NOT NULL AND f_residential_area != '' `,
1011
- groupitem: 'f_residential_area'
1012
- }
1013
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1014
- //tag)
1015
- if(result.code == 200){
1016
- result.data.rows.forEach(item => this.residentialAreaOptions.push({label:item.f_residential_area,value:item.f_residential_area}))
1017
- }
1018
- //tag)
1019
- },
1020
- getbuilds(f_residential_area){
1021
- //tag)
1022
- this.buildOptions = []
1023
- this.unitOptions = []
1024
- this.$refs.paged.$refs.cri.model.f_building = ''
1025
- this.$refs.paged.$refs.cri.model.f_unit = ''
1026
- if(!f_residential_area){
1027
- return
1028
- }
1029
- let criteria = {
1030
- items: 'f_building',
1031
- tablename: 't_check_plan_item',
1032
- condition: `f_building IS NOT NULL AND f_building != '' AND f_residential_area = '${f_residential_area}'`,
1033
- groupitem: 'f_building order by f_building+0'
1034
- }
1035
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1036
- if(result.code == 200){
1037
- result.data.rows.forEach(item => this.buildOptions.push({label:item.f_building,value:item.f_building}))
1038
- }
1039
- this.buildOptions.sort((a,b)=>{
1040
- return Number(a.label)- Number(b.label)
1041
- })
1042
- //tag)
1043
- },
1044
- getUnits(f_building){
1045
- f_building = f_building[0]
1046
- //tag)
1047
- this.unitOptions = []
1048
- this.$refs.paged.$refs.cri.model.f_unit = ''
1049
- if(!f_building){
1050
- return
1051
- }
1052
- let criteria = {
1053
- items: 'f_unit',
1054
- tablename: 't_check_plan_item',
1055
- condition: `f_unit IS NOT NULL AND f_unit != '' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
1056
- groupitem: 'f_unit'
1057
- }
1058
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1059
- if(result.code == 200){
1060
- result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
1061
- }
1062
- this.unitOptions.sort((a,b)=>{
1063
- return Number(a.label)- Number(b.label)
1064
- })
1065
- },
1066
- getPlanCount(){
1067
- this.upcomingCount = 0
1068
- this.tempSaveCount = 0
1069
- this.doneCount = 0
1070
- this.allPlanCount = 0
1071
- let criteria = {
1072
- items: 'count(id) count',
1073
- tablename: 't_check_plan_item',
1074
- condition: `f_state = '未检'`,
1075
- groupitem: 'f_state'
1076
- }
1077
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1078
- if(result.code && result.code == 200){
1079
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
1080
- this.upcomingCount = result.data.rows[0].count
956
+ if(this.$refs.paged.$refs.cri.model.f_enter_number)
957
+ condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
958
+ if(this.$refs.paged.$refs.cri.model.f_check_version)
959
+ condition += " and ti.f_check_version >= "+this.$refs.paged.$refs.cri.model.f_check_version
960
+ if(this.$refs.paged.$refs.cri.model.f_start_date)
961
+ condition += " and ti.f_prearranged_date > '"+this.$refs.paged.$refs.cri.model.f_start_date + "'"
962
+ if(this.$refs.paged.$refs.cri.model.f_end_date)
963
+ condition += " and ti.f_prearranged_date < '"+this.$refs.paged.$refs.cri.model.f_end_date + "'"
964
+ if(this.$refs.paged.$refs.cri.model.f_check_version1)
965
+ condition += " and ti.f_check_version <= "+this.$refs.paged.$refs.cri.model.f_check_version1
966
+
967
+ if(this.$refs.paged.$refs.cri.model.f_user_phone){
968
+ condition += ` and (ti.f_user_phone like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%' or f_zuhu_phone like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%' or f_rent_phone like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%' or f_user_phone2 like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%')`
1081
969
  }
1082
- }
1083
- criteria = {
1084
- items: 'count(id) count',
1085
- tablename: 't_check_plan_item',
1086
- condition: `(f_complete = '' or f_complete = null or f_complete = '未完成') AND f_state = '已检'`,
1087
- groupitem: 'f_state'
1088
- }
1089
- result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1090
- if(result.code && result.code == 200){
1091
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1092
- this.tempSaveCount = result.data.rows[0].count
970
+
971
+ if(this.$refs.paged.$refs.cri.model.f_last_check_state !=''){
972
+ condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_check_state+"'"
1093
973
  }
1094
- }
1095
- criteria = {
1096
- items: 'count(id) count',
1097
- tablename: 't_check_plan_item',
1098
- condition: `f_complete = '已完成' AND f_state = '已检'`,
1099
- groupitem: 'f_state'
1100
- }
1101
- result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1102
- if(result.code && result.code == 200){
1103
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1104
- this.doneCount = result.data.rows[0].count
974
+ if(this.$refs.paged.$refs.cri.model.userinfo){
975
+ condition += ` and (f_userinfo_code like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_user_name like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_user_phone like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_meter_no like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_address like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_zuhu_phone like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_rent_phone like '%${this.$refs.paged.$refs.cri.model.userinfo}%' or f_user_phone2 like '%${this.$refs.paged.$refs.cri.model.userinfo}%')`
1105
976
  }
1106
- }
1107
- this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
977
+ this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成' or f_complete = '已完成') or (f_state = '未检' or f_state = '已检') or (f_last_check_state = '到访不遇' or f_last_check_state = '拒检' )) and ti.f_no_checkplan = '有计划安检'" + condition)
978
+ },
979
+ getNewOrder(){
980
+ HostApp.__this__ = this
981
+ HostApp.logicWithHint({
982
+ // logic别名,key必须为logic
983
+ 'logic': 'SafeCheckServiceTimeOut',
984
+ // 回调执行方法名,key必须为callback
985
+ 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
986
+ // logic执行需要的业务参数
987
+ 'data': {params: ''},
988
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
989
+ // 执行回调方法传入key为backresult
990
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
991
+ 'backresult': 1
992
+ })
993
+ },
994
+ getNewOrderCallBack() {
995
+ this.selfSearch()
996
+ this.getAllArea()
997
+ this.getAllPlanName()
998
+ },
999
+ hidden() {
1000
+ this.criteriaShow = !this.criteriaShow
1001
+ },
1002
+ getAllArea(){
1003
+ this.residentialAreaOptions = []
1004
+ this.buildOptions = []
1005
+ this.unitOptions = []
1006
+ this.$refs.paged.$refs.cri.model.f_residential_area = ''
1007
+ this.$refs.paged.$refs.cri.model.f_building = ''
1008
+ this.$refs.paged.$refs.cri.model.f_unit = ''
1009
+ let criteria = {
1010
+ items: 'f_residential_area',
1011
+ tablename: 't_check_plan_item',
1012
+ condition: `f_residential_area IS NOT NULL AND f_residential_area != '' `,
1013
+ groupitem: 'f_residential_area'
1014
+ }
1015
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1016
+ //tag)
1017
+ if(result.code == 200){
1018
+ result.data.rows.forEach(item => this.residentialAreaOptions.push({label:item.f_residential_area,value:item.f_residential_area}))
1019
+ }
1020
+ //tag)
1021
+ },
1022
+ getbuilds(f_residential_area){
1023
+ //tag)
1024
+ this.buildOptions = []
1025
+ this.unitOptions = []
1026
+ this.$refs.paged.$refs.cri.model.f_building = ''
1027
+ this.$refs.paged.$refs.cri.model.f_unit = ''
1028
+ if(!f_residential_area){
1029
+ return
1030
+ }
1031
+ let criteria = {
1032
+ items: 'f_building',
1033
+ tablename: 't_check_plan_item',
1034
+ condition: `f_building IS NOT NULL AND f_building != '' AND f_residential_area = '${f_residential_area}'`,
1035
+ groupitem: 'f_building order by f_building+0'
1036
+ }
1037
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1038
+ if(result.code == 200){
1039
+ result.data.rows.forEach(item => this.buildOptions.push({label:item.f_building,value:item.f_building}))
1040
+ }
1041
+ this.buildOptions.sort((a,b)=>{
1042
+ return Number(a.label)- Number(b.label)
1043
+ })
1044
+ //tag)
1045
+ },
1046
+ getUnits(f_building){
1047
+ f_building = f_building[0]
1048
+ //tag)
1049
+ this.unitOptions = []
1050
+ this.$refs.paged.$refs.cri.model.f_unit = ''
1051
+ if(!f_building){
1052
+ return
1053
+ }
1054
+ let criteria = {
1055
+ items: 'f_unit',
1056
+ tablename: 't_check_plan_item',
1057
+ condition: `f_unit IS NOT NULL AND f_unit != '' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
1058
+ groupitem: 'f_unit'
1059
+ }
1060
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1061
+ if(result.code == 200){
1062
+ result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
1063
+ }
1064
+ this.unitOptions.sort((a,b)=>{
1065
+ return Number(a.label)- Number(b.label)
1066
+ })
1067
+ },
1068
+ getPlanCount(){
1069
+ this.upcomingCount = 0
1070
+ this.tempSaveCount = 0
1071
+ this.doneCount = 0
1072
+ this.allPlanCount = 0
1073
+ let criteria = {
1074
+ items: 'count(id) count',
1075
+ tablename: 't_check_plan_item',
1076
+ condition: `f_state = '未检'`,
1077
+ groupitem: 'f_state'
1078
+ }
1079
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1080
+ if(result.code && result.code == 200){
1081
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
1082
+ this.upcomingCount = result.data.rows[0].count
1083
+ }
1084
+ }
1085
+ criteria = {
1086
+ items: 'count(id) count',
1087
+ tablename: 't_check_plan_item',
1088
+ condition: `(f_complete = '' or f_complete = null or f_complete = '未完成') AND f_state = '已检'`,
1089
+ groupitem: 'f_state'
1090
+ }
1091
+ result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1092
+ if(result.code && result.code == 200){
1093
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1094
+ this.tempSaveCount = result.data.rows[0].count
1095
+ }
1096
+ }
1097
+ criteria = {
1098
+ items: 'count(id) count',
1099
+ tablename: 't_check_plan_item',
1100
+ condition: `f_complete = '已完成' AND f_state = '已检'`,
1101
+ groupitem: 'f_state'
1102
+ }
1103
+ result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1104
+ if(result.code && result.code == 200){
1105
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1106
+ this.doneCount = result.data.rows[0].count
1107
+ }
1108
+ }
1109
+ this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
1108
1110
 
1109
- //tag
1110
- //tag
1111
- //tag
1112
- //tag
1113
- },
1114
- getAllPlanName(){
1115
- this.planNameOptions = []
1116
- this.$refs.paged.$refs.cri.model.f_plan_name = ''
1117
- let criteria = {
1118
- items: 'f_plan_name',
1119
- tablename: 't_check_plan',
1120
- condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
1121
- groupitem: 'f_plan_name'
1122
- }
1123
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1124
- //tag)
1125
- if(result.code == 200){
1126
- result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
1127
- }
1128
- //tag)
1129
- },
1130
- setPlanParam(detailsType, event) {
1131
- if (event.srcElement.checked) {
1132
- this.planparam.push(detailsType)
1133
1111
  //tag
1134
- } else {
1135
- if(this.planparam.length>0){
1136
- let planid= this.planparam.findIndex((value) => {
1137
- return value === detailsType
1138
- })
1139
- this.planparam.splice(planid, 1)
1112
+ //tag
1113
+ //tag
1114
+ //tag
1115
+ },
1116
+ getAllPlanName(){
1117
+ this.planNameOptions = []
1118
+ this.$refs.paged.$refs.cri.model.f_plan_name = ''
1119
+ let criteria = {
1120
+ items: 'f_plan_name',
1121
+ tablename: 't_check_plan',
1122
+ condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
1123
+ groupitem: 'f_plan_name'
1124
+ }
1125
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1126
+ //tag)
1127
+ if(result.code == 200){
1128
+ result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
1129
+ }
1130
+ //tag)
1131
+ },
1132
+ setPlanParam(detailsType, event) {
1133
+ if (event.srcElement.checked) {
1134
+ this.planparam.push(detailsType)
1140
1135
  //tag
1136
+ } else {
1137
+ if(this.planparam.length>0){
1138
+ let planid= this.planparam.findIndex((value) => {
1139
+ return value === detailsType
1140
+ })
1141
+ this.planparam.splice(planid, 1)
1142
+ //tag
1141
1143
 
1142
- }
1144
+ }
1143
1145
 
1146
+ }
1144
1147
  }
1145
1148
  }
1146
1149
  }
1147
- }
1148
1150
  </script>