Browse Source

修改单值信息逻辑

shaun-sheep 5 years ago
parent
commit
6e361ac552
1 changed files with 21 additions and 13 deletions
  1. 21 13
      src/components/dialogs/list/batchDialog.vue

+ 21 - 13
src/components/dialogs/list/batchDialog.vue

@@ -297,20 +297,28 @@
       next() { //下一步按钮
         // if (this.active++ > 1) this.active = 0
         this.deviceList = this.firm.filter(item => item.info)
-        if (!this.onlySelect.length) { //对单项全选进行过滤
-          this.$message({
-            message: '还没有选择单值信息哦',
-            type: 'warning'
-          });
-          return false
-        }
-        if (!this.deviceList.length) { //对单项全选进行过滤
-          this.$message({
-            message: '单值信息没有填写哦',
-            type: 'warning'
-          });
-          return false
+        // if (!this.onlySelect.length) { //对单项全选进行过滤
+        //   this.$message({
+        //     message: '还没有选择单值信息哦',
+        //     type: 'warning'
+        //   });
+        //   return false
+        // }
+      let fillIn = this.onlySelect.some(i=>!i.info)
+        if(fillIn) {
+            this.$message({
+              message: '请填写勾选信息',
+              type: 'warning'
+            });
+            return false
         }
+        // if (!this.deviceList.length) { //对单项全选进行过滤
+        //   this.$message({
+        //     message: '单值信息没有填写哦',
+        //     type: 'warning'
+        //   });
+        //   return false
+        // }
         if (this.checkAll) {    // 如果单项全选
           if (this.deviceList.length < 4) { //对单项全选进行过滤
             this.$message({