|
@@ -139,12 +139,18 @@
|
|
|
}
|
|
|
if(fee == ''){
|
|
|
fee = null
|
|
|
+ }else{
|
|
|
+ judge(fee,'诚信扣款');
|
|
|
}
|
|
|
if(materialOffset == ''){
|
|
|
materialOffset = null;
|
|
|
+ }else{
|
|
|
+ judge(materialOffset,'扣抵工程款');
|
|
|
}
|
|
|
if(taxDeductions == ''){
|
|
|
taxDeductions = null;
|
|
|
+ }else{
|
|
|
+ judge(taxDeductions,'税额扣减');
|
|
|
}
|
|
|
nameString += unitType+",";
|
|
|
nameString1 += fee+",";
|
|
@@ -156,8 +162,6 @@
|
|
|
var materialStrings = materialString.substring(5,materialString.length);
|
|
|
var taxStrings= taxString.substring(5,taxString.length);
|
|
|
var ids = str.substring(0,str.length-1);
|
|
|
- alert(taxStrings);
|
|
|
- throw SyntaxError;
|
|
|
$.ajax({
|
|
|
type:"post",
|
|
|
url:"${ctx}/project/withhold",
|
|
@@ -170,6 +174,15 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+function judge(value,name){
|
|
|
+ if(isNaN(value)){ //判断输入是否是数字
|
|
|
+ layer.msg(name+':请输入有效数字',{icon: 5,offset:['40%','40%']});
|
|
|
+ throw SyntaxError;
|
|
|
+ }
|
|
|
+ if(value<0){
|
|
|
+ layer.msg(name+'不能为负数',{icon: 5,offset:['40%','40%']});
|
|
|
+ throw SyntaxError;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
</script>
|