Browse Source

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

yq1 6 days ago
parent
commit
db5e985df3

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

@@ -2681,15 +2681,15 @@ export default {
2681 2681
           }
2682 2682
           for (let i = 0; i < this.prescriptions.length; i++) {
2683 2683
             for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
2684
-              if (this.prescriptions[i].advices[b].prescribing_number == 0 || this.prescriptions[i].advices[b].prescribing_number == '') {
2685
-                this.$message.error('药品处方总量不能为0')
2684
+              if (this.prescriptions[i].advices[b].prescribing_number == 0 || this.prescriptions[i].advices[b].prescribing_number == ''  || Number.isNaN(this.prescriptions[i].advices[b].prescribing_number)) {
2685
+                this.$message.error('药品处方总量不能为0或者不能为NAN')
2686 2686
                 return
2687 2687
               }
2688 2688
             }
2689 2689
           }
2690 2690
           for (let i = 0; i < this.prescriptions.length; i++) {
2691 2691
             for (let b = 0; b < this.prescriptions[i].project.length; b++) {
2692
-              if (this.prescriptions[i].project[b].total == 0 || this.prescriptions[i].project[b].total == '') {
2692
+              if (this.prescriptions[i].project[b].total == 0 || this.prescriptions[i].project[b].total == '' || Number.isNaN(this.prescriptions[i].project[b].total)) {
2693 2693
                 this.$message.error('项目处方总量不能为0')
2694 2694
                 return
2695 2695
               }

+ 13 - 13
src/xt_permission.js View File

@@ -12,19 +12,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
12 12
 
13 13
 router.beforeEach((to, from, next) => {
14 14
   // 线上注释
15
-  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-  //   store.dispatch('VerifyConfigList', []).then(() => {
17
-  //     next()
18
-  //   })
19
-  // }
20
-  // if (store.getters.permission_routers === undefined) {
21
-  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-  //     next()
23
-  //   })
24
-  // } else {
25
-  //   next()
26
-  // }
27
-  // return
15
+  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+    store.dispatch('VerifyConfigList', []).then(() => {
17
+      next()
18
+    })
19
+  }
20
+  if (store.getters.permission_routers === undefined) {
21
+    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+      next()
23
+    })
24
+  } else {
25
+    next()
26
+  }
27
+  return
28 28
   // 线上注释
29 29
   NProgress.start()
30 30
   // console.log(store.getters.current_role_urls.indexOf(to.path))