From: Xia Kaixiang Date: Fri, 18 Oct 2019 01:57:45 +0000 (+0800) Subject: 页面金额加减格式化 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=2acbba01353f1888e7eb38b19f6f0749eb6a1957;p=epayment%2Ffood_payapi.git 页面金额加减格式化 --- diff --git a/payapi/src/main/resources/templates/system/dtl/shopdtl.html b/payapi/src/main/resources/templates/system/dtl/shopdtl.html index 57204491..553409a3 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 6dda89cc..6d2ea96e 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 c906e81f..8767b737 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 0fffd7eb..3898f995 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'} ] ]