From d7f13aad934199e8f43239e382ccfa7b661afa33 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 19 Mar 2021 16:51:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=8D=95=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=B4=9F=E6=95=B0=E5=8F=AF=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/CompanyStatement/editWmCpStatement.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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}$/