Browse Source

打印预览

csx 5 years ago
parent
commit
1238a5671b

+ 1 - 1
src/api/dialysis.js View File

@@ -225,7 +225,7 @@ export function PostModifyEndDialysis (params) {
225 225
 
226 226
 export function CreateGroupAdvice(id, groupno, advices){
227 227
   return request({
228
-    url:'/m/api/advice_remind/create?id='+id + '&groupno=' + groupno,
228
+    url:'/api/advice_remind/create?id='+id + '&groupno=' + groupno,
229 229
     method:'post',
230 230
     data:advices,
231 231
   })

+ 4 - 1
src/pages/main/PrintIndex.vue View File

@@ -13,7 +13,8 @@
13 13
       <DialysisPrintOrderOne style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==1"> </DialysisPrintOrderOne>
14 14
       <DialysisPrintOrderTwo style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==2||org_template_info.template_id ==0"></DialysisPrintOrderTwo>
15 15
       <DialysisPrintOrderFive style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==5"></DialysisPrintOrderFive>
16
-
16
+      <!--<DialysisPrintOrderSix style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==6"></DialysisPrintOrderSix>-->
17
+      <DialysisPrintOrderSix style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==6"></DialysisPrintOrderSix>
17 18
     </div>
18 19
   </div>
19 20
 </template>
@@ -29,10 +30,12 @@ import LabelBox from "./printItem/LabelBox";
29 30
 import DialysisPrintOrderOne from './template/DialysisPrintOrderOne';
30 31
 import DialysisPrintOrderTwo from './template/DialysisPrintOrderTwo';
31 32
 import DialysisPrintOrderFive from './template/DialysisPrintOrderFive';
33
+import DialysisPrintOrderSix from './template/DialysisPrintOrderSix'
32 34
 
33 35
 export default {
34 36
   name: "PrintIndex",
35 37
   components: {
38
+    DialysisPrintOrderSix,
36 39
     DialysisPrintOrderOne,
37 40
     DialysisPrintOrderTwo,
38 41
     DialysisPrintOrderFive,

+ 32 - 25
src/pages/main/dialog/PrescriptionDialog.vue View File

@@ -516,6 +516,7 @@ import MsgTip from './subMenu/MsgTip'
516 516
         zhiShow: true,
517 517
         totalShow: true,
518 518
         huShow: true,
519
+        doctorAdvices:[],
519 520
         propForm: {
520 521
           title: '',
521 522
           list: [],
@@ -758,6 +759,7 @@ import MsgTip from './subMenu/MsgTip'
758 759
           CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
759 760
             var resp = rs.data
760 761
             if (resp.state == 1) {
762
+              this.doctorAdvices = resp.data.advices
761 763
 
762 764
             } else {
763 765
 
@@ -776,7 +778,7 @@ import MsgTip from './subMenu/MsgTip'
776 778
               } else {
777 779
                 Toast.success('提交成功')
778 780
 
779
-                this.$emit('prescription', response.data.data.prescription)
781
+                this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
780 782
                 this.finish()
781 783
               }
782 784
             })
@@ -794,8 +796,8 @@ import MsgTip from './subMenu/MsgTip'
794 796
                 Toast.success('提交成功')
795 797
 
796 798
                 this.$emit('advice')
797
-                this.$emit('longSolution', response.data.data.solution)
798
-                this.$emit('prescription', response.data.data.prescription)
799
+                this.$emit('longSolution', response.data.data.solution,this.doctorAdvices)
800
+                this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
799 801
                 this.finish()
800 802
               }
801 803
             })
@@ -814,7 +816,7 @@ import MsgTip from './subMenu/MsgTip'
814 816
               } else {
815 817
                 Toast.success('提交成功')
816 818
 
817
-                this.$emit('prescription', response.data.data.prescription)
819
+                this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
818 820
                 this.finish()
819 821
               }
820 822
             })
@@ -832,8 +834,8 @@ import MsgTip from './subMenu/MsgTip'
832 834
                 Toast.success('提交成功')
833 835
 
834 836
                 this.$emit('advice')
835
-                this.$emit('longSolution', response.data.data.solution)
836
-                this.$emit('prescription', response.data.data.prescription)
837
+                this.$emit('longSolution', response.data.data.solution,this.doctorAdvices)
838
+                this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
837 839
                 this.finish()
838 840
               }
839 841
             })
@@ -987,13 +989,13 @@ import MsgTip from './subMenu/MsgTip'
987 989
                 return false
988 990
               } else {
989 991
                 Toast.success('提交成功')
990
-                this.dialysisPrescription.creater = response.data.data.prescription.creater
991 992
 
992
-                this.$emit('prescription', response.data.data.prescription)
993
+                this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
993 994
                 this.finish()
994 995
               }
995 996
             })
996 997
           } else if (this.is_open == 1) {
998
+
997 999
             if (this.targetAdvices.length > 0) {
998 1000
               //弹框推送提醒
999 1001
               this.advicePropForm.list = this.targetAdvices
@@ -1005,7 +1007,8 @@ import MsgTip from './subMenu/MsgTip'
1005 1007
                   this.advicePropForm.result.push(this.advicePropForm.list[i].id)
1006 1008
                 }
1007 1009
               }
1008
-            } else {
1010
+            }
1011
+            else {
1009 1012
               Toast.loading({forbidClick: true, duration: 0})
1010 1013
               let ParamsQuery = this.dialysisPrescription
1011 1014
               ParamsQuery['patient'] = this.$route.query.patient_id
@@ -1016,13 +1019,14 @@ import MsgTip from './subMenu/MsgTip'
1016 1019
                   return false
1017 1020
                 } else {
1018 1021
                   Toast.success('提交成功')
1019
-                  this.dialysisPrescription.creater = response.data.data.prescription.creater
1020 1022
 
1021
-                  this.$emit('prescription', response.data.data.prescription)
1023
+                  this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
1022 1024
                   this.finish()
1023 1025
                 }
1024 1026
               })
1025 1027
             }
1028
+
1029
+
1026 1030
           } else if (this.is_open == 2) {
1027 1031
             if (this.waitUploadAdvices.length > 0) {
1028 1032
               this.advice_visibility = false
@@ -1038,6 +1042,7 @@ import MsgTip from './subMenu/MsgTip'
1038 1042
               CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1039 1043
                 var resp = rs.data
1040 1044
                 if (resp.state == 1) {
1045
+                  this.doctorAdvices = resp.data.advices
1041 1046
 
1042 1047
                 } else {
1043 1048
 
@@ -1053,9 +1058,8 @@ import MsgTip from './subMenu/MsgTip'
1053 1058
                   return false
1054 1059
                 } else {
1055 1060
                   Toast.success('提交成功')
1056
-                  this.dialysisPrescription.creater = response.data.data.prescription.creater
1057 1061
 
1058
-                  this.$emit('prescription', response.data.data.prescription)
1062
+                  this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
1059 1063
                   this.finish()
1060 1064
                 }
1061 1065
               })
@@ -1070,9 +1074,8 @@ import MsgTip from './subMenu/MsgTip'
1070 1074
                   return false
1071 1075
                 } else {
1072 1076
                   Toast.success('提交成功')
1073
-                  this.dialysisPrescription.creater = response.data.data.prescription.creater
1074 1077
 
1075
-                  this.$emit('prescription', response.data.data.prescription)
1078
+                  this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
1076 1079
                   this.finish()
1077 1080
                 }
1078 1081
               })
@@ -1081,7 +1084,8 @@ import MsgTip from './subMenu/MsgTip'
1081 1084
           }
1082 1085
 
1083 1086
         } else {
1084
-          if (this.dialysisPrescription.creater == 0) {
1087
+
1088
+          if (this.prescription_prop.creater == 0) {
1085 1089
             if (this.is_open == 0) {
1086 1090
               Toast.loading({forbidClick: true, duration: 0})
1087 1091
               let ParamsQuery = this.dialysisPrescription
@@ -1094,7 +1098,7 @@ import MsgTip from './subMenu/MsgTip'
1094 1098
                 } else {
1095 1099
                   Toast.success('提交成功')
1096 1100
 
1097
-                  this.$emit('prescription', response.data.data.prescription)
1101
+                  this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
1098 1102
                   this.finish()
1099 1103
 
1100 1104
                 }
@@ -1126,7 +1130,7 @@ import MsgTip from './subMenu/MsgTip'
1126 1130
                   } else {
1127 1131
                     Toast.success('提交成功')
1128 1132
 
1129
-                    this.$emit('prescription', response.data.data.prescription)
1133
+                    this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
1130 1134
                     this.finish()
1131 1135
 
1132 1136
                   }
@@ -1150,6 +1154,7 @@ import MsgTip from './subMenu/MsgTip'
1150 1154
                 CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1151 1155
                   var resp = rs.data
1152 1156
                   if (resp.state == 1) {
1157
+                    this.doctorAdvices = resp.data.advices
1153 1158
 
1154 1159
                   } else {
1155 1160
 
@@ -1170,7 +1175,8 @@ import MsgTip from './subMenu/MsgTip'
1170 1175
 
1171 1176
                   }
1172 1177
                 })
1173
-              } else {
1178
+              }
1179
+              else {
1174 1180
                 Toast.loading({forbidClick: true, duration: 0})
1175 1181
                 let ParamsQuery = this.dialysisPrescription
1176 1182
                 ParamsQuery['patient'] = this.$route.query.patient_id
@@ -1181,7 +1187,7 @@ import MsgTip from './subMenu/MsgTip'
1181 1187
                     return false
1182 1188
                   } else {
1183 1189
                     Toast.success('提交成功')
1184
-                    this.$emit('prescription', response.data.data.prescription)
1190
+                    this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
1185 1191
                     this.finish()
1186 1192
 
1187 1193
                   }
@@ -1201,15 +1207,12 @@ import MsgTip from './subMenu/MsgTip'
1201 1207
                 return false
1202 1208
               } else {
1203 1209
                 Toast.success('提交成功')
1204
-                this.$emit('prescription', response.data.data.prescription)
1210
+                this.$emit('prescription', response.data.data.prescription,this.doctorAdvices)
1205 1211
                 this.finish()
1206 1212
 
1207 1213
               }
1208 1214
             })
1209 1215
 
1210
-
1211
-
1212
-
1213 1216
           }
1214 1217
 
1215 1218
 
@@ -1289,6 +1292,8 @@ import MsgTip from './subMenu/MsgTip'
1289 1292
               CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1290 1293
                 var resp = rs.data
1291 1294
                 if (resp.state == 1) {
1295
+                  this.doctorAdvices = resp.data.advices
1296
+
1292 1297
 
1293 1298
                 } else {
1294 1299
 
@@ -1336,7 +1341,7 @@ import MsgTip from './subMenu/MsgTip'
1336 1341
           }
1337 1342
 
1338 1343
         } else {
1339
-          if (this.dialysisPrescription.creater == 0) {
1344
+          if (this.prescription_prop.creater == 0) {
1340 1345
             if (this.is_open == 0) {
1341 1346
               Toast.loading({forbidClick: true, duration: 0})
1342 1347
               let ParamsQuery = this.dialysisPrescription
@@ -1409,6 +1414,8 @@ import MsgTip from './subMenu/MsgTip'
1409 1414
                 CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1410 1415
                   var resp = rs.data
1411 1416
                   if (resp.state == 1) {
1417
+                    this.doctorAdvices = resp.data.advices
1418
+
1412 1419
 
1413 1420
                   } else {
1414 1421
 

File diff suppressed because it is too large
+ 1388 - 0
src/pages/main/template/DialysisPrintOrderSix.vue


+ 133 - 4
src/pages/main/today/TodayTab.vue View File

@@ -274,6 +274,7 @@
274 274
           {value: '9', label: ' 透后评估', showPopup: false},
275 275
           {value: '10', label: ' 治疗小结', showPopup: false}
276 276
         ],
277
+        isPullData: 1,
277 278
         config: {},//库存自动扣减
278 279
         operators: [], //操作人
279 280
         patient: {}, // 患者信息
@@ -768,6 +769,13 @@
768 769
             var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
769 770
             var doctor_advices = resp.data.doctor_advices // 临时医嘱
770 771
 
772
+
773
+            if(prescription == null || prescription.creater == 0){
774
+              this.isPullData = 1
775
+            }else{
776
+              this.isPullData = 2
777
+            }
778
+
771 779
             this.goodInfos = resp.data.goodInfos
772 780
 
773 781
             for (let i = 0; i < doctor_advices.length; i++) {
@@ -1022,16 +1030,137 @@
1022 1030
       , adviceFunc: function () {
1023 1031
 
1024 1032
       },
1025
-      prescriptionFunc: function (val) {
1026
-        this.requestDialysisRecord()
1027
-
1033
+      prescriptionFunc: function (val,advices) {
1028 1034
         this.prescription = val
1035
+        if (advices.length > 0){
1036
+
1037
+          if (advices.length > 0) {
1038
+            var group = this.newAdviceGroupObject()
1039
+            var initGroupBlock = function (group, advice) {
1040
+              group.group_no = advice.groupno
1041
+              // group.start_time = advice.start_time
1042
+              // group.advice_doctor = advice.advice_doctor
1043
+              // group.exec_staff = advice.execution_staff
1044
+              // group.exec_time = advice.execution_time
1045
+              // group.checker = advice.checker
1046
+            }
1047
+            for (let index = 0; index < advices.length; index++) {
1048
+              const advice = advices[index]
1049
+              if (advice.groupno == 0) {
1050
+                // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
1051
+                if (advice.parent_id > 0) {
1052
+                  if (this.advice_groups.length > 0) {
1053
+                    var parent_group = this.advice_groups[
1054
+                    this.advice_groups.length - 1
1055
+                      ]
1056
+                    if (parent_group.advices.length > 0) {
1057
+                      if (parent_group.advices[0].id == advice.parent_id) {
1058
+                        parent_group.advices.push(advice)
1059
+                      }
1060
+                    }
1061
+                  }
1062
+                  continue
1063
+                } else {
1064
+                  if (group.group_no > 0) {
1065
+                    this.advice_groups.push(group)
1066
+                    group = this.newAdviceGroupObject()
1067
+                  }
1068
+
1069
+                  initGroupBlock(group, advice)
1070
+                  group.advices.push(advice)
1071
+                  this.advice_groups.push(group)
1072
+                  group = this.newAdviceGroupObject()
1073
+                  continue
1074
+                }
1075
+              }
1076
+
1077
+              if (group.group_no > 0 && group.group_no != advice.groupno) {
1078
+                this.advice_groups.push(group)
1079
+                group = this.newAdviceGroupObject()
1080
+              }
1081
+              if (group.group_no == 0) {
1082
+                initGroupBlock(group, advice)
1083
+              }
1084
+              if (group.group_no == advice.groupno) {
1085
+                group.advices.push(advice)
1086
+              }
1087
+            }
1088
+            if (group.group_no > 0) {
1089
+              // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
1090
+              this.advice_groups.push(group)
1091
+            }
1092
+
1093
+          }
1094
+
1095
+
1096
+        }
1029 1097
 
1030 1098
       }
1031 1099
       ,
1032 1100
       longSolutionFunc: function (val) {
1033 1101
         this.solution = val
1034
-        this.requestDialysisRecord()
1102
+        if (advices.length > 0){
1103
+
1104
+          if (advices.length > 0) {
1105
+            var group = this.newAdviceGroupObject()
1106
+            var initGroupBlock = function (group, advice) {
1107
+              group.group_no = advice.groupno
1108
+              // group.start_time = advice.start_time
1109
+              // group.advice_doctor = advice.advice_doctor
1110
+              // group.exec_staff = advice.execution_staff
1111
+              // group.exec_time = advice.execution_time
1112
+              // group.checker = advice.checker
1113
+            }
1114
+            for (let index = 0; index < advices.length; index++) {
1115
+              const advice = advices[index]
1116
+              if (advice.groupno == 0) {
1117
+                // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
1118
+                if (advice.parent_id > 0) {
1119
+                  if (this.advice_groups.length > 0) {
1120
+                    var parent_group = this.advice_groups[
1121
+                    this.advice_groups.length - 1
1122
+                      ]
1123
+                    if (parent_group.advices.length > 0) {
1124
+                      if (parent_group.advices[0].id == advice.parent_id) {
1125
+                        parent_group.advices.push(advice)
1126
+                      }
1127
+                    }
1128
+                  }
1129
+                  continue
1130
+                } else {
1131
+                  if (group.group_no > 0) {
1132
+                    this.advice_groups.push(group)
1133
+                    group = this.newAdviceGroupObject()
1134
+                  }
1135
+
1136
+                  initGroupBlock(group, advice)
1137
+                  group.advices.push(advice)
1138
+                  this.advice_groups.push(group)
1139
+                  group = this.newAdviceGroupObject()
1140
+                  continue
1141
+                }
1142
+              }
1143
+
1144
+              if (group.group_no > 0 && group.group_no != advice.groupno) {
1145
+                this.advice_groups.push(group)
1146
+                group = this.newAdviceGroupObject()
1147
+              }
1148
+              if (group.group_no == 0) {
1149
+                initGroupBlock(group, advice)
1150
+              }
1151
+              if (group.group_no == advice.groupno) {
1152
+                group.advices.push(advice)
1153
+              }
1154
+            }
1155
+            if (group.group_no > 0) {
1156
+              // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
1157
+              this.advice_groups.push(group)
1158
+            }
1159
+
1160
+          }
1161
+
1162
+
1163
+        }
1035 1164
 
1036 1165
       }
1037 1166
       ,