|
|
@@ -275,7 +275,7 @@ export default { |
|
|
|
let isRight = true |
|
|
|
for (let s of arr) { |
|
|
|
let Price = Number(s.Price),Quantity = Number(s.Quantity); |
|
|
|
if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&&/^(\-|\+)?\d+(\.\d+)?$/.test(Quantity)){ |
|
|
|
if(/^(\-|\+)?\d+(\.\d+)?$/.test(Price)&& /^[1-9]\d*$/.test(Quantity)){ |
|
|
|
total = this.accAdd(total,this.accMul(Price,Quantity)) |
|
|
|
}else{ |
|
|
|
isRight = false |
|
|
@@ -428,7 +428,7 @@ export default { |
|
|
|
|
|
|
|
case 'save': |
|
|
|
if(!this.current.Purchase_Logistic.TotalAmount){ |
|
|
|
this.CONFIRM('表单验证失败', '[采购列表]:价格和数量为空或错误') |
|
|
|
this.CONFIRM('表单验证失败', '[采购列表]:价格和数量(正整数)为空或错误') |
|
|
|
return |
|
|
|
} |
|
|
|
const verifyResult = this.verifyForm() |
|
|
|