瀏覽代碼

打印预览

csx 5 年之前
父節點
當前提交
1238a5671b

+ 1 - 1
src/api/dialysis.js 查看文件

225
 
225
 
226
 export function CreateGroupAdvice(id, groupno, advices){
226
 export function CreateGroupAdvice(id, groupno, advices){
227
   return request({
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
     method:'post',
229
     method:'post',
230
     data:advices,
230
     data:advices,
231
   })
231
   })

+ 4 - 1
src/pages/main/PrintIndex.vue 查看文件

13
       <DialysisPrintOrderOne style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==1"> </DialysisPrintOrderOne>
13
       <DialysisPrintOrderOne style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==1"> </DialysisPrintOrderOne>
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>
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
       <DialysisPrintOrderFive style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==5"></DialysisPrintOrderFive>
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
     </div>
18
     </div>
18
   </div>
19
   </div>
19
 </template>
20
 </template>
29
 import DialysisPrintOrderOne from './template/DialysisPrintOrderOne';
30
 import DialysisPrintOrderOne from './template/DialysisPrintOrderOne';
30
 import DialysisPrintOrderTwo from './template/DialysisPrintOrderTwo';
31
 import DialysisPrintOrderTwo from './template/DialysisPrintOrderTwo';
31
 import DialysisPrintOrderFive from './template/DialysisPrintOrderFive';
32
 import DialysisPrintOrderFive from './template/DialysisPrintOrderFive';
33
+import DialysisPrintOrderSix from './template/DialysisPrintOrderSix'
32
 
34
 
33
 export default {
35
 export default {
34
   name: "PrintIndex",
36
   name: "PrintIndex",
35
   components: {
37
   components: {
38
+    DialysisPrintOrderSix,
36
     DialysisPrintOrderOne,
39
     DialysisPrintOrderOne,
37
     DialysisPrintOrderTwo,
40
     DialysisPrintOrderTwo,
38
     DialysisPrintOrderFive,
41
     DialysisPrintOrderFive,

+ 32 - 25
src/pages/main/dialog/PrescriptionDialog.vue 查看文件

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

文件差異過大導致無法顯示
+ 1388 - 0
src/pages/main/template/DialysisPrintOrderSix.vue


+ 133 - 4
src/pages/main/today/TodayTab.vue 查看文件

274
           {value: '9', label: ' 透后评估', showPopup: false},
274
           {value: '9', label: ' 透后评估', showPopup: false},
275
           {value: '10', label: ' 治疗小结', showPopup: false}
275
           {value: '10', label: ' 治疗小结', showPopup: false}
276
         ],
276
         ],
277
+        isPullData: 1,
277
         config: {},//库存自动扣减
278
         config: {},//库存自动扣减
278
         operators: [], //操作人
279
         operators: [], //操作人
279
         patient: {}, // 患者信息
280
         patient: {}, // 患者信息
768
             var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
769
             var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
769
             var doctor_advices = resp.data.doctor_advices // 临时医嘱
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
             this.goodInfos = resp.data.goodInfos
779
             this.goodInfos = resp.data.goodInfos
772
 
780
 
773
             for (let i = 0; i < doctor_advices.length; i++) {
781
             for (let i = 0; i < doctor_advices.length; i++) {
1022
       , adviceFunc: function () {
1030
       , adviceFunc: function () {
1023
 
1031
 
1024
       },
1032
       },
1025
-      prescriptionFunc: function (val) {
1026
-        this.requestDialysisRecord()
1027
-
1033
+      prescriptionFunc: function (val,advices) {
1028
         this.prescription = val
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
       longSolutionFunc: function (val) {
1100
       longSolutionFunc: function (val) {
1033
         this.solution = val
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
       ,