单价限制5位小数,分类型

master
OathK1per 2022-01-10 16:14:06 +08:00
parent efd4519ed5
commit b102cc214d
5 changed files with 54 additions and 52 deletions

View File

@ -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);

View File

@ -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"]

View File

@ -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"],

View File

@ -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"]

View File

@ -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));