陈少旭 6 dias atrás
pai
commit
194cd9bab1

+ 3 - 3
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Ver arquivo

@@ -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
               }