guoxu 2 năm trước cách đây
mục cha
commit
e7e8a2d3e6

+ 1 - 0
src/main/java/com/jeeplus/modules/sealApplyFor/entity/SealApplyForInfo.java

@@ -26,6 +26,7 @@ public class SealApplyForInfo extends ActEntity<SealApplyForInfo> {
     private Date endDate;  //结束时间
     private String home;
 
+
     private List<SealMaterialInfoImport> sealMaterialInfoList;
 
     public RuralProjectRecords getProjectRecords() {

+ 54 - 17
src/main/java/com/jeeplus/modules/sealApplyFor/web/SealApplyForController.java

@@ -29,6 +29,7 @@ import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
 import org.activiti.engine.HistoryService;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.activiti.engine.task.Task;
+import org.apache.poi.ss.formula.functions.BooleanFunction;
 import org.apache.poi.ss.formula.functions.Now;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -138,7 +139,13 @@ public class SealApplyForController extends BaseController {
     @RequiresPermissions(value={"sealApplyFor:sealApplyFor:add","sealApplyFor:sealApplyFor:edit"},logical= Logical.OR)
     @RequestMapping(value = "form")
     public String form(SealApplyForInfo sealApplyForInfo, Model model) {
+        Boolean falg = true; //true代表着添加
+        List<SealMaterialInfo> sealMaterialInfos = sealMaterialService.getSealMaterialByProjectId(sealApplyForInfo.getProjectId());
+        if(sealMaterialInfos.size()>0){
+            falg = false; //false代表着是更新操作
+        }
         if(StringUtils.isNotBlank(sealApplyForInfo.getProjectId())){
+
             RuralProjectRecords projectRecords = projectRecordsService.get(sealApplyForInfo.getProjectId());
 
             List<MainDictDetail> mainDictList = Lists.newArrayList();
@@ -198,8 +205,12 @@ public class SealApplyForController extends BaseController {
         User user = UserUtils.getUser();
         SealMaterialInfo sealMaterialInfo = new SealMaterialInfo();
         sealMaterialInfo.setAgent(user);
+        if(!falg){
+            sealMaterialInfo.setSealMaterialInfoList(sealMaterialInfos);
+        }
         model.addAttribute("sealMaterialInfo",sealMaterialInfo);
         model.addAttribute("sealApplyForInfo", sealApplyForInfo);
+        model.addAttribute("falg",falg.toString());
         return "modules/sealApplyFor/sealApplyForForm";
     }
     /**
@@ -265,10 +276,18 @@ public class SealApplyForController extends BaseController {
     @RequiresPermissions(value={"sealApplyFor:sealApplyFor:add","sealApplyFor:sealApplyFor:edit"},logical=Logical.OR)
     @RequestMapping(value = "save")
     public String save(SealApplyForInfo sealApplyForInfo, Model model, RedirectAttributes redirectAttributes) {
-        List<SealMaterialInfoImport> sealMaterialInfoImportList = sealApplyForInfo.getSealMaterialInfoList();
-        if(sealMaterialInfoImportList.size()<=0){
-            addMessage(redirectAttributes, "用印材料名称、数量、主要内容简述等获取失败,请重试");
-            return "redirect:"+Global.getAdminPath()+"/sealApplyFor/sealApplyFor/?repage";
+        Boolean falg = true; //true代表着添加
+        List<SealMaterialInfoImport> sealMaterialInfoImportList = new ArrayList<SealMaterialInfoImport>();
+        List<SealMaterialInfo> sealMaterialInfos = sealMaterialService.getSealMaterialByProjectId(sealApplyForInfo.getProjectId());
+        if(sealMaterialInfos.size()>0){
+            falg = false; //false代表着是更新操作
+        }
+        if(falg){
+            sealMaterialInfoImportList = sealApplyForInfo.getSealMaterialInfoList();
+            if(sealMaterialInfoImportList.size()<=0){
+                addMessage(redirectAttributes, "用印材料名称、数量、主要内容简述等获取失败,请重试");
+                return "redirect:"+Global.getAdminPath()+"/sealApplyFor/sealApplyFor/?repage";
+            }
         }
         if (!beanValidator(model, sealApplyForInfo)){
             return form(sealApplyForInfo, model);
@@ -314,24 +333,42 @@ public class SealApplyForController extends BaseController {
 //            }
 //        }
 //        这块做塞值处理的
-        for(int k=0;k<sealMaterialInfoImportList.size();k++){
-            sealMaterialInfoImportList.get(k).setProjectId(sealApplyForInfo.getProjectId());
-            if(sealMaterialInfoImportList.get(k).getSealMaterialImportRemarks()== null){
-                sealMaterialInfoImportList.get(k).setSealMaterialImportRemarks(" ");
+        if(falg){
+            for(int k=0;k<sealMaterialInfoImportList.size();k++){
+                sealMaterialInfoImportList.get(k).setProjectId(sealApplyForInfo.getProjectId());
+                if(sealMaterialInfoImportList.get(k).getSealMaterialImportRemarks()== null){
+                    sealMaterialInfoImportList.get(k).setSealMaterialImportRemarks(" ");
 //                sealMaterialInfoImportList.get(k).setUseSealTime();
+                }
+                //       判断项目名称、材料名称、价格是否为空
+                if(sealMaterialInfoImportList.get(k).getSealMaterialName()==null || sealMaterialInfoImportList.get(k).getAmount() ==null){
+                    addMessage(redirectAttributes, "项目名称、材料名称、价格等获取失败,请重试");
+                    return "redirect:"+Global.getAdminPath()+"/sealApplyFor/sealApplyFor/?repage";
+                }
             }
-            //       判断项目名称、材料名称、价格是否为空
-            if(sealMaterialInfoImportList.get(k).getSealMaterialName()==null || sealMaterialInfoImportList.get(k).getAmount() ==null){
-                addMessage(redirectAttributes, "项目名称、材料名称、价格等获取失败,请重试");
+            Map map = sealMaterialService.qureyCountAboutSealMaterial(sealMaterialInfoImportList);
+            if((map.containsKey("failure"))){
+                addMessage(redirectAttributes, map.get("failure").toString());
                 return "redirect:"+Global.getAdminPath()+"/sealApplyFor/sealApplyFor/?repage";
             }
+            sealMaterialService.batchSave(sealMaterialInfoImportList);
+        }else{
+            List<SealMaterialInfoImport> sealMaterialInfos1 = new ArrayList<>();
+            List<SealMaterialInfoImport> sealMaterialInfoList = sealApplyForInfo.getSealMaterialInfoList();
+            Iterator<SealMaterialInfoImport> iterator = sealMaterialInfoList.iterator();
+            while (iterator.hasNext()){
+                SealMaterialInfoImport sealMaterialInfoImport = iterator.next();
+                if(sealMaterialInfoImport.getSealMaterialName() == null || sealMaterialInfoImport.getAmount() == null){
+                    iterator.remove();
+                }else {
+                    sealMaterialInfos1.add(sealMaterialInfoImport);
+                }
+            }
+            for(int i=0;i<sealMaterialInfos1.size();i++){
+                sealMaterialService.update(sealMaterialInfos1.get(i));
+            }
         }
-        Map map = sealMaterialService.qureyCountAboutSealMaterial(sealMaterialInfoImportList);
-        if((map.containsKey("failure"))){
-            addMessage(redirectAttributes, map.get("failure").toString());
-            return "redirect:"+Global.getAdminPath()+"/sealApplyFor/sealApplyFor/?repage";
-        }
-        sealMaterialService.batchSave(sealMaterialInfoImportList);
+
         return "redirect:"+Global.getAdminPath()+"/sealApplyFor/sealApplyFor/?repage";
     }
 

+ 14 - 0
src/main/java/com/jeeplus/modules/sealMaterial/dao/SealMaterialDao.java

@@ -3,7 +3,9 @@ package com.jeeplus.modules.sealMaterial.dao;
 import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
 
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfo;
+import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfoExport;
 import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfoImport;
 import org.apache.ibatis.annotations.Param;
 
@@ -32,4 +34,16 @@ public interface SealMaterialDao extends CrudDao<SealMaterialInfoImport> {
      * 根据项目id获取印章材料
      */
     public List<SealMaterialInfo> getSealMaterialByProjectId(String projectId);
+
+    /**
+     * 导出数据
+     * @param projectRecords
+     * @return
+     */
+    List<SealMaterialInfoExport> findExportList(String projectId);
+
+    /**
+     * 审批完成后的时间更新
+     */
+     public Integer updateById(SealMaterialInfoImport sealMaterialInfo);
 }

+ 30 - 3
src/main/java/com/jeeplus/modules/sealMaterial/entity/SealMaterialInfoExport.java

@@ -1,6 +1,7 @@
 package com.jeeplus.modules.sealMaterial.entity;
 
 import com.jeeplus.common.persistence.ActEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
 import com.jeeplus.modules.sys.entity.User;
 
 import java.util.Date;
@@ -9,19 +10,29 @@ import java.util.List;
 public class SealMaterialInfoExport extends ActEntity<SealMaterialInfoExport> {
 
     //用印材料名称
+    @ExcelField(title="用印材料名称", align=2, sort=1)
     private String sealMaterialName;
 
     //    数量
+    @ExcelField(title="数量", align=2, sort=2)
     private Integer amount;
 
     //    主要内容简述
+    @ExcelField(title="主要内容简述", align=2, sort=3)
     private String mainContents;
 
     //    经办人
     private User agent;
 
+
+    @ExcelField(title="备注", align=2, sort=4)
+    private String sealMaterialImportRemarks;//材料备注
+
     //    用印时间
-    private Date useSealTime;
+    @ExcelField(title="用印时间", align=2, sort=5)
+    private String useSealTime;
+
+    private String projectId; //项目id
 
     private List<SealMaterialInfoExport> sealMaterialInfoExportList;
 
@@ -57,11 +68,11 @@ public class SealMaterialInfoExport extends ActEntity<SealMaterialInfoExport> {
         this.agent = agent;
     }
 
-    public Date getUseSealTime() {
+    public String  getUseSealTime() {
         return useSealTime;
     }
 
-    public void setUseSealTime(Date useSealTime) {
+    public void setUseSealTime(String useSealTime) {
         this.useSealTime = useSealTime;
     }
 
@@ -72,4 +83,20 @@ public class SealMaterialInfoExport extends ActEntity<SealMaterialInfoExport> {
     public void setSealMaterialInfoExportList(List<SealMaterialInfoExport> sealMaterialInfoExportList) {
         this.sealMaterialInfoExportList = sealMaterialInfoExportList;
     }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getSealMaterialImportRemarks() {
+        return sealMaterialImportRemarks;
+    }
+
+    public void setSealMaterialImportRemarks(String sealMaterialImportRemarks) {
+        this.sealMaterialImportRemarks = sealMaterialImportRemarks;
+    }
 }

+ 26 - 1
src/main/java/com/jeeplus/modules/sealMaterial/service/SealMaterialService.java

@@ -1,12 +1,17 @@
 package com.jeeplus.modules.sealMaterial.service;
 
 import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.IdGen;
+import com.jeeplus.common.utils.MenuStatusEnum;
 import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.sealMaterial.dao.SealMaterialDao;
 import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfo;
+import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfoExport;
 import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfoImport;
+import com.jeeplus.modules.sys.utils.UserUtils;
 import org.apache.regexp.RE;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -82,7 +87,7 @@ public class SealMaterialService extends CrudService<SealMaterialDao,SealMateria
     }
 
     /**
-     * 批量更新
+     * 批量更新印章时间
      */
     @Transactional(readOnly = false)
     public void batchUpdateTime(SealMaterialInfo sealMaterialInfo) {
@@ -96,4 +101,24 @@ public class SealMaterialService extends CrudService<SealMaterialDao,SealMateria
     public List<SealMaterialInfo> getSealMaterialByProjectId(String projectId){
         return sealMaterialDao.getSealMaterialByProjectId(projectId);
     }
+
+    /**
+     * 查询分页导出用
+     */
+    public List<SealMaterialInfoExport> findPageExport(Page<SealMaterialInfoExport> page, SealMaterialInfoExport sealMaterialInfoExport) {
+        sealMaterialInfoExport.setPage(page);
+        List<SealMaterialInfoExport> sealMaterialInfoExports = sealMaterialDao.findExportList(sealMaterialInfoExport.getProjectId());
+        return sealMaterialInfoExports;
+    }
+
+
+    /**
+     * 批量更新
+     */
+    @Transactional(readOnly = false)
+    public void update(SealMaterialInfoImport sealMaterialInfo) {
+        sealMaterialInfo.preUpdate();
+        sealMaterialDao.updateById(sealMaterialInfo);
+    }
+
 }

+ 45 - 10
src/main/java/com/jeeplus/modules/sealMaterial/web/SealMaterialController.java

@@ -1,16 +1,25 @@
 package com.jeeplus.modules.sealMaterial.web;
 
 import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.utils.ThisLocalityDownloadUtil;
+import com.jeeplus.common.utils.excel.ExportExcel;
 import com.jeeplus.common.utils.excel.ImportExcel;
 import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.contractclient.entity.WorkContractClient;
+import com.jeeplus.modules.projectrecord.entity.ProjectPlanInfo;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfo;
 import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfoExport;
 import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfoImport;
+import com.jeeplus.modules.sealMaterial.service.SealMaterialService;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workreceiptsregister.entity.ResponseEntity;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -27,6 +36,8 @@ import java.util.List;
 @RequestMapping(value = "${adminPath}/seal/sealMaterial")
 public class SealMaterialController extends BaseController{
 
+    @Autowired
+    private SealMaterialService sealMaterialService;
 
     /**
      * 导入Excel数据
@@ -59,7 +70,7 @@ public class SealMaterialController extends BaseController{
     public String importFileTemplate(HttpServletResponse response, HttpServletRequest request, RedirectAttributes redirectAttributes) {
         try {
             ThisLocalityDownloadUtil download = new ThisLocalityDownloadUtil();
-            download.download("印章登记表模板.xlsx",request,response);
+//            download.download("印章登记表模板.xlsx",request,response);
         } catch (Exception e) {
             logger.error("印章登记表模板下载失败!",e);
         }
@@ -69,18 +80,42 @@ public class SealMaterialController extends BaseController{
     /**
      * 导出excel文件
      */
-//    @RequestMapping(value = "export", method= RequestMethod.POST)
-//    public String exportFile(SealMaterialInfo sealMaterialInfo, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+    @RequestMapping(value = "export")
+    public String exportFile(SealMaterialInfoExport sealMaterialInfoExport, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+        System.out.println("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+        try {
+            //添加查询类型
+            String fileName = "盖章材料表"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            List<SealMaterialInfoExport> list = sealMaterialService.findPageExport(new Page<SealMaterialInfoExport>(request, response, -1), sealMaterialInfoExport);
+            new ExportExcel("盖章材料", SealMaterialInfoExport.class).setDataList(list).write(response, fileName).dispose();
+            return null;
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导出项目记录失败!失败信息:"+e.getMessage());
+            logger.error("Exception e:"+e);
+        }
+        return "redirect:"+Global.getAdminPath()+"/sealApplyFor/sealApplyFor/?repage";
+    }
+
+//    @RequestMapping(value = "export")
+//    public String exportFile(ProjectRecords projectRecords, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+//        ProjectRecords ProjectRecord = ruralProjectRecordsService.getProjectRecords(projectRecords.getId());
+//        try {
+//            MyBeanUtils.copyBeanNotNull2Bean(projectRecords, ProjectRecord);//将编辑表单中的非NULL值覆盖数据库记录中的值
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
 //        try {
-//            //添加查询类型(造价审核)
-//            String fileName = "盖章材料表"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
-//            List<SealMaterialInfoExport> list = projectRecordsService.findPageExport(new Page<RuralProjectRecords>(request, response, -1), projectRecords);
-//            new ExportExcel("项目", RuralProjectRecordsExport.class).setDataList(list).write(response, fileName).dispose();
+//            //文件名称
+//            String fileName = ProjectRecord.getProjectName()+"-项目计划.xlsx";
+//            ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
+//            projectPlanInfo.setProjectId(ProjectRecord.getId());
+//            //获取项目计划信息
+//            List<ProjectPlanInfo> projectPlanList = projectPlanService.getProjectPlanList(projectPlanInfo);
+//            new ExportExcel(ProjectRecord.getProjectName()+"-项目计划", ProjectPlanInfo.class).setDataList(projectPlanList).write(response, fileName).dispose();
 //            return null;
 //        } catch (Exception e) {
-//            addMessage(redirectAttributes, "导出项目记录失败!失败信息:"+e.getMessage());
-//            logger.error("Exception e:"+e);
+//            addMessage(redirectAttributes, "导出项目计划记录失败!失败信息:"+e.getMessage());
 //        }
-//        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectRecords/?repage";
+//        return "redirect:"+Global.getAdminPath()+"/project/projectPlanCost/?repage";
 //    }
 }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 25 - 1
src/main/resources/mappings/modules/sealMaterial/sealMaterialDao.xml


+ 2 - 1
src/main/webapp/WEB-INF/tags/table/exportExcel.tag

@@ -16,11 +16,12 @@ $(document).ready(function() {
 		    	var pageNo =  $("#pageNo").val();
 		    	var pageSize = $("#pageSize").val();
 		    	//导出excel
+                console.log(url)
+                alert(url)
 		        $("#searchForm").attr("action","${url}");
 			    $("#pageNo").val(-1);
 				$("#pageSize").val(-1);
 				$("#searchForm").submit();
-
 				//导出excel之后还原
 				$("#searchForm").attr("action",url);
 			    $("#pageNo").val(pageNo);

BIN
src/main/webapp/dot/印章登记表模板.xlsx


+ 22 - 21
src/main/webapp/webpage/modules/sealApplyFor/sealApplyForForm.jsp

@@ -19,7 +19,7 @@
             background: red;
         }
         td input{
-            margin-left:-10px !important;
+            margin-left:0px !important;
             height: 42px !important;
         }
         .disables {
@@ -89,6 +89,9 @@
                     }
                 }
             });
+            if(${falg eq 'true'}){
+                addRow1('#sealMaterialInfoList', sealMaterialInfoListRowIdx, sealMaterialInfoListTpl);
+            }
         });
 
         function setValue(obj){
@@ -100,15 +103,15 @@
         }
 
         function genRow(data) {
-            console.log(data)
             for (var i = 0; i < data.length; i++) {
+                alert(data[i])
+                console.log(data[i])
                 addRow1('#sealMaterialInfoList', sealMaterialInfoListRowIdx, sealMaterialInfoListTpl, data[i])
             }
         }
 
         function addRow1(list, idx, tpl, row){
             var idx1 = $("#sealMaterialInfoList tr").length;
-            console.log(idx1)
             if(list == '#sealMaterialInfoList'){
                 bornTemplete1(list, idx, tpl, row, idx1);
                 sealMaterialInfoListRowIdx+=1;
@@ -339,7 +342,7 @@
                         <table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
                             <thead>
                             <tr>
-                                <th width="20%"><font color="red">*</font>用印材料名称</th>
+                                <th width="20%"><font color="red" >*</font>用印材料名称</th>
                                 <th width="10%"><font color="red">*</font>数量</th>
                                 <th width="40%">主要内容简述</th>
                                 <th width="10%">经办人</th>
@@ -352,37 +355,35 @@
                         </table>
                         <script type="text/template" id="sealMaterialInfoListTpl">//<!--
                     <tr id="sealMaterialInfoList{{idx}}">
-                      <td class="hide">
+                      <td class="hide" >
 							<input id="sealMaterialInfoList{{idx}}_projectId" name="sealMaterialInfoList[{{idx}}].projectId" type="hidden" value="{{row.projectId}}"/>
 							<input id="sealMaterialInfoList{{idx}}_delFlag" name="sealMaterialInfoList[{{idx}}].delFlag" type="hidden" value="0"/>
+							<input id="sealMaterialInfoList{{idx}}_id" name="sealMaterialInfoList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
                         </td>
-                        <td>
-							<input id="sealMaterialInfoList{{idx}}_sealMaterialName" name = "sealMaterialInfoList[{{idx}}].sealMaterialName"  type="text" value="{{row.sealMaterialName}}"  class="form-control"/>
+                        <td style="padding:0px">
+							<input id="sealMaterialInfoList{{idx}}_sealMaterialName" name = "sealMaterialInfoList[{{idx}}].sealMaterialName"  type="text" value="{{row.sealMaterialName}}"  class="form-control" style="padding:0px;margin-left:0px;text-align:center;" required/>
                         </td>
-                        <td>
-							<input id="sealMaterialInfoList{{idx}}_amount" name = "sealMaterialInfoList[{{idx}}].amount"   type="text" value="{{row.amount}}"   onkeyup="num(this)" class="form-control"/>
+                        <td style="padding:0px">
+							<input id="sealMaterialInfoList{{idx}}_amount" name = "sealMaterialInfoList[{{idx}}].amount"   type="text" value="{{row.amount}}"   onkeyup="num(this)" class="form-control" style="padding:0px;margin-left:0px;text-align:center;" required/>
                         </td>
-                        <td>
-							<input id="sealMaterialInfoList{{idx}}_mainContents" name = "sealMaterialInfoList[{{idx}}].mainContents"  type="text" value="{{row.mainContents}}"  class="form-control"/>
+                        <td style="padding:0px">
+							<input id="sealMaterialInfoList{{idx}}_mainContents" name = "sealMaterialInfoList[{{idx}}].mainContents"  type="text" value="{{row.mainContents}}"  class="form-control" style="padding:0px;margin-left:0px;text-align:center;"/>
                         </td>
-                        <td>
-							<input id="sealMaterialInfoList{{idx}}_agent" name = "sealMaterialInfoList[{{idx}}].agent.name"  type="text" value="{{row.agent.name}}"  class="form-control"/>
+                        <td style="padding:0px">
+							<input id="sealMaterialInfoList{{idx}}_agent" name = "sealMaterialInfoList[{{idx}}].agent.name"  type="text" value="${sealMaterialInfo.agent.name}"  class="form-control" style="padding:0px;margin-left:0px;text-align:center;" readonly="true"/>
                         </td>
-                         <td>
-							<input id="sealMaterialInfoList{{idx}}_remarks" name = "sealMaterialInfoList[{{idx}}].sealMaterialImportRemarks"  type="text" value="{{row.sealMaterialImportRemarks}}"  class="form-control"/>
+                         <td style="padding:0px">
+							<input id="sealMaterialInfoList{{idx}}sealMaterialImportRemarks" name = "sealMaterialInfoList[{{idx}}].sealMaterialImportRemarks"  type="text" value="{{row.sealMaterialImportRemarks}}"  class="form-control" style="padding:0px;margin-left:0px;text-align:center;"/>
                         </td>
-                         <td class="text-center op-td" >
-                            {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#sealMaterialInfoList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                         <td class="text-center op-td" style="padding:0px">
+                            {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#sealMaterialInfoList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove" style="padding:0px;margin-left:0px;text-align:center;"></i>&nbsp;删除</span>{{/delBtn}}
                         </td>
                     </tr>//-->
                         </script>
                         <script type="text/javascript">
                             var sealMaterialInfoListRowIdx = 0, sealMaterialInfoListTpl = $("#sealMaterialInfoListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-                            /*if($("#id").val()){
-                                workInvoiceProjectRelationListRowIdx = ${fn:length(workInvoice.workInvoiceProjectRelationList)};
-						}*/
                             $(document).ready(function() {
-                                <%--var data = ${fns:toJson(projectMaterialStorage.sealMaterialInfoList)};--%>
+                                var data = ${fns:toJson(sealMaterialInfo.sealMaterialInfoList)};
                                 for (var i=0; i<data.length; i++){
                                     addRow1('#sealMaterialInfoList', sealMaterialInfoListRowIdx, sealMaterialInfoListTpl, data[i])
                                     sealMaterialInfoListRowIdx = sealMaterialInfoListRowIdx + 1;

+ 35 - 27
src/main/webapp/webpage/modules/sealApplyFor/sealApplyForView.jsp

@@ -253,33 +253,35 @@
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>盖章材料信息列表</h2></div>
                 <div class="layui-item layui-col-xs12 form-table-container" >
-                    <table:exportExcel url="${ctx}/ruralProject/ruralProjectRecords/export"></table:exportExcel>
+                    <a class="nav-btn nav-btn-export" title="导出"  onclick="return confirmx('确认要导出该盖章材料信息列表吗?', '${ctx}/seal/sealMaterial/export?projectId=${sealApplyForInfo.projectId}');"><i class="fa fa-file-excel-o"></i> 导出</a>
                     <table id="contentTable1" class="table table-bordered table-condensed no-bottom-margin details">
                         <thead>
                         <tr>
                             <th class="hide"></th>
-                            <th >项目名称</th>
-                            <th >报告号</th>
+<%--                            <th >项目名称</th>--%>
+<%--                            <th >报告号</th>--%>
                             <th >盖章材料名称</th>
                             <th >数量</th>
                             <th >主要内容简述</th>
                             <th >地点</th>
-                            <th >审核人</th>
-                            <th >创建人</th>
-                            <th >项目负责人</th>
-                            <th >开始时间</th>
-                            <th >结束时间</th>
+                            <th >备注</th>
+<%--                            <th >审核人</th>--%>
+<%--                            <th >创建人</th>--%>
+<%--                            <th >项目负责人</th>--%>
+<%--                            <th >开始时间</th>--%>
+<%--                            <th >结束时间</th>--%>
+                            <th >盖章时间</th>
                         </tr>
                         </thead>
                         <tbody id="workConstructionLinkmanList">
                         <c:forEach items="${sealMaterialInfos}" var="info" varStatus="index">
                             <tr>
-                                <td >
-                                        ${info.projectName}
-                                </td>
-                                <td>
-                                        ${info.reportId}
-                                </td>
+<%--                                <td >--%>
+<%--                                        ${info.projectName}--%>
+<%--                                </td>--%>
+<%--                                <td>--%>
+<%--                                        ${info.reportId}--%>
+<%--                                </td>--%>
                                 <td>
                                         ${info.sealMaterialName}
                                 </td>
@@ -293,20 +295,26 @@
                                         ${info.area}
                                 </td>
                                 <td>
-                                        ${info.reviewPerson}
-                                </td>
-                                <td>
-                                        ${info.porjectCreatePerson}
-                                </td>
-                                <td>
-                                        ${info.projectMasterId}
-                                </td>
-                                <td>
-                                        ${info.startDate}
-                                </td>
-                                <td>
-                                        ${info.endingDate}
+                                        ${info.sealMaterialImportRemarks}
                                 </td>
+<%--                                <td>--%>
+<%--                                        ${info.reviewPerson}--%>
+<%--                                </td>--%>
+<%--                                <td>--%>
+<%--                                        ${info.porjectCreatePerson}--%>
+<%--                                </td>--%>
+<%--                                <td>--%>
+<%--                                        ${info.projectMasterId}--%>
+<%--                                </td>--%>
+<%--                                <td>--%>
+<%--                                    <fmt:formatDate value="${info.startDate}" pattern="yyyy-MM-dd"/>--%>
+
+<%--                                </td>--%>
+
+                                    <td>
+<%--                                        <fmt:formatDate value="${info.useSealTime}" pattern="yyyy-MM-dd"/>--%>
+                                        ${info.useSealTime}
+                                    </td>
                             </tr>
                         </c:forEach>
                         </tbody>