第三期需求问题调整

dev_1.0.0
‘wangjiuyun 2024-11-06 17:01:04 +08:00
parent a1c7aa0337
commit 606f0ff7b2
6 changed files with 186 additions and 210 deletions

View File

@ -122,7 +122,7 @@ $(function () {
var flag = verifyBudgetPay()
if (!flag) return
if (data) {
postAjax(base + "/project/budgetEditSaveBudgetPayPlan", data, updateCostData);
postAjax(base + "/project/budgetEditSaveBudgetPayPlan", data, updatePayData);
}
});
$("#payAddBtn").click(function () {
@ -216,89 +216,57 @@ function bindPayTotal() {
/**
* 更新页面收入的数据累加
*/
function updateCostData(data, returnData) {
var details = data.details;
var deviceTaxInclude = 0;
var deviceTaxExclude = 0;
var deviceTax = 0;
var buildTaxInclude = 0;
var buildTaxExclude = 0;
var buildTax = 0;
var serviceTaxInclude = 0;
var serviceTaxExclude = 0;
var serviceTax = 0;
var otherTaxInclude = 0;
var otherTaxExclude = 0;
var otherTax = 0;
var costTaxRates = "";
var set = new Set();
details.forEach(function (t, number, ts) {
if (t["type"] == "1") {
//设备类
deviceTaxInclude += f2(t["totalTaxInclude"]);
deviceTaxExclude += f2(t["totalTaxExclude"]);
deviceTax += f2(t["totalTax"]);
} else if (t["type"] == "2") {
//施工类
buildTaxInclude += f2(t["totalTaxInclude"]);
buildTaxExclude += f2(t["totalTaxExclude"]);
buildTax += f2(t["totalTax"]);
} else if (t["type"] == "3") {
//服务类
serviceTaxInclude += f2(t["totalTaxInclude"]);
serviceTaxExclude += f2(t["totalTaxExclude"]);
serviceTax += f2(t["totalTax"]);
} else if (t["type"] == "4") {
//其他类
otherTaxInclude += f2(t["totalTaxInclude"]);
otherTaxExclude += f2(t["totalTaxExclude"]);
otherTax += f2(t["totalTax"]);
function updatePayData(data) {
// 更新资金计划表数据
$('.input-changeable-device-cost-budget-plan').val(0)
$('.input-changeable-project-cost-budget-plan').val(0)
$('.input-changeable-service-cost-budget-plan').val(0)
$('.input-changeable-other-cost-budget-plan').val(0)
data.details.forEach((ele) => {
let time = ele.payTime.slice(0, 7)
let type = ele.payProject
switch (type) {
case 1:
var input = $(`#tab6 .input-changeable-month-budget-plan[value="${time}"]`).parent().parent().find('.input-changeable-device-cost-budget-plan').get(0)
var val = parseFloat($(input).val())
$(input).val(f2(ele.payAmount + val))
break;
case 2:
var input = $(`#tab6 .input-changeable-month-budget-plan[value="${time}"]`).parent().parent().find('.input-changeable-project-cost-budget-plan')
var val = parseFloat($(input).val())
$(input).val(f2(ele.payAmount + val))
break;
case 3:
var input = $(`#tab6 .input-changeable-month-budget-plan[value="${time}"]`).parent().parent().find('.input-changeable-service-cost-budget-plan')
var val = parseFloat($(input).val())
$(input).val(f2(ele.payAmount + val))
break;
case 4:
var input = $(`#tab6 .input-changeable-month-budget-plan[value="${time}"]`).parent().parent().find('.input-changeable-other-cost-budget-plan')
var val = parseFloat($(input).val())
$(input).val(f2(ele.payAmount + val))
break;
}
if (!set.has(t["taxRate"])) {
costTaxRates += f2Fixed(t["taxRate"]) + "%,";
set.add(t["taxRate"]);
}
});
$("input[name='costPurchaseDeviceTaxInclude']").val(f2Fixed(deviceTaxInclude));
$("input[name='costPurchaseDeviceTaxExclude']").val(f2Fixed(deviceTaxExclude));
$("input[name='costPurchaseDeviceTax']").val(f2Fixed(deviceTax));
$("input[name='costPurchaseBuildTaxInclude']").val(f2Fixed(buildTaxInclude));
$("input[name='costPurchaseBuildTaxExclude']").val(f2Fixed(buildTaxExclude));
$("input[name='costPurchaseBuildTax']").val(f2Fixed(buildTax));
$("input[name='costPurchaseServiceTaxInclude']").val(f2Fixed(serviceTaxInclude));
$("input[name='costPurchaseServiceTaxExclude']").val(f2Fixed(serviceTaxExclude));
$("input[name='costPurchaseServiceTax']").val(f2Fixed(serviceTax));
$("input[name='costPurchaseOtherTaxInclude']").val(f2Fixed(otherTaxInclude));
$("input[name='costPurchaseOtherTaxExclude']").val(f2Fixed(otherTaxExclude));
$("input[name='costPurchaseOtherTax']").val(f2Fixed(otherTax));
//资金计划表中的
$(".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-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-earnest-money-cost-budget-plan").val())));
/* var costOtherOtherTaxInclude = f2($("input[name='costOtherOtherTaxInclude']").val());
var costOtherOtherTaxExclude = f2($("input[name='costOtherOtherTaxExclude']").val());
var costProjectManageTaxInclude = f2($("input[name='costProjectManageTaxInclude']").val());
var costProjectManageTaxExclude = f2($("input[name='costProjectManageTaxExclude']").val());
$("input[name='costTotalTaxInclude']").val(f2(deviceTaxInclude+buildTaxInclude+serviceTaxInclude+otherTaxInclude+costOtherOtherTaxInclude+costProjectManageTaxInclude));
$("input[name='costTotalTaxExclude']").val(f2(deviceTaxExclude+buildTaxExclude+serviceTaxExclude+otherTaxExclude+costOtherOtherTaxExclude+costProjectManageTaxExclude));*/
calCostExclude();
calCostInclude();
calCostTotalTax();
updateProjectContributionProfitRate();
if (costTaxRates.length > 0) {
$(".costTaxRates").text(costTaxRates.substr(0, costTaxRates.length - 1));
}
})
updateTotal("input-changeable-device-cost-budget-plan", "input-total-title-device-cost-budget-plan");
updateTotal("input-changeable-project-cost-budget-plan", "input-total-title-projectCost-cost-budget-plan");
updateTotal("input-changeable-service-cost-budget-plan", "input-total-title-serviceCost-cost-budget-plan");
updateTotal("input-changeable-other-cost-budget-plan", "input-total-total-otherCost-cost-budget-plan");
$('.input-changeable-project-manage-cost-budget-plan').each((index, element) => {
var engineer1 = f2($(element).parent().parent().find(".input-changeable-device-cost-budget-plan").val())
var engineer2 = f2($(element).parent().parent().find(".input-changeable-project-cost-budget-plan").val())
var engineer3 = f2($(element).parent().parent().find(".input-changeable-service-cost-budget-plan").val())
var engineer4 = f2($(element).parent().parent().find(".input-changeable-other-cost-budget-plan").val())
var projectManageCost = f2($(element).val());
var earnestMoneyCost = f2($(element).parent().parent().find(".input-changeable-earnest-money-cost-budget-plan").val());
var engineerCost = f2(engineer1 + engineer2 + engineer3 + engineer4);
$(element).parent().parent().find('.input-changeable-total-cost-budget-plan').val(f2Fixed(engineerCost + projectManageCost + earnestMoneyCost));
})
updateTotal("input-changeable-total-cost-budget-plan", "input-total-title-total-cost-budget-plan");
layuiAlert("保存成功");
$('#my-prompt-cost-detail').modal('close');
}
/**
@ -360,18 +328,18 @@ function verifyBudgetPay(isApprove) {
var payData = prepareAjaxDataVerify(collectData("am-modal-prompt-input-pay"), pay_DETAIL2, $("#id").val())
var costData = prepareAjaxDataVerify(collectData("am-modal-prompt-input-cost"), COST_DETAIL2, $("#id").val())
var payTotal_equipment = calculateTotal(payData, 1,'payProject','payAmount');
var payTotal_project = calculateTotal(payData, 2,'payProject','payAmount');
var payTotal_server = calculateTotal(payData, 3,'payProject','payAmount');
var payTotal_other = calculateTotal(payData, 4,'payProject','payAmount');
var payTotal_equipment = calculateTotal(payData, 1, 'payProject', 'payAmount');
var payTotal_project = calculateTotal(payData, 2, 'payProject', 'payAmount');
var payTotal_server = calculateTotal(payData, 3, 'payProject', 'payAmount');
var payTotal_other = calculateTotal(payData, 4, 'payProject', 'payAmount');
var costTotal_equipment = calculateTotal(costData, 1,'type','totalTaxInclude');
var costTotal_project = calculateTotal(costData, 2,'type','totalTaxInclude');
var costTotal_server = calculateTotal(costData, 3,'type','totalTaxInclude');
var costTotal_other = calculateTotal(costData, 4,'type','totalTaxInclude');
var costTotal_equipment = calculateTotal(costData, 1, 'type', 'totalTaxInclude');
var costTotal_project = calculateTotal(costData, 2, 'type', 'totalTaxInclude');
var costTotal_server = calculateTotal(costData, 3, 'type', 'totalTaxInclude');
var costTotal_other = calculateTotal(costData, 4, 'type', 'totalTaxInclude');
console.log(payTotal_equipment,payTotal_project,payTotal_server,payTotal_other,costTotal_equipment,costTotal_project,costTotal_server,costTotal_other)
console.log(payTotal_equipment, payTotal_project, payTotal_server, payTotal_other, costTotal_equipment, costTotal_project, costTotal_server, costTotal_other)
if (f2Fixed(payTotal_equipment) != f2Fixed(costTotal_equipment)) {
flag = false
layuiAlert('[付款计划表中"设备"成本总金]额需要与[采购成本明细表中"设备"成本总金额]一致')
@ -390,7 +358,7 @@ function verifyBudgetPay(isApprove) {
return flag
}
function calculateTotal(payData, type,key,value) {
function calculateTotal(payData, type, key, value) {
return payData.details.reduce((total, now) => {
return now[key] == type ? parseFloat(now[value]) + total : total;
}, 0);

View File

@ -1,7 +1,7 @@
/**
* 一个资金计划的字段
*/
BUDGET_PLAN_DETAIL_ARR=["month","deviceCost","engineerCost","projectManageCost","earnestMoneyCost","totalCost","saleIncome","earnestMoneyIncome","totalIncome","fundBalance","capitalInterest","underwrittenPlan","repaymentPlan"];
BUDGET_PLAN_DETAIL_ARR=["month","deviceCost","projectCost",'serviceCost','otherCost',"projectManageCost","earnestMoneyCost","totalCost","saleIncome","earnestMoneyIncome","totalIncome","fundBalance","capitalInterest","underwrittenPlan","repaymentPlan"];
BUDGET_PLAN_DETAIL2={
"month":[true,"月份"],
"deviceCost":[false,"设备付款","number"],
@ -232,8 +232,11 @@ function appendMultiplePlan() {
function delBudgetPlan() {
//还需要更新每一列的合计数据
updateBudgetPlanTotal("input-changeable-device-cost-budget-plan","input-total-device-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-engineer-cost-budget-plan","input-total-engineer-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-device-cost-budget-plan","input-total-title-device-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-project-cost-budget-plan","input-total-title-projectCost-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-service-cost-budget-plan","input-total-title-serviceCost-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-other-cost-budget-plan","input-total-title-otherCost-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-project-manage-cost-budget-plan","input-total-project-manage-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-earnest-money-cost-budget-plan","input-total-earnest-money-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-earnest-money-cost-budget-plan","input-total-title-earnest-money-cost-budget-plan");
@ -347,7 +350,6 @@ function verifyBudgetPlan(){
var costProjectManageTaxInclude = inputVal("costProjectManageTaxInclude");
var incomeTotalTaxInclude = inputVal("incomeTotalTaxInclude");
var input_total_device_cost_budget_plan = classVal("input-total-device-cost-budget-plan");
var input_total_engineer_cost_budget_plan = classVal("input-total-engineer-cost-budget-plan");
var input_total_project_manage_budget_plan = classVal("input-total-project-manage-cost-budget-plan");
var input_total_sale_income_budget_plan = classVal("input-total-sale-income-budget-plan");
var input_total_earnest_money_cost_budget_plan = classVal("input-total-earnest-money-cost-budget-plan");
@ -360,9 +362,6 @@ function verifyBudgetPlan(){
}
//从采购成本明细中取“服务+施工+其他”大类的总计---工程支出
var t = f2(f2(costPurchaseBuildTaxInclude)+f2(costPurchaseServiceTaxInclude)+f2(costPurchaseOtherTaxInclude));
// if(t != f2(input_total_engineer_cost_budget_plan)){
// return "采购成本明细中取“服务+施工+其他”费用项目的总计["+t+"]与资金计划表中工程支出["+input_total_engineer_cost_budget_plan+"]不等";
// }
//从项目管理成本取总计金额--经营性开支
if(costProjectManageTaxInclude != input_total_project_manage_budget_plan){
@ -387,7 +386,7 @@ function verifyBudgetPlan(){
function appendTrBudgetPlan() {
var template = '<tr style="display: inline-block;">\n' +
' <td style="display: block;"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-month-budget-plan" readonly></td>\n' +
' <td style="display: block;"><input type="text" maxlength="16" value="0.00" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-device-cost-budget-plan"></td>\n' +
' <td style="display: block;"><input type="text" maxlength="16" value="0.00" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-device-cost-budget-plan" readonly></td>\n' +
' <td style="display: block;"><input type="text" maxlength="16" value="0.00" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-project-cost-budget-plan" readonly></td>\n' +
' <td style="display: block;"><input type="text" maxlength="16" value="0.00" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-service-cost-budget-plan" readonly></td>\n' +
@ -425,8 +424,7 @@ function appendTrBudgetPlan2() {
var template = '<tr style="display: inline-block;">\n' +
' <td style="display: block;"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-month-budget-plan" readonly></td>\n' +
' <td style="display: block;"><input type="text" maxlength="16" value="0.00" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-device-cost-budget-plan"></td>\n' +
// ' <td style="display: block;"><input type="text" maxlength="16" value="0.00" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-engineer-cost-budget-plan"></td>\n' +
' <td style="display: block;"><input type="text" maxlength="16" value="0.00" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-project-cost-budget-plan" readonly></td>\n' +
' <td style="display: block;"><input type="text" maxlength="16" value="0.00" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-project-cost-budget-plan" readonly></td>\n' +
' <td style="display: block;"><input type="text" maxlength="16" value="0.00" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-service-cost-budget-plan" readonly></td>\n' +
' <td style="display: block;"><input type="text" maxlength="16" value="0.00" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-other-cost-budget-plan" readonly></td>\n' +
@ -477,8 +475,12 @@ function appendTrBudgetPlan2() {
*/
function bindBudgetPlanUpdate() {
//还需要更新每一列的合计数据
updateBudgetPlanTotal("input-changeable-device-cost-budget-plan","input-total-device-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-engineer-cost-budget-plan","input-total-engineer-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-device-cost-budget-plan","input-total-title-device-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-project-cost-budget-plan","input-total-title-projectCost-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-service-cost-budget-plan","input-total-title-serviceCost-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-other-cost-budget-plan","input-total-title-otherCost-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-project-manage-cost-budget-plan","input-total-project-manage-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-earnest-money-cost-budget-plan","input-total-earnest-money-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-earnest-money-cost-budget-plan","input-total-title-earnest-money-cost-budget-plan");
@ -508,7 +510,11 @@ function bindBudgetPlanDeleteBtn() {
// //删除自己对应的tr
// $(this).parent().parent().remove();
$(this).parent().parent().find(".input-changeable-device-cost-budget-plan").val(f2Fixed(0));
$(this).parent().parent().find(".input-changeable-engineer-cost-budget-plan").val(f2Fixed(0));
$(this).parent().parent().find(".input-changeable-project-cost-budget-plan").val(f2Fixed(0));
$(this).parent().parent().find(".input-changeable-service-cost-budget-plan").val(f2Fixed(0));
$(this).parent().parent().find(".input-changeable-other-cost-budget-plan").val(f2Fixed(0));
$(this).parent().parent().find(".input-changeable-project-cost-budget-plan").val(f2Fixed(0));
$(this).parent().parent().find(".input-changeable-project-manage-cost-budget-plan").val(f2Fixed(0));
$(this).parent().parent().find(".input-changeable-earnest-money-cost-budget-plan").val(f2Fixed(0));
$(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(0));
@ -516,8 +522,12 @@ function bindBudgetPlanDeleteBtn() {
$(this).parent().parent().find(".input-changeable-earnest-money-income-budget-plan").val(f2Fixed(0));
$(this).parent().parent().find(".input-changeable-total-income-budget-plan").val(f2Fixed(0));
//还需要更新每一列的合计数据
updateBudgetPlanTotal("input-changeable-device-cost-budget-plan","input-total-device-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-engineer-cost-budget-plan","input-total-engineer-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-device-cost-budget-plan","input-total-title-device-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-project-cost-budget-plan","input-total-title-projectCost-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-service-cost-budget-plan","input-total-title-serviceCost-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-other-cost-budget-plan","input-total-title-otherCost-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-project-manage-cost-budget-plan","input-total-project-manage-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-earnest-money-cost-budget-plan","input-total-earnest-money-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-earnest-money-cost-budget-plan","input-total-title-earnest-money-cost-budget-plan");
@ -542,92 +552,22 @@ function bindBudgetPlanDeleteBtn() {
}
function bindChangeableInputBudgetPlanDetail() {
//设备支出改变
$(".input-changeable-device-cost-budget-plan").change(function () {
var deviceCost = f2($(this).val());
//找到对应的工程支出、经营性支出、保证金付款
var engineerCost = f2($(this).parent().parent().find(".input-changeable-engineer-cost-budget-plan").val());
var projectManageCost = f2($(this).parent().parent().find(".input-changeable-project-manage-cost-budget-plan").val());
var earnestMoneyCost = f2($(this).parent().parent().find(".input-changeable-earnest-money-cost-budget-plan").val());
//更新本月所有项支出
$(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost));
//更新所有月设备支出总额
updateBudgetPlanTotal("input-changeable-device-cost-budget-plan","input-total-device-cost-budget-plan");
//更新所有月支出总额
updateBudgetPlanTotal("input-changeable-total-cost-budget-plan","input-total-total-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-total-cost-budget-plan","input-total-title-total-cost-budget-plan");
updatePageData();
});
//工程支出改变
$(".input-changeable-projectCost-cost-budget-plan").change(function () {
var engineerCost = f2($(this).val());
//找到对应的设备支出、经营性支出、保证金付款
var deviceCost = f2($(this).parent().parent().find(".input-changeable-device-cost-budget-plan").val());
var projectManageCost = f2($(this).parent().parent().find(".input-changeable-project-manage-cost-budget-plan").val());
var earnestMoneyCost = f2($(this).parent().parent().find(".input-changeable-earnest-money-cost-budget-plan").val());
var engineerCost2 = f2($(this).parent().parent().find(".input-changeable-serviceCost-cost-budget-plan").val());
var engineerCost3 = f2($(this).parent().parent().find(".input-changeable-otherCost-cost-budget-plan").val());
//更新本月所有项支出
$(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost+engineerCost2+engineerCost3));
//更新所有月工程支出总额
updateBudgetPlanTotal("input-changeable-projectCost-cost-budget-plan","input-total-projectCost-cost-budget-plan");
//更新所有月支出总额
updateBudgetPlanTotal("input-changeable-total-cost-budget-plan","input-total-total-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-total-cost-budget-plan","input-total-title-total-cost-budget-plan");
updatePageData();
});
$(".input-changeable-serviceCost-cost-budget-plan").change(function () {
var engineerCost = f2($(this).val());
//找到对应的设备支出、经营性支出、保证金付款
var deviceCost = f2($(this).parent().parent().find(".input-changeable-device-cost-budget-plan").val());
var projectManageCost = f2($(this).parent().parent().find(".input-changeable-project-manage-cost-budget-plan").val());
var earnestMoneyCost = f2($(this).parent().parent().find(".input-changeable-earnest-money-cost-budget-plan").val());
var engineerCost2 = f2($(this).parent().parent().find(".input-changeable-serviceCost-cost-budget-plan").val());
var engineerCost3 = f2($(this).parent().parent().find(".input-changeable-otherCost-cost-budget-plan").val());
//更新本月所有项支出
$(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost+engineerCost2+engineerCost3));
//更新所有月工程支出总额
updateBudgetPlanTotal("input-changeable-serviceCost-cost-budget-plan","input-total-serviceCost-cost-budget-plan");
//更新所有月支出总额
updateBudgetPlanTotal("input-changeable-total-cost-budget-plan","input-total-total-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-total-cost-budget-plan","input-total-title-total-cost-budget-plan");
updatePageData();
});
$(".input-changeable-otherCost-cost-budget-plan").change(function () {
var engineerCost = f2($(this).val());
//找到对应的设备支出、经营性支出、保证金付款
var deviceCost = f2($(this).parent().parent().find(".input-changeable-device-cost-budget-plan").val());
var projectManageCost = f2($(this).parent().parent().find(".input-changeable-project-manage-cost-budget-plan").val());
var earnestMoneyCost = f2($(this).parent().parent().find(".input-changeable-earnest-money-cost-budget-plan").val());
var engineerCost2 = f2($(this).parent().parent().find(".input-changeable-serviceCost-cost-budget-plan").val());
var engineerCost3 = f2($(this).parent().parent().find(".input-changeable-otherCost-cost-budget-plan").val());
//更新本月所有项支出
$(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost+engineerCost2+engineerCost3));
//更新所有月工程支出总额
updateBudgetPlanTotal("input-changeable-otherCost-cost-budget-plan","input-total-otherCost-cost-budget-plan");
//更新所有月支出总额
updateBudgetPlanTotal("input-changeable-total-cost-budget-plan","input-total-total-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-total-cost-budget-plan","input-total-title-total-cost-budget-plan");
updatePageData();
});
//经营性支出改变
$(".input-changeable-project-manage-cost-budget-plan").change(function () {
var projectManageCost = f2($(this).val());
//找到对应的设备支出、工程支出、保证金付款
var deviceCost = f2($(this).parent().parent().find(".input-changeable-device-cost-budget-plan").val());
var engineerCost = f2($(this).parent().parent().find(".input-changeable-engineer-cost-budget-plan").val());
var engineer1=f2($(this).parent().parent().find(".input-changeable-device-cost-budget-plan").val())
var engineer2=f2($(this).parent().parent().find(".input-changeable-project-cost-budget-plan").val())
var engineer3=f2($(this).parent().parent().find(".input-changeable-service-cost-budget-plan").val())
var engineer4=f2($(this).parent().parent().find(".input-changeable-other-cost-budget-plan").val())
var engineerCost = f2(engineer1+engineer2+engineer3+engineer4);
var earnestMoneyCost = f2($(this).parent().parent().find(".input-changeable-earnest-money-cost-budget-plan").val());
//更新本月所有项支出
$(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost));
$(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(engineerCost+projectManageCost+earnestMoneyCost));
//更新所有月经营性支出总额
updateBudgetPlanTotal("input-changeable-project-manage-cost-budget-plan","input-total-project-manage-cost-budget-plan");
//更新所有月支出总额
@ -640,12 +580,15 @@ function bindChangeableInputBudgetPlanDetail() {
$(".input-changeable-earnest-money-cost-budget-plan").change(function () {
var earnestMoneyCost = f2($(this).val());
//找到对应的设备支出、经营性支出、保证金付款
var deviceCost = f2($(this).parent().parent().find(".input-changeable-device-cost-budget-plan").val());
var engineerCost = f2($(this).parent().parent().find(".input-changeable-engineer-cost-budget-plan").val());
var engineer1=f2($(this).parent().parent().find(".input-changeable-device-cost-budget-plan").val())
var engineer2=f2($(this).parent().parent().find(".input-changeable-project-cost-budget-plan").val())
var engineer3=f2($(this).parent().parent().find(".input-changeable-service-cost-budget-plan").val())
var engineer4=f2($(this).parent().parent().find(".input-changeable-other-cost-budget-plan").val())
var engineerCost = f2(engineer1+engineer2+engineer3+engineer4);
var projectManageCost = f2($(this).parent().parent().find(".input-changeable-project-manage-cost-budget-plan").val());
//更新本月所有项支出
$(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost));
$(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(engineerCost+projectManageCost+earnestMoneyCost));
//更新所有月保证金付款总额
updateBudgetPlanTotal("input-changeable-earnest-money-cost-budget-plan","input-total-earnest-money-cost-budget-plan");
updateBudgetPlanTotal("input-changeable-earnest-money-cost-budget-plan","input-total-title-earnest-money-cost-budget-plan");
@ -1016,8 +959,12 @@ function updateCashFlow() {
var saleIncome = classVal("input-total-sale-income-budget-plan");
var earnestMoneyIncome = classVal("input-total-earnest-money-income-budget-plan");
var deviceCost = classVal("input-total-device-cost-budget-plan");
var engineerCost = classVal("input-total-engineer-cost-budget-plan");
var engineer1=classVal("input-total-title-device-cost-budget-plan")
var engineer2=classVal("input-total-title-projectCost-cost-budget-plan")
var engineer3=classVal("input-total-title-serviceCost-cost-budget-plan")
var engineer4=classVal("input-total-title-otherCost-cost-budget-plan")
var engineerCost = f2(engineer1+engineer2+engineer3+engineer4);
var projectManageCost = classVal("input-total-project-manage-cost-budget-plan");
var earnestMoneyCost = classVal("input-total-earnest-money-cost-budget-plan");
@ -1032,10 +979,6 @@ function updateCashFlow() {
var m = f2(f2(underwrittenPlan)-f2(repaymentPlan));
var n = f2(g+0+m);
/*console.log(saleIncome,earnestMoneyIncome,deviceCost,
engineerCost,projectManageCost,earnestMoneyCost,
capitalInterest,underwrittenPlan,repaymentPlan,
d,f,g,m,m);*/
$("input[name='saleIncomeCash']").val(f2Fixed(f2(saleIncome)));

View File

@ -165,7 +165,20 @@
#tab3 {
overflow-x: hidden;
}
#tab34 table#budgetPlanDetailTable tbody{
/*padding-top: 15px;*/
}
#tab34 table#budgetPlanDetailTable tr{
position: relative;
padding-top: 55px;
}
#tab34 table#budgetPlanDetailTable tr td:nth-child(1) {
position: absolute;
background: #fff;
top: 0;
}
</style>
<div id="printContainer"></div>
<div class="project_approve" id="contentContainer">
@ -4112,8 +4125,24 @@
function closeEmpty() {
$('.tr-budget-plan-empty').css('display', 'none');
}
closeEmpty()
function openEmpty() {
$('.tr-budget-plan-empty').css('display', 'inline-block');
}
$('#tab34').on('scroll', (event) => {
let top = $('#tab34').scrollTop()
let left = $('#tab34').scrollLeft()
$('#tab34 table tr td:nth-child(1)').css({'top':top>0?top-64:top,'left':left
})
if (top > 0) {
$('#tab34 table#budgetPlanDetailTable tr td:nth-child(1)').css({
'height':'55px'
})
} else {
$('#tab34 table#budgetPlanDetailTable tr td:nth-child(1)').css({
'height':'auto'
})
}
})
</script>

View File

@ -102,6 +102,21 @@
display: flex;
flex-direction: column;
}
#tab6 table#budgetPlanDetailTable tbody{
padding-top: 15px;
}
#tab6 table#budgetPlanDetailTable tr{
position: relative;
padding-top: 55px;
}
#tab6 table#budgetPlanDetailTable tr td:nth-child(1) {
position: absolute;
background: #fff;
top: 0;
}
</style>
<div class="project_budget">
@ -1182,10 +1197,10 @@
</option>
<option value="自定义">自定义</option>
</select>
<input class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate-cost-name"
<#if costDetail.category!='华智产品'&&costDetail.category!='华三产品'&&costDetail.category!='汇智产品'>type="text"</#if>
<#if costDetail.category=='华智产品'||costDetail.category=='华三产品'||costDetail.category=='汇智产品'>type="hidden"</#if>
value="${costDetail.category!}" />
<input class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate-cost-name"
<#if costDetail.category!='华智产品'&&costDetail.category!='华三产品'&&costDetail.category!='汇智产品'>type="text"</#if>
<#if costDetail.category=='华智产品'||costDetail.category=='华三产品'||costDetail.category=='汇智产品'>type="hidden"</#if>
value="${costDetail.category!}"/>
</td>
<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"
@ -1363,11 +1378,11 @@
</#if>
</select>
<input <#if costProjectManageDetail.isDiy==1>type="text"
<#else>type="hidden"</#if>
class="am-modal-prompt-input
<#else>type="hidden"</#if>
class="am-modal-prompt-input
am-modal-prompt-input-cost-project-manage
am-modal-prompt-input-cost-project-manage-category2"
value="${costProjectManageDetail.name}">
value="${costProjectManageDetail.name}">
</td>
<td><input type="text"
class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage"
@ -1470,7 +1485,7 @@
<table class="am-table table-main"
style="display: block;border-collapse: collapse;width: 1700px;overflow-x: scroll;padding:0;"
id="budgetPlanDetailTable">
<thead style="display: inline-block;overflow-x: scroll;width: 400px;">
<thead style="display: inline-block;width: 400px;">
<tr style="display: inline-block;">
<td style="display: block;border-top: 1px solid #ddd;"><input type="text"
class="am-modal-prompt-input"
@ -1615,7 +1630,7 @@
</thead>
<tbody style="display: inline-block;overflow-x: scroll;width: calc(100% - 410px);white-space: nowrap;">
<tr id="firstBlock" class="am-hide" style="display: inline-block;">
<tr id="firstBlock" class="am-hide" style="display: inline-block;">
<td style="display: block;"><input type="text"
class="am-modal-prompt-input input-total-month-budget-plan"
value="${projectBudgetPlanDetailTotal.month}"
@ -2591,6 +2606,22 @@
location.href = url
}
$('#tab6').on('scroll', (event) => {
let top = $('#tab6').scrollTop()
let left = $('#tab6').scrollLeft()
$('#tab6 table tr td:nth-child(1)').css({'top':top>0?top-70:top,'left':left
})
if (top > 0) {
$('#tab6 table#budgetPlanDetailTable tr td:nth-child(1)').css({
'height':'55px'
})
} else {
$('#tab6 table#budgetPlanDetailTable tr td:nth-child(1)').css({
'height':'auto'
})
}
})
</script>
</@defaultLayout.layout>

View File

@ -243,7 +243,6 @@
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">是否二次合作:</span></th>
<td class="table-title" colspan="1" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="isSecond" name="isSecond">
<option value="-1" ></option>
<option value="1" >是</option>
<option value="2" >否</option>
</select>
@ -251,8 +250,7 @@
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">是否汇智中标:</span></th>
<td class="table-title" colspan="3" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="signType" name="signType">
<option value="-1" ></option>
<option value="1" >是</option>
<option value="1" selected>是</option>
<option value="2" >否</option>
</select>
</td>
@ -692,13 +690,19 @@
var terminalCustomer = $("#terminalCustomer").val();
var valueRisk = $("#valueRisk").val();
var principal = $("#principal").val();
// var principal = $("#principal").val();
var principal = $("#principal").val();
var contractTime = $("#contractTime").val();
var bidsTime = $("#bidsTime").val();
var isSecond = $("#isSecond").val();
var signType = $("#signType").val();
// var mainContractResolvePlan = $("#mainContractResolvePlan").val();
@ -863,8 +867,8 @@
check = 1;
return;
}
if(!isSecond){
window.confirm('是否二次合作不能为空');
if(!signType){
window.confirm('是否汇智中标不能为空');
check = 1;
return;
}

View File

@ -155,6 +155,7 @@
.expand-section.fold {
display: none;
}
</style>
<div class="search-table">
<#--第一行默认展示-->