[user3] преди 4 години
родител
ревизия
d8e16f6571

+ 30 - 19
src/main/java/com/jeeplus/modules/sg/financial/settlement/util/MyExportUtil.java

@@ -60,17 +60,17 @@ public class MyExportUtil {
                     Row row = sheet.createRow(rowNum+i);
                     Cell cell0 = crateCell(workbook,row,0); //项目编号
                     Cell cell1 = crateCell(workbook,row,1); //项目名称
-                    Cell cell2 = crateCell(workbook,row,2); //施工费应付金额
-                    Cell cell3 = crateCell(workbook,row,3); //施工费实付金额
-                    Cell cell4 = crateCell(workbook,row,4); //施工费差额
+                    Cell cell2 = crateCellLeft(workbook,row,2); //施工费应付金额
+                    Cell cell3 = crateCellLeft(workbook,row,3); //施工费实付金额
+                    Cell cell4 = crateCellLeft(workbook,row,4); //施工费差额
                     Cell cell5 = crateCell(workbook,row,5); //施工费允许少付
-                    Cell cell6 = crateCell(workbook,row,6); //设计费应付金额
-                    Cell cell7 = crateCell(workbook,row,7); //设计费实付金额
-                    Cell cell8 = crateCell(workbook,row,8); //设计费差额
+                    Cell cell6 = crateCellLeft(workbook,row,6); //设计费应付金额
+                    Cell cell7 = crateCellLeft(workbook,row,7); //设计费实付金额
+                    Cell cell8 = crateCellLeft(workbook,row,8); //设计费差额
                     Cell cell9 = crateCell(workbook,row,9); //设计费允许少付
-                    Cell cell10 = crateCell(workbook,row,10); //监理费应付金额
-                    Cell cell11 = crateCell(workbook,row,11); //监理费实付金额
-                    Cell cell12 = crateCell(workbook,row,12); //监理费差额
+                    Cell cell10 = crateCellLeft(workbook,row,10); //监理费应付金额
+                    Cell cell11 = crateCellLeft(workbook,row,11); //监理费实付金额
+                    Cell cell12 = crateCellLeft(workbook,row,12); //监理费差额
                     Cell cell13 = crateCell(workbook,row,13); //监理费允许少付
                     CostCheck view = list.get(i);
                     cell0.setCellValue(view.getProjectId());
@@ -125,15 +125,15 @@ public class MyExportUtil {
                     Cell cell7 = crateCell(workbook,row,7); //开工时间
                     Cell cell8 = crateCell(workbook,row,8); //竣工时间
                     Cell cell9 = crateCell(workbook,row,9); //批准文号
-                    Cell cell10 = crateCell(workbook,row,10); //建筑费
-                    Cell cell11 = crateCell(workbook,row,11); //安装费
-                    Cell cell12 = crateCell(workbook,row,12); //设备购置费
-                    Cell cell13 = crateCell(workbook,row,13); //主材费
-                    Cell cell14 = crateCell(workbook,row,14); //设计费
-                    Cell cell15 = crateCell(workbook,row,15); //监理费
-                    Cell cell16 = crateCell(workbook,row,16); //项目前期工作费
-                    Cell cell17 = crateCell(workbook,row,17); //线路施工赔偿费
-                    Cell cell18 = crateCell(workbook,row,18); //法人管理费(余物清理费)
+                    Cell cell10 = crateCellLeft(workbook,row,10); //建筑费
+                    Cell cell11 = crateCellLeft(workbook,row,11); //安装费
+                    Cell cell12 = crateCellLeft(workbook,row,12); //设备购置费
+                    Cell cell13 = crateCellLeft(workbook,row,13); //主材费
+                    Cell cell14 = crateCellLeft(workbook,row,14); //设计费
+                    Cell cell15 = crateCellLeft(workbook,row,15); //监理费
+                    Cell cell16 = crateCellLeft(workbook,row,16); //项目前期工作费
+                    Cell cell17 = crateCellLeft(workbook,row,17); //线路施工赔偿费
+                    Cell cell18 = crateCellLeft(workbook,row,18); //法人管理费(余物清理费)
                     Cell cell19 = crateCell(workbook,row,19); //合同费率
                     Cell cell20 = crateCell(workbook,row,20); //典设费率
                     Cell cell21 = crateCell(workbook,row,21); //合同费率
@@ -194,7 +194,7 @@ public class MyExportUtil {
                     Cell cell3 = crateCell(workbook,row,3); //施工单位
                     Cell cell4 = crateCell(workbook,row,4); //建筑地址
                     Cell cell5 = crateCell(workbook,row,5); //建筑属性
-                    Cell cell6 = crateCell(workbook,row,6); //发文总投资(必填)
+                    Cell cell6 = crateCellLeft(workbook,row,6); //发文总投资(必填)
                     Cell cell7 = crateCell(workbook,row,7); //开工时间
                     ProjectBudget view = list.get(i);
                     cell0.setCellValue(view.getProjectId());
@@ -239,6 +239,17 @@ public class MyExportUtil {
         return cell;
     }
 
+
+    Cell crateCellLeft(XSSFWorkbook workbook,Row row, int num){
+        Cell cell = row.createCell(num);
+        if(style == null){
+            style = workbook.createCellStyle();
+            style.setWrapText(true);
+        }
+        cell.setCellStyle(style);
+        return cell;
+    }
+
     Double getDouble(Double num) {
         Double returnDouble = 0.0;
         if (null!=num) {

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/financial/settlement/web/DonorMaterialController.java

@@ -319,7 +319,7 @@ public class DonorMaterialController extends BaseController {
     }
 
     @ResponseBody
-    @RequiresPermissions("modules:sg:information:information:export")
+    @RequiresPermissions("donor:material:export")
     @RequestMapping(value = "exportInformation")
     public void exportInformation(DonorMaterial donorMaterial, HttpServletRequest request, HttpServletResponse response) {
         StringBuilder stringBuilder = new StringBuilder();

+ 10 - 5
src/main/java/com/jeeplus/modules/sg/financial/settlement/web/ProjectBudgetController.java

@@ -397,15 +397,20 @@ public class ProjectBudgetController extends BaseController {
                 ProjectBudget.setProjectType(projectType);
                 //使用bigDecimal初始化数值,计算防止精度丢失问题
                 //设计费
-                BigDecimal designCostDecimal = new BigDecimal(designCost);
+                BigDecimal bigDecimal = new BigDecimal(designCost);
+                BigDecimal designCostDecimal = bigDecimal.setScale(2, BigDecimal.ROUND_HALF_UP);
                 //监理费
-                BigDecimal supervisorCostDecimal = new BigDecimal(supervisorCost);
+                BigDecimal bigDecimal1 = new BigDecimal(supervisorCost);
+                BigDecimal supervisorCostDecimal = bigDecimal1.setScale(2, BigDecimal.ROUND_HALF_UP);
                 //设计合同折扣
-                BigDecimal desConDecimal = new BigDecimal(designContractDiscount);
+                BigDecimal bigDecimal2 = new BigDecimal(designContractDiscount);
+                BigDecimal desConDecimal = bigDecimal2.setScale(2, BigDecimal.ROUND_HALF_UP);
                 //设计典设折扣
-                BigDecimal desTypeDecimal = new BigDecimal(designTypicalDiscount);
+                BigDecimal bigDecimal3 = new BigDecimal(designTypicalDiscount);
+                BigDecimal desTypeDecimal = bigDecimal3.setScale(2, BigDecimal.ROUND_HALF_UP);
                 //监理费合同折扣
-                BigDecimal supervisorDecimal = new BigDecimal(supervisorContractDiscount);
+                BigDecimal bigDecimal4 = new BigDecimal(supervisorContractDiscount);
+                BigDecimal supervisorDecimal = bigDecimal4.setScale(2, BigDecimal.ROUND_HALF_UP);
                 //计算项目设计费应付金额(设计费*设计合同折扣*设计典设折扣*1.06)两位小数
                 BigDecimal firResult = designCostDecimal.multiply(desConDecimal).setScale(2, BigDecimal.ROUND_HALF_UP);
                 BigDecimal secResult = firResult.multiply(desTypeDecimal).setScale(2, BigDecimal.ROUND_HALF_UP);

+ 19 - 13
src/main/webapp/webpage/modules/sg/financial/settlement/donorMaterialList.js

@@ -1,23 +1,29 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
 <script>
     $(document).ready(function () {
+        let beforeVal = '';
         //定义方法---在bootstrap数据循环中使用,必须定义在bootstrapTable之前
         window.operateEvents = {
+            'focus .operate': function(e,value,row,index) {
+                beforeVal = $('#operate'+ index).val();
+            },
             'blur .operate': function (e, value, row, index) {
                 let val1 = $('#operate'+ index).val();
-                jp.confirm('确认修改项目甲供材备注吗?', function () {
-                    jp.loading();
-                    jp.get("${ctx}/donor/material/updateRemarks?id=" + row.id + "&remarks=" + val1, function (data) {
-                        if (data.success) {
-                            $('#dataTable').bootstrapTable('refresh');
-                            jp.success(data.msg);
-                        } else {
-                            jp.error(data.msg);
-                        }
-                    });
-                },function () {
-                    $('#dataTable').bootstrapTable('refresh');
-                })
+                if (beforeVal != val1){
+                    jp.confirm('确认修改项目甲供材备注吗?', function () {
+                        jp.loading();
+                        jp.get("${ctx}/donor/material/updateRemarks?id=" + row.id + "&remarks=" + val1, function (data) {
+                            if (data.success) {
+                                $('#dataTable').bootstrapTable('refresh');
+                                jp.success(data.msg);
+                            } else {
+                                jp.error(data.msg);
+                            }
+                        });
+                    },function () {
+                        $('#dataTable').bootstrapTable('refresh');
+                    })
+                }
             }
         };
         $('#dataTable').bootstrapTable({