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