From f208fc08f4f20659062ecb7e9ccda5ae6e713d89 Mon Sep 17 00:00:00 2001 From: xxssyyyyssxx Date: Wed, 3 Nov 2021 17:03:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=9B=E8=AE=B8=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/palmte/work/bean/IncomeCostBean.java | 4 ++-- src/main/resources/static/assets/js/project_budget.js | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/cn/palmte/work/bean/IncomeCostBean.java b/src/main/java/cn/palmte/work/bean/IncomeCostBean.java index 62cac7c..52968ff 100644 --- a/src/main/java/cn/palmte/work/bean/IncomeCostBean.java +++ b/src/main/java/cn/palmte/work/bean/IncomeCostBean.java @@ -149,7 +149,7 @@ public class IncomeCostBean { || null == costPurchaseBuildTaxInclude || null == costPurchaseServiceTaxInclude || null == costPurchaseOtherTaxInclude - || null == costProjectManageTaxInclude + /*|| null == costProjectManageTaxInclude*/ || null == costOtherOtherTaxInclude){ return null; } @@ -157,7 +157,7 @@ public class IncomeCostBean { .add(costPurchaseBuildTaxInclude) .add(costPurchaseServiceTaxInclude) .add(costPurchaseOtherTaxInclude) - .add(costProjectManageTaxInclude) + .add(null == costProjectManageTaxInclude ? new BigDecimal(0) : costProjectManageTaxInclude) .add(costOtherOtherTaxInclude); } diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index 67cea2b..007d5e2 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -111,6 +111,7 @@ function saveDetail(url, data, callback) { /** * 更新页面收入的数据【累加】 + * 明细修改保存后修改收入含税和不含税金额 */ function updateIncomeData(incomeDetails) { var deviceTaxInclude = 0; @@ -252,6 +253,7 @@ function appendTrCost() { } /** * 更新页面收入的数据【累加】 + * 明细保存后回来更新总含税金额和不含税金额 */ function updateCostData(details) { var deviceTaxInclude = 0; @@ -300,6 +302,9 @@ function updateCostData(details) { } function bindOtherOtherChangeable() { + /** + * 其他其他含税金额改变的时候,修改总含税金额 + */ $("input[name='costOtherOtherTaxInclude']").change(function () { var costPurchaseDeviceTaxInclude = parseFloat($("input[name='costPurchaseDeviceTaxInclude']").val()); var costPurchaseBuildTaxInclude = parseFloat($("input[name='costPurchaseBuildTaxInclude']").val()); @@ -310,7 +315,9 @@ function bindOtherOtherChangeable() { $("input[name='costTotalTaxInclude']").val(costPurchaseDeviceTaxInclude+costPurchaseBuildTaxInclude+costPurchaseServiceTaxInclude+costPurchaseOtherTaxInclude+costOtherOther); }); - + /** + * 其他其他不含税金额改变的时候,修改总不含税金额 + */ $("input[name='costOtherOtherTaxExclude']").change(function () { var costPurchaseDeviceTaxExclude = parseFloat($("input[name='costPurchaseDeviceTaxExclude']").val()); var costPurchaseBuildTaxExclude = parseFloat($("input[name='costPurchaseBuildTaxExclude']").val());