js格式化合计金额
var summoney=1040.010400000000000001;
var totalMoney=parseFloat(summoney).toFixed(2);
var arry=totalMoney.split(".");
if(arry[0].length>3){
totalMoney=arry[0].toString().replace(/(\d+?)(?=(?:\d{3})+$)/g,
"$1,")+"."+arry[1];
}
print: 1,040.01