diff --git a/Application/Admin/View/CompanyStatement/editWmCpStatement.html b/Application/Admin/View/CompanyStatement/editWmCpStatement.html index fde41e5be..e292a9d01 100644 --- a/Application/Admin/View/CompanyStatement/editWmCpStatement.html +++ b/Application/Admin/View/CompanyStatement/editWmCpStatement.html @@ -529,7 +529,13 @@ var type = $(this).attr("name"); - if(!CHECK.number.test(val)){ + if(!CHECK.number.test(val)&&type!='other_amount'&&type!="sum_money"){ + layer.msg('结算单中的罚款和税率必须是数字,且不能为空'); + dom.val(vdata); + return false; + } + + if(!CHECK.othernumber.test(val)&&(type=='other_amount'||type=="sum_money")){ layer.msg('结算单中的罚款和税率必须是数字,且不能为空'); dom.val(vdata); return false; @@ -580,6 +586,7 @@ } var CHECK = { number: /^\d+(\.{1}\d+)?$/, + othernumber: /^\-?\d+(\.{1}\d+)?$/, mobile: /^1[3456789]\d{9}$/, BankNo: /^([1-9]{1})\d{10,19}$/, money: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/