Commit 901c4c33 authored by houyu's avatar houyu

添加提示

parent 345092c5
...@@ -395,12 +395,23 @@ ...@@ -395,12 +395,23 @@
}else if (Number.isNaN(num)) { }else if (Number.isNaN(num)) {
$.messager.alert('提示', '请输入正确的数字!'); $.messager.alert('提示', '请输入正确的数字!');
} else { } else {
//计算应缴面积
var yjmjNums = numb / 150
var x = String(yjmjNums).indexOf(".")+1;//得到小数点的位置
var y = String(yjmjNums).length - x;//小数点的位数
if(y > 2) {
$.messager.alert('提示', '请输入正确的应缴金额!');
$(this).parent().prev().text('');
return false;
}else{
$(this).prev().text(num === 0 ? '' : num) $(this).prev().text(num === 0 ? '' : num)
$(this).hide() $(this).hide()
$(this).prev().show() $(this).prev().show()
//计算应缴面积 $(this).parent().prev().text(yjmjNums)
var yjmjNums = numb / 150
$(this).parent().prev().text((yjmjNums % 1 !== 0) ? (yjmjNums).toFixed(2) : yjmjNums) }
} }
if (numb == numf) { if (numb == numf) {
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment