shenjj 7 anni fa
parent
commit
8540704dd2
1 ha cambiato i file con 8 aggiunte e 3 eliminazioni
  1. 8 3
      pages/mobile/center/vendor/productdetails.vue

+ 8 - 3
pages/mobile/center/vendor/productdetails.vue

@@ -375,11 +375,16 @@
       },
       // 交期失去焦点
       minDeliveryBlur(str) {
-        if (Math.abs(str) === 0) {
+        if (Math.abs(this.chooseItem.maxDelivery) === 0) {
           this.timeoutCount++
           this.collectResult = `交期天数不能为0`
           this.chooseItem.maxDelivery = ''
           return false
+        } else if (Math.abs(this.chooseItem.minDelivery) === 0) {
+          this.timeoutCount++
+          this.collectResult = `交期天数不能为0`
+          this.chooseItem.minDelivery = ''
+          return false
         }
         if (Math.abs(this.chooseItem.minDelivery) > Math.abs(this.chooseItem.maxDelivery)) {
           this.timeoutCount++
@@ -395,9 +400,9 @@
           this.collectResult = '单价只能输入数字带6位小数'
         } else if (Math.abs(item.rMBPrice) === 0) {
           return false
-        } else if (Math.abs(item.rMBPrice) > 10000) {
+        } else if (Math.abs(item.rMBPrice) >= 10000) {
           this.timeoutCount++
-          item.rMBPrice = 10000
+          item.rMBPrice = 9999
           this.collectResult = '单价不能高于10000'
           return false
         }