|
@@ -14,6 +14,8 @@
|
|
|
{field:'itemName',title:'项目名称'}
|
|
|
,{field:'unitType',title:'单位工程',edit: 'text'}
|
|
|
,{field:'integrityFee',title:'诚信扣款'}
|
|
|
+ ,{field:'materialoffset',title:'扣抵工程款'}
|
|
|
+ ,{field:'taxdeductions',title:'税额扣减'}
|
|
|
|
|
|
]]
|
|
|
,data:[ //数据导入
|
|
@@ -23,7 +25,9 @@
|
|
|
"id":"${data.id}",
|
|
|
"unitType": "${data.unitType}",
|
|
|
"integrityFee": "${data.integrityFee}",
|
|
|
- "itemName": "${data.itemName}"
|
|
|
+ "itemName": "${data.itemName}",
|
|
|
+ "materialoffset":"",
|
|
|
+ "taxdeductions":""
|
|
|
},
|
|
|
</c:forEach>
|
|
|
</c:if>
|
|
@@ -35,6 +39,8 @@
|
|
|
}
|
|
|
$('table tr').each(function () {
|
|
|
var unitType = $(this).find('td:eq(1)').text()
|
|
|
+ $(this).find('td:eq(3)').attr("data-edit","text")
|
|
|
+ $(this).find('td:eq(4)').attr("data-edit","text")
|
|
|
if(unitType != null && unitType != ''){
|
|
|
$(this).find('td:eq(2)').attr("data-edit","text")
|
|
|
}
|
|
@@ -85,14 +91,32 @@
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+ if(field === 'materialoffset'){
|
|
|
+ var value = obj.value;
|
|
|
+ if(isNaN(value)){ //判断输入是否是数字
|
|
|
+ layer.msg('请输入有效数字',{icon: 5,offset:['40%','40%']});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(field === 'taxdeductions'){
|
|
|
+ var value = obj.value;
|
|
|
+ if(isNaN(value)){ //判断输入是否是数字
|
|
|
+ layer.msg('请输入有效数字',{icon: 5,offset:['40%','40%']});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
function updateProject(){
|
|
|
var nameString = "";
|
|
|
var nameString1 = "";
|
|
|
+ var materialString = "";
|
|
|
+ var taxString = "";
|
|
|
$('table tr').each(function () {
|
|
|
var unitType = $(this).find('td:eq(1)').text();
|
|
|
var fee = $(this).find('td:eq(2)').text();
|
|
|
+ var materialOffset = $(this).find('td:eq(3)').text();
|
|
|
+ var taxDeductions = $(this).find('td:eq(4)').text();
|
|
|
if(unitType == ''){
|
|
|
unitType = null
|
|
|
}else{
|
|
@@ -104,16 +128,28 @@
|
|
|
if(fee == ''){
|
|
|
fee = null
|
|
|
}
|
|
|
+ if(materialOffset == ''){
|
|
|
+ materialOffset = null;
|
|
|
+ }
|
|
|
+ if(taxDeductions == ''){
|
|
|
+ taxDeductions = null;
|
|
|
+ }
|
|
|
nameString += unitType+",";
|
|
|
nameString1 += fee+",";
|
|
|
+ materialString += materialOffset+",";
|
|
|
+ taxString+=taxDeductions+",";
|
|
|
})
|
|
|
var unitTypes = nameString.substring(5,nameString.length);
|
|
|
var fees = nameString1.substring(5,nameString1.length);
|
|
|
+ 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",
|
|
|
- data:{'ids':ids,'fees':fees,'unitTypes':unitTypes},
|
|
|
+ data:{'ids':ids,'fees':fees,'unitTypes':unitTypes,'materialoffset':materialStrings,'taxdeductions':taxStrings},
|
|
|
success:function(result){
|
|
|
layer.msg(result.msg, {icon: 6,offset:['38%','38%']},function () {
|
|
|
parent.location.reload();
|