diff --git a/build.gradle b/build.gradle index 945decc..c2060c1 100644 --- a/build.gradle +++ b/build.gradle @@ -50,7 +50,7 @@ dependencies { compile 'com.jfinal:jfinal:2.2' compile 'com.alibaba:druid:1.1.9' - compile 'mysql:mysql-connector-java:6.0.6' + compile 'mysql:mysql-connector-java:8.0.33' //compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3' //shiro compile group: 'org.apache.shiro', name: 'shiro-spring', version: '1.4.0' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3ba40c1..be280be 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-bin.zip +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-bin.zip diff --git a/src/main/java/cn/palmte/work/controller/backend/ProjectController.java b/src/main/java/cn/palmte/work/controller/backend/ProjectController.java index 4c4dbe4..d9d9f9b 100644 --- a/src/main/java/cn/palmte/work/controller/backend/ProjectController.java +++ b/src/main/java/cn/palmte/work/controller/backend/ProjectController.java @@ -605,15 +605,15 @@ public class ProjectController extends BaseController { public ResponseMsg budgetEditSaveBudgetPayPlan(@RequestBody String body) { JSONObject jsonObject = JSON.parseObject(body); JSONArray details = jsonObject.getJSONArray(DETAILS); - List detailList = new ArrayList<>(details.size()); + List detailList = new ArrayList<>(details.size()); for (int i = 0; i < details.size(); i++) { - ProjectBudgetPayPlan detail = details.getObject(i, ProjectBudgetPayPlan.class); + ProjectBudgetPayPlanTemp detail = details.getObject(i, ProjectBudgetPayPlanTemp.class); detailList.add(detail); } Project project = projectService.getProject(jsonObject.getInteger(PROJECT_ID)); - projectBudgetService.saveBudgetPayPlan(project, detailList); + projectBudgetService.saveBudgetPayPlanTemp(project, detailList); return ResponseMsg.buildSuccessMsg("成功"); } @@ -1132,7 +1132,7 @@ public class ProjectController extends BaseController { @RequestMapping("/incomeTemplate") public void incomeTemplate(HttpServletResponse response) throws Exception{ - String[] headers = new String[]{"类别", "名称", "规格类型", "参数", "单位", "数量", "单价", "税率(%)"}; + String[] headers = new String[]{"类别", "产品大类", "税率(%)","含税总金额(元)"}; downloadHeader(response , Utils.generateExcelName("收入明细表批量导入模板")); ExportUtils exportUtils = new ExportUtils(headers); exportUtils.write(response.getOutputStream()); @@ -1167,7 +1167,7 @@ public class ProjectController extends BaseController { @RequestMapping("/costTemplate") public void costTemplate(HttpServletResponse response) throws Exception{ - String[] headers = new String[]{"费用项目", "采购类别", "名称", "单位", "数量", "单价", "税率(%)", "签约方", "是否垫资", "预估垫资金额(元)", "支出时间", "支出金额(元)", "付款方式", "备注"}; + String[] headers = new String[]{"采购成本项目", "产品大类", "税率(%)","含税总金额(元)" ,"供应商", "备注"}; downloadHeader(response , Utils.generateExcelName("采购成本明细表批量导入模板")); ExportUtils exportUtils = new ExportUtils(headers); exportUtils.write(response.getOutputStream()); @@ -1254,8 +1254,8 @@ public class ProjectController extends BaseController { //收入明细 List budgetIncomeDetail = projectBudgetService.getBudgetIncomeDetail(project); BigDecimal incomeTotalAmount = projectBudgetService.getBudgetIncomeAmount(project); - String[] headers2 = {"序号", "类别", "名称", "规格类型", "参数", "单位", "数量", "单价", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)"}; - String[] columns2 = {"tempId", "type", "name", "spec", "param", "unit", "amount", "price", "taxRate", "totalTaxInclude", "totalTaxExclude", "totalTax"}; + String[] headers2 = {"序号", "类别", "产品大类", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)"}; + String[] columns2 = {"tempId", "type", "name", "taxRate", "totalTaxInclude", "totalTaxExclude", "totalTax"}; exportExcelUtils.exportIncomeDetailExcel(headers2, columns2, project, budgetBean, budgetIncomeDetail, incomeTotalAmount, "yyyy-MM-dd", 0, "收入明细表", outputStream); exportExcelUtils.end(outputStream); @@ -1302,8 +1302,8 @@ public class ProjectController extends BaseController { BigDecimal costPayAmountTotal = projectBudgetService.getBudgetCostPayAmountTotal(project); List procurementTypes = procurementTypeService.allProcurementTypeList(); Map procurementMap = procurementTypes.stream().collect(Collectors.toMap(ProcurementType::getId, ProcurementType::getName)); - String[] headers3 = {"序号", "费用项目", "采购类别", "名称", "单位", "数量", "单价", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)", "签约方", "是否垫资", "预估垫资金额(元)", "支出时间", "支出金额(元)", "付款方式", "备注"}; - String[] columns3 = {"tempId", "type", "category", "name", "unit", "amount", "price", "taxRate", "totalTaxInclude", "totalTaxExclude", "totalTax", "contractParty", "isUnderwritten", "underwrittenAmount", "payTime", "payAmount", "payWay", "remark"}; + String[] headers3 = {"序号", "采购成本项目", "产品大类", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)", "供应商", "备注"}; + String[] columns3 = {"tempId", "type", "category", "taxRate", "totalTaxInclude", "totalTaxExclude", "totalTax", "contractParty", "remark"}; exportExcelUtils.exportCostDetailExcel(headers3, columns3, project, budgetBean, budgetCostDetail, costTotalAmount, costUnderwrittenAmountTotal, costPayAmountTotal, procurementMap, "yyyy-MM-dd", 0, "采购成本明细表", outputStream); exportExcelUtils.end(outputStream); @@ -1325,8 +1325,8 @@ public class ProjectController extends BaseController { List budgetCostProjectManageDetail = projectBudgetService.getBudgetCostProjectManageDetail(project); BigDecimal costProjectManageTotalAmount = projectBudgetService.getBudgetCostProjectManageAmount(project); BigDecimal managePayAmountTotal = projectBudgetService.getBudgetCostProjectManagePayAmount(project); - String[] headers4 = {"序号", "财务费用类别", "业务项目", "项目明细", "单位", "数量", "单价", "总金额(元)", "支出时间", "支出金额(元)", "预估计算方法", "预估依据", "备注"}; - String[] columns4 = {"tempId", "type", "name", "detail", "unit", "amount", "price", "total", "payTime", "payAmount", "predictMethod", "predictWhy", "remark"}; + String[] headers4 = {"序号", "费用类别", "业务项目", "项目明细", "总金额(元)", "支出时间", "支出金额(元)", "预估计算方法", "预估依据", "备注"}; + String[] columns4 = {"tempId", "type", "name", "detail", "total", "payTime", "payAmount", "predictMethod", "predictWhy", "remark"}; exportExcelUtils.exportCostManageDetailExcel(headers4, columns4, project, budgetBean, budgetCostProjectManageDetail, costProjectManageTotalAmount, managePayAmountTotal, "yyyy-MM-dd", 0, "项目管理成本表", outputStream); exportExcelUtils.end(outputStream); @@ -1347,7 +1347,7 @@ public class ProjectController extends BaseController { //资金计划明细 List projectBudgetPlanDetails = projectBudgetService.getProjectBudgetPlanDetails(project); ProjectBudgetPlanDetail projectBudgetPlanDetailTotal = projectBudgetService.getProjectBudgetPlanDetailTotal(project, projectBudgetPlanDetails); - String[] headers5 = {"月份", "设备支出", "工程支出(含服务+施工+其他)", "经营性开支", "保证金支出", "支出合计", "销售收款", "保证金收款", "收款合计", "资金余额", "资金利息", "垫资计划", "还款计划"}; + String[] headers5 = {"月份", "设备支出", "工程支出(含服务+施工+其他)", "项目管理费用付款", "保证金付款", "付款合计", "销售收款", "保证金收款", "收款合计", "资金余额", "资金利息", "垫资计划", "还款计划"}; String[] row5 = {"month", "deviceCost", "engineerCost", "projectManageCost", "earnestMoneyCost", "totalCost", "saleIncome", "earnestMoneyIncome", "totalIncome", "fundBalance", "capitalInterest", "underwrittenPlan", "repaymentPlan"}; exportExcelUtils.exportPlanDetailExcel(headers5, row5, project, budgetBean, projectBudgetPlanDetails, projectBudgetPlanDetailTotal, "yyyy-MM-dd", 0, "资金计划表", outputStream); diff --git a/src/main/java/cn/palmte/work/model/ProjectBudgetPayPlanTemp.java b/src/main/java/cn/palmte/work/model/ProjectBudgetPayPlanTemp.java new file mode 100644 index 0000000..e7367ae --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectBudgetPayPlanTemp.java @@ -0,0 +1,20 @@ +package cn.palmte.work.model; + +import org.springframework.beans.BeanUtils; + +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * 项目付款计划表 + */ +@Entity +@Table(name = "project_budget_pay_plan_temp") +public class ProjectBudgetPayPlanTemp extends ProjectBudgetPayPlanBase { + public ProjectBudgetPayPlan toProjectBudgetPayPlanDetail() { + ProjectBudgetPayPlan projectBudgetPayPlan = new ProjectBudgetPayPlan(); + BeanUtils.copyProperties(this, projectBudgetPayPlan); + projectBudgetPayPlan.setId(null); + return projectBudgetPayPlan; + } +} \ No newline at end of file diff --git a/src/main/java/cn/palmte/work/model/ProjectBudgetPayPlanTempRepository.java b/src/main/java/cn/palmte/work/model/ProjectBudgetPayPlanTempRepository.java new file mode 100644 index 0000000..e527afb --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectBudgetPayPlanTempRepository.java @@ -0,0 +1,10 @@ +package cn.palmte.work.model; + +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; + +public interface ProjectBudgetPayPlanTempRepository extends JpaRepository { + List findAllByProjectIdEquals(int id); + +} diff --git a/src/main/java/cn/palmte/work/service/ProjectBudgetService.java b/src/main/java/cn/palmte/work/service/ProjectBudgetService.java index 7994279..34774ed 100644 --- a/src/main/java/cn/palmte/work/service/ProjectBudgetService.java +++ b/src/main/java/cn/palmte/work/service/ProjectBudgetService.java @@ -13,7 +13,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import top.jfunc.common.utils.CollectionUtil; -import java.lang.reflect.InvocationTargetException; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.*; @@ -41,6 +40,8 @@ public class ProjectBudgetService { @Autowired private ProjectBudgetPayPlanRepository projectBudgetPayPlanRepository; @Autowired + private ProjectBudgetPayPlanTempRepository projectBudgetPayPlanTempRepository; + @Autowired private ProjectBudgetIncomePlanDetailTempRepository projectBudgetIncomePlanDetailTempRepository; @Autowired private ProjectBudgetCostDetailRepository projectBudgetCostDetailRepository; @@ -659,21 +660,7 @@ public class ProjectBudgetService { * 根据每个月的计算资金计划的总 */ public ProjectBudgetPlanDetail getProjectBudgetPlanDetailTotal(Project project, List projectBudgetPlanDetails) { - List budgetPayPlan = projectBudgetService.getBudgetPayPlan(project); - SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM"); - - Map> monthlyProjectPaymentSum = budgetPayPlan.stream() - .collect(Collectors.groupingBy( - plan -> formatter.format(plan.getPayTime()), // 将 Date 转换为 yyyy-MM 格式的字符串 - Collectors.groupingBy( - ProjectBudgetPayPlan::getPayProject, - Collectors.mapping( - ProjectBudgetPayPlan::getPayAmount, - Collectors.reducing(BigDecimal.ZERO, BigDecimal::add) - ) - ) - )); BigDecimal projectManageCost = new BigDecimal(0); BigDecimal earnestMoneyCost = new BigDecimal(0); BigDecimal deviceCost = new BigDecimal(0); @@ -693,26 +680,17 @@ public class ProjectBudgetService { if(CollectionUtil.isNotEmpty(projectBudgetPlanDetails)){ for (ProjectBudgetPlanDetail budgetPlan : projectBudgetPlanDetails) { - String month = budgetPlan.getMonth(); - Map projectPayments = monthlyProjectPaymentSum.getOrDefault(month, Collections.emptyMap()); deviceCost=deviceCost.add(budgetPlan.getDeviceCost()); projectManageCost = projectManageCost.add(budgetPlan.getProjectManageCost()); earnestMoneyCost = earnestMoneyCost.add(budgetPlan.getEarnestMoneyCost()); if (budgetPlan.getEngineerCost()!=null) { engineerCost = engineerCost.add(budgetPlan.getEngineerCost()); } - BigDecimal projectCostTemp = projectPayments.getOrDefault("工程成本", BigDecimal.ZERO); - budgetPlan.setProjectCost(projectCostTemp); - projectCost = projectCost.add(projectCostTemp); - BigDecimal serviceCostTemp = projectPayments.getOrDefault("服务成本", BigDecimal.ZERO); - budgetPlan.setServiceCost(serviceCostTemp); - serviceCost = serviceCost.add(serviceCostTemp); - - BigDecimal otherCostTemp = projectPayments.getOrDefault("其他成本", BigDecimal.ZERO); - budgetPlan.setOtherCost(otherCostTemp); - otherCost = otherCost.add(otherCostTemp); + projectCost = projectCost.add(budgetPlan.getProjectCost()); + serviceCost = serviceCost.add(budgetPlan.getServiceCost()); + otherCost = otherCost.add(budgetPlan.getOtherCost()); totalCost = totalCost.add(budgetPlan.getTotalCost()); saleIncome = saleIncome.add(budgetPlan.getSaleIncome()); earnestMoneyIncome = earnestMoneyIncome.add(budgetPlan.getEarnestMoneyIncome()); @@ -758,6 +736,21 @@ public class ProjectBudgetService { List budgetCostProjectManageDetail, List projectBudgetPlanDetails) { + List budgetPayPlan = projectBudgetService.getBudgetPayPlan(project); + + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM"); + + Map> monthlyProjectPaymentSum = budgetPayPlan.stream() + .collect(Collectors.groupingBy( + plan -> formatter.format(plan.getPayTime()), // 将 Date 转换为 yyyy-MM 格式的字符串 + Collectors.groupingBy( + ProjectBudgetPayPlan::getPayProject, + Collectors.mapping( + ProjectBudgetPayPlan::getPayAmount, + Collectors.reducing(BigDecimal.ZERO, BigDecimal::add) + ) + ) + )); BigDecimal deviceCost = calDeviceCost(budgetCostDetail); BigDecimal engineerCost = calEngineerCost(budgetCostDetail); BigDecimal projectManageCost = calProjectManageCost(budgetCostProjectManageDetail); @@ -769,9 +762,25 @@ public class ProjectBudgetService { BigDecimal capitalInterest = new BigDecimal(0); BigDecimal underwrittenPlan = new BigDecimal(0); BigDecimal repaymentPlan = new BigDecimal(0); - + BigDecimal projectCost = new BigDecimal(0); + BigDecimal serviceCost = new BigDecimal(0); + BigDecimal otherCost = new BigDecimal(0); if(CollectionUtil.isNotEmpty(projectBudgetPlanDetails)){ for (ProjectBudgetPlanDetail budgetPlan : projectBudgetPlanDetails) { + String month = budgetPlan.getMonth(); + + Map projectPayments = monthlyProjectPaymentSum.getOrDefault(month, Collections.emptyMap()); + BigDecimal projectCostTemp = projectPayments.getOrDefault("2", BigDecimal.ZERO); + budgetPlan.setProjectCost(projectCostTemp); + projectCost = projectCost.add(projectCostTemp); + + BigDecimal serviceCostTemp = projectPayments.getOrDefault("3", BigDecimal.ZERO); + budgetPlan.setServiceCost(serviceCostTemp); + serviceCost = serviceCost.add(serviceCostTemp); + + BigDecimal otherCostTemp = projectPayments.getOrDefault("4", BigDecimal.ZERO); + budgetPlan.setOtherCost(otherCostTemp); + otherCost=otherCost.add(otherCostTemp); earnestMoneyCost = earnestMoneyCost.add(budgetPlan.getEarnestMoneyCost()); earnestMoneyIncome = earnestMoneyIncome.add(budgetPlan.getEarnestMoneyIncome()); capitalInterest = capitalInterest.add(budgetPlan.getCapitalInterest()); @@ -797,7 +806,9 @@ public class ProjectBudgetService { projectBudgetPlanDetail.setEarnestMoneyIncome(earnestMoneyIncome); projectBudgetPlanDetail.setTotalIncome(totalIncome); projectBudgetPlanDetail.setFundBalance(fundBalance); - + projectBudgetPlanDetail.setProjectCost(projectCost); + projectBudgetPlanDetail.setServiceCost(serviceCost); // 设置服务成本 + projectBudgetPlanDetail.setOtherCost(otherCost); // 设置其他成本 projectBudgetPlanDetail.setCapitalInterest(capitalInterest); projectBudgetPlanDetail.setUnderwrittenPlan(underwrittenPlan); projectBudgetPlanDetail.setRepaymentPlan(repaymentPlan); @@ -1105,6 +1116,14 @@ public class ProjectBudgetService { .collect(Collectors.toList()); projectBudgetCostDetailRepository.save(costDetails); } + //付款计划表 + List projectBudgetPayPlanTemps = projectBudgetPayPlanTempRepository.findAllByProjectIdEquals(p.getId()); + if(CollectionUtil.isNotEmpty(projectBudgetPayPlanTemps)){ + List costDetails = projectBudgetPayPlanTemps.stream() + .map(ProjectBudgetPayPlanTemp::toProjectBudgetPayPlanDetail) + .collect(Collectors.toList()); + projectBudgetPayPlanRepository.save(costDetails); + } //项目管理明细 List projectBudgetCostProjectManageDetailTemps = projectBudgetCostProjectManageDetailTempRepository.findAllByProjectIdEquals(p.getId()); if(CollectionUtil.isNotEmpty(projectBudgetCostProjectManageDetailTemps)){ @@ -1134,6 +1153,15 @@ public class ProjectBudgetService { clearBudgetCostProjectManageDetail(p); //资金计划明细 clearBudgetPlanDetail(p); + //付款计划表 + clearBudgetPayPlan(p); + } + + private void clearBudgetPayPlan(Project p) { + List costDetails = projectBudgetPayPlanRepository.findAllByProjectIdEquals(p.getId()); + if(CollectionUtil.isNotEmpty(costDetails)){ + projectBudgetPayPlanRepository.deleteInBatch(costDetails); + } } @Transactional(rollbackFor = Exception.class) @@ -1183,36 +1211,22 @@ public class ProjectBudgetService { } else { throw new Exception("该类别不存在"); } - key = "名称"; + key = "产品大类"; o1 = m.get(key); temp.setName((String) o1); - key = "规格类型"; - o1 = m.get(key); - temp.setSpec((String) o1); - key = "参数"; - o1 = m.get(key); - temp.setParam((String) o1); - key = "单位"; - o1 = m.get(key); - temp.setUnit((String) o1); try { - key = "数量"; - o1 = m.get(key); - if (o1 != null) { - temp.setAmount(new BigDecimal((String) o1)); - } - key = "单价"; - o1 = m.get(key); - if (o1 != null) { - temp.setPrice(new BigDecimal((String) o1)); - } key = "税率(%)"; o1 = m.get(key); if (o1 != null) { temp.setTaxRate(new BigDecimal((String) o1)); } + key = "含税总金额(元)"; + o1 = m.get(key); + if (o1 != null) { + temp.setTotalTaxInclude(new BigDecimal((String) o1)); + } } catch (Exception e) { - throw new Exception("数量、单价、税率需为数字"); + throw new Exception("税率、含税总金额需为数字"); } incomeDetailTempList.add(temp); } @@ -1252,7 +1266,7 @@ public class ProjectBudgetService { String key; Object o1; temp.setProjectId(id); - key = "费用项目"; + key = "采购成本项目"; o1 = m.get(key); String type = (String) o1; if ("设备".equals(type)) { @@ -1266,75 +1280,36 @@ public class ProjectBudgetService { } else { throw new Exception("该费用项目不存在"); } - key = "采购类别"; + key = "产品大类"; o1 = m.get(key); String category = (String) o1; ProcurementType procurementType = procurementTypeRepository.findByName(category); if (procurementType != null && procurementType.getType() == temp.getType()) { temp.setCategory(procurementType.getId()); } else { - throw new Exception("该采购类别不存在或者与费用项目不匹配"); + throw new Exception("该采购类别不存在或者与采购成本项目不匹配"); } - key = "名称"; - o1 = m.get(key); - temp.setName((String) o1); - key = "单位"; - o1 = m.get(key); - temp.setUnit((String) o1); - key = "签约方"; + + key = "供应商"; o1 = m.get(key); temp.setContractParty((String) o1); - key = "是否垫资"; - o1 = m.get(key); - String isUnderwritten = (String) o1; - if ("是".equals(isUnderwritten)) { - temp.setIsUnderwritten(1); - } else if ("否".equals(isUnderwritten)) { - temp.setIsUnderwritten(2); - } else { - temp.setIsUnderwritten(0); - } + try { - key = "数量"; - o1 = m.get(key); - if (o1 != null) { - temp.setAmount(new BigDecimal((String) o1)); - } - key = "单价"; - o1 = m.get(key); - if (o1 != null) { - temp.setPrice(new BigDecimal((String) o1)); - } + key = "税率(%)"; o1 = m.get(key); if (o1 != null) { temp.setTaxRate(new BigDecimal((String) o1)); } - key = "预估垫资金额(元)"; + key = "含税总金额(元)"; o1 = m.get(key); if (o1 != null) { - temp.setUnderwrittenAmount(new BigDecimal((String) o1)); - } - key = "支出金额(元)"; - o1 = m.get(key); - if (o1 != null) { - temp.setPayAmount(new BigDecimal((String) o1)); + temp.setTotalTaxInclude(new BigDecimal((String) o1)); } + } catch (Exception e) { - throw new Exception("数量、单价、税率、预估垫资金额和支出金额需为数字"); + throw new Exception("税率、含税总金额(元)需为数字"); } - try { - key = "支出时间"; - o1 = m.get(key); - if (o1 != null) { - temp.setPayTime(DateKit.getDate((String) o1, DateKit.DATE_FORMAT)); - } - } catch (Exception e) { - throw new Exception("支出时间需为时间格式yyyy-MM-dd"); - } - key = "付款方式"; - o1 = m.get(key); - temp.setPayWay((String) o1); key = "备注"; o1 = m.get(key); temp.setRemark((String) o1); @@ -1345,13 +1320,21 @@ public class ProjectBudgetService { return projectBudgetPayPlanRepository.findAllByProjectIdEquals(project.getId()); } - public void saveBudgetPayPlan(Project project, List detailList) { + public void saveBudgetPayPlanTemp(Project project, List detailList) { + clearBudgetPauPlanTemp(project); if(CollectionUtil.isNotEmpty(detailList)){ - for (ProjectBudgetPayPlan temp : detailList) { + for (ProjectBudgetPayPlanTemp temp : detailList) { temp.setProjectId(project.getId()); // temp.setUnderwrittenTaxRate(project.getUnderwrittenTaxRate()); } - projectBudgetPayPlanRepository.save(detailList); + projectBudgetPayPlanTempRepository.save(detailList); + } + } + + private void clearBudgetPauPlanTemp(Project project) { + List allByProjectIdEquals = projectBudgetPayPlanTempRepository.findAllByProjectIdEquals(project.getId()); + if(CollectionUtil.isNotEmpty(allByProjectIdEquals)){ + projectBudgetPayPlanTempRepository.deleteInBatch(allByProjectIdEquals); } } } diff --git a/src/main/java/cn/palmte/work/utils/excel/ExportExcelUtils.java b/src/main/java/cn/palmte/work/utils/excel/ExportExcelUtils.java index ec94315..6243552 100644 --- a/src/main/java/cn/palmte/work/utils/excel/ExportExcelUtils.java +++ b/src/main/java/cn/palmte/work/utils/excel/ExportExcelUtils.java @@ -7,18 +7,14 @@ import cn.palmte.work.utils.ObjectKit; import cn.palmte.work.utils.Utils; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.*; -import org.apache.poi.xssf.streaming.SXSSFSheet; -import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import top.jfunc.common.db.bean.Record; import javax.servlet.ServletOutputStream; import java.io.IOException; import java.io.OutputStream; import java.math.BigDecimal; import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -196,7 +192,7 @@ public class ExportExcelUtils { index = index + 3; // 成本 Row costRow = sheet.createRow(index++); - createTitleRow(costRow, "成本"); + createTitleRow(costRow, "采购成本"); index = createCostRow(budgetBean, sheet, index, otherName, costTaxRates); index = index + 3; // 管理 @@ -363,7 +359,7 @@ public class ExportExcelUtils { createEngineerCostRow(budgetBean, sheet, index++); createServiceCostRow(budgetBean, sheet, index++); createOtherCostRow(budgetBean, sheet, index++); - createManageCostRow(budgetBean, sheet, index++); + // createManageCostRow(budgetBean, sheet, index++); createOtherRow(budgetBean, sheet, index++, otherName); createTotalCostRow(budgetBean, sheet, index++); Row row = sheet.createRow(index++); @@ -443,7 +439,7 @@ public class ExportExcelUtils { Cell thirdCell = row.createCell(2); thirdCell.setCellStyle(style2); thirdCell.setCellType(CellType.STRING); - thirdCell.setCellValue("施工"); + thirdCell.setCellValue("工程"); Cell fourthCell = row.createCell(3); fourthCell.setCellStyle(style2); fourthCell.setCellType(CellType.NUMERIC); @@ -523,23 +519,11 @@ public class ExportExcelUtils { Cell secondCell = row.createCell(1); secondCell.setCellStyle(style2); secondCell.setCellType(CellType.STRING); - secondCell.setCellValue("项目管理成本"); + secondCell.setCellValue("项目管理费用"); Cell thirdCell = row.createCell(2); thirdCell.setCellStyle(style2); thirdCell.setCellType(CellType.STRING); - thirdCell.setCellValue("项目管理成本"); - Cell fourthCell = row.createCell(3); - fourthCell.setCellStyle(style2); - fourthCell.setCellType(CellType.NUMERIC); - fourthCell.setCellValue(Utils.format(budgetBean.getCostProjectManageTaxInclude())); - Cell fifthCell = row.createCell(4); - fifthCell.setCellStyle(style2); - fifthCell.setCellType(CellType.NUMERIC); - fifthCell.setCellValue(Utils.format(budgetBean.getCostProjectManageTaxExclude())); - Cell sixthCell = row.createCell(5); - sixthCell.setCellStyle(style2); - sixthCell.setCellType(CellType.STRING); - sixthCell.setCellValue("财务计取以不含税方式核算"); + thirdCell.setCellValue(Utils.format(budgetBean.getCostProjectManageTaxExclude())); } private void createOtherRow(BudgetBean budgetBean, XSSFSheet sheet, int index, String otherName) { @@ -598,10 +582,28 @@ public class ExportExcelUtils { sixthCell.setCellValue(Utils.format(budgetBean.getCostTotalTax())); } + private void createManageTotalCostRow(BudgetBean budgetBean, XSSFSheet sheet, int index) { + Row row = sheet.createRow(index); + Cell firstCell = row.createCell(0); + firstCell.setCellStyle(style2); + firstCell.setCellType(CellType.STRING); + firstCell.setCellValue("合计"); + Cell secondCell = row.createCell(1); + secondCell.setCellStyle(style2); + secondCell.setCellType(CellType.STRING); + secondCell.setCellValue(""); + Cell thirdCell = row.createCell(2); + thirdCell.setCellStyle(style2); + thirdCell.setCellType(CellType.STRING); + thirdCell.setCellValue(Utils.format(budgetBean.getCostProjectManageTaxExclude().add(budgetBean.getCostExpropriationTaxExclude()))); + } + private int createManageRow(BudgetBean budgetBean, XSSFSheet sheet, int index) { createSubTitleManageRow(sheet, index++); createExpropriationRow(budgetBean, sheet, index++); - createCompanyManageRow(budgetBean, sheet, index++); + createManageCostRow(budgetBean, sheet, index++); + createManageTotalCostRow(budgetBean, sheet, index++); + // createCompanyManageRow(budgetBean, sheet, index++); Row row = sheet.createRow(index++); Cell remarkCell = row.createCell(0); remarkCell.setCellStyle(style); @@ -663,7 +665,7 @@ public class ExportExcelUtils { createGrossProfitARow(budgetBean, sheet, index++); createGrossProfitRow(budgetBean, sheet, index++); // createGrossProfitMarginRow(budgetBean, sheet, index++); - createContributionProfitRow(budgetBean, sheet, index++); +// createContributionProfitRow(budgetBean, sheet, index++); // createContributionProfitRateRow(budgetBean, sheet, index++); return index; } @@ -706,7 +708,7 @@ public class ExportExcelUtils { Cell fourthCell = row.createCell(3); fourthCell.setCellStyle(style2); fourthCell.setCellType(CellType.STRING); - fourthCell.setCellValue("毛利=收入总计(不含税)-成本总计(不含税)"); + fourthCell.setCellValue("项目毛利A=收入合计(不含税)-采购成本合计(不含税)"); } private void createGrossProfitRow(BudgetBean budgetBean, XSSFSheet sheet, int index) { @@ -714,7 +716,7 @@ public class ExportExcelUtils { Cell firstCell = row.createCell(0); firstCell.setCellStyle(style2); firstCell.setCellType(CellType.STRING); - firstCell.setCellValue("项目毛利(元)"); + firstCell.setCellValue("项目毛利B(元)"); Cell secondCell = row.createCell(1); secondCell.setCellStyle(style2); secondCell.setCellType(CellType.NUMERIC); @@ -722,11 +724,11 @@ public class ExportExcelUtils { Cell thirdCell = row.createCell(2); thirdCell.setCellStyle(style2); thirdCell.setCellType(CellType.NUMERIC); - thirdCell.setCellValue(Utils.format(budgetBean.getProjectGrossProfit())); + thirdCell.setCellValue(Utils.format(budgetBean.getProjectGrossProfitA().subtract(budgetBean.getCostProjectManageTaxExclude()).subtract(budgetBean.getCostExpropriationTaxExclude()))); Cell fourthCell = row.createCell(3); fourthCell.setCellStyle(style2); fourthCell.setCellType(CellType.STRING); - fourthCell.setCellValue("毛利=收入总计(不含税)-成本总计(不含税)-财务费用总计(不含税)"); + fourthCell.setCellValue("项目毛利B=项目毛利A-财务费用-项目管理费用"); } // private void createGrossProfitMarginRow(BudgetBean budgetBean, XSSFSheet sheet, int index) { @@ -1375,13 +1377,10 @@ public class ExportExcelUtils { if (i == 0) { totalCell.setCellType(CellType.STRING); totalCell.setCellValue("总计"); - } else if (i == 5) { - totalCell.setCellType(CellType.NUMERIC); - totalCell.setCellValue(Utils.format(costProjectManageTotalAmount)); - } else if (i == 7) { + } else if (i == 4) { totalCell.setCellType(CellType.NUMERIC); totalCell.setCellValue(Utils.format(budgetBean.getCostProjectManageTaxExclude())); - } else if (i == 9) { + } else if (i == 6) { totalCell.setCellType(CellType.NUMERIC); totalCell.setCellValue(Utils.format(managePayAmountTotal)); } else { diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index 7a5d2fb..90c2231 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -1,7 +1,7 @@ -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/fourcal?\ +spring.datasource.url=jdbc:mysql://192.168.124.202:3306/fourcal?\ characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2b8&rewriteBatchedStatements=true&useSSL=false -spring.datasource.username=root -spring.datasource.password=sagacity +spring.datasource.username=fourcal +spring.datasource.password=unissense@123 spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect #spring.jpa.properties.hibernate.hbm2ddl.auto=update diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index c1f0b4f..38e595d 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -134,12 +134,12 @@ $(function () { var dataManage = collectData("am-modal-prompt-input-cost-project-manage"); if (dataManage.length <= 0) { - window.confirm('请填写项目管理成本表'); + window.confirm('项目管理费用'); $("#saveDraft").attr('disabled', false); return; } - var dataManageCheck = convertDetailVerifyCheck(dataManage, COST_PROJECT_MANAGE_DETAIL2, "项目管理成本表"); + var dataManageCheck = convertDetailVerifyCheck(dataManage, COST_PROJECT_MANAGE_DETAIL2, "项目管理费用"); if (dataManageCheck == null) { $("#saveDraft").attr('disabled', false); return; @@ -185,7 +185,12 @@ $(function () { // return; // } // console.log(message); - + // 保存付款计划表 + var dataPay = collectData("am-modal-prompt-input-pay"); + dataPay = prepareAjaxDataVerify(dataPay, pay_DETAIL2, $("#id").val()); + if(dataPay){ + postAjax(base+"/project/budgetEditSaveBudgetPayPlan", dataPay); + } var startTime = $("#startDate").val(); var endTime = $("#endDate").val(); if (startTime > endTime) { @@ -252,12 +257,12 @@ $(function () { var dataManage = collectData("am-modal-prompt-input-cost-project-manage"); console.log("dataManage: " + dataManage.length); if (dataManage.length <= 4) { - window.confirm('请填写项目管理成本表'); + window.confirm('请填写项目管理费用'); $("#saveApprove").attr('disabled', false); return; } - var dataManageCheck = convertDetailVerifyCheck(dataManage, COST_PROJECT_MANAGE_DETAIL, "项目管理成本表"); + var dataManageCheck = convertDetailVerifyCheck(dataManage, COST_PROJECT_MANAGE_DETAIL, "项目管理费用"); if (dataManageCheck == null) { $("#saveApprove").attr('disabled', false); return; @@ -728,13 +733,16 @@ function bindChangeableInput() { //税率改变 $(".input-changeable-tax-rate").change(function () { var taxRate = f2($(this).val()); - //找到对应的数量和单价 - var amount = f2($(this).parent().parent().find(".input-changeable-amount").val()); - var price = f5($(this).parent().parent().find(".input-changeable-price").val()); - console.log(amount, price, taxRate); - - $(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))); + 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").val(f2Fixed(rowVal * (taxRate / 100))); + }); + // 不含税金额改变 + $(".input-changeable-total-tax-include").change(function () { + var rowVal = f2($(this).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").val(f2Fixed(rowVal * (taxRate / 100))); }); } @@ -985,3 +993,4 @@ function updateBudgetPlanDetailDataUnsubmit(data,returnData) { //更新现金流量 updateCashFlow(); } + diff --git a/src/main/resources/static/assets/js/project_budget_cost.js b/src/main/resources/static/assets/js/project_budget_cost.js index e9fc531..b21e529 100644 --- a/src/main/resources/static/assets/js/project_budget_cost.js +++ b/src/main/resources/static/assets/js/project_budget_cost.js @@ -4,43 +4,25 @@ //COST_DETAIL_ARR=["type","category","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"]; COST_DETAIL2={ "num":[false,"序号","string"], - "type":[false,"费用项目","string"], - "category":[false,"采购类别","string"], - "name":[false,"名称","string"], - "unit":[false,"单位","string"], - "amount":[false,"数量","number"], - "price":[false,"单价","price"], + "type":[false,"采购成本项目","string"], + "category":[false,"产品大类","string"], "taxRate":[false,"税率","number"], "totalTaxInclude":[false,"含税总金额","number"], "totalTaxExclude":[false,"不含税金额","number"], "totalTax":[false,"税金","number"], - "contractParty":[false,"签约方","string"], - "isUnderwritten":[false,"是否垫资","string"], - "underwrittenAmount":[false,"预估垫资金额","number"], - "payTime":[false,"支出时间","string"], - "payAmount":[false,"支出金额","number"], - "payWay":[false,"付款方式","string"], + "contractParty":[false,"供应商","string"], "remark":[false,"备注","string"] }; COST_DETAIL={ "num":[false,"序号","string"], - "type":[true,"费用项目","string"], - "category":[true,"采购类别","string"], - "name":[true,"名称","string"], - "unit":[true,"单位","string"], - "amount":[true,"数量","number"], - "price":[true,"单价","price"], - "taxRate":[true,"税率","number"], - "totalTaxInclude":[true,"含税总金额","number"], - "totalTaxExclude":[true,"不含税金额","number"], - "totalTax":[true,"税金","number"], - "contractParty":[false,"签约方","string"], - "isUnderwritten":[false,"是否垫资","string"], - "underwrittenAmount":[false,"预估垫资金额","number"], - "payTime":[false,"支出时间","string"], - "payAmount":[false,"支出金额","number"], - "payWay":[false,"付款方式","string"], + "type":[false,"采购成本项目","string"], + "category":[false,"产品大类","string"], + "taxRate":[false,"税率","number"], + "totalTaxInclude":[false,"含税总金额","number"], + "totalTaxExclude":[false,"不含税金额","number"], + "totalTax":[false,"税金","number"], + "contractParty":[false,"供应商","string"], "remark":[false,"备注","string"] }; /* @@ -199,7 +181,7 @@ function appendTrCost() { ''+ @@ -220,26 +202,26 @@ function appendTrCost() { ''+ ''+ - ''+ - ''+ - ''+ - ''+ + // ''+ + // ''+ + // ''+ + // ''+ ''+ - ''+ + ''+ ''+ ''+ '\n' + - '\n' + - ' \n' + - '\n' + - '\n' + - '\n' + - '\n' + - '\n' + + // '\n' + + // ' \n' + + // '\n' + + // '\n' + + // '\n' + + // '\n' + + // '\n' + '\n' + ''+ ''; @@ -319,6 +301,11 @@ function bindCostTotal() { $(".input-changeable-total-underwritten-amount-cost").change(function () { updateTotal("input-changeable-total-underwritten-amount-cost", "input-changeable-total-total-underwritten-amount-cost"); }); + $(".input-changeable-total-tax-include-cost").change(function () { + updateTotal("input-changeable-total-tax-include-cost", "input-changeable-total-total-tax-include-cost"); + updateTotal("input-changeable-total-tax-exclude-cost", "input-changeable-total-total-tax-exclude-cost"); + updateTotal("input-changeable-total-tax-cost", "input-changeable-total-total-tax-cost"); + }); } /** diff --git a/src/main/resources/static/assets/js/project_budget_cost_project_manage.js b/src/main/resources/static/assets/js/project_budget_cost_project_manage.js index 69044f5..57f6eea 100644 --- a/src/main/resources/static/assets/js/project_budget_cost_project_manage.js +++ b/src/main/resources/static/assets/js/project_budget_cost_project_manage.js @@ -4,13 +4,10 @@ //COST_PROJECT_MANAGE_DETAIL_ARR=["type","name","detail","unit","amount","price","total","predictMethod","predictWhy","remark","deletable"]; COST_PROJECT_MANAGE_DETAIL2={ "num":[false,"序号","string"], - "type":[false,"财务费用类别","string"], + "type":[false,"费用类别","string"], "name1":[false,"业务项目","string"], - "name2":[false,"业务项目","string"], "detail":[false,"项目明细","string"], - "unit":[false,"单位","string"], - "amount":[false,"数量","number"], - "price":[false,"单价","price"], + "detail1":[false,"项目明细","string"], "total":[false,"总金额","number"], "payTime":[false,"支出时间","string"], "payAmount":[false,"支出金额","number"], @@ -22,20 +19,17 @@ COST_PROJECT_MANAGE_DETAIL2={ COST_PROJECT_MANAGE_DETAIL={ "num":[false,"序号","string"], - "type":[true,"财务费用类别","string"], + "type":[false,"费用类别","string"], "name1":[false,"业务项目","string"], - "name2":[false,"业务项目","string"], - "detail":[true,"项目明细","string"], - "unit":[true,"单位","string"], - "amount":[true,"数量","number"], - "price":[true,"单价","price"], - "total":[true,"总金额","number"], + "detail":[false,"项目明细","string"], + "detail1":[false,"项目明细","string"], + "total":[false,"总金额","number"], "payTime":[false,"支出时间","string"], "payAmount":[false,"支出金额","number"], "predictMethod":[false,"预估计算方法","string"], "predictWhy":[false,"预估依据","string"], "remark":[false,"备注","string"], - "deletable":[true,"是否可删除","string"] + "deletable":[false,"是否可删除","string"] }; SELECT_TYPE_CATEGORY_MAP_DATA_MANAGER={}; @@ -98,6 +92,15 @@ $(function () { var data = collectData("am-modal-prompt-input-cost-project-manage"); //data = prepareAjaxData(data, COST_PROJECT_MANAGE_DETAIL_ARR, $("#id").val(),true); data = prepareAjaxDataVerify(data, COST_PROJECT_MANAGE_DETAIL2, $("#id").val()); + var totalTotal=data.details.reduce((total,now)=>{ + return now.total+total + },0) + var projectGrossProfitA=$('[name="projectGrossProfitA"]').val() + if(Number(totalTotal)> (Number(projectGrossProfitA)*0.1) ){ + layuiAlert(`总金额合计不能超过毛利A(${projectGrossProfitA})的10%`); + return + } + // if(data.managePayAmountTotal) if(data){ postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", data, updateCostProjectManageData); } @@ -144,10 +147,10 @@ function appendTrCostProjectManage() { ' \n' + ' \n' + ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + + // ' \n' + + // ' \n' + + // ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + @@ -212,6 +215,9 @@ function bindCostManageTotal() { $(".input-changeable-pay-amount-project-manage").change(function () { updateTotal("input-changeable-pay-amount-project-manage", "input-changeable-total-pay-amount-project-manage"); }); + $(".input-changeable-total-project-manage").change(function () { + updateTotal("input-changeable-total-project-manage", "input-changeable-total-total-project-manage"); + }); } /** @@ -322,6 +328,7 @@ function bindChangeableInputProjectManage() { $(this).parent().parent().find(".input-changeable-total-project-manage").val(f2Fixed(amount*price)); }); + } /** * 更新页面收入的数据【累加】 diff --git a/src/main/resources/static/assets/js/project_budget_income.js b/src/main/resources/static/assets/js/project_budget_income.js index 95ec060..06f8767 100644 --- a/src/main/resources/static/assets/js/project_budget_income.js +++ b/src/main/resources/static/assets/js/project_budget_income.js @@ -5,12 +5,7 @@ INCOME_DETAIL2={ "num":[false,"序号","string"], "type":[false,"类别","string"], - "name":[false,"名称","string"], - "spec":[false,"规格类型","string"], - "param":[false,"参数","string"], - "unit":[false,"单位","string"], - "amount":[false,"数量","number"], - "price":[false,"单价","price"], + "name":[false,"产品大类","string"], "taxRate":[false,"税率","number"], "totalTaxInclude":[false,"含税总金额","number"], "totalTaxExclude":[false,"不含税金额","number"], @@ -19,17 +14,12 @@ INCOME_DETAIL2={ INCOME_DETAIL={ "num":[false,"序号","string"], - "type":[true,"类别","string"], - "name":[true,"名称","string"], - "spec":[true,"规格类型","string"], - "param":[true,"参数","string"], - "unit":[true,"单位","string"], - "amount":[true,"数量","number"], - "price":[true,"单价","price"], - "taxRate":[true,"税率","number"], - "totalTaxInclude":[true,"含税总金额","number"], - "totalTaxExclude":[true,"不含税金额","number"], - "totalTax":[true,"税金","number"] + "type":[false,"类别","string"], + "name":[false,"产品大类","string"], + "taxRate":[false,"税率","number"], + "totalTaxInclude":[false,"含税总金额","number"], + "totalTaxExclude":[false,"不含税金额","number"], + "totalTax":[false,"税金","number"] }; /*$(function () { @@ -179,13 +169,13 @@ function appendTrIncome() { ' \n' + ' \n' + ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + + // ' \n' + + // ' \n' + + // ' \n' + + // ' \n' + + // ' \n' + ' \n' + - ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + @@ -216,6 +206,8 @@ function bindDeleteBtnIncome() { updateTotal("input-changeable-total-tax-include-income", "input-changeable-total-total-tax-include-income"); updateTotal("input-changeable-total-tax-exclude-income", "input-changeable-total-total-tax-exclude-income"); updateTotal("input-changeable-total-tax-income", "input-changeable-total-total-tax-income"); + + }); } @@ -241,4 +233,10 @@ function bindIncomeTotal() { updateTotal("input-changeable-total-tax-exclude-income", "input-changeable-total-total-tax-exclude-income"); updateTotal("input-changeable-total-tax-income", "input-changeable-total-total-tax-income"); }); + $(".input-changeable-total-tax-include-income").change(function () { + updateTotal("input-changeable-total-tax-include-income", "input-changeable-total-total-tax-include-income"); + updateTotal("input-changeable-total-tax-exclude-income", "input-changeable-total-total-tax-exclude-income"); + updateTotal("input-changeable-total-tax-income", "input-changeable-total-total-tax-income"); + }); + } \ No newline at end of file diff --git a/src/main/resources/static/assets/js/project_budget_pay.js b/src/main/resources/static/assets/js/project_budget_pay.js new file mode 100644 index 0000000..15253f8 --- /dev/null +++ b/src/main/resources/static/assets/js/project_budget_pay.js @@ -0,0 +1,340 @@ +/** + * 一个采购成本详情的字段 + */ +//COST_DETAIL_ARR=["type","category","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"]; +pay_DETAIL2={ + "num":[false,"序号","string"], + "payPoint":[false,"付款节点","string"], + "payTime":[false,"付款时间","string"], + "payProject":[false,"采购成本项目","number"], + "payAmount":[false,"付款金额","number"], + "supplier":[false,"供应商","string"], +}; + +pay_DETAIL={ + "num":[false,"序号","string"], + "payPoint":[false,"付款节点","string"], + "payTime":[false,"付款时间","string"], + "payProject":[false,"采购成本项目","number"], + "payAmount":[false,"付款金额","number"], + "supplier":[false,"供应商","string"], +}; +/* +[ + {"id":"1","name":"xxx1"},{"id":"2","name":"xxx2"} +] + */ +SELECT_TYPE_CATEGORY_DATA=[]; +/*{ + "1":[ + { + "id":"1", + "name":"华智产品" + }, + { + "id":"2", + "name":"紫光其他产品" + }, + { + "id":"3", + "name":"外购产品" + } + ], + "2":[ + { + "id":"4", + "name":"外购工程" + } + ], + "3":[ + { + "id":"5", + "name":"华智服务" + }, + { + "id":"6", + "name":"紫光其他服务" + }, + { + "id":"7", + "name":"外购服务" + } + ], + "4":[ + { + "id":"8", + "name":"其他" + } + ] +};*/ +SELECT_TYPE_CATEGORY_MAP_DATA={}; +/*{ + "1":"1", + "2":"1", + "3":"1", + "4":"2", + "5":"3", + "6":"3", + "7":"3", + "8":"4" +}; +*/ +SELECT_CATEGORY_TYPE_MAP_DATA={}; + +/*$(function () { + $("#cost-detail").click(function () { + $('#my-prompt-cost-detail').modal({ + relatedTarget: this, + closeOnConfirm:false, + onConfirm: function(e) { + //不能使用e.data,因为无法获取动态添加的 + var data = collectData("am-modal-prompt-input-cost"); + //data = prepareAjaxData(data, COST_DETAIL_ARR, $("#id").val(),false); + data = prepareAjaxDataVerify(data, COST_DETAIL, $("#id").val()); + if(data){ + postAjax(base+"/project/budgetEditSaveCostDetail", data, updateCostData); + } + }, + onCancel: function(e) { + } + }); + }); + $("#costAddBtn").click(function () { + appendTrCost(); + }); + + + + //初始化大类和类别的数据 + getAjax(base+"/procurement/type/map", null, initTypeCategory); +});*/ + +$(function () { +}); + +//保存采购成本明细表 +$(function () { + $("#payTableSave").click(function () { + //不能使用e.data,因为无法获取动态添加的 + var data = collectData("am-modal-prompt-input-pay"); + //data = prepareAjaxData(data, COST_DETAIL_ARR, $("#id").val(),false); + data = prepareAjaxDataVerify(data, pay_DETAIL2, $("#id").val()); + if(data){ + postAjax(base+"/project/budgetEditSaveBudgetPayPlan", data, updateCostData); + } + }); + + $("#payAddBtn").click(function () { + appendTrPay(); + $("#payAddBtn").blur(); + }); + + //绑定删除按钮 + bindDeleteBtnPay(); + + //初始化大类和类别的数据 + getAjax(base+"/procurement/type/map", null, initTypeCategory); +}); + +/** + * 采购成本增加一行 + */ +function appendTrPay() { + //console.log(SELECT_TYPE_CATEGORY_DATA); + var options = '\r\n'; + SELECT_TYPE_CATEGORY_DATA.forEach(function (e) { + options+='\r\n'; + }); + + var template = '' + + '' + + ''+ + ''+ + ''+ + ''+ + ''+ + '' + + '' + + ''+ + + ''; + + $("#payTotal").before(template); + //重新绑定删除事件和input修改事件 + bindDeleteBtnPay(); + //绑定序号 + bindNum(); + //绑定时间 + bindTime(); + //绑定总计值 + bindPayTotal(); + //绑定数字输入框保留两位小数 + bindNumberInput(); + + if ($('#costTable').find('tbody') && $('#costTable').find('tbody')[0]) { + $('#costTable').find('tbody')[0].scrollTop = $('#costTable').find('tbody')[0].scrollHeight + } +} + +/** + * 绑定时间选择器 + */ +function bindTime() { + $('[data-am-datepicker]').datepicker(); +} + +/** + * 绑定每一行的删除事件,删除当前的一行tr,修改总计值 + */ +function bindDeleteBtnPay() { + $(".am-modal-line-delete").click(function () { + //删除自己对应的tr + $(this).parent().parent().remove(); + bindNum(); + updateTotal("input-changeable-pay-amount", "input-changeable-pay-amount-total"); + }); +} + +/** + * 绑定每个可改变的输入框,修改后改变对应输入框的值 + */ +function bindPayTotal() { + //数量改变 + $(".input-changeable-pay-amount").change(function () { + updateTotal("input-changeable-pay-amount", "input-changeable-pay-amount-total"); + }); +} + +/** + * 更新页面收入的数据【累加】 + */ +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"]); + } + 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)); + } + + layuiAlert("保存成功"); + $('#my-prompt-cost-detail').modal('close'); +} + +/** + * 大类类别联动效果 + */ +/** + * 初始化数据 + * SELECT_TYPE_CATEGORY_MAP_DATA + * SELECT_CATEGORY_TYPE_MAP_DATA + * SELECT_TYPE_CATEGORY_DATA + */ +function initTypeCategory(params, data) { + var d = data.data; + var map = d.map; + + Object.keys(map).forEach(function (t, number) { + var temp = []; + map[t].forEach(function (g) { + temp.push({ + name:g.name, + id:g.id+"" + }); + }); + SELECT_TYPE_CATEGORY_MAP_DATA[t]= temp; + }); + + var procurementTypes = d.procurementTypes; + procurementTypes.forEach(function (e) { + SELECT_TYPE_CATEGORY_DATA.push({ + id:e.id+"", + name:e.name + }); + SELECT_CATEGORY_TYPE_MAP_DATA[e.id]=e.type; + }); + //--请选择--的映射 + //SELECT_CATEGORY_TYPE_MAP_DATA["xxxx"]="xxxx"; + + // console.log(SELECT_TYPE_CATEGORY_MAP_DATA); + // console.log(SELECT_TYPE_CATEGORY_DATA); + // console.log(SELECT_CATEGORY_TYPE_MAP_DATA); +} 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 8a47d62..cdc2df5 100644 --- a/src/main/resources/static/assets/js/project_budget_plan.js +++ b/src/main/resources/static/assets/js/project_budget_plan.js @@ -4,8 +4,10 @@ BUDGET_PLAN_DETAIL_ARR=["month","deviceCost","engineerCost","projectManageCost","earnestMoneyCost","totalCost","saleIncome","earnestMoneyIncome","totalIncome","fundBalance","capitalInterest","underwrittenPlan","repaymentPlan"]; BUDGET_PLAN_DETAIL2={ "month":[true,"月份"], - "deviceCost":[false,"设备支出","number"], - "engineerCost":[false,"工程支出","number"], + "deviceCost":[false,"设备付款","number"], + "projectCost":[false,"工程付款","number"], + "serviceCost ":[false,"服务付款","number"], + "otherCost":[false,"其他付款","number"], "projectManageCost":[false,"经营性开支","number"], "earnestMoneyCost":[false,"保证金支出","number"], "totalCost":[false,"支出合计","number"], @@ -20,8 +22,10 @@ BUDGET_PLAN_DETAIL2={ BUDGET_PLAN_DETAIL={ "month":[true,"月份"], - "deviceCost":[true,"设备支出","number"], - "engineerCost":[true,"工程支出","number"], + "deviceCost":[true,"设备付款","number"], + "projectCost":[false,"工程付款","number"], + "serviceCost ":[false,"服务付款","number"], + "otherCost":[false,"其他付款","number"], "projectManageCost":[true,"经营性开支","number"], "earnestMoneyCost":[true,"保证金支出","number"], "totalCost":[true,"支出合计","number"], @@ -383,9 +387,13 @@ function appendTrBudgetPlan() { var template = '\n' + ' \n' + ' \n' + - ' \n' + - ' \n' + - ' \n' + + + ' \n' + + ' \n' + + ' \n' + + + ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + @@ -416,7 +424,11 @@ function appendTrBudgetPlan2() { var template = '\n' + ' \n' + ' \n' + - ' \n' + + // ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + ' \n' + ' \n' + @@ -548,17 +560,57 @@ function bindChangeableInputBudgetPlanDetail() { updatePageData(); }); //工程支出改变 - $(".input-changeable-engineer-cost-budget-plan").change(function () { + $(".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)); + $(this).parent().parent().find(".input-changeable-total-cost-budget-plan").val(f2Fixed(deviceCost+engineerCost+projectManageCost+earnestMoneyCost+engineerCost2+engineerCost3)); //更新所有月工程支出总额 - updateBudgetPlanTotal("input-changeable-engineer-cost-budget-plan","input-total-engineer-cost-budget-plan"); + 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"); diff --git a/src/main/resources/static/assets/js/project_common.js b/src/main/resources/static/assets/js/project_common.js index a1ec21e..798f7a1 100644 --- a/src/main/resources/static/assets/js/project_common.js +++ b/src/main/resources/static/assets/js/project_common.js @@ -260,14 +260,15 @@ function calCostInclude() { var costPurchaseBuildTaxInclude = inputVal("costPurchaseBuildTaxInclude"); var costPurchaseServiceTaxInclude = inputVal("costPurchaseServiceTaxInclude"); var costPurchaseOtherTaxInclude = inputVal("costPurchaseOtherTaxInclude"); - var costProjectManageTaxInclude = inputVal("costProjectManageTaxInclude"); + // var costProjectManageTaxInclude = inputVal("costProjectManageTaxInclude"); + // f2(costProjectManageTaxInclude) var costOtherOtherTaxInclude = inputVal("costOtherOtherTaxInclude"); var $costTotalTaxInclude = $("input[name='costTotalTaxInclude']"); $costTotalTaxInclude.val(f2Fixed(f2(costPurchaseDeviceTaxInclude) +f2(costPurchaseBuildTaxInclude) +f2(costPurchaseServiceTaxInclude)+f2(costPurchaseOtherTaxInclude) - +f2(costProjectManageTaxInclude)+f2(costOtherOtherTaxInclude))); + +f2(costOtherOtherTaxInclude))); } /** * 统计成本(不含税),有一项没填就置空 @@ -277,7 +278,8 @@ function calCostExclude() { var costPurchaseBuildTaxExclude = inputVal("costPurchaseBuildTaxExclude"); var costPurchaseServiceTaxExclude = inputVal("costPurchaseServiceTaxExclude"); var costPurchaseOtherTaxExclude = inputVal("costPurchaseOtherTaxExclude"); - var costProjectManageTaxExclude = inputVal("costProjectManageTaxExclude"); + // var costProjectManageTaxExclude = inputVal("costProjectManageTaxExclude");\ + // f2(costProjectManageTaxExclude) var costOtherOtherTaxExclude = inputVal("costOtherOtherTaxExclude"); @@ -285,7 +287,7 @@ function calCostExclude() { $costTotalTaxExclude.val(f2Fixed(f2(costPurchaseDeviceTaxExclude)+f2(costPurchaseBuildTaxExclude) +f2(costPurchaseServiceTaxExclude)+f2(costPurchaseOtherTaxExclude) - +f2(costProjectManageTaxExclude)+f2(costOtherOtherTaxExclude))); + +f2(costOtherOtherTaxExclude))); } /** * 统计其他其他税金 diff --git a/src/main/resources/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl index 246105d..c900859 100644 --- a/src/main/resources/templates/admin/project_approve.ftl +++ b/src/main/resources/templates/admin/project_approve.ftl @@ -387,19 +387,19 @@ - - 主合同收款条款: - - - - - - 主合同具体解决方案: - - - +<#-- --> +<#-- 主合同收款条款:--> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- 主合同具体解决方案:--> +<#-- --> +<#-- --> +<#-- --> 计收计划: @@ -491,7 +491,7 @@
  • 收入明细表
  • 收款计划表
  • 采购成本明细表
  • -
  • 项目管理成本表
  • +
  • 项目管理费用
  • 资金计划表
  • @@ -754,20 +754,20 @@ - - 主合同收款条款: - - - - - - 主合同具体解决方案: - - - - +<#-- --> +<#-- 主合同收款条款:--> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- 主合同具体解决方案:--> +<#-- --> +<#-- --> +<#-- --> +<#-- --> 计收计划: @@ -798,13 +798,13 @@ 序号 - 类别 + 产品大类 名称 - 规格类型 - 参数 - 单位 - 数量 - 单价 +<#-- 规格类型--> +<#-- 参数--> +<#-- 单位--> +<#-- 数量--> +<#-- 单价--> 税率(%) 含税总金额(元) 不含税金额(元) @@ -838,22 +838,22 @@ - - - - - - +<#-- class="am-modal-prompt-input am-modal-prompt-input-income"--> +<#-- value="${incomeDetail.spec!}">--> +<#-- +<#-- class="am-modal-prompt-input am-modal-prompt-input-income"--> +<#-- value="${incomeDetail.param!}">--> +<#-- +<#-- class="am-modal-prompt-input am-modal-prompt-input-income"--> +<#-- value="${incomeDetail.unit!}">--> +<#-- +<#-- class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-amount"--> +<#-- value="${Utils.format(incomeDetail.amount,'0.00')}">--> +<#-- +<#-- class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-price"--> +<#-- value="${Utils.format2(incomeDetail.price,'0.00')}">--> +<#-- class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-tax-rate" value="${Utils.format(incomeDetail.taxRate,'0.00')}"> + diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index d8405cf..033251d 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -108,7 +108,8 @@
  • 收入明细表
  • 收款计划表
  • 采购成本明细表
  • -
  • 项目管理成本表
  • +
  • 付款计划表
  • +
  • 项目管理费用表
  • 资金计划表
  • 项目预算信息
  • @@ -304,19 +305,19 @@ - - 主合同收款条款: - - - - - - 主合同具体解决方案: - - - +<#-- --> +<#-- 主合同收款条款:--> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- 主合同具体解决方案:--> +<#-- --> +<#-- --> +<#-- --> 计收计划: @@ -707,24 +708,24 @@ - - 主合同收款条款: - - - - - - 主合同具体解决方案: - - - - +<#-- --> +<#-- 主合同收款条款:--> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- 主合同具体解决方案:--> +<#-- --> +<#-- --> +<#-- --> +<#-- --> 计收计划: @@ -761,13 +762,13 @@ 序号 - 类别 + 产品大类 名称 - 规格类型 - 参数 - 单位 - 数量 - 单价 +<#-- 规格类型--> +<#-- 参数--> +<#-- 单位--> +<#-- 数量--> +<#-- 单价--> 税率(%) 含税总金额(元) 不含税金额(元) @@ -788,13 +789,13 @@ - - - - > - +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> - + @@ -805,11 +806,11 @@ - - - - > - +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> @@ -833,7 +834,7 @@
    - +
    @@ -899,27 +900,18 @@ - - - - - - + + - - - - - - + - + <#if costDetails??> <#list costDetails as costDetail> @@ -927,7 +919,7 @@ - - - - - + - - - - - @@ -976,20 +953,20 @@ - - - - +<#-- --> +<#-- --> +<#-- --> +<#-- --> - - - - - +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> @@ -1013,12 +990,12 @@ - + - - - +<#-- --> +<#-- --> +<#-- --> @@ -1063,10 +1040,10 @@ type="text"<#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!}"> - - - - +<#-- --> +<#-- --> +<#-- --> + @@ -1083,9 +1060,9 @@ - - - +<#-- --> +<#-- --> +<#-- --> @@ -1133,11 +1110,17 @@ - - - - - + +<#-- --> + + + + + + + + + @@ -1151,8 +1134,12 @@ - - + + + + + + @@ -1168,7 +1155,11 @@ - + + + + + @@ -1187,7 +1178,10 @@ - + + + + @@ -1273,7 +1267,7 @@ (备注:本表所用税率为:${incomeTaxRates!})
    序号
    序号费用项目采购类别名称单位数量单价采购成本项目产品大类 税率(%) 含税总金额(元) 不含税金额(元) 税金(元)签约方是否垫资预估垫资金额(元)支出时间支出金额(元)付款方式供应商 备注 操作
    @@ -947,26 +939,11 @@ > - -
    >
    序号财务费用类别费用类别 业务项目 项目明细单位数量单价单位数量单价总金额(元) 支出时间 支出金额(元) oninput="if(value.length>8)value=value.slice(0,8)"> >
    - 成本 + 采购成本 <#-- 采购成本明细表 项目管理成本表--> @@ -1297,7 +1291,7 @@ - + @@ -1318,14 +1312,7 @@ - - - - - - - - + @@ -1355,15 +1342,25 @@ + + + + + +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> - + - + (备注:财务计取以不含税方式核算) @@ -1382,20 +1379,20 @@ - + - + - - - - - - - + +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- -->
    成本 采购成本施工工程
    成本项目管理成本项目管理成本
    成本 其他费用项目 不含税金额(元)
    成本项目管理成本
    财务费用 资金占用成本
    公司管理费用
    公司管理费用合计
    项目毛利A(元) 毛利A=收入明细表金额总计(不含税)-采购成本明细表金额总计(不含税)项目毛利A=收入合计(不含税)-采购成本合计(不含税)
    项目毛利(元)项目毛利B(元) 毛利=收入总计(不含税)-成本总计(不含税)-财务费用总计(不含税)
    项目贡献利润(元)贡献利润=项目毛利(不含税)-公司管理费用总计(不含税)项目毛利B=项目毛利A-财务费用-项目管理费用
    项目贡献利润(元)贡献利润=项目毛利(不含税)-公司管理费用总计(不含税)
    @@ -1481,6 +1478,82 @@
    +
    +
    +
    +
    +<#--
    --> +<#--
    --> +<#--
    --> +<#-- --> +<#-- --> +<#--
    --> + +<#-- --> +<#--
    --> +<#--
    --> +
    +
    + + + + + + + + + + + + + + <#if budgetPayPlan??> + <#list budgetPayPlan as payDetail> + + + + + + + + + + + + + + + + + + + + + +
    序号付款节点付款时间采购成本项目付款金额供应商操作
    + +
    +
    + +
    + +
    + +
    +
    @@ -1502,7 +1575,8 @@ - + diff --git a/src/main/resources/templates/admin/project_estimate_add.ftl b/src/main/resources/templates/admin/project_estimate_add.ftl index 32a7145..ac00262 100644 --- a/src/main/resources/templates/admin/project_estimate_add.ftl +++ b/src/main/resources/templates/admin/project_estimate_add.ftl @@ -300,24 +300,24 @@ - - 主合同收款条款: - - - - - - 主合同具体解决方案: - - - - +<#-- --> +<#-- 主合同收款条款:--> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- 主合同具体解决方案:--> +<#-- --> +<#-- --> +<#-- --> +<#-- --> 计收计划: diff --git a/src/main/resources/templates/admin/project_estimate_edit.ftl b/src/main/resources/templates/admin/project_estimate_edit.ftl index 6efafbb..2d1b7ea 100644 --- a/src/main/resources/templates/admin/project_estimate_edit.ftl +++ b/src/main/resources/templates/admin/project_estimate_edit.ftl @@ -347,24 +347,24 @@ - - 主合同收款条款: - - - - - - 主合同具体解决方案: - - - - +<#-- --> +<#-- 主合同收款条款:--> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- --> +<#-- 主合同具体解决方案:--> +<#-- --> +<#-- --> +<#-- --> +<#-- --> 计收计划: