Sfoglia il codice sorgente

限制条件修改

zhangxc 5 anni fa
parent
commit
3e63003ccd
1 ha cambiato i file con 22 aggiunte e 13 eliminazioni
  1. 22 13
      src/components/recordInput/AddRecordItem.vue

+ 22 - 13
src/components/recordInput/AddRecordItem.vue

@@ -420,25 +420,34 @@
           let  casesEntryHospitals = []
           for(let i = 0; i < this.multipleSelection.length; i++){
             const item = this.multipleSelection[i]
-            if(item.value ===''){
-              this.$message({
-                message:"请填写所选医院终末扣分值",
-                type:'warning',
-                showClose: true
-              })
-             return
-            }
-            if(item.scoreRun ===''){
+            // if(item.value ===''){
+            //   this.$message({
+            //     message:"请填写所选医院终末扣分值",
+            //     type:'warning',
+            //     showClose: true
+            //   })
+            //  return
+            // }
+            // if(item.scoreRun ===''){
+            //   this.$message({
+            //     message:"请填写所选医院运行扣分值",
+            //     type:'warning',
+            //     showClose: true
+            //   })
+            //   this.canSave = true
+            //   return
+            // }
+            if(item.isUsed !="1" && item.isUsedRun !="1"){
               this.$message({
-                message:"请填写所选医院运行扣分值",
+                message:'至少选择1个系统',
                 type:'warning',
                 showClose: true
-              })
+              });
               this.canSave = true
               return
             }
             var reg = new RegExp(/^\d+(\.\d)?$/);
-            if(!reg.test(item.value) || item.value > 100){
+            if(item.value&&(!reg.test(item.value) || item.value > 100)){
                this.$message({
                 message:'终末扣分值请输入≥0且≤100的数字,最多保留小数点后1位',
                 type:'warning',
@@ -447,7 +456,7 @@
               this.canSave = true
               return
             }
-            if(!reg.test(item.scoreRun) || item.scoreRun > 100){
+            if(item.scoreRun&&(!reg.test(item.scoreRun) || item.scoreRun > 100)){
                this.$message({
                 message:'运行扣分值请输入≥0且≤100的数字,最多保留小数点后1位',
                 type:'warning',