Explorar el Código

重新根据公司区分分支代码&合并最新的release/v1的功能

Shan9312 hace 10 meses
padre
commit
20e8a66de8
Se han modificado 2 ficheros con 22 adiciones y 25 borrados
  1. 3 3
      src/utils/request.js
  2. 19 22
      src/views/formulationPlan/recipeTemplate/index.vue

+ 3 - 3
src/utils/request.js

@@ -14,9 +14,9 @@ if (DoMainString) {
 var reg =  /(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)/;
 var browserUrl = window.location.hostname
 console.log("========url===",reg.test(browserUrl))
-// if (reg.test(browserUrl)){
-//   URL = window.location.protocol +"//"+ browserUrl + ":8082"
-// }
+if (reg.test(browserUrl)){
+  URL = window.location.protocol +"//"+ browserUrl + ":8082"
+}
 
 Cookies.set('url',URL)
 console.log(process.env.VUE_APP_BASE_API,'===========URL1111')

+ 19 - 22
src/views/formulationPlan/recipeTemplate/index.vue

@@ -380,6 +380,8 @@
             </el-table-column>
             <!-- TODO: -->
             <el-table-column :label="$t('formulationEvaluation.yxyspc')" min-width="80px" align="center">
+
+            <el-table-column label="允许延时偏差(min)" min-width="80px" align="center">
               <template slot-scope="scope">
                 <span v-if="scope.row.NoEdit">{{ scope.row.deviation }}</span>
                 <el-input v-if="scope.row.Edit" v-model="scope.row.deviation" step="0.01" type="number" style="width:95%;padding:10px 0;" min-number="0" />
@@ -2359,13 +2361,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 +2407,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 +2594,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 +2633,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' }