Browse Source

剩料的重量校验功能隐藏

Shan9312 11 months ago
parent
commit
089c770245
1 changed files with 18 additions and 23 deletions
  1. 18 23
      src/views/formulationPlan/recipeTemplate/index.vue

+ 18 - 23
src/views/formulationPlan/recipeTemplate/index.vue

@@ -378,7 +378,7 @@
                 </el-select>
               </template>
             </el-table-column>
-            <!-- TODO: -->
+           
             <el-table-column label="允许延时偏差(min)" min-width="80px" align="center">
               <template slot-scope="scope">
                 <span v-if="scope.row.NoEdit">{{ scope.row.deviation }}</span>
@@ -2359,13 +2359,10 @@ export default {
       }else if (this.table2.temp.fid === '') {
         this.$message({ type: 'error', message: '饲料名称不能为空', duration: 2000 })
         return false
-      }
-      // TODO: 临时去掉限制重量
-      // else if (this.table2.temp.fweight === '') {
-      //   this.$message({ type: 'error', message: '重量不能为空', duration: 2000 })
-      //   return false
-      // }
-       else if (this.table2.temp.autosecond === '') {
+      }else if (this.table2.temp.fweight === '') {
+        this.$message({ type: 'error', message: '重量不能为空', duration: 2000 })
+        return false
+      }else if (this.table2.temp.autosecond === '') {
         this.$message({ type: 'error', message: '搅拌延时不能为空', duration: 2000 })
         return false
       } else if (this.table2.temp.deviation === '') {
@@ -2408,11 +2405,11 @@ export default {
       // return
       // var ruleWeight = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
 
-      //TODO:
-      // if (this.table2.temp.fweight == 0) {
-      //   this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
-      //   return false
-      // }
+     
+      if (this.table2.temp.fweight == 0) {
+        this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
+        return false
+      }
       this.isokDisable = true
       setTimeout(() => {
         this.isokDisable = false
@@ -2595,12 +2592,10 @@ export default {
           }else if (this.table2.temp.fid === '') {
             this.$message({ type: 'error', message: '饲料名称不能为空', duration: 2000 })
             return false
+          }else if (this.table2.temp.fweight === '') {
+            this.$message({ type: 'error', message: '重量不能为空', duration: 2000 })
+            return false
           }
-          //TODO:
-          //  else if (this.table2.temp.fweight === '') {
-          //   this.$message({ type: 'error', message: '重量不能为空', duration: 2000 })
-          //   return false
-          // }
            else if (this.table2.temp.autosecond === '') {
             this.$message({ type: 'error', message: '搅拌延时不能为空', duration: 2000 })
             return false
@@ -2636,11 +2631,11 @@ export default {
           row.fweight = formatNum(row.fweight, 4)
           // 检验重量>0
           // var ruleWeight = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
-          //TODO:
-          // if (this.table2.temp.fweight == 0) {
-          //   this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
-          //   return false
-          // }
+          
+          if (this.table2.temp.fweight == 0) {
+            this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
+            return false
+          }
           console.log(row.fweight,'row.fweight')
           let dateTime = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
           this.requestParam.common = { 'returnmap': '0' }