function fmoney(strNum) {
if(strNum.length <= 3){
return strNum;
}
if(!/^(\+|-)?(\d+)(\.\d+)?$/.test(strNum)){
return strNum
}
const a = RegExp.$1
let b=RegExp.$2
const c=RegExp.$3;
const re = new RegExp();
re.compile("(\\d)(\\d{3})(,|$)");
while(re.test(b)){
b = b.replace(re,"$1,$2$3");
}
return `${a}${b}${c}`
}
// 取消金钱格式化
function trimMoney(value){
return value.trim().replace(/[¥,%]/g,"")
}