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 @@
+
+