Browse Source

默认指派

liuzhihui 3 years ago
parent
commit
440e94c3bd

+ 127 - 44
CallCenterWeb.UI/RMYY/src/components/button/orderList.vue

@@ -639,7 +639,7 @@
639 639
           EvaluateContent: ''
640 640
         },
641 641
         transferForm: {
642
-          todept: 0,
642
+          todept: '',
643 643
           tousercode: ''
644 644
         },
645 645
         zhddtransferForm: {
@@ -871,60 +871,143 @@
871 871
         this.fid = row.F_ID
872 872
         this.rowdata = row
873 873
         if (name === 'zhipai') {
874
-          const deptid = this.$store.getters.workTypeMap[parseInt(row.F_SonType)].autoDept
875
-          const typeArr = this.$store.getters.workTypeMap[parseInt(row.F_SonType)].ids
876
-          const worktypeInfo = this.$store.getters.workTypeMap[parseInt(typeArr[1])].tag
877
-          const assignDeptArr = this.$store.getters.deptmap[parseInt(row.F_ProposerDept)].ids
878
-          console.log(deptid,worktypeInfo, assignDeptArr)
879
-          if (worktypeInfo != 'gzbx_jjhq') {
880
-            if(deptid){
881
-              this.transferForm.todept = deptid
882
-              this.deptidArr = this.$store.getters.deptmap[parseInt(deptid)].ids
883
-              this.getClassUser(deptid)
884
-            }
885
-          }
886
-          if ((worktypeInfo == 'gzbx_jjhq' && assignDeptArr[0] != '1') && (worktypeInfo == 'gzbx_jjhq' && assignDeptArr[
887
-              0] != '4005')) {
888
-            if (assignDeptArr[0] == '2') {
889
-              this.getDeptByCode(this.deptMents, 'fenyuanqu')
890
-            }
891
-            if (assignDeptArr[0] == '3') {
892
-              this.getDeptByCode(this.deptMents, 'xiyuanqu')
893
-            }
894
-            if (assignDeptArr[0] == '4004') {
895
-              this.getDeptByCode(this.deptMents, 'JJHQ_DYQBZZ')
874
+          //清空
875
+          this.deptidArr = []
876
+          this.repairman = []
877
+          this.transferForm.tousercode = ''
878
+          this.dialogStatus.dialog_zhipai = true
879
+          //获取指派配置
880
+          const autoString = this.$store.getters.workTypeMap[parseInt(row.F_SonType)].autoDept
881
+          if(autoString){
882
+            const autoData = JSON.parse(this.$store.getters.workTypeMap[parseInt(row.F_SonType)].autoDept)
883
+            const applyHos = this.$store.getters.deptmap[parseInt(row.F_ProposerDept)].ids[0]
884
+            console.log(autoData,applyHos)
885
+            if(!autoData){
886
+              return
896 887
             }
897
-            if (assignDeptArr[0] == '4006') {
898
-              this.getDeptByCode(this.deptMents, 'JJHQ_NYQBZZ')
888
+            //院区id遍历
889
+            for(var i = 0;i<autoData.length;i++){
890
+              if(autoData[i].autoyq == applyHos){//有院区
891
+                this.deptidArr = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
892
+                this.transferForm.todept = autoData[i].autodept
893
+                this.getClassUser(autoData[i].autodept)
894
+                this.transferForm.tousercode = autoData[i].autousercode
895
+                return;
896
+              }else if(autoData[i].autoyq == '0'){//全部
897
+                this.deptidArr = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
898
+                this.transferForm.todept = autoData[i].autodept
899
+                this.getClassUser(autoData[i].autodept)
900
+                this.transferForm.tousercode = autoData[i].autousercode
901
+              }
899 902
             }
900
-            if (assignDeptArr[0] == '4008') {
901
-              this.getDeptByCode(this.deptMents, 'JJHQ_BYQBZZ')
903
+          }
904
+
905
+          // const deptid = this.$store.getters.workTypeMap[parseInt(row.F_SonType)].autoDept
906
+          // const typeArr = this.$store.getters.workTypeMap[parseInt(row.F_SonType)].ids
907
+          // const worktypeInfo = this.$store.getters.workTypeMap[parseInt(typeArr[1])].tag
908
+          // const assignDeptArr = this.$store.getters.deptmap[parseInt(row.F_ProposerDept)].ids
909
+          // console.log(deptid,worktypeInfo, assignDeptArr)
910
+          // if (worktypeInfo != 'gzbx_jjhq') {
911
+          //   if(deptid){
912
+          //     this.transferForm.todept = deptid
913
+          //     this.deptidArr = this.$store.getters.deptmap[parseInt(deptid)].ids
914
+          //     this.getClassUser(deptid)
915
+          //   }
916
+          // }
917
+          // if ((worktypeInfo == 'gzbx_jjhq' && assignDeptArr[0] != '1') && (worktypeInfo == 'gzbx_jjhq' && assignDeptArr[
918
+          //     0] != '4005')) {
919
+          //   if (assignDeptArr[0] == '2') {
920
+          //     this.getDeptByCode(this.deptMents, 'fenyuanqu')
921
+          //   }
922
+          //   if (assignDeptArr[0] == '3') {
923
+          //     this.getDeptByCode(this.deptMents, 'xiyuanqu')
924
+          //   }
925
+          //   if (assignDeptArr[0] == '4004') {
926
+          //     this.getDeptByCode(this.deptMents, 'JJHQ_DYQBZZ')
927
+          //   }
928
+          //   if (assignDeptArr[0] == '4006') {
929
+          //     this.getDeptByCode(this.deptMents, 'JJHQ_NYQBZZ')
930
+          //   }
931
+          //   if (assignDeptArr[0] == '4008') {
932
+          //     this.getDeptByCode(this.deptMents, 'JJHQ_BYQBZZ')
933
+          //   }
934
+          // } else {
935
+          //   if(deptid){
936
+          //     this.transferForm.todept = deptid
937
+          //     this.deptidArr = this.$store.getters.deptmap[parseInt(deptid)].ids
938
+          //     this.getClassUser(deptid)
939
+          //   }
940
+          // }
941
+        }
942
+        if (name === 'zhdd_zhipai') {
943
+          this.zhdddeptidArr = []
944
+          this.zhddrepairman = []
945
+          this.zhddtransferForm.DealMan = ''
946
+          this.dialogStatus.dialog_zhdd_zhipai = true
947
+          const autoString = this.$store.getters.workTypeMap[parseInt(row.F_SonType)].autoDept
948
+          if(autoString){
949
+            const autoData = JSON.parse(this.$store.getters.workTypeMap[parseInt(row.F_SonType)].autoDept)
950
+            const applyHos = this.$store.getters.deptmap[parseInt(row.F_ProposerDept)].ids[0]
951
+            console.log(autoData,applyHos)
952
+            if(!autoData){
953
+              return
902 954
             }
903
-          } else {
904
-            if(deptid){
905
-              this.transferForm.todept = deptid
906
-              this.deptidArr = this.$store.getters.deptmap[parseInt(deptid)].ids
907
-              this.getClassUser(deptid)
955
+            for(var i = 0;i<autoData.length;i++){
956
+              if(autoData[i].autoyq == applyHos){//有院区
957
+                this.zhdddeptidArr = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
958
+                this.zhddtransferForm.DealDept = autoData[i].autodept
959
+                this.getzhddClassUser(autoData[i].autodept)
960
+                this.zhddtransferForm.DealMan = autoData[i].autousercode
961
+                return;
962
+              }else if(autoData[i].autoyq == '0'){//全部
963
+                this.zhdddeptidArr = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
964
+                this.zhddtransferForm.DealDept = autoData[i].autodept
965
+                this.getzhddClassUser(autoData[i].autodept)
966
+                this.zhddtransferForm.DealMan = autoData[i].autousercode
967
+              }
908 968
             }
909 969
           }
970
+          // const zhdddeptid = this.$store.getters.workTypeMap[parseInt(row.F_SonType)].autoDept
971
+          // const zhddtypeArr = this.$store.getters.workTypeMap[parseInt(row.F_SonType)].ids
972
+          // this.zhddtransferForm.DealDept = zhdddeptid
973
+          // if (zhdddeptid) {
974
+          //   this.zhdddeptidArr = this.$store.getters.deptmap[parseInt(zhdddeptid)].ids
975
+          //   this.getzhddClassUser(zhdddeptid)
976
+          // }
910 977
         }
911
-        if (name === 'zhdd_zhipai') {
912
-          const zhdddeptid = this.$store.getters.workTypeMap[parseInt(row.F_SonType)].autoDept
913
-          const zhddtypeArr = this.$store.getters.workTypeMap[parseInt(row.F_SonType)].ids
914
-          this.zhddtransferForm.DealDept = zhdddeptid
915
-          if (zhdddeptid) {
916
-            this.zhdddeptidArr = this.$store.getters.deptmap[parseInt(zhdddeptid)].ids
917
-            this.getzhddClassUser(zhdddeptid)
978
+        if(name === 'dispatch_zhuanpai'){
979
+          this.dispatchdeptidArr = []
980
+          this.dispatchrepairman = []
981
+          this.dispatchtransferForm.DealMan = ''
982
+          this.dialogStatus.dialog_dispatch_zhuanpai = true
983
+          const autoString = this.$store.getters.workTypeMap[parseInt(row.F_WorkOrderCategory)].autoDept
984
+          if(autoString){
985
+            const autoData = JSON.parse(this.$store.getters.workTypeMap[parseInt(row.F_WorkOrderCategory)].autoDept)
986
+            const applyHos = this.$store.getters.deptmap[parseInt(row.F_ApplicationDept)].ids[0]
987
+            console.log(autoData,applyHos)
988
+            if(!autoData){
989
+              return
990
+            }
991
+            for(var i = 0;i<autoData.length;i++){
992
+              if(autoData[i].autoyq == applyHos){//有院区
993
+                this.dispatchdeptidArr = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
994
+                this.dispatchtransferForm.DealDept = autoData[i].autodept
995
+                this.getdispatchRepairman(autoData[i].autodept)
996
+                this.dispatchtransferForm.DealMan = autoData[i].autousercode
997
+                return;
998
+              }else if(autoData[i].autoyq == '0'){//全部
999
+                this.dispatchdeptidArr = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
1000
+                this.dispatchtransferForm.DealDept = autoData[i].autodept
1001
+                this.getdispatchRepairman(autoData[i].autodept)
1002
+                this.dispatchtransferForm.DealMan = autoData[i].autousercode
1003
+              }
1004
+            }
918 1005
           }
919 1006
         }
920 1007
         if (name === 'haocai' || name === 'pingjia') {
921 1008
           this.getHaocai()
922 1009
           this.getFileUrl()
923 1010
         }
924
-        // if (name === 'pingjia') {
925
-        //   this.getFileUrl()
926
-
927
-        // }
928 1011
         if (name === 'fanxiu') {
929 1012
           this.getReason('FXYY')
930 1013
         }
@@ -966,7 +1049,7 @@
966 1049
           } else {
967 1050
             this.dialogStatus[`dialog_${name}`] = true
968 1051
           }
969
-        } else {
1052
+        } else{
970 1053
           if (
971 1054
             this.dialogStatus[`dialog_${name}`].type &&
972 1055
             this.dialogStatus[`dialog_${name}`].type === 'confirm'

+ 42 - 12
CallCenterWeb.UI/RMYY/src/components/workOrder/dispatching/addOrEditDispatch.vue

@@ -463,17 +463,19 @@
463 463
 
464 464
         //默认
465 465
         if (this.orderTypeData.F_Type2) {
466
-          this.autodeptid = this.$store.getters.workTypeMap[parseInt(this.orderTypeData.F_Type2)].autoDept
467
-          if(this.autodeptid){
468
-            this.deptidArr1 = this.$store.getters.deptmap[parseInt(this.autodeptid)].ids
469
-            this.ruleForm.DealDept = this.$store.getters.workTypeMap[parseInt(this.orderTypeData.F_Type2)].autoDept
470
-            this.getClassUser(this.autodeptid)
471
-          }else{
472
-            this.deptidArr1 = []
473
-            this.repairman1 = []
474
-            this.ruleForm.DealDept = ''
475
-            this.ruleForm.clid = ''
476
-          }
466
+          this.getAuto()
467
+          // this.deptidArr1 = this.$store.getters.deptmap[parseInt(autodept)].ids
468
+          // this.autodeptid = this.$store.getters.workTypeMap[parseInt(this.orderTypeData.F_Type2)].autoDept
469
+          // if(this.autodeptid){
470
+          //   this.deptidArr1 = this.$store.getters.deptmap[parseInt(this.autodeptid)].ids
471
+          //   this.ruleForm.DealDept = this.$store.getters.workTypeMap[parseInt(this.orderTypeData.F_Type2)].autoDept
472
+          //   this.getClassUser(this.autodeptid)
473
+          // }else{
474
+          //   this.deptidArr1 = []
475
+          //   this.repairman1 = []
476
+          //   this.ruleForm.DealDept = ''
477
+          //   this.ruleForm.clid = ''
478
+          // }
477 479
         }
478 480
       }
479 481
     },
@@ -520,6 +522,31 @@
520 522
       // this.getUserData()
521 523
     },
522 524
     methods: {
525
+      getAuto(){
526
+        this.deptidArr1 = []
527
+        this.repairman1 = []
528
+        this.ruleForm.clid = ''
529
+        const autoData = JSON.parse(this.$store.getters.workTypeMap[parseInt(this.orderTypeData.F_Type2)].autoDept)
530
+        const applyHos = this.deptidArr[0]
531
+        console.log(autoData,applyHos)
532
+        if(!autoData){
533
+          return
534
+        }
535
+        for(var i = 0;i<autoData.length;i++){
536
+          if(autoData[i].autoyq == applyHos){//有院区
537
+            this.deptidArr1 = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
538
+            this.ruleForm.DealDept = autoData[i].autodept
539
+            this.getClassUser(autoData[i].autodept)
540
+            this.ruleForm.clid = autoData[i].autousercode
541
+            return;
542
+          }else if(autoData[i].autoyq == '0'){//全部
543
+            this.deptidArr1 = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
544
+            this.ruleForm.DealDept = autoData[i].autodept
545
+            this.getClassUser(autoData[i].autodept)
546
+            this.ruleForm.clid = autoData[i].autousercode
547
+          }
548
+        }
549
+      },
523 550
       changeMuter(data) {
524 551
 
525 552
       },
@@ -548,12 +575,13 @@
548 575
           const data = res.data
549 576
           this.ruleForm.ApplicationDept = data.F_DeptId
550 577
           this.deptidArr = this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids
578
+          this.getAuto()
551 579
           this.getRepairman(data.F_DeptId, 0)
552 580
           this.ruleForm.Applicant = data.F_UserCode
553 581
           this.ruleForm.phone = data.F_Telephone
554 582
           this.ruleForm.position = data.F_Location
555 583
           // this.ruleForm.toplace = data.F_Location
556
-        })
584
+        })      
557 585
       },
558 586
       getPlace() {
559 587
         GetDicValue('SDKS').then(res => {
@@ -576,10 +604,12 @@
576 604
         console.log(val)
577 605
       },
578 606
       getDeptid(data) {
607
+        this.deptidArr = data
579 608
         this.ruleForm.ApplicationDept = data[data.length - 1]
580 609
         this.ruleForm.Applicant = ''
581 610
         this.getRepairman(data[data.length - 1], 0)
582 611
         this.getDeptAddress(data[data.length - 1])
612
+        this.getAuto()
583 613
       },
584 614
       getDeptid1(data) {
585 615
         this.ruleForm.DealDept = data[data.length - 1]

+ 57 - 38
CallCenterWeb.UI/RMYY/src/components/workOrder/information/addOrEditInfOrder.vue

@@ -519,21 +519,6 @@ export default {
519 519
             ].tag;
520 520
         }
521 521
       }
522
-      if (this.ruleForm.F_Type2) {
523
-        this.autodeptid =
524
-          this.$store.getters.workTypeMap[
525
-            parseInt(this.ruleForm.F_Type2)
526
-          ].autoDept;
527
-        if (this.autodeptid) {
528
-          this.deptidArr1 =
529
-            this.$store.getters.deptmap[parseInt(this.autodeptid)].ids;
530
-        }
531
-        this.ruleForm.clbm =
532
-          this.$store.getters.workTypeMap[
533
-            parseInt(this.ruleForm.F_Type2)
534
-          ].autoDept;
535
-      }
536
-      this.getClassUser(this.autodeptid, this.orderTypeData.F_Type2);
537 522
       if (this.worktypeInfo3 === "ywzx_jy") {
538 523
         this.zpdptname = "建议科室";
539 524
         this.zppername = "建议人";
@@ -546,16 +531,32 @@ export default {
546 531
         this.zpdptname = "表扬科室";
547 532
         this.zppername = "表扬人";
548 533
       }
549
-      if (
550
-        this.worktypeInfo3 === "ywzx_jy" ||
551
-        this.worktypeInfo3 === "ywzx_ts" ||
552
-        this.worktypeInfo3 === "ywzx_by" ||
553
-        this.worktypeInfo3 === "ywzx_jtyy" ||
554
-        this.worktypeInfo3 === "ywzx_zjyy" ||
555
-        this.worktypeInfo3 === "ywzx_ysfw"
556
-      ) {
557
-        this.ruleForm.opt = "3";
534
+      if (this.ruleForm.F_Type2) {
535
+        this.getAuto()
536
+        // this.autodeptid =
537
+        //   this.$store.getters.workTypeMap[
538
+        //     parseInt(this.ruleForm.F_Type2)
539
+        //   ].autoDept;
540
+        // if (this.autodeptid) {
541
+        //   this.deptidArr1 =
542
+        //     this.$store.getters.deptmap[parseInt(this.autodeptid)].ids;
543
+        // }
544
+        // this.ruleForm.clbm =
545
+        //   this.$store.getters.workTypeMap[
546
+        //     parseInt(this.ruleForm.F_Type2)
547
+        //   ].autoDept;
558 548
       }
549
+      // this.getClassUser(this.autodeptid, this.orderTypeData.F_Type2);
550
+      // if (
551
+      //   this.worktypeInfo3 === "ywzx_jy" ||
552
+      //   this.worktypeInfo3 === "ywzx_ts" ||
553
+      //   this.worktypeInfo3 === "ywzx_by" ||
554
+      //   this.worktypeInfo3 === "ywzx_jtyy" ||
555
+      //   this.worktypeInfo3 === "ywzx_zjyy" ||
556
+      //   this.worktypeInfo3 === "ywzx_ysfw"
557
+      // ) {
558
+      //   this.ruleForm.opt = "3";
559
+      // }
559 560
     },
560 561
   },
561 562
   computed: {
@@ -584,6 +585,25 @@ export default {
584 585
     this.getRelations();
585 586
   },
586 587
   methods: {
588
+    getAuto(){
589
+      this.deptidArr1 = []
590
+      this.repairman1 = []
591
+      this.ruleForm.clid = ''
592
+      const autoData = JSON.parse(this.$store.getters.workTypeMap[parseInt(this.orderTypeData.F_Type2)].autoDept)
593
+      console.log(autoData)
594
+      if(!autoData){
595
+        return
596
+      }
597
+      for(var i = 0;i<autoData.length;i++){
598
+        if(autoData[i].autoyq == '0'){//全部
599
+          this.ruleForm.opt = "3";
600
+          this.deptidArr1 = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
601
+          this.ruleForm.clbm = autoData[i].autodept
602
+          this.getClassUser(autoData[i].autodept)
603
+          this.ruleForm.clid = autoData[i].autousercode
604
+        }
605
+      }
606
+    },
587 607
     getOldMsg() {
588 608
       const params = {
589 609
         pageindex: 1,
@@ -648,10 +668,9 @@ export default {
648 668
 
649 669
       return index >= 0;
650 670
     },
651
-    getClassUser(id, type) {
652
-      console.log(id, "id");
653
-      if (!type) return;
654
-      this.ruleForm.clid = "";
671
+    getClassUser(id) {
672
+      // if (!type) return;
673
+      // this.ruleForm.clid = "";
655 674
       const params = {
656 675
         deptid: id,
657 676
       };
@@ -662,16 +681,16 @@ export default {
662 681
           this.repairman1 = res.rows;
663 682
         });
664 683
       }
665
-      if (this.includeType(type, "ywzx_zjyy")) {
666
-        this.ruleForm.clid = this.$store.getters.serverConfig.ZJYY_CODE;
667
-      }
668
-      if (this.includeType(type, "ywzx_ysfw")) {
669
-        console.log("ysfw");
670
-        this.ruleForm.clid = this.$store.getters.serverConfig.YSFW_CODE;
671
-      }
672
-      if (this.includeType(type, "ywzx_ts,ywzx_jy,ywzx_by")) {
673
-        this.ruleForm.clid = this.$store.getters.serverConfig.TSJYBY_CODE;
674
-      }
684
+      // if (this.includeType(type, "ywzx_zjyy")) {
685
+      //   this.ruleForm.clid = this.$store.getters.serverConfig.ZJYY_CODE;
686
+      // }
687
+      // if (this.includeType(type, "ywzx_ysfw")) {
688
+      //   console.log("ysfw");
689
+      //   this.ruleForm.clid = this.$store.getters.serverConfig.YSFW_CODE;
690
+      // }
691
+      // if (this.includeType(type, "ywzx_ts,ywzx_jy,ywzx_by")) {
692
+      //   this.ruleForm.clid = this.$store.getters.serverConfig.TSJYBY_CODE;
693
+      // }
675 694
     },
676 695
     changeName(id) {
677 696
       const twoTypeInfo = this.$store.getters.workTypeMap[parseInt(id)];

+ 84 - 57
CallCenterWeb.UI/RMYY/src/components/workOrder/repairbase/addRepairbase.vue

@@ -249,62 +249,65 @@
249 249
       'orderTypeData.F_Type2': function() {
250 250
         this.ruleForm.repairOrderType = this.orderTypeData.F_Type2
251 251
         this.worktypeInfo = this.$store.getters.workTypeMap[parseInt(this.orderTypeData.type2Arr[0])].tag
252
-        this.autodeptid = this.$store.getters.workTypeMap[parseInt(this.ruleForm.repairOrderType)].autoDept
253
-        console.log(this.autodeptid , 'this.autodeptid ');
254
-        // console.log(this.ruleForm.repairOrderType,this.worktypeInfo,this.autodeptid)
255
-        if(this.worktypeInfo != 'gzbx_jjhq'){
256
-          this.ruleForm.assignDepart = this.$store.getters.workTypeMap[parseInt(this.ruleForm.repairOrderType)].autoDept
257
-          this.assignArr = this.$store.getters.deptmap[parseInt(this.autodeptid)].ids
258
-          this.getClassUser()
259
-        }
260
-        if((this.worktypeInfo == 'gzbx_jjhq' && this.deptidArr[0] != '1') && (this.worktypeInfo == 'gzbx_jjhq' && this.deptidArr[0] != '4005')){//基建类申请人不是总院
261
-          console.log(123123);
262
-          if(this.deptidArr[0] == '2'){//2分院3西院4004东院区4006南院区4008北院区
263
-            this.getDeptByCode(this.deptMents,'fenyuanqu')
264
-          }
265
-          if(this.deptidArr[0] == '3'){//2分院3西院
266
-            this.getDeptByCode(this.deptMents,'xiyuanqu')
267
-          }
268
-          if(this.deptidArr[0] == '4004'){//4004东院区
269
-            this.getDeptByCode(this.deptMents,'JJHQ_DYQBZZ')
270
-          }
271
-          if(this.deptidArr[0] == '4006'){//4006南院区
272
-            this.getDeptByCode(this.deptMents,'JJHQ_NYQBZZ')
273
-          }
274
-          if(this.deptidArr[0] == '4008'){//4008北院区
275
-            this.getDeptByCode(this.deptMents,'JJHQ_BYQBZZ')
276
-          }
277
-        }else{
278
-          console.log(1333333123);
279
-          this.ruleForm.assignDepart = this.$store.getters.workTypeMap[parseInt(this.ruleForm.repairOrderType)].autoDept
280
-          this.assignArr = this.$store.getters.deptmap[parseInt(this.autodeptid)].ids
281
-          this.getClassUser()
252
+        // this.autodeptid = this.$store.getters.workTypeMap[parseInt(this.ruleForm.repairOrderType)].autoDept
253
+        //默认
254
+        if(this.orderTypeData.F_Type2){
255
+          this.getAuto()
282 256
         }
257
+        // console.log(this.ruleForm.repairOrderType,this.worktypeInfo,this.autodeptid)
258
+        // if(this.worktypeInfo != 'gzbx_jjhq'){
259
+        //   this.ruleForm.assignDepart = this.$store.getters.workTypeMap[parseInt(this.ruleForm.repairOrderType)].autoDept
260
+        //   this.assignArr = this.$store.getters.deptmap[parseInt(this.autodeptid)].ids
261
+        //   this.getClassUser()
262
+        // }
263
+        // if((this.worktypeInfo == 'gzbx_jjhq' && this.deptidArr[0] != '1') && (this.worktypeInfo == 'gzbx_jjhq' && this.deptidArr[0] != '4005')){//基建类申请人不是总院
264
+        //   console.log(123123);
265
+        //   if(this.deptidArr[0] == '2'){//2分院3西院4004东院区4006南院区4008北院区
266
+        //     this.getDeptByCode(this.deptMents,'fenyuanqu')
267
+        //   }
268
+        //   if(this.deptidArr[0] == '3'){//2分院3西院
269
+        //     this.getDeptByCode(this.deptMents,'xiyuanqu')
270
+        //   }
271
+        //   if(this.deptidArr[0] == '4004'){//4004东院区
272
+        //     this.getDeptByCode(this.deptMents,'JJHQ_DYQBZZ')
273
+        //   }
274
+        //   if(this.deptidArr[0] == '4006'){//4006南院区
275
+        //     this.getDeptByCode(this.deptMents,'JJHQ_NYQBZZ')
276
+        //   }
277
+        //   if(this.deptidArr[0] == '4008'){//4008北院区
278
+        //     this.getDeptByCode(this.deptMents,'JJHQ_BYQBZZ')
279
+        //   }
280
+        // }else{
281
+        //   console.log(1333333123);
282
+        //   this.ruleForm.assignDepart = this.$store.getters.workTypeMap[parseInt(this.ruleForm.repairOrderType)].autoDept
283
+        //   this.assignArr = this.$store.getters.deptmap[parseInt(this.autodeptid)].ids
284
+        //   this.getClassUser()
285
+        // }
283 286
       },
284
-      'deptidArr':function(){
285
-        if((this.worktypeInfo == 'gzbx_jjhq' && this.deptidArr[0] != '1') && (this.worktypeInfo == 'gzbx_jjhq' && this.deptidArr[0] != '4005')){//基建类申请人不是总院
286
-          if(this.deptidArr[0] == '2'){//2分院3西院
287
-            this.getDeptByCode(this.deptMents,'fenyuanqu')
288
-          }
289
-          if(this.deptidArr[0] == '3'){//2分院3西院
290
-            this.getDeptByCode(this.deptMents,'xiyuanqu')
291
-          }
292
-          if(this.deptidArr[0] == '4004'){//4004东院区
293
-            this.getDeptByCode(this.deptMents,'JJHQ_DYQBZZ')
294
-          }
295
-          if(this.deptidArr[0] == '4006'){//4006南院区
296
-            this.getDeptByCode(this.deptMents,'JJHQ_NYQBZZ')
297
-          }
298
-          if(this.deptidArr[0] == '4008'){//4008北院区
299
-            this.getDeptByCode(this.deptMents,'JJHQ_BYQBZZ')
300
-          }
301
-        }else{
302
-          // console.log(this.$store.getters.deptmap[parseInt(this.autodeptid)].ids,'9999')
303
-          this.assignArr = this.$store.getters.deptmap[parseInt(this.autodeptid)].ids
304
-          this.ruleForm.assignDepart = this.$store.getters.workTypeMap[parseInt(this.ruleForm.repairOrderType)].autoDept
305
-          this.getClassUser()
306
-        }
307
-      }
287
+      // 'deptidArr':function(){
288
+      //   if((this.worktypeInfo == 'gzbx_jjhq' && this.deptidArr[0] != '1') && (this.worktypeInfo == 'gzbx_jjhq' && this.deptidArr[0] != '4005')){//基建类申请人不是总院
289
+      //     if(this.deptidArr[0] == '2'){//2分院3西院
290
+      //       this.getDeptByCode(this.deptMents,'fenyuanqu')
291
+      //     }
292
+      //     if(this.deptidArr[0] == '3'){//2分院3西院
293
+      //       this.getDeptByCode(this.deptMents,'xiyuanqu')
294
+      //     }
295
+      //     if(this.deptidArr[0] == '4004'){//4004东院区
296
+      //       this.getDeptByCode(this.deptMents,'JJHQ_DYQBZZ')
297
+      //     }
298
+      //     if(this.deptidArr[0] == '4006'){//4006南院区
299
+      //       this.getDeptByCode(this.deptMents,'JJHQ_NYQBZZ')
300
+      //     }
301
+      //     if(this.deptidArr[0] == '4008'){//4008北院区
302
+      //       this.getDeptByCode(this.deptMents,'JJHQ_BYQBZZ')
303
+      //     }
304
+      //   }else{
305
+      //     // console.log(this.$store.getters.deptmap[parseInt(this.autodeptid)].ids,'9999')
306
+      //     this.assignArr = this.$store.getters.deptmap[parseInt(this.autodeptid)].ids
307
+      //     this.ruleForm.assignDepart = this.$store.getters.workTypeMap[parseInt(this.ruleForm.repairOrderType)].autoDept
308
+      //     this.getClassUser()
309
+      //   }
310
+      // }
308 311
     },
309 312
     computed: {
310 313
       ...mapGetters([
@@ -332,6 +335,31 @@
332 335
       }
333 336
     },
334 337
     methods: {
338
+      getAuto(){
339
+        this.assignArr = []
340
+        this.assignman = []
341
+        this.ruleForm.assignMant = ''
342
+        const autoData = JSON.parse(this.$store.getters.workTypeMap[parseInt(this.orderTypeData.F_Type2)].autoDept)
343
+        const applyHos = this.deptidArr[0]
344
+        console.log(autoData,applyHos)
345
+        if(!autoData){
346
+          return
347
+        }
348
+        for(var i = 0;i<autoData.length;i++){
349
+          if(autoData[i].autoyq == applyHos){//有院区
350
+            this.assignArr = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
351
+            this.ruleForm.assignDepart = autoData[i].autodept
352
+            this.getClassUserArr(autoData[i].autodept)
353
+            this.ruleForm.assignMant = autoData[i].autousercode
354
+            return;
355
+          }else if(autoData[i].autoyq == '0'){//全部
356
+            this.assignArr = this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids
357
+            this.ruleForm.assignDepart = autoData[i].autodept
358
+            this.getClassUserArr(autoData[i].autodept)
359
+            this.ruleForm.assignMant = autoData[i].autousercode
360
+          }
361
+        }
362
+      },
335 363
       getUserData() {
336 364
         if(!this.usercodeSearch){
337 365
           return;
@@ -343,6 +371,7 @@
343 371
           const data = res.data
344 372
           this.ruleForm.repairDeptid = data.F_DeptId
345 373
           this.deptidArr = this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids
374
+          this.getAuto()
346 375
           this.getRepairman(data.F_DeptId, 0)
347 376
           this.ruleForm.repairmanid = data.F_UserCode
348 377
           this.ruleForm.repairmanphone = data.F_Telephone
@@ -357,13 +386,11 @@
357 386
         this.ruleForm.repairmanid = ''
358 387
         this.getRepairman(this.ruleForm.repairDeptid, 0)
359 388
         this.getDeptAddress(data[data.length - 1])
389
+        this.getAuto()
360 390
       },
361 391
       geAssigntDeptid(data) {
362 392
         this.ruleForm.assignDepart = data[data.length - 1]
363
-        // this.assignArr = data
364
-        // this.ruleForm.assignMant = ''
365 393
         this.getClassUserArr(data[data.length - 1])
366
-        // this.getRepairman(this.ruleForm.assignDepart, 1)
367 394
       },
368 395
       getDeptAddress(id){
369 396
         getTypeDetail(id).then(res=>{

+ 12 - 8
CallCenterWeb.UI/RMYY/src/views/systemSetup/sysSetting/orderTypeManage/addOrEditOrderType.vue

@@ -34,7 +34,7 @@
34 34
           </el-select>
35 35
           <el-cascader ref="cascader" :span="24" v-model="item.autodept" :options="orderData" :props="defaultProps"
36 36
             style="width: 30%;" placeholder="请选择科室" filterable clearable @change="(autodept)=>handleChangeDept(autodept,index)"/>
37
-          <el-select v-model="item.autousercode" filterable placeholder="请选择人员" style="width: 30%">
37
+          <el-select v-model="item.autousercode" filterable clearable placeholder="请选择人员" style="width: 30%">
38 38
             <el-option v-for="itemper in autolist[index].personarr" :key="itemper.usercode" :label="itemper.username" :value="itemper.usercode" />
39 39
           </el-select>
40 40
           <el-button v-if="index==0" type="primary" icon="el-icon-plus" circle @click="addItem()"></el-button>
@@ -226,13 +226,17 @@
226 226
       },
227 227
       submitForm() {
228 228
         var autoarr = []
229
-        this.autolist.find(item=>{
230
-          autoarr.push({
231
-            autoyq: item.autoyq,
232
-            autodept: item.autodept,
233
-            autousercode: item.autousercode,
229
+        if(this.autolist && this.autolist[0].autoyq && this.autolist[0].autodept){
230
+          this.autolist.find(item=>{
231
+            autoarr.push({
232
+              autoyq: item.autoyq,
233
+              autodept: item.autodept,
234
+              autousercode: item.autousercode,
235
+            })
234 236
           })
235
-        })
237
+        }else{
238
+          autoarr = ''
239
+        }
236 240
         console.log(autoarr)
237 241
         // return;
238 242
         this.$refs.ruleForm.validate((valid) => {
@@ -300,7 +304,7 @@
300 304
             this.ruleForm.F_Identification = res.identification
301 305
             this.ruleForm.F_CanReplayCount = res.canreplaycount
302 306
             this.ruleForm.F_CanUrgeCount = res.canurgecount
303
-            if (res.autodept) {
307
+            if (res.autodept && JSON.parse(res.autodept)[0].autoyq) {
304 308
               this.autolist = JSON.parse(res.autodept)
305 309
               console.log(JSON.parse(res.autodept))
306 310
               for(var i = 0;i<this.autolist.length;i++){

+ 13 - 5
CallCenterWeb.UI/RMYYAPP/pages/components/orderSelect/orderSelect.vue

@@ -12,7 +12,8 @@
12 12
 				WorkOrderCategory: '',
13 13
 				orderList: [],
14 14
 				identification: '',
15
-				dataOrderType: []
15
+				dataOrderType: [],
16
+				autoData:[]
16 17
 			}
17 18
 		},
18 19
 		props: {
@@ -55,11 +56,18 @@
55 56
 			},
56 57
 			nodeclick(data) {
57 58
 				this.order = data.value
58
-				console.log(this.orderList)
59
+				// console.log(this.orderList)
59 60
 				this.identification = this.$mHelper.getIdentification(this.orderList,data.value)
60
-				console.log(this.identification )
61
-				console.log(data, 'data')
62
-				this.$emit('post-select-data',data.value,data.id,data.orderType,this.identification, data.text)
61
+				// console.log(this.identification )
62
+				// console.log(data, 'data')
63
+				this.$http.get("GongDanType/GetModule", {mId:data.value}).then((response) => {
64
+					if (response.state.toLowerCase() === "success") {
65
+						if(response.data.autodept!=''){
66
+							this.autoData = JSON.parse(response.data.autodept)
67
+				            this.$emit('post-select-data',data.value,data.id,data.orderType,this.identification, data.text,this.autoData)
68
+						}
69
+					}
70
+				})
63 71
 			},
64 72
 			popupclosed() {
65 73
 				this.WorkOrderCategory = this.order

+ 11 - 0
CallCenterWeb.UI/RMYYAPP/pages/login/login.vue

@@ -25,6 +25,7 @@
25 25
 	import CryptoJS from '@/static/js/crypto-js/crypto-js.js'
26 26
 	import md5 from '@/static/js/md5/md5.js'
27 27
 	import { encrypt, decrypt } from "@/utils/jsencrypt";
28
+	import pageData from '../myTask/repairList/addRepair/pageData.js'
28 29
 	// import JSEncrypt from '@/static/js/JSEncrypt/JSEncrypt.js'
29 30
 	export default {
30 31
 		data() {
@@ -47,6 +48,7 @@
47 48
 
48 49
 		methods: {
49 50
 			startLogin(e) {
51
+				this.saveDept()
50 52
 				//登录
51 53
 				if (this.isRotate) {
52 54
 					//判断是否加载中,避免重复点击请求
@@ -111,6 +113,15 @@
111 113
 				uni.navigateTo({
112 114
 					url: '/pages/register/register'
113 115
 				})
116
+			},
117
+			saveDept(){
118
+				pageData.getDet((res, data) => {
119
+					// this.departList = data
120
+					// this.deptDataTree = res
121
+					// this.assignedDepartData = res
122
+					window.localStorage.setItem('deptTreeData',JSON.stringify(res))
123
+					window.localStorage.setItem('deptAllList',JSON.stringify(data))
124
+				})
114 125
 			}
115 126
 			
116 127
 		}

+ 11 - 5
CallCenterWeb.UI/RMYYAPP/pages/myTask/comDispatch/comDispatchDetail/comDispatchDetail.vue

@@ -124,7 +124,7 @@
124 124
 			<view>
125 125
 				<text class="operationButtonTitle">操作</text>
126 126
 				<buttonsComponents class="buttons" :order-button-data="orderButtonData" :wid="workorderid"
127
-					:orderType="detailContentData.F_WorkOrderCategory" :departid="departid"
127
+					:orderType="workOrdertype" :departid="departid" :applicationDept="applicationDept"
128 128
 					:maintenancer="$mHelper.findUserName(userCodeList,detailContentData.F_Maintenancer) " />
129 129
 			</view>
130 130
 		</view>
@@ -221,6 +221,8 @@
221 221
 				detailContentData: {}, // 详情内容
222 222
 				orderButtonData: [],
223 223
 				departid: '',
224
+				applicationDept:'',
225
+				workOrdertype:'',
224 226
 				evaluateDate: [], // 评价
225 227
 				orderProcessDate: [], // 工单流程
226 228
 				workOrderButton: [], // 工单按钮权限
@@ -262,10 +264,11 @@
262 264
 					}
263 265
 				})
264 266
 			}
265
-			pageData.getDet((res, data) => {
266
-				console.log(data)
267
-				this.departList = data
268
-			})
267
+			// pageData.getDet((res, data) => {
268
+			// 	console.log(data)
269
+			// 	this.departList = data
270
+			// })
271
+			this.departList = JSON.parse(window.localStorage.getItem('deptAllList'))
269 272
 			pageData.getApplicant('', (res) => {
270 273
 				this.userCodeList = res
271 274
 			})
@@ -359,6 +362,9 @@
359 362
 					if (response.state.toLowerCase() === "success") {
360 363
 						if (type == 0) {
361 364
 							this.detailContentData = response.data[0]
365
+							console.log(this.detailContentData.F_WorkOrderCategory,'88999')
366
+							this.workOrdertype = this.detailContentData.F_WorkOrderCategory
367
+							this.applicationDept = this.detailContentData.F_ApplicationDept
362 368
 						} else if (type == 1) {
363 369
 							this.orderProcessDate = []
364 370
 							response.data.forEach(v => {

+ 178 - 76
CallCenterWeb.UI/RMYYAPP/pages/myTask/repairList/addRepair/addRepair.vue

@@ -5,22 +5,25 @@
5 5
 			<!-- 基础表单校验 -->
6 6
 			<uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData">
7 7
 				<uni-forms-item label="工单类别" required name="WorkOrderCategory">
8
-					<order-select :orderType="valiFormData.WorkOrderCategory" @post-select-data="postSelectData" :typeid="3000"></order-select>
9
-				</uni-forms-item> 
10
-				<uni-forms-item label="设备资产编码" required  name="epCode" v-show="showsb==true">
8
+					<order-select :orderType="valiFormData.WorkOrderCategory" @post-select-data="postSelectData"
9
+						:typeid="3000"></order-select>
10
+				</uni-forms-item>
11
+				<uni-forms-item label="设备资产编码" required name="epCode" v-show="showsb==true">
11 12
 					<uni-easyinput v-model="valiFormData.epCode" placeholder="请输入设备资产编码" />
12 13
 				</uni-forms-item>
13 14
 				<uni-forms-item label="报修内容" required name="Content">
14 15
 					<uni-easyinput type="textarea" v-model="valiFormData.Content" placeholder="请输入报修内容" />
15 16
 				</uni-forms-item>
16 17
 				<uni-forms-item label="报修科室" required name="ApplicationDept">
17
-					<uni-data-picker :showSearch= "showSearch" placeholder="请选择报修科室" :localdata="deptDataTree" v-model="valiFormData.ApplicationDept" @nodeclick="deptNodeclick">
18
+					<uni-data-picker :showSearch="showSearch" placeholder="请选择报修科室" :localdata="deptDataTree"
19
+						v-model="valiFormData.ApplicationDept" @nodeclick="deptNodeclick">
18 20
 					</uni-data-picker>
19 21
 				</uni-forms-item>
20 22
 				<uni-forms-item label="报修人" required name="Applicant">
21
-					<uni-combox :candidates="candidates" placeholder="输入选择报修人"  @input="handleBX" v-model="valiFormData.ApplicantName"></uni-combox>
23
+					<uni-combox :candidates="candidates" placeholder="输入选择报修人" @input="handleBX"
24
+						v-model="valiFormData.ApplicantName"></uni-combox>
22 25
 				</uni-forms-item>
23
-				<uni-forms-item label="报修电话"  name="Applicantsphone">
26
+				<uni-forms-item label="报修电话" name="Applicantsphone">
24 27
 					<uni-easyinput v-model="valiFormData.Applicantsphone" placeholder="请输入报修电话" />
25 28
 				</uni-forms-item>
26 29
 				<uni-forms-item label="联系电话" required name="Phone">
@@ -32,21 +35,24 @@
32 35
 				<uni-forms-item label="紧急程度" name="EmergencyTypes">
33 36
 					<uni-data-checkbox v-model="valiFormData.EmergencyTypes" :localdata="EmergencyTypesList" />
34 37
 				</uni-forms-item>
35
-				<uni-forms-item label="附件"  name="">
38
+				<uni-forms-item label="附件" name="">
36 39
 					<view class="example-body">
37 40
 						<upload @post-string-data="getImgData" :imgUrlList="imgUrlList"></upload>
38 41
 					</view>
39 42
 				</uni-forms-item>
40 43
 				<div v-show="isShowIsEnd">
41
-					<uni-forms-item label="下步流程"  name="IsEnd">
44
+					<uni-forms-item label="下步流程" name="IsEnd">
42 45
 						<uni-data-checkbox v-model="valiFormData.IsEnd" :localdata="stepData"></uni-data-checkbox>
43 46
 					</uni-forms-item>
44
-					<uni-forms-item label="指派部门" name="MaintenanceDept" v-show="valiFormData.IsEnd === 0" >
45
-						<uni-data-picker placeholder="请选择指派科室" :showSearch= "showSearch" :localdata="assignedDepartData" :readonly="readonly" v-model="valiFormData.MaintenanceDept" @nodeclick="maintenanceNodeclick">
47
+					<uni-forms-item label="指派部门" name="MaintenanceDept" v-show="valiFormData.IsEnd === 0">
48
+						<uni-data-picker placeholder="请选择指派科室" :showSearch="showSearch" :localdata="assignedDepartData"
49
+							:readonly="readonly" v-model="valiFormData.MaintenanceDept"
50
+							@nodeclick="maintenanceNodeclick">
46 51
 						</uni-data-picker>
47 52
 					</uni-forms-item>
48
-					<uni-forms-item label="指派人"  name="Maintenancer" v-show="valiFormData.IsEnd === 0">
49
-						<uni-combox :candidates="candidatesDesignate" placeholder="输入选择报修人"  @input="handleZP" v-model="valiFormData.MaintenancerName"></uni-combox>
53
+					<uni-forms-item label="指派人" name="Maintenancer" v-show="valiFormData.IsEnd === 0">
54
+						<uni-combox :candidates="candidatesDesignate" placeholder="输入选择报修人" @input="handleZP"
55
+							v-model="valiFormData.MaintenancerName"></uni-combox>
50 56
 					</uni-forms-item>
51 57
 				</div>
52 58
 			</uni-forms>
@@ -68,16 +74,17 @@
68 74
 
69 75
 	export default {
70 76
 		components: {
71
-			upload,orderSelect
77
+			upload,
78
+			orderSelect
72 79
 		},
73 80
 		data() {
74 81
 			return {
75
-				getFontSizeValue:'1rem',
76
-				showsb:false,
82
+				getFontSizeValue: '1rem',
83
+				showsb: false,
77 84
 				showSearch: true,
78 85
 				isShowIsEnd: false,
79 86
 				readonly: false,
80
-				disabledButton:false,
87
+				disabledButton: false,
81 88
 				// 校验表单数据
82 89
 				valiFormData: {
83 90
 					WorkOrderCategory: '', //工单类别
@@ -91,16 +98,16 @@
91 98
 					IsEnd: 0,
92 99
 					File: '', //	文件
93 100
 					MaintenanceDept: '', //	维修部门
94
-					Maintenancer: '' ,//	维修人
101
+					Maintenancer: '', //	维修人
95 102
 					MaintenancerName: '',
96 103
 					epCode: '',
97 104
 					EmergencyTypes: '一般'
98
-					
105
+
99 106
 				},
100 107
 				EmergencyTypesList: [{
101 108
 					text: '一般',
102 109
 					value: '一般'
103
-				},{
110
+				}, {
104 111
 					text: '紧急',
105 112
 					value: '紧急'
106 113
 				}],
@@ -120,7 +127,9 @@
120 127
 				orderApplicantData: [],
121 128
 				departList: [],
122 129
 				candidates: [],
123
-				candidatesDesignate:[],
130
+				candidatesDesignate: [],
131
+				hosptalList:[],
132
+				auto:[],
124 133
 				// 校验规则
125 134
 				rules: {
126 135
 					WorkOrderCategory: {
@@ -163,33 +172,35 @@
163 172
 			}
164 173
 		},
165 174
 		onLoad(option) {
166
-			this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
175
+			this.getHosptallist()
176
+			this.getFontSizeValue = uni.getStorageSync('fontSizeValue') + 'rem'
167 177
 			this.valiFormData.ApplicationDept = uni.getStorageSync("deptId")
168
-			pageData.getApplicant(uni.getStorageSync("deptId"), (res,data,candidates) => {
178
+			pageData.getApplicant(uni.getStorageSync("deptId"), (res, data, candidates) => {
169 179
 				this.candidates = candidates
170 180
 				this.ApplicantData = res
171 181
 				this.valiFormData.Applicant = uni.getStorageSync("userCode")
172
-				this.valiFormData.ApplicantName = this.$mHelper.findUserName(this.ApplicantData, uni.getStorageSync("userCode"))
182
+				this.valiFormData.ApplicantName = this.$mHelper.findUserName(this.ApplicantData, uni
183
+					.getStorageSync("userCode"))
173 184
 				this.orderApplicantData = data
174 185
 				const user = this.orderApplicantData.find((o) => {
175 186
 					return o.usercode === uni.getStorageSync("userCode").toString()
176 187
 				})
177
-				if(user) {
188
+				if (user) {
178 189
 					this.valiFormData.Applicantsphone = user.usertelphone
179 190
 					this.valiFormData.Phone = user.usertelphone
180 191
 				}
181 192
 			})
182 193
 			this.getLocation(uni.getStorageSync("userCode"))
183 194
 			// 维修员下步流程指派的时候只能指派给自己部门
184
-			if(uni.getStorageSync("roleCode") == 'GLY' || uni.getStorageSync("roleCode") == 'WXY') {
195
+			if (uni.getStorageSync("roleCode") == 'GLY' || uni.getStorageSync("roleCode") == 'WXY') {
185 196
 				this.isShowIsEnd = true
186
-				if(uni.getStorageSync("roleCode") == 'WXY') {
197
+				if (uni.getStorageSync("roleCode") == 'WXY') {
187 198
 					this.readonly = true
188
-					this.valiFormData.MaintenanceDept = uni.getStorageSync("deptId")
189
-					pageData.getPersonByDeptId(uni.getStorageSync("deptId"), (res,data,candidates) => {
199
+					// this.valiFormData.MaintenanceDept = uni.getStorageSync("deptId")
200
+					// pageData.getPersonByDeptId(uni.getStorageSync("deptId"), (res, data, candidates) => {
190 201
 						// this.candidates = candidates
191
-						this.candidatesDesignate = candidates
192
-						this.MaintenancerData = res
202
+						// this.candidatesDesignate = candidates
203
+						// this.MaintenancerData = res
193 204
 						// this.ApplicantData = res
194 205
 						// this.orderApplicantData = data
195 206
 						// this.valiFormData.Applicant = uni.getStorageSync("userCode")
@@ -201,45 +212,125 @@
201 212
 						// 	this.valiFormData.Phone = user.usertelphone
202 213
 						// }
203 214
 						// this.getLocation(this.valiFormData.Applicant)
204
-					})
215
+					// })
205 216
 				}
206 217
 			}
207 218
 			this.workorderid = option.wid
208 219
 			// 部门数据
209
-			pageData.getDet((res,data) => {
220
+			pageData.getDet((res, data) => {
210 221
 				this.departList = data
211 222
 				this.deptDataTree = res
212
-				console.log(this.departList)
213 223
 				this.assignedDepartData = res
214 224
 			})
215
-			if(this.workorderid) {
225
+			if (this.workorderid) {
216 226
 				this.getDetail()
217 227
 			}
218 228
 		},
219 229
 		watch: {
220 230
 			'departList': function() {
221
-				console.log(this.$mHelper.findParents(this.departList,this.valiFormData.ApplicationDept))
222
-				this.valiFormData.ApplicationDept = this.$mHelper.findParents(this.departList,this.valiFormData.ApplicationDept).split('/').length + '_'+ this.valiFormData.ApplicationDept
223
-				this.valiFormData.MaintenanceDept = this.$mHelper.findParents(this.departList,this.valiFormData.MaintenanceDept).split('/').length + '_'+ this.valiFormData.MaintenanceDept
231
+				console.log(this.$mHelper.findParents(this.departList, this.valiFormData.ApplicationDept))
232
+				this.valiFormData.ApplicationDept = this.$mHelper.findParents(this.departList, this.valiFormData
233
+					.ApplicationDept).split('/').length + '_' + this.valiFormData.ApplicationDept
234
+				// this.valiFormData.MaintenanceDept = this.$mHelper.findParents(this.departList, this.valiFormData
235
+				// 	.MaintenanceDept).split('/').length + '_' + this.valiFormData.MaintenanceDept
224 236
 			}
225 237
 		},
226 238
 		methods: {
239
+			// 获取院区数据
240
+			getHosptallist() {
241
+				const params = {
242
+					pageindex: 1,
243
+					pagesise: 10000
244
+				}
245
+				this.$http.get("Worepair/GetListyqRepairlist",params).then((res)=>{
246
+					if(res.state.toLowerCase() ==="success"){
247
+						this.hosptalList = res.rows
248
+					}
249
+				})
250
+			},
251
+			// 通过名字获取院区编号
252
+			getHosptalId(name) {
253
+				let id = 0;
254
+				this.hosptalList.forEach(v => {
255
+					if(v.T_Woname == name){
256
+						id = v.T_Woid
257
+					}
258
+				})
259
+				return id
260
+			},
227 261
 			// 工单类别
228
-			postSelectData(e,inf,orderType,biaoshi) {
229
-				console.log(e,inf,orderType,biaoshi)
230
-				if(biaoshi.indexOf('gzbx_sb') >= 0){
262
+			postSelectData(e, inf, orderType, biaoshi, text, auto) {
263
+				this.valiFormData.MaintenanceDept = ''
264
+				this.candidatesDesignate = []
265
+				this.MaintenancerData = []
266
+				this.valiFormData.Maintenancer = ''
267
+				this.valiFormData.MaintenancerName = ''
268
+				this.auto = auto
269
+				console.log(this.auto,'88888888899999999')
270
+				if (biaoshi.indexOf('gzbx_sb') >= 0) {
231 271
 					this.showsb = true
232
-				}else{
272
+				} else {
233 273
 					this.showsb = false
234 274
 				}
235
-				if(orderType == 2) {
275
+				if (orderType == 2) {
236 276
 					this.orderInf = inf
237 277
 				}
238 278
 				this.valiFormData.WorkOrderCategory = e
279
+				if(this.auto){					
280
+				    this.getAuto()
281
+				}
282
+			},
283
+			getAuto(){
284
+				//清空
285
+				this.valiFormData.MaintenanceDept = ''
286
+				this.candidatesDesignate = []
287
+				this.MaintenancerData = []
288
+				this.valiFormData.Maintenancer = ''
289
+				this.valiFormData.MaintenancerName = ''
290
+				//申请人院区
291
+				const applyHos = this.getHosptalId(this.$mHelper.findParents(this.departList,this.valiFormData.ApplicationDept.split('_')[1]).split('/')[0])
292
+				console.log(applyHos,'院区')
293
+				if(applyHos == 0){
294
+					return
295
+				}
296
+				//遍历
297
+				for (var i = 0; i < this.auto.length; i++) {
298
+					if (this.auto[i].autoyq == applyHos) {
299
+						var aotocode = this.auto[i].autousercode
300
+						this.valiFormData.MaintenanceDept = this.$mHelper.findParents(this.departList, this.auto[i].autodept)
301
+							.split('/').length + '_' + this.auto[i].autodept
302
+						pageData.getApplicant(this.auto[i].autodept, (res, data, candidates) => {
303
+							this.candidatesDesignate = candidates
304
+							this.MaintenancerData = res
305
+						    this.valiFormData.MaintenancerName = this.getTextByCode(aotocode)
306
+						    this.valiFormData.Maintenancer = aotocode
307
+						})				
308
+						return
309
+					} else if (this.auto[i].autoyq == '0') {
310
+						var aotocode = this.auto[i].autousercode
311
+						this.valiFormData.MaintenanceDept = this.$mHelper.findParents(this.departList, this.auto[i].autodept)
312
+							.split('/').length + '_' + this.auto[i].autodept
313
+						pageData.getApplicant(this.auto[i].autodept, (res, data, candidates) => {
314
+							this.candidatesDesignate = candidates
315
+							this.MaintenancerData = res
316
+							this.valiFormData.MaintenancerName = this.getTextByCode(aotocode)
317
+							this.valiFormData.Maintenancer = aotocode
318
+						})
319
+				
320
+					}
321
+				}
322
+			},
323
+			getTextByCode(code){
324
+				for(var i = 0;i<this.MaintenancerData.length;i++){
325
+					if(this.MaintenancerData[i].value == code){
326
+						return this.MaintenancerData[i].text
327
+					}
328
+				}
239 329
 			},
240 330
 			// 申请部门
241 331
 			deptNodeclick(e) {
242
-				if (e) {
332
+				if (e) {					
333
+					console.log(e)
243 334
 					this.valiFormData.ApplicationDept = e.value
244 335
 					pageData.getApplicant(e.value.split('_')[1], (res, data, candidates) => {
245 336
 						this.candidates = candidates
@@ -251,11 +342,14 @@
251 342
 					this.valiFormData.ApplicantName = ''
252 343
 					this.valiFormData.Phone = ''
253 344
 					this.getDeptLocation(e.value.split('_')[1])
345
+					this.getAuto()
254 346
 				}
255 347
 			},
256 348
 			//科室位置
257
-			getDeptLocation(id){
258
-				this.$http.get("Department/GetModel", {deptid:id}).then((response) => {
349
+			getDeptLocation(id) {
350
+				this.$http.get("Department/GetModel", {
351
+					deptid: id
352
+				}).then((response) => {
259 353
 					if (response.state.toLowerCase() === "success") {
260 354
 						this.valiFormData.PlaceOfRepair = response.data.F_Location
261 355
 					}
@@ -263,8 +357,8 @@
263 357
 			},
264 358
 			//指派部门
265 359
 			maintenanceNodeclick(e) {
266
-				if(e) {
267
-					this.valiFormData.MaintenanceDept= e.value
360
+				if (e) {
361
+					this.valiFormData.MaintenanceDept = e.value
268 362
 					pageData.getApplicant(e.value.split('_')[1], (res, data, candidates) => {
269 363
 						this.MaintenancerData = res
270 364
 						this.candidatesDesignate = candidates
@@ -273,20 +367,22 @@
273 367
 			},
274 368
 			//报修人
275 369
 			handleBX(res) {
276
-				let e = this.$mHelper.getValueByText(res,this.ApplicantData)
370
+				let e = this.$mHelper.getValueByText(res, this.ApplicantData)
277 371
 				this.valiFormData.Applicant = e
278 372
 				this.valiFormData.ApplicantName = res
279 373
 				const user = this.orderApplicantData.find((o) => {
280 374
 					return o.usercode === e.toString()
281 375
 				})
282
-				if(user) {
376
+				if (user) {
283 377
 					this.valiFormData.Applicantsphone = user.usertelphone
284 378
 					this.valiFormData.Phone = user.usertelphone
285 379
 				}
286 380
 			},
287 381
 			// 地址
288 382
 			getLocation(user) {
289
-				this.$http.get("UserAccount/GetModel", {usercode: user}).then((response) => {
383
+				this.$http.get("UserAccount/GetModel", {
384
+					usercode: user
385
+				}).then((response) => {
290 386
 					if (response.state.toLowerCase() === "success") {
291 387
 						this.valiFormData.PlaceOfRepair = response.data.F_Location
292 388
 					}
@@ -294,13 +390,15 @@
294 390
 			},
295 391
 			//指派人
296 392
 			handleZP(res) {
393
+				console.log(res)
297 394
 				this.valiFormData.MaintenancerName = res
298
-				this.valiFormData.Maintenancer = this.$mHelper.getValueByText(res,this.ApplicantData)
395
+				this.valiFormData.Maintenancer = this.$mHelper.getValueByText(res, this.MaintenancerData)
396
+				console.log(this.valiFormData.Maintenancer)
299 397
 			},
300 398
 			// 工单提交
301 399
 			submit(ref) {
302 400
 				this.disabledButton = true
303
-				if(this.clickImgState == 1) {
401
+				if (this.clickImgState == 1) {
304 402
 					this.valiFormData.File = this.$mHelper.getImgString(this.imgIdList)
305 403
 				}
306 404
 				// if(this.orderInf == 'gzbx_shebei' && !this.valiFormData.epCode) {
@@ -308,7 +406,7 @@
308 406
 				// 	return
309 407
 				// }
310 408
 				console.log(this.valiFormData.ApplicationDept.length)
311
-				
409
+
312 410
 				this.$refs[ref].validate().then(res => {
313 411
 					const params = {
314 412
 						WorkOrderCategory: this.valiFormData.WorkOrderCategory, // 工单类别
@@ -325,11 +423,13 @@
325 423
 						Maintenancer: this.valiFormData.Maintenancer, // 指派人
326 424
 						EmergencyTypes: this.valiFormData.EmergencyTypes
327 425
 					}
328
-					if(this.workorderid) {
426
+					if (this.workorderid) {
329 427
 						params.WorkOrderCode = this.workorderid
330
-						this.$mHelper.httpPost("FaultRepair/UpdateFaultRepairWorkOrder ", params, 1,res=>this.disabledButton=res)
331
-					}else{
332
-						this.$mHelper.httpPost("FaultRepair/AddFaultRepairWorkOrder", params, 1,res=>this.disabledButton=res)
428
+						this.$mHelper.httpPost("FaultRepair/UpdateFaultRepairWorkOrder ", params, 1, res => this
429
+							.disabledButton = res)
430
+					} else {
431
+						this.$mHelper.httpPost("FaultRepair/AddFaultRepairWorkOrder", params, 1, res => this
432
+							.disabledButton = res)
333 433
 					}
334 434
 				}).catch(err => {
335 435
 					this.disabledButton = false
@@ -339,7 +439,7 @@
339 439
 			// 上传图片
340 440
 			getImgData(data) {
341 441
 				this.clickImgState = 1
342
-				this.imgIdList= data
442
+				this.imgIdList = data
343 443
 			},
344 444
 			// 详情回显
345 445
 			getDetail() {
@@ -349,30 +449,31 @@
349 449
 				}
350 450
 				this.$http.get("FaultRepair/GetWorkOrder", params).then((response) => {
351 451
 					if (response.state.toLowerCase() === "success") {
352
-						this.valiFormData.WorkOrderCategory =  response.data[0].F_WorkOrderCategory // 工单类别
353
-						this.valiFormData.Content =  response.data[0].F_Content // 工单内容
354
-						if(response.data[0].F_ApplicationDept) {
355
-							this.valiFormData.ApplicationDept =  response.data[0].F_ApplicationDept.trim() // 申请部门
452
+						this.valiFormData.WorkOrderCategory = response.data[0].F_WorkOrderCategory // 工单类别
453
+						this.valiFormData.Content = response.data[0].F_Content // 工单内容
454
+						if (response.data[0].F_ApplicationDept) {
455
+							this.valiFormData.ApplicationDept = response.data[0].F_ApplicationDept.trim() // 申请部门
356 456
 							pageData.getApplicant(this.valiFormData.ApplicationDept, (res) => {
357 457
 								this.ApplicantData = res
358
-								this.valiFormData.ApplicantName = this.$mHelper.findUserName(this.ApplicantData, response.data[0].F_Applicant)
359
-								this.valiFormData.Applicant =  response.data[0].F_Applicant //申请人
458
+								this.valiFormData.ApplicantName = this.$mHelper.findUserName(this
459
+									.ApplicantData, response.data[0].F_Applicant)
460
+								this.valiFormData.Applicant = response.data[0].F_Applicant //申请人
360 461
 							})
361
-							
362 462
 						}
363
-						this.valiFormData.Applicantsphone =  response.data[0].F_Applicantsphone // 申请电话
364
-						this.valiFormData.Phone =  response.data[0].F_Phone // 联系电话
365
-						this.valiFormData.PlaceOfRepair =  response.data[0].F_PlaceOfRepair // 报修地点
366
-						this.valiFormData.IsEnd =  0 // 是否完结
367
-						this.valiFormData.File =  response.data[0].F_File // 文件
463
+						this.valiFormData.Applicantsphone = response.data[0].F_Applicantsphone // 申请电话
464
+						this.valiFormData.Phone = response.data[0].F_Phone // 联系电话
465
+						this.valiFormData.PlaceOfRepair = response.data[0].F_PlaceOfRepair // 报修地点
466
+						this.valiFormData.IsEnd = 0 // 是否完结
467
+						this.valiFormData.File = response.data[0].F_File // 文件
368 468
 						this.valiFormData.EmergencyTypes = response.data[0].F_EmergencyTypes
369
-						if(response.data[0].F_MaintenanceDept) {
370
-							this.valiFormData.MaintenanceDept =  response.data[0].F_MaintenanceDept//	维修部门
469
+						if (response.data[0].F_MaintenanceDept) {
470
+							this.valiFormData.MaintenanceDept = response.data[0].F_MaintenanceDept //	维修部门
371 471
 							pageData.getApplicant(this.valiFormData.MaintenanceDept, (res) => {
372 472
 								this.MaintenancerData = res
373 473
 							})
374
-							this.valiFormData.MaintenancerName = this.$mHelper.findUserName(this.ApplicantData, response.data[0].F_Maintenancer)
375
-							this.valiFormData.Maintenancer =  response.data[0].F_Maintenancer //指派人
474
+							this.valiFormData.MaintenancerName = this.$mHelper.findUserName(this.ApplicantData,
475
+								response.data[0].F_Maintenancer)
476
+							this.valiFormData.Maintenancer = response.data[0].F_Maintenancer //指派人
376 477
 						}
377 478
 						if (response.data[0].FileUrl) {
378 479
 							response.data[0].FileUrl.forEach((v, n) => {
@@ -381,7 +482,7 @@
381 482
 									url: v.F_FileUrl,
382 483
 									extname: v.F_FileType,
383 484
 									name: v.F_FileName.substring(19),
384
-									id:v.F_FileId
485
+									id: v.F_FileId
385 486
 								})
386 487
 							})
387 488
 						}
@@ -393,7 +494,7 @@
393 494
 			getDeparTree(tree, text) {
394 495
 				for (const i in tree) {
395 496
 					if (tree[i].text == text) {
396
-						
497
+
397 498
 						this.valiFormData.ApplicationDept = tree[i].value
398 499
 					} else if (tree[i].children) {
399 500
 						this.getDeparTree(tree[i].children, text)
@@ -407,6 +508,7 @@
407 508
 
408 509
 <style lang="scss" scoped>
409 510
 	@import '@/common/addFormDeep.scss';
511
+
410 512
 	.wrapper {
411 513
 		padding: 10px 15px;
412 514
 		background-color: #fff;

+ 4 - 3
CallCenterWeb.UI/RMYYAPP/pages/myTask/repairList/repairDetail/cooperationDetail/cooperationDetail.vue

@@ -97,9 +97,10 @@
97 97
 		},
98 98
 		onLoad(option) {
99 99
 			this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
100
-			pageData.getDet((res,data) => {
101
-				this.deptDataTree = res
102
-			})
100
+			// pageData.getDet((res,data) => {
101
+			// 	this.deptDataTree = res
102
+			// })
103
+			this.departList = JSON.parse(window.localStorage.getItem('deptTreeData'))
103 104
 			pageData.getGongDanType(3000,(res,data) => {
104 105
 				this.dataOrderType = res
105 106
 			})

+ 103 - 46
CallCenterWeb.UI/RMYYAPP/pages/myTask/repairList/repairDetail/tranferDetail/tranferDetail.vue

@@ -46,57 +46,105 @@
46 46
 		onLoad(option) {
47 47
 			this.getHosptallist() // 院区
48 48
 			this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
49
+			// this.tranformDepartList = JSON.parse(window.localStorage.getItem('deptTreeData'))
49 50
 			pageData.getDet((res,list) => {
50 51
 				this.tranformDepartList = res
51
-				console.log(this.tranformDepartList)
52
-				pageData.getGongDanType(this.typeid,(res, data) => {
53
-					if(option.zhdd){//综合调度保障中心
54
-						this.tranformDepart = '3_1275'
55
-						pageData.getApplicant('1275', (res,data,candidates) => {
56
-							this.tranforPeopleList = res
57
-							this.candidates = candidates
58
-						})
59
-						return;
60
-					}
61
-					let derpartid = ''
62
-					if(!option.orderType) {
63
-						return
64
-					}
65
-					let orderStr = this.$mHelper.getDepartidByOrderid(data,option.orderType)
66
-					let derpartCode = orderStr.split(',')[orderStr.split(',').length - 1]
67
-					if(derpartCode == 'gzbx_jjhq') {
68
-						let hospitalid = this.getHosptalId(this.$mHelper.findParents(list,option.departid).split('/')[0])
69
-						if(Number(hospitalid) == 1) { // 总院
70
-							derpartid = this.$mHelper.getDepartidByDepartCode(list,'HQBZ')
71
-							this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
72
-						}else if(Number(hospitalid) == 2) { // 分院
73
-							derpartid = this.$mHelper.getDepartidByDepartCode(list,'fenyuanqu')
74
-							this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
75
-						}else if(Number(hospitalid) == 3) { // 西院
76
-							derpartid = this.$mHelper.getDepartidByDepartCode(list,'xiyuanqu')
77
-							this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
78
-						}else if(Number(hospitalid) == 4005) { //郑州人民医院总部
79
-							derpartid = this.$mHelper.getDepartidByDepartCode(list,'JJHHQBZB')
80
-							this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
81
-						}else if(Number(hospitalid) == 4004) { // 郑州人民医院郑东院区
82
-							derpartid = this.$mHelper.getDepartidByDepartCode(list,'JJHQ_DYQBZZ')
83
-							this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
84
-						}else if(Number(hospitalid) == 4006) { // 郑州人民医院南部院区
85
-							derpartid = this.$mHelper.getDepartidByDepartCode(list,'JJHQ_NYQBZZ')
86
-							this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
87
-						}else if(Number(hospitalid) == 4008) { // 郑州人民医院北院区
88
-							derpartid = this.$mHelper.getDepartidByDepartCode(list,'JJHQ_BYQBZZ')
89
-							this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
52
+				//默认-清空
53
+				this.tranforPeopleList = []
54
+				this.candidates = []
55
+				this.tranforPeople = ''
56
+				this.tranforPeopleName = ''
57
+				//院区
58
+				const applyHos = this.getHosptalId(this.$mHelper.findParents(this.tranformDepartList,option.departid).split('/')[0])
59
+				console.log(applyHos,'院区')
60
+				if(applyHos == 0){
61
+					return
62
+				}
63
+				var autoData = []
64
+				//获取配置
65
+				this.$http.get("GongDanType/GetModule", {mId:option.orderType}).then((response) => {
66
+					if (response.state.toLowerCase() === "success") {
67
+						if(response.data.autodept!=''){
68
+							autoData = JSON.parse(response.data.autodept)
69
+							if(!autoData.length){
70
+								return
71
+							}
72
+							//遍历
73
+							for (var i = 0; i < autoData.length; i++) {
74
+								if (autoData[i].autoyq == applyHos) {
75
+									var aotocode = autoData[i].autousercode
76
+									this.tranformDepart = this.$mHelper.findParents(this.tranformDepartList, autoData[i].autodept)
77
+										.split('/').length + '_' + autoData[i].autodept
78
+									pageData.getApplicant(autoData[i].autodept, (res, data, candidates) => {
79
+										this.tranforPeopleList = res
80
+										this.candidates = candidates
81
+									    this.tranforPeopleName = this.getTextByCode(aotocode)
82
+									    this.tranforPeople = aotocode
83
+									})				
84
+									return
85
+								} else if (autoData[i].autoyq == '0') {
86
+									var aotocode = autoData[i].autousercode
87
+									this.tranformDepart = this.$mHelper.findParents(this.tranformDepartList, autoData[i].autodept)
88
+										.split('/').length + '_' + autoData[i].autodept
89
+									pageData.getApplicant(autoData[i].autodept, (res, data, candidates) => {
90
+										this.tranforPeopleList = res
91
+										this.candidates = candidates
92
+										this.tranforPeopleName = this.getTextByCode(aotocode)
93
+										this.tranforPeople = aotocode
94
+									})							
95
+								}
96
+							}
90 97
 						}
91
-					}else{
92
-						derpartid = orderStr.split(',')[orderStr.split(',').length - 2]
93
-						this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
94 98
 					}
95
-					pageData.getPersonByDeptId(derpartid, (res,data,candidates) => {
96
-						this.tranforPeopleList = res
97
-						this.candidates = candidates
98
-					})
99 99
 				})
100
+				// pageData.getGongDanType(this.typeid,(res, data) => {
101
+					// if(option.zhdd){//综合调度保障中心
102
+					// 	this.tranformDepart = '3_1275'
103
+					// 	pageData.getApplicant('1275', (res,data,candidates) => {
104
+					// 		this.tranforPeopleList = res
105
+					// 		this.candidates = candidates
106
+					// 	})
107
+					// 	return;
108
+					// }
109
+					// let derpartid = ''
110
+					// if(!option.orderType) {
111
+					// 	return
112
+					// }
113
+					// let orderStr = this.$mHelper.getDepartidByOrderid(data,option.orderType)
114
+					// let derpartCode = orderStr.split(',')[orderStr.split(',').length - 1]
115
+					// if(derpartCode == 'gzbx_jjhq') {
116
+					// 	let hospitalid = this.getHosptalId(this.$mHelper.findParents(list,option.departid).split('/')[0])
117
+					// 	if(Number(hospitalid) == 1) { // 总院
118
+					// 		derpartid = this.$mHelper.getDepartidByDepartCode(list,'HQBZ')
119
+					// 		this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
120
+					// 	}else if(Number(hospitalid) == 2) { // 分院
121
+					// 		derpartid = this.$mHelper.getDepartidByDepartCode(list,'fenyuanqu')
122
+					// 		this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
123
+					// 	}else if(Number(hospitalid) == 3) { // 西院
124
+					// 		derpartid = this.$mHelper.getDepartidByDepartCode(list,'xiyuanqu')
125
+					// 		this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
126
+					// 	}else if(Number(hospitalid) == 4005) { //郑州人民医院总部
127
+					// 		derpartid = this.$mHelper.getDepartidByDepartCode(list,'JJHHQBZB')
128
+					// 		this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
129
+					// 	}else if(Number(hospitalid) == 4004) { // 郑州人民医院郑东院区
130
+					// 		derpartid = this.$mHelper.getDepartidByDepartCode(list,'JJHQ_DYQBZZ')
131
+					// 		this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
132
+					// 	}else if(Number(hospitalid) == 4006) { // 郑州人民医院南部院区
133
+					// 		derpartid = this.$mHelper.getDepartidByDepartCode(list,'JJHQ_NYQBZZ')
134
+					// 		this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
135
+					// 	}else if(Number(hospitalid) == 4008) { // 郑州人民医院北院区
136
+					// 		derpartid = this.$mHelper.getDepartidByDepartCode(list,'JJHQ_BYQBZZ')
137
+					// 		this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
138
+					// 	}
139
+					// }else{
140
+					// 	derpartid = orderStr.split(',')[orderStr.split(',').length - 2]
141
+					// 	this.tranformDepart = this.$mHelper.findParents(list,derpartid).split('/').length + '_'+ derpartid
142
+					// }
143
+					// pageData.getPersonByDeptId(derpartid, (res,data,candidates) => {
144
+					// 	this.tranforPeopleList = res
145
+					// 	this.candidates = candidates
146
+					// })
147
+				// })
100 148
 			})
101 149
 			
102 150
 			this.state = option.state
@@ -104,6 +152,13 @@
104 152
 			
105 153
 		},
106 154
 		methods: {
155
+			getTextByCode(code){
156
+				for(var i = 0;i<this.tranforPeopleList.length;i++){
157
+					if(this.tranforPeopleList[i].value == code){
158
+						return this.tranforPeopleList[i].text
159
+					}
160
+				}
161
+			},
107 162
 			// 获取院区数据
108 163
 			getHosptallist() {
109 164
 				const params = {
@@ -145,6 +200,8 @@
145 200
 				this.tranforPeople = e
146 201
 			},
147 202
 			submit(ref,state) {
203
+				// console.log(this.tranformDepart,this.tranforPeople)
204
+				// return
148 205
 				if(!this.tranformDepart) {
149 206
 					this.$mHelper.toast('请选择指派部门')
150 207
 					return

+ 4 - 3
CallCenterWeb.UI/RMYYAPP/pages/myTask/vehicleSchedulList/components/vehiccleDetail/vehiccleDetail.vue

@@ -108,9 +108,10 @@
108 108
 			}
109 109
 		},
110 110
 		async onLoad(optioin) {
111
-			pageData.getDet((res, data) => {
112
-				this.departList = data
113
-			})
111
+			// pageData.getDet((res, data) => {
112
+			// 	this.departList = data
113
+			// })
114
+			this.departList = JSON.parse(window.localStorage.getItem('deptAllList'))
114 115
 			await this.getGongDanType()
115 116
 			this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem' 
116 117
 			this.workorderid = optioin.wid 

+ 3 - 3
CallCenterWeb.UI/RMYYAPP/pages/myTask/workOrderDetail/button/button.vue

@@ -103,7 +103,7 @@
103 103
 			}
104 104
 		},
105 105
 		onLoad(option) {
106
-			
106
+			console.log(this.orderType)
107 107
 		},
108 108
 		methods: {
109 109
 			postSelectDic(e) {
@@ -120,7 +120,7 @@
120 120
 			// 工单指派
121 121
 			transferBtn() {
122 122
 				uni.navigateTo({
123
-					url: "/pages/myTask/repairList/repairDetail/tranferDetail/tranferDetail?wid=" + this.wid+ '&orderType='+this.orderType+'&departid='+ this.applicationDept
123
+					url: "/pages/myTask/repairList/repairDetail/tranferDetail/tranferDetail?wid=" + this.wid+ '&orderType=' + this.orderType +'&departid='+ this.applicationDept
124 124
 				})
125 125
 			},
126 126
 			// 工单撤回
@@ -344,7 +344,7 @@
344 344
 		   },
345 345
 		   disTrunBtn() {
346 346
 			   uni.navigateTo({
347
-			   	url: "/pages/myTask/repairList/repairDetail/tranferDetail/tranferDetail?wid=" + this.wid+"&zhdd=1"
347
+			   	url: "/pages/myTask/repairList/repairDetail/tranferDetail/tranferDetail?wid=" + this.wid+"&zhdd=1"+ '&orderType=' + this.orderType +'&departid='+ this.applicationDept
348 348
 			   })
349 349
 		   },
350 350
 			// 车辆调度 ( 按钮开始 )

+ 4 - 3
CallCenterWeb.UI/RMYYAPP/pages/myTask/workOrderDetail/workOrderDetail.vue

@@ -354,9 +354,10 @@
354 354
 					}
355 355
 				})
356 356
 			}
357
-			pageData.getDet((res, data) => {
358
-				this.departList = data
359
-			})
357
+			// pageData.getDet((res, data) => {
358
+			// 	this.departList = data
359
+			// })
360
+			this.departList = JSON.parse(window.localStorage.getItem('deptAllList'))
360 361
 			pageData.getApplicant('', (res) => {
361 362
 				this.userCodeList = res
362 363
 			})