Browse Source

修改报价逻辑

yangc 7 years ago
parent
commit
678655d150
1 changed files with 10 additions and 2 deletions
  1. 10 2
      components/mobile/applyPurchase/SayPrice.vue

+ 10 - 2
components/mobile/applyPurchase/SayPrice.vue

@@ -164,6 +164,7 @@
         }
         }
       },
       },
       commitSayPrice: function () {
       commitSayPrice: function () {
+        console.log(this.sayPriceObj)
         if (this.checkValid()) {
         if (this.checkValid()) {
           let purchaseMan = JSON.parse(JSON.stringify(this.purchaseDetail))
           let purchaseMan = JSON.parse(JSON.stringify(this.purchaseDetail))
 //          this.showLoading = true
 //          this.showLoading = true
@@ -271,11 +272,18 @@
         return {index: -1}
         return {index: -1}
       },
       },
       checkValid: function () {
       checkValid: function () {
+        this.validSayPrice.repliesLapQty = true
+        this.validSayPrice.repliesPrice = true
         for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
         for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
-          if (!this.sayPriceObj.replies[i].lapQty || !this.sayPriceObj.replies[i].price) {
-            return false
+          if (!this.sayPriceObj.replies[i].lapQty) {
+            this.validSayPrice.repliesLapQty = false
+            break
+          } else if (!this.sayPriceObj.replies[i].price) {
+            this.validSayPrice.repliesPrice = false
+            break
           }
           }
         }
         }
+        console.log(this.validSayPrice.leadtime + '-' + this.validSayPrice.repliesLapQty + '-' + this.validSayPrice.repliesPrice)
         return this.validSayPrice.leadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
         return this.validSayPrice.leadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
       },
       },
       onRemind: function (str) {
       onRemind: function (str) {