|
@@ -657,6 +657,19 @@ export default {
|
|
|
handleInput(str) {
|
|
|
return amtformat(str, 2, ".", ",");
|
|
|
},
|
|
|
+ //格式化金额
|
|
|
+ amtFormat(cellValue) {
|
|
|
+ if(cellValue == null || cellValue== undefined || cellValue == ''){
|
|
|
+ cellValue = '0.00'
|
|
|
+ }
|
|
|
+ cellValue += '';
|
|
|
+ if (!cellValue.includes('.')) {
|
|
|
+ cellValue += '.00';
|
|
|
+ }
|
|
|
+ return cellValue.replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
|
|
|
+ return $1 + ',';
|
|
|
+ }).replace(/\.$/, '');
|
|
|
+ },
|
|
|
/* // 将数字金额转换为大写金额 */
|
|
|
smallToBig(money) {
|
|
|
// 将数字金额转换为大写金额
|