|
@@ -287,17 +287,24 @@
|
|
|
checkValid: function () {
|
|
checkValid: function () {
|
|
|
this.validSayPrice.repliesLapQty = true
|
|
this.validSayPrice.repliesLapQty = true
|
|
|
this.validSayPrice.repliesPrice = true
|
|
this.validSayPrice.repliesPrice = true
|
|
|
|
|
+ this.validSayPrice.repliesleadtime = 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) {
|
|
|
|
|
|
|
+ console.log(this.sayPriceObj.replies)
|
|
|
|
|
+ if (!/^\d+$/.test(this.sayPriceObj.replies[i].lapQty) || this.sayPriceObj.replies[i].lapQty === '') {
|
|
|
this.validSayPrice.repliesLapQty = false
|
|
this.validSayPrice.repliesLapQty = false
|
|
|
break
|
|
break
|
|
|
- } else if (!this.sayPriceObj.replies[i].price) {
|
|
|
|
|
|
|
+ } else if (!/^\d+$/.test(this.sayPriceObj.replies[i].price) || this.sayPriceObj.replies[i].price === '') {
|
|
|
this.validSayPrice.repliesPrice = false
|
|
this.validSayPrice.repliesPrice = false
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-// console.log(this.validSayPrice.leadtime + '-' + this.validSayPrice.repliesLapQty + '-' + this.validSayPrice.repliesPrice)
|
|
|
|
|
- return this.validSayPrice.leadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
|
|
|
|
|
|
|
+ if (/^\d+$/.test(this.validSayPrice.leadtime) || this.validSayPrice.leadtime === '') {
|
|
|
|
|
+ this.validSayPrice.repliesleadtime = false
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.validSayPrice.repliesleadtime)
|
|
|
|
|
+ console.log(this.validSayPrice.repliesLapQty)
|
|
|
|
|
+ console.log(this.validSayPrice.repliesPrice)
|
|
|
|
|
+ return this.validSayPrice.repliesleadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
|
|
|
},
|
|
},
|
|
|
onRemind: function (str) {
|
|
onRemind: function (str) {
|
|
|
this.remindText = str
|
|
this.remindText = str
|