Browse Source

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

XMLWAN 3 years ago
parent
commit
5ceabf90c3

+ 43 - 55
src/xt_pages/dialysis/batch_print/batch_print_order_fortyOne.vue View File

@@ -577,10 +577,6 @@
577 577
                                     医嘱内容
578 578
                                 </td>
579 579
                                 </tr>
580
-                                <!-- <tr style="line-height:35px;padding:8px 5px;">
581
-                            <td colspan="4" style="font-size: 16px">开医嘱</td>
582
-                            <td colspan="3" style="font-size: 16px">执行核对医嘱</td>
583
-                            </tr> -->
584 580
                                 <tr style="line-height:30px;padding:0 5px;">
585 581
                                 <td style="font-size: 16px" width="10%">时间</td>
586 582
                                 <td style="font-size: 16px" colspan="2" width="45%">医嘱内容</td>
@@ -589,31 +585,24 @@
589 585
                                 <td style="font-size: 16px" width="10%">执行人员</td>
590 586
                                 <td style="font-size: 16px" width="10%">核对人员</td>
591 587
                                 </tr>
592
-                                <!-- <template v-for="group in doctor_advices" > -->
593 588
 
594
-                                <tr v-for="(advice, advice_index) in record.his_advices.length > 0 ? record.his_advices : record.advices" :key="advice_index">
589
+                                <tr v-for="(advice, advice_index) in record.advices" :key="advice_index">
595 590
                                 <td height="30px" style="padding:4px 5px;">
596 591
                                     <span v-if="advice.start_time">
597 592
                                     {{ getTime(advice.start_time, "{h}:{i}") }}
598 593
                                     </span>
599
-                                    <!-- <span v-else>&nbsp;<br/>&nbsp;</span> -->
600 594
                                 </td>
601 595
                                 <td height="30px" colspan="2" class="advice-name" style="padding:4px 5px;">
602 596
                                     <span v-if="advice.parent_id > 0">---></span>
603 597
                                     <span>{{ advice.advice_name }}</span>
604 598
                                     <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
605
-                                    <span v-if="advice.prescribing_number">&nbsp;&nbsp; {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</span>
599
+                                    <span v-if="advice.prescribing_number"> &nbsp;&nbsp; {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</span>
606 600
                                     <span v-if="advice.single_dose != 0">{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
607 601
                                     <span v-if="advice.parent_id == 0">{{ advice.delivery_way }}</span>
608 602
                                     <span v-if="advice.parent_id == 0">{{ advice.execution_frequency }}</span>
609 603
                                     <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{ advice.remark }})</span>
610 604
                                 </td>
611
-                                <!-- <td colspan="2" height="60px" style="text-align: center" v-else >
612
-                                <span>{{advice.delivery_way}}</span>
613
-                                <span>{{advice.execution_frequency}}</span>
614
-                                <span v-if="advice.remark.length > 0">({{advice.remark}})</span>
615
-                            </td> -->
616
-                                <!-- <td width="10%" v-if="(advice.children && advice.children.length > 0 || advice.parent_id > 0) && advice.isShow == 2" ></td> -->
605
+                                
617 606
                                 <td height="30px" style="padding:4px 5px;">
618 607
                                     <span v-if="setAdminUserES(advice, 'advice_doctor') == ''">
619 608
                                         {{getAdminUser(advice, 'advice_doctor')}}
@@ -641,7 +630,6 @@
641 630
                                     </span>
642 631
                                 </td>
643 632
                                 </tr>
644
-                                <!-- </template> -->
645 633
                             </tbody>
646 634
                             </table>
647 635
                         </td>
@@ -754,7 +742,7 @@
754 742
                             <div class="inline_block" style="flex:1;display: flex;align-items: center;">
755 743
                                 上机护士:
756 744
                                 <div class="under_line" style="width: 80px;text-align: center">
757
-                                    <span v-if="setAdminUserES(record.dialysis_order, 'start_nurse') == ''">{{getAdminUser(record.dialysis_order, 'start_nurse')}}</span>
745
+                                    <span style="display: inline-block;height: 36px;line-height: 36px;" v-if="setAdminUserES(record.dialysis_order, 'start_nurse') == ''">{{getAdminUser(record.dialysis_order, 'start_nurse')}}</span>
758 746
                                     <span v-else>
759 747
                                         <img class="es-img" style="height:30px;" :src="setAdminUserES(record.dialysis_order, 'start_nurse')" />
760 748
                                     </span>
@@ -764,13 +752,13 @@
764 752
                                 核对人员:
765 753
                                 <div class="under_line" style="width: 80px;text-align: center">
766 754
                                     <span v-if="record.check != null ? record.dialysis_order.start_nurse != record.check.modifier : false">
767
-                                        <span v-if="setAdminUserES(record.check, record.check == null ? 0 : 'modifier') == ''">
755
+                                        <span style="display: inline-block;height: 36px;line-height: 36px;" v-if="setAdminUserES(record.check, record.check == null ? 0 : 'modifier') == ''">
768 756
                                         {{ getAdminUser(record.check, record.check == null ? 0 : 'modifier') }}
769 757
                                         </span>
770 758
                                         <img style="height:30px;" :src="setAdminUserES(record.check, record.check == null ? 0 : 'modifier')" alt srcset v-else />
771 759
                                     </span>
772 760
                                     <span v-else>
773
-                                        <span v-if="setAdminUserES(record.check, record.check == null ? 0 : 'creater') == ''">
761
+                                        <span style="display: inline-block;height: 36px;line-height: 36px;" v-if="setAdminUserES(record.check, record.check == null ? 0 : 'creater') == ''">
774 762
                                         {{ getAdminUser(record.check, "creater") }}
775 763
                                         </span>
776 764
                                         <img style="height:30px;" :src="setAdminUserES(record.check, record.check == null ? 0 : 'creater')" alt srcset v-else />
@@ -780,7 +768,7 @@
780 768
                             <div class="inline_block" style="flex:1;display: flex;align-items: center;">
781 769
                                 下机护士:
782 770
                                 <div class="under_line" style="width: 80px;text-align: center">
783
-                                    <span v-if="setAdminUserES(record.dialysis_order, 'finish_nurse') == ''">{{getAdminUser(record.dialysis_order, 'finish_nurse')}}</span>
771
+                                    <span style="display: inline-block;height: 36px;line-height: 36px;" v-if="setAdminUserES(record.dialysis_order, 'finish_nurse') == ''">{{getAdminUser(record.dialysis_order, 'finish_nurse')}}</span>
784 772
                                     <span v-else>
785 773
                                         <img class="es-img" style="height:30px;" :src="setAdminUserES(record.dialysis_order, 'finish_nurse')" />
786 774
                                     </span>
@@ -789,7 +777,7 @@
789 777
                             <div class="inline_block" style="flex:1;display: flex;align-items: center;">
790 778
                                 治疗医生:
791 779
                                 <div class="under_line" style="width: 80px;text-align: center">
792
-                                    <span v-if="setAdminUserES(record.prescription, 'creater') == ''">{{getAdminUser(record.prescription, 'creater')}}</span>
780
+                                    <span style="display: inline-block;height: 36px;line-height: 36px;" v-if="setAdminUserES(record.prescription, 'creater') == ''">{{getAdminUser(record.prescription, 'creater')}}</span>
793 781
                                     <img class="es-img" :src="setAdminUserES(record.prescription, 'creater')" alt="" srcset="" v-else style="height: 30px;">
794 782
                                 </div>
795 783
                             </div>
@@ -1003,8 +991,8 @@ export default {
1003 991
             }
1004 992
 
1005 993
             var delghTwo = 0
1006
-            if (this.records[recordIndex].advices && this.records[recordIndex].advices.length < 12) {
1007
-              delghTwo = 12 - this.records[recordIndex].advices.length
994
+            if (this.records[recordIndex].advices && this.records[recordIndex].advices.length < 6) {
995
+              delghTwo = 6 - this.records[recordIndex].advices.length
1008 996
             } else {
1009 997
               delghTwo = 0
1010 998
             }
@@ -1018,42 +1006,42 @@ export default {
1018 1006
               }
1019 1007
             }
1020 1008
 
1021
-            var childMap = {}
1022
-            for (const index in this.records[recordIndex].advices) {
1023
-              if (this.records[recordIndex].advices[index].parent_id == 0) {
1024
-                continue
1025
-              }
1026
-              if (
1027
-                !(
1028
-                  this.records[recordIndex].advices[index].parent_id in childMap
1029
-                )
1030
-              ) {
1031
-                childMap[
1032
-                  this.records[recordIndex].advices[index].parent_id
1033
-                ] = []
1034
-              }
1035
-              childMap[this.records[recordIndex].advices[index].parent_id].push(
1036
-                this.records[recordIndex].advices[index]
1037
-              )
1038
-            }
1039
-
1040
-            var advices = []
1041
-            for (const index in this.records[recordIndex].advices) {
1042
-              if (this.records[recordIndex].advices[index].parent_id > 0) {
1043
-                continue
1044
-              }
1045
-              var item = this.records[recordIndex].advices[index]
1046
-              if (item.id in childMap) {
1047
-                item.children = childMap[item.id]
1048
-              } else {
1049
-                item.children = []
1050
-              }
1051
-              advices.push(item)
1052
-            }
1009
+            // var childMap = {}
1010
+            // for (const index in this.records[recordIndex].advices) {
1011
+            //   if (this.records[recordIndex].advices[index].parent_id == 0) {
1012
+            //     continue
1013
+            //   }
1014
+            //   if (
1015
+            //     !(
1016
+            //       this.records[recordIndex].advices[index].parent_id in childMap
1017
+            //     )
1018
+            //   ) {
1019
+            //     childMap[
1020
+            //       this.records[recordIndex].advices[index].parent_id
1021
+            //     ] = []
1022
+            //   }
1023
+            //   childMap[this.records[recordIndex].advices[index].parent_id].push(
1024
+            //     this.records[recordIndex].advices[index]
1025
+            //   )
1026
+            // }
1027
+
1028
+            // var advices = []
1029
+            // for (const index in this.records[recordIndex].advices) {
1030
+            //   if (this.records[recordIndex].advices[index].parent_id > 0) {
1031
+            //     continue
1032
+            //   }
1033
+            //   var item = this.records[recordIndex].advices[index]
1034
+            //   if (item.id in childMap) {
1035
+            //     item.children = childMap[item.id]
1036
+            //   } else {
1037
+            //     item.children = []
1038
+            //   }
1039
+            //   advices.push(item)
1040
+            // }
1053 1041
 
1054 1042
             var leftAdvice = []
1055 1043
             var rightAdvice = []
1056
-            var adlen = advices.length
1044
+            var adlen = this.records[recordIndex].advices.length
1057 1045
 
1058 1046
             var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
1059 1047
             for (var i = 0; i < halfLen; i++) {

+ 37 - 6
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -2655,7 +2655,7 @@
2655 2655
 
2656 2656
       comfirm() {
2657 2657
 
2658
-        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
2658
+        if (this.curDrugs.length > 0) {
2659 2659
           if (this.$store.getters.xt_user.org_id == 10138) {
2660 2660
             for (let i = 0; i < this.curDrugs.length; i++) {
2661 2661
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
@@ -2666,8 +2666,35 @@
2666 2666
             }
2667 2667
           }
2668 2668
         }
2669
+        if (this.teamList.length > 0) {
2670
+          if (this.$store.getters.xt_user.org_id == 10138) {
2671
+            for (let i = 0; i < this.teamList.length; i++) {
2672
+              if (this.curPrescriptions.med_type == 14 && this.teamList[i].is_special_diseases != 1) {
2673
+                this.$message.error('该处方属于特病类型处方,请开特病类型的项目')
2674
+                // return
2675
+              }
2669 2676
 
2670
-        if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
2677
+            }
2678
+          }
2679
+          
2680
+          if(this.$store.getters.xt_user.org_id == 10138){
2681
+            let arr = this.teamList
2682
+            let newArr = []
2683
+            arr.map(item => {
2684
+              if(this.curPrescriptions.med_type != 14){
2685
+                newArr.push(item)
2686
+              }
2687
+              if(this.curPrescriptions.med_type == 14 && item.is_special_diseases == 1){
2688
+                newArr.push(item)
2689
+              }
2690
+            })
2691
+            this.teamList = newArr
2692
+          }
2693
+        }
2694
+        
2695
+        
2696
+
2697
+        if (this.curDrugs.length == 0) {
2671 2698
           if (this.$store.getters.xt_user.org_id == 10138) {
2672 2699
             for (let i = 0; i < this.curDrugs.length; i++) {
2673 2700
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
@@ -2911,7 +2938,8 @@
2911 2938
                 cus_total: 1,
2912 2939
                 unit: project[i].unit,
2913 2940
                 type: 2,
2914
-                total: project[i].total
2941
+                total: project[i].total,
2942
+                is_special_diseases: project[i].disease_directory
2915 2943
               }
2916 2944
 
2917 2945
               this.tabProject.push(obj)
@@ -2933,7 +2961,8 @@
2933 2961
                 medical_code: good_info[i].medical_insurance_number,
2934 2962
                 unit: this.getGoodUnit(good_info[i].good_unit),
2935 2963
                 type: 3,
2936
-                total: good_info[i].total
2964
+                total: good_info[i].total,
2965
+                is_special_diseases: good_info[i].is_special_diseases
2937 2966
               }
2938 2967
               this.tabProject.push(obj)
2939 2968
             }
@@ -3027,7 +3056,8 @@
3027 3056
                   remark: '',
3028 3057
                   medical_code: project[i].project.medical_code,
3029 3058
                   unit: project[i].project.unit,
3030
-                  type: project[i].type
3059
+                  type: project[i].type,
3060
+                  is_special_diseases: project[i].project.disease_directory
3031 3061
                 }
3032 3062
                 if (obj.cus_total == 0 || obj.cus_total == undefined) {
3033 3063
                   obj.cus_total = 1
@@ -3056,7 +3086,8 @@
3056 3086
                   remark: '',
3057 3087
                   medical_code: project[i].good_info.medical_insurance_number,
3058 3088
                   unit: project[i].good_info.unit,
3059
-                  type: project[i].type
3089
+                  type: project[i].type,
3090
+                  is_special_diseases: project[i].good_info.is_special_diseases
3060 3091
                 }
3061 3092
                 if (obj.cus_total == 0 || obj.cus_total == undefined) {
3062 3093
                   obj.cus_total = 1