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
                                     医嘱内容
577
                                     医嘱内容
578
                                 </td>
578
                                 </td>
579
                                 </tr>
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
                                 <tr style="line-height:30px;padding:0 5px;">
580
                                 <tr style="line-height:30px;padding:0 5px;">
585
                                 <td style="font-size: 16px" width="10%">时间</td>
581
                                 <td style="font-size: 16px" width="10%">时间</td>
586
                                 <td style="font-size: 16px" colspan="2" width="45%">医嘱内容</td>
582
                                 <td style="font-size: 16px" colspan="2" width="45%">医嘱内容</td>
589
                                 <td style="font-size: 16px" width="10%">执行人员</td>
585
                                 <td style="font-size: 16px" width="10%">执行人员</td>
590
                                 <td style="font-size: 16px" width="10%">核对人员</td>
586
                                 <td style="font-size: 16px" width="10%">核对人员</td>
591
                                 </tr>
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
                                 <td height="30px" style="padding:4px 5px;">
590
                                 <td height="30px" style="padding:4px 5px;">
596
                                     <span v-if="advice.start_time">
591
                                     <span v-if="advice.start_time">
597
                                     {{ getTime(advice.start_time, "{h}:{i}") }}
592
                                     {{ getTime(advice.start_time, "{h}:{i}") }}
598
                                     </span>
593
                                     </span>
599
-                                    <!-- <span v-else>&nbsp;<br/>&nbsp;</span> -->
600
                                 </td>
594
                                 </td>
601
                                 <td height="30px" colspan="2" class="advice-name" style="padding:4px 5px;">
595
                                 <td height="30px" colspan="2" class="advice-name" style="padding:4px 5px;">
602
                                     <span v-if="advice.parent_id > 0">---></span>
596
                                     <span v-if="advice.parent_id > 0">---></span>
603
                                     <span>{{ advice.advice_name }}</span>
597
                                     <span>{{ advice.advice_name }}</span>
604
                                     <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
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
                                     <span v-if="advice.single_dose != 0">{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
600
                                     <span v-if="advice.single_dose != 0">{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
607
                                     <span v-if="advice.parent_id == 0">{{ advice.delivery_way }}</span>
601
                                     <span v-if="advice.parent_id == 0">{{ advice.delivery_way }}</span>
608
                                     <span v-if="advice.parent_id == 0">{{ advice.execution_frequency }}</span>
602
                                     <span v-if="advice.parent_id == 0">{{ advice.execution_frequency }}</span>
609
                                     <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{ advice.remark }})</span>
603
                                     <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{ advice.remark }})</span>
610
                                 </td>
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
                                 <td height="30px" style="padding:4px 5px;">
606
                                 <td height="30px" style="padding:4px 5px;">
618
                                     <span v-if="setAdminUserES(advice, 'advice_doctor') == ''">
607
                                     <span v-if="setAdminUserES(advice, 'advice_doctor') == ''">
619
                                         {{getAdminUser(advice, 'advice_doctor')}}
608
                                         {{getAdminUser(advice, 'advice_doctor')}}
641
                                     </span>
630
                                     </span>
642
                                 </td>
631
                                 </td>
643
                                 </tr>
632
                                 </tr>
644
-                                <!-- </template> -->
645
                             </tbody>
633
                             </tbody>
646
                             </table>
634
                             </table>
647
                         </td>
635
                         </td>
754
                             <div class="inline_block" style="flex:1;display: flex;align-items: center;">
742
                             <div class="inline_block" style="flex:1;display: flex;align-items: center;">
755
                                 上机护士:
743
                                 上机护士:
756
                                 <div class="under_line" style="width: 80px;text-align: center">
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
                                     <span v-else>
746
                                     <span v-else>
759
                                         <img class="es-img" style="height:30px;" :src="setAdminUserES(record.dialysis_order, 'start_nurse')" />
747
                                         <img class="es-img" style="height:30px;" :src="setAdminUserES(record.dialysis_order, 'start_nurse')" />
760
                                     </span>
748
                                     </span>
764
                                 核对人员:
752
                                 核对人员:
765
                                 <div class="under_line" style="width: 80px;text-align: center">
753
                                 <div class="under_line" style="width: 80px;text-align: center">
766
                                     <span v-if="record.check != null ? record.dialysis_order.start_nurse != record.check.modifier : false">
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
                                         {{ getAdminUser(record.check, record.check == null ? 0 : 'modifier') }}
756
                                         {{ getAdminUser(record.check, record.check == null ? 0 : 'modifier') }}
769
                                         </span>
757
                                         </span>
770
                                         <img style="height:30px;" :src="setAdminUserES(record.check, record.check == null ? 0 : 'modifier')" alt srcset v-else />
758
                                         <img style="height:30px;" :src="setAdminUserES(record.check, record.check == null ? 0 : 'modifier')" alt srcset v-else />
771
                                     </span>
759
                                     </span>
772
                                     <span v-else>
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
                                         {{ getAdminUser(record.check, "creater") }}
762
                                         {{ getAdminUser(record.check, "creater") }}
775
                                         </span>
763
                                         </span>
776
                                         <img style="height:30px;" :src="setAdminUserES(record.check, record.check == null ? 0 : 'creater')" alt srcset v-else />
764
                                         <img style="height:30px;" :src="setAdminUserES(record.check, record.check == null ? 0 : 'creater')" alt srcset v-else />
780
                             <div class="inline_block" style="flex:1;display: flex;align-items: center;">
768
                             <div class="inline_block" style="flex:1;display: flex;align-items: center;">
781
                                 下机护士:
769
                                 下机护士:
782
                                 <div class="under_line" style="width: 80px;text-align: center">
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
                                     <span v-else>
772
                                     <span v-else>
785
                                         <img class="es-img" style="height:30px;" :src="setAdminUserES(record.dialysis_order, 'finish_nurse')" />
773
                                         <img class="es-img" style="height:30px;" :src="setAdminUserES(record.dialysis_order, 'finish_nurse')" />
786
                                     </span>
774
                                     </span>
789
                             <div class="inline_block" style="flex:1;display: flex;align-items: center;">
777
                             <div class="inline_block" style="flex:1;display: flex;align-items: center;">
790
                                 治疗医生:
778
                                 治疗医生:
791
                                 <div class="under_line" style="width: 80px;text-align: center">
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
                                     <img class="es-img" :src="setAdminUserES(record.prescription, 'creater')" alt="" srcset="" v-else style="height: 30px;">
781
                                     <img class="es-img" :src="setAdminUserES(record.prescription, 'creater')" alt="" srcset="" v-else style="height: 30px;">
794
                                 </div>
782
                                 </div>
795
                             </div>
783
                             </div>
1003
             }
991
             }
1004
 
992
 
1005
             var delghTwo = 0
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
             } else {
996
             } else {
1009
               delghTwo = 0
997
               delghTwo = 0
1010
             }
998
             }
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
             var leftAdvice = []
1042
             var leftAdvice = []
1055
             var rightAdvice = []
1043
             var rightAdvice = []
1056
-            var adlen = advices.length
1044
+            var adlen = this.records[recordIndex].advices.length
1057
 
1045
 
1058
             var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
1046
             var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
1059
             for (var i = 0; i < halfLen; i++) {
1047
             for (var i = 0; i < halfLen; i++) {

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

2655
 
2655
 
2656
       comfirm() {
2656
       comfirm() {
2657
 
2657
 
2658
-        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
2658
+        if (this.curDrugs.length > 0) {
2659
           if (this.$store.getters.xt_user.org_id == 10138) {
2659
           if (this.$store.getters.xt_user.org_id == 10138) {
2660
             for (let i = 0; i < this.curDrugs.length; i++) {
2660
             for (let i = 0; i < this.curDrugs.length; i++) {
2661
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2661
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
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
           if (this.$store.getters.xt_user.org_id == 10138) {
2698
           if (this.$store.getters.xt_user.org_id == 10138) {
2672
             for (let i = 0; i < this.curDrugs.length; i++) {
2699
             for (let i = 0; i < this.curDrugs.length; i++) {
2673
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2700
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2911
                 cus_total: 1,
2938
                 cus_total: 1,
2912
                 unit: project[i].unit,
2939
                 unit: project[i].unit,
2913
                 type: 2,
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
               this.tabProject.push(obj)
2945
               this.tabProject.push(obj)
2933
                 medical_code: good_info[i].medical_insurance_number,
2961
                 medical_code: good_info[i].medical_insurance_number,
2934
                 unit: this.getGoodUnit(good_info[i].good_unit),
2962
                 unit: this.getGoodUnit(good_info[i].good_unit),
2935
                 type: 3,
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
               this.tabProject.push(obj)
2967
               this.tabProject.push(obj)
2939
             }
2968
             }
3027
                   remark: '',
3056
                   remark: '',
3028
                   medical_code: project[i].project.medical_code,
3057
                   medical_code: project[i].project.medical_code,
3029
                   unit: project[i].project.unit,
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
                 if (obj.cus_total == 0 || obj.cus_total == undefined) {
3062
                 if (obj.cus_total == 0 || obj.cus_total == undefined) {
3033
                   obj.cus_total = 1
3063
                   obj.cus_total = 1
3056
                   remark: '',
3086
                   remark: '',
3057
                   medical_code: project[i].good_info.medical_insurance_number,
3087
                   medical_code: project[i].good_info.medical_insurance_number,
3058
                   unit: project[i].good_info.unit,
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
                 if (obj.cus_total == 0 || obj.cus_total == undefined) {
3092
                 if (obj.cus_total == 0 || obj.cus_total == undefined) {
3062
                   obj.cus_total = 1
3093
                   obj.cus_total = 1