|
@@ -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()
|