Kaynağa Gözat

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 23 saat önce
ebeveyn
işleme
d65c0ed67c

+ 111 - 34
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Dosyayı Görüntüle

@@ -559,6 +559,12 @@
559 559
                                v-on:cancel="cancel"></next-or-last-prescription>
560 560
     <!--<next-or-last-prescription ref='next_or_last_prescription' v-on:save="setValue" v-on:cancel="cancel"></next-or-last-prescription>-->
561 561
     <call-prescription ref='call_prescription' v-on:call="call" v-on:call-cancel="callCancel"></call-prescription>
562
+
563
+    <el-dialog title="提醒" :visible.sync="dialogTableVisible">
564
+      <el-table :data="err_msg">
565
+        <el-table-column label="提示" width="150"></el-table-column>
566
+      </el-table>
567
+    </el-dialog>
562 568
   </div>
563 569
 </template>
564 570
 
@@ -627,7 +633,9 @@ export default {
627 633
   },
628 634
   data() {
629 635
     return {
636
+      dialogTableVisible:false,
630 637
       drugs: [],
638
+      err_msg:[],
631 639
       zuobiao_drug: [],
632 640
       zuobiao_project: [],
633 641
       start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
@@ -3195,50 +3203,119 @@ export default {
3195 3203
                   data.prescriptions[i]["diagnoses"] = data.prescriptions[i].diagnose.join(",")
3196 3204
                 }
3197 3205
               }
3198
-              createHisPrescription(data, params).then(response => {
3199
-                if (response.data.state == 1) {
3200
-                  this.$emit('change', this.patientInfo.id)
3201
-                  this.$message.success('保存成功!')
3202
-                  this.$emit('editKeepLoad', false)
3203
-                  this.$parent.getInitData()
3204
-                  this.getlist()
3205 3206
 
3206
-                  if(this.org_id == 10653){ //将数据同步到费森系统
3207
-                    var that = this
3208
-                    axios.get('http://127.0.0.1:9531/api/yb/syncadvice', {
3209
-                      params: {patient_id: this.patientInfo.id}
3210
-                    })
3211
-                      .then(function(response) {
3212
-                        if (response.data.state == 0) {
3213
-                          that.$message.error(response.data.msg)
3214
-                          return false
3207
+              //针对广州从化意达对单位进行判断
3208
+              // 在保存处方的时候,在前端判断,所开的药品里的总量单位是否是最小单位
3209
+              // 如果不是,则弹窗提醒“******总量单位不是最小单位,是否继续保存”,
3210
+              // 取消 则不往后台提交,继续,则提交给后台
3211
+              console.log("this.prescriptions[i].advices[b]")
3212
+              // console.log(this.prescriptions[i].advices[b])
3213
+
3214
+              if(this.org_id == 10318){
3215
+                var err_msg = ""
3216
+                for(let i =0; i < this.prescriptions.length; i++){
3217
+                  for(let b= 0; b < this.prescriptions[i].advices.length;b++){
3218
+                    console.log(this.prescriptions[i].advices[b])
3219
+                    if(this.prescriptions[i].advices[b].prescribing_number_unit !=this.prescriptions[i].advices[b].drug.min_unit){
3220
+                      isLoading = false
3221
+                      if(err_msg.length == 0){
3222
+
3223
+                        err_msg = '<span>' + '<span style="color:red">' + this.prescriptions[i].advices[b].drug_name + '</span>' +"总量单位不是最小单位" + '</span>'
3224
+                      }else{
3225
+                        err_msg = err_msg + "</br>"+  '<span>' + '<span style="color:red">' + this.prescriptions[i].advices[b].drug_name + '</span>' +"总量单位不是最小单位" + '</span>'
3226
+                      }
3227
+                    }
3228
+                  }
3229
+                }
3230
+
3231
+                if (err_msg.length > 0){
3232
+                  err_msg = err_msg + "</br>" + '<span style="font-size: 20px">' + "是否继续保存" + '</span>'
3233
+                  this.$confirm(err_msg, '提示信息', {
3234
+                    distinguishCancelAndClose: true,
3235
+                    dangerouslyUseHTMLString: true,
3236
+                    confirmButtonText: '保存',
3237
+                    cancelButtonText: '取消'
3238
+                  })
3239
+                    .then(() => {
3240
+                      createHisPrescription(data, params).then(response => {
3241
+                        if (response.data.state == 1) {
3242
+                          this.$emit('change', this.patientInfo.id)
3243
+                          this.$message.success('保存成功!')
3244
+                          this.$emit('editKeepLoad', false)
3245
+                          this.$parent.getInitData()
3246
+                          this.getlist()
3247
+
3215 3248
                         } else {
3216
-                          if(response.data.data.status == -1){
3217
-                            that.$confirm(response.data.data.msg, '错误信息', {
3218
-                              confirmButtonText: '确 定',
3219
-                              type: 'warning'
3220
-                            }).then(() => {
3221
-                            }).catch(() => {
3222
-                            })
3223
-                          }else{
3224
-                            that.$message.success('同步费森系统成功!')
3225
-                          }
3249
+                          this.$message.error(response.data.msg)
3250
+                          this.$emit('editKeepLoad', false)
3251
+
3226 3252
                         }
3227 3253
                       })
3228
-                      .catch(function(error) {
3254
+                    })
3255
+                    .catch(action => {
3256
+                      // isLoading = false
3257
+                      this.$emit('editKeepLoad', false)
3229 3258
 
3230
-                      })
3231
-                  }
3259
+                    });
3232 3260
 
3261
+                }else{
3262
+                  createHisPrescription(data, params).then(response => {
3263
+                    if (response.data.state == 1) {
3264
+                      this.$emit('change', this.patientInfo.id)
3265
+                      this.$message.success('保存成功!')
3266
+                      this.$emit('editKeepLoad', false)
3267
+                      this.$parent.getInitData()
3268
+                      this.getlist()
3233 3269
 
3270
+                    } else {
3271
+                      this.$message.error(response.data.msg)
3272
+                      this.$emit('editKeepLoad', false)
3234 3273
 
3274
+                    }
3275
+                  })
3276
+                }
3277
+              }else{
3278
+                createHisPrescription(data, params).then(response => {
3279
+                  if (response.data.state == 1) {
3280
+                    this.$emit('change', this.patientInfo.id)
3281
+                    this.$message.success('保存成功!')
3282
+                    this.$emit('editKeepLoad', false)
3283
+                    this.$parent.getInitData()
3284
+                    this.getlist()
3285
+
3286
+                    if(this.org_id == 10653){ //将数据同步到费森系统
3287
+                      var that = this
3288
+                      axios.get('http://127.0.0.1:9531/api/yb/syncadvice', {
3289
+                        params: {patient_id: this.patientInfo.id}
3290
+                      })
3291
+                        .then(function(response) {
3292
+                          if (response.data.state == 0) {
3293
+                            that.$message.error(response.data.msg)
3294
+                            return false
3295
+                          } else {
3296
+                            if(response.data.data.status == -1){
3297
+                              that.$confirm(response.data.data.msg, '错误信息', {
3298
+                                confirmButtonText: '确 定',
3299
+                                type: 'warning'
3300
+                              }).then(() => {
3301
+                              }).catch(() => {
3302
+                              })
3303
+                            }else{
3304
+                              that.$message.success('同步费森系统成功!')
3305
+                            }
3306
+                          }
3307
+                        })
3308
+                        .catch(function(error) {
3309
+                        })
3310
+                    }
3311
+                  } else {
3312
+                    this.$message.error(response.data.msg)
3313
+                    this.$emit('editKeepLoad', false)
3235 3314
 
3236
-                } else {
3237
-                  this.$message.error(response.data.msg)
3238
-                  this.$emit('editKeepLoad', false)
3315
+                  }
3316
+                })
3239 3317
 
3240
-                }
3241
-              })
3318
+              }
3242 3319
             }
3243 3320
           }
3244 3321
 

+ 1 - 1
src/xt_permission.js Dosyayı Görüntüle

@@ -11,7 +11,7 @@ const loginWhiteList = ['/token/verify', '/401', '/404'] // 登录验证白名
11 11
 const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名单
12 12
 
13 13
 router.beforeEach((to, from, next) => {
14
-  // 线上注释
14
+  // // 线上注释
15 15
   // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16 16
   //   store.dispatch('VerifyConfigList', []).then(() => {
17 17
   //     next()