Browse Source

备件申购价格修改为保留为五位小数

duanxiaoduan 1 year ago
parent
commit
373d770790
3 changed files with 14 additions and 11 deletions
  1. 2 2
      .env.development
  2. 0 0
      dist/index.html
  3. 12 9
      src/views/custom/subscribe/index.vue

+ 2 - 2
.env.development

@@ -6,9 +6,9 @@ ENV = 'development'
 # 线上正式地址
 #  VUE_APP_BASE_API = 'http://eam.modernfarming.cn:8000/'
 # 白少后台本地
-VUE_APP_BASE_API = 'http://192.168.1.77:8082/'
+# VUE_APP_BASE_API = 'http://192.168.1.77:8082/'
 # 线上测试
-# VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
+VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
 # VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
 # VUE_APP_BASE_API = 'http://127.0.0.1:8082/'
 

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 12 - 9
src/views/custom/subscribe/index.vue

@@ -1190,12 +1190,13 @@ export default {
               return false
             } else {
               if (parseFloat(this.listAdd[j].price) == 0) {
-                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                 return false
               } else {
-                var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
                 if (rulesPrice.test(this.listAdd[j].price) == false) {
-                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                   return false
                 }
               }
@@ -1467,12 +1468,13 @@ export default {
               return false
             } else {
               if (parseFloat(this.listAdd[j].price) == 0) {
-                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                 return false
               } else {
-                var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
                 if (rulesPrice.test(this.listAdd[j].price) == false) {
-                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                   return false
                 }
               }
@@ -2074,12 +2076,13 @@ export default {
                 return false
               } else {
                 if (parseFloat(this.listAdd[j].price) == 0) {
-                  this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                  this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                   return false
                 } else {
-                  var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                  // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                  var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
                   if (rulesPrice.test(this.listAdd[j].price) == false) {
-                    this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                    this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                     return false
                   }
                 }

Some files were not shown because too many files changed in this diff