Browse Source

分段报价

yangc 7 years ago
parent
commit
2326d7674d
1 changed files with 8 additions and 4 deletions
  1. 8 4
      components/applyPurchase/ApplyInfo.vue

+ 8 - 4
components/applyPurchase/ApplyInfo.vue

@@ -532,10 +532,14 @@
       },
       setReplies: function (type, index) {
         if (type === 'add' && this.sayPriceObj.replies.length < 5) {
-          this.sayPriceObj.replies.splice(index + 1, 0, {
-            lapQty: '',
-            price: ''
-          })
+          if (this.sayPriceObj.replies[index].lapQty && this.sayPriceObj.replies[index].price) {
+            this.sayPriceObj.replies.splice(index + 1, 0, {
+              lapQty: '',
+              price: ''
+            })
+          } else {
+            this.$message.error('请填完整信息')
+          }
         } else if (type === 'sub' && this.sayPriceObj.replies.length > 1) {
           this.sayPriceObj.replies.splice(index, 1)
         }