diff --git a/src/main/java/cn/palmte/work/bean/IncomeCostBean.java b/src/main/java/cn/palmte/work/bean/IncomeCostBean.java index 950a910..addaf3c 100644 --- a/src/main/java/cn/palmte/work/bean/IncomeCostBean.java +++ b/src/main/java/cn/palmte/work/bean/IncomeCostBean.java @@ -88,6 +88,110 @@ public abstract class IncomeCostBean { */ private BigDecimal costCompanyManageTaxExclude; + /** + * 设备类收入税率 + */ + private String incomeDeviceSelect; + + /** + * 工程类收入税率 + */ + private String incomeEngineerSelect; + + /** + * 服务类收入税率 + */ + private String incomeServiceSelect; + + /** + * 设备类采购成本税率 + */ + private String costPurchaseDeviceSelect; + + /** + * 施工类采购成本税率 + */ + private String costPurchaseBuildSelect; + + /** + * 服务类采购成本税率 + */ + private String costPurchaseServiceSelect; + + /** + * 其他类采购成本税率 + */ + private String costPurchaseOtherSelect; + + /** + * 其他成本税率 + */ + private String costOtherOtherSelect; + + public String getIncomeDeviceSelect() { + return incomeDeviceSelect; + } + + public void setIncomeDeviceSelect(String incomeDeviceSelect) { + this.incomeDeviceSelect = incomeDeviceSelect; + } + + public String getIncomeEngineerSelect() { + return incomeEngineerSelect; + } + + public void setIncomeEngineerSelect(String incomeEngineerSelect) { + this.incomeEngineerSelect = incomeEngineerSelect; + } + + public String getIncomeServiceSelect() { + return incomeServiceSelect; + } + + public void setIncomeServiceSelect(String incomeServiceSelect) { + this.incomeServiceSelect = incomeServiceSelect; + } + + public String getCostPurchaseDeviceSelect() { + return costPurchaseDeviceSelect; + } + + public void setCostPurchaseDeviceSelect(String costPurchaseDeviceSelect) { + this.costPurchaseDeviceSelect = costPurchaseDeviceSelect; + } + + public String getCostPurchaseBuildSelect() { + return costPurchaseBuildSelect; + } + + public void setCostPurchaseBuildSelect(String costPurchaseBuildSelect) { + this.costPurchaseBuildSelect = costPurchaseBuildSelect; + } + + public String getCostPurchaseServiceSelect() { + return costPurchaseServiceSelect; + } + + public void setCostPurchaseServiceSelect(String costPurchaseServiceSelect) { + this.costPurchaseServiceSelect = costPurchaseServiceSelect; + } + + public String getCostPurchaseOtherSelect() { + return costPurchaseOtherSelect; + } + + public void setCostPurchaseOtherSelect(String costPurchaseOtherSelect) { + this.costPurchaseOtherSelect = costPurchaseOtherSelect; + } + + public String getCostOtherOtherSelect() { + return costOtherOtherSelect; + } + + public void setCostOtherOtherSelect(String costOtherOtherSelect) { + this.costOtherOtherSelect = costOtherOtherSelect; + } + public BigDecimal getIncomeDeviceTaxInclude() { return handleSpecial(incomeDeviceTaxInclude); } diff --git a/src/main/java/cn/palmte/work/controller/backend/AdminController.java b/src/main/java/cn/palmte/work/controller/backend/AdminController.java index 633bb3c..13783ab 100644 --- a/src/main/java/cn/palmte/work/controller/backend/AdminController.java +++ b/src/main/java/cn/palmte/work/controller/backend/AdminController.java @@ -1,6 +1,7 @@ package cn.palmte.work.controller.backend; +import cn.palmte.work.bean.ResponseMsg; import cn.palmte.work.config.Constant; import cn.palmte.work.model.*; import cn.palmte.work.pojo.LoginRequest; @@ -153,9 +154,6 @@ public class AdminController extends BaseController { adminService.updateLoginInfo(admin, request); loginLogService.saveLog(userName, LoginLog.SUCCESS, "登录成功"); - Page myApproveProjects = projectService.findMyApproveProjects(new HashMap<>(), InterfaceUtil.getAdminId(), 1, 1); - request.getSession().setAttribute("hasApproveProjectsMessage", CollectionUtil.isNotEmpty(myApproveProjects.getList())?"您有新的待审核项目,请及时确认。":""); - /** * admin用户去检查,如果检查job有失败的,显示弹出框[1] */ @@ -286,5 +284,20 @@ public class AdminController extends BaseController { new CaptchaUtils().getRandCode(request, response); } + /** + * 查询自己是否有审核任务 + * + * @return + */ + @ResponseBody + @RequestMapping("/approveProjectsMsg") + public ResponseMsg approveProjectsMsg() { + Page myApproveProjects = projectService.findMyApproveProjects(new HashMap<>(), InterfaceUtil.getAdminId(), 1, 1); + if (myApproveProjects != null && !myApproveProjects.getList().isEmpty()) { + return ResponseMsg.buildSuccessMsg("您有新的待审核项目,请及时确认。"); + } else { + return ResponseMsg.buildSuccessMsg(""); + } + } } diff --git a/src/main/java/cn/palmte/work/model/ProjectEstimateCost.java b/src/main/java/cn/palmte/work/model/ProjectEstimateCost.java index 90c2ae8..1cad0ae 100644 --- a/src/main/java/cn/palmte/work/model/ProjectEstimateCost.java +++ b/src/main/java/cn/palmte/work/model/ProjectEstimateCost.java @@ -40,6 +40,9 @@ public class ProjectEstimateCost { @Column(name = "cost_tax_exclude") private BigDecimal costTaxExclude; + @Column(name = "tax_rate") + private String taxRate; + public Integer getId() { return id; } @@ -87,4 +90,12 @@ public class ProjectEstimateCost { public void setCostTaxExclude(BigDecimal costTaxExclude) { this.costTaxExclude = costTaxExclude; } + + public String getTaxRate() { + return taxRate; + } + + public void setTaxRate(String taxRate) { + this.taxRate = taxRate; + } } \ No newline at end of file diff --git a/src/main/java/cn/palmte/work/model/ProjectEstimateIncome.java b/src/main/java/cn/palmte/work/model/ProjectEstimateIncome.java index 0bb7173..483cb23 100644 --- a/src/main/java/cn/palmte/work/model/ProjectEstimateIncome.java +++ b/src/main/java/cn/palmte/work/model/ProjectEstimateIncome.java @@ -33,6 +33,9 @@ public class ProjectEstimateIncome { @Column(name = "income_tax_exclude") private BigDecimal incomeTaxExclude; + @Column(name = "tax_rate") + private String taxRate; + public Integer getId() { return id; } @@ -72,4 +75,12 @@ public class ProjectEstimateIncome { public void setIncomeTaxExclude(BigDecimal incomeTaxExclude) { this.incomeTaxExclude = incomeTaxExclude; } + + public String getTaxRate() { + return taxRate; + } + + public void setTaxRate(String taxRate) { + this.taxRate = taxRate; + } } \ No newline at end of file diff --git a/src/main/java/cn/palmte/work/service/ProjectEstimateService.java b/src/main/java/cn/palmte/work/service/ProjectEstimateService.java index b2c17c6..78b60c2 100644 --- a/src/main/java/cn/palmte/work/service/ProjectEstimateService.java +++ b/src/main/java/cn/palmte/work/service/ProjectEstimateService.java @@ -85,6 +85,7 @@ public class ProjectEstimateService { projectEstimateCostDevice.setType(ProjectEstimateCost.TYPE_DEVICE); projectEstimateCostDevice.setCostTaxInclude(estimateBean.getCostPurchaseDeviceTaxInclude()); projectEstimateCostDevice.setCostTaxExclude(estimateBean.getCostPurchaseDeviceTaxExclude()); + projectEstimateCostDevice.setTaxRate(estimateBean.getCostPurchaseDeviceSelect()); projectEstimateCostRepository.saveAndFlush(projectEstimateCostDevice); @@ -94,6 +95,7 @@ public class ProjectEstimateService { projectEstimateCostBuild.setType(ProjectEstimateCost.TYPE_BUILDING); projectEstimateCostBuild.setCostTaxInclude(estimateBean.getCostPurchaseBuildTaxInclude()); projectEstimateCostBuild.setCostTaxExclude(estimateBean.getCostPurchaseBuildTaxExclude()); + projectEstimateCostBuild.setTaxRate(estimateBean.getCostPurchaseBuildSelect()); projectEstimateCostRepository.saveAndFlush(projectEstimateCostBuild); ProjectEstimateCost projectEstimateCostService = new ProjectEstimateCost(); @@ -102,6 +104,7 @@ public class ProjectEstimateService { projectEstimateCostService.setType(ProjectEstimateCost.TYPE_SERVICE); projectEstimateCostService.setCostTaxInclude(estimateBean.getCostPurchaseServiceTaxInclude()); projectEstimateCostService.setCostTaxExclude(estimateBean.getCostPurchaseServiceTaxExclude()); + projectEstimateCostService.setTaxRate(estimateBean.getCostPurchaseServiceSelect()); projectEstimateCostRepository.saveAndFlush(projectEstimateCostService); ProjectEstimateCost projectEstimateCostOther = new ProjectEstimateCost(); @@ -110,6 +113,7 @@ public class ProjectEstimateService { projectEstimateCostOther.setType(ProjectEstimateCost.TYPE_OTHER); projectEstimateCostOther.setCostTaxInclude(estimateBean.getCostPurchaseOtherTaxInclude()); projectEstimateCostOther.setCostTaxExclude(estimateBean.getCostPurchaseOtherTaxExclude()); + projectEstimateCostOther.setTaxRate(estimateBean.getCostPurchaseOtherSelect()); projectEstimateCostRepository.saveAndFlush(projectEstimateCostOther); ProjectEstimateCost projectEstimateCostProject = new ProjectEstimateCost(); @@ -126,6 +130,7 @@ public class ProjectEstimateService { projectEstimateCostOtherOther.setType(ProjectEstimateCost.TYPE_OTHER_OTHER); projectEstimateCostOtherOther.setCostTaxInclude(estimateBean.getCostOtherOtherTaxInclude()); projectEstimateCostOtherOther.setCostTaxExclude(estimateBean.getCostOtherOtherTaxExclude()); + projectEstimateCostOtherOther.setTaxRate(estimateBean.getCostOtherOtherSelect()); projectEstimateCostRepository.saveAndFlush(projectEstimateCostOtherOther); } @@ -148,6 +153,7 @@ public class ProjectEstimateService { projectEstimateIncomeDevice.setType(ProjectEstimateIncome.TYPE_DEVICE); projectEstimateIncomeDevice.setIncomeTaxInclude(estimateBean.getIncomeDeviceTaxInclude()); projectEstimateIncomeDevice.setIncomeTaxExclude(estimateBean.getIncomeDeviceTaxExclude()); + projectEstimateIncomeDevice.setTaxRate(estimateBean.getIncomeDeviceSelect()); projectEstimateIncomeRepository.saveAndFlush(projectEstimateIncomeDevice); ProjectEstimateIncome projectEstimateIncomeEngineer = new ProjectEstimateIncome(); @@ -155,6 +161,7 @@ public class ProjectEstimateService { projectEstimateIncomeEngineer.setType(ProjectEstimateIncome.TYPE_ENGINEER); projectEstimateIncomeEngineer.setIncomeTaxInclude(estimateBean.getIncomeEngineerTaxInclude()); projectEstimateIncomeEngineer.setIncomeTaxExclude(estimateBean.getIncomeEngineerTaxExclude()); + projectEstimateIncomeEngineer.setTaxRate(estimateBean.getIncomeEngineerSelect()); projectEstimateIncomeRepository.saveAndFlush(projectEstimateIncomeEngineer); ProjectEstimateIncome projectEstimateIncomeService = new ProjectEstimateIncome(); @@ -162,6 +169,7 @@ public class ProjectEstimateService { projectEstimateIncomeService.setType(ProjectEstimateIncome.TYPE_SERVICE); projectEstimateIncomeService.setIncomeTaxInclude(estimateBean.getIncomeServiceTaxInclude()); projectEstimateIncomeService.setIncomeTaxExclude(estimateBean.getIncomeServiceTaxExclude()); + projectEstimateIncomeService.setTaxRate(estimateBean.getIncomeServiceSelect()); projectEstimateIncomeRepository.saveAndFlush(projectEstimateIncomeService); } @@ -174,14 +182,17 @@ public class ProjectEstimateService { ProjectEstimateIncome projectEstimateIncomeDevice = incomes.stream().filter(d -> d.getType() == ProjectEstimateIncome.TYPE_DEVICE).collect(Collectors.toList()).get(0); estimateBean.setIncomeDeviceTaxInclude(projectEstimateIncomeDevice.getIncomeTaxInclude()); estimateBean.setIncomeDeviceTaxExclude(projectEstimateIncomeDevice.getIncomeTaxExclude()); + estimateBean.setIncomeDeviceSelect(projectEstimateIncomeDevice.getTaxRate()); ProjectEstimateIncome projectEstimateIncomeEngineer = incomes.stream().filter(d -> d.getType() == ProjectEstimateIncome.TYPE_ENGINEER).collect(Collectors.toList()).get(0); estimateBean.setIncomeEngineerTaxInclude(projectEstimateIncomeEngineer.getIncomeTaxInclude()); estimateBean.setIncomeEngineerTaxExclude(projectEstimateIncomeEngineer.getIncomeTaxExclude()); + estimateBean.setIncomeEngineerSelect(projectEstimateIncomeEngineer.getTaxRate()); ProjectEstimateIncome projectEstimateIncomeService = incomes.stream().filter(d -> d.getType() == ProjectEstimateIncome.TYPE_SERVICE).collect(Collectors.toList()).get(0); estimateBean.setIncomeServiceTaxInclude(projectEstimateIncomeService.getIncomeTaxInclude()); estimateBean.setIncomeServiceTaxExclude(projectEstimateIncomeService.getIncomeTaxExclude()); + estimateBean.setIncomeServiceSelect(projectEstimateIncomeService.getTaxRate()); } @@ -191,18 +202,22 @@ public class ProjectEstimateService { ProjectEstimateCost projectEstimateCostDevice = costs.stream().filter(d -> d.getType() == ProjectEstimateCost.TYPE_DEVICE).collect(Collectors.toList()).get(0); estimateBean.setCostPurchaseDeviceTaxInclude(projectEstimateCostDevice.getCostTaxInclude()); estimateBean.setCostPurchaseDeviceTaxExclude(projectEstimateCostDevice.getCostTaxExclude()); + estimateBean.setCostPurchaseDeviceSelect(projectEstimateCostDevice.getTaxRate()); ProjectEstimateCost projectEstimateCostBuild = costs.stream().filter(d -> d.getType() == ProjectEstimateCost.TYPE_BUILDING).collect(Collectors.toList()).get(0); estimateBean.setCostPurchaseBuildTaxInclude(projectEstimateCostBuild.getCostTaxInclude()); estimateBean.setCostPurchaseBuildTaxExclude(projectEstimateCostBuild.getCostTaxExclude()); + estimateBean.setCostPurchaseBuildSelect(projectEstimateCostBuild.getTaxRate()); ProjectEstimateCost projectEstimateCostService = costs.stream().filter(d -> d.getType() == ProjectEstimateCost.TYPE_SERVICE).collect(Collectors.toList()).get(0); estimateBean.setCostPurchaseServiceTaxInclude(projectEstimateCostService.getCostTaxInclude()); estimateBean.setCostPurchaseServiceTaxExclude(projectEstimateCostService.getCostTaxExclude()); + estimateBean.setCostPurchaseServiceSelect(projectEstimateCostService.getTaxRate()); ProjectEstimateCost projectEstimateCostOther = costs.stream().filter(d -> d.getType() == ProjectEstimateCost.TYPE_OTHER).collect(Collectors.toList()).get(0); estimateBean.setCostPurchaseOtherTaxInclude(projectEstimateCostOther.getCostTaxInclude()); estimateBean.setCostPurchaseOtherTaxExclude(projectEstimateCostOther.getCostTaxExclude()); + estimateBean.setCostPurchaseOtherSelect(projectEstimateCostOther.getTaxRate()); ProjectEstimateCost projectEstimateCostProjectManage = costs.stream().filter(d -> d.getType() == ProjectEstimateCost.TYPE_PROJECT_MANAGE).collect(Collectors.toList()).get(0); /*estimateBean.setCostProjectManageTaxInclude(projectEstimateCostProjectManage.getCostTaxInclude());*/ @@ -211,6 +226,7 @@ public class ProjectEstimateService { ProjectEstimateCost projectEstimateCostOtherOther = costs.stream().filter(d -> d.getType() == ProjectEstimateCost.TYPE_OTHER_OTHER).collect(Collectors.toList()).get(0); estimateBean.setCostOtherOtherTaxInclude(projectEstimateCostOtherOther.getCostTaxInclude()); estimateBean.setCostOtherOtherTaxExclude(projectEstimateCostOtherOther.getCostTaxExclude()); + estimateBean.setCostOtherOtherSelect(projectEstimateCostOtherOther.getTaxRate()); } diff --git a/src/main/resources/static/assets/js/project_estimate.js b/src/main/resources/static/assets/js/project_estimate.js index e63f034..57ac4a2 100644 --- a/src/main/resources/static/assets/js/project_estimate.js +++ b/src/main/resources/static/assets/js/project_estimate.js @@ -83,13 +83,154 @@ function calIncomeAndCost() { calIncomeCost(); }); - $("input[name='costExpropriationTaxExclude']").change(function () { calIncomeCost(); }); $("input[name='costCompanyManageTaxExclude']").change(function () { calIncomeCost(); }); + + //设备类收入 + $("select[name='incomeDeviceSelect']").change(function () { + let val = $('#incomeDeviceSelect option:selected').val(); + var $incomeDeviceTaxExclude = $("input[name='incomeDeviceTaxExclude']"); + if(val == "自定义"){ + $("input[name='incomeDeviceTaxExclude']").attr('readonly',false); + $incomeDeviceTaxExclude.val(""); + }else if(val == "请选择税率"){ + $("input[name='incomeDeviceTaxExclude']").attr('readonly',true); + $incomeDeviceTaxExclude.val(""); + } else { + $("input[name='incomeDeviceTaxExclude']").attr('readonly',true); + var incomeDeviceTaxInclude = inputVal("incomeDeviceTaxInclude"); + $incomeDeviceTaxExclude.val(incomeDeviceTaxInclude-(incomeDeviceTaxInclude*val)); + } + calIncomeExclude(); + calIncomeCost(); + }); + + //工程类收入 + $("select[name='incomeEngineerSelect']").change(function () { + let val = $('#incomeEngineerSelect option:selected').val(); + var $incomeEngineerTaxExclude = $("input[name='incomeEngineerTaxExclude']"); + if(val == "自定义"){ + $("input[name='incomeEngineerTaxExclude']").attr('readonly',false) + }else if(val == "请选择税率"){ + $("input[name='incomeEngineerTaxExclude']").attr('readonly',true); + $incomeEngineerTaxExclude.val(""); + } else { + $("input[name='incomeEngineerTaxExclude']").attr('readonly',true); + var incomeEngineerTaxInclude = inputVal("incomeEngineerTaxInclude"); + $incomeEngineerTaxExclude.val(incomeEngineerTaxInclude-(incomeEngineerTaxInclude*val)); + } + calIncomeExclude(); + calIncomeCost(); + }); + + //服务类收入 + $("select[name='incomeServiceSelect']").change(function () { + let val = $('#incomeServiceSelect option:selected').val(); + var $incomeServiceTaxExclude = $("input[name='incomeServiceTaxExclude']"); + if(val == "自定义"){ + $("input[name='incomeServiceTaxExclude']").attr('readonly',false) + }else if(val == "请选择税率"){ + $("input[name='incomeServiceTaxExclude']").attr('readonly',true); + $incomeServiceTaxExclude.val(""); + } else { + $("input[name='incomeServiceTaxExclude']").attr('readonly',true); + var incomeServiceTaxInclude = inputVal("incomeServiceTaxInclude"); + $incomeServiceTaxExclude.val(incomeServiceTaxInclude-(incomeServiceTaxInclude*val)); + } + calIncomeExclude(); + calIncomeCost(); + }); + + //设备类采购成本 + $("select[name='costPurchaseDeviceSelect']").change(function () { + let val = $('#costPurchaseDeviceSelect option:selected').val(); + var $costPurchaseDeviceTaxExclude = $("input[name='costPurchaseDeviceTaxExclude']"); + if(val == "自定义"){ + $("input[name='costPurchaseDeviceTaxExclude']").attr('readonly',false) + }else if(val == "请选择税率"){ + $("input[name='costPurchaseDeviceTaxExclude']").attr('readonly',true); + $costPurchaseDeviceTaxExclude.val(""); + } else { + $("input[name='costPurchaseDeviceTaxExclude']").attr('readonly',true); + var costPurchaseDeviceTaxInclude = inputVal("costPurchaseDeviceTaxInclude"); + $costPurchaseDeviceTaxExclude.val(costPurchaseDeviceTaxInclude-(costPurchaseDeviceTaxInclude*val)); + } + calCostExclude(); + calIncomeCost(); + }); + + //施工类采购成本 + $("select[name='costPurchaseBuildSelect']").change(function () { + let val = $('#costPurchaseBuildSelect option:selected').val(); + var $costPurchaseBuildTaxExclude = $("input[name='costPurchaseBuildTaxExclude']"); + if(val == "自定义"){ + $("input[name='costPurchaseBuildTaxExclude']").attr('readonly',false) + }else if(val == "请选择税率"){ + $("input[name='costPurchaseBuildTaxExclude']").attr('readonly',true); + $costPurchaseBuildTaxExclude.val(""); + } else { + $("input[name='costPurchaseBuildTaxExclude']").attr('readonly',true); + var costPurchaseBuildTaxInclude = inputVal("costPurchaseBuildTaxInclude"); + $costPurchaseBuildTaxExclude.val(costPurchaseBuildTaxInclude-(costPurchaseBuildTaxInclude*val)); + } + calCostExclude(); + calIncomeCost(); + }); + //服务类采购成本 + $("select[name='costPurchaseServiceSelect']").change(function () { + let val = $('#costPurchaseServiceSelect option:selected').val(); + var $costPurchaseServiceTaxExclude = $("input[name='costPurchaseServiceTaxExclude']"); + if(val == "自定义"){ + $("input[name='costPurchaseServiceTaxExclude']").attr('readonly',false) + }else if(val == "请选择税率"){ + $("input[name='costPurchaseServiceTaxExclude']").attr('readonly',true); + $costPurchaseServiceTaxExclude.val(""); + } else { + $("input[name='costPurchaseServiceTaxExclude']").attr('readonly',true); + var costPurchaseServiceTaxInclude = inputVal("costPurchaseServiceTaxInclude"); + $costPurchaseServiceTaxExclude.val(costPurchaseServiceTaxInclude-(costPurchaseServiceTaxInclude*val)); + } + calCostExclude(); + calIncomeCost(); + }); + //其他类采购成本 + $("select[name='costOtherOtherSelect']").change(function () { + let val = $('#costOtherOtherSelect option:selected').val(); + var $costOtherOtherTaxExclude = $("input[name='costOtherOtherTaxExclude']"); + if(val == "自定义"){ + $("input[name='costOtherOtherTaxExclude']").attr('readonly',false) + }else if(val == "请选择税率"){ + $("input[name='costOtherOtherTaxExclude']").attr('readonly',true); + $costOtherOtherTaxExclude.val(""); + } else { + $("input[name='costOtherOtherTaxExclude']").attr('readonly',true); + var costOtherOtherTaxInclude = inputVal("costOtherOtherTaxInclude"); + $costOtherOtherTaxExclude.val(costOtherOtherTaxInclude-(costOtherOtherTaxInclude*val)); + } + calCostExclude(); + calIncomeCost(); + }); + //其他成本 + $("select[name='costPurchaseOtherSelect']").change(function () { + let val = $('#costPurchaseOtherSelect option:selected').val(); + var $costPurchaseOtherTaxExclude = $("input[name='costPurchaseOtherTaxExclude']"); + if(val == "自定义"){ + $("input[name='costPurchaseOtherTaxExclude']").attr('readonly',false) + }else if(val == "请选择税率"){ + $("input[name='costPurchaseOtherTaxExclude']").attr('readonly',true); + $costPurchaseOtherTaxExclude.val(""); + } else { + $("input[name='costPurchaseOtherTaxExclude']").attr('readonly',true); + var costPurchaseOtherTaxInclude = inputVal("costPurchaseOtherTaxInclude"); + $costPurchaseOtherTaxExclude.val(costPurchaseOtherTaxInclude-(costPurchaseOtherTaxInclude*val)); + } + calCostExclude(); + calIncomeCost(); + }); } /** diff --git a/src/main/resources/templates/admin/admin_index.ftl b/src/main/resources/templates/admin/admin_index.ftl index bb498ca..b22fb57 100644 --- a/src/main/resources/templates/admin/admin_index.ftl +++ b/src/main/resources/templates/admin/admin_index.ftl @@ -92,6 +92,25 @@ }); }); + /** + * 刷新审批更新 更新跑马灯 + */ + function refreshApproveMsg() { + var span = $("#myMsgSpan", parent.document); + $.ajax({ + url: '${base}/admin/approveProjectsMsg', + dataType: "json", + contentType: "application/json", + type: 'post', + async: false, + success: function (data) { + if (data.status == 0) { + span.text(data.msg) + } + } + }); + } + $(function(){ $("#arrow").on("click",function(){ if($(this).hasClass("arrow-left")){ @@ -111,6 +130,8 @@ $(this).popover('setContent', '点击显示菜单栏'); } }); + + refreshApproveMsg(); }); diff --git a/src/main/resources/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl index da2232c..8e1d3a0 100644 --- a/src/main/resources/templates/admin/project_approve.ftl +++ b/src/main/resources/templates/admin/project_approve.ftl @@ -1954,10 +1954,10 @@ type: 'post', async: false, success: function (data) { - $("#marqueeLi", parent.document).addClass("am-hide"); if (data.status == 0) { alert(data.msg); window.location.href = window.location.href; + refreshMyApproveMsg(); } else if (data.status == 1) { alert(data.msg); } @@ -1997,4 +1997,23 @@ $("#keywords").val(keywords); } + + /** + * 刷新审批更新 更新跑马灯 + */ + function refreshMyApproveMsg() { + var span = $("#myMsgSpan", parent.document); + $.ajax({ + url: '${base}/admin/approveProjectsMsg', + dataType: "json", + contentType: "application/json", + type: 'post', + async: false, + success: function (data) { + if (data.status == 0) { + span.text(data.msg) + } + } + }); + } \ No newline at end of file diff --git a/src/main/resources/templates/admin/project_estimate_add.ftl b/src/main/resources/templates/admin/project_estimate_add.ftl index b86a952..3b26a10 100644 --- a/src/main/resources/templates/admin/project_estimate_add.ftl +++ b/src/main/resources/templates/admin/project_estimate_add.ftl @@ -194,30 +194,68 @@ 费用 含税金额(元) 不含税金额(元) + 税率 收入 设备类 - + + + + 收入 工程类 - + + + + 收入 服务类 - + + + + 合计 + / @@ -230,34 +268,83 @@ 费用项目 含税金额(元) 不含税金额(元) + 税率 成本 采购成本 设备 - + + + + 成本 采购成本 施工 - + + + + 成本 采购成本 服务 - + + + + 成本 采购成本 其他 - + + + + 成本 @@ -265,6 +352,7 @@ 项目管理成本 + / 成本 @@ -272,7 +360,19 @@ - + + + + 合计 @@ -280,6 +380,7 @@ + / diff --git a/src/main/resources/templates/admin/project_estimate_edit.ftl b/src/main/resources/templates/admin/project_estimate_edit.ftl index 7f91638..00f5063 100644 --- a/src/main/resources/templates/admin/project_estimate_edit.ftl +++ b/src/main/resources/templates/admin/project_estimate_edit.ftl @@ -201,30 +201,68 @@ 费用 含税金额(元) 不含税金额(元) + 税率 收入 设备类 - + readonly required> + + + 收入 工程类 - + readonly required> + + + 收入 服务类 - + readonly required> + + + 合计 + / @@ -237,34 +275,83 @@ 费用项目 含税金额(元) 不含税金额(元) + 税率 成本 采购成本 设备 - + readonly required> + + + 成本 采购成本 施工 - + readonly required> + + + 成本 采购成本 服务 - + readonly required> + + + 成本 采购成本 其他 - + readonly required> + + + 成本 @@ -279,7 +366,19 @@ - + readonly required> + + + 合计 @@ -287,6 +386,7 @@ + / diff --git a/src/main/resources/templates/common/header.ftl b/src/main/resources/templates/common/header.ftl index f6ee46d..62711de 100644 --- a/src/main/resources/templates/common/header.ftl +++ b/src/main/resources/templates/common/header.ftl @@ -22,7 +22,7 @@
  • - ${hasApproveProjectsMessage!""} +