From 606f0ff7b2bcde1641694a7a8f3b46159788cc56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98wangjiuyun?= <‘1595161655@qq.com> Date: Wed, 6 Nov 2024 17:01:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=9C=9F=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/assets/js/project_budget_pay.js | 152 +++++++----------- .../static/assets/js/project_budget_plan.js | 147 ++++++----------- .../templates/admin/project_approve.ftl | 31 +++- .../templates/admin/project_budget_edit.ftl | 49 ++++-- .../templates/admin/project_estimate_add.ftl | 16 +- .../templates/admin/project_list_approve.ftl | 1 + 6 files changed, 186 insertions(+), 210 deletions(-) diff --git a/src/main/resources/static/assets/js/project_budget_pay.js b/src/main/resources/static/assets/js/project_budget_pay.js index ca3b46c..561bb2c 100644 --- a/src/main/resources/static/assets/js/project_budget_pay.js +++ b/src/main/resources/static/assets/js/project_budget_pay.js @@ -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); diff --git a/src/main/resources/static/assets/js/project_budget_plan.js b/src/main/resources/static/assets/js/project_budget_plan.js index 42f7f80..a43a403 100644 --- a/src/main/resources/static/assets/js/project_budget_plan.js +++ b/src/main/resources/static/assets/js/project_budget_plan.js @@ -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 = '\n' + ' \n' + - ' \n' + + ' \n' + ' \n' + ' \n' + @@ -425,8 +424,7 @@ function appendTrBudgetPlan2() { var template = '\n' + ' \n' + ' \n' + - // ' \n' + - ' \n' + + ' \n' + ' \n' + ' \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))); diff --git a/src/main/resources/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl index 989b684..d7445bb 100644 --- a/src/main/resources/templates/admin/project_approve.ftl +++ b/src/main/resources/templates/admin/project_approve.ftl @@ -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; + }
@@ -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' + }) + } + }) \ No newline at end of file diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index 7121f64..50fd142 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -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; + } +
@@ -1182,10 +1197,10 @@ - type="text" - <#if costDetail.category=='华智产品'||costDetail.category=='华三产品'||costDetail.category=='汇智产品'>type="hidden" - value="${costDetail.category!}" /> + type="text" + <#if costDetail.category=='华智产品'||costDetail.category=='华三产品'||costDetail.category=='汇智产品'>type="hidden" + value="${costDetail.category!}"/> type="text" - <#else>type="hidden" - class="am-modal-prompt-input + <#else>type="hidden" + 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}"> - + - + { + 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' + }) + } + }) diff --git a/src/main/resources/templates/admin/project_estimate_add.ftl b/src/main/resources/templates/admin/project_estimate_add.ftl index 0e3e2f9..3f126f2 100644 --- a/src/main/resources/templates/admin/project_estimate_add.ftl +++ b/src/main/resources/templates/admin/project_estimate_add.ftl @@ -243,7 +243,6 @@ *是否二次合作: @@ -251,8 +250,7 @@ *是否汇智中标: @@ -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; } diff --git a/src/main/resources/templates/admin/project_list_approve.ftl b/src/main/resources/templates/admin/project_list_approve.ftl index ea7d54f..3a54785 100644 --- a/src/main/resources/templates/admin/project_list_approve.ftl +++ b/src/main/resources/templates/admin/project_list_approve.ftl @@ -155,6 +155,7 @@ .expand-section.fold { display: none; } +
<#--第一行默认展示-->