提交 366465d5 编写于 作者: U unknown

处理数据表格小数点保留位数的问题

上级 431bd410
...@@ -390,12 +390,14 @@ MWF.xApplication.process.Xform.DatatablePC = new Class( ...@@ -390,12 +390,14 @@ MWF.xApplication.process.Xform.DatatablePC = new Class(
var d = data.data[i]; var d = data.data[i];
if(d[json.id]){ if(d[json.id]){
tmpV = tmpV.plus(d[json.id].toFloat() || 0); tmpV = tmpV.plus(d[json.id].toFloat() || 0);
if( d[json.id].indexOf(".") > -1 ){ var v = d[json.id].toString();
pointLength = Math.max(pointLength, d[json.id].split(".")[1].length); if( v.indexOf(".") > -1 ){
pointLength = Math.max(pointLength, v.split(".")[1].length);
} }
} }
} }
} }
if( isNaN( tmpV ) ){ if( isNaN( tmpV ) ){
totalData[json.id] = ""; totalData[json.id] = "";
column.td.set("text", "" ); column.td.set("text", "" );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册