[user3] %!s(int64=4) %!d(string=hai) anos
pai
achega
fb97fafad2

+ 21 - 2
src/main/java/com/jeeplus/modules/sg/financial/settlement/util/MyExportUtil.java

@@ -12,6 +12,8 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 
 public class MyExportUtil {
@@ -145,8 +147,8 @@ public class MyExportUtil {
                     cell4.setCellValue(view.getBuildingAddress());
                     cell5.setCellValue(view.getBuildingProperty());
                     cell6.setCellValue(view.getTotalInvestment());
-                    cell7.setCellValue(view.getStartTime());
-                    cell8.setCellValue(view.getStopTime());
+                    cell7.setCellValue(getDate(view.getStartTime()));
+                    cell8.setCellValue(getDate(view.getStopTime()));
                     cell9.setCellValue(view.getApprovalNumber());
                     cell10.setCellValue(getDouble(view.getConstructionCost()));
                     cell11.setCellValue(getDouble(view.getInstallationCost()));
@@ -257,4 +259,21 @@ public class MyExportUtil {
         }
         return returnDouble;
     }
+
+    String getString (String obj) {
+        String returnStr = "";
+        if (null!=obj) {
+            returnStr = obj;
+        }
+        return returnStr;
+    }
+
+    String getDate(Date date) {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        String returnDate = "";
+        if (null != date) {
+            returnDate = dateFormat.format(date);
+        }
+        return returnDate;
+    }
 }

+ 2 - 1
src/main/webapp/webpage/modules/sg/financial/settlement/financeList.js

@@ -188,9 +188,10 @@
                     var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
                     iframeWin.contentWindow.importExcel('${ctx}/finance/budget/importErp', function (data) {
                         if (data.success) {
-                            console.log(data)
                             if (data.msg != '') {
                                 jp.alert(data.msg);
+                            }else {
+                                jp.success('导出成功');
                             }
                             if (data.errorCode != "9999"){
                                 jp.downloadFile('${ctx}/sg/financial/erpCredit/export','finalAccount');//给个name是为了能够在某些条件下下载两个文件