|
|
@@ -235,7 +235,7 @@
|
|
|
},
|
|
|
onUnitPriceBlur: function () {
|
|
|
if (this.sayPriceObj.unitPrice) {
|
|
|
- if (this.sayPriceObj.unitPrice < 0) {
|
|
|
+ if (this.sayPriceObj.unitPrice <= 0) {
|
|
|
this.$message.error('单价必须是大于0的数字')
|
|
|
this.validSayPrice.unitPrice = false
|
|
|
} else {
|
|
|
@@ -260,7 +260,8 @@
|
|
|
}
|
|
|
},
|
|
|
onMinDayInput: function () {
|
|
|
- if (this.sayPriceObj.minDay < 1 || this.sayPriceObj.minDay > 31 || this.sayPriceObj.minDay.indexOf('.') !== -1) {
|
|
|
+ this.sayPriceObj.minDay = Number(this.sayPriceObj.minDay)
|
|
|
+ if (this.sayPriceObj.minDay < 1 || this.sayPriceObj.minDay > 31 || this.sayPriceObj.minDay.toString().indexOf('.') !== -1) {
|
|
|
this.validSayPrice.minDay = false
|
|
|
this.$message.error('交期只能填写1-31之间的整数值')
|
|
|
} else if (this.sayPriceObj.maxDay && this.sayPriceObj.maxDay < this.sayPriceObj.minDay) {
|
|
|
@@ -276,7 +277,8 @@
|
|
|
}
|
|
|
},
|
|
|
onMaxDayInput: function () {
|
|
|
- if (this.sayPriceObj.maxDay < 1 || this.sayPriceObj.maxDay > 31 || this.sayPriceObj.maxDay.indexOf('.') !== -1) {
|
|
|
+ this.sayPriceObj.maxDay = Number(this.sayPriceObj.maxDay)
|
|
|
+ if (this.sayPriceObj.maxDay < 1 || this.sayPriceObj.maxDay > 31 || this.sayPriceObj.maxDay.toString().indexOf('.') !== -1) {
|
|
|
this.validSayPrice.maxDay = false
|
|
|
this.$message.error('交期只能填写1-31之间的整数值')
|
|
|
} else if (this.sayPriceObj.minDay && this.sayPriceObj.maxDay < this.sayPriceObj.minDay) {
|