From 5fc40bcb2fa77c26448abc82225598ff81753d75 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Fri, 7 Jan 2022 10:42:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF=E5=88=86?= =?UTF-8?q?=E9=9A=94=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/assets/js/project_estimate.js | 41 +++++++++++-------- .../templates/admin/project_budget_edit.ftl | 6 +-- .../templates/admin/project_estimate_add.ftl | 6 +-- .../templates/admin/project_estimate_edit.ftl | 6 +-- 4 files changed, 34 insertions(+), 25 deletions(-) diff --git a/src/main/resources/static/assets/js/project_estimate.js b/src/main/resources/static/assets/js/project_estimate.js index 19af6c8..aa0842f 100644 --- a/src/main/resources/static/assets/js/project_estimate.js +++ b/src/main/resources/static/assets/js/project_estimate.js @@ -1,4 +1,13 @@ function calIncomeAndCost() { + $("input[name='contractAmount']").change(function () { + digitalSelf("contractAmount", "input[name='contractAmount']"); + }); + $("input[name='huazhiProductAmount']").change(function () { + digitalSelf("huazhiProductAmount", "input[name='huazhiProductAmount']"); + }); + $("input[name='ziguangOtherAmount']").change(function () { + digitalSelf("ziguangOtherAmount", "input[name='ziguangOtherAmount']"); + }); $("input[name='incomeDeviceTaxInclude']").change(function () { calIncomeInclude(); calIncomeCost(); @@ -139,7 +148,7 @@ function calIncomeAndCost() { } else { $("input[name='incomeDeviceTaxExclude']").attr('readonly',true); var incomeDeviceTaxInclude = inputVal("incomeDeviceTaxInclude"); - $incomeDeviceTaxExclude.val(f2Fixed(incomeDeviceTaxInclude/(1+Number(val)))); + $incomeDeviceTaxExclude.val(f2Fixed(f2(incomeDeviceTaxInclude)/(1+Number(val)))); } calIncomeExclude(); calIncomeCost(); @@ -154,7 +163,7 @@ function calIncomeAndCost() { }else if(val == "请选择税率"){ return; } else { - $incomeDeviceTaxExclude.val(f2Fixed(incomeDeviceTaxInclude/(1+Number(val)))); + $incomeDeviceTaxExclude.val(f2Fixed(f2(incomeDeviceTaxInclude)/(1+Number(val)))); } calIncomeExclude(); calIncomeCost(); @@ -172,7 +181,7 @@ function calIncomeAndCost() { } else { $("input[name='incomeEngineerTaxExclude']").attr('readonly',true); var incomeEngineerTaxInclude = inputVal("incomeEngineerTaxInclude"); - $incomeEngineerTaxExclude.val(f2Fixed(incomeEngineerTaxInclude/(1+Number(val)))); + $incomeEngineerTaxExclude.val(f2Fixed(f2(incomeEngineerTaxInclude)/(1+Number(val)))); } calIncomeExclude(); calIncomeCost(); @@ -187,7 +196,7 @@ function calIncomeAndCost() { return; } else { var incomeEngineerTaxInclude = inputVal("incomeEngineerTaxInclude"); - $incomeEngineerTaxExclude.val(f2Fixed(incomeEngineerTaxInclude/(1+Number(val)))); + $incomeEngineerTaxExclude.val(f2Fixed(f2(incomeEngineerTaxInclude)/(1+Number(val)))); } calIncomeExclude(); calIncomeCost(); @@ -205,7 +214,7 @@ function calIncomeAndCost() { } else { $("input[name='incomeServiceTaxExclude']").attr('readonly',true); var incomeServiceTaxInclude = inputVal("incomeServiceTaxInclude"); - $incomeServiceTaxExclude.val(f2Fixed(incomeServiceTaxInclude/(1+Number(val)))); + $incomeServiceTaxExclude.val(f2Fixed(f2(incomeServiceTaxInclude)/(1+Number(val)))); } calIncomeExclude(); calIncomeCost(); @@ -220,7 +229,7 @@ function calIncomeAndCost() { return; } else { var incomeServiceTaxInclude = inputVal("incomeServiceTaxInclude"); - $incomeServiceTaxExclude.val(f2Fixed(incomeServiceTaxInclude/(1+Number(val)))); + $incomeServiceTaxExclude.val(f2Fixed(f2(incomeServiceTaxInclude)/(1+Number(val)))); } calIncomeExclude(); calIncomeCost(); @@ -238,7 +247,7 @@ function calIncomeAndCost() { } else { $("input[name='costPurchaseDeviceTaxExclude']").attr('readonly',true); var costPurchaseDeviceTaxInclude = inputVal("costPurchaseDeviceTaxInclude"); - $costPurchaseDeviceTaxExclude.val(f2Fixed(costPurchaseDeviceTaxInclude/(1+Number(val)))); + $costPurchaseDeviceTaxExclude.val(f2Fixed(f2(costPurchaseDeviceTaxInclude)/(1+Number(val)))); } calCostExclude(); calIncomeCost(); @@ -253,7 +262,7 @@ function calIncomeAndCost() { return; } else { var costPurchaseDeviceTaxInclude = inputVal("costPurchaseDeviceTaxInclude"); - $costPurchaseDeviceTaxExclude.val(f2Fixed(costPurchaseDeviceTaxInclude/(1+Number(val)))); + $costPurchaseDeviceTaxExclude.val(f2Fixed(f2(costPurchaseDeviceTaxInclude)/(1+Number(val)))); } calCostExclude(); calIncomeCost(); @@ -271,7 +280,7 @@ function calIncomeAndCost() { } else { $("input[name='costPurchaseBuildTaxExclude']").attr('readonly',true); var costPurchaseBuildTaxInclude = inputVal("costPurchaseBuildTaxInclude"); - $costPurchaseBuildTaxExclude.val(f2Fixed(costPurchaseBuildTaxInclude/(1+Number(val)))); + $costPurchaseBuildTaxExclude.val(f2Fixed(f2(costPurchaseBuildTaxInclude)/(1+Number(val)))); } calCostExclude(); calIncomeCost(); @@ -286,7 +295,7 @@ function calIncomeAndCost() { return; } else { var costPurchaseBuildTaxInclude = inputVal("costPurchaseBuildTaxInclude"); - $costPurchaseBuildTaxExclude.val(f2Fixed(costPurchaseBuildTaxInclude/(1+Number(val)))); + $costPurchaseBuildTaxExclude.val(f2Fixed(f2(costPurchaseBuildTaxInclude)/(1+Number(val)))); } calCostExclude(); calIncomeCost(); @@ -304,7 +313,7 @@ function calIncomeAndCost() { } else { $("input[name='costPurchaseServiceTaxExclude']").attr('readonly',true); var costPurchaseServiceTaxInclude = inputVal("costPurchaseServiceTaxInclude"); - $costPurchaseServiceTaxExclude.val(f2Fixed(costPurchaseServiceTaxInclude/(1+Number(val)))); + $costPurchaseServiceTaxExclude.val(f2Fixed(f2(costPurchaseServiceTaxInclude)/(1+Number(val)))); } calCostExclude(); calIncomeCost(); @@ -319,7 +328,7 @@ function calIncomeAndCost() { return; } else { var costPurchaseServiceTaxInclude = inputVal("costPurchaseServiceTaxInclude"); - $costPurchaseServiceTaxExclude.val(f2Fixed(costPurchaseServiceTaxInclude/(1+Number(val)))); + $costPurchaseServiceTaxExclude.val(f2Fixed(f2(costPurchaseServiceTaxInclude)/(1+Number(val)))); } calCostExclude(); calIncomeCost(); @@ -337,7 +346,7 @@ function calIncomeAndCost() { } else { $("input[name='costOtherOtherTaxExclude']").attr('readonly',true); var costOtherOtherTaxInclude = inputVal("costOtherOtherTaxInclude"); - $costOtherOtherTaxExclude.val(f2Fixed(costOtherOtherTaxInclude/(1+Number(val)))); + $costOtherOtherTaxExclude.val(f2Fixed(f2(costOtherOtherTaxInclude)/(1+Number(val)))); } calCostExclude(); calIncomeCost(); @@ -352,7 +361,7 @@ function calIncomeAndCost() { return; } else { var costOtherOtherTaxInclude = inputVal("costOtherOtherTaxInclude"); - $costOtherOtherTaxExclude.val(f2Fixed(costOtherOtherTaxInclude/(1+Number(val)))); + $costOtherOtherTaxExclude.val(f2Fixed(f2(costOtherOtherTaxInclude)/(1+Number(val)))); } calCostExclude(); calIncomeCost(); @@ -370,7 +379,7 @@ function calIncomeAndCost() { } else { $("input[name='costPurchaseOtherTaxExclude']").attr('readonly',true); var costPurchaseOtherTaxInclude = inputVal("costPurchaseOtherTaxInclude"); - $costPurchaseOtherTaxExclude.val(f2Fixed(costPurchaseOtherTaxInclude/(1+Number(val)))); + $costPurchaseOtherTaxExclude.val(f2Fixed(f2(costPurchaseOtherTaxInclude)/(1+Number(val)))); } calCostExclude(); calIncomeCost(); @@ -385,7 +394,7 @@ function calIncomeAndCost() { return; } else { var costPurchaseOtherTaxInclude = inputVal("costPurchaseOtherTaxInclude"); - $costPurchaseOtherTaxExclude.val(f2Fixed(costPurchaseOtherTaxInclude/(1+Number(val)))); + $costPurchaseOtherTaxExclude.val(f2Fixed(f2(costPurchaseOtherTaxInclude)/(1+Number(val)))); } calCostExclude(); calIncomeCost(); diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index b3f3dbe..7043e23 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -156,7 +156,7 @@
*合同金额
-
@@ -174,7 +174,7 @@
华智产品金额
-
@@ -183,7 +183,7 @@
其他产品金额
-
diff --git a/src/main/resources/templates/admin/project_estimate_add.ftl b/src/main/resources/templates/admin/project_estimate_add.ftl index 5f8a91a..d6f07d2 100644 --- a/src/main/resources/templates/admin/project_estimate_add.ftl +++ b/src/main/resources/templates/admin/project_estimate_add.ftl @@ -130,7 +130,7 @@
*合同金额
-
@@ -148,7 +148,7 @@
华智产品金额
-
@@ -156,7 +156,7 @@
其他产品金额
-
diff --git a/src/main/resources/templates/admin/project_estimate_edit.ftl b/src/main/resources/templates/admin/project_estimate_edit.ftl index f80d8ab..8221384 100644 --- a/src/main/resources/templates/admin/project_estimate_edit.ftl +++ b/src/main/resources/templates/admin/project_estimate_edit.ftl @@ -137,7 +137,7 @@
*合同金额
-
@@ -155,7 +155,7 @@
<#--*-->华智产品金额
-
@@ -163,7 +163,7 @@
<#--*-->其他产品金额
-