Bläddra i källkod

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

csx 4 år sedan
förälder
incheckning
6e45a67152

+ 59 - 33
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Visa fil

561
             this.department = response.data.data.department
561
             this.department = response.data.data.department
562
             this.sick = response.data.data.sick
562
             this.sick = response.data.data.sick
563
             this.additions = response.data.data.additions
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
         this.teamList = []
630
         this.teamList = []
631
 
631
 
632
       },
632
       },
633
-      setData(data, info) {
633
+      setData(data, info, admin_info,doctors,department) {
634
         this.prescription_id = data[0].id
634
         this.prescription_id = data[0].id
635
         this.editableTabsValue = "处方1"
635
         this.editableTabsValue = "处方1"
636
         this.$emit('event1', this.prescription_id)
636
         this.$emit('event1', this.prescription_id)
637
         this.curStatus = 0
637
         this.curStatus = 0
638
         this.prescriptions = data
638
         this.prescriptions = data
639
         this.curPrescriptions = this.prescriptions[0]
639
         this.curPrescriptions = this.prescriptions[0]
640
-        console.log( this.curPrescriptions)
641
 
640
 
642
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
641
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
643
           this.curStatus = 1
642
           this.curStatus = 1
645
           this.rightTab = 1
644
           this.rightTab = 1
646
           this.showOne = true
645
           this.showOne = true
647
           this.showTwo = false
646
           this.showTwo = false
648
-
649
         }
647
         }
650
 
648
 
651
         if (this.curPrescriptions.project.length > 0 && this.curPrescriptions.advices.length == 0) {
649
         if (this.curPrescriptions.project.length > 0 && this.curPrescriptions.advices.length == 0) {
655
           this.showOne = false
653
           this.showOne = false
656
           this.showTwo = true
654
           this.showTwo = true
657
         }
655
         }
658
-
659
         this.state1 = info.diagnosis
656
         this.state1 = info.diagnosis
660
         this.state2 = info.sick_history
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
         this.register_type = info.register_type
660
         this.register_type = info.register_type
669
 
661
 
662
+        if(info.prescription_status == 0){
663
+          this.order_status = ''
664
+        }
665
+
670
         if (info.prescription_status == 1 || info.prescription_status == 2) {
666
         if (info.prescription_status == 1 || info.prescription_status == 2) {
671
           this.order_status = '未收费'
667
           this.order_status = '未收费'
672
-
673
         }
668
         }
674
-
675
         if (info.prescription_status == 3) {
669
         if (info.prescription_status == 3) {
676
           this.order_status = '已结算'
670
           this.order_status = '已结算'
677
         }
671
         }
680
           this.order_status = '已退费'
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
       moreState(tab, event) {
712
       moreState(tab, event) {
689
         if (tab == 'more') {
713
         if (tab == 'more') {
1155
           }
1179
           }
1156
         })
1180
         })
1157
       }, changeDoctor(val) {
1181
       }, changeDoctor(val) {
1158
-        console.log(val)
1159
-        console.log(this.doctors)
1160
         for (let i = 0; i < this.doctors.length; i++) {
1182
         for (let i = 0; i < this.doctors.length; i++) {
1161
           if (this.doctors[i].admin_user_id == this.doctorValue) {
1183
           if (this.doctors[i].admin_user_id == this.doctorValue) {
1162
             this.departmentValue = this.doctors[i].department_id
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
     },mounted(){
1192
     },mounted(){
1167
       this.getInitData()
1193
       this.getInitData()

+ 9 - 4
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Visa fil

173
         templatedetail:{},
173
         templatedetail:{},
174
         detalid:0,
174
         detalid:0,
175
         prescription_id:0,
175
         prescription_id:0,
176
-
176
+        doctors:[],
177
+        department:[],
177
         patientid:0,
178
         patientid:0,
178
         prescriptionList:[],
179
         prescriptionList:[],
179
         centerDialogVisible:false,
180
         centerDialogVisible:false,
180
         tableData:[],
181
         tableData:[],
181
         selecting_schs: [],
182
         selecting_schs: [],
182
         index:0,
183
         index:0,
184
+        admin_info:{},
183
       }
185
       }
184
     },
186
     },
185
     methods: {
187
     methods: {
227
             this.patientTableDataTwo = response.data.data.list
229
             this.patientTableDataTwo = response.data.data.list
228
             this.cal_one = response.data.data.total_one
230
             this.cal_one = response.data.data.total_one
229
             this.cal_two =  response.data.data.total_two
231
             this.cal_two =  response.data.data.total_two
232
+            this.admin_info =  response.data.data.info
233
+
230
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
234
             // this.$refs.tab.setCurrentRow(this.patientTableData[0])
231
 
235
 
232
             if(this.patientTableData.length > 0) {
236
             if(this.patientTableData.length > 0) {
257
             this.case_history = response.data.data.case_history
261
             this.case_history = response.data.data.case_history
258
 
262
 
259
             this.info = response.data.data.info
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
 
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
 
655
 
649
       this.diagnoses = this.getDictionaryDataConfig('system', 'diagnose')
656
       this.diagnoses = this.getDictionaryDataConfig('system', 'diagnose')
650
       this.other_sick = this.getDictionaryDataConfig('system', 'other_sick_history')
657
       this.other_sick = this.getDictionaryDataConfig('system', 'other_sick_history')
651
-
652
-      console.log('1222232434234',document.documentElement.clientHeight)
653
       let tableHeight = document.body.clientHeight - 263
658
       let tableHeight = document.body.clientHeight - 263
654
       this.tableHeight = tableHeight
659
       this.tableHeight = tableHeight
655
 
660