From 4441ded7ad52c742bfa3f7426e907f0d4c326d10 Mon Sep 17 00:00:00 2001
From: hanbo <2608504783@qq.com>
Date: Tue, 30 Nov 2021 15:00:00 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=AF=86=E7=A0=81?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E9=86=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main/resources/templates/common/header.ftl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/resources/templates/common/header.ftl b/src/main/resources/templates/common/header.ftl
index a5fa8da..2b06f17 100644
--- a/src/main/resources/templates/common/header.ftl
+++ b/src/main/resources/templates/common/header.ftl
@@ -26,7 +26,7 @@
-
${message!""}
+ <#--${message!""}-->
 您好, ${userName!""} 
From 659c911436fd60d06936f8d46edb70f5eef0788a Mon Sep 17 00:00:00 2001
From: hanbo <2608504783@qq.com>
Date: Tue, 30 Nov 2021 15:26:17 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=B0=8F=E6=95=B0?=
=?UTF-8?q?=E4=BD=8D=E6=95=B0=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../static/assets/js/project_final.js | 17 +++++--
.../static/assets/js/project_settle.js | 17 +++++--
.../templates/admin/project_final_add.ftl | 44 +++++++++----------
.../templates/admin/project_final_edit.ftl | 44 +++++++++----------
4 files changed, 72 insertions(+), 50 deletions(-)
diff --git a/src/main/resources/static/assets/js/project_final.js b/src/main/resources/static/assets/js/project_final.js
index 5b8ad68..931ec0b 100644
--- a/src/main/resources/static/assets/js/project_final.js
+++ b/src/main/resources/static/assets/js/project_final.js
@@ -320,7 +320,7 @@ function calGrossProfitProfitMargin() {
var grossProfitProfitMargin = $("input[name='grossProfitProfitMargin']");
if (grossProfitFinalTotal && incomeFinalTotal) {
- grossProfitProfitMargin.val(100 * grossProfitFinalTotal / incomeFinalTotal);
+ grossProfitProfitMargin.val(f2(100 * grossProfitFinalTotal / incomeFinalTotal));
} else {
grossProfitProfitMargin.val("");
}
@@ -352,7 +352,7 @@ function calContributionMarginProfitMargin() {
var contributionMarginProfitMargin = $("input[name='contributionMarginProfitMargin']");
if (contributionMarginFinalTotal && incomeFinalTotal) {
- contributionMarginProfitMargin.val(100 * contributionMarginFinalTotal / incomeFinalTotal);
+ contributionMarginProfitMargin.val(f2(100 * contributionMarginFinalTotal / incomeFinalTotal));
} else {
contributionMarginProfitMargin.val("");
}
@@ -384,12 +384,23 @@ function calNetMarginProfitMargin() {
var netMarginProfitMargin = $("input[name='netMarginProfitMargin']");
if (netMarginFinalTotal && incomeFinalTotal) {
- netMarginProfitMargin.val(100 * netMarginFinalTotal / incomeFinalTotal);
+ netMarginProfitMargin.val(f2(100 * netMarginFinalTotal / incomeFinalTotal));
} else {
netMarginProfitMargin.val("");
}
}
+function f2(x) {
+ if(!x){
+ return 0;
+ }
+ var f = parseFloat(x);
+ if (isNaN(f)) {
+ return 0;
+ }
+ return Math.round(x*100)/100;
+}
+
diff --git a/src/main/resources/static/assets/js/project_settle.js b/src/main/resources/static/assets/js/project_settle.js
index 9efb385..3c72c17 100644
--- a/src/main/resources/static/assets/js/project_settle.js
+++ b/src/main/resources/static/assets/js/project_settle.js
@@ -557,7 +557,7 @@ function calGrossProfitProfitMargin() {
var grossProfitProfitMargin = $("input[name='grossProfitProfitMargin']");
if(grossProfitSettleTotal && incomeSettleTotal){
- grossProfitProfitMargin.val(100*(parseFloat(grossProfitSettleTotal)/parseFloat(incomeSettleTotal)));
+ grossProfitProfitMargin.val(f2(100*(parseFloat(grossProfitSettleTotal)/parseFloat(incomeSettleTotal))));
}else {
grossProfitProfitMargin.val("");
}
@@ -605,7 +605,7 @@ function calContributionProfitProfitMargin() {
var contributionProfitProfitMargin = $("input[name='contributionProfitProfitMargin']");
if(contributionProfitSettleTotal && incomeSettleTotal){
- contributionProfitProfitMargin.val(100*(parseFloat(contributionProfitSettleTotal)/parseFloat(incomeSettleTotal)));
+ contributionProfitProfitMargin.val(f2(100*(parseFloat(contributionProfitSettleTotal)/parseFloat(incomeSettleTotal))));
}else {
contributionProfitProfitMargin.val("");
}
@@ -653,7 +653,7 @@ function calNetProfitProfitMargin() {
var netProfitProfitMargin = $("input[name='netProfitProfitMargin']");
if(netProfitSettleTotal && incomeSettleTotal){
- netProfitProfitMargin.val(100*(parseFloat(netProfitSettleTotal)/parseFloat(incomeSettleTotal)));
+ netProfitProfitMargin.val(f2(100*(parseFloat(netProfitSettleTotal)/parseFloat(incomeSettleTotal))));
}else {
netProfitProfitMargin.val("");
}
@@ -955,6 +955,17 @@ function calNetIncreaseMonetaryFunds() {
}
}
+function f2(x) {
+ if(!x){
+ return 0;
+ }
+ var f = parseFloat(x);
+ if (isNaN(f)) {
+ return 0;
+ }
+ return Math.round(x*100)/100;
+}
+
diff --git a/src/main/resources/templates/admin/project_final_add.ftl b/src/main/resources/templates/admin/project_final_add.ftl
index 2a24e9e..1d5436d 100644
--- a/src/main/resources/templates/admin/project_final_add.ftl
+++ b/src/main/resources/templates/admin/project_final_add.ftl
@@ -51,7 +51,7 @@
|
|
|
- |
+ |
收入 |
@@ -59,7 +59,7 @@
|
|
|
- |
+ |
收入 |
@@ -67,7 +67,7 @@
|
|
|
- |
+ |
合计 |
@@ -98,7 +98,7 @@
|
|
|
- |
+ |
成本 |
@@ -107,7 +107,7 @@
|
|
|
- |
+ |
成本 |
@@ -116,7 +116,7 @@
|
|
|
- |
+ |
成本 |
@@ -125,7 +125,7 @@
|
|
|
- |
+ |
成本 |
@@ -134,7 +134,7 @@
|
|
|
- |
+ |
成本 |
@@ -143,7 +143,7 @@
|
|
|
- |
+ |
合计 |
@@ -173,7 +173,7 @@
|
|
|
- |
+ |
公司管理费用 |
@@ -181,7 +181,7 @@
|
|
|
- |
+ |
所得税费用 |
@@ -189,7 +189,7 @@
/ |
/ |
|
- |
+ |
合计 |
@@ -253,37 +253,37 @@
销售商品、提供劳务收到的现金 |
|
|
- |
+ |
收到的税费返还 |
/ |
|
- |
+ |
收到其他与经营活动有关的现金 |
|
|
- |
+ |
购买商品、接受劳务支付的现金 |
|
|
- |
+ |
支付的各项税费 |
/ |
|
- |
+ |
支付其他与经营活动有关的现金 |
|
|
- |
+ |
经营活动产生的现金流量净额 |
@@ -295,13 +295,13 @@
投资活动现金流入 |
/ |
|
- |
+ |
投资活动现金流出 |
/ |
|
- |
+ |
投资活动产生的现金流量净额 |
@@ -313,13 +313,13 @@
融资资金流入 |
|
|
- |
+ |
还款资金流出 |
|
|
- |
+ |
筹资活动产生的现金流量净额 |
diff --git a/src/main/resources/templates/admin/project_final_edit.ftl b/src/main/resources/templates/admin/project_final_edit.ftl
index 5525dd8..42f71c7 100644
--- a/src/main/resources/templates/admin/project_final_edit.ftl
+++ b/src/main/resources/templates/admin/project_final_edit.ftl
@@ -51,7 +51,7 @@
|
|
|
- |
+ |
收入 |
@@ -59,7 +59,7 @@
|
|
|
- |
+ |
收入 |
@@ -67,7 +67,7 @@
|
|
|
- |
+ |
合计 |
@@ -98,7 +98,7 @@
|
|
|
- |
+ |
成本 |
@@ -107,7 +107,7 @@
|
|
|
- |
+ |
成本 |
@@ -116,7 +116,7 @@
|
|
|
- |
+ |
成本 |
@@ -125,7 +125,7 @@
|
|
|
- |
+ |
成本 |
@@ -134,7 +134,7 @@
|
|
|
- |
+ |
成本 |
@@ -143,7 +143,7 @@
|
|
|
- |
+ |
合计 |
@@ -173,7 +173,7 @@
|
|
|
- |
+ |
公司管理费用 |
@@ -181,7 +181,7 @@
|
|
|
- |
+ |
所得税费用 |
@@ -189,7 +189,7 @@
/ |
/ |
|
- |
+ |
合计 |
@@ -253,37 +253,37 @@
销售商品、提供劳务收到的现金 |
|
|
- |
+ |
收到的税费返还 |
/ |
|
- |
+ |
收到其他与经营活动有关的现金 |
|
|
- |
+ |
购买商品、接受劳务支付的现金 |
|
|
- |
+ |
支付的各项税费 |
/ |
|
- |
+ |
支付其他与经营活动有关的现金 |
|
|
- |
+ |
经营活动产生的现金流量净额 |
@@ -295,13 +295,13 @@
投资活动现金流入 |
/ |
|
- |
+ |
投资活动现金流出 |
/ |
|
- |
+ |
投资活动产生的现金流量净额 |
@@ -313,13 +313,13 @@
融资资金流入 |
|
|
- |
+ |
还款资金流出 |
|
|
- |
+ |
筹资活动产生的现金流量净额 |