From 1537063c246fac26d2bc413ca57903f518d6dc17 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Thu, 6 Jan 2022 11:07:34 +0800 Subject: [PATCH 01/35] =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=86=B3=E7=AE=97?= =?UTF-8?q?=E5=88=86=E9=9A=94=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/ProjectFinalController.java | 11 +- .../backend/ProjectSettleController.java | 15 +- .../static/assets/js/project_final.js | 75 +- .../static/assets/js/project_settle.js | 127 ++-- .../templates/admin/project_approve.ftl | 708 +++++++++--------- .../templates/admin/project_final_add.ftl | 224 +++--- .../templates/admin/project_final_edit.ftl | 224 +++--- .../templates/admin/project_settle_add.ftl | 280 +++---- .../templates/admin/project_settle_edit.ftl | 280 +++---- 9 files changed, 994 insertions(+), 950 deletions(-) diff --git a/src/main/java/cn/palmte/work/controller/backend/ProjectFinalController.java b/src/main/java/cn/palmte/work/controller/backend/ProjectFinalController.java index 6ba4cd3..8eef146 100644 --- a/src/main/java/cn/palmte/work/controller/backend/ProjectFinalController.java +++ b/src/main/java/cn/palmte/work/controller/backend/ProjectFinalController.java @@ -1,6 +1,6 @@ package cn.palmte.work.controller.backend; -import cn.palmte.work.bean.*; +import cn.palmte.work.bean.FinalBean; import cn.palmte.work.model.Project; import cn.palmte.work.model.ProjectBudgetPlanDetail; import cn.palmte.work.model.ProjectSettleIncome; @@ -8,7 +8,11 @@ import cn.palmte.work.model.ProjectSettleIncomeRepository; import cn.palmte.work.service.*; import cn.palmte.work.utils.FreeMarkerUtil; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.datetime.DateFormatter; +import org.springframework.format.number.NumberStyleFormatter; import org.springframework.stereotype.Controller; +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -98,4 +102,9 @@ public class ProjectFinalController extends BaseController{ return "redirect:/project/list"; } + @InitBinder + public void initBinder(WebDataBinder webDataBinder) { + webDataBinder.addCustomFormatter(new DateFormatter("yyyy-MM-dd")); + webDataBinder.addCustomFormatter(new NumberStyleFormatter()); + } } diff --git a/src/main/java/cn/palmte/work/controller/backend/ProjectSettleController.java b/src/main/java/cn/palmte/work/controller/backend/ProjectSettleController.java index dbb8c4e..88e6b37 100644 --- a/src/main/java/cn/palmte/work/controller/backend/ProjectSettleController.java +++ b/src/main/java/cn/palmte/work/controller/backend/ProjectSettleController.java @@ -1,6 +1,9 @@ package cn.palmte.work.controller.backend; -import cn.palmte.work.bean.*; +import cn.palmte.work.bean.BudgetSettleBean; +import cn.palmte.work.bean.EstimateSettleBean; +import cn.palmte.work.bean.FormerBean; +import cn.palmte.work.bean.SettleBean; import cn.palmte.work.model.*; import cn.palmte.work.service.ProjectBudgetService; import cn.palmte.work.service.ProjectEstimateService; @@ -9,7 +12,11 @@ import cn.palmte.work.service.ProjectSettleService; import cn.palmte.work.utils.DateKit; import cn.palmte.work.utils.FreeMarkerUtil; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.datetime.DateFormatter; +import org.springframework.format.number.NumberStyleFormatter; import org.springframework.stereotype.Controller; +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import top.jfunc.common.utils.CollectionUtil; @@ -135,4 +142,10 @@ public class ProjectSettleController extends BaseController{ projectSettleService.saveAndApprove(project, settleBean, budgetBean, estimateBean, time); return "redirect:/project/list"; } + + @InitBinder + public void initBinder(WebDataBinder webDataBinder) { + webDataBinder.addCustomFormatter(new DateFormatter("yyyy-MM-dd")); + webDataBinder.addCustomFormatter(new NumberStyleFormatter()); + } } diff --git a/src/main/resources/static/assets/js/project_final.js b/src/main/resources/static/assets/js/project_final.js index 4bdf666..11c4846 100644 --- a/src/main/resources/static/assets/js/project_final.js +++ b/src/main/resources/static/assets/js/project_final.js @@ -4,16 +4,19 @@ function calculateFinal() { calIncomeFinalTotal(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); + digitalSelf("incomeDeviceFinalTotal", "input[name='incomeDeviceFinalTotal']"); }); $("input[name='incomeEngineerFinalTotal']").change(function () { calIncomeFinalTotal(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); + digitalSelf("incomeEngineerFinalTotal", "input[name='incomeEngineerFinalTotal']"); }); $("input[name='incomeServiceFinalTotal']").change(function () { calIncomeFinalTotal(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); + digitalSelf("incomeServiceFinalTotal", "input[name='incomeServiceFinalTotal']"); }); @@ -21,31 +24,37 @@ function calculateFinal() { calCostFinalTotal(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); + digitalSelf("costPurchaseDeviceFinalTotal", "input[name='costPurchaseDeviceFinalTotal']"); }); $("input[name='costPurchaseBuildFinalTotal']").change(function () { calCostFinalTotal(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); + digitalSelf("costPurchaseBuildFinalTotal", "input[name='costPurchaseBuildFinalTotal']"); }); $("input[name='costPurchaseServiceFinalTotal']").change(function () { calCostFinalTotal(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); + digitalSelf("costPurchaseServiceFinalTotal", "input[name='costPurchaseServiceFinalTotal']"); }); $("input[name='costPurchaseOtherFinalTotal']").change(function () { calCostFinalTotal(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); + digitalSelf("costPurchaseOtherFinalTotal", "input[name='costPurchaseOtherFinalTotal']"); }); $("input[name='costProjectManageFinalTotal']").change(function () { calCostFinalTotal(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); + digitalSelf("costProjectManageFinalTotal", "input[name='costProjectManageFinalTotal']"); }); $("input[name='costOtherFinalTotal']").change(function () { calCostFinalTotal(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); + digitalSelf("costOtherFinalTotal", "input[name='costOtherFinalTotal']"); }); @@ -53,16 +62,19 @@ function calculateFinal() { calManageFinalTotal(); calGrossProfitFinalTotal(); calGrossProfitProfitMargin(); + digitalSelf("costExpropriationFinalTotal", "input[name='costExpropriationFinalTotal']"); }); $("input[name='costCompanyManageFinalTotal']").change(function () { calManageFinalTotal(); calContributionMarginFinalTotal(); calContributionMarginProfitMargin(); + digitalSelf("costCompanyManageFinalTotal", "input[name='costCompanyManageFinalTotal']"); }); $("input[name='costIncomeTaxFinalTotal']").change(function () { calManageFinalTotal(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); + digitalSelf("costIncomeTaxFinalTotal", "input[name='costIncomeTaxFinalTotal']"); }); @@ -70,31 +82,37 @@ function calculateFinal() { //calCashFluxFinalTotal(); calNetCashFlow(); calNetIncreaseMonetaryFunds(); + digitalSelf("saleIncomeCash", "input[name='saleIncomeCash']"); }); $("input[name='taxReturn']").change(function () { //calCashFluxFinalTotal(); calNetCashFlow(); calNetIncreaseMonetaryFunds(); + digitalSelf("taxReturn", "input[name='taxReturn']"); }); $("input[name='earnestMoneyIncome']").change(function () { //calCashFluxFinalTotal(); calNetCashFlow(); calNetIncreaseMonetaryFunds(); + digitalSelf("earnestMoneyIncome", "input[name='earnestMoneyIncome']"); }); $("input[name='purchaseCost']").change(function () { calCashFluxFinalTotal(); calNetCashFlow(); calNetIncreaseMonetaryFunds(); + digitalSelf("purchaseCost", "input[name='purchaseCost']"); }); $("input[name='taxCost']").change(function () { // calCashFluxFinalTotal(); calNetCashFlow(); calNetIncreaseMonetaryFunds(); + digitalSelf("taxCost", "input[name='taxCost']"); }); $("input[name='earnestMoneyCost']").change(function () { //calCashFluxFinalTotal(); calNetCashFlow(); calNetIncreaseMonetaryFunds(); + digitalSelf("earnestMoneyCost", "input[name='earnestMoneyCost']"); }); $("input[name='netCashFlow']").change(function () { // calCashFluxFinalTotal(); @@ -103,11 +121,13 @@ function calculateFinal() { // calCashFluxFinalTotal(); calNetCashFromInvestingActivities(); calNetIncreaseMonetaryFunds(); - }) + digitalSelf("cashInflowFromInvestingActivities", "input[name='cashInflowFromInvestingActivities']"); + }); $("input[name='cashOutflowFromInvestingActivities']").change(function () { //calCashFluxFinalTotal(); calNetCashFromInvestingActivities(); calNetIncreaseMonetaryFunds(); + digitalSelf("cashOutflowFromInvestingActivities", "input[name='cashOutflowFromInvestingActivities']"); }); $("input[name='netCashFromInvestingActivities']").change(function () { // calCashFluxFinalTotal(); @@ -116,11 +136,13 @@ function calculateFinal() { //calCashFluxFinalTotal(); calFinancingCapitalCashflow(); calNetIncreaseMonetaryFunds(); + digitalSelf("financingCapitalInflow", "input[name='financingCapitalInflow']"); }); $("input[name='financingCapitalOutflow']").change(function () { //calCashFluxFinalTotal(); calFinancingCapitalCashflow(); calNetIncreaseMonetaryFunds(); + digitalSelf("financingCapitalOutflow", "input[name='financingCapitalOutflow']"); }); $("input[name='financingCapitalCashflow']").change(function () { //calCashFluxFinalTotal(); @@ -148,8 +170,8 @@ function calNetCashFlow() { if (saleIncomeCash && taxReturn && earnestMoneyIncome && purchaseCost && taxCost && earnestMoneyCost) { - netCashFlow.val(f2(parseFloat(saleIncomeCash) + parseFloat(taxReturn) + parseFloat(earnestMoneyIncome) - - parseFloat(purchaseCost) - parseFloat(taxCost) - parseFloat(earnestMoneyCost))); + netCashFlow.val(f2Fixed(f2(saleIncomeCash) + f2(taxReturn) + f2(earnestMoneyIncome) + - f2(purchaseCost) - f2(taxCost) - f2(earnestMoneyCost))); } else { netCashFlow.val(""); } @@ -165,7 +187,7 @@ function calNetCashFromInvestingActivities() { var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']"); if (cashInflowFromInvestingActivities && cashOutflowFromInvestingActivities) { - netCashFromInvestingActivities.val(f2(parseFloat(cashInflowFromInvestingActivities) - parseFloat(cashOutflowFromInvestingActivities))); + netCashFromInvestingActivities.val(f2Fixed(f2(cashInflowFromInvestingActivities) - f2(cashOutflowFromInvestingActivities))); } else { netCashFromInvestingActivities.val(""); } @@ -181,7 +203,7 @@ function calFinancingCapitalCashflow() { var financingCapitalCashflow = $("input[name='financingCapitalCashflow']"); if (financingCapitalInflow && financingCapitalOutflow) { - financingCapitalCashflow.val(f2(parseFloat(financingCapitalInflow) - parseFloat(financingCapitalOutflow))); + financingCapitalCashflow.val(f2Fixed(f2(financingCapitalInflow) - f2(financingCapitalOutflow))); } else { financingCapitalCashflow.val(""); } @@ -195,7 +217,7 @@ function calNetIncreaseMonetaryFunds() { var netIncreaseMonetaryFunds = $("input[name='netIncreaseMonetaryFunds']"); if (netCashFlow && netCashFromInvestingActivities && financingCapitalCashflow) { - netIncreaseMonetaryFunds.val(f2(parseFloat(netCashFlow) + parseFloat(netCashFromInvestingActivities) + parseFloat(financingCapitalCashflow))); + netIncreaseMonetaryFunds.val(f2Fixed(f2(netCashFlow) + f2(netCashFromInvestingActivities) + f2(financingCapitalCashflow))); } else { netIncreaseMonetaryFunds.val(""); } @@ -212,7 +234,7 @@ function calIncomeFinalTotal() { var incomeFinalTotal = $("input[name='incomeFinalTotal']"); if (incomeDeviceFinalTotal && incomeEngineerFinalTotal && incomeServiceFinalTotal) { - incomeFinalTotal.val(f2(parseFloat(incomeDeviceFinalTotal) + parseFloat(incomeEngineerFinalTotal) + parseFloat(incomeServiceFinalTotal))); + incomeFinalTotal.val(f2Fixed(f2(incomeDeviceFinalTotal) + f2(incomeEngineerFinalTotal) + f2(incomeServiceFinalTotal))); } else { incomeFinalTotal.val(""); } @@ -233,8 +255,8 @@ function calCostFinalTotal() { if (costPurchaseDeviceFinalTotal && costPurchaseBuildFinalTotal && costPurchaseServiceFinalTotal && costPurchaseOtherFinalTotal && costProjectManageFinalTotal && costOtherFinalTotal) { - costFinalTotal.val(f2(parseFloat(costPurchaseDeviceFinalTotal) + parseFloat(costPurchaseBuildFinalTotal) + parseFloat(costPurchaseServiceFinalTotal) + - parseFloat(costPurchaseOtherFinalTotal) + parseFloat(costProjectManageFinalTotal) + parseFloat(costOtherFinalTotal))); + costFinalTotal.val(f2Fixed(f2(costPurchaseDeviceFinalTotal) + f2(costPurchaseBuildFinalTotal) + f2(costPurchaseServiceFinalTotal) + + f2(costPurchaseOtherFinalTotal) + f2(costProjectManageFinalTotal) + f2(costOtherFinalTotal))); } else { costFinalTotal.val(""); } @@ -252,7 +274,7 @@ function calManageFinalTotal() { var manageFinalTotal = $("input[name='manageFinalTotal']"); if (costExpropriationFinalTotal && costCompanyManageFinalTotal && costIncomeTaxFinalTotal) { - manageFinalTotal.val(f2(parseFloat(costExpropriationFinalTotal) + parseFloat(costCompanyManageFinalTotal) + parseFloat(costIncomeTaxFinalTotal))); + manageFinalTotal.val(f2Fixed(f2(costExpropriationFinalTotal) + f2(costCompanyManageFinalTotal) + f2(costIncomeTaxFinalTotal))); } else { manageFinalTotal.val(""); } @@ -284,11 +306,11 @@ function calCashFluxFinalTotal() { netCashFlow && cashInflowFromInvestingActivities && cashOutflowFromInvestingActivities && netCashFromInvestingActivities && financingCapitalInflow && financingCapitalOutflow && financingCapitalCashflow && netIncreaseMonetaryFunds) { - cashFluxFinalTotal.val(f2(parseFloat(saleIncomeCash) + parseFloat(taxReturn) + parseFloat(earnestMoneyIncome) + - parseFloat(purchaseCost) + parseFloat(taxCost) + parseFloat(earnestMoneyCost) + - parseFloat(netCashFlow) + parseFloat(cashInflowFromInvestingActivities) + parseFloat(cashOutflowFromInvestingActivities) + - parseFloat(netCashFromInvestingActivities) + parseFloat(financingCapitalInflow) + parseFloat(financingCapitalOutflow) + - parseFloat(financingCapitalCashflow) + parseFloat(netIncreaseMonetaryFunds))); + cashFluxFinalTotal.val(f2Fixed(f2(saleIncomeCash) + f2(taxReturn) + f2(earnestMoneyIncome) + + f2(purchaseCost) + f2(taxCost) + f2(earnestMoneyCost) + + f2(netCashFlow) + f2(cashInflowFromInvestingActivities) + f2(cashOutflowFromInvestingActivities) + + f2(netCashFromInvestingActivities) + f2(financingCapitalInflow) + f2(financingCapitalOutflow) + + f2(financingCapitalCashflow) + f2(netIncreaseMonetaryFunds))); } else { cashFluxFinalTotal.val(""); } @@ -305,7 +327,7 @@ function calGrossProfitFinalTotal() { var grossProfitFinalTotal = $("input[name='grossProfitFinalTotal']"); if (incomeFinalTotal && costFinalTotal && costExpropriationFinalTotal) { - grossProfitFinalTotal.val(f2(parseFloat(incomeFinalTotal) - parseFloat(costFinalTotal) - parseFloat(costExpropriationFinalTotal))); + grossProfitFinalTotal.val(f2Fixed(f2(incomeFinalTotal) - f2(costFinalTotal) - f2(costExpropriationFinalTotal))); } else { grossProfitFinalTotal.val(""); } @@ -320,7 +342,7 @@ function calGrossProfitProfitMargin() { var grossProfitProfitMargin = $("input[name='grossProfitProfitMargin']"); if (grossProfitFinalTotal && incomeFinalTotal) { - grossProfitProfitMargin.val(f2(100 * parseFloat(grossProfitFinalTotal) / parseFloat(incomeFinalTotal))); + grossProfitProfitMargin.val(f2Fixed(100 * f2(grossProfitFinalTotal) / f2(incomeFinalTotal))); } else { grossProfitProfitMargin.val(""); } @@ -337,7 +359,7 @@ function calContributionMarginFinalTotal() { var contributionMarginFinalTotal = $("input[name='contributionMarginFinalTotal']"); if (grossProfitFinalTotal && costCompanyManageFinalTotal) { - contributionMarginFinalTotal.val(f2(parseFloat(grossProfitFinalTotal) - parseFloat(costCompanyManageFinalTotal))); + contributionMarginFinalTotal.val(f2Fixed(f2(grossProfitFinalTotal) - f2(costCompanyManageFinalTotal))); } else { contributionMarginFinalTotal.val(""); } @@ -352,7 +374,7 @@ function calContributionMarginProfitMargin() { var contributionMarginProfitMargin = $("input[name='contributionMarginProfitMargin']"); if (contributionMarginFinalTotal && incomeFinalTotal) { - contributionMarginProfitMargin.val(f2(100 * parseFloat(contributionMarginFinalTotal) / parseFloat(incomeFinalTotal))); + contributionMarginProfitMargin.val(f2Fixed(100 * f2(contributionMarginFinalTotal) / f2(incomeFinalTotal))); } else { contributionMarginProfitMargin.val(""); } @@ -369,7 +391,7 @@ function calNetMarginFinalTotal() { var netMarginFinalTotal = $("input[name='netMarginFinalTotal']"); if (contributionMarginFinalTotal && costIncomeTaxFinalTotal) { - netMarginFinalTotal.val(f2(parseFloat(contributionMarginFinalTotal) - parseFloat(costIncomeTaxFinalTotal))); + netMarginFinalTotal.val(f2Fixed(f2(contributionMarginFinalTotal) - f2(costIncomeTaxFinalTotal))); } else { netMarginFinalTotal.val(""); } @@ -384,23 +406,12 @@ function calNetMarginProfitMargin() { var netMarginProfitMargin = $("input[name='netMarginProfitMargin']"); if (netMarginFinalTotal && incomeFinalTotal) { - netMarginProfitMargin.val(f2(100 * parseFloat(netMarginFinalTotal) / parseFloat(incomeFinalTotal))); + netMarginProfitMargin.val(f2Fixed(100 * f2(netMarginFinalTotal) / f2(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 a3023a5..e568638 100644 --- a/src/main/resources/static/assets/js/project_settle.js +++ b/src/main/resources/static/assets/js/project_settle.js @@ -5,18 +5,21 @@ function calculateSettle() { calIncomeTotal(); calIncomeSettleTotal(); calProfit(); + digitalSelf("incomeDevice", "input[name='incomeDevice']"); }); $("input[name='incomeEngineer']").change(function () { calIncomeEngineerSettleTotal(); calIncomeTotal(); calIncomeSettleTotal(); calProfit(); + digitalSelf("incomeEngineer", "input[name='incomeEngineer']"); }); $("input[name='incomeService']").change(function () { calIncomeServiceSettleTotal(); calIncomeTotal(); calIncomeSettleTotal(); calProfit(); + digitalSelf("incomeService", "input[name='incomeService']"); }); @@ -25,36 +28,42 @@ function calculateSettle() { calCostTotal(); calCostSettleTotal(); calProfit(); + digitalSelf("costPurchaseDevice", "input[name='costPurchaseDevice']"); }); $("input[name='costPurchaseBuild']").change(function () { calCostPurchaseBuildSettleTotal(); calCostTotal(); calCostSettleTotal(); calProfit(); + digitalSelf("costPurchaseBuild", "input[name='costPurchaseBuild']"); }); $("input[name='costPurchaseService']").change(function () { calCostPurchaseServiceSettleTotal(); calCostTotal(); calCostSettleTotal(); calProfit(); + digitalSelf("costPurchaseService", "input[name='costPurchaseService']"); }); $("input[name='costPurchaseOther']").change(function () { calCostPurchaseOtherSettleTotal(); calCostTotal(); calCostSettleTotal(); calProfit(); + digitalSelf("costPurchaseOther", "input[name='costPurchaseOther']"); }); $("input[name='costProjectManage']").change(function () { calCostProjectManageSettleTotal(); calCostTotal(); calCostSettleTotal(); calProfit(); + digitalSelf("costProjectManage", "input[name='costProjectManage']"); }); $("input[name='costOther']").change(function () { calCostOtherSettleTotal(); calCostTotal(); calCostSettleTotal(); calProfit(); + digitalSelf("costOther", "input[name='costOther']"); }); @@ -63,6 +72,7 @@ function calculateSettle() { calCostManageTotal(); calCostManageSettleTotal(); calProfit(); + digitalSelf("costExpropriation", "input[name='costExpropriation']"); }); $("input[name='costCompanyManage']").change(function () { calCostCompanyManageSettleTotal(); @@ -75,6 +85,7 @@ function calculateSettle() { calNetProfit(); calNetProfitSettleTotal(); calNetProfitProfitMargin(); + digitalSelf("costCompanyManage", "input[name='costCompanyManage']"); }); $("input[name='costIncomeTax']").change(function () { calCostIncomeTaxSettleTotal(); @@ -84,6 +95,7 @@ function calculateSettle() { calNetProfit(); calNetProfitSettleTotal(); calNetProfitProfitMargin(); + digitalSelf("costIncomeTax", "input[name='costIncomeTax']"); }); @@ -107,6 +119,7 @@ function calculateSettle() { calNetCashFlowSettle(); calNetIncreaseMonetaryFunds(); calNetIncreaseMonetaryFundsSettle(); + digitalSelf("saleIncomeCash", "input[name='saleIncomeCash']"); }); $("input[name='taxReturn']").change(function () { calTaxReturnSettle(); @@ -114,6 +127,7 @@ function calculateSettle() { calNetCashFlowSettle(); calNetIncreaseMonetaryFunds(); calNetIncreaseMonetaryFundsSettle(); + digitalSelf("taxReturn", "input[name='taxReturn']"); }); $("input[name='earnestMoneyIncome']").change(function () { calEarnestMoneyIncomeSettle(); @@ -121,6 +135,7 @@ function calculateSettle() { calNetCashFlowSettle(); calNetIncreaseMonetaryFunds(); calNetIncreaseMonetaryFundsSettle(); + digitalSelf("earnestMoneyIncome", "input[name='earnestMoneyIncome']"); }); $("input[name='purchaseCost']").change(function () { calPurchaseCostSettle(); @@ -128,6 +143,7 @@ function calculateSettle() { calNetCashFlowSettle(); calNetIncreaseMonetaryFunds(); calNetIncreaseMonetaryFundsSettle(); + digitalSelf("purchaseCost", "input[name='purchaseCost']"); }); $("input[name='taxCost']").change(function () { calTaxCostSettle(); @@ -135,6 +151,7 @@ function calculateSettle() { calNetCashFlowSettle(); calNetIncreaseMonetaryFunds(); calNetIncreaseMonetaryFundsSettle(); + digitalSelf("taxCost", "input[name='taxCost']"); }); $("input[name='earnestMoneyCost']").change(function () { calEarnestMoneyCostSettle(); @@ -142,6 +159,7 @@ function calculateSettle() { calNetCashFlowSettle(); calNetIncreaseMonetaryFunds(); calNetIncreaseMonetaryFundsSettle(); + digitalSelf("earnestMoneyCost", "input[name='earnestMoneyCost']"); }); // $("input[name='netCashFlow']").change(function () { // calNetCashFlowSettle(); @@ -155,6 +173,7 @@ function calculateSettle() { calNetCashFromInvestingActivitiesSettle(); calNetIncreaseMonetaryFunds(); calNetIncreaseMonetaryFundsSettle(); + digitalSelf("cashInflowFromInvestingActivities", "input[name='cashInflowFromInvestingActivities']"); }); $("input[name='cashOutflowFromInvestingActivities']").change(function () { calCashOutflowFromInvestingActivitiesSettle(); @@ -162,6 +181,7 @@ function calculateSettle() { calNetCashFromInvestingActivitiesSettle(); calNetIncreaseMonetaryFunds(); calNetIncreaseMonetaryFundsSettle(); + digitalSelf("cashOutflowFromInvestingActivities", "input[name='cashOutflowFromInvestingActivities']"); }); // $("input[name='netCashFromInvestingActivities']").change(function () { // calNetCashFromInvestingActivitiesSettle(); @@ -175,6 +195,7 @@ function calculateSettle() { calFinancingCapitalCashflowSettle(); calNetIncreaseMonetaryFunds(); calNetIncreaseMonetaryFundsSettle(); + digitalSelf("financingCapitalInflow", "input[name='financingCapitalInflow']"); }); $("input[name='financingCapitalOutflow']").change(function () { calFinancingCapitalOutflowSettle(); @@ -182,6 +203,7 @@ function calculateSettle() { calFinancingCapitalCashflowSettle(); calNetIncreaseMonetaryFunds(); calNetIncreaseMonetaryFundsSettle(); + digitalSelf("financingCapitalOutflow", "input[name='financingCapitalOutflow']"); }); // $("input[name='financingCapitalCashflow']").change(function () { // calFinancingCapitalCashflowSettle(); @@ -222,7 +244,7 @@ function calIncomeDeviceSettleTotal() { var incomeDeviceSettleTotal = $("input[name='incomeDeviceSettleTotal']"); if(incomeDeviceFormerSettleTotal && incomeDevice){ - incomeDeviceSettleTotal.val(f2(parseFloat(incomeDeviceFormerSettleTotal)+parseFloat(incomeDevice))); + incomeDeviceSettleTotal.val(f2Fixed(f2(incomeDeviceFormerSettleTotal)+f2(incomeDevice))); }else { incomeDeviceSettleTotal.val(""); } @@ -238,7 +260,7 @@ function calIncomeEngineerSettleTotal() { var incomeEngineerSettleTotal = $("input[name='incomeEngineerSettleTotal']"); if(incomeEngineerFormerSettleTotal && incomeEngineer){ - incomeEngineerSettleTotal.val(f2(parseFloat(incomeEngineerFormerSettleTotal)+parseFloat(incomeEngineer))); + incomeEngineerSettleTotal.val(f2Fixed(f2(incomeEngineerFormerSettleTotal)+f2(incomeEngineer))); }else { incomeEngineerSettleTotal.val(""); } @@ -254,7 +276,7 @@ function calIncomeServiceSettleTotal() { var incomeServiceSettleTotal = $("input[name='incomeServiceSettleTotal']"); if(incomeServiceFormerSettleTotal && incomeService){ - incomeServiceSettleTotal.val(f2(parseFloat(incomeServiceFormerSettleTotal)+parseFloat(incomeService))); + incomeServiceSettleTotal.val(f2Fixed(f2(incomeServiceFormerSettleTotal)+f2(incomeService))); }else { incomeServiceSettleTotal.val(""); } @@ -271,7 +293,7 @@ function calIncomeTotal() { var incomeTotal = $("input[name='incomeTotal']"); if(incomeDevice && incomeEngineer && incomeService){ - incomeTotal.val(f2(parseFloat(incomeDevice)+parseFloat(incomeEngineer)+parseFloat(incomeService))); + incomeTotal.val(f2Fixed(f2(incomeDevice)+f2(incomeEngineer)+f2(incomeService))); }else { incomeTotal.val(""); } @@ -288,7 +310,7 @@ function calIncomeSettleTotal() { var incomeSettleTotal = $("input[name='incomeSettleTotal']"); if(incomeDeviceSettleTotal && incomeEngineerSettleTotal && incomeServiceSettleTotal){ - incomeSettleTotal.val(f2(parseFloat(incomeDeviceSettleTotal)+parseFloat(incomeEngineerSettleTotal)+parseFloat(incomeServiceSettleTotal))); + incomeSettleTotal.val(f2Fixed(f2(incomeDeviceSettleTotal)+f2(incomeEngineerSettleTotal)+f2(incomeServiceSettleTotal))); }else { incomeSettleTotal.val(""); } @@ -304,7 +326,7 @@ function calCostPurchaseDeviceSettleTotal() { var costPurchaseDeviceSettleTotal = $("input[name='costPurchaseDeviceSettleTotal']"); if(costPurchaseDeviceFormerSettleTotal && costPurchaseDevice){ - costPurchaseDeviceSettleTotal.val(f2(parseFloat(costPurchaseDeviceFormerSettleTotal)+parseFloat(costPurchaseDevice))); + costPurchaseDeviceSettleTotal.val(f2Fixed(f2(costPurchaseDeviceFormerSettleTotal)+f2(costPurchaseDevice))); }else { costPurchaseDeviceSettleTotal.val(""); } @@ -320,7 +342,7 @@ function calCostPurchaseBuildSettleTotal() { var costPurchaseBuildSettleTotal = $("input[name='costPurchaseBuildSettleTotal']"); if(costPurchaseBuildFormerSettleTotal && costPurchaseBuild){ - costPurchaseBuildSettleTotal.val(f2(parseFloat(costPurchaseBuildFormerSettleTotal)+parseFloat(costPurchaseBuild))); + costPurchaseBuildSettleTotal.val(f2Fixed(f2(costPurchaseBuildFormerSettleTotal)+f2(costPurchaseBuild))); }else { costPurchaseBuildSettleTotal.val(""); } @@ -336,7 +358,7 @@ function calCostPurchaseServiceSettleTotal() { var costPurchaseServiceSettleTotal = $("input[name='costPurchaseServiceSettleTotal']"); if(costPurchaseServiceFormerSettleTotal && costPurchaseService){ - costPurchaseServiceSettleTotal.val(f2(parseFloat(costPurchaseServiceFormerSettleTotal)+parseFloat(costPurchaseService))); + costPurchaseServiceSettleTotal.val(f2Fixed(f2(costPurchaseServiceFormerSettleTotal)+f2(costPurchaseService))); }else { costPurchaseServiceSettleTotal.val(""); } @@ -352,7 +374,7 @@ function calCostPurchaseOtherSettleTotal() { var costPurchaseOtherSettleTotal = $("input[name='costPurchaseOtherSettleTotal']"); if(costPurchaseOtherFormerSettleTotal && costPurchaseOther){ - costPurchaseOtherSettleTotal.val(f2(parseFloat(costPurchaseOtherFormerSettleTotal)+parseFloat(costPurchaseOther))); + costPurchaseOtherSettleTotal.val(f2Fixed(f2(costPurchaseOtherFormerSettleTotal)+f2(costPurchaseOther))); }else { costPurchaseOtherSettleTotal.val(""); } @@ -368,7 +390,7 @@ function calCostProjectManageSettleTotal() { var costProjectManageSettleTotal = $("input[name='costProjectManageSettleTotal']"); if(costProjectManageFormerSettleTotal && costProjectManage){ - costProjectManageSettleTotal.val(f2(parseFloat(costProjectManageFormerSettleTotal)+parseFloat(costProjectManage))); + costProjectManageSettleTotal.val(f2Fixed(f2(costProjectManageFormerSettleTotal)+f2(costProjectManage))); }else { costProjectManageSettleTotal.val(""); } @@ -384,7 +406,7 @@ function calCostOtherSettleTotal() { var costOtherSettleTotal = $("input[name='costOtherSettleTotal']"); if(costOtherFormerSettleTotal && costOther){ - costOtherSettleTotal.val(f2(parseFloat(costOtherFormerSettleTotal)+parseFloat(costOther))); + costOtherSettleTotal.val(f2Fixed(f2(costOtherFormerSettleTotal)+f2(costOther))); }else { costOtherSettleTotal.val(""); } @@ -404,7 +426,7 @@ function calCostTotal() { var costTotal = $("input[name='costTotal']"); if(costPurchaseDevice && costPurchaseBuild && costPurchaseService && costPurchaseOther && costProjectManage && costOther){ - costTotal.val(f2(parseFloat(costPurchaseDevice)+parseFloat(costPurchaseBuild)+parseFloat(costPurchaseService)+parseFloat(costPurchaseOther)+parseFloat(costProjectManage)+parseFloat(costOther))); + costTotal.val(f2Fixed(f2(costPurchaseDevice)+f2(costPurchaseBuild)+f2(costPurchaseService)+f2(costPurchaseOther)+f2(costProjectManage)+f2(costOther))); }else { costTotal.val(""); } @@ -425,8 +447,8 @@ function calCostSettleTotal() { if(costPurchaseDeviceSettleTotal && costPurchaseBuildSettleTotal && costPurchaseServiceSettleTotal && costPurchaseOtherSettleTotal && costProjectManageSettleTotal && costOtherSettleTotal){ - costSettleTotal.val(f2(parseFloat(costPurchaseDeviceSettleTotal)+parseFloat(costPurchaseBuildSettleTotal)+parseFloat(costPurchaseServiceSettleTotal)+ - parseFloat(costPurchaseOtherSettleTotal)+parseFloat(costProjectManageSettleTotal)+parseFloat(costOtherSettleTotal))); + costSettleTotal.val(f2Fixed(f2(costPurchaseDeviceSettleTotal)+f2(costPurchaseBuildSettleTotal)+f2(costPurchaseServiceSettleTotal)+ + f2(costPurchaseOtherSettleTotal)+f2(costProjectManageSettleTotal)+f2(costOtherSettleTotal))); }else { costSettleTotal.val(""); } @@ -442,7 +464,7 @@ function calCostExpropriationSettleTotal() { var costExpropriationSettleTotal = $("input[name='costExpropriationSettleTotal']"); if(costExpropriationFormerSettleTotal && costExpropriation){ - costExpropriationSettleTotal.val(f2(parseFloat(costExpropriationFormerSettleTotal)+parseFloat(costExpropriation))); + costExpropriationSettleTotal.val(f2Fixed(f2(costExpropriationFormerSettleTotal)+f2(costExpropriation))); }else { costExpropriationSettleTotal.val(""); } @@ -458,7 +480,7 @@ function calCostCompanyManageSettleTotal() { var costCompanyManageSettleTotal = $("input[name='costCompanyManageSettleTotal']"); if(costCompanyManageFormerSettleTotal && costCompanyManage){ - costCompanyManageSettleTotal.val(f2(parseFloat(costCompanyManageFormerSettleTotal)+parseFloat(costCompanyManage))); + costCompanyManageSettleTotal.val(f2Fixed(f2(costCompanyManageFormerSettleTotal)+f2(costCompanyManage))); }else { costCompanyManageSettleTotal.val(""); } @@ -474,7 +496,7 @@ function calCostIncomeTaxSettleTotal() { var costIncomeTaxSettleTotal = $("input[name='costIncomeTaxSettleTotal']"); if(costIncomeTaxFormerSettleTotal && costIncomeTax){ - costIncomeTaxSettleTotal.val(f2(parseFloat(costIncomeTaxFormerSettleTotal)+parseFloat(costIncomeTax))); + costIncomeTaxSettleTotal.val(f2Fixed(f2(costIncomeTaxFormerSettleTotal)+f2(costIncomeTax))); }else { costIncomeTaxSettleTotal.val(""); } @@ -491,7 +513,7 @@ function calCostManageTotal() { var costManageTotal = $("input[name='costManageTotal']"); if(costExpropriation && costCompanyManage && costIncomeTax){ - costManageTotal.val(f2(parseFloat(costExpropriation)+parseFloat(costCompanyManage)+parseFloat(costIncomeTax))); + costManageTotal.val(f2Fixed(f2(costExpropriation)+f2(costCompanyManage)+f2(costIncomeTax))); }else { costManageTotal.val(""); } @@ -508,7 +530,7 @@ function calCostManageSettleTotal() { var costManageSettleTotal = $("input[name='costManageSettleTotal']"); if(costExpropriationSettleTotal && costCompanyManageSettleTotal && costIncomeTaxSettleTotal){ - costManageSettleTotal.val(f2(parseFloat(costExpropriationSettleTotal)+parseFloat(costCompanyManageSettleTotal)+parseFloat(costIncomeTaxSettleTotal))); + costManageSettleTotal.val(f2Fixed(f2(costExpropriationSettleTotal)+f2(costCompanyManageSettleTotal)+f2(costIncomeTaxSettleTotal))); }else { costManageSettleTotal.val(""); } @@ -525,7 +547,7 @@ function calGrossProfit() { var grossProfit = $("input[name='grossProfit']"); if(incomeTotal && costTotal && costExpropriation){ - grossProfit.val(f2(parseFloat(incomeTotal)-parseFloat(costTotal)-parseFloat(costExpropriation))); + grossProfit.val(f2Fixed(f2(incomeTotal)-f2(costTotal)-f2(costExpropriation))); }else { grossProfit.val(""); } @@ -541,7 +563,7 @@ function calGrossProfitSettleTotal() { var grossProfitSettleTotal = $("input[name='grossProfitSettleTotal']"); if(grossProfitFormerSettleTotal && grossProfit){ - grossProfitSettleTotal.val(f2(parseFloat(grossProfitFormerSettleTotal)+parseFloat(grossProfit))); + grossProfitSettleTotal.val(f2Fixed(f2(grossProfitFormerSettleTotal)+f2(grossProfit))); }else { grossProfitSettleTotal.val(""); } @@ -557,7 +579,7 @@ function calGrossProfitProfitMargin() { var grossProfitProfitMargin = $("input[name='grossProfitProfitMargin']"); if(grossProfitSettleTotal && incomeSettleTotal){ - grossProfitProfitMargin.val(f2(100*(parseFloat(grossProfitSettleTotal)/parseFloat(incomeSettleTotal)))); + grossProfitProfitMargin.val(f2Fixed(100*(f2(grossProfitSettleTotal)/f2(incomeSettleTotal)))); }else { grossProfitProfitMargin.val(""); } @@ -573,7 +595,7 @@ function calContributionProfit() { var contributionProfit = $("input[name='contributionProfit']"); if(grossProfit && costCompanyManage){ - contributionProfit.val(f2(parseFloat(grossProfit)-parseFloat(costCompanyManage))); + contributionProfit.val(f2Fixed(f2(grossProfit)-f2(costCompanyManage))); }else { contributionProfit.val(""); } @@ -589,7 +611,7 @@ function calContributionProfitSettleTotal() { var contributionProfitSettleTotal = $("input[name='contributionProfitSettleTotal']"); if(contributionProfitFormerSettleTotal && contributionProfit){ - contributionProfitSettleTotal.val(f2(parseFloat(contributionProfitFormerSettleTotal)+parseFloat(contributionProfit))); + contributionProfitSettleTotal.val(f2Fixed(f2(contributionProfitFormerSettleTotal)+f2(contributionProfit))); }else { contributionProfitSettleTotal.val(""); } @@ -605,7 +627,7 @@ function calContributionProfitProfitMargin() { var contributionProfitProfitMargin = $("input[name='contributionProfitProfitMargin']"); if(contributionProfitSettleTotal && incomeSettleTotal){ - contributionProfitProfitMargin.val(f2(100*(parseFloat(contributionProfitSettleTotal)/parseFloat(incomeSettleTotal)))); + contributionProfitProfitMargin.val(f2Fixed(100*(f2(contributionProfitSettleTotal)/f2(incomeSettleTotal)))); }else { contributionProfitProfitMargin.val(""); } @@ -621,7 +643,7 @@ function calNetProfit() { var netProfit = $("input[name='netProfit']"); if(contributionProfit && costIncomeTax){ - netProfit.val(f2(parseFloat(contributionProfit)-parseFloat(costIncomeTax))); + netProfit.val(f2Fixed(f2(contributionProfit)-f2(costIncomeTax))); }else { netProfit.val(""); } @@ -637,7 +659,7 @@ function calNetProfitSettleTotal() { var netProfitSettleTotal = $("input[name='netProfitSettleTotal']"); if(netProfitFormerSettleTotal && netProfit){ - netProfitSettleTotal.val(f2(parseFloat(netProfitFormerSettleTotal)+parseFloat(netProfit))); + netProfitSettleTotal.val(f2Fixed(f2(netProfitFormerSettleTotal)+f2(netProfit))); }else { netProfitSettleTotal.val(""); } @@ -653,7 +675,7 @@ function calNetProfitProfitMargin() { var netProfitProfitMargin = $("input[name='netProfitProfitMargin']"); if(netProfitSettleTotal && incomeSettleTotal){ - netProfitProfitMargin.val(f2(100*(parseFloat(netProfitSettleTotal)/parseFloat(incomeSettleTotal)))); + netProfitProfitMargin.val(f2Fixed(100*(f2(netProfitSettleTotal)/f2(incomeSettleTotal)))); }else { netProfitProfitMargin.val(""); } @@ -669,7 +691,7 @@ function calSaleIncomeCashSettle() { var saleIncomeCashSettle = $("input[name='saleIncomeCashSettle']"); if(saleIncomeCashFormerSettle && saleIncomeCash){ - saleIncomeCashSettle.val(f2(parseFloat(saleIncomeCashFormerSettle)+parseFloat(saleIncomeCash))); + saleIncomeCashSettle.val(f2Fixed(f2(saleIncomeCashFormerSettle)+f2(saleIncomeCash))); }else { saleIncomeCashSettle.val(""); } @@ -685,7 +707,7 @@ function calTaxReturnSettle() { var taxReturnSettle = $("input[name='taxReturnSettle']"); if(taxReturnFormerSettle && taxReturn){ - taxReturnSettle.val(f2(parseFloat(taxReturnFormerSettle)+parseFloat(taxReturn))); + taxReturnSettle.val(f2Fixed(f2(taxReturnFormerSettle)+f2(taxReturn))); }else { taxReturnSettle.val(""); } @@ -701,7 +723,7 @@ function calEarnestMoneyIncomeSettle() { var earnestMoneyIncomeSettle = $("input[name='earnestMoneyIncomeSettle']"); if(earnestMoneyIncomeFormerSettle && earnestMoneyIncome){ - earnestMoneyIncomeSettle.val(f2(parseFloat(earnestMoneyIncomeFormerSettle)+parseFloat(earnestMoneyIncome))); + earnestMoneyIncomeSettle.val(f2Fixed(f2(earnestMoneyIncomeFormerSettle)+f2(earnestMoneyIncome))); }else { earnestMoneyIncomeSettle.val(""); } @@ -717,7 +739,7 @@ function calPurchaseCostSettle() { var purchaseCostSettle = $("input[name='purchaseCostSettle']"); if(purchaseCostFormerSettle && purchaseCost){ - purchaseCostSettle.val(f2(parseFloat(purchaseCostFormerSettle)+parseFloat(purchaseCost))); + purchaseCostSettle.val(f2Fixed(f2(purchaseCostFormerSettle)+f2(purchaseCost))); }else { purchaseCostSettle.val(""); } @@ -733,7 +755,7 @@ function calTaxCostSettle() { var taxCostSettle = $("input[name='taxCostSettle']"); if(taxCostFormerSettle && taxCost){ - taxCostSettle.val(f2(parseFloat(taxCostFormerSettle)+parseFloat(taxCost))); + taxCostSettle.val(f2Fixed(f2(taxCostFormerSettle)+f2(taxCost))); }else { taxCostSettle.val(""); } @@ -750,7 +772,7 @@ function calEarnestMoneyCostSettle() { var earnestMoneyCostSettle = $("input[name='earnestMoneyCostSettle']"); if(earnestMoneyCostFormerSettle && earnestMoneyCost){ - earnestMoneyCostSettle.val(f2(parseFloat(earnestMoneyCostFormerSettle)+parseFloat(earnestMoneyCost))); + earnestMoneyCostSettle.val(f2Fixed(f2(earnestMoneyCostFormerSettle)+f2(earnestMoneyCost))); }else { earnestMoneyCostSettle.val(""); } @@ -766,7 +788,7 @@ function calNetCashFlowSettle() { var netCashFlowSettle = $("input[name='netCashFlowSettle']"); if(netCashFlowFormerSettle && netCashFlow){ - netCashFlowSettle.val(f2(parseFloat(netCashFlowFormerSettle)+parseFloat(netCashFlow))); + netCashFlowSettle.val(f2Fixed(f2(netCashFlowFormerSettle)+f2(netCashFlow))); }else { netCashFlowSettle.val(""); } @@ -782,7 +804,7 @@ function calCashInflowFromInvestingActivitiesSettle() { var cashInflowFromInvestingActivitiesSettle = $("input[name='cashInflowFromInvestingActivitiesSettle']"); if(cashInflowFromInvestingActivitiesFormerSettle && cashInflowFromInvestingActivities){ - cashInflowFromInvestingActivitiesSettle.val(f2(parseFloat(cashInflowFromInvestingActivitiesFormerSettle)+parseFloat(cashInflowFromInvestingActivities))); + cashInflowFromInvestingActivitiesSettle.val(f2Fixed(f2(cashInflowFromInvestingActivitiesFormerSettle)+f2(cashInflowFromInvestingActivities))); }else { cashInflowFromInvestingActivitiesSettle.val(""); } @@ -798,7 +820,7 @@ function calCashOutflowFromInvestingActivitiesSettle() { var cashOutflowFromInvestingActivitiesSettle = $("input[name='cashOutflowFromInvestingActivitiesSettle']"); if(cashOutflowFromInvestingActivitiesFormerSettle && cashOutflowFromInvestingActivities){ - cashOutflowFromInvestingActivitiesSettle.val(f2(parseFloat(cashOutflowFromInvestingActivitiesFormerSettle)+parseFloat(cashOutflowFromInvestingActivities))); + cashOutflowFromInvestingActivitiesSettle.val(f2Fixed(f2(cashOutflowFromInvestingActivitiesFormerSettle)+f2(cashOutflowFromInvestingActivities))); }else { cashOutflowFromInvestingActivitiesSettle.val(""); } @@ -814,7 +836,7 @@ function calNetCashFromInvestingActivitiesSettle() { var netCashFromInvestingActivitiesSettle = $("input[name='netCashFromInvestingActivitiesSettle']"); if(netCashFromInvestingActivitiesFormerSettle && netCashFromInvestingActivities){ - netCashFromInvestingActivitiesSettle.val(f2(parseFloat(netCashFromInvestingActivitiesFormerSettle)+parseFloat(netCashFromInvestingActivities))); + netCashFromInvestingActivitiesSettle.val(f2Fixed(f2(netCashFromInvestingActivitiesFormerSettle)+f2(netCashFromInvestingActivities))); }else { netCashFromInvestingActivitiesSettle.val(""); } @@ -830,7 +852,7 @@ function calFinancingCapitalInflowSettle() { var financingCapitalInflowSettle = $("input[name='financingCapitalInflowSettle']"); if(financingCapitalInflowFormerSettle && financingCapitalInflow){ - financingCapitalInflowSettle.val(f2(parseFloat(financingCapitalInflowFormerSettle)+parseFloat(financingCapitalInflow))); + financingCapitalInflowSettle.val(f2Fixed(f2(financingCapitalInflowFormerSettle)+f2(financingCapitalInflow))); }else { financingCapitalInflowSettle.val(""); } @@ -846,7 +868,7 @@ function calFinancingCapitalOutflowSettle() { var financingCapitalOutflowSettle = $("input[name='financingCapitalOutflowSettle']"); if(financingCapitalOutflowFormerSettle && financingCapitalOutflow){ - financingCapitalOutflowSettle.val(f2(parseFloat(financingCapitalOutflowFormerSettle)+parseFloat(financingCapitalOutflow))); + financingCapitalOutflowSettle.val(f2Fixed(f2(financingCapitalOutflowFormerSettle)+f2(financingCapitalOutflow))); }else { financingCapitalOutflowSettle.val(""); } @@ -862,7 +884,7 @@ function calFinancingCapitalCashflowSettle() { var financingCapitalCashflowSettle = $("input[name='financingCapitalCashflowSettle']"); if(financingCapitalCashflowFormerSettle && financingCapitalCashflow){ - financingCapitalCashflowSettle.val(f2(parseFloat(financingCapitalCashflowFormerSettle)+parseFloat(financingCapitalCashflow))); + financingCapitalCashflowSettle.val(f2Fixed(f2(financingCapitalCashflowFormerSettle)+f2(financingCapitalCashflow))); }else { financingCapitalCashflowSettle.val(""); } @@ -878,7 +900,7 @@ function calNetIncreaseMonetaryFundsSettle() { var netIncreaseMonetaryFundsSettle = $("input[name='netIncreaseMonetaryFundsSettle']"); if(netIncreaseMonetaryFundsFormerSettle && netIncreaseMonetaryFunds){ - netIncreaseMonetaryFundsSettle.val(f2(parseFloat(netIncreaseMonetaryFundsFormerSettle)+parseFloat(netIncreaseMonetaryFunds))); + netIncreaseMonetaryFundsSettle.val(f2Fixed(f2(netIncreaseMonetaryFundsFormerSettle)+f2(netIncreaseMonetaryFunds))); }else { netIncreaseMonetaryFundsSettle.val(""); } @@ -899,8 +921,8 @@ function calNetCashFlow() { if(saleIncomeCash && taxReturn && earnestMoneyIncome && purchaseCost && taxCost && earnestMoneyCost) { - netCashFlow.val(f2(parseFloat(saleIncomeCash)+parseFloat(taxReturn)+parseFloat(earnestMoneyIncome)- - parseFloat(purchaseCost)-parseFloat(taxCost)-parseFloat(earnestMoneyCost))); + netCashFlow.val(f2Fixed(f2(saleIncomeCash)+f2(taxReturn)+f2(earnestMoneyIncome)- + f2(purchaseCost)-f2(taxCost)-f2(earnestMoneyCost))); }else { netCashFlow.val(""); } @@ -916,7 +938,7 @@ function calNetCashFromInvestingActivities() { var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']"); if(cashInflowFromInvestingActivities && cashOutflowFromInvestingActivities){ - netCashFromInvestingActivities.val(f2(parseFloat(cashInflowFromInvestingActivities)-parseFloat(cashOutflowFromInvestingActivities))); + netCashFromInvestingActivities.val(f2Fixed(f2(cashInflowFromInvestingActivities)-f2(cashOutflowFromInvestingActivities))); }else { netCashFromInvestingActivities.val(""); } @@ -932,7 +954,7 @@ function calFinancingCapitalCashflow() { var financingCapitalCashflow = $("input[name='financingCapitalCashflow']"); if(financingCapitalInflow && financingCapitalOutflow){ - financingCapitalCashflow.val(f2(parseFloat(financingCapitalInflow)-parseFloat(financingCapitalOutflow))); + financingCapitalCashflow.val(f2Fixed(f2(financingCapitalInflow)-f2(financingCapitalOutflow))); }else { financingCapitalCashflow.val(""); } @@ -949,23 +971,12 @@ function calNetIncreaseMonetaryFunds() { var netIncreaseMonetaryFunds = $("input[name='netIncreaseMonetaryFunds']"); if(netCashFlow && netCashFromInvestingActivities && financingCapitalCashflow){ - netIncreaseMonetaryFunds.val(f2(parseFloat(netCashFlow)+parseFloat(netCashFromInvestingActivities)+parseFloat(financingCapitalCashflow))); + netIncreaseMonetaryFunds.val(f2Fixed(f2(netCashFlow)+f2(netCashFromInvestingActivities)+f2(financingCapitalCashflow))); }else { netIncreaseMonetaryFunds.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/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl index e82c6b6..56c91e9 100644 --- a/src/main/resources/templates/admin/project_approve.ftl +++ b/src/main/resources/templates/admin/project_approve.ftl @@ -283,26 +283,26 @@ 收入 设备类 - - + + 收入 工程类 - - + + 收入 服务类 - - + + 合计 - - + + @@ -320,50 +320,50 @@ 成本 采购成本 设备 - - + + 成本 采购成本 施工 - - + + 成本 采购成本 服务 - - + + 成本 采购成本 其他 - - + + 成本 项目管理成本 项目管理成本 - - + + 成本 其他 ${project.otherName!} - - + + 合计 - - + + @@ -378,12 +378,12 @@ 财务费用 资金占用成本 - + 公司管理费用 - + @@ -397,19 +397,19 @@ 项目毛利(元) - + 项目毛利率(%) - + 项目贡献利润(元) - + 项目贡献利润率(%) - + @@ -444,26 +444,26 @@ 收入 设备类 - - + + 收入 工程类 - - + + 收入 服务类 - - + + 合计 - - + + @@ -483,50 +483,50 @@ 成本 采购成本 设备 - - + + 成本 采购成本 施工 - - + + 成本 采购成本 服务 - - + + 成本 采购成本 其他 - - + + 成本 项目管理成本 项目管理成本 - - + + 成本 其他 ${project.otherName!} - - + + 合计 - - + + @@ -542,12 +542,12 @@ 财务费用 资金占用成本 - + 公司管理费用 - + @@ -561,19 +561,19 @@ 项目毛利(元) - + 项目毛利率(%) - + 项目贡献利润(元) - + 项目贡献利润率(%) - + @@ -588,7 +588,7 @@ 销售商品、提供劳务收到的现金 - + 收到的税费返还 @@ -596,11 +596,11 @@ 收到其他与经营活动有关的现金 - + 购买商品、接受劳务支付的现金 - + 支付的各项税费 @@ -608,11 +608,11 @@ 支付其他与经营活动有关的现金 - + 经营活动产生的现金流量净额 - + 投资活动现金流入 @@ -628,19 +628,19 @@ 融资资金流入 - + 还款资金流出 - + 筹资活动产生的现金流量净额 - + 货币资金净增加额 - + @@ -684,38 +684,38 @@ 收入 设备类 - - - - - + + + + + 收入 工程类 - - - - - + + + + + 收入 服务类 - - - - - + + + + + 合计 - - - - - + + + + + @@ -736,71 +736,71 @@ 成本 采购成本 设备 - - - - - + + + + + 成本 采购成本 施工 - - - - - + + + + + 成本 采购成本 服务 - - - - - + + + + + 成本 采购成本 其他 - - - - - + + + + + 成本 项目管理成本 项目管理成本 - - - - - + + + + + 成本 其他 ${project.otherName!} - - - - - + + + + + 合计 - - - - - + + + + + @@ -819,38 +819,38 @@ 财务费用 资金占用成本 - - - - - + + + + + 公司管理费用 - - - - - + + + + + 所得税费用 / / - - - + + + 合计 - - - - - + + + + + @@ -869,30 +869,30 @@ 项目毛利 - - - - - - + + + + + + 项目贡献利润 - - - - - - + + + + + + 项目净利润 / - /<#----> - - - - + /<#----> + + + + @@ -909,109 +909,109 @@ 销售商品、提供劳务收到的现金 - - - - + + + + 收到的税费返还 / - - - + + + 收到其他与经营活动有关的现金 - - - - + + + + 购买商品、接受劳务支付的现金 - - - - + + + + 支付的各项税费 / - - - + + + 支付其他与经营活动有关的现金 - - - - + + + + 经营活动产生的现金流量净额 - - - - + + + + 投资活动现金流入 / - - - + + + 投资活动现金流出 / - - - + + + 投资活动产生的现金流量净额 / - - - + + + 融资资金流入 - - - - + + + + 还款资金流出 - - - - + + + + 筹资活动产生的现金流量净额 - - - - + + + + 货币资金净增加额 - - - - + + + + <#-- 合计 - - - - + + + --> @@ -1046,34 +1046,34 @@ 收入 设备类 - - - - + + + + 收入 工程类 - - - - + + + + 收入 服务类 - - - - + + + + 合计 - - - - + + + + @@ -1093,64 +1093,64 @@ 成本 采购成本 设备 - - - - + + + + 成本 采购成本 施工 - - - - + + + + 成本 采购成本 服务 - - - - + + + + 成本 采购成本 其他 - - - - + + + + 成本 项目管理成本 项目管理成本 - - - - + + + + 成本 其他 ${project.otherName!} - - - - + + + + 合计 - - - - + + + + @@ -1168,34 +1168,34 @@ 财务费用 资金占用成本 - - - - + + + + 公司管理费用 - - - - + + + + 所得税费用 / / - - + + 合计 - - - - + + + + @@ -1213,27 +1213,27 @@ 项目毛利 - - - - - + + + + + 项目贡献利润 - - - - - + + + + + 项目净利润 / - <#---->/ - - - + <#---->/ + + + @@ -1249,93 +1249,93 @@ 销售商品、提供劳务收到的现金 - - - + + + 收到的税费返还 / - - + + 收到其他与经营活动有关的现金 - - - + + + 购买商品、接受劳务支付的现金 - - - + + + 支付的各项税费 / - - + + 支付其他与经营活动有关的现金 - - - + + + 经营活动产生的现金流量净额 - - - + + + 投资活动现金流入 / - - + + 投资活动现金流出 / - - + + 投资活动产生的现金流量净额 / - - + + 融资资金流入 - - - + + + 还款资金流出 - - - + + + 筹资活动产生的现金流量净额 - - - + + + 货币资金净增加额 - - - + + + <#-- 合计 - - - + + + --> @@ -1424,13 +1424,13 @@ - - - - - - - - <#---->${projectBudgetPlanDetailTotal.month} - - - - - - - - - - - - @@ -1742,49 +1742,49 @@ <#---->${projectBudgetPlanDetail.month!} - - - - - - - - - - - - diff --git a/src/main/resources/templates/admin/project_final_add.ftl b/src/main/resources/templates/admin/project_final_add.ftl index 8e38f46..92caaa4 100644 --- a/src/main/resources/templates/admin/project_final_add.ftl +++ b/src/main/resources/templates/admin/project_final_add.ftl @@ -48,34 +48,34 @@ 收入 设备类 - - - - + + + + 收入 工程类 - - - - + + + + 收入 服务类 - - - - + + + + 合计 - - - - + + + + @@ -95,65 +95,65 @@ 成本 采购成本 设备 - - - - + + + + 成本 采购成本 施工 - - - - + + + + 成本 采购成本 服务 - - - - + + + + 成本 采购成本 其他 - - - - + + + + 成本 项目管理成本 项目管理成本 - - - - + + + + 成本 其他 - - - - + + + + 合计 - - - - + + + + @@ -171,34 +171,34 @@ 财务费用 资金占用成本 - - - - + + + + 公司管理费用 - - - - + + + + 所得税费用 / / - - + + 合计 - - - - + + + + @@ -216,27 +216,27 @@ 项目毛利 - - - - - + + + + + 项目贡献利润 - - - - - + + + + + 项目净利润 / - - - - + + + + @@ -252,93 +252,93 @@ 销售商品、提供劳务收到的现金 - - - + + + 收到的税费返还 / - - + + 收到其他与经营活动有关的现金 - - - + + + 购买商品、接受劳务支付的现金 - - - + + + 支付的各项税费 / - - + + 支付其他与经营活动有关的现金 - - - + + + 经营活动产生的现金流量净额 - - - + + + 投资活动现金流入 / - - + + 投资活动现金流出 / - - + + 投资活动产生的现金流量净额 / - - + + 融资资金流入 - - - + + + 还款资金流出 - - - + + + 筹资活动产生的现金流量净额 - - - + + + 货币资金净增加额 - - - + + + <#-- 合计 - - - + + + --> diff --git a/src/main/resources/templates/admin/project_final_edit.ftl b/src/main/resources/templates/admin/project_final_edit.ftl index 3228136..1ddf0ca 100644 --- a/src/main/resources/templates/admin/project_final_edit.ftl +++ b/src/main/resources/templates/admin/project_final_edit.ftl @@ -48,34 +48,34 @@ 收入 设备类 - - - - + + + + 收入 工程类 - - - - + + + + 收入 服务类 - - - - + + + + 合计 - - - - + + + + @@ -95,65 +95,65 @@ 成本 采购成本 设备 - - - - + + + + 成本 采购成本 施工 - - - - + + + + 成本 采购成本 服务 - - - - + + + + 成本 采购成本 其他 - - - - + + + + 成本 项目管理成本 项目管理成本 - - - - + + + + 成本 其他 - - - - + + + + 合计 - - - - + + + + @@ -171,34 +171,34 @@ 财务费用 资金占用成本 - - - - + + + + 公司管理费用 - - - - + + + + 所得税费用 / / - - + + 合计 - - - - + + + + @@ -216,27 +216,27 @@ 项目毛利 - - - - - + + + + + 项目贡献利润 - - - - - + + + + + 项目净利润 / - /<#----> - - - + /<#----> + + + @@ -252,93 +252,93 @@ 销售商品、提供劳务收到的现金 - - - + + + 收到的税费返还 / - - + + 收到其他与经营活动有关的现金 - - - + + + 购买商品、接受劳务支付的现金 - - - + + + 支付的各项税费 / - - + + 支付其他与经营活动有关的现金 - - - + + + 经营活动产生的现金流量净额 - - - + + + 投资活动现金流入 / - - + + 投资活动现金流出 / - - + + 投资活动产生的现金流量净额 / - - + + 融资资金流入 - - - + + + 还款资金流出 - - - + + + 筹资活动产生的现金流量净额 - - - + + + 货币资金净增加额 - - - + + + <#-- 合计 - - - + + + --> diff --git a/src/main/resources/templates/admin/project_settle_add.ftl b/src/main/resources/templates/admin/project_settle_add.ftl index be6601d..39c3611 100644 --- a/src/main/resources/templates/admin/project_settle_add.ftl +++ b/src/main/resources/templates/admin/project_settle_add.ftl @@ -60,38 +60,38 @@ 收入 设备类 - - - - - + + + + + 收入 工程类 - - - - - + + + + + 收入 服务类 - - - - - + + + + + 合计 - - - - - + + + + + @@ -112,74 +112,74 @@ 成本 采购成本 设备 - - - - - + + + + + 成本 采购成本 施工 - - - - - + + + + + 成本 采购成本 服务 - - - - - + + + + + 成本 采购成本 其他 - - - - - + + + + + 成本 项目管理成本 项目管理成本 - - - - + + + + 人力成本:${Utils.format(salary,'0')} 元 - + 成本 其他 - - - - - + + + + + 合计 - - - - - + + + + + @@ -198,38 +198,38 @@ 财务费用 资金占用成本 - - - - - + + + + + 公司管理费用 - - - - - + + + + + 所得税费用 / / - - - + + + 合计 - - - - - + + + + + @@ -248,30 +248,30 @@ 项目毛利 - - - - - - + + + + + + 项目贡献利润 - - - - - - + + + + + + 项目净利润 / / - - - - + + + + @@ -288,101 +288,101 @@ 销售商品、提供劳务收到的现金 - - - - + + + + 收到的税费返还 / - - - + + + 收到其他与经营活动有关的现金 - - - - + + + + 购买商品、接受劳务支付的现金 - - - - + + + + 支付的各项税费 / - - - + + + 支付其他与经营活动有关的现金 - - - - + + + + 经营活动产生的现金流量净额 - - - - + + + + 投资活动现金流入 / - - - + + + 投资活动现金流出 / - - - + + + 投资活动产生的现金流量净额 / - - - + + + 融资资金流入 - - - - + + + + 还款资金流出 - - - - + + + + 筹资活动产生的现金流量净额 - - - - + + + + 货币资金净增加额 - - - - + + + + diff --git a/src/main/resources/templates/admin/project_settle_edit.ftl b/src/main/resources/templates/admin/project_settle_edit.ftl index 1c639b2..c305e76 100644 --- a/src/main/resources/templates/admin/project_settle_edit.ftl +++ b/src/main/resources/templates/admin/project_settle_edit.ftl @@ -59,38 +59,38 @@ 收入 设备类 - - - - - + + + + + 收入 工程类 - - - - - + + + + + 收入 服务类 - - - - - + + + + + 合计 - - - - - + + + + + @@ -111,73 +111,73 @@ 成本 采购成本 设备 - - - - - + + + + + 成本 采购成本 施工 - - - - - + + + + + 成本 采购成本 服务 - - - - - + + + + + 成本 采购成本 其他 - - - - - + + + + + 成本 项目管理成本 项目管理成本 - - - - + + + + 人力成本:${Utils.format(salary,'0')} 元 - + 成本 其他 - - - - - + + + + + 合计 - - - - - + + + + + @@ -196,38 +196,38 @@ 财务费用 资金占用成本 - - - - - + + + + + 公司管理费用 - - - - - + + + + + 所得税费用 / / - - - + + + 合计 - - - - - + + + + + @@ -246,30 +246,30 @@ 项目毛利 - - - - - - value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目毛利利润率"> + + + + + + value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目毛利利润率"> 项目贡献利润 - - - - - - value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目贡献利润利润率"> + + + + + + value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目贡献利润利润率"> 项目净利润 / / - - - - value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目净利润利润率"> + + + + value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目净利润利润率"> @@ -286,101 +286,101 @@ 销售商品、提供劳务收到的现金 - - - - + + + + 收到的税费返还 / - - - + + + 收到其他与经营活动有关的现金 - - - - + + + + 购买商品、接受劳务支付的现金 - - - - + + + + 支付的各项税费 / - - - + + + 支付其他与经营活动有关的现金 - - - - + + + + 经营活动产生的现金流量净额 - - - - + + + + 投资活动现金流入 / - - - + + + 投资活动现金流出 / - - - + + + 投资活动产生的现金流量净额 / - - - + + + 融资资金流入 - - - - + + + + 还款资金流出 - - - - + + + + 筹资活动产生的现金流量净额 - - - - + + + + 货币资金净增加额 - - - - + + + + From cc13161a0130a00888e1489c1c32295f37a420f4 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Thu, 6 Jan 2022 14:11:26 +0800 Subject: [PATCH 02/35] =?UTF-8?q?=E9=A2=84=E7=AE=97=E5=88=86=E9=9A=94?= =?UTF-8?q?=E7=AC=A6=E7=94=9F=E6=88=90=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/assets/js/project_budget.js | 7 +- .../static/assets/js/project_budget_cost.js | 24 +- .../js/project_budget_cost_project_manage.js | 32 +-- .../static/assets/js/project_budget_income.js | 22 +- .../static/assets/js/project_budget_plan.js | 48 ++-- .../templates/admin/project_budget_edit.ftl | 218 +++++++++--------- 6 files changed, 178 insertions(+), 173 deletions(-) diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index 2068b26..b5bdf15 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -309,7 +309,12 @@ function arr2ObjectVerify(line, arr, detailPropertyArr, detailProperty) { layuiAlert("第 " + (line + 1) + " 行的 " + o[1] + " 不允许为空"); return null; } - obj[detailPropertyArr[i]] = arr[i]; + //如果要求是数字类型的,进行转换 + var v = arr[i]; + if(o[2] === 'number' ){ + v = f2(v); + } + obj[detailPropertyArr[i]]=v; } return obj; } 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 27fb2f7..c35890e 100644 --- a/src/main/resources/static/assets/js/project_budget_cost.js +++ b/src/main/resources/static/assets/js/project_budget_cost.js @@ -3,15 +3,15 @@ */ //COST_DETAIL_ARR=["type","category","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"]; COST_DETAIL={ - "type":[true,"大类"], - "category":[true,"类别"], - "name":[true,"名称"], - "unit":[true,"单位"], - "amount":[true,"数量"], - "price":[true,"单价"], - "taxRate":[true,"税率"], - "totalTaxInclude":[true,"含税总金额"], - "totalTaxExclude":[true,"不含税金额"] + "type":[true,"大类","string"], + "category":[true,"类别","string"], + "name":[true,"名称","string"], + "unit":[true,"单位","string"], + "amount":[true,"数量","string"], + "price":[true,"单价","number"], + "taxRate":[true,"税率","number"], + "totalTaxInclude":[true,"含税总金额","number"], + "totalTaxExclude":[true,"不含税金额","number"] }; /* [ @@ -187,9 +187,9 @@ function appendTrCost() { ''+ ''+ ''+ - ''+ - ''+ - ''+ + ''+ + ''+ + ''+ ''+ ''+ ''+ 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 89cd281..cd10199 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 @@ -3,18 +3,18 @@ */ //COST_PROJECT_MANAGE_DETAIL_ARR=["type","name","detail","unit","amount","price","total","predictMethod","predictWhy","remark","deletable"]; COST_PROJECT_MANAGE_DETAIL={ - "type":[true,"财务费用类别"], - "name1":[false,"业务项目"], - "name2":[false,"业务项目"], - "detail":[true,"项目明细"], - "unit":[true,"单位"], - "amount":[true,"数量"], - "price":[true,"单价"], - "total":[true,"总金额"], - "predictMethod":[false,"预估计算方法"], - "predictWhy":[false,"预估依据"], - "remark":[false,"备注"], - "deletable":[true,"是否可删除"] + "type":[true,"财务费用类别","string"], + "name1":[false,"业务项目","string"], + "name2":[false,"业务项目","string"], + "detail":[true,"项目明细","string"], + "unit":[true,"单位","string"], + "amount":[true,"数量","string"], + "price":[true,"单价","number"], + "total":[true,"总金额","number"], + "predictMethod":[false,"预估计算方法","string"], + "predictWhy":[false,"预估依据","string"], + "remark":[false,"备注","string"], + "deletable":[true,"是否可删除","string"] }; SELECT_TYPE_CATEGORY_MAP_DATA_MANAGER={}; @@ -118,8 +118,8 @@ function appendTrCostProjectManage() { ' \n' + ' \n' + ' \n' + - ' \n' + - ' \n' + + ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + @@ -226,7 +226,7 @@ function bindChangeableInputProjectManage() { //找到对应的单价 var price = f2($(this).parent().parent().find(".input-changeable-price-project-manage").val()); - $(this).parent().parent().find(".input-changeable-total-project-manage").val(f2(amount*price)); + $(this).parent().parent().find(".input-changeable-total-project-manage").val(f2Fixed(amount*price)); }); //单价改变 $(".input-changeable-price-project-manage").change(function () { @@ -234,7 +234,7 @@ function bindChangeableInputProjectManage() { //找到对应的数量 var amount = parseInt($(this).parent().parent().find(".input-changeable-amount-project-manage").val()); - $(this).parent().parent().find(".input-changeable-total-project-manage").val(f2(amount*price)); + $(this).parent().parent().find(".input-changeable-total-project-manage").val(f2Fixed(amount*price)); }); } /** 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 c7cda2f..fb01c41 100644 --- a/src/main/resources/static/assets/js/project_budget_income.js +++ b/src/main/resources/static/assets/js/project_budget_income.js @@ -3,14 +3,14 @@ */ //INCOME_DETAIL_ARR=["type","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"]; INCOME_DETAIL={ - "type":[true,"类别"], - "name":[true,"名称"], - "unit":[true,"单位"], - "amount":[true,"数量"], - "price":[true,"单价"], - "taxRate":[true,"税率"], - "totalTaxInclude":[true,"含税总金额"], - "totalTaxExclude":[true,"不含税金额"] + "type":[true,"类别","string"], + "name":[true,"名称","string"], + "unit":[true,"单位","string"], + "amount":[true,"数量","string"], + "price":[true,"单价","number"], + "taxRate":[true,"税率","number"], + "totalTaxInclude":[true,"含税总金额","number"], + "totalTaxExclude":[true,"不含税金额","number"] }; /*$(function () { @@ -136,9 +136,9 @@ function appendTrIncome() { ' \n' + ' \n' + ' \n' + - ' \n' + - ' \n' + - ' \n' + + ' \n' + + ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + 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 0270cbe..206edd7 100644 --- a/src/main/resources/static/assets/js/project_budget_plan.js +++ b/src/main/resources/static/assets/js/project_budget_plan.js @@ -4,18 +4,18 @@ BUDGET_PLAN_DETAIL_ARR=["month","deviceCost","engineerCost","projectManageCost","earnestMoneyCost","totalCost","saleIncome","earnestMoneyIncome","totalIncome","fundBalance","capitalInterest","underwrittenPlan","repaymentPlan"]; BUDGET_PLAN_DETAIL={ "month":[true,"月份"], - "deviceCost":[true,"设备支出"], - "engineerCost":[true,"工程支出"], - "projectManageCost":[true,"经营性开支"], - "earnestMoneyCost":[true,"保证金支出"], - "totalCost":[true,"支出合计"], - "saleIncome":[true,"销售收款"], - "earnestMoneyIncome":[true,"保证金收款"], - "totalIncome":[true,"收款合计"], - "fundBalance":[true,"资金余额"], - "capitalInterest":[true,"资金利息"], - "underwrittenPlan":[true,"垫资计划"], - "repaymentPlan":[true,"还款计划"] + "deviceCost":[true,"设备支出","number"], + "engineerCost":[true,"工程支出","number"], + "projectManageCost":[true,"经营性开支","number"], + "earnestMoneyCost":[true,"保证金支出","number"], + "totalCost":[true,"支出合计","number"], + "saleIncome":[true,"销售收款","number"], + "earnestMoneyIncome":[true,"保证金收款","number"], + "totalIncome":[true,"收款合计","number"], + "fundBalance":[true,"资金余额","number"], + "capitalInterest":[true,"资金利息","number"], + "underwrittenPlan":[true,"垫资计划","number"], + "repaymentPlan":[true,"还款计划","number"] }; @@ -189,18 +189,18 @@ function verifyBudgetPlan(){ function appendTrBudgetPlan() { var template = '\n' + ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + ' \n' + ' '; $("#budgetPlanDetailTable").append(template); diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index 8ca94ed..c2e7729 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -228,26 +228,26 @@ 收入 设备类 - - + + 收入 工程类 - - + + 收入 服务类 - - + + 合计 - - + + @@ -265,50 +265,50 @@ 成本 采购成本 设备 - - + + 成本 采购成本 施工 - - + + 成本 采购成本 服务 - - + + 成本 采购成本 其他 - - + + 成本 项目管理成本 项目管理成本 - - + + 成本 其他 ${project.otherName!} - - + + 合计 - - + + @@ -323,12 +323,12 @@ 财务费用 资金占用成本 - + 公司管理费用 - + @@ -342,19 +342,19 @@ 项目毛利(元) - + 项目毛利率(%) - + 项目贡献利润(元) - + 项目贡献利润率(%) - + @@ -391,9 +391,9 @@ - > - - + > + + @@ -458,9 +458,9 @@ - > - - + > + + @@ -526,8 +526,8 @@ - oninput="if(value.length>8)value=value.slice(0,8)"> - + oninput="if(value.length>8)value=value.slice(0,8)"> + @@ -573,34 +573,34 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + @@ -608,18 +608,18 @@ <#list projectBudgetPlanDetails as projectBudgetPlanDetail> - - - - - - - - - - - - + + + + + + + + + + + + @@ -669,26 +669,26 @@ 收入 设备类 - - + + 收入 工程类 - - + + 收入 服务类 - - + + 合计 - - + + @@ -708,51 +708,51 @@ 成本 采购成本 设备 - - + + 成本 采购成本 施工 - - + + 成本 采购成本 服务 - - + + 成本 采购成本 其他 - - + + 成本 项目管理成本 项目管理成本 - - + + 成本 其他 - - + + 合计 - - + + @@ -768,12 +768,12 @@ 财务费用 资金占用成本 - + 公司管理费用 - + @@ -787,19 +787,19 @@ 项目毛利(元) - + 项目毛利率(%) - + 项目贡献利润(元) - + 项目贡献利润率(%) - + @@ -814,7 +814,7 @@ 销售商品、提供劳务收到的现金<#--a--> - + 收到的税费返还<#--b--> @@ -822,11 +822,11 @@ 收到其他与经营活动有关的现金<#--c--> - + 购买商品、接受劳务支付的现金<#--d--> - + 支付的各项税费<#--e--> @@ -834,11 +834,11 @@ 支付其他与经营活动有关的现金<#--f--> - + 经营活动产生的现金流量净额<#--g--> - + 投资活动现金流入<#--h--> @@ -854,19 +854,19 @@ 融资资金流入<#--k--> - + 还款资金流出<#--l--> - + 筹资活动产生的现金流量净额<#--m--> - + 货币资金净增加额<#--n--> - + From 2e53f2f4c6cff35afd804dd2e4facaf42766c3e8 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Fri, 7 Jan 2022 09:57:34 +0800 Subject: [PATCH 03/35] =?UTF-8?q?=E9=A2=84=E7=AE=97=E5=88=86=E9=9A=94?= =?UTF-8?q?=E7=AC=A6=E7=94=9F=E6=88=90=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/assets/js/project_budget.js | 12 +- .../static/assets/js/project_budget_cost.js | 3 +- .../js/project_budget_cost_project_manage.js | 1 + .../static/assets/js/project_common.js | 1 - .../templates/admin/project_budget_edit.ftl | 299 ------------------ 5 files changed, 14 insertions(+), 302 deletions(-) diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index b5bdf15..50a0109 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -53,6 +53,17 @@ BUDGET_PLAN_DETAIL={ }; $(function () { + $("input[name='costCompanyManageTaxExclude']").change(function () { + digitalSelf("costCompanyManageTaxExclude", "input[name='costCompanyManageTaxExclude']"); + }); + $("input[name='costOtherOtherTaxInclude']").change(function () { + console.log("budget.js:costOtherOtherTaxInclude"); + digitalSelf("costOtherOtherTaxInclude", "input[name='costOtherOtherTaxInclude']"); + }); + $("input[name='costOtherOtherTaxExclude']").change(function () { + console.log("budget.js:costOtherOtherTaxExclude"); + digitalSelf("costOtherOtherTaxExclude", "input[name='costOtherOtherTaxExclude']"); + }); //绑定删除按钮删除当前行 bindDeleteBtn(); //绑定收入和采购成本的输入框【都有税率】 @@ -341,7 +352,6 @@ function arr2ObjectVerifyCheck(line, arr, detailPropertyArr, detailProperty, s) function collectData(className) { var a = []; $("." + className).each(function (t) { - console.log("收集:" + className + "," + $(this).val()) a.push($(this).val()); }); return a; 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 c35890e..43bf09c 100644 --- a/src/main/resources/static/assets/js/project_budget_cost.js +++ b/src/main/resources/static/assets/js/project_budget_cost.js @@ -288,7 +288,7 @@ function bindOtherOtherChangeable() { calCostInclude(); updateProjectContributionProfitRate(); - + digitalSelf("costOtherOtherTaxInclude", "input[name='costOtherOtherTaxInclude']"); }); $("input[name='costOtherOtherTaxExclude']").change(function () { @@ -306,6 +306,7 @@ function bindOtherOtherChangeable() { calCostExclude(); updateProjectContributionProfitRate(); + digitalSelf("costOtherOtherTaxExclude", "input[name='costOtherOtherTaxExclude']"); }); } 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 cd10199..971558c 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 @@ -297,6 +297,7 @@ function updateCostProjectManageData(data,returnData) { calCostExclude(); calCostInclude(); + console.log("51"); updateProjectContributionProfitRate(); diff --git a/src/main/resources/static/assets/js/project_common.js b/src/main/resources/static/assets/js/project_common.js index c61cd3c..fdd8dfb 100644 --- a/src/main/resources/static/assets/js/project_common.js +++ b/src/main/resources/static/assets/js/project_common.js @@ -179,7 +179,6 @@ function calCostInclude() { var costProjectManageTaxInclude = inputVal("costProjectManageTaxInclude"); var costOtherOtherTaxInclude = inputVal("costOtherOtherTaxInclude"); - var $costTotalTaxInclude = $("input[name='costTotalTaxInclude']"); $costTotalTaxInclude.val(f2Fixed(f2(costPurchaseDeviceTaxInclude) +f2(costPurchaseBuildTaxInclude) diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index c2e7729..b3f3dbe 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -876,305 +876,6 @@ - - <#--收入明细表弹窗--> - <#--
-
-
新增销售收入明细表——${project.name}×
-
- - - - - - - - - - - - - - - <#if incomeDetails??> - <#list incomeDetails as incomeDetail>+ - - - - - - - - - - - - - - - -
类别名称单位数量单价税率(%)含税总金额(元)不含税金额(元)操作
- -
- -
- -
-
--> - <#--采购成本明细弹窗--> - <#--
-
-
新增采购成本明细表——${project.name}×
-
- - - - - - - - - - - - - - - - <#if costDetails??> - <#list costDetails as costDetail> - - - - - - - - - - - - - - - - -
大类类别名称单位数量单价税率(%)含税总金额(元)不含税金额(元)操作
- - - -
- -
- -
-
--> - <#--项目管理明细表弹窗--> - <#--
-
-
新增项目管理成本明细表——${project.name}×
-
- - - - - - - - - - - - - - - - <#if costProjectManageDetails??> - <#list costProjectManageDetails as costProjectManageDetail> - - - - - - - - - - - - - - - - - -
财务费用类别业务项目项目明细单位数量单价总金额(元)预估计算方法预估依据备注操作
- - - -<#– readonly>–> - - -
- -
- -
-
--> - <#--资金计划明细表弹窗--> - <#--
-
-
新增资金计划明细表——${project.name}×
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <#if projectBudgetPlanDetails??> - <#list projectBudgetPlanDetails as projectBudgetPlanDetail> - - - - - - - - - - - - - - - - - - - - -
月份设备支出工程支出经营性开支保证金支出支出合计销售收款保证金收款收款合计资金余额资金利息垫资计划还款计划操作
- - - - - - - - - - - - - - - - - -
垫资峰值时间垫资峰值金额利率资金利息
- - -
- -
-
--> - - - - - - -
From 5fc40bcb2fa77c26448abc82225598ff81753d75 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Fri, 7 Jan 2022 10:42:32 +0800 Subject: [PATCH 04/35] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=88=86=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 @@
<#--*-->其他产品金额
-
From d0f43cb4a1beb562279babf26be94a7946c7b29a Mon Sep 17 00:00:00 2001 From: OathK1per Date: Fri, 7 Jan 2022 11:23:21 +0800 Subject: [PATCH 05/35] =?UTF-8?q?=E9=A2=84=E7=AE=97=E5=88=86=E9=9A=94?= =?UTF-8?q?=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/assets/js/project_budget.js | 2 ++ .../static/assets/js/project_budget_cost.js | 4 ++-- .../js/project_budget_cost_project_manage.js | 4 ++-- .../static/assets/js/project_budget_income.js | 4 ++-- .../resources/static/assets/js/project_common.js | 14 +++++++------- .../templates/admin/project_budget_edit.ftl | 6 +++--- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index 50a0109..100f592 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -459,6 +459,8 @@ function bindChangeableInput() { $(this).parent().parent().find(".input-changeable-total-tax-include").val(f2Fixed(amount * price)); $(this).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(amount * price / (1 + taxRate / 100))); + $(this).val(f2Fixed(price)); + console.log("单价:" + $(this).val()); }); //税率改变 $(".input-changeable-tax-rate").change(function () { 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 43bf09c..e41d91b 100644 --- a/src/main/resources/static/assets/js/project_budget_cost.js +++ b/src/main/resources/static/assets/js/project_budget_cost.js @@ -187,8 +187,8 @@ function appendTrCost() { ''+ ''+ ''+ - ''+ - ''+ + ''+ + ''+ ''+ ''+ ''+ 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 971558c..cba7f19 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 @@ -118,8 +118,8 @@ function appendTrCostProjectManage() { ' \n' + ' \n' + ' \n' + - ' \n' + - ' \n' + + ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + 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 fb01c41..43b93a7 100644 --- a/src/main/resources/static/assets/js/project_budget_income.js +++ b/src/main/resources/static/assets/js/project_budget_income.js @@ -136,8 +136,8 @@ function appendTrIncome() { ' \n' + ' \n' + ' \n' + - ' \n' + - ' \n' + + ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + diff --git a/src/main/resources/static/assets/js/project_common.js b/src/main/resources/static/assets/js/project_common.js index fdd8dfb..5161d73 100644 --- a/src/main/resources/static/assets/js/project_common.js +++ b/src/main/resources/static/assets/js/project_common.js @@ -70,8 +70,8 @@ function rate(r1,r2) { */ function bindNumberInput() { //所有的数字类型输入框 - var $numberTypeInputs = $("input[type='number']"); - inputKeepDigital($numberTypeInputs); + // var $numberTypeInputs = $("input[type='number']"); + // inputKeepDigital($numberTypeInputs); //所有的number类的输入框 var $numberClassInputs = $("input.number"); @@ -79,10 +79,10 @@ function bindNumberInput() { } function inputKeepDigital($inputs) { - //键盘键弹起的时候 - $inputs.keyup(function () { - keepDigital($(this)); - }); + //键盘键弹起的时候,会在每次输入一位数的时候就格式化,先行去除 + // $inputs.keyup(function () { + // keepDigital($(this)); + // }); //失去焦点时再校验一遍 $inputs.blur(function() { keepDigital($(this)); @@ -106,7 +106,7 @@ function keepDigitalVal(value) { value = parseFloat(value); } - return value; + return f2Fixed(f2(value)); } /** diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index 7043e23..0d02769 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -391,7 +391,7 @@ - > + > @@ -458,7 +458,7 @@ - > + > @@ -526,7 +526,7 @@ - oninput="if(value.length>8)value=value.slice(0,8)"> + oninput="if(value.length>8)value=value.slice(0,8)"> From 57fe59478e37b06d087851b14ac8554156f9685e Mon Sep 17 00:00:00 2001 From: OathK1per Date: Fri, 7 Jan 2022 15:39:27 +0800 Subject: [PATCH 06/35] =?UTF-8?q?=E9=9D=9E=E5=A1=AB=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E4=B8=8D=E9=A2=9D=E5=A4=96=E9=99=90=E5=88=B6=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E5=AD=97=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/admin/project_estimate_edit.ftl | 4 ++-- src/main/resources/templates/admin/project_settle_add.ftl | 8 ++++---- .../resources/templates/admin/project_settle_edit.ftl | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/resources/templates/admin/project_estimate_edit.ftl b/src/main/resources/templates/admin/project_estimate_edit.ftl index 8221384..a1c6dfb 100644 --- a/src/main/resources/templates/admin/project_estimate_edit.ftl +++ b/src/main/resources/templates/admin/project_estimate_edit.ftl @@ -260,8 +260,8 @@ 合计 - - + + / diff --git a/src/main/resources/templates/admin/project_settle_add.ftl b/src/main/resources/templates/admin/project_settle_add.ftl index 39c3611..38c8ef0 100644 --- a/src/main/resources/templates/admin/project_settle_add.ftl +++ b/src/main/resources/templates/admin/project_settle_add.ftl @@ -332,7 +332,7 @@ 经营活动产生的现金流量净额 - + @@ -353,7 +353,7 @@ 投资活动产生的现金流量净额 / - + @@ -374,14 +374,14 @@ 筹资活动产生的现金流量净额 - + 货币资金净增加额 - + diff --git a/src/main/resources/templates/admin/project_settle_edit.ftl b/src/main/resources/templates/admin/project_settle_edit.ftl index c305e76..f78d525 100644 --- a/src/main/resources/templates/admin/project_settle_edit.ftl +++ b/src/main/resources/templates/admin/project_settle_edit.ftl @@ -330,7 +330,7 @@ 经营活动产生的现金流量净额 - + @@ -351,7 +351,7 @@ 投资活动产生的现金流量净额 / - + @@ -372,14 +372,14 @@ 筹资活动产生的现金流量净额 - + 货币资金净增加额 - + From efd4519ed54bcb4b34fddd7f08623cc85d16d4fe Mon Sep 17 00:00:00 2001 From: OathK1per Date: Mon, 10 Jan 2022 15:38:07 +0800 Subject: [PATCH 07/35] =?UTF-8?q?=E5=8D=95=E4=BB=B7=E9=99=90=E5=88=B65?= =?UTF-8?q?=E4=BD=8D=E5=B0=8F=E6=95=B0=EF=BC=8C=E7=BB=93=E7=AE=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=8D=E6=A0=A1=E9=AA=8C=E5=B0=8F=E4=BA=8E0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/assets/js/project_budget.js | 4 +- .../static/assets/js/project_budget_cost.js | 2 +- .../js/project_budget_cost_project_manage.js | 2 +- .../static/assets/js/project_budget_income.js | 2 +- .../static/assets/js/project_common.js | 57 +++++++ .../static/assets/js/project_settle_valid.js | 154 ------------------ .../templates/admin/project_budget_edit.ftl | 6 +- 7 files changed, 65 insertions(+), 162 deletions(-) diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index 100f592..25b46e2 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -451,7 +451,7 @@ function bindChangeableInput() { }); //单价改变 $(".input-changeable-price").change(function () { - var price = f2($(this).val()); + var price = f5($(this).val()); //找到对应的数量和税率 var amount = parseInt($(this).parent().parent().find(".input-changeable-amount").val()); var taxRate = f2($(this).parent().parent().find(".input-changeable-tax-rate").val()); @@ -459,7 +459,7 @@ function bindChangeableInput() { $(this).parent().parent().find(".input-changeable-total-tax-include").val(f2Fixed(amount * price)); $(this).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(amount * price / (1 + taxRate / 100))); - $(this).val(f2Fixed(price)); + $(this).val(f5Price(price)); console.log("单价:" + $(this).val()); }); //税率改变 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 e41d91b..78fed1b 100644 --- a/src/main/resources/static/assets/js/project_budget_cost.js +++ b/src/main/resources/static/assets/js/project_budget_cost.js @@ -188,7 +188,7 @@ function appendTrCost() { ''+ ''+ ''+ - ''+ + ''+ ''+ ''+ ''+ 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 cba7f19..22058b1 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 @@ -119,7 +119,7 @@ function appendTrCostProjectManage() { ' \n' + ' \n' + ' \n' + - ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + 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 43b93a7..9f29d11 100644 --- a/src/main/resources/static/assets/js/project_budget_income.js +++ b/src/main/resources/static/assets/js/project_budget_income.js @@ -137,7 +137,7 @@ function appendTrIncome() { ' \n' + ' \n' + ' \n' + - ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + diff --git a/src/main/resources/static/assets/js/project_common.js b/src/main/resources/static/assets/js/project_common.js index 5161d73..ac9a87a 100644 --- a/src/main/resources/static/assets/js/project_common.js +++ b/src/main/resources/static/assets/js/project_common.js @@ -42,6 +42,34 @@ function f2Fixed(f) { return f; } +/** + * 适配单价 + */ +function f5Price(f) { + //return Number(f).toFixed(2); + //格式化413,423,423.24 + f = Number(f).toLocaleString('en-US',{minimumFractionDigits: 2, maximumFractionDigits: 5, useGrouping: true}); + return f; +} + +/** + * 适配单价 + */ +function f5(x) { + if(!x){ + return 0; + } + if(typeof x === 'string'){ + //这一步因为数字格式化为了包含分隔符,获取的时候就去掉这个分隔符 + x = x.replaceAll(",",""); + } + var f = parseFloat(x); + if (isNaN(f)) { + return 0; + } + return Math.round(f*100000)/100000; +} + function digitalSelf(name, action) { var self = inputVal(name); @@ -76,6 +104,10 @@ function bindNumberInput() { //所有的number类的输入框 var $numberClassInputs = $("input.number"); inputKeepDigital($numberClassInputs); + + //所有的price类的输入框,根据单价要求单独设置 + var $priceClassInputs = $("input.price"); + inputKeepDigitalPrice($priceClassInputs); } function inputKeepDigital($inputs) { @@ -93,6 +125,15 @@ function keepDigital($input) { $input.val(keepDigitalVal($input.val())); } +function inputKeepDigitalPrice($inputs) { + console.log("1"); + + //失去焦点时再校验一遍 + $inputs.blur(function() { + $(this).val(keepDigitalValPrice($(this).val())); + }); +} + /** * 只保留数字 */ @@ -109,6 +150,22 @@ function keepDigitalVal(value) { return f2Fixed(f2(value)); } +/** + * 只保留数字 + */ +function keepDigitalValPrice(value) { + value = value.replace(/[^\-\d.]/g, ""); //清除“-”、“数字”和“.”以外的字符 + value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的 + value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + value = value.replace(/^(\-)?(\d+)\.(\d\d\d\d\d).*$/, '$1$2.$3'); //只能输入两个小数 + if (value.indexOf(".") < 0 && value != "") { + //以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 + value = parseFloat(value); + } + + return f5Price(f5(value)); +} + /** * 保留整数 */ diff --git a/src/main/resources/static/assets/js/project_settle_valid.js b/src/main/resources/static/assets/js/project_settle_valid.js index 63bddfb..096ad17 100644 --- a/src/main/resources/static/assets/js/project_settle_valid.js +++ b/src/main/resources/static/assets/js/project_settle_valid.js @@ -17,13 +17,6 @@ var incomeDeviceValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月收入设备类数据不能小于0"); - }); - return false; - } return true; }; @@ -36,13 +29,6 @@ var incomeEngineerValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月收入工程类数据不能小于0"); - }); - return false; - } return true; }; @@ -55,13 +41,6 @@ var incomeServiceValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月收入服务类数据不能小于0"); - }); - return false; - } return true; }; @@ -87,13 +66,6 @@ var costPurchaseDeviceValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月采购成本设备类数据不能小于0"); - }); - return false; - } return true; }; @@ -106,13 +78,6 @@ var costPurchaseBuildValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月采购成本施工类数据不能小于0"); - }); - return false; - } return true; }; @@ -125,13 +90,6 @@ var costPurchaseServiceValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月采购成本服务类数据不能小于0"); - }); - return false; - } return true; }; @@ -144,13 +102,6 @@ var costPurchaseOtherValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月采购成本其他类数据不能小于0"); - }); - return false; - } return true; }; @@ -164,13 +115,6 @@ var costProjectManageValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月项目管理成本数据不能小于0"); - }); - return false; - } if (parseFloat(salary) > parseFloat(month)) { layui.use('layer', function(){ var layer = layui.layer; @@ -190,13 +134,6 @@ var costOtherValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月其他成本数据不能小于0"); - }); - return false; - } return true; }; @@ -224,13 +161,6 @@ var costExpropriationValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月财务费用数据不能小于0"); - }); - return false; - } if (parseFloat(settle) > parseFloat(budget)) { layui.use('layer', function(){ var layer = layui.layer; @@ -250,13 +180,6 @@ var costCompanyManageValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月公司管理费用数据不能小于0"); - }); - return false; - } return true; }; @@ -269,13 +192,6 @@ var costIncomeTaxValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月所得税费用数据不能小于0"); - }); - return false; - } return true; }; @@ -288,13 +204,6 @@ var saleIncomeCashValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月本月销售商品、提供劳务收到的现金数据不能小于0"); - }); - return false; - } return true; }; @@ -307,13 +216,6 @@ var taxReturnValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月收到的税费返还数据不能小于0"); - }); - return false; - } return true; }; @@ -326,13 +228,6 @@ var earnestMoneyIncomeValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月收到其他与经营活动有关的现金数据不能小于0"); - }); - return false; - } return true; }; @@ -345,13 +240,6 @@ var purchaseCostValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月购买商品、接受劳务支付的现金数据不能小于0"); - }); - return false; - } return true; }; @@ -364,13 +252,6 @@ var taxCostValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月支付的各项税费数据不能小于0"); - }); - return false; - } return true; }; @@ -383,13 +264,6 @@ var earnestMoneyCostValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月支付其他与经营活动有关的现金数据不能小于0"); - }); - return false; - } return true; }; @@ -402,13 +276,6 @@ var cashInflowFromInvestingActivitiesValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月投资活动现金流入数据不能小于0"); - }); - return false; - } return true; }; @@ -421,13 +288,6 @@ var cashOutflowFromInvestingActivitiesValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月投资活动现金流出数据不能小于0"); - }); - return false; - } return true; }; @@ -440,13 +300,6 @@ var financingCapitalInflowValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月融资资金流入数据不能小于0"); - }); - return false; - } return true; }; @@ -459,13 +312,6 @@ var financingCapitalOutflowValid = function() { }); return false; } - if (parseFloat(month) < 0) { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("本月还款资金流出数据不能小于0"); - }); - return false; - } return true; }; diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index 0d02769..b5269b8 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -392,7 +392,7 @@ > - + @@ -459,7 +459,7 @@ > - + @@ -527,7 +527,7 @@ oninput="if(value.length>8)value=value.slice(0,8)"> - + From b102cc214d50b4d58475e1f95a6107a9dcd1ee0f Mon Sep 17 00:00:00 2001 From: OathK1per Date: Mon, 10 Jan 2022 16:14:06 +0800 Subject: [PATCH 08/35] =?UTF-8?q?=E5=8D=95=E4=BB=B7=E9=99=90=E5=88=B65?= =?UTF-8?q?=E4=BD=8D=E5=B0=8F=E6=95=B0=EF=BC=8C=E5=88=86=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/assets/js/project_budget.js | 92 ++++++++++--------- .../static/assets/js/project_budget_cost.js | 2 +- .../js/project_budget_cost_project_manage.js | 2 +- .../static/assets/js/project_budget_income.js | 2 +- .../static/assets/js/project_budget_plan.js | 8 +- 5 files changed, 54 insertions(+), 52 deletions(-) diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index 25b46e2..e9a45ca 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -1,55 +1,55 @@ -INCOME_DETAIL = { - "type": [true, "类别"], - "name": [true, "名称"], - "unit": [true, "单位"], - "amount": [true, "数量"], - "price": [true, "单价"], - "taxRate": [true, "税率"], - "totalTaxInclude": [true, "含税总金额"], - "totalTaxExclude": [true, "不含税金额"] +INCOME_DETAIL={ + "type":[true,"类别","string"], + "name":[true,"名称","string"], + "unit":[true,"单位","string"], + "amount":[true,"数量","string"], + "price":[true,"单价","price"], + "taxRate":[true,"税率","number"], + "totalTaxInclude":[true,"含税总金额","number"], + "totalTaxExclude":[true,"不含税金额","number"] }; COST_DETAIL={ - "type":[true,"大类"], - "category":[true,"类别"], - "name":[true,"名称"], - "unit":[true,"单位"], - "amount":[true,"数量"], - "price":[true,"单价"], - "taxRate":[true,"税率"], - "totalTaxInclude":[true,"含税总金额"], - "totalTaxExclude":[true,"不含税金额"] + "type":[true,"大类","string"], + "category":[true,"类别","string"], + "name":[true,"名称","string"], + "unit":[true,"单位","string"], + "amount":[true,"数量","string"], + "price":[true,"单价","price"], + "taxRate":[true,"税率","number"], + "totalTaxInclude":[true,"含税总金额","number"], + "totalTaxExclude":[true,"不含税金额","number"] }; COST_PROJECT_MANAGE_DETAIL={ - "type":[true,"财务费用类别"], - "name1":[false,"业务项目"], - "name2":[false,"业务项目"], - "detail":[true,"项目明细"], - "unit":[true,"单位"], - "amount":[true,"数量"], - "price":[true,"单价"], - "total":[true,"总金额"], - "predictMethod":[false,"预估计算方法"], - "predictWhy":[false,"预估依据"], - "remark":[false,"备注"], - "deletable":[true,"是否可删除"] + "type":[true,"财务费用类别","string"], + "name1":[false,"业务项目","string"], + "name2":[false,"业务项目","string"], + "detail":[true,"项目明细","string"], + "unit":[true,"单位","string"], + "amount":[true,"数量","string"], + "price":[true,"单价","price"], + "total":[true,"总金额","number"], + "predictMethod":[false,"预估计算方法","string"], + "predictWhy":[false,"预估依据","string"], + "remark":[false,"备注","string"], + "deletable":[true,"是否可删除","string"] }; BUDGET_PLAN_DETAIL={ "month":[true,"月份"], - "deviceCost":[true,"设备支出"], - "engineerCost":[true,"工程支出"], - "projectManageCost":[true,"经营性开支"], - "earnestMoneyCost":[true,"保证金支出"], - "totalCost":[true,"支出合计"], - "saleIncome":[true,"销售收款"], - "earnestMoneyIncome":[true,"保证金收款"], - "totalIncome":[true,"收款合计"], - "fundBalance":[true,"资金余额"], - "capitalInterest":[true,"资金利息"], - "underwrittenPlan":[true,"垫资计划"], - "repaymentPlan":[true,"还款计划"] + "deviceCost":[true,"设备支出","number"], + "engineerCost":[true,"工程支出","number"], + "projectManageCost":[true,"经营性开支","number"], + "earnestMoneyCost":[true,"保证金支出","number"], + "totalCost":[true,"支出合计","number"], + "saleIncome":[true,"销售收款","number"], + "earnestMoneyIncome":[true,"保证金收款","number"], + "totalIncome":[true,"收款合计","number"], + "fundBalance":[true,"资金余额","number"], + "capitalInterest":[true,"资金利息","number"], + "underwrittenPlan":[true,"垫资计划","number"], + "repaymentPlan":[true,"还款计划","number"] }; $(function () { @@ -324,6 +324,8 @@ function arr2ObjectVerify(line, arr, detailPropertyArr, detailProperty) { var v = arr[i]; if(o[2] === 'number' ){ v = f2(v); + } else if(o[2] === 'price' ){ + v = f5(v); } obj[detailPropertyArr[i]]=v; } @@ -506,9 +508,9 @@ function updateProjectContributionProfitRate() { var costCompanyManageTaxExclude = f2(inputVal("costCompanyManageTaxExclude")); var projectGrossProfit = f2Fixed(incomeTotalTaxExclude - costTotalTaxExclude - costExpropriationTaxExclude); - var projectGrossProfitRate = f2Fixed(rate(projectGrossProfit, incomeTotalTaxExclude)); - var projectContributionProfit = f2Fixed(projectGrossProfit - costCompanyManageTaxExclude); - var projectContributionProfitRate = f2Fixed(rate(projectContributionProfit, incomeTotalTaxExclude)); + var projectGrossProfitRate = f2Fixed(rate(f2(projectGrossProfit), incomeTotalTaxExclude)); + var projectContributionProfit = f2Fixed(f2(projectGrossProfit) - costCompanyManageTaxExclude); + var projectContributionProfitRate = f2Fixed(rate(f2(projectContributionProfit), incomeTotalTaxExclude)); $("input[name='projectGrossProfit']").val(projectGrossProfit); $("input[name='projectGrossProfitRate']").val(projectGrossProfitRate); 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 78fed1b..354971d 100644 --- a/src/main/resources/static/assets/js/project_budget_cost.js +++ b/src/main/resources/static/assets/js/project_budget_cost.js @@ -8,7 +8,7 @@ COST_DETAIL={ "name":[true,"名称","string"], "unit":[true,"单位","string"], "amount":[true,"数量","string"], - "price":[true,"单价","number"], + "price":[true,"单价","price"], "taxRate":[true,"税率","number"], "totalTaxInclude":[true,"含税总金额","number"], "totalTaxExclude":[true,"不含税金额","number"] 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 22058b1..e197b85 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 @@ -9,7 +9,7 @@ COST_PROJECT_MANAGE_DETAIL={ "detail":[true,"项目明细","string"], "unit":[true,"单位","string"], "amount":[true,"数量","string"], - "price":[true,"单价","number"], + "price":[true,"单价","price"], "total":[true,"总金额","number"], "predictMethod":[false,"预估计算方法","string"], "predictWhy":[false,"预估依据","string"], 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 9f29d11..be2a664 100644 --- a/src/main/resources/static/assets/js/project_budget_income.js +++ b/src/main/resources/static/assets/js/project_budget_income.js @@ -7,7 +7,7 @@ INCOME_DETAIL={ "name":[true,"名称","string"], "unit":[true,"单位","string"], "amount":[true,"数量","string"], - "price":[true,"单价","number"], + "price":[true,"单价","price"], "taxRate":[true,"税率","number"], "totalTaxInclude":[true,"含税总金额","number"], "totalTaxExclude":[true,"不含税金额","number"] 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 206edd7..c7fce6d 100644 --- a/src/main/resources/static/assets/js/project_budget_plan.js +++ b/src/main/resources/static/assets/js/project_budget_plan.js @@ -722,15 +722,15 @@ function updateCashFlow() { d,f,g,m,m);*/ - $("input[name='saleIncomeCash']").val(f2Fixed(saleIncome)); - $("input[name='earnestMoneyIncome']").val(f2Fixed(earnestMoneyIncome)); + $("input[name='saleIncomeCash']").val(f2Fixed(f2(saleIncome))); + $("input[name='earnestMoneyIncome']").val(f2Fixed(f2(earnestMoneyIncome))); $("input[name='purchaseCost']").val(f2Fixed(d)); $("input[name='earnestMoneyCost']").val(f2Fixed(f)); $("input[name='netCashFlow']").val(f2Fixed(g)); - $("input[name='financingCapitalInflow']").val(f2Fixed(underwrittenPlan)); - $("input[name='financingCapitalOutflow']").val(f2Fixed(repaymentPlan)); + $("input[name='financingCapitalInflow']").val(f2Fixed(f2(underwrittenPlan))); + $("input[name='financingCapitalOutflow']").val(f2Fixed(f2(repaymentPlan))); $("input[name='financingCapitalCashflow']").val(f2Fixed(m)); $("input[name='netIncreaseMonetaryFunds']").val(f2Fixed(n)); From 443d4c80984587bd822b8661e25398a4548172da Mon Sep 17 00:00:00 2001 From: hanbo <2608504783@qq.com> Date: Mon, 10 Jan 2022 16:16:26 +0800 Subject: [PATCH 09/35] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=A2=84=E7=AE=97=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/admin/project_approve.ftl | 383 +++++++++++++++++- 1 file changed, 380 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl index 56c91e9..b1022bf 100644 --- a/src/main/resources/templates/admin/project_approve.ftl +++ b/src/main/resources/templates/admin/project_approve.ftl @@ -428,11 +428,388 @@ <#if (project.status==5 || project.status==10 || project.status==15) && project.approveStatusBudget == 3>
- 收入 - 收入明细表 + + 收入明细表 + + + + + + + + + + + + <#----> + + + <#if incomeDetails??> + <#list incomeDetails as incomeDetail> + + + + + + + + + + <#----> + + + + + +
类别名称单位数量单价税率(%)含税总金额(元)不含税金额(元)操作
+ <#----> + <#if incomeDetail.type ==1 > + 设备类 + <#elseif incomeDetail.type ==2> + 工程类 + <#elseif incomeDetail.type ==3> + 服务类 + + + +
+ 采购成本明细表 + + + + + + + + + + + + + <#----> + + + <#if costDetails??> + <#list costDetails as costDetail> + + + + + + + + + + + + + + + + +
大类类别名称单位数量单价税率(%)含税总金额(元)不含税金额(元)操作
+ <#----> + <#if costDetail.type ==1 > + 设备 + <#elseif costDetail.type ==2> + 施工 + <#elseif costDetail.type ==3> + 服务 + <#elseif costDetail.type ==4> + 其他 + + + <#list procurementTypes as procurementType> + <#if costDetail.category == procurementType.id>${procurementType.name} + + + + + <#-- --> +
+ 项目管理成本表 + + + + + + + + + + + + + + <#----> + + + <#if costProjectManageDetails??> + <#list costProjectManageDetails as costProjectManageDetail> + + + + + + + + + + + + <#----> + + + + + +
财务费用类别业务项目项目明细单位数量单价总金额(元)预估计算方法预估依据备注操作
+ <#----> + <#if costProjectManageDetail.type ==1 > + 人工成本 + <#elseif costProjectManageDetail.type ==2> + 业务费用 + <#elseif costProjectManageDetail.type ==3> + 其他费用 + + readonly-->><#if costProjectManageDetail.deletable==1> + + +
+ 资金计划表 + + + + + + + + + + + + + + + + + <#-- --> + + + + + + + + + + + + + + + + + + + <#if projectBudgetPlanDetails??> + <#list projectBudgetPlanDetails as projectBudgetPlanDetail> + + + + + + + + + + + + + + + <#----> + + + + + +
月份设备支出工程支出经营性开支保证金支出支出合计销售收款保证金收款收款合计资金余额资金利息垫资计划还款计划操作
<#---->${projectBudgetPlanDetailTotal.month}
<#---->${projectBudgetPlanDetail.month!} + + + + + +
+ + <#--收入明细表 采购成本明细表 项目管理成本表 - 资金计划表 + 资金计划表--> + 收入 From f16f263e8fef0bf97669a8404607306aec3babb2 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Mon, 10 Jan 2022 16:28:22 +0800 Subject: [PATCH 10/35] =?UTF-8?q?=E5=8D=95=E4=BB=B7=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/palmte/work/utils/Utils.java | 14 ++++++++++++++ .../templates/admin/project_budget_edit.ftl | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/java/cn/palmte/work/utils/Utils.java b/src/main/java/cn/palmte/work/utils/Utils.java index cebf5a1..9eef788 100644 --- a/src/main/java/cn/palmte/work/utils/Utils.java +++ b/src/main/java/cn/palmte/work/utils/Utils.java @@ -61,6 +61,20 @@ public class Utils { return format(number, "#,##0.00"); } + /** + * 保留五位小数 + */ + public static String format2(Number number, String defaultValue){ + if (null == number) { + return defaultValue; + }else { + return new java.text.DecimalFormat("#,##0.00###").format(number); + } + } + public static String format2(Number number){ + return format(number, "#,##0.00###"); + } + public static void main(String[] args) throws Exception { AesCrypto aesCrypto = new AesCrypto("CDGXQHCJ-HHYC2021017"); diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index b5269b8..6c9f2ee 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -392,7 +392,7 @@ - + @@ -459,7 +459,7 @@ - + @@ -527,7 +527,7 @@ - + From c47632341b8cd5ae44278a63c01111b78334d471 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Mon, 10 Jan 2022 16:57:21 +0800 Subject: [PATCH 11/35] =?UTF-8?q?=E5=88=86=E9=9A=94=E7=AC=A6=E6=BC=8F?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/assets/js/project_budget_plan.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 c7fce6d..ef4272a 100644 --- a/src/main/resources/static/assets/js/project_budget_plan.js +++ b/src/main/resources/static/assets/js/project_budget_plan.js @@ -274,7 +274,7 @@ function bindChangeableInputBudgetPlanDetail() { var earnestMoneyCost = f2($(this).parent().parent().find(".input-changeable-earnest-money-cost-budget-plan").val()); //更新本月所有项支出 - $(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(deviceCost+engineerCost+projectManageCost+earnestMoneyCost); + $(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost)); //更新所有月设备支出总额 updateBudgetPlanTotal("input-changeable-device-cost-budget-plan","input-total-device-cost-budget-plan"); //更新所有月支出总额 @@ -292,7 +292,7 @@ function bindChangeableInputBudgetPlanDetail() { var earnestMoneyCost = f2($(this).parent().parent().find(".input-changeable-earnest-money-cost-budget-plan").val()); //更新本月所有项支出 - $(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(deviceCost+engineerCost+projectManageCost+earnestMoneyCost); + $(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost)); //更新所有月工程支出总额 updateBudgetPlanTotal("input-changeable-engineer-cost-budget-plan","input-total-engineer-cost-budget-plan"); //更新所有月支出总额 @@ -310,7 +310,7 @@ function bindChangeableInputBudgetPlanDetail() { var earnestMoneyCost = f2($(this).parent().parent().find(".input-changeable-earnest-money-cost-budget-plan").val()); //更新本月所有项支出 - $(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(deviceCost+engineerCost+projectManageCost+earnestMoneyCost); + $(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost)); //更新所有月经营性支出总额 updateBudgetPlanTotal("input-changeable-project-manage-cost-budget-plan","input-total-project-manage-cost-budget-plan"); //更新所有月支出总额 @@ -328,7 +328,7 @@ function bindChangeableInputBudgetPlanDetail() { var projectManageCost = f2($(this).parent().parent().find(".input-changeable-project-manage-cost-budget-plan").val()); //更新本月所有项支出 - $(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2(deviceCost+engineerCost+projectManageCost+earnestMoneyCost)); + $(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost)); //更新所有月保证金支出总额 updateBudgetPlanTotal("input-changeable-earnest-money-cost-budget-plan","input-total-earnest-money-cost-budget-plan"); updateBudgetPlanTotal("input-changeable-earnest-money-cost-budget-plan","input-total-title-earnest-money-cost-budget-plan"); @@ -346,7 +346,7 @@ function bindChangeableInputBudgetPlanDetail() { var earnestMoneyIncome = f2($(this).parent().parent().find(".input-changeable-earnest-money-income-budget-plan").val()); //更新本月所有项收入 - $(this).parent().parent().find(".input-changeable-total-income-budget-plan").val(f2(saleIncome+earnestMoneyIncome)); + $(this).parent().parent().find(".input-changeable-total-income-budget-plan").val(f2Fixed(saleIncome+earnestMoneyIncome)); //更新所有月销售收款总额 updateBudgetPlanTotal("input-changeable-sale-income-budget-plan","input-total-sale-income-budget-plan"); //更新所有月收入总额 @@ -362,7 +362,7 @@ function bindChangeableInputBudgetPlanDetail() { var saleIncome = f2($(this).parent().parent().find(".input-changeable-sale-income-budget-plan").val()); //更新本月所有项收入 - $(this).parent().parent().find(".input-changeable-total-income-budget-plan").val(f2(saleIncome+earnestMoneyIncome)); + $(this).parent().parent().find(".input-changeable-total-income-budget-plan").val(f2Fixed(saleIncome+earnestMoneyIncome)); //更新所有月保证金收款总额 updateBudgetPlanTotal("input-changeable-earnest-money-income-budget-plan","input-total-earnest-money-income-budget-plan"); updateBudgetPlanTotal("input-changeable-earnest-money-income-budget-plan","input-total-title-earnest-money-income-budget-plan"); From c75c4eb49ff976c2c077bdd78cab078e35e804c0 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Mon, 10 Jan 2022 17:07:17 +0800 Subject: [PATCH 12/35] =?UTF-8?q?=E5=88=86=E9=9A=94=E7=AC=A6=E6=BC=8F?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/assets/js/project_budget_cost_project_manage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 e197b85..58a5946 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 @@ -224,13 +224,13 @@ function bindChangeableInputProjectManage() { $(".input-changeable-amount-project-manage").change(function () { var amount = parseInt($(this).val()); //找到对应的单价 - var price = f2($(this).parent().parent().find(".input-changeable-price-project-manage").val()); + var price = f5($(this).parent().parent().find(".input-changeable-price-project-manage").val()); $(this).parent().parent().find(".input-changeable-total-project-manage").val(f2Fixed(amount*price)); }); //单价改变 $(".input-changeable-price-project-manage").change(function () { - var price = f2($(this).val()); + var price = f5($(this).val()); //找到对应的数量 var amount = parseInt($(this).parent().parent().find(".input-changeable-amount-project-manage").val()); @@ -297,7 +297,6 @@ function updateCostProjectManageData(data,returnData) { calCostExclude(); calCostInclude(); - console.log("51"); updateProjectContributionProfitRate(); From d7b3dcaf61e4a18b0b5d81418f9e887962db13d4 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Mon, 10 Jan 2022 17:57:21 +0800 Subject: [PATCH 13/35] =?UTF-8?q?=E5=88=A9=E6=B6=A6=E7=8E=87=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E8=AE=A1=E7=AE=97=E8=B4=9F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/palmte/work/bean/FinalBean.java | 6 +++--- .../java/cn/palmte/work/service/ProjectSummaryService.java | 4 ++-- src/main/java/cn/palmte/work/service/StatisticsService.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/cn/palmte/work/bean/FinalBean.java b/src/main/java/cn/palmte/work/bean/FinalBean.java index dd2da66..afe8d7f 100644 --- a/src/main/java/cn/palmte/work/bean/FinalBean.java +++ b/src/main/java/cn/palmte/work/bean/FinalBean.java @@ -161,7 +161,7 @@ public class FinalBean { if(null == grossProfitFinalTotal || null == incomeTotal){ return null; } - if (incomeTotal.compareTo(BigDecimal.valueOf(0.01)) < 0) { + if (incomeTotal.compareTo(BigDecimal.valueOf(0.01)) < 0 && incomeTotal.compareTo(BigDecimal.valueOf(-0.01)) > 0) { incomeTotal = BigDecimal.ONE; } return grossProfitFinalTotal.divide(incomeTotal,4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); @@ -202,7 +202,7 @@ public class FinalBean { if(null == contributionMarginFinalTotal || null == incomeTotal){ return null; } - if (incomeTotal.compareTo(BigDecimal.valueOf(0.01)) < 0) { + if (incomeTotal.compareTo(BigDecimal.valueOf(0.01)) < 0 && incomeTotal.compareTo(BigDecimal.valueOf(-0.01)) > 0) { incomeTotal = BigDecimal.ONE; } return contributionMarginFinalTotal.divide(incomeTotal,4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); @@ -242,7 +242,7 @@ public class FinalBean { if(null == netMarginFinalTotal || null == incomeTotal){ return null; } - if (incomeTotal.compareTo(BigDecimal.valueOf(0.01)) < 0) { + if (incomeTotal.compareTo(BigDecimal.valueOf(0.01)) < 0 && incomeTotal.compareTo(BigDecimal.valueOf(-0.01)) > 0) { incomeTotal = BigDecimal.ONE; } return netMarginFinalTotal.divide(incomeTotal,4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); diff --git a/src/main/java/cn/palmte/work/service/ProjectSummaryService.java b/src/main/java/cn/palmte/work/service/ProjectSummaryService.java index 646ae03..24f0a96 100644 --- a/src/main/java/cn/palmte/work/service/ProjectSummaryService.java +++ b/src/main/java/cn/palmte/work/service/ProjectSummaryService.java @@ -190,8 +190,8 @@ public class ProjectSummaryService { private void setProfitMargin(SettleBean monthSettle) { BigDecimal divide2 = monthSettle.getIncomeTotal(); BigDecimal min = BigDecimal.valueOf(0.01); - if (divide2.compareTo(min) < 0) { - divide2 = BigDecimal.valueOf(1); + if (divide2.compareTo(min) < 0 && divide2.compareTo(BigDecimal.valueOf(-0.01)) > 0) { + divide2 = BigDecimal.ONE; } monthSettle.setGrossProfitProfitMargin(monthSettle.getGrossProfit().multiply(new BigDecimal(100)).divide(divide2, 4, BigDecimal.ROUND_HALF_UP)); monthSettle.setContributionProfitProfitMargin(monthSettle.getContributionProfit().multiply(new BigDecimal(100)).divide(divide2, 4, BigDecimal.ROUND_HALF_UP)); diff --git a/src/main/java/cn/palmte/work/service/StatisticsService.java b/src/main/java/cn/palmte/work/service/StatisticsService.java index dda3cfc..0a49b32 100644 --- a/src/main/java/cn/palmte/work/service/StatisticsService.java +++ b/src/main/java/cn/palmte/work/service/StatisticsService.java @@ -313,8 +313,8 @@ public class StatisticsService { BigDecimal divide2 = profitAndLossBean.getIncome(); BigDecimal min = BigDecimal.valueOf(0.01); - if (divide2.compareTo(min) < 0) { - divide2 = BigDecimal.valueOf(1); + if (divide2.compareTo(min) < 0 && divide2.compareTo(BigDecimal.valueOf(-0.01)) > 0) { + divide2 = BigDecimal.ONE; } profitAndLossBean.setGrossProfit(typeGrossProfit); profitAndLossBean.setGrossProfitProfit(profitAndLossBean.getGrossProfit().multiply(new BigDecimal(100)).divide(divide2, 4, BigDecimal.ROUND_HALF_UP)); From 900a133bc7f4374bf676c403fa11fc639b47810a Mon Sep 17 00:00:00 2001 From: OathK1per Date: Mon, 10 Jan 2022 18:04:32 +0800 Subject: [PATCH 14/35] =?UTF-8?q?=E5=88=A9=E6=B6=A6=E7=8E=87=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E8=AE=A1=E7=AE=97=E8=B4=9F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/admin/project_settle_edit.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/admin/project_settle_edit.ftl b/src/main/resources/templates/admin/project_settle_edit.ftl index f78d525..3e89520 100644 --- a/src/main/resources/templates/admin/project_settle_edit.ftl +++ b/src/main/resources/templates/admin/project_settle_edit.ftl @@ -251,7 +251,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -269,7 +269,7 @@ - +
> > oninput="if(value.length>8)value=value.slice(0,8)"> value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目毛利利润率">value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目毛利利润率">
项目贡献利润 value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目贡献利润利润率">value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目贡献利润利润率">
项目净利润 value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目净利润利润率">value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目净利润利润率">
From 75b2179b0d263c08d76ef5a162db0be2c43be0e4 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Tue, 11 Jan 2022 14:23:23 +0800 Subject: [PATCH 15/35] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8D=95=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/admin/project_approve.ftl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl index b1022bf..6f86f88 100644 --- a/src/main/resources/templates/admin/project_approve.ftl +++ b/src/main/resources/templates/admin/project_approve.ftl @@ -477,7 +477,7 @@ value="${incomeDetail.amount!0}"> + value="${Utils.format2(incomeDetail.price,'0')}"> @@ -558,7 +558,7 @@ value="${costDetail.amount!0}"> + value="${Utils.format2(costDetail.price,'0')}"> @@ -639,7 +639,7 @@ value="${costProjectManageDetail.amount!0}"> + value="${Utils.format2(costProjectManageDetail.price,'0')}"> + value="${Utils.format2(incomeDetail.price,'0')}"> @@ -1901,7 +1901,7 @@ value="${costDetail.amount!0}"> + value="${Utils.format2(costDetail.price,'0')}"> @@ -1996,7 +1996,7 @@ value="${costProjectManageDetail.amount!0}"> + value="${Utils.format2(costProjectManageDetail.price,'0')}"> Date: Wed, 12 Jan 2022 10:21:30 +0800 Subject: [PATCH 16/35] =?UTF-8?q?=E5=8F=91=E8=B5=B7=E5=86=B3=E7=AE=97?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/assets/js/project_final.js | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/main/resources/static/assets/js/project_final.js b/src/main/resources/static/assets/js/project_final.js index 11c4846..c866607 100644 --- a/src/main/resources/static/assets/js/project_final.js +++ b/src/main/resources/static/assets/js/project_final.js @@ -2,18 +2,30 @@ function calculateFinal() { $("input[name='incomeDeviceFinalTotal']").change(function () { calIncomeFinalTotal(); + calGrossProfitFinalTotal(); + calGrossProfitProfitMargin(); + calContributionMarginFinalTotal(); + calContributionMarginProfitMargin(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); digitalSelf("incomeDeviceFinalTotal", "input[name='incomeDeviceFinalTotal']"); }); $("input[name='incomeEngineerFinalTotal']").change(function () { calIncomeFinalTotal(); + calGrossProfitFinalTotal(); + calGrossProfitProfitMargin(); + calContributionMarginFinalTotal(); + calContributionMarginProfitMargin(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); digitalSelf("incomeEngineerFinalTotal", "input[name='incomeEngineerFinalTotal']"); }); $("input[name='incomeServiceFinalTotal']").change(function () { calIncomeFinalTotal(); + calGrossProfitFinalTotal(); + calGrossProfitProfitMargin(); + calContributionMarginFinalTotal(); + calContributionMarginProfitMargin(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); digitalSelf("incomeServiceFinalTotal", "input[name='incomeServiceFinalTotal']"); @@ -22,36 +34,60 @@ function calculateFinal() { $("input[name='costPurchaseDeviceFinalTotal']").change(function () { calCostFinalTotal(); + calGrossProfitFinalTotal(); + calGrossProfitProfitMargin(); + calContributionMarginFinalTotal(); + calContributionMarginProfitMargin(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); digitalSelf("costPurchaseDeviceFinalTotal", "input[name='costPurchaseDeviceFinalTotal']"); }); $("input[name='costPurchaseBuildFinalTotal']").change(function () { calCostFinalTotal(); + calGrossProfitFinalTotal(); + calGrossProfitProfitMargin(); + calContributionMarginFinalTotal(); + calContributionMarginProfitMargin(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); digitalSelf("costPurchaseBuildFinalTotal", "input[name='costPurchaseBuildFinalTotal']"); }); $("input[name='costPurchaseServiceFinalTotal']").change(function () { calCostFinalTotal(); + calGrossProfitFinalTotal(); + calGrossProfitProfitMargin(); + calContributionMarginFinalTotal(); + calContributionMarginProfitMargin(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); digitalSelf("costPurchaseServiceFinalTotal", "input[name='costPurchaseServiceFinalTotal']"); }); $("input[name='costPurchaseOtherFinalTotal']").change(function () { calCostFinalTotal(); + calGrossProfitFinalTotal(); + calGrossProfitProfitMargin(); + calContributionMarginFinalTotal(); + calContributionMarginProfitMargin(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); digitalSelf("costPurchaseOtherFinalTotal", "input[name='costPurchaseOtherFinalTotal']"); }); $("input[name='costProjectManageFinalTotal']").change(function () { calCostFinalTotal(); + calGrossProfitFinalTotal(); + calGrossProfitProfitMargin(); + calContributionMarginFinalTotal(); + calContributionMarginProfitMargin(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); digitalSelf("costProjectManageFinalTotal", "input[name='costProjectManageFinalTotal']"); }); $("input[name='costOtherFinalTotal']").change(function () { calCostFinalTotal(); + calGrossProfitFinalTotal(); + calGrossProfitProfitMargin(); + calContributionMarginFinalTotal(); + calContributionMarginProfitMargin(); calNetMarginFinalTotal(); calNetMarginProfitMargin(); digitalSelf("costOtherFinalTotal", "input[name='costOtherFinalTotal']"); @@ -77,7 +113,7 @@ function calculateFinal() { digitalSelf("costIncomeTaxFinalTotal", "input[name='costIncomeTaxFinalTotal']"); }); - + //现金流量表 $("input[name='saleIncomeCash']").change(function () { //calCashFluxFinalTotal(); calNetCashFlow(); From 8030783b7ede58971e493779fbf87a859ce48a6f Mon Sep 17 00:00:00 2001 From: OathK1per Date: Wed, 12 Jan 2022 10:45:34 +0800 Subject: [PATCH 17/35] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=93=E7=AE=97?= =?UTF-8?q?=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_common.js | 24 +++++++++++++++++++ .../static/assets/js/project_settle.js | 6 ++--- .../templates/admin/project_settle_edit.ftl | 4 ++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/main/resources/static/assets/js/project_common.js b/src/main/resources/static/assets/js/project_common.js index ac9a87a..7779882 100644 --- a/src/main/resources/static/assets/js/project_common.js +++ b/src/main/resources/static/assets/js/project_common.js @@ -78,6 +78,30 @@ function digitalSelf(name, action) { $action.val(f2Fixed(f2(self))); } +/** + * parse float保留两位小数,四舍五入 + * 空格或者非数字认为是0 + * @param x + * @returns {*} + */ +function f2min(x) { + if(!x){ + return 1; + } + if(typeof x === 'string'){ + //这一步因为数字格式化为了包含分隔符,获取的时候就去掉这个分隔符 + x = x.replaceAll(",",""); + } + var f = parseFloat(x); + if (isNaN(f)) { + return 1; + } + if (f < 0.01 && f > -0.01) { + return 1; + } + return Math.round(f*100)/100; +} + /** * 计算利润率 * @param r1 diff --git a/src/main/resources/static/assets/js/project_settle.js b/src/main/resources/static/assets/js/project_settle.js index e568638..d73e7a4 100644 --- a/src/main/resources/static/assets/js/project_settle.js +++ b/src/main/resources/static/assets/js/project_settle.js @@ -579,7 +579,7 @@ function calGrossProfitProfitMargin() { var grossProfitProfitMargin = $("input[name='grossProfitProfitMargin']"); if(grossProfitSettleTotal && incomeSettleTotal){ - grossProfitProfitMargin.val(f2Fixed(100*(f2(grossProfitSettleTotal)/f2(incomeSettleTotal)))); + grossProfitProfitMargin.val(f2Fixed(100*(f2(grossProfitSettleTotal)/f2min(incomeSettleTotal)))); }else { grossProfitProfitMargin.val(""); } @@ -627,7 +627,7 @@ function calContributionProfitProfitMargin() { var contributionProfitProfitMargin = $("input[name='contributionProfitProfitMargin']"); if(contributionProfitSettleTotal && incomeSettleTotal){ - contributionProfitProfitMargin.val(f2Fixed(100*(f2(contributionProfitSettleTotal)/f2(incomeSettleTotal)))); + contributionProfitProfitMargin.val(f2Fixed(100*(f2(contributionProfitSettleTotal)/f2min(incomeSettleTotal)))); }else { contributionProfitProfitMargin.val(""); } @@ -675,7 +675,7 @@ function calNetProfitProfitMargin() { var netProfitProfitMargin = $("input[name='netProfitProfitMargin']"); if(netProfitSettleTotal && incomeSettleTotal){ - netProfitProfitMargin.val(f2Fixed(100*(f2(netProfitSettleTotal)/f2(incomeSettleTotal)))); + netProfitProfitMargin.val(f2Fixed(100*(f2(netProfitSettleTotal)/f2min(incomeSettleTotal)))); }else { netProfitProfitMargin.val(""); } diff --git a/src/main/resources/templates/admin/project_settle_edit.ftl b/src/main/resources/templates/admin/project_settle_edit.ftl index 3e89520..7062922 100644 --- a/src/main/resources/templates/admin/project_settle_edit.ftl +++ b/src/main/resources/templates/admin/project_settle_edit.ftl @@ -260,7 +260,7 @@ - value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目贡献利润利润率"> + value="${Utils.format(100 * currentBean.contributionProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.contributionProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目贡献利润利润率"> 项目净利润 @@ -269,7 +269,7 @@ - value="${Utils.format(100 * currentBean.grossProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目净利润利润率"> + value="${Utils.format(100 * currentBean.netProfit,'0')}"<#else>value="${Utils.format(100 * currentBean.netProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目净利润利润率"> From 1119d20fab65d408185a542a3f87f8b5fd90a305 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Thu, 13 Jan 2022 11:20:55 +0800 Subject: [PATCH 18/35] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=98=E6=AC=BE?= =?UTF-8?q?=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/assets/js/project_budget_plan.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ef4272a..d0a8d7a 100644 --- a/src/main/resources/static/assets/js/project_budget_plan.js +++ b/src/main/resources/static/assets/js/project_budget_plan.js @@ -515,6 +515,7 @@ function calUnderwrittenPlan(income, cost, prevFundBalance) { */ function updateEachRepaymentPlan() { var total = 0; + console.log("total: " + total); //找到每个月的回款计划输入框 $(".input-changeable-repayment-plan-budget-plan").each(function (t) { //找到当前月的收入和支出 @@ -549,7 +550,6 @@ function updateEachRepaymentPlan() { */ function calRepaymentPlan(income, cost, prevFundBalance) { var repaymentPlan = 0; - if(!income || !cost){ //数据还不全的时候 repaymentPlan = NaN; @@ -560,10 +560,10 @@ function calRepaymentPlan(income, cost, prevFundBalance) { if (f2(prevFundBalance) >= 0) { repaymentPlan = 0; } else { - if (f2(-prevFundBalance) >= f2(income) - f2(cost)) { + if (-f2(prevFundBalance) >= f2(income) - f2(cost)) { repaymentPlan = f2(f2(income) - f2(cost)); } else { - repaymentPlan = f2(-prevFundBalance); + repaymentPlan = -f2(prevFundBalance); } } } From c435f0778c856ea23b9aaed5e1a1d9de415b131d Mon Sep 17 00:00:00 2001 From: OathK1per Date: Thu, 13 Jan 2022 11:54:56 +0800 Subject: [PATCH 19/35] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E5=9C=A8=E5=90=84=E4=B8=AA=E8=A1=A8=E4=B8=AD=E5=8F=AF=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=8F=AF=E4=B8=8D=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/assets/js/project_final.js | 2 +- .../resources/static/assets/js/project_settle.js | 4 ++-- .../static/assets/js/project_settle_valid.js | 12 ------------ .../resources/templates/admin/project_approve.ftl | 4 ++-- .../templates/admin/project_budget_edit.ftl | 12 ++++++------ .../templates/admin/project_estimate_add.ftl | 6 +++--- .../templates/admin/project_estimate_edit.ftl | 6 +++--- .../resources/templates/admin/project_final_add.ftl | 10 +++++----- .../resources/templates/admin/project_final_edit.ftl | 10 +++++----- .../resources/templates/admin/project_settle_add.ftl | 10 +++++----- .../templates/admin/project_settle_edit.ftl | 10 +++++----- 11 files changed, 37 insertions(+), 49 deletions(-) diff --git a/src/main/resources/static/assets/js/project_final.js b/src/main/resources/static/assets/js/project_final.js index c866607..ac54375 100644 --- a/src/main/resources/static/assets/js/project_final.js +++ b/src/main/resources/static/assets/js/project_final.js @@ -290,7 +290,7 @@ function calCostFinalTotal() { var costFinalTotal = $("input[name='costFinalTotal']"); if (costPurchaseDeviceFinalTotal && costPurchaseBuildFinalTotal && costPurchaseServiceFinalTotal && - costPurchaseOtherFinalTotal && costProjectManageFinalTotal && costOtherFinalTotal) { + costPurchaseOtherFinalTotal && costProjectManageFinalTotal) { costFinalTotal.val(f2Fixed(f2(costPurchaseDeviceFinalTotal) + f2(costPurchaseBuildFinalTotal) + f2(costPurchaseServiceFinalTotal) + f2(costPurchaseOtherFinalTotal) + f2(costProjectManageFinalTotal) + f2(costOtherFinalTotal))); } else { diff --git a/src/main/resources/static/assets/js/project_settle.js b/src/main/resources/static/assets/js/project_settle.js index d73e7a4..bc7aeed 100644 --- a/src/main/resources/static/assets/js/project_settle.js +++ b/src/main/resources/static/assets/js/project_settle.js @@ -405,7 +405,7 @@ function calCostOtherSettleTotal() { var costOtherSettleTotal = $("input[name='costOtherSettleTotal']"); - if(costOtherFormerSettleTotal && costOther){ + if(costOtherFormerSettleTotal){ costOtherSettleTotal.val(f2Fixed(f2(costOtherFormerSettleTotal)+f2(costOther))); }else { costOtherSettleTotal.val(""); @@ -425,7 +425,7 @@ function calCostTotal() { var costTotal = $("input[name='costTotal']"); - if(costPurchaseDevice && costPurchaseBuild && costPurchaseService && costPurchaseOther && costProjectManage && costOther){ + if(costPurchaseDevice && costPurchaseBuild && costPurchaseService && costPurchaseOther && costProjectManage){ costTotal.val(f2Fixed(f2(costPurchaseDevice)+f2(costPurchaseBuild)+f2(costPurchaseService)+f2(costPurchaseOther)+f2(costProjectManage)+f2(costOther))); }else { costTotal.val(""); diff --git a/src/main/resources/static/assets/js/project_settle_valid.js b/src/main/resources/static/assets/js/project_settle_valid.js index 096ad17..175d6a8 100644 --- a/src/main/resources/static/assets/js/project_settle_valid.js +++ b/src/main/resources/static/assets/js/project_settle_valid.js @@ -125,18 +125,6 @@ var costProjectManageValid = function() { return true; }; -var costOtherValid = function() { - var month = $("input[name='costOther']").val(); - if (month == "") { - layui.use('layer', function(){ - var layer = layui.layer; - layer.alert("请填入本月其他成本数据"); - }); - return false; - } - return true; -}; - var costTotalValid = function() { var settle = $("input[name='costSettleTotal']").val(); var budget = $("input[name='costBudgetTotal']").val(); diff --git a/src/main/resources/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl index 6f86f88..fe7089d 100644 --- a/src/main/resources/templates/admin/project_approve.ftl +++ b/src/main/resources/templates/admin/project_approve.ftl @@ -674,7 +674,7 @@ 月份 设备支出 - 工程支出 + 工程支出(含服务+施工+其他) 经营性开支 保证金支出 支出合计 @@ -2046,7 +2046,7 @@ 月份 设备支出 - 工程支出 + 工程支出(含服务+施工+其他) 经营性开支 保证金支出 支出合计 diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index 6c9f2ee..911b925 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -300,8 +300,8 @@ 成本 其他 ${project.otherName!} - - + + 合计 @@ -558,7 +558,7 @@ 月份 设备支出 - 工程支出 + 工程支出(含服务+施工+其他) 经营性开支 保证金支出 支出合计 @@ -743,9 +743,9 @@ 成本 其他 - - + value="${project.otherName!}" name="otherName" placeholder="请输入其他中的小类名称(10字符以内)"/> + + 合计 diff --git a/src/main/resources/templates/admin/project_estimate_add.ftl b/src/main/resources/templates/admin/project_estimate_add.ftl index d6f07d2..62e8506 100644 --- a/src/main/resources/templates/admin/project_estimate_add.ftl +++ b/src/main/resources/templates/admin/project_estimate_add.ftl @@ -358,9 +358,9 @@ 成本 其他 - - + value="" name="otherName" placeholder="请输入其他类的名称(10字符以内)"/> + + - - readonly required> + value="${project.otherName!}" name="otherName" placeholder="请输入其他类的名称(10字符以内)"/> + + readonly> - - - - + value="${project.otherName!}" name="otherName" placeholder="请输入其他中的小类名称(10字符以内)"/> + + + + 合计 diff --git a/src/main/resources/templates/admin/project_final_edit.ftl b/src/main/resources/templates/admin/project_final_edit.ftl index 1ddf0ca..f926a6d 100644 --- a/src/main/resources/templates/admin/project_final_edit.ftl +++ b/src/main/resources/templates/admin/project_final_edit.ftl @@ -140,11 +140,11 @@ 成本 其他 - - - - + value="${project.otherName!}" name="otherName" placeholder="请输入其他中的小类名称(10字符以内)"/> + + + + 合计 diff --git a/src/main/resources/templates/admin/project_settle_add.ftl b/src/main/resources/templates/admin/project_settle_add.ftl index 38c8ef0..02e1ab5 100644 --- a/src/main/resources/templates/admin/project_settle_add.ftl +++ b/src/main/resources/templates/admin/project_settle_add.ftl @@ -164,11 +164,11 @@ 成本 其他 - - - - + value="${project.otherName!}" name="otherName" placeholder="请输入其他中的小类名称(10字符以内)"/> + + + + diff --git a/src/main/resources/templates/admin/project_settle_edit.ftl b/src/main/resources/templates/admin/project_settle_edit.ftl index 7062922..c5a3434 100644 --- a/src/main/resources/templates/admin/project_settle_edit.ftl +++ b/src/main/resources/templates/admin/project_settle_edit.ftl @@ -162,11 +162,11 @@ 成本 其他 - - - - + value="${project.otherName!}" name="otherName" placeholder="请输入其他中的小类名称(10字符以内)"/> + + + + From a0eb41ea6ae17a5403a4acbce1d51b4646c6c7f0 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Thu, 13 Jan 2022 15:33:01 +0800 Subject: [PATCH 20/35] =?UTF-8?q?=E9=A2=84=E7=AE=97=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=BA=8F=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/assets/js/project_budget.js | 13 +++++++++++++ .../static/assets/js/project_budget_cost.js | 7 ++++++- .../assets/js/project_budget_cost_project_manage.js | 4 ++++ .../static/assets/js/project_budget_income.js | 3 +++ .../static/assets/js/project_budget_plan.js | 1 - .../resources/templates/admin/project_approve.ftl | 6 ++++++ .../templates/admin/project_budget_edit.ftl | 8 +++++++- 7 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index e9a45ca..3aa96d4 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -1,4 +1,5 @@ INCOME_DETAIL={ + "num":[false,"序号","string"], "type":[true,"类别","string"], "name":[true,"名称","string"], "unit":[true,"单位","string"], @@ -10,6 +11,7 @@ INCOME_DETAIL={ }; COST_DETAIL={ + "num":[false,"序号","string"], "type":[true,"大类","string"], "category":[true,"类别","string"], "name":[true,"名称","string"], @@ -22,6 +24,7 @@ COST_DETAIL={ }; COST_PROJECT_MANAGE_DETAIL={ + "num":[false,"序号","string"], "type":[true,"财务费用类别","string"], "name1":[false,"业务项目","string"], "name2":[false,"业务项目","string"], @@ -476,6 +479,16 @@ function bindChangeableInput() { }); } +/** + * 绑定序号 + */ +function bindNum() { + $(".input-budget-num").each(function(t) { + var prevIndex = $(this).parent().parent().prev("tr").find(".input-budget-num").val(); + $(this).val(f2(prevIndex) + 1); + }); +} + /** * 校验项目贡献利润率必须大于阀值 * 低于阀值就返回提示信息,否则返回"" 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 354971d..57a3a1d 100644 --- a/src/main/resources/static/assets/js/project_budget_cost.js +++ b/src/main/resources/static/assets/js/project_budget_cost.js @@ -3,6 +3,7 @@ */ //COST_DETAIL_ARR=["type","category","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"]; COST_DETAIL={ + "num":[false,"序号","string"], "type":[true,"大类","string"], "category":[true,"类别","string"], "name":[true,"名称","string"], @@ -161,7 +162,9 @@ function appendTrCost() { options+='\r\n'; }); - var template = '' + + '\n' + ' \n' + ' \n' + ' \n' + ' <#-- <#-- <#-- + ${(incomeDetail_index+1)!} <#-- + ${(costDetail_index+1)!} <#-- + ${(costProjectManageDetail_index+1)!} <#-- - + - + - + - + - + - + - + + / From 8ca296b7c0a48cf2df14da1be15856e2094a0c2a Mon Sep 17 00:00:00 2001 From: OathK1per Date: Thu, 13 Jan 2022 16:35:29 +0800 Subject: [PATCH 24/35] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=AF=B9=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=9A=84=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/palmte/work/bean/BudgetSettleBean.java | 2 +- .../palmte/work/bean/EstimateSettleBean.java | 2 +- .../java/cn/palmte/work/bean/FinalBean.java | 4 +-- .../cn/palmte/work/bean/IncomeCostBean.java | 6 +++++ .../java/cn/palmte/work/bean/SettleBean.java | 3 +++ .../cn/palmte/work/bean/SettleMonthBean.java | 3 +++ .../templates/admin/project_approve.ftl | 26 +++++++++---------- .../templates/admin/project_estimate_edit.ftl | 4 +-- .../templates/admin/project_settle_edit.ftl | 2 +- 9 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/main/java/cn/palmte/work/bean/BudgetSettleBean.java b/src/main/java/cn/palmte/work/bean/BudgetSettleBean.java index 516c894..86b0747 100644 --- a/src/main/java/cn/palmte/work/bean/BudgetSettleBean.java +++ b/src/main/java/cn/palmte/work/bean/BudgetSettleBean.java @@ -232,7 +232,7 @@ public class BudgetSettleBean { } public BigDecimal getCostOtherBudgetTotal() { - return costOtherBudgetTotal; + return (costOtherBudgetTotal == null)?BigDecimal.ZERO:costOtherBudgetTotal; } public void setCostOtherBudgetTotal(BigDecimal costOtherBudgetTotal) { diff --git a/src/main/java/cn/palmte/work/bean/EstimateSettleBean.java b/src/main/java/cn/palmte/work/bean/EstimateSettleBean.java index 9e3b5ec..20d8c04 100644 --- a/src/main/java/cn/palmte/work/bean/EstimateSettleBean.java +++ b/src/main/java/cn/palmte/work/bean/EstimateSettleBean.java @@ -169,7 +169,7 @@ public class EstimateSettleBean { } public BigDecimal getCostOtherEstimateTotal() { - return costOtherEstimateTotal; + return (costOtherEstimateTotal == null)?BigDecimal.ZERO:costOtherEstimateTotal; } public void setCostOtherEstimateTotal(BigDecimal costOtherEstimateTotal) { diff --git a/src/main/java/cn/palmte/work/bean/FinalBean.java b/src/main/java/cn/palmte/work/bean/FinalBean.java index afe8d7f..ac80667 100644 --- a/src/main/java/cn/palmte/work/bean/FinalBean.java +++ b/src/main/java/cn/palmte/work/bean/FinalBean.java @@ -83,7 +83,7 @@ public class FinalBean { BigDecimal costOtherFinalTotal = getCostOtherFinalTotal(); if (null == costPurchaseDeviceFinalTotal || null == costPurchaseBuildFinalTotal || null == costPurchaseServiceFinalTotal - || null == costPurchaseOtherFinalTotal || null == costProjectManageFinalTotal || null == costOtherFinalTotal) { + || null == costPurchaseOtherFinalTotal || null == costProjectManageFinalTotal) { return new BigDecimal(0); } @@ -472,7 +472,7 @@ public class FinalBean { } public BigDecimal getCostOtherFinalTotal() { - return costOtherFinalTotal; + return (costOtherFinalTotal == null)?BigDecimal.ZERO:costOtherFinalTotal; } public void setCostOtherFinalTotal(BigDecimal costOtherFinalTotal) { diff --git a/src/main/java/cn/palmte/work/bean/IncomeCostBean.java b/src/main/java/cn/palmte/work/bean/IncomeCostBean.java index addaf3c..f2affd9 100644 --- a/src/main/java/cn/palmte/work/bean/IncomeCostBean.java +++ b/src/main/java/cn/palmte/work/bean/IncomeCostBean.java @@ -285,6 +285,9 @@ public abstract class IncomeCostBean { } public BigDecimal getCostOtherOtherTaxInclude() { + if (costOtherOtherTaxInclude == null) { + return BigDecimal.ZERO; + } return handleSpecial(costOtherOtherTaxInclude); } @@ -333,6 +336,9 @@ public abstract class IncomeCostBean { } public BigDecimal getCostOtherOtherTaxExclude() { + if (costOtherOtherTaxExclude == null) { + return BigDecimal.ZERO; + } return handleSpecial(costOtherOtherTaxExclude); } diff --git a/src/main/java/cn/palmte/work/bean/SettleBean.java b/src/main/java/cn/palmte/work/bean/SettleBean.java index 9c30c55..a0f8b11 100644 --- a/src/main/java/cn/palmte/work/bean/SettleBean.java +++ b/src/main/java/cn/palmte/work/bean/SettleBean.java @@ -339,6 +339,9 @@ public class SettleBean { } public BigDecimal getCostOther() { + if (costOther == null) { + return BigDecimal.ZERO; + } return handleSpecial(costOther); } diff --git a/src/main/java/cn/palmte/work/bean/SettleMonthBean.java b/src/main/java/cn/palmte/work/bean/SettleMonthBean.java index 378bc8a..3b2da38 100644 --- a/src/main/java/cn/palmte/work/bean/SettleMonthBean.java +++ b/src/main/java/cn/palmte/work/bean/SettleMonthBean.java @@ -484,6 +484,9 @@ public class SettleMonthBean { } public BigDecimal getCostOther() { + if (costOther == null) { + return BigDecimal.ZERO; + } return handleSpecial(costOther); } diff --git a/src/main/resources/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl index 49c7f2a..b8bb805 100644 --- a/src/main/resources/templates/admin/project_approve.ftl +++ b/src/main/resources/templates/admin/project_approve.ftl @@ -355,8 +355,8 @@ 成本 其他 ${project.otherName!} - - + + 合计 @@ -901,8 +901,8 @@ 成本 其他 ${project.otherName!} - - + + 合计 @@ -1169,11 +1169,11 @@ 成本 其他 ${project.otherName!} - - - - - + + + + + 合计 @@ -1521,10 +1521,10 @@ 成本 其他 ${project.otherName!} - - - - + + + + 合计 diff --git a/src/main/resources/templates/admin/project_estimate_edit.ftl b/src/main/resources/templates/admin/project_estimate_edit.ftl index 7516f11..bd25d56 100644 --- a/src/main/resources/templates/admin/project_estimate_edit.ftl +++ b/src/main/resources/templates/admin/project_estimate_edit.ftl @@ -365,8 +365,8 @@ 其他 - - readonly> + + readonly> - + 合计 From a0a576597a3203743dbbacd7563eb8802d2f8ae0 Mon Sep 17 00:00:00 2001 From: hanbo <2608504783@qq.com> Date: Thu, 13 Jan 2022 17:26:30 +0800 Subject: [PATCH 25/35] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E9=A2=84=E7=AE=97?= =?UTF-8?q?=E8=A1=A8sheet=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/admin/project_approve.ftl | 2441 +++++++++++------ 1 file changed, 1644 insertions(+), 797 deletions(-) diff --git a/src/main/resources/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl index b8bb805..baddc49 100644 --- a/src/main/resources/templates/admin/project_approve.ftl +++ b/src/main/resources/templates/admin/project_approve.ftl @@ -22,10 +22,10 @@ /** 审核通过 */ - .approve-passed{ - position:absolute; - right:10px; - top:10px; + .approve-passed { + position: absolute; + right: 10px; + top: 10px; border-radius: 100%; width: 150px; height: 150px; @@ -38,16 +38,18 @@ transform: rotateZ(20deg); font-size: 14px; } + .approve-passed:after { - content:"审核通过"; + content: "审核通过"; } + /** 待审核 */ - .approve-topass{ - position:absolute; - right:10px; - top:170px; + .approve-topass { + position: absolute; + right: 10px; + top: 170px; border-radius: 100%; width: 150px; height: 150px; @@ -60,16 +62,18 @@ transform: rotateZ(20deg); font-size: 14px; } + .approve-topass:after { - content:"待审核"; + content: "待审核"; } + /** 审核不过 */ - .approve-nopass{ - position:absolute; - right:10px; - top:10px; + .approve-nopass { + position: absolute; + right: 10px; + top: 10px; border-radius: 100%; width: 150px; height: 150px; @@ -82,8 +86,9 @@ transform: rotateZ(20deg); font-size: 14px; } + .approve-nopass:after { - content:"审核不通过"; + content: "审核不通过"; } @@ -100,28 +105,32 @@
-
class="am-tab-panel am-fade am-in am-active" <#else> class="am-tab-panel am-fade am-in" id="tab1"> - - +
class="am-tab-panel am-fade am-in am-active" <#else> class="am-tab-panel am-fade am-in" + id="tab1"> + +
-
*部门名称
+
*部门名称 +
${project.deptName}
@@ -129,14 +138,16 @@
-
*项目计划开始时间
+
*项目计划开始时间 +
${project.startDate?string("yyyy-MM-dd")}
-
*项目计划结束时间
+
*项目计划结束时间 +
${project.endDate?string("yyyy-MM-dd")}
@@ -144,7 +155,8 @@
-
*项目名称
+
*项目名称 +
${project.name}
@@ -152,7 +164,8 @@
-
*项目类型
+
*项目类型 +
<#if (project.type) =1> @@ -167,7 +180,8 @@
-
*垫资模式
+
*垫资模式 +
<#if (project.underwrittenMode) =1> @@ -185,7 +199,8 @@
-
*客户名称
+
*客户名称 +
${project.customer}
@@ -193,35 +208,38 @@
-
*终端客户名称
+
*终端客户名称 +
${project.terminalCustomer}
-<#--
--> -<#--
*垫资利息
--> -<#--
--> -<#-- ${Utils.format(project.advanceInterestAmount)}元--> -<#--
--> -<#--
--> -<#--
--> -<#--
--> -<#--
*垫资峰值
--> -<#--
--> -<#-- ${Utils.format(project.advancePeakAmount)}元--> -<#--
--> -<#--
--> -<#--
--> + <#--
--> + <#--
*垫资利息
--> + <#--
--> + <#-- ${Utils.format(project.advanceInterestAmount)}元--> + <#--
--> + <#--
--> + <#--
--> + <#--
--> + <#--
*垫资峰值
--> + <#--
--> + <#-- ${Utils.format(project.advancePeakAmount)}元--> + <#--
--> + <#--
--> + <#--
-->
-
*合同金额
+
*合同金额 +
${Utils.format(project.contractAmount)}
-
*行业场景应用
+
*行业场景应用 +
${project.industryScenario}
@@ -242,14 +260,16 @@
-
*主合同收款条款
+
*主合同收款条款 +
${project.mainContractCollectionTerms!}
-
*价值及风险
+
*价值及风险 +
${project.valueRisk!}
@@ -283,26 +303,42 @@ 收入 设备类 - - + + 收入 工程类 - - + + 收入 服务类 - - + + 合计 - - + + @@ -320,41 +356,67 @@ 成本 采购成本 设备 - - + + 成本 采购成本 施工 - - + + 成本 采购成本 服务 - - + + 成本 采购成本 其他 - - + + 成本 项目管理成本 项目管理成本 - - + + 成本 其他 ${project.otherName!} + + @@ -362,8 +424,12 @@ 合计 - - + + @@ -378,12 +444,16 @@ 财务费用 资金占用成本 - + 公司管理费用 - + @@ -397,19 +467,27 @@ 项目毛利(元) - + 项目毛利率(%) - + 项目贡献利润(元) - + 项目贡献利润率(%) - + @@ -429,385 +507,590 @@
- 收入明细表 - - - - - - - - - - - - - <#----> - - - <#if incomeDetails??> - <#list incomeDetails as incomeDetail> + +
+
+ 收入明细表 +
序号类别名称单位数量单价税率(%)含税总金额(元)不含税金额(元)操作
+ - - - - - - - - - - <#----> + + + + + + + + + + <#----> - - - -
${(incomeDetail_index+1)!} - <#----> - <#if incomeDetail.type ==1 > - 设备类 - <#elseif incomeDetail.type ==2> - 工程类 - <#elseif incomeDetail.type ==3> - 服务类 - - - - 序号类别名称单位数量单价税率(%)含税总金额(元)不含税金额(元)操作
- 采购成本明细表 - - - - - - - - - - - - - - <#----> - + <#if incomeDetails??> + <#list incomeDetails as incomeDetail> + + + + + + + + + + + <#----> + + + - <#if costDetails??> - <#list costDetails as costDetail> + +
序号大类类别名称单位数量单价税率(%)含税总金额(元)不含税金额(元)操作
${(incomeDetail_index+1)!} + <#----> + <#if incomeDetail.type ==1 > + 设备类 + <#elseif incomeDetail.type ==2> + 工程类 + <#elseif incomeDetail.type ==3> + 服务类 + + + +
+
+
+ 采购成本明细表 + + - - - - - - - - - - - + + + + + + + + + + + <#----> - - - -
${(costDetail_index+1)!} - <#----> - <#if costDetail.type ==1 > - 设备 - <#elseif costDetail.type ==2> - 施工 - <#elseif costDetail.type ==3> - 服务 - <#elseif costDetail.type ==4> - 其他 - - - <#list procurementTypes as procurementType> - <#if costDetail.category == procurementType.id>${procurementType.name} - - - - - <#-- --> - 序号大类类别名称单位数量单价税率(%)含税总金额(元)不含税金额(元)操作
- 项目管理成本表 - - - - - - - - - - - - - - - <#----> - + <#if costDetails??> + <#list costDetails as costDetail> + + + + + + + + + + + + + + + - <#if costProjectManageDetails??> - <#list costProjectManageDetails as costProjectManageDetail> + +
序号财务费用类别业务项目项目明细单位数量单价总金额(元)预估计算方法预估依据备注操作
${(costDetail_index+1)!} + <#----> + <#if costDetail.type ==1 > + 设备 + <#elseif costDetail.type ==2> + 施工 + <#elseif costDetail.type ==3> + 服务 + <#elseif costDetail.type ==4> + 其他 + + + <#list procurementTypes as procurementType> + <#if costDetail.category == procurementType.id>${procurementType.name} + + + + + <#-- --> +
+
+
+ 项目管理成本表 + + - - - - - - - - - - - - <#----> + + + + + + + + + + + + <#----> - - - -
${(costProjectManageDetail_index+1)!} - <#----> - <#if costProjectManageDetail.type ==1 > - 人工成本 - <#elseif costProjectManageDetail.type ==2> - 业务费用 - <#elseif costProjectManageDetail.type ==3> - 其他费用 - - readonly-->><#if costProjectManageDetail.deletable==1> - - - 序号财务费用类别业务项目项目明细单位数量单价总金额(元)预估计算方法预估依据备注操作
- 资金计划表 - - - - - - - - - - - - - - - - - <#-- --> - - - + + + + + + + + + + + + <#----> + + + + + +
月份设备支出工程支出(含服务+施工+其他)经营性开支保证金支出支出合计销售收款保证金收款收款合计资金余额资金利息垫资计划还款计划操作
<#-- + <#list costProjectManageDetails as costProjectManageDetail> +
${(costProjectManageDetail_index+1)!} + <#----> + <#if costProjectManageDetail.type ==1 > + 人工成本 + <#elseif costProjectManageDetail.type ==2> + 业务费用 + <#elseif costProjectManageDetail.type ==3> + 其他费用 + + readonly-->> + + <#if costProjectManageDetail.deletable==1> + + +
+
+
+ 资金计划表 + + + + + + + + + + + + + + + + + <#-- --> + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - <#if projectBudgetPlanDetails??> - <#list projectBudgetPlanDetails as projectBudgetPlanDetail> - - + - - - - - - - - - - - - - <#----> - - - + + + + + + + + + + + + + <#----> + + + + +
月份设备支出工程支出(含服务+施工+其他)经营性开支保证金支出支出合计销售收款保证金收款收款合计资金余额资金利息垫资计划还款计划操作
<#---->${projectBudgetPlanDetailTotal.month}
<#-- + <#list projectBudgetPlanDetails as projectBudgetPlanDetail> +
<#---->${projectBudgetPlanDetail.month!} - - - - - -
+ + + + + + + +
+
+ <#--收入明细表 + 采购成本明细表 + 项目管理成本表 + 资金计划表--> +
+ 收入 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
类别费用含税金额(元)不含税金额(元)
收入设备类
收入工程类
收入服务类
合计
+ 成本 + <#-- 采购成本明细表 + 项目管理成本表--> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
类别费用费用项目含税金额(元)不含税金额(元)
成本采购成本设备
成本采购成本施工
成本采购成本服务
成本采购成本其他
成本项目管理成本项目管理成本
成本其他${project.otherName!}
合计
+ 管理 + <#--资金计划表--> + + + + + + + + + + + + + + + + + + +
类别费用项目不含税金额(元)
财务费用资金占用成本
公司管理费用
@@ -935,104 +1218,145 @@ - 利润率计算 - - - - - - - - - - - - - - - - - - - - - - - -
类别
项目毛利(元)
项目毛利率(%)
项目贡献利润(元)
项目贡献利润率(%)
+ 利润率计算 + + + + + + + + + + + + + + + + + + + + + + + +
类别
项目毛利(元)
项目毛利率(%)
项目贡献利润(元)
项目贡献利润率(%)
- 现金流量表 - <#--资金计划表--> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
类别金额(元)
销售商品、提供劳务收到的现金
收到的税费返还/
收到其他与经营活动有关的现金
购买商品、接受劳务支付的现金
支付的各项税费/
支付其他与经营活动有关的现金
经营活动产生的现金流量净额
投资活动现金流入/
投资活动现金流出/
投资活动产生的现金流量净额/
融资资金流入
还款资金流出
筹资活动产生的现金流量净额
货币资金净增加额
+ 现金流量表 + <#--资金计划表--> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
类别金额(元)
销售商品、提供劳务收到的现金
收到的税费返还/
收到其他与经营活动有关的现金
购买商品、接受劳务支付的现金
支付的各项税费/
支付其他与经营活动有关的现金
经营活动产生的现金流量净额
投资活动现金流入/
投资活动现金流出/
投资活动产生的现金流量净额/
融资资金流入
还款资金流出
筹资活动产生的现金流量净额
货币资金净增加额
+
+
-
class="am-tab-panel am-fade am-in am-active" <#else> class="am-tab-panel am-fade am-in" id="tab4"> +
class="am-tab-panel am-fade am-in am-active" <#else> class="am-tab-panel am-fade am-in" + id="tab4"> <#if (project.status==10 || project.status==15) && project.approveStatusSettle == 1>
@@ -1042,11 +1366,12 @@ <#if (project.status==10 || project.status==15) && project.approveStatusSettle == 3>
- +
- +
@@ -1067,38 +1392,78 @@ 收入 设备类 - - - - - + + + + + 收入 工程类 - - - - - + + + + + 收入 服务类 - - - - - + + + + + 合计 - - - - - + + + + + @@ -1119,51 +1484,101 @@ 成本 采购成本 设备 - - - - - + + + + + 成本 采购成本 施工 - - - - - + + + + + 成本 采购成本 服务 - - - - - + + + + + 成本 采购成本 其他 - - - - - + + + + + 成本 项目管理成本 项目管理成本 - - - - - + + + + + 成本 @@ -1174,16 +1589,41 @@ + + + + + 合计 - - - - - + + + + + @@ -1202,38 +1642,74 @@ 财务费用 资金占用成本 - - - - - + + + + + 公司管理费用 - - - - - + + + + + 所得税费用 / / - - - + + + 合计 - - - - - + + + + + @@ -1252,30 +1728,63 @@ 项目毛利 - - - - - - + + + + + + 项目贡献利润 - - - - - - + + + + + + 项目净利润 / - /<#----> - - - - + + /<#----> + + + + @@ -1292,101 +1801,206 @@ 销售商品、提供劳务收到的现金 - - - - + + + + 收到的税费返还 / - - - + + + + 收到其他与经营活动有关的现金 - - - - + + + + 购买商品、接受劳务支付的现金 - - - - + + + + 支付的各项税费 / - - - + + + + 支付其他与经营活动有关的现金 - - - - + + + + 经营活动产生的现金流量净额 - - - - + + + + 投资活动现金流入 / - - - + + + 投资活动现金流出 / - - - + + + 投资活动产生的现金流量净额 / - - - + + + 融资资金流入 - - - - + + + + 还款资金流出 - - - - + + + + 筹资活动产生的现金流量净额 - - - - + + + + 货币资金净增加额 - - - - + + + + <#-- 合计 @@ -1414,7 +2028,7 @@ <#if project.status ==15 && project.approveStatusFinal == 3>
- + 收入 @@ -1429,34 +2043,66 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + +
收入 设备类
收入 工程类
收入 服务类
合计
@@ -1476,46 +2122,86 @@ 成本 采购成本 设备 - - - - + + + + 成本 采购成本 施工 - - - - + + + + 成本 采购成本 服务 - - - - + + + + 成本 采购成本 其他 - - - - + + + + 成本 项目管理成本 项目管理成本 - - - - + + + + 成本 @@ -1525,15 +2211,36 @@ + + + + 合计 - - - - + + + + @@ -1551,34 +2258,62 @@ 财务费用 资金占用成本 - - - - + + + + 公司管理费用 - - - - + + + + 所得税费用 / / - - + + 合计 - - - - + + + + @@ -1596,27 +2331,55 @@ 项目毛利 - - - - - + + + + + 项目贡献利润 - - - - - + + + + + 项目净利润 / - <#---->/ - - - + <#----> + / + + + + @@ -1632,87 +2395,161 @@ 销售商品、提供劳务收到的现金 - - - + + + 收到的税费返还 / - - + + 收到其他与经营活动有关的现金 - - - + + + 购买商品、接受劳务支付的现金 - - - + + + 支付的各项税费 / - - + + 支付其他与经营活动有关的现金 - - - + + + 经营活动产生的现金流量净额 - - - + + + 投资活动现金流入 / - - + + 投资活动现金流出 / - - + + 投资活动产生的现金流量净额 / - - + + 融资资金流入 - - - + + + 还款资金流出 - - - + + + 筹资活动产生的现金流量净额 - - - + + + 货币资金净增加额 - - - + + + <#-- 合计 @@ -1734,7 +2571,8 @@ <#list taskRecords as node>
  • -
    ${node.createTime} +
    ${node.createTime}
    ${node.roleName}-${node.assigneeName}: @@ -1920,9 +2758,9 @@ value="${Utils.format(costDetail.totalTaxExclude,'0')}" readonly> - <#-- --> + <#-- --> @@ -1990,7 +2828,8 @@ readonly-->> + <#--<#if costProjectManageDetail.deletable==0>readonly-->> + @@ -2063,7 +2902,7 @@ 资金利息 垫资计划 还款计划 - <#-- 操作--> + <#-- 操作--> <#--
    @@ -2238,10 +3077,11 @@
    @@ -2251,9 +3091,11 @@
    - *审核意见
    + *审核意见 +
    - +
  • @@ -2285,7 +3127,7 @@ 返回上一级 <#if adminId==project.approveId> - +
    @@ -2306,6 +3148,11 @@