safecheck-client 3.0.30-8 → 3.0.30-80

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