瀏覽代碼

长期医嘱提醒

csx 5 年之前
父節點
當前提交
c3e5dfa75b
共有 2 個文件被更改,包括 168 次插入77 次删除
  1. 163 72
      src/pages/main/dialog/PrescriptionDialog.vue
  2. 5 5
      src/pages/main/dialog/subMenu/LongAdviceSubMenu.vue

+ 163 - 72
src/pages/main/dialog/PrescriptionDialog.vue 查看文件

5
       <div class="DialogTit">
5
       <div class="DialogTit">
6
         <span @click="close()" class="iconfont">&#xe6e9;</span>
6
         <span @click="close()" class="iconfont">&#xe6e9;</span>
7
         <h1 class="name">透析处方</h1>
7
         <h1 class="name">透析处方</h1>
8
-        <span @click="commitInfo" class="success">完成</span>
8
+        <span @click="commitInfo" class="success" v-if="isPermission()">完成</span>
9
+        <span @click="commitInfo" class="success" v-if="!isPermission()"></span>
10
+
9
       </div>
11
       </div>
10
 
12
 
11
       <div class="DialogContent" id="dialogTop">
13
       <div class="DialogContent" id="dialogTop">
287
         <!--</div>-->
289
         <!--</div>-->
288
         <div class="PrescSubmit">
290
         <div class="PrescSubmit">
289
           <button style="display: none" class="tj" @click="sign()">医生签名</button>
291
           <button style="display: none" class="tj" @click="sign()">医生签名</button>
290
-          <button class="tjcq" @click="commitSolutionInfo">保存并设为长期处方</button>
291
-          <button class="tj" @click="commitInfo">保存</button>
292
+          <button class="tjcq" @click="commitSolutionInfo" v-if="isPermission()">保存并设为长期处方</button>
293
+          <button class="tj" @click="commitInfo" v-if="isPermission()">保存</button>
292
         </div>
294
         </div>
293
       </div>
295
       </div>
294
     </div>
296
     </div>
508
     },
510
     },
509
 
511
 
510
     methods: {
512
     methods: {
513
+      isPermission(){
514
+        if(this.$store.getters.user.user.user_type == 3 && (this.$store.getters.user.template_info.template_id == 2 || this.$store.getters.user.template_info.template_id == 6)){
515
+          return false
516
+        }else{
517
+          return true
518
+        }
519
+      },
511
       isShow (name) {
520
       isShow (name) {
512
         var filedList = this.$store.getters.user.fileds
521
         var filedList = this.$store.getters.user.fileds
513
 
522
 
883
         return anticoagulan_name
892
         return anticoagulan_name
884
       },
893
       },
885
       commitInfo: function () {
894
       commitInfo: function () {
886
-        this.is_pre = 1
887
 
895
 
888
 
896
 
897
+        this.is_pre = 1
889
         if (this.prescription_prop.id == '') {
898
         if (this.prescription_prop.id == '') {
890
           console.log(this.is_open)
899
           console.log(this.is_open)
891
-          if (this.is_open == 1) {
900
+          if (this.is_open == 0){
901
+            Toast.loading({forbidClick: true, duration: 0})
902
+            let ParamsQuery = this.dialysisPrescription
903
+            ParamsQuery['patient'] = this.$route.query.patient_id
904
+            ParamsQuery['record_date'] = this.record_date
905
+            commitDialysisPrescription(ParamsQuery).then(response => {
906
+              if (response.data.state == 0) {
907
+                Toast.fail(response.data.msg)
908
+                return false
909
+              } else {
910
+                Toast.success('提交成功')
911
+
912
+                this.$emit('prescription', response.data.data.prescription)
913
+                this.finish()
914
+
915
+              }
916
+            })
917
+
918
+          }else if (this.is_open == 1) {
892
             //弹框推送提醒
919
             //弹框推送提醒
893
             this.advicePropForm.list = this.targetAdvices
920
             this.advicePropForm.list = this.targetAdvices
894
             this.advicePropForm.operators = this.admin_users_prop
921
             this.advicePropForm.operators = this.admin_users_prop
902
             }
929
             }
903
 
930
 
904
           } else if (this.is_open == 2) {
931
           } else if (this.is_open == 2) {
905
-            this.advice_visibility = false
906
-            let params = {
907
-              advices: this.waitUploadAdvices,
908
-              advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
909
-              advice_doctor: this.waitUploadAdvices[0].advice_doctor,
910
-              advice_type: this.waitUploadAdvices[0].advice_type,
911
-              parent_id: this.patient_id,
912
-              start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
913
-              remark: '',
914
-            }
915
-            CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
916
-              var resp = rs.data
917
-              if (resp.state == 1) {
918
-
919
-              } else {
920
 
932
 
933
+            if(this.waitUploadAdvices.length > 0) {
934
+              this.advice_visibility = false
935
+              let params = {
936
+                advices: this.waitUploadAdvices,
937
+                advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
938
+                advice_doctor: this.waitUploadAdvices[0].advice_doctor,
939
+                advice_type: this.waitUploadAdvices[0].advice_type,
940
+                parent_id: this.patient_id,
941
+                start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
942
+                remark: '',
921
               }
943
               }
922
-            })
944
+              CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
945
+                var resp = rs.data
946
+                if (resp.state == 1) {
947
+
948
+                } else {
949
+
950
+                }
951
+              })
952
+            }
923
 
953
 
924
             Toast.loading({forbidClick: true, duration: 0})
954
             Toast.loading({forbidClick: true, duration: 0})
925
             let ParamsQuery = this.dialysisPrescription
955
             let ParamsQuery = this.dialysisPrescription
941
 
971
 
942
         } else {
972
         } else {
943
           if (this.dialysisPrescription.creater == 0) {
973
           if (this.dialysisPrescription.creater == 0) {
944
-            if (this.is_open == 1) {
974
+            if (this.is_open == 0){
975
+              Toast.loading({forbidClick: true, duration: 0})
976
+              let ParamsQuery = this.dialysisPrescription
977
+              ParamsQuery['patient'] = this.$route.query.patient_id
978
+              ParamsQuery['record_date'] = this.record_date
979
+              commitDialysisPrescription(ParamsQuery).then(response => {
980
+                if (response.data.state == 0) {
981
+                  Toast.fail(response.data.msg)
982
+                  return false
983
+                } else {
984
+                  Toast.success('提交成功')
985
+
986
+                  this.$emit('prescription', response.data.data.prescription)
987
+                  this.finish()
988
+
989
+                }
990
+              })
991
+
992
+            }else  if (this.is_open == 1) {
945
               //弹框推送提醒
993
               //弹框推送提醒
946
               this.advicePropForm.list = this.targetAdvices
994
               this.advicePropForm.list = this.targetAdvices
947
               this.advicePropForm.operators = this.admin_users_prop
995
               this.advicePropForm.operators = this.admin_users_prop
955
               }
1003
               }
956
 
1004
 
957
             } else if (this.is_open == 2) {
1005
             } else if (this.is_open == 2) {
958
-              this.advice_visibility = false
959
-              let params = {
960
-                advices: this.waitUploadAdvices,
961
-                advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
962
-                advice_doctor: this.waitUploadAdvices[0].advice_doctor,
963
-                advice_type: this.waitUploadAdvices[0].advice_type,
964
-                parent_id: this.patient_id,
965
-                start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
966
-                remark: '',
967
-              }
968
-              CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
969
-                var resp = rs.data
970
-                if (resp.state == 1) {
1006
+              if(this.waitUploadAdvices.length > 0) {
1007
+
1008
+                this.advice_visibility = false
1009
+                let params = {
1010
+                  advices: this.waitUploadAdvices,
1011
+                  advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1012
+                  advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1013
+                  advice_type: this.waitUploadAdvices[0].advice_type,
1014
+                  parent_id: this.patient_id,
1015
+                  start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1016
+                  remark: '',
1017
+                }
1018
+                CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1019
+                  var resp = rs.data
1020
+                  if (resp.state == 1) {
971
 
1021
 
972
-                } else {
1022
+                  } else {
973
 
1023
 
974
-                }
975
-              })
1024
+                  }
1025
+                })
1026
+              }
976
 
1027
 
977
             }
1028
             }
978
           }
1029
           }
998
         this.is_pre = 2
1049
         this.is_pre = 2
999
 
1050
 
1000
         if (this.prescription_prop.id == '') {
1051
         if (this.prescription_prop.id == '') {
1001
-          if (this.is_open == 1) {
1052
+          if (this.is_open == 0){
1053
+            Toast.loading({forbidClick: true, duration: 0})
1054
+            let ParamsQuery = this.dialysisPrescription
1055
+            ParamsQuery['patient'] = this.$route.query.patient_id
1056
+            ParamsQuery['record_date'] = this.record_date
1057
+            commitDialysisPrescription(ParamsQuery).then(response => {
1058
+              if (response.data.state == 0) {
1059
+                Toast.fail(response.data.msg)
1060
+                return false
1061
+              } else {
1062
+                Toast.success('提交成功')
1063
+
1064
+                this.$emit('prescription', response.data.data.prescription)
1065
+                this.finish()
1066
+
1067
+              }
1068
+            })
1069
+
1070
+          } else if (this.is_open == 1) {
1002
             //弹框推送提醒
1071
             //弹框推送提醒
1003
             this.advicePropForm.list = this.targetAdvices
1072
             this.advicePropForm.list = this.targetAdvices
1004
             this.advicePropForm.operators = this.admin_users_prop
1073
             this.advicePropForm.operators = this.admin_users_prop
1012
             }
1081
             }
1013
 
1082
 
1014
           } else if (this.is_open == 2) {
1083
           } else if (this.is_open == 2) {
1015
-            this.advice_visibility = false
1016
-            let params = {
1017
-              advices: this.waitUploadAdvices,
1018
-              advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1019
-              advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1020
-              advice_type: this.waitUploadAdvices[0].advice_type,
1021
-              parent_id: this.patient_id,
1022
-              start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1023
-              remark: '',
1024
-            }
1025
-            CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1026
-              var resp = rs.data
1027
-              if (resp.state == 1) {
1084
+            if(this.waitUploadAdvices.length > 0) {
1085
+              this.advice_visibility = false
1086
+              let params = {
1087
+                advices: this.waitUploadAdvices,
1088
+                advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1089
+                advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1090
+                advice_type: this.waitUploadAdvices[0].advice_type,
1091
+                parent_id: this.patient_id,
1092
+                start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1093
+                remark: '',
1094
+              }
1095
+              CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1096
+                var resp = rs.data
1097
+                if (resp.state == 1) {
1028
 
1098
 
1029
-              } else {
1099
+                } else {
1030
 
1100
 
1031
-              }
1032
-            })
1101
+                }
1102
+              })
1103
+            }
1033
 
1104
 
1034
             Toast.loading({forbidClick: true, duration: 0})
1105
             Toast.loading({forbidClick: true, duration: 0})
1035
             let ParamsQuery = this.dialysisPrescription
1106
             let ParamsQuery = this.dialysisPrescription
1054
 
1125
 
1055
         } else {
1126
         } else {
1056
           if (this.dialysisPrescription.creater == 0) {
1127
           if (this.dialysisPrescription.creater == 0) {
1057
-            if (this.is_open == 1) {
1128
+            if (this.is_open == 0){
1129
+              Toast.loading({forbidClick: true, duration: 0})
1130
+              let ParamsQuery = this.dialysisPrescription
1131
+              ParamsQuery['patient'] = this.$route.query.patient_id
1132
+              ParamsQuery['record_date'] = this.record_date
1133
+              commitDialysisPrescription(ParamsQuery).then(response => {
1134
+                if (response.data.state == 0) {
1135
+                  Toast.fail(response.data.msg)
1136
+                  return false
1137
+                } else {
1138
+                  Toast.success('提交成功')
1139
+
1140
+                  this.$emit('prescription', response.data.data.prescription)
1141
+                  this.finish()
1142
+
1143
+                }
1144
+              })
1145
+
1146
+            }else  if (this.is_open == 1) {
1058
               //弹框推送提醒
1147
               //弹框推送提醒
1059
               this.advicePropForm.list = this.targetAdvices
1148
               this.advicePropForm.list = this.targetAdvices
1060
               this.advicePropForm.operators = this.admin_users_prop
1149
               this.advicePropForm.operators = this.admin_users_prop
1068
               }
1157
               }
1069
 
1158
 
1070
             } else if (this.is_open == 2) {
1159
             } else if (this.is_open == 2) {
1071
-              this.advice_visibility = false
1072
-              let params = {
1073
-                advices: this.waitUploadAdvices,
1074
-                advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1075
-                advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1076
-                advice_type: this.waitUploadAdvices[0].advice_type,
1077
-                parent_id: this.patient_id,
1078
-                start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1079
-                remark: '',
1080
-              }
1081
-              CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1082
-                var resp = rs.data
1083
-                if (resp.state == 1) {
1160
+              if(this.waitUploadAdvices.length > 0) {
1161
+                this.advice_visibility = false
1162
+                let params = {
1163
+                  advices: this.waitUploadAdvices,
1164
+                  advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1165
+                  advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1166
+                  advice_type: this.waitUploadAdvices[0].advice_type,
1167
+                  parent_id: this.patient_id,
1168
+                  start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1169
+                  remark: '',
1170
+                }
1171
+                CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1172
+                  var resp = rs.data
1173
+                  if (resp.state == 1) {
1084
 
1174
 
1085
-                } else {
1175
+                  } else {
1086
 
1176
 
1087
-                }
1088
-              })
1177
+                  }
1178
+                })
1179
+              }
1089
 
1180
 
1090
             }
1181
             }
1091
           }
1182
           }

+ 5 - 5
src/pages/main/dialog/subMenu/LongAdviceSubMenu.vue 查看文件

68
       }, getContent (val) {
68
       }, getContent (val) {
69
         let prescribing_number = ''
69
         let prescribing_number = ''
70
         let single_dose = ''
70
         let single_dose = ''
71
-        let advice_name = ''
71
+        let advice_desc = ''
72
 
72
 
73
         if (val.prescribing_number > 0) {
73
         if (val.prescribing_number > 0) {
74
           prescribing_number = val.prescribing_number + val.prescribing_number_unit
74
           prescribing_number = val.prescribing_number + val.prescribing_number_unit
77
           single_dose = ' 单次用量 ' + val.single_dose + val.single_dose_unit
77
           single_dose = ' 单次用量 ' + val.single_dose + val.single_dose_unit
78
         }
78
         }
79
 
79
 
80
-        if (val.advice_name > 0) {
81
-          advice_name = val.advice_name + val.drug_spec_unit
80
+        if (val.advice_desc > 0) {
81
+          advice_desc = val.advice_desc + val.drug_spec_unit
82
         }
82
         }
83
 
83
 
84
         let name = ""
84
         let name = ""
101
               + val.child[i].presc
101
               + val.child[i].presc
102
               + val.child[i].single
102
               + val.child[i].single
103
           }
103
           }
104
-          return  val.advice_name +"  "+ val.drug_spec+" "
104
+          return  val.advice_name +"  "+advice_desc+" "
105
             + val.drug_spec_unit
105
             + val.drug_spec_unit
106
             + prescribing_number
106
             + prescribing_number
107
             + " "+single_dose+" "+ " "+val.delivery_way+" "+ val.execution_frequency + val.remark +name
107
             + " "+single_dose+" "+ " "+val.delivery_way+" "+ val.execution_frequency + val.remark +name
108
 
108
 
109
         } else {
109
         } else {
110
-          return advice_name +"  "
110
+          return val.advice_name +"  "+advice_desc
111
             + prescribing_number
111
             + prescribing_number
112
             + " "+single_dose+" "+ " "+val.delivery_way+" "+ val.execution_frequency + val.remark
112
             + " "+single_dose+" "+ " "+val.delivery_way+" "+ val.execution_frequency + val.remark
113
         }
113
         }