页面金额加减格式化
diff --git a/payapi/src/main/resources/templates/system/dtl/shopdtl.html b/payapi/src/main/resources/templates/system/dtl/shopdtl.html
index 5720449..553409a 100644
--- a/payapi/src/main/resources/templates/system/dtl/shopdtl.html
+++ b/payapi/src/main/resources/templates/system/dtl/shopdtl.html
@@ -220,7 +220,11 @@
{field: 'accdate', title: '记账日期', align: 'center', width: 100, sort: true},
{field: 'transdesc', title: '交易描述', align: 'center', width: 175},
{field: 'shopname', title: '商户名称', align: 'center', width: 250},
- {field: 'amount', title: '交易金额', align: 'center', width: 120, sort: true},
+ {
+ field: 'amount', title: '交易金额', align: 'center', width: 120, sort: true, templet: function (e) {
+ return parseFloat(e.amount).toFixed(2);
+ }
+ },
{
field: 'transStatus',
title: '状态',
diff --git a/payapi/src/main/resources/templates/system/dtl/userdtl.html b/payapi/src/main/resources/templates/system/dtl/userdtl.html
index 6dda89c..6d2ea96 100644
--- a/payapi/src/main/resources/templates/system/dtl/userdtl.html
+++ b/payapi/src/main/resources/templates/system/dtl/userdtl.html
@@ -183,7 +183,11 @@
{field: 'accdate', title: '记账日期', align: 'center', width: 100, sort: true},
{field: 'transdesc', title: '交易描述', align: 'center', width: 175},
{field: 'userName', title: '姓名', align: 'center', width: 150},
- {field: 'amount', title: '交易金额', align: 'center', width: 120, sort: true},
+ {
+ field: 'amount', title: '交易金额', align: 'center', width: 120, sort: true, templet: function (e) {
+ return parseFloat(e.amount).toFixed(2);
+ }
+ },
{
field: 'status',
title: '状态',
diff --git a/payapi/src/main/resources/templates/system/report/subjectday.html b/payapi/src/main/resources/templates/system/report/subjectday.html
index c906e81..8767b73 100644
--- a/payapi/src/main/resources/templates/system/report/subjectday.html
+++ b/payapi/src/main/resources/templates/system/report/subjectday.html
@@ -109,10 +109,26 @@
], [
// {field: 'lastdaydrbal', title: '借方', align: 'center'},
// {field: 'lastdaycrbal', title: '贷方', align: 'center'},
- {field: 'dramt', title: '借方', align: 'center'},
- {field: 'cramt', title: '贷方', align: 'center'},
- {field: 'drbal', title: '借方', align: 'center'},
- {field: 'crbal', title: '贷方', align: 'center'}
+ {
+ field: 'dramt', title: '借方', align: 'center', templet: function (e) {
+ return parseFloat(e.dramt).toFixed(2);
+ }
+ },
+ {
+ field: 'cramt', title: '贷方', align: 'center', templet: function (e) {
+ return parseFloat(e.cramt).toFixed(2);
+ }
+ },
+ {
+ field: 'drbal', title: '借方', align: 'center', templet: function (e) {
+ return parseFloat(e.drbal).toFixed(2);
+ }
+ },
+ {
+ field: 'crbal', title: '贷方', align: 'center', templet: function (e) {
+ return parseFloat(e.crbal).toFixed(2);
+ }
+ }
]
],
// cols: [
diff --git a/payapi/src/main/resources/templates/system/report/subjectdetail.html b/payapi/src/main/resources/templates/system/report/subjectdetail.html
index 0fffd7e..3898f99 100644
--- a/payapi/src/main/resources/templates/system/report/subjectdetail.html
+++ b/payapi/src/main/resources/templates/system/report/subjectdetail.html
@@ -121,8 +121,16 @@
},
{field: 'voucherno', title: '凭证号', align: 'center', width: 100, sort: true},
{field: 'summary', title: '摘要', align: 'center'},
- {field: 'dramt', title: '借方发生额', align: 'center'},
- {field: 'cramt', title: '贷方发生额', align: 'center'},
+ {
+ field: 'dramt', title: '借方发生额', align: 'center', templet: function (e) {
+ return parseFloat(e.dramt).toFixed(2);
+ }
+ },
+ {
+ field: 'cramt', title: '贷方发生额', align: 'center', templet: function (e) {
+ return parseFloat(e.cramt).toFixed(2);
+ }
+ },
{
field: 'balflag', title: '方向', align: 'center', width: 80, templet: function (d) {
if (d.balflag == 1) {
@@ -132,7 +140,11 @@
}
}
},
- {field: 'balance', title: '余额', align: 'center'},
+ {
+ field: 'balance', title: '余额', align: 'center', templet: function (e) {
+ return parseFloat(e.balance).toFixed(2);
+ }
+ },
{field: 'oppname', title: '对方户名', align: 'center'}
]
]