From 653b8bc20ac5e951aa1286e31626440e2047c956 Mon Sep 17 00:00:00 2001 From: xxssyyyyssxx Date: Wed, 17 Nov 2021 16:47:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=BD=E5=90=8D=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_common.js | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main/resources/static/assets/js/project_common.js b/src/main/resources/static/assets/js/project_common.js index b70932b..c2a8cf6 100644 --- a/src/main/resources/static/assets/js/project_common.js +++ b/src/main/resources/static/assets/js/project_common.js @@ -59,14 +59,16 @@ function calCostInclude() { var costOtherOtherTaxInclude = $("input[name='costOtherOtherTaxInclude']").val(); - var costTotalTaxInclude = $("input[name='costTotalTaxInclude']"); + var $costTotalTaxInclude = $("input[name='costTotalTaxInclude']"); - if(costPurchaseDeviceTaxInclude && costPurchaseBuildTaxInclude && costPurchaseServiceTaxInclude && costPurchaseOtherTaxInclude && costProjectManageTaxInclude && costOtherOtherTaxInclude){ - costTotalTaxInclude.val(f2(costPurchaseDeviceTaxInclude) +f2(costPurchaseBuildTaxInclude) + if(costPurchaseDeviceTaxInclude && costPurchaseBuildTaxInclude + && costPurchaseServiceTaxInclude && costPurchaseOtherTaxInclude + && costProjectManageTaxInclude && costOtherOtherTaxInclude){ + $costTotalTaxInclude.val(f2(costPurchaseDeviceTaxInclude) +f2(costPurchaseBuildTaxInclude) +f2(costPurchaseServiceTaxInclude)+f2(costPurchaseOtherTaxInclude) +f2(costProjectManageTaxInclude)+f2(costOtherOtherTaxInclude)); }else { - costTotalTaxInclude.val(""); + $costTotalTaxInclude.val(""); } } /** @@ -81,13 +83,15 @@ function calCostExclude() { var costOtherOtherTaxExclude = $("input[name='costOtherOtherTaxExclude']").val(); - var costTotalTaxExclude = $("input[name='costTotalTaxExclude']"); + var $costTotalTaxExclude = $("input[name='costTotalTaxExclude']"); - if(costPurchaseDeviceTaxExclude && costPurchaseBuildTaxExclude && costPurchaseServiceTaxExclude && costPurchaseOtherTaxExclude && costProjectManageTaxExclude && costOtherOtherTaxExclude){ - costTotalTaxExclude.val(f2(costPurchaseDeviceTaxExclude)+f2(costPurchaseBuildTaxExclude) + if(costPurchaseDeviceTaxExclude && costPurchaseBuildTaxExclude + && costPurchaseServiceTaxExclude && costPurchaseOtherTaxExclude + && costProjectManageTaxExclude && costOtherOtherTaxExclude){ + $costTotalTaxExclude.val(f2(costPurchaseDeviceTaxExclude)+f2(costPurchaseBuildTaxExclude) +f2(costPurchaseServiceTaxExclude)+f2(costPurchaseOtherTaxExclude) +f2(costProjectManageTaxExclude)+f2(costOtherOtherTaxExclude)); }else { - costTotalTaxExclude.val(""); + $costTotalTaxExclude.val(""); } } \ No newline at end of file