Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 4 years ago
parent
commit
6e45a67152

+ 59 - 33
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -561,22 +561,22 @@
561 561
             this.department = response.data.data.department
562 562
             this.sick = response.data.data.sick
563 563
             this.additions = response.data.data.additions
564
-            var info = response.data.data.info
565
-            if (info.user_type == 2 || info.user_type == 1) {
566
-              this.doctorValue = info.admin_user_id
567
-              if (info.department_id == 0) {
568
-                if (this.department.length > 0) {
569
-                  this.departmentValue = this.department[0].id
570
-                } else {
571
-                  this.departmentValue = ''
572
-
573
-                }
574
-              } else {
575
-                this.departmentValue = info.department_id
576
-              }
577
-            }else{
578
-              this.doctorValue = this.doctors[0].admin_user_id
579
-            }
564
+            // var info = response.data.data.info
565
+            // if (info.user_type == 2 || info.user_type == 1) {
566
+            //   this.doctorValue = info.admin_user_id
567
+            //   if (info.department_id == 0) {
568
+            //     if (this.department.length > 0) {
569
+            //       this.departmentValue = this.department[0].id
570
+            //     } else {
571
+            //       this.departmentValue = ''
572
+            //
573
+            //     }
574
+            //   } else {
575
+            //     this.departmentValue = info.department_id
576
+            //   }
577
+            // }else{
578
+            //   this.doctorValue = this.doctors[0].admin_user_id
579
+            // }
580 580
           }
581 581
         })
582 582
 
@@ -630,14 +630,13 @@
630 630
         this.teamList = []
631 631
 
632 632
       },
633
-      setData(data, info) {
633
+      setData(data, info, admin_info,doctors,department) {
634 634
         this.prescription_id = data[0].id
635 635
         this.editableTabsValue = "处方1"
636 636
         this.$emit('event1', this.prescription_id)
637 637
         this.curStatus = 0
638 638
         this.prescriptions = data
639 639
         this.curPrescriptions = this.prescriptions[0]
640
-        console.log( this.curPrescriptions)
641 640
 
642 641
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
643 642
           this.curStatus = 1
@@ -645,7 +644,6 @@
645 644
           this.rightTab = 1
646 645
           this.showOne = true
647 646
           this.showTwo = false
648
-
649 647
         }
650 648
 
651 649
         if (this.curPrescriptions.project.length > 0 && this.curPrescriptions.advices.length == 0) {
@@ -655,23 +653,19 @@
655 653
           this.showOne = false
656 654
           this.showTwo = true
657 655
         }
658
-
659 656
         this.state1 = info.diagnosis
660 657
         this.state2 = info.sick_history
661
-        this.doctorValue = info.doctor_id
662
-        this.departmentValue = info.departmentValue
663
-
664
-        if(this.doctorValue == 0){
665 658
 
666
-        }
667 659
 
668 660
         this.register_type = info.register_type
669 661
 
662
+        if(info.prescription_status == 0){
663
+          this.order_status = ''
664
+        }
665
+
670 666
         if (info.prescription_status == 1 || info.prescription_status == 2) {
671 667
           this.order_status = '未收费'
672
-
673 668
         }
674
-
675 669
         if (info.prescription_status == 3) {
676 670
           this.order_status = '已结算'
677 671
         }
@@ -680,10 +674,40 @@
680 674
           this.order_status = '已退费'
681 675
         }
682 676
 
683
-        // console.log(this.$refs)
684
-        // this.$nextTick(() => {
685
-        //   this.$refs.prescription_tables.setNewData(this.prescriptions[0])
686
-        // })
677
+        if(info.id > 0){
678
+          this.doctorValue = info.doctor_id
679
+          this.departmentValue = info.department
680
+        }else{
681
+          this.doctorValue = ''
682
+          this.departmentValue = ''
683
+
684
+          if (admin_info.user_type == 2 || admin_info.user_type == 1) {
685
+            this.doctorValue = admin_info.admin_user_id
686
+            if (admin_info.department_id == 0) {
687
+              if (this.department.length > 0) {
688
+                this.departmentValue = department[0].id
689
+              } else {
690
+                this.departmentValue = ''
691
+              }
692
+            } else {
693
+              this.departmentValue = admin_info.department_id
694
+            }
695
+          }else{
696
+            this.doctorValue = doctors[0].admin_user_id
697
+          }
698
+
699
+          if(this.doctorValue == 0){
700
+            this.doctorValue = ''
701
+          }
702
+
703
+
704
+
705
+        }
706
+
707
+
708
+
709
+
710
+
687 711
       },
688 712
       moreState(tab, event) {
689 713
         if (tab == 'more') {
@@ -1155,13 +1179,15 @@
1155 1179
           }
1156 1180
         })
1157 1181
       }, changeDoctor(val) {
1158
-        console.log(val)
1159
-        console.log(this.doctors)
1160 1182
         for (let i = 0; i < this.doctors.length; i++) {
1161 1183
           if (this.doctors[i].admin_user_id == this.doctorValue) {
1162 1184
             this.departmentValue = this.doctors[i].department_id
1163 1185
           }
1164 1186
         }
1187
+
1188
+        if(this.departmentValue == 0){
1189
+          this.departmentValue = ""
1190
+        }
1165 1191
       }
1166 1192
     },mounted(){
1167 1193
       this.getInitData()

+ 9 - 4
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -173,13 +173,15 @@
173 173
         templatedetail:{},
174 174
         detalid:0,
175 175
         prescription_id:0,
176
-
176
+        doctors:[],
177
+        department:[],
177 178
         patientid:0,
178 179
         prescriptionList:[],
179 180
         centerDialogVisible:false,
180 181
         tableData:[],
181 182
         selecting_schs: [],
182 183
         index:0,
184
+        admin_info:{},
183 185
       }
184 186
     },
185 187
     methods: {
@@ -227,6 +229,8 @@
227 229
             this.patientTableDataTwo = response.data.data.list
228 230
             this.cal_one = response.data.data.total_one
229 231
             this.cal_two =  response.data.data.total_two
232
+            this.admin_info =  response.data.data.info
233
+
230 234
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
231 235
 
232 236
             if(this.patientTableData.length > 0) {
@@ -257,6 +261,9 @@
257 261
             this.case_history = response.data.data.case_history
258 262
 
259 263
             this.info = response.data.data.info
264
+            this.doctors = response.data.data.doctors
265
+            this.department = response.data.data.department
266
+
260 267
 
261 268
 
262 269
 
@@ -379,7 +386,7 @@
379 386
 
380 387
 
381 388
 
382
-            this.$refs.prescriptions.setData(this.prescriptions,this.info)
389
+            this.$refs.prescriptions.setData(this.prescriptions,this.info,this.admin_info,this.doctors,this.department)
383 390
           }
384 391
         })
385 392
 
@@ -648,8 +655,6 @@
648 655
 
649 656
       this.diagnoses = this.getDictionaryDataConfig('system', 'diagnose')
650 657
       this.other_sick = this.getDictionaryDataConfig('system', 'other_sick_history')
651
-
652
-      console.log('1222232434234',document.documentElement.clientHeight)
653 658
       let tableHeight = document.body.clientHeight - 263
654 659
       this.tableHeight = tableHeight
655 660