974 lines
36 KiB
JavaScript
974 lines
36 KiB
JavaScript
function calculateSettle() {
|
|
|
|
$("input[name='incomeDevice']").change(function () {
|
|
calIncomeDeviceSettleTotal();
|
|
calIncomeTotal();
|
|
calIncomeSettleTotal();
|
|
calProfit();
|
|
});
|
|
$("input[name='incomeEngineer']").change(function () {
|
|
calIncomeEngineerSettleTotal();
|
|
calIncomeTotal();
|
|
calIncomeSettleTotal();
|
|
calProfit();
|
|
});
|
|
$("input[name='incomeService']").change(function () {
|
|
calIncomeServiceSettleTotal();
|
|
calIncomeTotal();
|
|
calIncomeSettleTotal();
|
|
calProfit();
|
|
});
|
|
|
|
|
|
$("input[name='costPurchaseDevice']").change(function () {
|
|
calCostPurchaseDeviceSettleTotal();
|
|
calCostTotal();
|
|
calCostSettleTotal();
|
|
calProfit();
|
|
});
|
|
$("input[name='costPurchaseBuild']").change(function () {
|
|
calCostPurchaseBuildSettleTotal();
|
|
calCostTotal();
|
|
calCostSettleTotal();
|
|
calProfit();
|
|
});
|
|
$("input[name='costPurchaseService']").change(function () {
|
|
calCostPurchaseServiceSettleTotal();
|
|
calCostTotal();
|
|
calCostSettleTotal();
|
|
calProfit();
|
|
});
|
|
$("input[name='costPurchaseOther']").change(function () {
|
|
calCostPurchaseOtherSettleTotal();
|
|
calCostTotal();
|
|
calCostSettleTotal();
|
|
calProfit();
|
|
});
|
|
$("input[name='costProjectManage']").change(function () {
|
|
calCostProjectManageSettleTotal();
|
|
calCostTotal();
|
|
calCostSettleTotal();
|
|
calProfit();
|
|
});
|
|
$("input[name='costOther']").change(function () {
|
|
calCostOtherSettleTotal();
|
|
calCostTotal();
|
|
calCostSettleTotal();
|
|
calProfit();
|
|
});
|
|
|
|
|
|
$("input[name='costExpropriation']").change(function () {
|
|
calCostExpropriationSettleTotal();
|
|
calCostManageTotal();
|
|
calCostManageSettleTotal();
|
|
calProfit();
|
|
});
|
|
$("input[name='costCompanyManage']").change(function () {
|
|
calCostCompanyManageSettleTotal();
|
|
calCostManageTotal();
|
|
calCostManageSettleTotal();
|
|
|
|
calContributionProfit();
|
|
calContributionProfitSettleTotal();
|
|
calContributionProfitProfitMargin();
|
|
calNetProfit();
|
|
calNetProfitSettleTotal();
|
|
calNetProfitProfitMargin();
|
|
});
|
|
$("input[name='costIncomeTax']").change(function () {
|
|
calCostIncomeTaxSettleTotal();
|
|
calCostManageTotal();
|
|
calCostManageSettleTotal();
|
|
|
|
calNetProfit();
|
|
calNetProfitSettleTotal();
|
|
calNetProfitProfitMargin();
|
|
});
|
|
|
|
|
|
// $("input[name='grossProfit']").change(function () {
|
|
// calGrossProfitSettleTotal();
|
|
// calGrossProfitProfitMargin();
|
|
// });
|
|
// $("input[name='contributionProfit']").change(function () {
|
|
// calContributionProfitSettleTotal();
|
|
// calContributionProfitProfitMargin();
|
|
// });
|
|
// $("input[name='netProfit']").change(function () {
|
|
// calNetProfitSettleTotal();
|
|
// calNetProfitProfitMargin();
|
|
// });
|
|
|
|
|
|
$("input[name='saleIncomeCash']").change(function () {
|
|
calSaleIncomeCashSettle();
|
|
calNetCashFlow();
|
|
calNetCashFlowSettle();
|
|
calNetIncreaseMonetaryFunds();
|
|
calNetIncreaseMonetaryFundsSettle();
|
|
});
|
|
$("input[name='taxReturn']").change(function () {
|
|
calTaxReturnSettle();
|
|
calNetCashFlow();
|
|
calNetCashFlowSettle();
|
|
calNetIncreaseMonetaryFunds();
|
|
calNetIncreaseMonetaryFundsSettle();
|
|
});
|
|
$("input[name='earnestMoneyIncome']").change(function () {
|
|
calEarnestMoneyIncomeSettle();
|
|
calNetCashFlow();
|
|
calNetCashFlowSettle();
|
|
calNetIncreaseMonetaryFunds();
|
|
calNetIncreaseMonetaryFundsSettle();
|
|
});
|
|
$("input[name='purchaseCost']").change(function () {
|
|
calPurchaseCostSettle();
|
|
calNetCashFlow();
|
|
calNetCashFlowSettle();
|
|
calNetIncreaseMonetaryFunds();
|
|
calNetIncreaseMonetaryFundsSettle();
|
|
});
|
|
$("input[name='taxCost']").change(function () {
|
|
calTaxCostSettle();
|
|
calNetCashFlow();
|
|
calNetCashFlowSettle();
|
|
calNetIncreaseMonetaryFunds();
|
|
calNetIncreaseMonetaryFundsSettle();
|
|
});
|
|
$("input[name='earnestMoneyCost']").change(function () {
|
|
calEarnestMoneyCostSettle();
|
|
calNetCashFlow();
|
|
calNetCashFlowSettle();
|
|
calNetIncreaseMonetaryFunds();
|
|
calNetIncreaseMonetaryFundsSettle();
|
|
});
|
|
// $("input[name='netCashFlow']").change(function () {
|
|
// calNetCashFlowSettle();
|
|
// calNetIncreaseMonetaryFunds();
|
|
// calCashFlowTotal();
|
|
// calCashFlowSettleTotal();
|
|
// });
|
|
$("input[name='cashInflowFromInvestingActivities']").change(function () {
|
|
calCashInflowFromInvestingActivitiesSettle();
|
|
calNetCashFromInvestingActivities();
|
|
calNetCashFromInvestingActivitiesSettle();
|
|
calNetIncreaseMonetaryFunds();
|
|
calNetIncreaseMonetaryFundsSettle();
|
|
});
|
|
$("input[name='cashOutflowFromInvestingActivities']").change(function () {
|
|
calCashOutflowFromInvestingActivitiesSettle();
|
|
calNetCashFromInvestingActivities();
|
|
calNetCashFromInvestingActivitiesSettle();
|
|
calNetIncreaseMonetaryFunds();
|
|
calNetIncreaseMonetaryFundsSettle();
|
|
});
|
|
// $("input[name='netCashFromInvestingActivities']").change(function () {
|
|
// calNetCashFromInvestingActivitiesSettle();
|
|
// calNetIncreaseMonetaryFunds();
|
|
// calCashFlowTotal();
|
|
// calCashFlowSettleTotal();
|
|
// });
|
|
$("input[name='financingCapitalInflow']").change(function () {
|
|
calFinancingCapitalInflowSettle();
|
|
calFinancingCapitalCashflow();
|
|
calFinancingCapitalCashflowSettle();
|
|
calNetIncreaseMonetaryFunds();
|
|
calNetIncreaseMonetaryFundsSettle();
|
|
});
|
|
$("input[name='financingCapitalOutflow']").change(function () {
|
|
calFinancingCapitalOutflowSettle();
|
|
calFinancingCapitalCashflow();
|
|
calFinancingCapitalCashflowSettle();
|
|
calNetIncreaseMonetaryFunds();
|
|
calNetIncreaseMonetaryFundsSettle();
|
|
});
|
|
// $("input[name='financingCapitalCashflow']").change(function () {
|
|
// calFinancingCapitalCashflowSettle();
|
|
// calNetIncreaseMonetaryFunds();
|
|
// calCashFlowTotal();
|
|
// calCashFlowSettleTotal();
|
|
// });
|
|
// $("input[name='netIncreaseMonetaryFunds']").change(function () {
|
|
// calNetIncreaseMonetaryFundsSettle();
|
|
// calCashFlowTotal();
|
|
// calCashFlowSettleTotal();
|
|
// });
|
|
|
|
}
|
|
|
|
/**
|
|
* 收入和支出均需调用的利润方法
|
|
*/
|
|
function calProfit() {
|
|
calGrossProfit();
|
|
calGrossProfitSettleTotal();
|
|
calGrossProfitProfitMargin();
|
|
calContributionProfit();
|
|
calContributionProfitSettleTotal();
|
|
calContributionProfitProfitMargin();
|
|
calNetProfit();
|
|
calNetProfitSettleTotal();
|
|
calNetProfitProfitMargin();
|
|
}
|
|
|
|
/**
|
|
* 收入设备类结算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calIncomeDeviceSettleTotal() {
|
|
var incomeDeviceFormerSettleTotal = $("input[name='incomeDeviceFormerSettleTotal']").val();
|
|
var incomeDevice = $("input[name='incomeDevice']").val();
|
|
|
|
var incomeDeviceSettleTotal = $("input[name='incomeDeviceSettleTotal']");
|
|
|
|
if(incomeDeviceFormerSettleTotal && incomeDevice){
|
|
incomeDeviceSettleTotal.val((parseFloat(incomeDeviceFormerSettleTotal)+parseFloat(incomeDevice)).toFixed(2));
|
|
}else {
|
|
incomeDeviceSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 收入工程类结算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calIncomeEngineerSettleTotal() {
|
|
var incomeEngineerFormerSettleTotal = $("input[name='incomeEngineerFormerSettleTotal']").val();
|
|
var incomeEngineer = $("input[name='incomeEngineer']").val();
|
|
|
|
var incomeEngineerSettleTotal = $("input[name='incomeEngineerSettleTotal']");
|
|
|
|
if(incomeEngineerFormerSettleTotal && incomeEngineer){
|
|
incomeEngineerSettleTotal.val((parseFloat(incomeEngineerFormerSettleTotal)+parseFloat(incomeEngineer)).toFixed(2));
|
|
}else {
|
|
incomeEngineerSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 收入服务类结算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calIncomeServiceSettleTotal() {
|
|
var incomeServiceFormerSettleTotal = $("input[name='incomeServiceFormerSettleTotal']").val();
|
|
var incomeService = $("input[name='incomeService']").val();
|
|
|
|
var incomeServiceSettleTotal = $("input[name='incomeServiceSettleTotal']");
|
|
|
|
if(incomeServiceFormerSettleTotal && incomeService){
|
|
incomeServiceSettleTotal.val((parseFloat(incomeServiceFormerSettleTotal)+parseFloat(incomeService)).toFixed(2));
|
|
}else {
|
|
incomeServiceSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 本月收入结算金额(不含税),有一项没填就置空
|
|
*/
|
|
function calIncomeTotal() {
|
|
var incomeDevice = $("input[name='incomeDevice']").val();
|
|
var incomeEngineer = $("input[name='incomeEngineer']").val();
|
|
var incomeService = $("input[name='incomeService']").val();
|
|
|
|
var incomeTotal = $("input[name='incomeTotal']");
|
|
|
|
if(incomeDevice && incomeEngineer && incomeService){
|
|
incomeTotal.val((parseFloat(incomeDevice)+parseFloat(incomeEngineer)+parseFloat(incomeService)).toFixed(2));
|
|
}else {
|
|
incomeTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 收入结算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calIncomeSettleTotal() {
|
|
var incomeDeviceSettleTotal = $("input[name='incomeDeviceSettleTotal']").val();
|
|
var incomeEngineerSettleTotal = $("input[name='incomeEngineerSettleTotal']").val();
|
|
var incomeServiceSettleTotal = $("input[name='incomeServiceSettleTotal']").val();
|
|
|
|
var incomeSettleTotal = $("input[name='incomeSettleTotal']");
|
|
|
|
if(incomeDeviceSettleTotal && incomeEngineerSettleTotal && incomeServiceSettleTotal){
|
|
incomeSettleTotal.val((parseFloat(incomeDeviceSettleTotal)+parseFloat(incomeEngineerSettleTotal)+parseFloat(incomeServiceSettleTotal)).toFixed(2));
|
|
}else {
|
|
incomeSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 采购成本设备结算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostPurchaseDeviceSettleTotal() {
|
|
var costPurchaseDeviceFormerSettleTotal = $("input[name='costPurchaseDeviceFormerSettleTotal']").val();
|
|
var costPurchaseDevice = $("input[name='costPurchaseDevice']").val();
|
|
|
|
var costPurchaseDeviceSettleTotal = $("input[name='costPurchaseDeviceSettleTotal']");
|
|
|
|
if(costPurchaseDeviceFormerSettleTotal && costPurchaseDevice){
|
|
costPurchaseDeviceSettleTotal.val((parseFloat(costPurchaseDeviceFormerSettleTotal)+parseFloat(costPurchaseDevice)).toFixed(2));
|
|
}else {
|
|
costPurchaseDeviceSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 采购成本施工结算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostPurchaseBuildSettleTotal() {
|
|
var costPurchaseBuildFormerSettleTotal = $("input[name='costPurchaseBuildFormerSettleTotal']").val();
|
|
var costPurchaseBuild = $("input[name='costPurchaseBuild']").val();
|
|
|
|
var costPurchaseBuildSettleTotal = $("input[name='costPurchaseBuildSettleTotal']");
|
|
|
|
if(costPurchaseBuildFormerSettleTotal && costPurchaseBuild){
|
|
costPurchaseBuildSettleTotal.val((parseFloat(costPurchaseBuildFormerSettleTotal)+parseFloat(costPurchaseBuild)).toFixed(2));
|
|
}else {
|
|
costPurchaseBuildSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 采购成本服务结算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostPurchaseServiceSettleTotal() {
|
|
var costPurchaseServiceFormerSettleTotal = $("input[name='costPurchaseServiceFormerSettleTotal']").val();
|
|
var costPurchaseService = $("input[name='costPurchaseService']").val();
|
|
|
|
var costPurchaseServiceSettleTotal = $("input[name='costPurchaseServiceSettleTotal']");
|
|
|
|
if(costPurchaseServiceFormerSettleTotal && costPurchaseService){
|
|
costPurchaseServiceSettleTotal.val((parseFloat(costPurchaseServiceFormerSettleTotal)+parseFloat(costPurchaseService)).toFixed(2));
|
|
}else {
|
|
costPurchaseServiceSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 采购成本其他结算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostPurchaseOtherSettleTotal() {
|
|
var costPurchaseOtherFormerSettleTotal = $("input[name='costPurchaseOtherFormerSettleTotal']").val();
|
|
var costPurchaseOther = $("input[name='costPurchaseOther']").val();
|
|
|
|
var costPurchaseOtherSettleTotal = $("input[name='costPurchaseOtherSettleTotal']");
|
|
|
|
if(costPurchaseOtherFormerSettleTotal && costPurchaseOther){
|
|
costPurchaseOtherSettleTotal.val((parseFloat(costPurchaseOtherFormerSettleTotal)+parseFloat(costPurchaseOther)).toFixed(2));
|
|
}else {
|
|
costPurchaseOtherSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 项目管理成本结算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostProjectManageSettleTotal() {
|
|
var costProjectManageFormerSettleTotal = $("input[name='costProjectManageFormerSettleTotal']").val();
|
|
var costProjectManage = $("input[name='costProjectManage']").val();
|
|
|
|
var costProjectManageSettleTotal = $("input[name='costProjectManageSettleTotal']");
|
|
|
|
if(costProjectManageFormerSettleTotal && costProjectManage){
|
|
costProjectManageSettleTotal.val((parseFloat(costProjectManageFormerSettleTotal)+parseFloat(costProjectManage)).toFixed(2));
|
|
}else {
|
|
costProjectManageSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 其他结算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostOtherSettleTotal() {
|
|
var costOtherFormerSettleTotal = $("input[name='costOtherFormerSettleTotal']").val();
|
|
var costOther = $("input[name='costOther']").val();
|
|
|
|
var costOtherSettleTotal = $("input[name='costOtherSettleTotal']");
|
|
|
|
if(costOtherFormerSettleTotal && costOther){
|
|
costOtherSettleTotal.val((parseFloat(costOtherFormerSettleTotal)+parseFloat(costOther)).toFixed(2));
|
|
}else {
|
|
costOtherSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 本月成本结算金额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostTotal() {
|
|
var costPurchaseDevice = $("input[name='costPurchaseDevice']").val();
|
|
var costPurchaseBuild = $("input[name='costPurchaseBuild']").val();
|
|
var costPurchaseService = $("input[name='costPurchaseService']").val();
|
|
var costPurchaseOther = $("input[name='costPurchaseOther']").val();
|
|
var costProjectManage = $("input[name='costProjectManage']").val();
|
|
var costOther = $("input[name='costOther']").val();
|
|
|
|
var costTotal = $("input[name='costTotal']");
|
|
|
|
if(costPurchaseDevice && costPurchaseBuild && costPurchaseService && costPurchaseOther && costProjectManage && costOther){
|
|
costTotal.val((parseFloat(costPurchaseDevice)+parseFloat(costPurchaseBuild)+parseFloat(costPurchaseService)+parseFloat(costPurchaseOther)+parseFloat(costProjectManage)+parseFloat(costOther)).toFixed(2));
|
|
}else {
|
|
costTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 成本决算总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostSettleTotal() {
|
|
var costPurchaseDeviceSettleTotal = $("input[name='costPurchaseDeviceSettleTotal']").val();
|
|
var costPurchaseBuildSettleTotal = $("input[name='costPurchaseBuildSettleTotal']").val();
|
|
var costPurchaseServiceSettleTotal = $("input[name='costPurchaseServiceSettleTotal']").val();
|
|
var costPurchaseOtherSettleTotal = $("input[name='costPurchaseOtherSettleTotal']").val();
|
|
var costProjectManageSettleTotal = $("input[name='costProjectManageSettleTotal']").val();
|
|
var costOtherSettleTotal = $("input[name='costOtherSettleTotal']").val();
|
|
|
|
var costSettleTotal = $("input[name='costSettleTotal']");
|
|
|
|
if(costPurchaseDeviceSettleTotal && costPurchaseBuildSettleTotal && costPurchaseServiceSettleTotal &&
|
|
costPurchaseOtherSettleTotal && costProjectManageSettleTotal && costOtherSettleTotal){
|
|
costSettleTotal.val((parseFloat(costPurchaseDeviceSettleTotal)+parseFloat(costPurchaseBuildSettleTotal)+parseFloat(costPurchaseServiceSettleTotal)+
|
|
parseFloat(costPurchaseOtherSettleTotal)+parseFloat(costProjectManageSettleTotal)+parseFloat(costOtherSettleTotal)).toFixed(2));
|
|
}else {
|
|
costSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 财务费用总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostExpropriationSettleTotal() {
|
|
var costExpropriationFormerSettleTotal = $("input[name='costExpropriationFormerSettleTotal']").val();
|
|
var costExpropriation = $("input[name='costExpropriation']").val();
|
|
|
|
var costExpropriationSettleTotal = $("input[name='costExpropriationSettleTotal']");
|
|
|
|
if(costExpropriationFormerSettleTotal && costExpropriation){
|
|
costExpropriationSettleTotal.val((parseFloat(costExpropriationFormerSettleTotal)+parseFloat(costExpropriation)).toFixed(2));
|
|
}else {
|
|
costExpropriationSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 公司管理费用总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostCompanyManageSettleTotal() {
|
|
var costCompanyManageFormerSettleTotal = $("input[name='costCompanyManageFormerSettleTotal']").val();
|
|
var costCompanyManage = $("input[name='costCompanyManage']").val();
|
|
|
|
var costCompanyManageSettleTotal = $("input[name='costCompanyManageSettleTotal']");
|
|
|
|
if(costCompanyManageFormerSettleTotal && costCompanyManage){
|
|
costCompanyManageSettleTotal.val((parseFloat(costCompanyManageFormerSettleTotal)+parseFloat(costCompanyManage)).toFixed(2));
|
|
}else {
|
|
costCompanyManageSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 所得税费用总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostIncomeTaxSettleTotal() {
|
|
var costIncomeTaxFormerSettleTotal = $("input[name='costIncomeTaxFormerSettleTotal']").val();
|
|
var costIncomeTax = $("input[name='costIncomeTax']").val();
|
|
|
|
var costIncomeTaxSettleTotal = $("input[name='costIncomeTaxSettleTotal']");
|
|
|
|
if(costIncomeTaxFormerSettleTotal && costIncomeTax){
|
|
costIncomeTaxSettleTotal.val((parseFloat(costIncomeTaxFormerSettleTotal)+parseFloat(costIncomeTax)).toFixed(2));
|
|
}else {
|
|
costIncomeTaxSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 本月管理成本总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostManageTotal() {
|
|
var costExpropriation = $("input[name='costExpropriation']").val();
|
|
var costCompanyManage = $("input[name='costCompanyManage']").val();
|
|
var costIncomeTax = $("input[name='costIncomeTax']").val();
|
|
|
|
var costManageTotal = $("input[name='costManageTotal']");
|
|
|
|
if(costExpropriation && costCompanyManage && costIncomeTax){
|
|
costManageTotal.val((parseFloat(costExpropriation)+parseFloat(costCompanyManage)+parseFloat(costIncomeTax)).toFixed(2));
|
|
}else {
|
|
costManageTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 管理成本总额(不含税),有一项没填就置空
|
|
*/
|
|
function calCostManageSettleTotal() {
|
|
var costExpropriationSettleTotal = $("input[name='costExpropriationSettleTotal']").val();
|
|
var costCompanyManageSettleTotal = $("input[name='costCompanyManageSettleTotal']").val();
|
|
var costIncomeTaxSettleTotal = $("input[name='costIncomeTaxSettleTotal']").val();
|
|
|
|
var costManageSettleTotal = $("input[name='costManageSettleTotal']");
|
|
|
|
if(costExpropriationSettleTotal && costCompanyManageSettleTotal && costIncomeTaxSettleTotal){
|
|
costManageSettleTotal.val((parseFloat(costExpropriationSettleTotal)+parseFloat(costCompanyManageSettleTotal)+parseFloat(costIncomeTaxSettleTotal)).toFixed(2));
|
|
}else {
|
|
costManageSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 本月项目毛利结算总额,有一项没填就置空
|
|
*/
|
|
function calGrossProfit() {
|
|
var incomeTotal = $("input[name='incomeTotal']").val();
|
|
var costTotal = $("input[name='costTotal']").val();
|
|
var costExpropriation = $("input[name='costExpropriation']").val();
|
|
|
|
var grossProfit = $("input[name='grossProfit']");
|
|
|
|
if(incomeTotal && costTotal && costExpropriation){
|
|
grossProfit.val((parseFloat(incomeTotal)-parseFloat(costTotal)-parseFloat(costExpropriation)).toFixed(2));
|
|
}else {
|
|
grossProfit.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 项目毛利结算总额,有一项没填就置空
|
|
*/
|
|
function calGrossProfitSettleTotal() {
|
|
var grossProfitFormerSettleTotal = $("input[name='grossProfitFormerSettleTotal']").val();
|
|
var grossProfit = $("input[name='grossProfit']").val();
|
|
|
|
var grossProfitSettleTotal = $("input[name='grossProfitSettleTotal']");
|
|
|
|
if(grossProfitFormerSettleTotal && grossProfit){
|
|
grossProfitSettleTotal.val((parseFloat(grossProfitFormerSettleTotal)+parseFloat(grossProfit)).toFixed(2));
|
|
}else {
|
|
grossProfitSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 项目毛利利润率,有一项没填就置空
|
|
*/
|
|
function calGrossProfitProfitMargin() {
|
|
var grossProfitSettleTotal = $("input[name='grossProfitSettleTotal']").val();
|
|
var incomeSettleTotal = $("input[name='incomeSettleTotal']").val();
|
|
|
|
var grossProfitProfitMargin = $("input[name='grossProfitProfitMargin']");
|
|
|
|
if(grossProfitSettleTotal && incomeSettleTotal){
|
|
grossProfitProfitMargin.val(f2(100*(parseFloat(grossProfitSettleTotal)/parseFloat(incomeSettleTotal))));
|
|
}else {
|
|
grossProfitProfitMargin.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 本月项目贡献利润,有一项没填就置空
|
|
*/
|
|
function calContributionProfit() {
|
|
var grossProfit = $("input[name='grossProfit']").val();
|
|
var costCompanyManage = $("input[name='costCompanyManage']").val();
|
|
|
|
var contributionProfit = $("input[name='contributionProfit']");
|
|
|
|
if(grossProfit && costCompanyManage){
|
|
contributionProfit.val((parseFloat(grossProfit)-parseFloat(costCompanyManage)).toFixed(2));
|
|
}else {
|
|
contributionProfit.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 项目贡献利润,有一项没填就置空
|
|
*/
|
|
function calContributionProfitSettleTotal() {
|
|
var contributionProfitFormerSettleTotal = $("input[name='contributionProfitFormerSettleTotal']").val();
|
|
var contributionProfit = $("input[name='contributionProfit']").val();
|
|
|
|
var contributionProfitSettleTotal = $("input[name='contributionProfitSettleTotal']");
|
|
|
|
if(contributionProfitFormerSettleTotal && contributionProfit){
|
|
contributionProfitSettleTotal.val((parseFloat(contributionProfitFormerSettleTotal)+parseFloat(contributionProfit)).toFixed(2));
|
|
}else {
|
|
contributionProfitSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 项目贡献利润率,有一项没填就置空
|
|
*/
|
|
function calContributionProfitProfitMargin() {
|
|
var contributionProfitSettleTotal = $("input[name='contributionProfitSettleTotal']").val();
|
|
var incomeSettleTotal = $("input[name='incomeSettleTotal']").val();
|
|
|
|
var contributionProfitProfitMargin = $("input[name='contributionProfitProfitMargin']");
|
|
|
|
if(contributionProfitSettleTotal && incomeSettleTotal){
|
|
contributionProfitProfitMargin.val(f2(100*(parseFloat(contributionProfitSettleTotal)/parseFloat(incomeSettleTotal))));
|
|
}else {
|
|
contributionProfitProfitMargin.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 本月项目净利润,有一项没填就置空
|
|
*/
|
|
function calNetProfit() {
|
|
var contributionProfit = $("input[name='contributionProfit']").val();
|
|
var costIncomeTax = $("input[name='costIncomeTax']").val();
|
|
|
|
var netProfit = $("input[name='netProfit']");
|
|
|
|
if(contributionProfit && costIncomeTax){
|
|
netProfit.val((parseFloat(contributionProfit)-parseFloat(costIncomeTax)).toFixed(2));
|
|
}else {
|
|
netProfit.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 项目净利润,有一项没填就置空
|
|
*/
|
|
function calNetProfitSettleTotal() {
|
|
var netProfitFormerSettleTotal = $("input[name='netProfitFormerSettleTotal']").val();
|
|
var netProfit = $("input[name='netProfit']").val();
|
|
|
|
var netProfitSettleTotal = $("input[name='netProfitSettleTotal']");
|
|
|
|
if(netProfitFormerSettleTotal && netProfit){
|
|
netProfitSettleTotal.val((parseFloat(netProfitFormerSettleTotal)+parseFloat(netProfit)).toFixed(2));
|
|
}else {
|
|
netProfitSettleTotal.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 项目净利润率,有一项没填就置空
|
|
*/
|
|
function calNetProfitProfitMargin() {
|
|
var netProfitSettleTotal = $("input[name='netProfitSettleTotal']").val();
|
|
var incomeSettleTotal = $("input[name='incomeSettleTotal']").val();
|
|
|
|
var netProfitProfitMargin = $("input[name='netProfitProfitMargin']");
|
|
|
|
if(netProfitSettleTotal && incomeSettleTotal){
|
|
netProfitProfitMargin.val(f2(100*(parseFloat(netProfitSettleTotal)/parseFloat(incomeSettleTotal))));
|
|
}else {
|
|
netProfitProfitMargin.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 销售商品、提供劳务收到的现金,有一项没填就置空
|
|
*/
|
|
function calSaleIncomeCashSettle() {
|
|
var saleIncomeCashFormerSettle = $("input[name='saleIncomeCashFormerSettle']").val();
|
|
var saleIncomeCash = $("input[name='saleIncomeCash']").val();
|
|
|
|
var saleIncomeCashSettle = $("input[name='saleIncomeCashSettle']");
|
|
|
|
if(saleIncomeCashFormerSettle && saleIncomeCash){
|
|
saleIncomeCashSettle.val((parseFloat(saleIncomeCashFormerSettle)+parseFloat(saleIncomeCash)).toFixed(2));
|
|
}else {
|
|
saleIncomeCashSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 收到的税费返还,有一项没填就置空
|
|
*/
|
|
function calTaxReturnSettle() {
|
|
var taxReturnFormerSettle = $("input[name='taxReturnFormerSettle']").val();
|
|
var taxReturn = $("input[name='taxReturn']").val();
|
|
|
|
var taxReturnSettle = $("input[name='taxReturnSettle']");
|
|
|
|
if(taxReturnFormerSettle && taxReturn){
|
|
taxReturnSettle.val((parseFloat(taxReturnFormerSettle)+parseFloat(taxReturn)).toFixed(2));
|
|
}else {
|
|
taxReturnSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 收到其他与经营活动有关的现金,有一项没填就置空
|
|
*/
|
|
function calEarnestMoneyIncomeSettle() {
|
|
var earnestMoneyIncomeFormerSettle = $("input[name='earnestMoneyIncomeFormerSettle']").val();
|
|
var earnestMoneyIncome = $("input[name='earnestMoneyIncome']").val();
|
|
|
|
var earnestMoneyIncomeSettle = $("input[name='earnestMoneyIncomeSettle']");
|
|
|
|
if(earnestMoneyIncomeFormerSettle && earnestMoneyIncome){
|
|
earnestMoneyIncomeSettle.val((parseFloat(earnestMoneyIncomeFormerSettle)+parseFloat(earnestMoneyIncome)).toFixed(2));
|
|
}else {
|
|
earnestMoneyIncomeSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 购买商品、接受劳务支付的现金,有一项没填就置空
|
|
*/
|
|
function calPurchaseCostSettle() {
|
|
var purchaseCostFormerSettle = $("input[name='purchaseCostFormerSettle']").val();
|
|
var purchaseCost = $("input[name='purchaseCost']").val();
|
|
|
|
var purchaseCostSettle = $("input[name='purchaseCostSettle']");
|
|
|
|
if(purchaseCostFormerSettle && purchaseCost){
|
|
purchaseCostSettle.val((parseFloat(purchaseCostFormerSettle)+parseFloat(purchaseCost)).toFixed(2));
|
|
}else {
|
|
purchaseCostSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 支付的各项税费,有一项没填就置空
|
|
*/
|
|
function calTaxCostSettle() {
|
|
var taxCostFormerSettle = $("input[name='taxCostFormerSettle']").val();
|
|
var taxCost = $("input[name='taxCost']").val();
|
|
|
|
var taxCostSettle = $("input[name='taxCostSettle']");
|
|
|
|
if(taxCostFormerSettle && taxCost){
|
|
taxCostSettle.val((parseFloat(taxCostFormerSettle)+parseFloat(taxCost)).toFixed(2));
|
|
}else {
|
|
taxCostSettle.val("");
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* 支付其他与经营活动有关的现金,有一项没填就置空
|
|
*/
|
|
function calEarnestMoneyCostSettle() {
|
|
var earnestMoneyCostFormerSettle = $("input[name='earnestMoneyCostFormerSettle']").val();
|
|
var earnestMoneyCost = $("input[name='earnestMoneyCost']").val();
|
|
|
|
var earnestMoneyCostSettle = $("input[name='earnestMoneyCostSettle']");
|
|
|
|
if(earnestMoneyCostFormerSettle && earnestMoneyCost){
|
|
earnestMoneyCostSettle.val((parseFloat(earnestMoneyCostFormerSettle)+parseFloat(earnestMoneyCost)).toFixed(2));
|
|
}else {
|
|
earnestMoneyCostSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 经营活动产生的现金流量净额,有一项没填就置空
|
|
*/
|
|
function calNetCashFlowSettle() {
|
|
var netCashFlowFormerSettle = $("input[name='netCashFlowFormerSettle']").val();
|
|
var netCashFlow = $("input[name='netCashFlow']").val();
|
|
|
|
var netCashFlowSettle = $("input[name='netCashFlowSettle']");
|
|
|
|
if(netCashFlowFormerSettle && netCashFlow){
|
|
netCashFlowSettle.val((parseFloat(netCashFlowFormerSettle)+parseFloat(netCashFlow)).toFixed(2));
|
|
}else {
|
|
netCashFlowSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 投资活动现金流入,有一项没填就置空
|
|
*/
|
|
function calCashInflowFromInvestingActivitiesSettle() {
|
|
var cashInflowFromInvestingActivitiesFormerSettle = $("input[name='cashInflowFromInvestingActivitiesFormerSettle']").val();
|
|
var cashInflowFromInvestingActivities = $("input[name='cashInflowFromInvestingActivities']").val();
|
|
|
|
var cashInflowFromInvestingActivitiesSettle = $("input[name='cashInflowFromInvestingActivitiesSettle']");
|
|
|
|
if(cashInflowFromInvestingActivitiesFormerSettle && cashInflowFromInvestingActivities){
|
|
cashInflowFromInvestingActivitiesSettle.val((parseFloat(cashInflowFromInvestingActivitiesFormerSettle)+parseFloat(cashInflowFromInvestingActivities)).toFixed(2));
|
|
}else {
|
|
cashInflowFromInvestingActivitiesSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 投资活动现金流出,有一项没填就置空
|
|
*/
|
|
function calCashOutflowFromInvestingActivitiesSettle() {
|
|
var cashOutflowFromInvestingActivitiesFormerSettle = $("input[name='cashOutflowFromInvestingActivitiesFormerSettle']").val();
|
|
var cashOutflowFromInvestingActivities = $("input[name='cashOutflowFromInvestingActivities']").val();
|
|
|
|
var cashOutflowFromInvestingActivitiesSettle = $("input[name='cashOutflowFromInvestingActivitiesSettle']");
|
|
|
|
if(cashOutflowFromInvestingActivitiesFormerSettle && cashOutflowFromInvestingActivities){
|
|
cashOutflowFromInvestingActivitiesSettle.val((parseFloat(cashOutflowFromInvestingActivitiesFormerSettle)+parseFloat(cashOutflowFromInvestingActivities)).toFixed(2));
|
|
}else {
|
|
cashOutflowFromInvestingActivitiesSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 投资活动产生的现金流量净额,有一项没填就置空
|
|
*/
|
|
function calNetCashFromInvestingActivitiesSettle() {
|
|
var netCashFromInvestingActivitiesFormerSettle = $("input[name='netCashFromInvestingActivitiesFormerSettle']").val();
|
|
var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']").val();
|
|
|
|
var netCashFromInvestingActivitiesSettle = $("input[name='netCashFromInvestingActivitiesSettle']");
|
|
|
|
if(netCashFromInvestingActivitiesFormerSettle && netCashFromInvestingActivities){
|
|
netCashFromInvestingActivitiesSettle.val((parseFloat(netCashFromInvestingActivitiesFormerSettle)+parseFloat(netCashFromInvestingActivities)).toFixed(2));
|
|
}else {
|
|
netCashFromInvestingActivitiesSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 融资资金流入,有一项没填就置空
|
|
*/
|
|
function calFinancingCapitalInflowSettle() {
|
|
var financingCapitalInflowFormerSettle = $("input[name='financingCapitalInflowFormerSettle']").val();
|
|
var financingCapitalInflow = $("input[name='financingCapitalInflow']").val();
|
|
|
|
var financingCapitalInflowSettle = $("input[name='financingCapitalInflowSettle']");
|
|
|
|
if(financingCapitalInflowFormerSettle && financingCapitalInflow){
|
|
financingCapitalInflowSettle.val((parseFloat(financingCapitalInflowFormerSettle)+parseFloat(financingCapitalInflow)).toFixed(2));
|
|
}else {
|
|
financingCapitalInflowSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 还款资金流出,有一项没填就置空
|
|
*/
|
|
function calFinancingCapitalOutflowSettle() {
|
|
var financingCapitalOutflowFormerSettle = $("input[name='financingCapitalOutflowFormerSettle']").val();
|
|
var financingCapitalOutflow = $("input[name='financingCapitalOutflow']").val();
|
|
|
|
var financingCapitalOutflowSettle = $("input[name='financingCapitalOutflowSettle']");
|
|
|
|
if(financingCapitalOutflowFormerSettle && financingCapitalOutflow){
|
|
financingCapitalOutflowSettle.val((parseFloat(financingCapitalOutflowFormerSettle)+parseFloat(financingCapitalOutflow)).toFixed(2));
|
|
}else {
|
|
financingCapitalOutflowSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 筹资活动产生的现金流量净额,有一项没填就置空
|
|
*/
|
|
function calFinancingCapitalCashflowSettle() {
|
|
var financingCapitalCashflowFormerSettle = $("input[name='financingCapitalCashflowFormerSettle']").val();
|
|
var financingCapitalCashflow = $("input[name='financingCapitalCashflow']").val();
|
|
|
|
var financingCapitalCashflowSettle = $("input[name='financingCapitalCashflowSettle']");
|
|
|
|
if(financingCapitalCashflowFormerSettle && financingCapitalCashflow){
|
|
financingCapitalCashflowSettle.val((parseFloat(financingCapitalCashflowFormerSettle)+parseFloat(financingCapitalCashflow)).toFixed(2));
|
|
}else {
|
|
financingCapitalCashflowSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 货币资金净增加额,有一项没填就置空
|
|
*/
|
|
function calNetIncreaseMonetaryFundsSettle() {
|
|
var netIncreaseMonetaryFundsFormerSettle = $("input[name='netIncreaseMonetaryFundsFormerSettle']").val();
|
|
var netIncreaseMonetaryFunds = $("input[name='netIncreaseMonetaryFunds']").val();
|
|
|
|
var netIncreaseMonetaryFundsSettle = $("input[name='netIncreaseMonetaryFundsSettle']");
|
|
|
|
if(netIncreaseMonetaryFundsFormerSettle && netIncreaseMonetaryFunds){
|
|
netIncreaseMonetaryFundsSettle.val((parseFloat(netIncreaseMonetaryFundsFormerSettle)+parseFloat(netIncreaseMonetaryFunds)).toFixed(2));
|
|
}else {
|
|
netIncreaseMonetaryFundsSettle.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 本月经营活动产生的现金流量净额,有一项没填就置空
|
|
*/
|
|
function calNetCashFlow() {
|
|
var saleIncomeCash = $("input[name='saleIncomeCash']").val();
|
|
var taxReturn = $("input[name='taxReturn']").val();
|
|
var earnestMoneyIncome = $("input[name='earnestMoneyIncome']").val();
|
|
var purchaseCost = $("input[name='purchaseCost']").val();
|
|
var taxCost = $("input[name='taxCost']").val();
|
|
var earnestMoneyCost = $("input[name='earnestMoneyCost']").val();
|
|
|
|
var netCashFlow = $("input[name='netCashFlow']");
|
|
|
|
if(saleIncomeCash && taxReturn && earnestMoneyIncome &&
|
|
purchaseCost && taxCost && earnestMoneyCost) {
|
|
netCashFlow.val((parseFloat(saleIncomeCash)+parseFloat(taxReturn)+parseFloat(earnestMoneyIncome)-
|
|
parseFloat(purchaseCost)-parseFloat(taxCost)-parseFloat(earnestMoneyCost)).toFixed(2));
|
|
}else {
|
|
netCashFlow.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 本月投资活动产生的现金流量净额,有一项没填就置空
|
|
*/
|
|
function calNetCashFromInvestingActivities() {
|
|
var cashInflowFromInvestingActivities = $("input[name='cashInflowFromInvestingActivities']").val();
|
|
var cashOutflowFromInvestingActivities = $("input[name='cashOutflowFromInvestingActivities']").val();
|
|
|
|
var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']");
|
|
|
|
if(cashInflowFromInvestingActivities && cashOutflowFromInvestingActivities){
|
|
netCashFromInvestingActivities.val((parseFloat(cashInflowFromInvestingActivities)-parseFloat(cashOutflowFromInvestingActivities)).toFixed(2));
|
|
}else {
|
|
netCashFromInvestingActivities.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 本月筹资活动产生的现金流量净额,有一项没填就置空
|
|
*/
|
|
function calFinancingCapitalCashflow() {
|
|
var financingCapitalInflow = $("input[name='financingCapitalInflow']").val();
|
|
var financingCapitalOutflow = $("input[name='financingCapitalOutflow']").val();
|
|
|
|
var financingCapitalCashflow = $("input[name='financingCapitalCashflow']");
|
|
|
|
if(financingCapitalInflow && financingCapitalOutflow){
|
|
financingCapitalCashflow.val((parseFloat(financingCapitalInflow)-parseFloat(financingCapitalOutflow)).toFixed(2));
|
|
}else {
|
|
financingCapitalCashflow.val("");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 本月货币资金净增加额,有一项没填就置空
|
|
*/
|
|
function calNetIncreaseMonetaryFunds() {
|
|
var netCashFlow = $("input[name='netCashFlow']").val();
|
|
var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']").val();
|
|
var financingCapitalCashflow = $("input[name='financingCapitalCashflow']").val();
|
|
|
|
var netIncreaseMonetaryFunds = $("input[name='netIncreaseMonetaryFunds']");
|
|
|
|
if(netCashFlow && netCashFromInvestingActivities && financingCapitalCashflow){
|
|
netIncreaseMonetaryFunds.val((parseFloat(netCashFlow)+parseFloat(netCashFromInvestingActivities)+parseFloat(financingCapitalCashflow)).toFixed(2));
|
|
}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;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|