فهرست منبع

修改线上备件申购新增价格校验的问题

Shan9312 9 ماه پیش
والد
کامیت
9b1a50e76c
1فایلهای تغییر یافته به همراه10 افزوده شده و 0 حذف شده
  1. 10 0
      src/views/custom/subscribe/index.vue

+ 10 - 0
src/views/custom/subscribe/index.vue

@@ -3685,6 +3685,16 @@ export default {
           const url = 'authdata/partpurchase/edit'
           const dataArr = []
           for (let i = 0; i < this.listAdd.length; i++) {
+
+            // 若有合单,走/edit的接口 再次对价格做个校验判断;
+            if (parseFloat(this.listAdd[i].price) == 0) {
+                this.$message({
+                  type: 'warning',
+                  message: '价格请输入正数,最多保留小数点后五位',
+                  duration: 2000
+                })
+                return false
+            }
             if (this.listAdd[i].myId !== undefined) {
               this.listAdd[i].id = 0
             }