From 036475b492b067e2b318cac7ed7e31e69a1fca40 Mon Sep 17 00:00:00 2001 From: xxssyyyyssxx Date: Sat, 6 Nov 2021 14:45:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=9B=B4=E6=96=B0=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E8=B4=A1=E7=8C=AE=E5=88=A9=E6=B6=A6=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/assets/js/project_budget.js | 8 +++++++ .../static/assets/js/project_budget_cost.js | 18 ++++++++++++---- .../js/project_budget_cost_project_manage.js | 5 +++++ .../static/assets/js/project_budget_income.js | 6 ++++-- .../static/assets/js/project_budget_plan.js | 21 +++++++++++++++++-- .../templates/admin/project_budget_edit.ftl | 19 ++++------------- 6 files changed, 54 insertions(+), 23 deletions(-) diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index d67da98..66fbdcf 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -1,3 +1,11 @@ + +$(function () { + //绑定删除按钮删除当前行 + bindDeleteBtn(); + //绑定收入和采购成本的输入框【都有税率】 + bindChangeableInput(); +}); + /** * 更新 * 毛利=收入总计(不含税)-成本总计(不含税)-财务费用总计(不含税) diff --git a/src/main/resources/static/assets/js/project_budget_cost.js b/src/main/resources/static/assets/js/project_budget_cost.js index fc8248a..a65520c 100644 --- a/src/main/resources/static/assets/js/project_budget_cost.js +++ b/src/main/resources/static/assets/js/project_budget_cost.js @@ -19,6 +19,9 @@ $(function () { $("#costAddBtn").click(function () { appendTrCost(); }); + + //绑定其他其他的输入框 + bindOtherOtherChangeable(); }); /** * 采购成本增加一行 @@ -102,8 +105,10 @@ function updateCostData(details) { var costProjectManageTaxExclude = parseFloat($("input[name='costProjectManageTaxExclude']").val()); - $("input[name='costTotalTaxInclude']").val(deviceTaxInclude+buildTaxInclude+serviceTaxInclude+otherTaxInclude+costOtherOtherTaxInclude); - $("input[name='costTotalTaxExclude']").val(deviceTaxExclude+buildTaxExclude+serviceTaxExclude+otherTaxExclude+costOtherOtherTaxExclude+costProjectManageTaxExclude); + $("input[name='costTotalTaxInclude']").val(f2(deviceTaxInclude+buildTaxInclude+serviceTaxInclude+otherTaxInclude+costOtherOtherTaxInclude)); + $("input[name='costTotalTaxExclude']").val(f2(deviceTaxExclude+buildTaxExclude+serviceTaxExclude+otherTaxExclude+costOtherOtherTaxExclude+costProjectManageTaxExclude)); + + updateProjectContributionProfitRate(); } function bindOtherOtherChangeable() { @@ -115,7 +120,10 @@ function bindOtherOtherChangeable() { var costOtherOther = f2($(this).val()); - $("input[name='costTotalTaxInclude']").val(costPurchaseDeviceTaxInclude+costPurchaseBuildTaxInclude+costPurchaseServiceTaxInclude+costPurchaseOtherTaxInclude+costOtherOther); + $("input[name='costTotalTaxInclude']").val(f2(costPurchaseDeviceTaxInclude+costPurchaseBuildTaxInclude+costPurchaseServiceTaxInclude+costPurchaseOtherTaxInclude+costOtherOther)); + + updateProjectContributionProfitRate(); + }); $("input[name='costOtherOtherTaxExclude']").change(function () { @@ -127,6 +135,8 @@ function bindOtherOtherChangeable() { var costProjectManageTaxExclude = f2($("input[name='costProjectManageTaxExclude']").val()); var costOtherOther = f2($(this).val()); - $("input[name='costTotalTaxExclude']").val(costPurchaseDeviceTaxExclude+costPurchaseBuildTaxExclude+costPurchaseServiceTaxExclude+costPurchaseOtherTaxExclude+costProjectManageTaxExclude+costOtherOther); + $("input[name='costTotalTaxExclude']").val(f2(costPurchaseDeviceTaxExclude+costPurchaseBuildTaxExclude+costPurchaseServiceTaxExclude+costPurchaseOtherTaxExclude+costProjectManageTaxExclude+costOtherOther)); + + updateProjectContributionProfitRate(); }); } \ No newline at end of file diff --git a/src/main/resources/static/assets/js/project_budget_cost_project_manage.js b/src/main/resources/static/assets/js/project_budget_cost_project_manage.js index 78a3986..d74dfbb 100644 --- a/src/main/resources/static/assets/js/project_budget_cost_project_manage.js +++ b/src/main/resources/static/assets/js/project_budget_cost_project_manage.js @@ -19,6 +19,9 @@ $(function () { $("#costProjectManageAddBtn").click(function () { appendTrCostProjectManage(); }); + + //绑定项目管理明细输入框 + bindChangeableInputProjectManage(); }); /** * 采购成本增加一行 @@ -87,4 +90,6 @@ function updateCostProjectManageData(details) { var costOtherOtherTaxExclude = f2($("input[name='costOtherOtherTaxExclude']").val()); $("input[name='costTotalTaxExclude']").val(costPurchaseDeviceTaxExclude+costPurchaseBuildTaxExclude+costPurchaseServiceTaxExclude+costPurchaseOtherTaxExclude+total+costOtherOtherTaxExclude); + + updateProjectContributionProfitRate(); } \ No newline at end of file diff --git a/src/main/resources/static/assets/js/project_budget_income.js b/src/main/resources/static/assets/js/project_budget_income.js index 60bf45d..5334476 100644 --- a/src/main/resources/static/assets/js/project_budget_income.js +++ b/src/main/resources/static/assets/js/project_budget_income.js @@ -55,8 +55,10 @@ function updateIncomeData(incomeDetails) { $("input[name='incomeServiceTaxInclude']").val(serviceTaxInclude); $("input[name='incomeServiceTaxExclude']").val(serviceTaxExclude); - $("input[name='incomeTotalTaxInclude']").val(deviceTaxInclude+engineerTaxInclude+serviceTaxInclude); - $("input[name='incomeTotalTaxExclude']").val(deviceTaxExclude+engineerTaxExclude+serviceTaxExclude); + $("input[name='incomeTotalTaxInclude']").val(f2(deviceTaxInclude+engineerTaxInclude+serviceTaxInclude)); + $("input[name='incomeTotalTaxExclude']").val(f2(deviceTaxExclude+engineerTaxExclude+serviceTaxExclude)); + + updateProjectContributionProfitRate(); } diff --git a/src/main/resources/static/assets/js/project_budget_plan.js b/src/main/resources/static/assets/js/project_budget_plan.js index cc33c8b..5f484ba 100644 --- a/src/main/resources/static/assets/js/project_budget_plan.js +++ b/src/main/resources/static/assets/js/project_budget_plan.js @@ -19,6 +19,13 @@ $(function () { $("#budgetPlanDetailAddBtn").click(function () { appendTrBudgetPlan(); }); + + //绑定资金计划明细输入框 + bindChangeableInputBudgetPlanDetail(); + //绑定资金计划的删除按钮 + bindBudgetPlanDeleteBtn(); + //绑定公司管理费用的输入框 + bindCompanyManageChangeable(); }); /** * 资金计划增加一行 @@ -432,8 +439,6 @@ function updateEachCapitalInterest() { $(".input-total-capital-interest-budget-plan").val(f2(total)); //下方小表的资金利息 $(".input-underwritten-plan-statistic-capital-interest-budget-plan").val(f2(total)); - //主页面上的财务费用 - $("input[name='costExpropriationTaxExclude']").val(f2(total)); } /** @@ -467,4 +472,16 @@ function updateUnderwrittenInfo() { * 更新页面收入的数据 */ function updateBudgetPlanDetailData(details) { + //主页面上的财务费用 + $("input[name='costExpropriationTaxExclude']").val($(".input-underwritten-plan-statistic-capital-interest-budget-plan").val()); + //更新项目贡献率 + updateProjectContributionProfitRate(); +} + + +function bindCompanyManageChangeable() { + $("input[name='costCompanyManageTaxExclude']").change(function () { + //更新项目贡献率 + updateProjectContributionProfitRate(); + }); } \ No newline at end of file diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index 3827844..107f294 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -690,28 +690,17 @@ + +