|
@@ -398,9 +398,8 @@ export default {
|
398
|
398
|
currentIndex:0,
|
399
|
399
|
is_drug_open:"2",
|
400
|
400
|
textarea:"",
|
401
|
|
-
|
402
|
|
-
|
403
|
401
|
drug_code_open:0,
|
|
402
|
+ patientList:[]
|
404
|
403
|
|
405
|
404
|
};
|
406
|
405
|
},
|
|
@@ -537,7 +536,7 @@ export default {
|
537
|
536
|
this.waitmount = res.data.data.itotal;
|
538
|
537
|
this.alreadmount = res.data.data.wtotal;
|
539
|
538
|
this.drugList = res.data.data.drug
|
540
|
|
- this.drug_code_open = response.data.data.config.is_open
|
|
539
|
+ this.drug_code_open = res.data.data.config.is_open
|
541
|
540
|
}
|
542
|
541
|
});
|
543
|
542
|
// console.log("2222222")
|
|
@@ -550,10 +549,11 @@ export default {
|
550
|
549
|
shift: this.shift,
|
551
|
550
|
partition: this.partition,
|
552
|
551
|
};
|
553
|
|
- console.log("班次---------------------",params)
|
|
552
|
+
|
554
|
553
|
waitingdrug(params).then((res) => {
|
555
|
554
|
if (res.data.state == 1) {
|
556
|
|
- this.waitmount_data = res.data.data.list;
|
|
555
|
+ this.waitmount_data=[]
|
|
556
|
+ var list = res.data.data.list;
|
557
|
557
|
this.baseList =[]
|
558
|
558
|
this.baseList = res.data.data.baseList
|
559
|
559
|
if (this.shift != 0 || this.partition != 0) {
|
|
@@ -563,18 +563,105 @@ export default {
|
563
|
563
|
this.waitmount = this.waitmount_data.length;
|
564
|
564
|
}
|
565
|
565
|
}
|
|
566
|
+ this.patientList = []
|
|
567
|
+ this.patientList = res.data.data.patientList
|
|
568
|
+ var listTwo = res.data.data.listTwo
|
|
569
|
+
|
|
570
|
+ var newArr =[]
|
|
571
|
+ if(listTwo!=null && listTwo.length>0){
|
|
572
|
+ for(let i=0;i<listTwo.length;i++){
|
|
573
|
+ listTwo[i].PatientID = 0
|
|
574
|
+ listTwo[i].Name=""
|
|
575
|
+ listTwo[i].DialysisNo=""
|
|
576
|
+ listTwo[i].PatientID = listTwo[i].patient_id
|
|
577
|
+ listTwo[i].Name = listTwo[i].patient.name
|
|
578
|
+ listTwo[i].DialysisNo = listTwo[i].patient.dialysis_no
|
|
579
|
+ newArr.push(listTwo[i])
|
|
580
|
+ }
|
|
581
|
+ }
|
|
582
|
+
|
|
583
|
+ if(list!=null && list.length>0){
|
|
584
|
+ for(let i=0;i<list.length;i++){
|
|
585
|
+ this.waitmount_data.push(list[i])
|
|
586
|
+ }
|
|
587
|
+ if(newArr!=null && newArr.length>0){
|
|
588
|
+ for(let i=0;i<newArr.length;i++){
|
|
589
|
+ this.waitmount_data.push(newArr[i])
|
|
590
|
+ }
|
|
591
|
+ }
|
|
592
|
+ }
|
|
593
|
+ if(this.waitmount_data==null){
|
|
594
|
+ if(newArr!=null && newArr.length>0){
|
|
595
|
+ for(let i=0;i<newArr.length;i++){
|
|
596
|
+ this.waitmount_data.push(newArr[i])
|
|
597
|
+ }
|
|
598
|
+ }
|
|
599
|
+
|
|
600
|
+ }
|
|
601
|
+ if(list==null){
|
|
602
|
+ if(newArr!=null && newArr.length>0){
|
|
603
|
+ for(let i=0;i<newArr.length;i++){
|
|
604
|
+ this.waitmount_data.push(newArr[i])
|
|
605
|
+ }
|
|
606
|
+ }
|
|
607
|
+
|
|
608
|
+ }
|
|
609
|
+
|
566
|
610
|
}
|
567
|
611
|
});
|
568
|
612
|
issueddrugs(params).then((res) => {
|
569
|
613
|
if (res.data.state == 1) {
|
570
|
|
- this.alreadmount_data = res.data.data.list;
|
|
614
|
+ this.alreadmount_data =[]
|
|
615
|
+ var list = res.data.data.list;
|
|
616
|
+ var listTwo =res.data.data.listTwo
|
|
617
|
+
|
571
|
618
|
if (this.shift != 0 || this.partition != 0) {
|
572
|
|
- if (this.alreadmount_data == null) {
|
|
619
|
+ if (list == null) {
|
573
|
620
|
this.alreadmount = 0;
|
574
|
621
|
} else {
|
575
|
|
- this.alreadmount = this.alreadmount_data.length;
|
|
622
|
+ this.alreadmount = list.length;
|
576
|
623
|
}
|
577
|
624
|
}
|
|
625
|
+
|
|
626
|
+ var newArr =[]
|
|
627
|
+ if(listTwo!=null && listTwo.length>0){
|
|
628
|
+ for(let i=0;i<listTwo.length;i++){
|
|
629
|
+ listTwo[i].PatientID = 0
|
|
630
|
+ listTwo[i].Name=""
|
|
631
|
+ listTwo[i].DialysisNo=""
|
|
632
|
+ listTwo[i].PatientID = listTwo[i].patient_id
|
|
633
|
+ listTwo[i].Name = listTwo[i].patient.name
|
|
634
|
+ listTwo[i].DialysisNo = listTwo[i].patient.dialysis_no
|
|
635
|
+ newArr.push(listTwo[i])
|
|
636
|
+ }
|
|
637
|
+ }
|
|
638
|
+
|
|
639
|
+ if(list!=null && list.length>0){
|
|
640
|
+ for(let i=0;i<list.length;i++){
|
|
641
|
+ this.alreadmount_data.push(list[i])
|
|
642
|
+ }
|
|
643
|
+ if(newArr!=null && newArr.length>0){
|
|
644
|
+ for(let i=0;i<newArr.length;i++){
|
|
645
|
+ this.alreadmount_data.push(newArr[i])
|
|
646
|
+ }
|
|
647
|
+ }
|
|
648
|
+ }
|
|
649
|
+ if(this.waitmount_data==null){
|
|
650
|
+ if(newArr!=null && newArr.length>0){
|
|
651
|
+ for(let i=0;i<newArr.length;i++){
|
|
652
|
+ this.alreadmount_data.push(newArr[i])
|
|
653
|
+ }
|
|
654
|
+ }
|
|
655
|
+
|
|
656
|
+ }
|
|
657
|
+ if(list==null){
|
|
658
|
+ if(newArr!=null && newArr.length>0){
|
|
659
|
+ for(let i=0;i<newArr.length;i++){
|
|
660
|
+ this.alreadmount_data.push(newArr[i])
|
|
661
|
+ }
|
|
662
|
+ }
|
|
663
|
+
|
|
664
|
+ }
|
578
|
665
|
}
|
579
|
666
|
});
|
580
|
667
|
},
|
|
@@ -589,13 +676,81 @@ export default {
|
589
|
676
|
};
|
590
|
677
|
await waitingdrug(params).then((res) => {
|
591
|
678
|
if (res.data.state == 1) {
|
592
|
|
- this.waitmount_data = res.data.data.list;
|
|
679
|
+ this.waitmount_data=[]
|
|
680
|
+ var list = res.data.data.list;
|
|
681
|
+ this.patientList = []
|
|
682
|
+ this.patientList = res.data.data.patientList
|
|
683
|
+ var listTwo = res.data.data.listTwo
|
|
684
|
+ var newArr =[]
|
|
685
|
+ if(listTwo!=null && listTwo.length>0){
|
|
686
|
+ for(let i=0;i<listTwo.length;i++){
|
|
687
|
+ listTwo[i].PatientID = 0
|
|
688
|
+ listTwo[i].Name=""
|
|
689
|
+ listTwo[i].DialysisNo=""
|
|
690
|
+ listTwo[i].PatientID = listTwo[i].patient_id
|
|
691
|
+ listTwo[i].Name = listTwo[i].patient.name
|
|
692
|
+ listTwo[i].DialysisNo = listTwo[i].patient.dialysis_no
|
|
693
|
+ newArr.push(listTwo[i])
|
|
694
|
+ }
|
|
695
|
+ }
|
|
696
|
+ if(list!=null && list.length>0){
|
|
697
|
+ for(let i=0;i<list.length;i++){
|
|
698
|
+ this.waitmount_data.push(list[i])
|
|
699
|
+ }
|
|
700
|
+ if(newArr!=null && newArr.length>0){
|
|
701
|
+ for(let i=0;i<newArr.length;i++){
|
|
702
|
+ this.waitmount_data.push(newArr[i])
|
|
703
|
+ }
|
|
704
|
+ }
|
|
705
|
+ }
|
|
706
|
+ if(list==null){
|
|
707
|
+ if(newArr!=null && newArr.length>0){
|
|
708
|
+ for(let i=0;i<newArr.length;i++){
|
|
709
|
+ this.waitmount_data.push(newArr[i])
|
|
710
|
+ }
|
|
711
|
+ }
|
|
712
|
+
|
|
713
|
+ }
|
|
714
|
+
|
593
|
715
|
console.log("1111111");
|
594
|
716
|
}
|
595
|
717
|
});
|
596
|
718
|
await issueddrugs(params).then((res) => {
|
597
|
719
|
if (res.data.state == 1) {
|
598
|
|
- this.alreadmount_data = res.data.data.list;
|
|
720
|
+ this.alreadmount_data = []
|
|
721
|
+ var list = res.data.data.list;
|
|
722
|
+ var listTwo = res.data.data.listTwo
|
|
723
|
+ var newArr =[]
|
|
724
|
+ if(listTwo!=null && listTwo.length>0){
|
|
725
|
+ for(let i=0;i<listTwo.length;i++){
|
|
726
|
+ listTwo[i].PatientID = 0
|
|
727
|
+ listTwo[i].Name=""
|
|
728
|
+ listTwo[i].DialysisNo=""
|
|
729
|
+ listTwo[i].PatientID = listTwo[i].patient_id
|
|
730
|
+ listTwo[i].Name = listTwo[i].patient.name
|
|
731
|
+ listTwo[i].DialysisNo = listTwo[i].patient.dialysis_no
|
|
732
|
+ newArr.push(listTwo[i])
|
|
733
|
+ }
|
|
734
|
+ }
|
|
735
|
+ if(list!=null && list.length>0){
|
|
736
|
+ for(let i=0;i<list.length;i++){
|
|
737
|
+ this.alreadmount_data.push(list[i])
|
|
738
|
+ }
|
|
739
|
+ if(newArr!=null && newArr.length>0){
|
|
740
|
+ for(let i=0;i<newArr.length;i++){
|
|
741
|
+ this.alreadmount_data.push(newArr[i])
|
|
742
|
+ }
|
|
743
|
+ }
|
|
744
|
+ }
|
|
745
|
+ if(list==null){
|
|
746
|
+ if(newArr!=null && newArr.length>0){
|
|
747
|
+ for(let i=0;i<newArr.length;i++){
|
|
748
|
+ this.alreadmount_data.push(newArr[i])
|
|
749
|
+ }
|
|
750
|
+ }
|
|
751
|
+
|
|
752
|
+ }
|
|
753
|
+
|
599
|
754
|
console.log("1111111s");
|
600
|
755
|
}
|
601
|
756
|
});
|
|
@@ -603,6 +758,24 @@ export default {
|
603
|
758
|
|
604
|
759
|
// })
|
605
|
760
|
},
|
|
761
|
+ getPatientName(patient_id){
|
|
762
|
+ var name = ""
|
|
763
|
+ for(let i=0;i<this.patientList.length;i++){
|
|
764
|
+ if(patient_id == this.patientList[i].id){
|
|
765
|
+ name = this.patientList[i].name
|
|
766
|
+ }
|
|
767
|
+ }
|
|
768
|
+ return name
|
|
769
|
+ },
|
|
770
|
+ getPatientDialysisNo(patient_id){
|
|
771
|
+ var dialysis_no = ""
|
|
772
|
+ for(let i=0;i<this.patientList.length;i++){
|
|
773
|
+ if(patient_id == this.patientList[i].id){
|
|
774
|
+ dialysis_no = this.patientList[i].dialysis_no
|
|
775
|
+ }
|
|
776
|
+ }
|
|
777
|
+ return dialysis_no
|
|
778
|
+ },
|
606
|
779
|
//获取患者信息详情
|
607
|
780
|
getpatientdetails(val) {
|
608
|
781
|
console.log("val2332323223",this.currentRow)
|