This commit is contained in:
贤心
2022-06-21 00:02:39 +08:00
parent 8033abc420
commit 7076f801f7
7 changed files with 11 additions and 15 deletions

View File

@@ -1008,13 +1008,9 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
//td 内容
var content = function(){
if( item3.totalRowDecimalScale == null || isNaN(item3.totalRowDecimalScale) ||
item3.totalRowDecimalScale < 0 || item3.totalRowDecimalScale > 10 ){
// 如果检测到非法值就重设为2。至于非法值的定义这里是我自己定义的。
item3.totalRowDecimalScale = 2;
}
var text = item3.totalRowText || ''
,thisTotalNum = parseFloat(totalNums[field]).toFixed(item3.totalRowDecimalScale)
,decimals = item3.totalRowDecimals || 2
,thisTotalNum = parseFloat(totalNums[field]).toFixed(decimals)
,tplData = {}
,getContent;
@@ -2168,4 +2164,4 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
exports(MOD_NAME, table);
});