Merge remote-tracking branch 'origin/master'

master
OathK1per 2021-11-22 10:37:10 +08:00
commit fd786bb1ae
4 changed files with 18 additions and 38 deletions

View File

@ -131,15 +131,9 @@ function calCostInclude() {
var $costTotalTaxInclude = $("input[name='costTotalTaxInclude']");
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(f2(costPurchaseDeviceTaxInclude) +f2(costPurchaseBuildTaxInclude)
+f2(costPurchaseServiceTaxInclude)+f2(costPurchaseOtherTaxInclude)
+f2(costProjectManageTaxInclude)+f2(costOtherOtherTaxInclude));
}
/**
* 统计成本(不含税)有一项没填就置空
@ -155,13 +149,7 @@ function calCostExclude() {
var $costTotalTaxExclude = $("input[name='costTotalTaxExclude']");
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(f2(costPurchaseDeviceTaxExclude)+f2(costPurchaseBuildTaxExclude)
+f2(costPurchaseServiceTaxExclude)+f2(costPurchaseOtherTaxExclude)
+f2(costProjectManageTaxExclude)+f2(costOtherOtherTaxExclude));
}

View File

@ -102,11 +102,7 @@ function calIncomeInclude() {
var $incomeTotalTaxInclude = $("input[name='incomeTotalTaxInclude']");
if(incomeDeviceTaxInclude && incomeEngineerTaxInclude && incomeServiceTaxInclude){
$incomeTotalTaxInclude.val(f2(incomeDeviceTaxInclude)+f2(incomeEngineerTaxInclude)+f2(incomeServiceTaxInclude));
}else {
$incomeTotalTaxInclude.val("");
}
$incomeTotalTaxInclude.val(f2(incomeDeviceTaxInclude)+f2(incomeEngineerTaxInclude)+f2(incomeServiceTaxInclude));
}
/**
* 统计收入(不含税)有一项没填就置空
@ -118,11 +114,7 @@ function calIncomeExclude() {
var $incomeTotalTaxExclude = $("input[name='incomeTotalTaxExclude']");
if(incomeDeviceTaxExclude && incomeEngineerTaxExclude && incomeServiceTaxExclude){
$incomeTotalTaxExclude.val(f2(incomeDeviceTaxExclude)+f2(incomeEngineerTaxExclude)+f2(incomeServiceTaxExclude));
}else {
$incomeTotalTaxExclude.val("");
}
$incomeTotalTaxExclude.val(f2(incomeDeviceTaxExclude)+f2(incomeEngineerTaxExclude)+f2(incomeServiceTaxExclude));
}
/**
@ -139,17 +131,18 @@ function calIncomeCost() {
var $projectContributionProfit = $("input[name='projectContributionProfit']");
var $projectContributionProfitRate = $("input[name='projectContributionProfitRate']");
if (incomeTotalTaxExclude && costTotalTaxExclude && costExpropriationTaxExclude) {
var incomeTotalTaxExcludeValue = f2(incomeTotalTaxExclude);
if (incomeTotalTaxExcludeValue != 0) {
$projectGrossProfit.val(f2(incomeTotalTaxExclude) - f2(costTotalTaxExclude) - f2(costExpropriationTaxExclude));
$projectGrossProfitRate.val(f2($projectGrossProfit.val()) * 100 / f2(incomeTotalTaxExclude));
$projectGrossProfitRate.val(f2(f2($projectGrossProfit.val()) * 100 / incomeTotalTaxExcludeValue));
} else {
$projectGrossProfit.val("");
$projectGrossProfitRate.val("");
}
if ($projectGrossProfit.val() && costCompanyManageTaxExclude) {
if ($projectGrossProfit.val()) {
$projectContributionProfit.val(f2($projectGrossProfit.val()) - f2(costCompanyManageTaxExclude));
$projectContributionProfitRate.val(f2($projectContributionProfit.val()) * 100 / f2(incomeTotalTaxExclude))
$projectContributionProfitRate.val(f2(f2($projectContributionProfit.val()) * 100 / f2(incomeTotalTaxExclude)))
} else {
$projectContributionProfit.val("");
$projectContributionProfitRate.val("");

View File

@ -330,6 +330,7 @@
</div>
</div>
<script src="${base}/assets/js/project_common.js"></script>
<script src="${base}/assets/js/project_estimate.js"></script>
<script>
$(function () {

View File

@ -94,14 +94,13 @@
<div class="am-form-group am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="startDate"
value="${startDate!}" placeholder="开始日期" data-am-datepicker>
value="${startDate!}" placeholder="开始日期" autocomplete="off" data-am-datepicker>
</div>
<div class="am-form-group">至</div>
<div class="am-form-group am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="endDate"
value="${endDate!}"
placeholder="结束日期" data-am-datepicker>
value="${endDate!}" placeholder="结束日期" autocomplete="off" data-am-datepicker>
</div>
</div>
</div>
@ -113,14 +112,13 @@
<div class="am-form-group am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="startUpdateDate"
value="${startUpdateDate!}" placeholder="开始日期" data-am-datepicker>
value="${startUpdateDate!}" placeholder="开始日期" autocomplete="off" data-am-datepicker>
</div>
<div class="am-form-group">至</div>
<div class="am-form-group am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="endUpdateDate"
value="${endUpdateDate!}"
placeholder="结束日期" data-am-datepicker>
value="${endUpdateDate!}" placeholder="结束日期" autocomplete="off" data-am-datepicker>
</div>
</div>
</div>