Browse Source

配方模版重量去处

Shan9312 1 year ago
parent
commit
f8307440cd

+ 1 - 1
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -1680,7 +1680,7 @@ export default {
     },
     handleCloseTable2() {
       this.isDetail = false
-      this.myheight = document.documentElement.clientHeight - 280
+      this.myheight = document.documentElement.clientHeight - 280+140
     },
     // 计划内容操作详情
     getList2() {

+ 26 - 17
src/views/formulationPlan/recipeTemplate/index.vue

@@ -364,7 +364,7 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column label="重量(KG)" prop="fweight" width="120px" align="center">
+            <el-table-column label="重量123(KG)" prop="fweight" width="120px" align="center">
               <template slot-scope="scope">
                 <span v-if="scope.row.NoEdit">{{ scope.row.fweight }}</span>
                 <el-input v-if="scope.row.Edit" v-model="scope.row.fweight" placeholder="重量" step="0.0001" type="number" style="width:95%;padding:10px 0;" />
@@ -2359,10 +2359,13 @@ 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
-      } else if (this.table2.temp.autosecond === '') {
+      }
+      // 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
       } else if (this.table2.temp.deviation === '') {
@@ -2404,10 +2407,12 @@ export default {
       row.fweight = formatNum(row.fweight, 4)
       // return
       // var ruleWeight = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
-      if (this.table2.temp.fweight == 0) {
-        this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
-        return false
-      }
+
+      //TODO:
+      // if (this.table2.temp.fweight == 0) {
+      //   this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
+      //   return false
+      // }
       this.isokDisable = true
       setTimeout(() => {
         this.isokDisable = false
@@ -2590,10 +2595,13 @@ 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
-          } else if (this.table2.temp.autosecond === '') {
+          }
+          //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
           } else if (this.table2.temp.deviation === '') {
@@ -2628,10 +2636,11 @@ export default {
           row.fweight = formatNum(row.fweight, 4)
           // 检验重量>0
           // var ruleWeight = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
-          if (this.table2.temp.fweight == 0) {
-            this.$message({ type: 'error', message: '重量请输入正数,最多保留四位小数', duration: 2000 })
-            return false
-          }
+          //TODO:
+          // 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' }