Explorar o código

配方模板,容重传参问题

duanxiaoduan hai 1 ano
pai
achega
36ee3a6178
Modificáronse 2 ficheiros con 8 adicións e 4 borrados
  1. 2 2
      .env.development
  2. 6 2
      src/views/formulationPlan/recipeTemplate/index.vue

+ 2 - 2
.env.development

@@ -4,9 +4,9 @@ ENV = 'development'
 # base api
 # 测试线
 # VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
-# VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
+VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
 # 白少后台本地
-VUE_APP_BASE_API = 'http://192.168.1.77:8081/'
+# VUE_APP_BASE_API = 'http://192.168.1.77:8081/'
 # VUE_APP_BASE_API = 'http://192.168.1.93/'
 # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
 # to control whether the babel-plugin-dynamic-import-node plugin is enabled.

+ 6 - 2
src/views/formulationPlan/recipeTemplate/index.vue

@@ -1365,7 +1365,7 @@ export default {
       this.table.temp.source = row.source
       this.table.temp.remark = row.remark
       this.table.temp.enable = row.enable
-      if(this.table.temp.volume == ''){
+      if(this.table.temp.volume == '' || this.table.temp.volume == null){
         this.table.temp.volume = 0
       }
       this.table.temp.volume = parseFloat(row.volume)
@@ -1491,7 +1491,7 @@ export default {
       this.table.temp.pastureid = row.pastureid
       this.table.temp.id = row.id
       this.table.temp.cattle = row.cattle
-      if(this.table.temp.volume == ''){
+      if(this.table.temp.volume == '' || this.table.temp.volume == null || this.table.temp.volume == undefined){
         this.table.temp.volume = 0
       }
       this.table.temp.volume = parseFloat(row.volume)
@@ -1541,6 +1541,10 @@ export default {
     saveUpdateData() {
       this.requestParam = {}
       this.requestParam.name = 'updateFT'
+      if(this.table.temp.volume == '' || this.table.temp.volume == null || this.table.temp.volume == undefined  ||  isNaN(this.table.temp.volume)){
+        this.table.temp.volume = 0
+      }
+      console.log( this.table.temp.volume,'----')
       this.requestParam.parammaps = this.table.temp
       PostDataByName(this.requestParam).then(response => {
         console.log('新增保存发送参数', this.requestParam)