未完成文件上传
parent
122e560b21
commit
8050f16a11
|
@ -107,8 +107,8 @@ $(function () {
|
||||||
|
|
||||||
//如果没有提交则自动计算预算信息
|
//如果没有提交则自动计算预算信息
|
||||||
dataIncome = prepareAjaxDataVerify(dataIncome, INCOME_DETAIL2, $("#id").val());
|
dataIncome = prepareAjaxDataVerify(dataIncome, INCOME_DETAIL2, $("#id").val());
|
||||||
if(dataIncome.details){
|
if (dataIncome.details) {
|
||||||
postAjax(base+"/project/budgetEditSaveIncomeDetail", dataIncome);
|
postAjax(base + "/project/budgetEditSaveIncomeDetail", dataIncome);
|
||||||
}
|
}
|
||||||
updateIncomeDataUnsubmit(dataIncomeCheck);
|
updateIncomeDataUnsubmit(dataIncomeCheck);
|
||||||
|
|
||||||
|
@ -127,8 +127,8 @@ $(function () {
|
||||||
|
|
||||||
//如果没有提交则自动计算预算信息
|
//如果没有提交则自动计算预算信息
|
||||||
dataCost = prepareAjaxDataVerify(dataCost, COST_DETAIL2, $("#id").val());
|
dataCost = prepareAjaxDataVerify(dataCost, COST_DETAIL2, $("#id").val());
|
||||||
if(dataCost){
|
if (dataCost) {
|
||||||
postAjax(base+"/project/budgetEditSaveCostDetail", dataCost);
|
postAjax(base + "/project/budgetEditSaveCostDetail", dataCost);
|
||||||
}
|
}
|
||||||
updateCostDataIfUnsubmit(dataCostCheck);
|
updateCostDataIfUnsubmit(dataCostCheck);
|
||||||
|
|
||||||
|
@ -146,17 +146,9 @@ $(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
dataManage = prepareAjaxDataVerify(dataManage, COST_PROJECT_MANAGE_DETAIL2, $("#id").val());
|
dataManage = prepareAjaxDataVerify(dataManage, COST_PROJECT_MANAGE_DETAIL2, $("#id").val());
|
||||||
var totalTotal=dataManage.details.reduce((total,now)=>{
|
|
||||||
return now.total+total
|
if (dataManage) {
|
||||||
},0)
|
postAjax(base + "/project/budgetEditSaveCostProjectManageDetail", dataManage);
|
||||||
var projectGrossProfitA=$('[name="projectGrossProfitA"]').val()
|
|
||||||
if(Number(totalTotal)> (Number(projectGrossProfitA)*0.1) ){
|
|
||||||
layuiAlert(`总金额合计不能超过毛利A(${projectGrossProfitA})的10%`);
|
|
||||||
$("#saveDraft").attr('disabled', false)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if(dataManage){
|
|
||||||
postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", dataManage);
|
|
||||||
}
|
}
|
||||||
updateCostProjectManageDataUnsubmit(dataManageCheck);
|
updateCostProjectManageDataUnsubmit(dataManageCheck);
|
||||||
|
|
||||||
|
@ -182,8 +174,8 @@ $(function () {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
dataPlan = prepareAjaxDataVerify(dataPlan, BUDGET_PLAN_DETAIL2, $("#id").val());
|
dataPlan = prepareAjaxDataVerify(dataPlan, BUDGET_PLAN_DETAIL2, $("#id").val());
|
||||||
if(dataPlan){
|
if (dataPlan) {
|
||||||
postAjax(base+"/project/budgetEditSaveBudgetPlanDetail", dataPlan);
|
postAjax(base + "/project/budgetEditSaveBudgetPlanDetail", dataPlan);
|
||||||
}
|
}
|
||||||
updateBudgetPlanDetailDataUnsubmit();
|
updateBudgetPlanDetailDataUnsubmit();
|
||||||
|
|
||||||
|
@ -195,15 +187,15 @@ $(function () {
|
||||||
// }
|
// }
|
||||||
// console.log(message);
|
// console.log(message);
|
||||||
// 保存付款计划表
|
// 保存付款计划表
|
||||||
var flagPay= verifyBudgetPay()
|
var flagPay = verifyBudgetPay()
|
||||||
if(!flagPay) {
|
if (!flagPay) {
|
||||||
$("#saveDraft").attr('disabled', false)
|
$("#saveDraft").attr('disabled', false)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var dataPay = collectData("am-modal-prompt-input-pay");
|
var dataPay = collectData("am-modal-prompt-input-pay");
|
||||||
dataPay = prepareAjaxDataVerify(dataPay, pay_DETAIL2, $("#id").val());
|
dataPay = prepareAjaxDataVerify(dataPay, pay_DETAIL2, $("#id").val());
|
||||||
if(dataPay){
|
if (dataPay) {
|
||||||
postAjax(base+"/project/budgetEditSaveBudgetPayPlan", dataPay);
|
postAjax(base + "/project/budgetEditSaveBudgetPayPlan", dataPay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -245,8 +237,8 @@ $(function () {
|
||||||
|
|
||||||
//如果没有提交则自动计算预算信息
|
//如果没有提交则自动计算预算信息
|
||||||
dataIncome = prepareAjaxDataVerify(dataIncome, INCOME_DETAIL, $("#id").val());
|
dataIncome = prepareAjaxDataVerify(dataIncome, INCOME_DETAIL, $("#id").val());
|
||||||
if(dataIncome.details){
|
if (dataIncome.details) {
|
||||||
postAjax(base+"/project/budgetEditSaveIncomeDetail", dataIncome);
|
postAjax(base + "/project/budgetEditSaveIncomeDetail", dataIncome);
|
||||||
}
|
}
|
||||||
updateIncomeDataUnsubmit(dataIncomeCheck);
|
updateIncomeDataUnsubmit(dataIncomeCheck);
|
||||||
|
|
||||||
|
@ -265,8 +257,8 @@ $(function () {
|
||||||
|
|
||||||
//如果没有提交则自动计算预算信息
|
//如果没有提交则自动计算预算信息
|
||||||
dataCost = prepareAjaxDataVerify(dataCost, COST_DETAIL, $("#id").val());
|
dataCost = prepareAjaxDataVerify(dataCost, COST_DETAIL, $("#id").val());
|
||||||
if(dataCost){
|
if (dataCost) {
|
||||||
postAjax(base+"/project/budgetEditSaveCostDetail", dataCost);
|
postAjax(base + "/project/budgetEditSaveCostDetail", dataCost);
|
||||||
}
|
}
|
||||||
updateCostDataIfUnsubmit(dataCostCheck);
|
updateCostDataIfUnsubmit(dataCostCheck);
|
||||||
|
|
||||||
|
@ -285,16 +277,22 @@ $(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
dataManage = prepareAjaxDataVerify(dataManage, COST_PROJECT_MANAGE_DETAIL, $("#id").val());
|
dataManage = prepareAjaxDataVerify(dataManage, COST_PROJECT_MANAGE_DETAIL, $("#id").val());
|
||||||
var totalTotal=dataManage.details.reduce((total,now)=>{
|
var totalTotal = dataManage.details.reduce((total, now) => {
|
||||||
return now.total+total
|
return now.total + total
|
||||||
},0)
|
}, 0)
|
||||||
var projectGrossProfitA=$('[name="projectGrossProfitA"]').val()
|
var limitTotal = dataManage.details.reduce((total, now) => {
|
||||||
if(Number(totalTotal)> (Number(projectGrossProfitA)*0.1) ){
|
if (now.type == 2 && (now.name == 5 || now.name == 4))
|
||||||
layuiAlert(`总金额合计不能超过毛利A(${projectGrossProfitA})的10%`);
|
return now.total + total
|
||||||
|
else return total
|
||||||
|
}, 0)
|
||||||
|
var projectGrossProfitA = $('[name="projectGrossProfitA"]').val()
|
||||||
|
if (limitTotal > ((Number(projectGrossProfitA)-(totalTotal-limitTotal)) * 0.1)) {
|
||||||
|
layuiAlert(`差旅费+业务费总金额不超过【毛利A(${projectGrossProfitA})-(项目管理费用-差旅费-业务费)】*10%`);
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(dataManage){
|
if (dataManage) {
|
||||||
postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", dataManage);
|
postAjax(base + "/project/budgetEditSaveCostProjectManageDetail", dataManage);
|
||||||
}
|
}
|
||||||
updateCostProjectManageDataUnsubmit(dataManageCheck);
|
updateCostProjectManageDataUnsubmit(dataManageCheck);
|
||||||
|
|
||||||
|
@ -321,8 +319,8 @@ $(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
dataPlan = prepareAjaxDataVerify(dataPlan, BUDGET_PLAN_DETAIL, $("#id").val());
|
dataPlan = prepareAjaxDataVerify(dataPlan, BUDGET_PLAN_DETAIL, $("#id").val());
|
||||||
if(dataPlan){
|
if (dataPlan) {
|
||||||
postAjax(base+"/project/budgetEditSaveBudgetPlanDetail", dataPlan);
|
postAjax(base + "/project/budgetEditSaveBudgetPlanDetail", dataPlan);
|
||||||
}
|
}
|
||||||
updateBudgetPlanDetailDataUnsubmit();
|
updateBudgetPlanDetailDataUnsubmit();
|
||||||
|
|
||||||
|
@ -333,15 +331,15 @@ $(function () {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// 保存付款计划表
|
// 保存付款计划表
|
||||||
var flagPay= verifyBudgetPay()
|
var flagPay = verifyBudgetPay()
|
||||||
if(!flagPay) {
|
if (!flagPay) {
|
||||||
$("#saveDraft").attr('disabled', false)
|
$("#saveDraft").attr('disabled', false)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var dataPay = collectData("am-modal-prompt-input-pay");
|
var dataPay = collectData("am-modal-prompt-input-pay");
|
||||||
dataPay = prepareAjaxDataVerify(dataPay, pay_DETAIL2, $("#id").val());
|
dataPay = prepareAjaxDataVerify(dataPay, pay_DETAIL2, $("#id").val());
|
||||||
if(dataPay){
|
if (dataPay) {
|
||||||
postAjax(base+"/project/budgetEditSaveBudgetPayPlan", dataPay);
|
postAjax(base + "/project/budgetEditSaveBudgetPayPlan", dataPay);
|
||||||
}
|
}
|
||||||
|
|
||||||
var startTime = $("#startDate").val();
|
var startTime = $("#startDate").val();
|
||||||
|
@ -358,7 +356,7 @@ $(function () {
|
||||||
$("#pmsForm").submit();
|
$("#pmsForm").submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkName () {
|
function checkName() {
|
||||||
var name = $("#name").val();
|
var name = $("#name").val();
|
||||||
var id = $("#id").val();
|
var id = $("#id").val();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -412,8 +410,6 @@ function checkIfFillIn() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if (projectNo.length <= 0) {
|
// if (projectNo.length <= 0) {
|
||||||
// window.confirm('项目编号不能为空');
|
// window.confirm('项目编号不能为空');
|
||||||
// check = 1;
|
// check = 1;
|
||||||
|
@ -428,9 +424,6 @@ function checkIfFillIn() {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (underwrittenMode > 2 && (advanceInterestAmount == undefined || advanceInterestAmount.length <= 0)) {
|
if (underwrittenMode > 2 && (advanceInterestAmount == undefined || advanceInterestAmount.length <= 0)) {
|
||||||
window.confirm('垫资利息不能为空');
|
window.confirm('垫资利息不能为空');
|
||||||
check = 1;
|
check = 1;
|
||||||
|
@ -525,7 +518,7 @@ function checkIfFillIn() {
|
||||||
/**
|
/**
|
||||||
* 判断是否重名
|
* 判断是否重名
|
||||||
*/
|
*/
|
||||||
function checkName () {
|
function checkName() {
|
||||||
var name = $("#name").val();
|
var name = $("#name").val();
|
||||||
var id = $("#id").val();
|
var id = $("#id").val();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -590,12 +583,12 @@ function arr2ObjectVerify(line, arr, detailPropertyArr, detailProperty) {
|
||||||
}
|
}
|
||||||
//如果要求是数字类型的,进行转换
|
//如果要求是数字类型的,进行转换
|
||||||
var v = arr[i];
|
var v = arr[i];
|
||||||
if(o[2] === 'number' ){
|
if (o[2] === 'number') {
|
||||||
v = f2(v);
|
v = f2(v);
|
||||||
} else if(o[2] === 'price' ){
|
} else if (o[2] === 'price') {
|
||||||
v = f5(v);
|
v = f5(v);
|
||||||
}
|
}
|
||||||
obj[detailPropertyArr[i]]=v;
|
obj[detailPropertyArr[i]] = v;
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
@ -622,8 +615,8 @@ function arr2ObjectVerifyCheck(line, arr, detailPropertyArr, detailProperty, s)
|
||||||
function collectData(className) {
|
function collectData(className) {
|
||||||
var a = [];
|
var a = [];
|
||||||
$("." + className).each(function (t) {
|
$("." + className).each(function (t) {
|
||||||
if(!$(this).is(':hidden'))
|
if (!$(this).is(':hidden'))
|
||||||
a.push($(this).val());
|
a.push($(this).val());
|
||||||
});
|
});
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
@ -726,7 +719,7 @@ function bindChangeableInput() {
|
||||||
|
|
||||||
$(this).parent().parent().find(".input-changeable-total-tax-include").val(f2Fixed(amount * price));
|
$(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).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(amount * price / (1 + taxRate / 100)));
|
||||||
$(this).parent().parent().find(".input-changeable-total-tax").val(f2Fixed(amount * price * taxRate /(100 + taxRate)));
|
$(this).parent().parent().find(".input-changeable-total-tax").val(f2Fixed(amount * price * taxRate / (100 + taxRate)));
|
||||||
});
|
});
|
||||||
//单价改变
|
//单价改变
|
||||||
$(".input-changeable-price").change(function () {
|
$(".input-changeable-price").change(function () {
|
||||||
|
@ -738,21 +731,21 @@ function bindChangeableInput() {
|
||||||
|
|
||||||
$(this).parent().parent().find(".input-changeable-total-tax-include").val(f2Fixed(amount * price));
|
$(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).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(amount * price / (1 + taxRate / 100)));
|
||||||
$(this).parent().parent().find(".input-changeable-total-tax").val(f2Fixed(amount * price * taxRate /(100 + taxRate)));
|
$(this).parent().parent().find(".input-changeable-total-tax").val(f2Fixed(amount * price * taxRate / (100 + taxRate)));
|
||||||
$(this).val(f5Price(price));
|
$(this).val(f5Price(price));
|
||||||
console.log("单价:" + $(this).val());
|
console.log("单价:" + $(this).val());
|
||||||
});
|
});
|
||||||
//税率改变
|
//税率改变
|
||||||
$(".input-changeable-tax-rate").change(function () {
|
$(".input-changeable-tax-rate").change(function () {
|
||||||
var taxRate = f2($(this).val());
|
var taxRate = f2($(this).val());
|
||||||
var rowVal=$(this).parent().parent().find(".input-changeable-total-tax-include").val()
|
var rowVal = $(this).parent().parent().find(".input-changeable-total-tax-include").val()
|
||||||
$(this).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(rowVal * (1 - (taxRate / 100))));
|
$(this).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(rowVal * (1 - (taxRate / 100))));
|
||||||
$(this).parent().parent().find(".input-changeable-total-tax").val(f2Fixed(rowVal * (taxRate / 100)));
|
$(this).parent().parent().find(".input-changeable-total-tax").val(f2Fixed(rowVal * (taxRate / 100)));
|
||||||
});
|
});
|
||||||
// 不含税金额改变
|
// 不含税金额改变
|
||||||
$(".input-changeable-total-tax-include").change(function () {
|
$(".input-changeable-total-tax-include").change(function () {
|
||||||
var rowVal = f2($(this).val());
|
var rowVal = f2($(this).val());
|
||||||
var taxRate=$(this).parent().parent().find(".input-changeable-tax-rate").val()
|
var taxRate = $(this).parent().parent().find(".input-changeable-tax-rate").val()
|
||||||
$(this).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(rowVal * (1 - (taxRate / 100))));
|
$(this).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(rowVal * (1 - (taxRate / 100))));
|
||||||
$(this).parent().parent().find(".input-changeable-total-tax").val(f2Fixed(rowVal * (taxRate / 100)));
|
$(this).parent().parent().find(".input-changeable-total-tax").val(f2Fixed(rowVal * (taxRate / 100)));
|
||||||
});
|
});
|
||||||
|
@ -766,11 +759,11 @@ function bindChangeableInput() {
|
||||||
function updateTotal(className, totalClassName) {
|
function updateTotal(className, totalClassName) {
|
||||||
var total = 0;
|
var total = 0;
|
||||||
//找到本列所有的
|
//找到本列所有的
|
||||||
$("."+className).each(function (t) {
|
$("." + className).each(function (t) {
|
||||||
total += f2($(this).val());
|
total += f2($(this).val());
|
||||||
console.log("total2: " + total);
|
console.log("total2: " + total);
|
||||||
});
|
});
|
||||||
$("."+totalClassName).val(f2Fixed(total));
|
$("." + totalClassName).val(f2Fixed(total));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -781,18 +774,18 @@ function updateTotal(className, totalClassName) {
|
||||||
function updateAmount(className, totalClassName) {
|
function updateAmount(className, totalClassName) {
|
||||||
var total = 0;
|
var total = 0;
|
||||||
//找到本列所有的
|
//找到本列所有的
|
||||||
$("."+className).each(function (t) {
|
$("." + className).each(function (t) {
|
||||||
console.log(className + ": " + f2($(this).val()));
|
console.log(className + ": " + f2($(this).val()));
|
||||||
total += f2($(this).val());
|
total += f2($(this).val());
|
||||||
});
|
});
|
||||||
$("."+totalClassName).val(f2Fixed(total));
|
$("." + totalClassName).val(f2Fixed(total));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定序号
|
* 绑定序号
|
||||||
*/
|
*/
|
||||||
function bindNum() {
|
function bindNum() {
|
||||||
$(".input-budget-num").each(function(t) {
|
$(".input-budget-num").each(function (t) {
|
||||||
var prevIndex = $(this).parent().parent().prev("tr").find(".input-budget-num").val();
|
var prevIndex = $(this).parent().parent().prev("tr").find(".input-budget-num").val();
|
||||||
$(this).val(f2(prevIndex) + 1);
|
$(this).val(f2(prevIndex) + 1);
|
||||||
});
|
});
|
||||||
|
@ -864,19 +857,19 @@ function updateCostDataIfUnsubmit(details) {
|
||||||
var otherTaxInclude = 0;
|
var otherTaxInclude = 0;
|
||||||
var otherTaxExclude = 0;
|
var otherTaxExclude = 0;
|
||||||
details.forEach(function (t, number, ts) {
|
details.forEach(function (t, number, ts) {
|
||||||
if(t["type"] == "1"){
|
if (t["type"] == "1") {
|
||||||
//设备类
|
//设备类
|
||||||
deviceTaxInclude += f2(t["totalTaxInclude"]);
|
deviceTaxInclude += f2(t["totalTaxInclude"]);
|
||||||
deviceTaxExclude += f2(t["totalTaxExclude"]);
|
deviceTaxExclude += f2(t["totalTaxExclude"]);
|
||||||
}else if(t["type"] == "2"){
|
} else if (t["type"] == "2") {
|
||||||
//施工类
|
//施工类
|
||||||
buildTaxInclude += f2(t["totalTaxInclude"]);
|
buildTaxInclude += f2(t["totalTaxInclude"]);
|
||||||
buildTaxExclude += f2(t["totalTaxExclude"]);
|
buildTaxExclude += f2(t["totalTaxExclude"]);
|
||||||
}else if(t["type"] == "3"){
|
} else if (t["type"] == "3") {
|
||||||
//服务类
|
//服务类
|
||||||
serviceTaxInclude += f2(t["totalTaxInclude"]);
|
serviceTaxInclude += f2(t["totalTaxInclude"]);
|
||||||
serviceTaxExclude += f2(t["totalTaxExclude"]);
|
serviceTaxExclude += f2(t["totalTaxExclude"]);
|
||||||
}else if(t["type"] == "4"){
|
} else if (t["type"] == "4") {
|
||||||
//其他类
|
//其他类
|
||||||
otherTaxInclude += f2(t["totalTaxInclude"]);
|
otherTaxInclude += f2(t["totalTaxInclude"]);
|
||||||
otherTaxExclude += f2(t["totalTaxExclude"]);
|
otherTaxExclude += f2(t["totalTaxExclude"]);
|
||||||
|
@ -893,10 +886,10 @@ function updateCostDataIfUnsubmit(details) {
|
||||||
|
|
||||||
//资金计划表中的
|
//资金计划表中的
|
||||||
$(".input-total-title-device-cost-budget-plan").val(f2Fixed(deviceTaxInclude));
|
$(".input-total-title-device-cost-budget-plan").val(f2Fixed(deviceTaxInclude));
|
||||||
$(".input-total-title-engineer-cost-budget-plan").val(f2Fixed(f2(serviceTaxInclude)+f2(buildTaxInclude)+f2(otherTaxInclude)));
|
$(".input-total-title-engineer-cost-budget-plan").val(f2Fixed(f2(serviceTaxInclude) + f2(buildTaxInclude) + f2(otherTaxInclude)));
|
||||||
$(".input-total-title-total-cost-budget-plan").val(f2Fixed(f2(deviceTaxInclude)+f2(buildTaxInclude)+f2(serviceTaxInclude)+f2(otherTaxInclude)
|
$(".input-total-title-total-cost-budget-plan").val(f2Fixed(f2(deviceTaxInclude) + f2(buildTaxInclude) + f2(serviceTaxInclude) + f2(otherTaxInclude)
|
||||||
+f2($(".input-total-title-project-manage-cost-budget-plan").val())
|
+ f2($(".input-total-title-project-manage-cost-budget-plan").val())
|
||||||
+f2($(".input-total-title-earnest-money-cost-budget-plan").val())));
|
+ f2($(".input-total-title-earnest-money-cost-budget-plan").val())));
|
||||||
|
|
||||||
calCostExclude();
|
calCostExclude();
|
||||||
calCostInclude();
|
calCostInclude();
|
||||||
|
@ -922,15 +915,15 @@ function updateIncomeDataUnsubmit(incomeDetails) {
|
||||||
incomeDetails.forEach(function (t, number, ts) {
|
incomeDetails.forEach(function (t, number, ts) {
|
||||||
console.log("income cost " + t["type"] + ", " + t["taxRate"] + ", " + t["totalTaxInclude"] + ", " + t["totalTaxExclud"]);
|
console.log("income cost " + t["type"] + ", " + t["taxRate"] + ", " + t["totalTaxInclude"] + ", " + t["totalTaxExclud"]);
|
||||||
|
|
||||||
if(t["type"] == "1"){
|
if (t["type"] == "1") {
|
||||||
//设备类
|
//设备类
|
||||||
deviceTaxInclude += f2(t["totalTaxInclude"]);
|
deviceTaxInclude += f2(t["totalTaxInclude"]);
|
||||||
deviceTaxExclude += f2(t["totalTaxExclude"]);
|
deviceTaxExclude += f2(t["totalTaxExclude"]);
|
||||||
}else if(t["type"] == "2"){
|
} else if (t["type"] == "2") {
|
||||||
//工程类
|
//工程类
|
||||||
engineerTaxInclude += f2(t["totalTaxInclude"]);
|
engineerTaxInclude += f2(t["totalTaxInclude"]);
|
||||||
engineerTaxExclude += f2(t["totalTaxExclude"]);
|
engineerTaxExclude += f2(t["totalTaxExclude"]);
|
||||||
}else if(t["type"] == "3"){
|
} else if (t["type"] == "3") {
|
||||||
//服务类
|
//服务类
|
||||||
serviceTaxInclude += f2(t["totalTaxInclude"]);
|
serviceTaxInclude += f2(t["totalTaxInclude"]);
|
||||||
serviceTaxExclude += f2(t["totalTaxExclude"]);
|
serviceTaxExclude += f2(t["totalTaxExclude"]);
|
||||||
|
@ -943,15 +936,15 @@ function updateIncomeDataUnsubmit(incomeDetails) {
|
||||||
$("input[name='incomeServiceTaxInclude']").val(f2Fixed(serviceTaxInclude));
|
$("input[name='incomeServiceTaxInclude']").val(f2Fixed(serviceTaxInclude));
|
||||||
$("input[name='incomeServiceTaxExclude']").val(f2Fixed(serviceTaxExclude));
|
$("input[name='incomeServiceTaxExclude']").val(f2Fixed(serviceTaxExclude));
|
||||||
|
|
||||||
$("input[name='incomeTotalTaxInclude']").val(f2Fixed(deviceTaxInclude+engineerTaxInclude+serviceTaxInclude));
|
$("input[name='incomeTotalTaxInclude']").val(f2Fixed(deviceTaxInclude + engineerTaxInclude + serviceTaxInclude));
|
||||||
$("input[name='incomeTotalTaxExclude']").val(f2Fixed(deviceTaxExclude+engineerTaxExclude+serviceTaxExclude));
|
$("input[name='incomeTotalTaxExclude']").val(f2Fixed(deviceTaxExclude + engineerTaxExclude + serviceTaxExclude));
|
||||||
$("input[name='incomeTotalTax']").val(f2Fixed(deviceTaxInclude+engineerTaxInclude+serviceTaxInclude-(deviceTaxExclude+engineerTaxExclude+serviceTaxExclude)));
|
$("input[name='incomeTotalTax']").val(f2Fixed(deviceTaxInclude + engineerTaxInclude + serviceTaxInclude - (deviceTaxExclude + engineerTaxExclude + serviceTaxExclude)));
|
||||||
$("input[name='costCompanyManageTaxExclude']").val(f2Fixed(0.028*(deviceTaxExclude+engineerTaxExclude+serviceTaxExclude)));
|
$("input[name='costCompanyManageTaxExclude']").val(f2Fixed(0.028 * (deviceTaxExclude + engineerTaxExclude + serviceTaxExclude)));
|
||||||
|
|
||||||
|
|
||||||
$(".input-total-title-sale-income-budget-plan").val($("input[name='incomeTotalTaxInclude']").val());
|
$(".input-total-title-sale-income-budget-plan").val($("input[name='incomeTotalTaxInclude']").val());
|
||||||
$(".input-total-title-total-income-budget-plan").val(f2Fixed(f2($("input[name='incomeTotalTaxInclude']").val())
|
$(".input-total-title-total-income-budget-plan").val(f2Fixed(f2($("input[name='incomeTotalTaxInclude']").val())
|
||||||
+f2($(".input-total-title-earnest-money-income-budget-plan").val())));
|
+ f2($(".input-total-title-earnest-money-income-budget-plan").val())));
|
||||||
|
|
||||||
|
|
||||||
updateProjectContributionProfitRate();
|
updateProjectContributionProfitRate();
|
||||||
|
@ -983,9 +976,9 @@ function updateCostProjectManageDataUnsubmit(details) {
|
||||||
var buildTaxInclude = $("input[name='costPurchaseBuildTaxInclude']").val();
|
var buildTaxInclude = $("input[name='costPurchaseBuildTaxInclude']").val();
|
||||||
var serviceTaxInclude = $("input[name='costPurchaseServiceTaxInclude']").val();
|
var serviceTaxInclude = $("input[name='costPurchaseServiceTaxInclude']").val();
|
||||||
var otherTaxInclude = $("input[name='costPurchaseOtherTaxInclude']").val();
|
var otherTaxInclude = $("input[name='costPurchaseOtherTaxInclude']").val();
|
||||||
$(".input-total-title-total-cost-budget-plan").val(f2Fixed(f2(deviceTaxInclude)+f2(buildTaxInclude)+f2(serviceTaxInclude)+f2(otherTaxInclude)
|
$(".input-total-title-total-cost-budget-plan").val(f2Fixed(f2(deviceTaxInclude) + f2(buildTaxInclude) + f2(serviceTaxInclude) + f2(otherTaxInclude)
|
||||||
+total
|
+ total
|
||||||
+f2($(".input-total-title-earnest-money-cost-budget-plan").val())));
|
+ f2($(".input-total-title-earnest-money-cost-budget-plan").val())));
|
||||||
|
|
||||||
calCostExclude();
|
calCostExclude();
|
||||||
calCostInclude();
|
calCostInclude();
|
||||||
|
@ -996,7 +989,7 @@ function updateCostProjectManageDataUnsubmit(details) {
|
||||||
/**
|
/**
|
||||||
* 更新页面收入的数据
|
* 更新页面收入的数据
|
||||||
*/
|
*/
|
||||||
function updateBudgetPlanDetailDataUnsubmit(data,returnData) {
|
function updateBudgetPlanDetailDataUnsubmit(data, returnData) {
|
||||||
//var details = data.details;
|
//var details = data.details;
|
||||||
//主页面上的财务费用
|
//主页面上的财务费用
|
||||||
$("input[name='costExpropriationTaxExclude']").val($(".input-underwritten-plan-statistic-capital-interest-budget-plan").val());
|
$("input[name='costExpropriationTaxExclude']").val($(".input-underwritten-plan-statistic-capital-interest-budget-plan").val());
|
||||||
|
|
|
@ -445,7 +445,7 @@ function bindOtherOtherChangeable() {
|
||||||
*/
|
*/
|
||||||
function bindTypeSelectChange() {
|
function bindTypeSelectChange() {
|
||||||
//大类变化联动类别
|
//大类变化联动类别
|
||||||
$(".input-changeable-tax-rate-income-select").on('change',function () {
|
$(".input-changeable-tax-rate-cost-select").on('change',function () {
|
||||||
var nameSelect = $(this).parent().parent().find(".input-changeable-tax-rate-cost-select");
|
var nameSelect = $(this).parent().parent().find(".input-changeable-tax-rate-cost-select");
|
||||||
var nameInput = $(this).parent().parent().find(".input-changeable-tax-rate-cost-name");
|
var nameInput = $(this).parent().parent().find(".input-changeable-tax-rate-cost-name");
|
||||||
var type = $(this).val();
|
var type = $(this).val();
|
||||||
|
|
|
@ -1133,44 +1133,27 @@
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td width="150px">
|
||||||
<select <#if incomeDetail.name!='华智产品'&&incomeDetail.name!='华三产品'&&incomeDetail.name!='汇智产品'>style="display:none"</#if>
|
<select <#if costDetail.category!='华智产品'&&costDetail.category!='华三产品'&&costDetail.category!='汇智产品'>style="display:none"</#if>
|
||||||
class="am-modal-prompt-input am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-category input-changeable-tax-rate-cost-select">
|
class="am-modal-prompt-input am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-category input-changeable-tax-rate-cost-select">
|
||||||
<option value="华智产品"
|
<option value="华智产品"
|
||||||
<#if incomeDetail.name ="华智产品" >selected</#if>>
|
<#if costDetail.category ="华智产品" >selected</#if>>
|
||||||
华智产品
|
华智产品
|
||||||
</option>
|
</option>
|
||||||
<option value="华三产品"
|
<option value="华三产品"
|
||||||
<#if incomeDetail.name ="华三产品">selected</#if>>
|
<#if costDetail.category ="华三产品">selected</#if>>
|
||||||
华三产品
|
华三产品
|
||||||
</option>
|
</option>
|
||||||
<option value="汇智产品"
|
<option value="汇智产品"
|
||||||
<#if incomeDetail.name ="汇智产品">selected</#if>>
|
<#if costDetail.category ="汇智产品">selected</#if>>
|
||||||
汇智产品
|
汇智产品
|
||||||
</option>
|
</option>
|
||||||
<option value="自定义">自定义</option>
|
<option value="自定义">自定义</option>
|
||||||
</select>
|
</select>
|
||||||
<input <#if incomeDetail.name!='华智产品'&&incomeDetail.name!='华三产品'&&incomeDetail.name!='汇智产品'>type="text"
|
<input <#if costDetail.category!='华智产品'&&costDetail.category!='华三产品'&&costDetail.category!='汇智产品'>type="text"
|
||||||
<#else>type="hidden"</#if>
|
<#else>type="hidden"</#if>
|
||||||
class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate-cost-name"
|
class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate-cost-name"
|
||||||
value="${incomeDetail.name!}">
|
value="${costDetail.category!}">
|
||||||
</td>
|
|
||||||
<td width="150px">
|
|
||||||
<select style="float: left;"
|
|
||||||
class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-category">
|
|
||||||
<#--<option value="1" <#if costDetail.category == 1>selected</#if>>华智产品</option>
|
|
||||||
<option value="2" <#if costDetail.category == 2>selected</#if>>紫光其他产品</option>
|
|
||||||
<option value="3" <#if costDetail.category == 3>selected</#if>>外购产品</option>
|
|
||||||
<option value="4" <#if costDetail.category == 4>selected</#if>>外购工程</option>
|
|
||||||
<option value="5" <#if costDetail.category == 5>selected</#if>>华智服务</option>
|
|
||||||
<option value="6" <#if costDetail.category == 6>selected</#if>>紫光其他服务</option>
|
|
||||||
<option value="7" <#if costDetail.category == 7>selected</#if>>外购服务</option>
|
|
||||||
<option value="8" <#if costDetail.category == 8>selected</#if>>其他</option>-->
|
|
||||||
<#list procurementTypes as procurementType>
|
|
||||||
<option value="${procurementType.id}"
|
|
||||||
<#if costDetail.category == procurementType.id>selected</#if>>${procurementType.name}</option>
|
|
||||||
</#list>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
<td width="100px"><input type="text" maxlength="5"
|
<td width="100px"><input type="text" maxlength="5"
|
||||||
class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate input-changeable-tax-rate-cost"
|
class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate input-changeable-tax-rate-cost"
|
||||||
|
|
Loading…
Reference in New Issue