user5 2 rokov pred
rodič
commit
f73b2dba3f

+ 70 - 15
src/main/java/com/jeeplus/modules/sealApplyFor/service/SealApplyForService.java

@@ -8,7 +8,6 @@ import com.jeeplus.common.utils.MenuStatusEnum;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
-import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectContactPerson;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectContactPersonService;
@@ -16,12 +15,11 @@ import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsServic
 import com.jeeplus.modules.sealApplyFor.dao.SealApplyForDao;
 import com.jeeplus.modules.sealApplyFor.entity.SealApplyForInfo;
 import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfo;
+import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfoImport;
 import com.jeeplus.modules.sealMaterial.service.SealMaterialService;
-import com.jeeplus.modules.sys.entity.MainDictDetail;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.service.OfficeService;
-import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
 import com.jeeplus.modules.workactivity.entity.Activity;
@@ -30,8 +28,6 @@ import com.jeeplus.modules.workactivity.service.ActivityService;
 import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
 import com.jeeplus.modules.workactivitymenu.entity.WorkActivityMenu;
 import com.jeeplus.modules.workactivitymenu.service.WorkActivityMenuService;
-import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
-import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
@@ -89,7 +85,7 @@ public class SealApplyForService extends CrudService<SealApplyForDao, SealApplyF
             if(StringUtils.isNotBlank(sealApplyForInfo.getProjectId())){
                 RuralProjectRecords projectRecords = projectRecordsService.get(sealApplyForInfo.getProjectId());
 
-                List<MainDictDetail> mainDictList = Lists.newArrayList();
+                /*List<MainDictDetail> mainDictList = Lists.newArrayList();
                 //工程咨询
                 if("1".equals(projectRecords.getProjectType())){
                     mainDictList = DictUtils.getMainDictList("attachment_project_sort");
@@ -105,10 +101,10 @@ public class SealApplyForService extends CrudService<SealApplyForDao, SealApplyF
                             break;
                         }
                     }
-                }
+                }*/
 
                 //根据项目编号查询委托/施工方联系人
-                List<RuralProjectContactPerson> projectContactPersonByProjectIdList = ruralProjectContactPersonService.findProjectContactPersonByProjectId(projectRecords.getProjectId());
+                /*List<RuralProjectContactPerson> projectContactPersonByProjectIdList = ruralProjectContactPersonService.findProjectContactPersonByProjectId(projectRecords.getProjectId());
                 projectRecords.setWorkClientLinkmanList(new ArrayList<>());
                 for(RuralProjectContactPerson person:projectContactPersonByProjectIdList){
                     WorkClientLinkman workClientLinkman = new WorkClientLinkman();
@@ -127,7 +123,7 @@ public class SealApplyForService extends CrudService<SealApplyForDao, SealApplyF
                         workClientLinkman.setLinkMobile(person.getPhone2());
                         projectRecords.getWorkConstructionLinkmanList().add(workClientLinkman);
                     }
-                }
+                }*/
 
 
                 sealApplyForInfo.setProjectRecords(projectRecords);
@@ -159,7 +155,7 @@ public class SealApplyForService extends CrudService<SealApplyForDao, SealApplyF
     }
 
     @Transactional(readOnly = false)
-    public void save(SealApplyForInfo sealApplyForInfo, ProjectStatusEnum projectStatus) {
+    public Map<String,Object> save(SealApplyForInfo sealApplyForInfo, ProjectStatusEnum projectStatus) {
         if(null != sealApplyForInfo.getProjectRecords() && StringUtils.isNotBlank(sealApplyForInfo.getProjectRecords().getId())){
             sealApplyForInfo.setProjectId(sealApplyForInfo.getProjectRecords().getId());
         }
@@ -170,12 +166,43 @@ public class SealApplyForService extends CrudService<SealApplyForDao, SealApplyF
         Integer oldStatus = sealApplyForInfo.getStatus();
         sealApplyForInfo.setStatus(projectStatus.getValue());
 
-        super.save(sealApplyForInfo);
 
-        //启动审批流程
-		if (sealApplyForInfo.getStatus()== ProjectStatusEnum.IN_APRL.getValue()&&(oldStatus==null|| ProjectStatusEnum.REJECTED.getValue()!=oldStatus)) {
-			this.startAudit(sealApplyForInfo,sealApplyForInfo.getProcessInstanceId());
-		}
+        //对数据进行重复判断
+        List<SealMaterialInfoImport> sealMaterialInfoImportList = sealApplyForInfo.getSealMaterialInfoList();
+        Map map = sealMaterialService.qureyCountAboutSealMaterial(sealMaterialInfoImportList);
+        Boolean success = (Boolean) map.get("success");
+        if(success){
+            super.save(sealApplyForInfo);
+
+            // 根据id删除原有盖章文件信息
+            sealMaterialService.deleteByProjectId(sealApplyForInfo.getProjectId());
+
+            //将已有的文件信息进行保存
+            //对文件名称为空、数量为空或者是删除的数据进行删除
+
+            if(null != sealMaterialInfoImportList){
+                User loginUser = UserUtils.getUser();
+                Integer sort = 1;
+                for (SealMaterialInfoImport info: sealMaterialInfoImportList) {
+                    info.setProjectId(sealApplyForInfo.getProjectId());
+                    info.setAgent(loginUser);
+                    info.setSort(sort);
+                    sort ++ ;
+                }
+                //批量保存
+                if(sealMaterialInfoImportList.size()>0){
+                    sealMaterialService.batchSave(sealMaterialInfoImportList);
+                }
+            }
+
+            //启动审批流程
+            if (sealApplyForInfo.getStatus()== ProjectStatusEnum.IN_APRL.getValue()&&(oldStatus==null|| ProjectStatusEnum.REJECTED.getValue()!=oldStatus)) {
+                this.startAudit(sealApplyForInfo,sealApplyForInfo.getProcessInstanceId());
+            }
+            map.put("message","盖章申请发起成功");
+        }
+        return map;
+
     }
 
     /**
@@ -347,6 +374,34 @@ public class SealApplyForService extends CrudService<SealApplyForDao, SealApplyF
             actTaskService.claim(act.getTaskId(), UserUtils.getUser().getId());
             sealApplyFor = this.get(sealApplyForInfo.getId());
         }else {
+
+            //对数据进行重复判断
+            List<SealMaterialInfoImport> sealMaterialInfoImportList = sealApplyForInfo.getSealMaterialInfoList();
+            Map map = sealMaterialService.qureyCountAboutSealMaterial(sealMaterialInfoImportList);
+            Boolean success = (Boolean) map.get("success");
+            if(success){
+                // 根据id删除原有盖章文件信息
+                sealMaterialService.deleteByProjectId(sealApplyForInfo.getProjectId());
+
+                //将已有的文件信息进行保存
+                //对文件名称为空、数量为空或者是删除的数据进行删除
+
+                if(null != sealMaterialInfoImportList){
+                    User loginUser = UserUtils.getUser();
+                    Integer sort = 1;
+                    for (SealMaterialInfoImport info: sealMaterialInfoImportList) {
+                        info.setProjectId(sealApplyForInfo.getProjectId());
+                        info.setAgent(loginUser);
+                        info.setSort(sort);
+                        sort ++ ;
+                    }
+                    //批量保存
+                    if(sealMaterialInfoImportList.size()>0){
+                        sealMaterialService.batchSave(sealMaterialInfoImportList);
+                    }
+                }
+            }
+
             sealApplyFor = sealApplyForInfo;
             flag = "yes";
         }

+ 32 - 88
src/main/java/com/jeeplus/modules/sealApplyFor/web/SealApplyForController.java

@@ -9,28 +9,19 @@ import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
-import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectContactPerson;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectContactPersonService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
 import com.jeeplus.modules.sealApplyFor.entity.SealApplyForInfo;
 import com.jeeplus.modules.sealApplyFor.service.SealApplyForService;
-import com.jeeplus.modules.sealMaterial.dao.SealMaterialDao;
 import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfo;
-import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfoImport;
 import com.jeeplus.modules.sealMaterial.service.SealMaterialService;
-import com.jeeplus.modules.sys.entity.MainDictDetail;
 import com.jeeplus.modules.sys.entity.User;
-import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
-import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
-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;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,7 +37,10 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
-import java.util.*;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 盖章申请Controller
@@ -139,16 +133,12 @@ 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();
+            /*List<MainDictDetail> mainDictList = Lists.newArrayList();
             //工程咨询
             if("1".equals(projectRecords.getProjectType())){
                 mainDictList = DictUtils.getMainDictList("attachment_project_sort");
@@ -164,10 +154,10 @@ public class SealApplyForController extends BaseController {
                         break;
                     }
                 }
-            }
+            }*/
 
             //根据项目编号查询委托/施工方联系人
-            List<RuralProjectContactPerson> projectContactPersonByProjectIdList = ruralProjectContactPersonService.findProjectContactPersonByProjectId(projectRecords.getProjectId());
+            /*List<RuralProjectContactPerson> projectContactPersonByProjectIdList = ruralProjectContactPersonService.findProjectContactPersonByProjectId(projectRecords.getProjectId());
             projectRecords.setWorkClientLinkmanList(new ArrayList<>());
             for(RuralProjectContactPerson person:projectContactPersonByProjectIdList){
                 WorkClientLinkman workClientLinkman = new WorkClientLinkman();
@@ -186,7 +176,7 @@ public class SealApplyForController extends BaseController {
                     workClientLinkman.setLinkMobile(person.getPhone2());
                     projectRecords.getWorkConstructionLinkmanList().add(workClientLinkman);
                 }
-            }
+            }*/
 
 
             sealApplyForInfo.setProjectRecords(projectRecords);
@@ -205,12 +195,11 @@ public class SealApplyForController extends BaseController {
         User user = UserUtils.getUser();
         SealMaterialInfo sealMaterialInfo = new SealMaterialInfo();
         sealMaterialInfo.setAgent(user);
-        if(!falg){
+        if(null != sealMaterialInfos){
             sealMaterialInfo.setSealMaterialInfoList(sealMaterialInfos);
         }
         model.addAttribute("sealMaterialInfo",sealMaterialInfo);
         model.addAttribute("sealApplyForInfo", sealApplyForInfo);
-        model.addAttribute("falg",falg.toString());
         return "modules/sealApplyFor/sealApplyForForm";
     }
     /**
@@ -276,24 +265,11 @@ 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) {
-        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);
         }
         try {
-
+            Map<String, Object> result = new HashMap<>();
             if(null != sealApplyForInfo.getProjectRecords() || StringUtils.isNotBlank(sealApplyForInfo.getProjectRecords().getId())){
                 RuralProjectRecords projectRecords = projectRecordsService.get(sealApplyForInfo.getProjectRecords().getId());
                 sealApplyForInfo.setProjectRecords(projectRecords);
@@ -312,63 +288,21 @@ public class SealApplyForController extends BaseController {
                     addMessage(redirectAttributes, "盖章申请已登记完成,无法送审");
                     return "redirect:"+Global.getAdminPath()+"/sealApplyFor/sealApplyFor/?repage";
                 }
-                service.save(t, ProjectStatusEnum.IN_APRL);//保存
+                result = service.save(t, ProjectStatusEnum.IN_APRL);//保存
             } else {//新增表单保存
-                service.save(sealApplyForInfo, ProjectStatusEnum.IN_APRL);//保存
+                result = service.save(sealApplyForInfo, ProjectStatusEnum.IN_APRL);//保存
+            }
+            Boolean success = (Boolean) result.get("success");
+            if(success){
+                addMessage(redirectAttributes, "保存盖章申请成功");
+            }else{
+                addMessage(redirectAttributes, result.get("message").toString());
             }
-            addMessage(redirectAttributes, "保存盖章申请成功");
         }catch (Exception e){
             logger.error("保存盖章申请异常:",e);
             addMessage(redirectAttributes, "保存盖章申请异常:"+e.getMessage());
         }
 
-
-//        Iterator<SealMaterialInfoImport> iterator = sealMaterialInfoImportList.iterator();
-//        while (iterator.hasNext()){
-//            SealMaterialInfoImport sealMaterialInfoImport = iterator.next();
-//            if(sealMaterialInfoImport.getSealMaterialName() == null || sealMaterialInfoImport.getAmount() == null){
-//                iterator.remove();
-//            }else {
-//                sealMaterialInfoImportList.add(sealMaterialInfoImport);
-//            }
-//        }
-//        这块做塞值处理的
-        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";
-                }
-            }
-            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));
-            }
-        }
-
         return "redirect:"+Global.getAdminPath()+"/sealApplyFor/sealApplyFor/?repage";
     }
 
@@ -483,7 +417,7 @@ public class SealApplyForController extends BaseController {
         if(StringUtils.isNotBlank(sealApplyForInfo.getProjectId())){
             RuralProjectRecords projectRecords = projectRecordsService.get(sealApplyForInfo.getProjectId());
 
-            List<MainDictDetail> mainDictList = Lists.newArrayList();
+            /*List<MainDictDetail> mainDictList = Lists.newArrayList();
             //工程咨询
             if("1".equals(projectRecords.getProjectType())){
                 mainDictList = DictUtils.getMainDictList("attachment_project_sort");
@@ -499,10 +433,10 @@ public class SealApplyForController extends BaseController {
                         break;
                     }
                 }
-            }
+            }*/
 
             //根据项目编号查询委托/施工方联系人
-            List<RuralProjectContactPerson> projectContactPersonByProjectIdList = ruralProjectContactPersonService.findProjectContactPersonByProjectId(projectRecords.getProjectId());
+            /*List<RuralProjectContactPerson> projectContactPersonByProjectIdList = ruralProjectContactPersonService.findProjectContactPersonByProjectId(projectRecords.getProjectId());
             projectRecords.setWorkClientLinkmanList(new ArrayList<>());
             for(RuralProjectContactPerson person:projectContactPersonByProjectIdList){
                 WorkClientLinkman workClientLinkman = new WorkClientLinkman();
@@ -521,7 +455,7 @@ public class SealApplyForController extends BaseController {
                     workClientLinkman.setLinkMobile(person.getPhone2());
                     projectRecords.getWorkConstructionLinkmanList().add(workClientLinkman);
                 }
-            }
+            }*/
 
 
             sealApplyForInfo.setProjectRecords(projectRecords);
@@ -534,6 +468,16 @@ public class SealApplyForController extends BaseController {
         if(StringUtils.isBlank(sealApplyForInfo.getSealCompany())){
             sealApplyForInfo.setSealCompany("1");
         }
+
+        List<SealMaterialInfo> sealMaterialInfos = sealMaterialService.getSealMaterialByProjectId(sealApplyForInfo.getProjectId());
+        User user = UserUtils.getUser();
+        SealMaterialInfo sealMaterialInfo = new SealMaterialInfo();
+        sealMaterialInfo.setAgent(user);
+        if(null != sealMaterialInfos){
+            sealMaterialInfo.setSealMaterialInfoList(sealMaterialInfos);
+        }
+
+        model.addAttribute("sealMaterialInfo",sealMaterialInfo);
         model.addAttribute("sealApplyForInfo", sealApplyForInfo);
         return "modules/sealApplyFor/sealApplyForModify";
     }

+ 6 - 2
src/main/java/com/jeeplus/modules/sealMaterial/dao/SealMaterialDao.java

@@ -2,8 +2,6 @@ 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;
@@ -46,4 +44,10 @@ public interface SealMaterialDao extends CrudDao<SealMaterialInfoImport> {
      * 审批完成后的时间更新
      */
      public Integer updateById(SealMaterialInfoImport sealMaterialInfo);
+
+    /**
+     * 根据项目id删除盖章文件信息(物理删除)
+     * @param projectId
+     */
+    void deleteByProjectId(String projectId);
 }

+ 14 - 4
src/main/java/com/jeeplus/modules/sealMaterial/entity/SealMaterialInfoExport.java

@@ -4,7 +4,6 @@ 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;
 import java.util.List;
 
 public class SealMaterialInfoExport extends ActEntity<SealMaterialInfoExport> {
@@ -14,7 +13,7 @@ public class SealMaterialInfoExport extends ActEntity<SealMaterialInfoExport> {
     private String sealMaterialName;
 
     //    数量
-    @ExcelField(title="数", align=2, sort=2)
+    @ExcelField(title="数", align=2, sort=2)
     private Integer amount;
 
     //    主要内容简述
@@ -24,12 +23,15 @@ public class SealMaterialInfoExport extends ActEntity<SealMaterialInfoExport> {
     //    经办人
     private User agent;
 
+    @ExcelField(title="经办人", align=2, sort=5)
+    private String agentName;   //经办人名称
 
-    @ExcelField(title="备注", align=2, sort=4)
+
+    @ExcelField(title="备注", align=2, sort=6)
     private String sealMaterialImportRemarks;//材料备注
 
     //    用印时间
-    @ExcelField(title="用印时间", align=2, sort=5)
+    @ExcelField(title="用印时间", align=2, sort=4)
     private String useSealTime;
 
     private String projectId; //项目id
@@ -99,4 +101,12 @@ public class SealMaterialInfoExport extends ActEntity<SealMaterialInfoExport> {
     public void setSealMaterialImportRemarks(String sealMaterialImportRemarks) {
         this.sealMaterialImportRemarks = sealMaterialImportRemarks;
     }
+
+    public String getAgentName() {
+        return agentName;
+    }
+
+    public void setAgentName(String agentName) {
+        this.agentName = agentName;
+    }
 }

+ 10 - 0
src/main/java/com/jeeplus/modules/sealMaterial/entity/SealMaterialInfoImport.java

@@ -32,6 +32,8 @@ public class SealMaterialInfoImport extends ActEntity<SealMaterialInfoImport> {
 //    用印时间
     private Date useSealTime;
 
+    private Integer sort;//排序
+
 
     private List<SealMaterialInfoImport> sealMaterialInfoImportList;
 
@@ -98,4 +100,12 @@ public class SealMaterialInfoImport extends ActEntity<SealMaterialInfoImport> {
     public void setUseSealTime(Date useSealTime) {
         this.useSealTime = useSealTime;
     }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
 }

+ 41 - 43
src/main/java/com/jeeplus/modules/sealMaterial/service/SealMaterialService.java

@@ -1,18 +1,13 @@
 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.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -29,47 +24,41 @@ public class SealMaterialService extends CrudService<SealMaterialDao,SealMateria
     /**
      * 查询同项目名称、数量、是否只有一个
      */
-    public Map qureyCountAboutSealMaterial(List<SealMaterialInfoImport> sealMaterialInfoImportList){
-        int i =0;
-        HashMap map = new HashMap();
-        StringBuilder stringBuilder = new StringBuilder();
-        List<String> list = new ArrayList();
-        Set set = new HashSet();
-        Boolean flag = false;
-        //材料列表自身重复判断
-        for (SealMaterialInfoImport sealMaterialInfoImport: sealMaterialInfoImportList){
-            StringBuilder stringBuilder2 = new StringBuilder();
-            String str = new String();
-            str = sealMaterialInfoImport.getSealMaterialName()+sealMaterialInfoImport.getAmount();
-            list.add(str);
-            stringBuilder2.append(sealMaterialInfoImport.getSealMaterialName()).append(sealMaterialInfoImport.getAmount());
-            set.add(str);
-            i++;
+    public Map<String,Object> qureyCountAboutSealMaterial(List<SealMaterialInfoImport> sealMaterialInfoImportList){
+        Map<String,Object> map = new HashMap<String,Object>();
+        List<String> list = new ArrayList<String>();
+        Set<String> set = new HashSet<String>();
+
+        Iterator<SealMaterialInfoImport> it = sealMaterialInfoImportList.iterator();
+        while(it.hasNext()){
+            SealMaterialInfoImport info = it.next();
+            if(StringUtils.isBlank(info.getSealMaterialName()) || null == info.getAmount() || "1".equals(info.getDelFlag())){
+                it.remove();
+            }
         }
+
+        //材料列表自身重复判断
+        if(null != sealMaterialInfoImportList){
+            for (SealMaterialInfoImport sealMaterialInfoImport: sealMaterialInfoImportList){
+                StringBuilder stringBuilder2 = new StringBuilder();
+                list.add(stringBuilder2.toString());
+                stringBuilder2.append(sealMaterialInfoImport.getSealMaterialName()).append(sealMaterialInfoImport.getAmount());
+                set.add(stringBuilder2.toString());
+            }
 //        如果列表长度和set长度不符合,代表有不符合条件的参数
-        if(sealMaterialInfoImportList.size() != set.size()){
-            stringBuilder.append(" 数据中存在重复用章材料,无法进行添加");
-            map.put("failure",stringBuilder);
-            return map;
-        }
-//        数据库判断
-        List<String> materialNameList = Lists.newArrayList();
-        for(int j=0;j<sealMaterialInfoImportList.size();j++){
-            if(sealMaterialDao.selectCountAboutSealMaterial(sealMaterialInfoImportList.get(j))!=0){
-                materialNameList.add(sealMaterialInfoImportList.get(j).getSealMaterialName());
-                flag = true;
+            if(sealMaterialInfoImportList.size() != set.size()){
+                map.put("success",false);
+                map.put("message","数据中存在重复用章材料,无法进行添加");
+                return map;
+            }else{
+                map.put("success",true);
+                map.put("message","数据正常");
             }
+        }else{
+            map.put("success",true);
+            map.put("message","数据正常");
         }
-        if(!flag){
-            //如果重复,重复的材料名称以String形式抛出到前端  join方法
-            map.put("successful",stringBuilder);
-            return  map;
-        }else {
-            String join = StringUtils.join(materialNameList, ",");
-            stringBuilder.append("用章材料 " + join + " 已存在,请勿重复添加");
-            map.put("failure",stringBuilder);
-            return map;
-        }
+        return map;
     }
 
 
@@ -121,4 +110,13 @@ public class SealMaterialService extends CrudService<SealMaterialDao,SealMateria
         sealMaterialDao.updateById(sealMaterialInfo);
     }
 
+    /**
+     * 根据项目id删除盖章文件信息
+     * @param projectId
+     */
+    @Transactional(readOnly = false)
+    public void deleteByProjectId(String projectId){
+        sealMaterialDao.deleteByProjectId(projectId);
+    }
+
 }

+ 1 - 7
src/main/java/com/jeeplus/modules/sealMaterial/web/SealMaterialController.java

@@ -3,22 +3,16 @@ 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;
@@ -70,7 +64,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);
         }

+ 15 - 1
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -68,6 +68,8 @@ import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
 import com.jeeplus.modules.ruralprojectrecords.service.*;
 import com.jeeplus.modules.sealApplyFor.entity.SealApplyForInfo;
 import com.jeeplus.modules.sealApplyFor.service.SealApplyForService;
+import com.jeeplus.modules.sealMaterial.entity.SealMaterialInfo;
+import com.jeeplus.modules.sealMaterial.service.SealMaterialService;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
 import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.statement.service.StatementCompanyComprehensiveService;
@@ -131,7 +133,6 @@ import com.jeeplus.modules.workfullexecute.entity.WorkFullExecute;
 import com.jeeplus.modules.workfullexecute.service.WorkFullExecuteService;
 import com.jeeplus.modules.workfullmanage.entity.WorkFullPay;
 import com.jeeplus.modules.workfullmanage.entity.WorkFullRecord;
-import com.jeeplus.modules.workfullmanage.service.WorkFullManageService;
 import com.jeeplus.modules.workfullmanage.service.WorkFullPayService;
 import com.jeeplus.modules.workfullmanage.service.WorkFullRecordService;
 import com.jeeplus.modules.workfullmeetingminutes.entity.WorkFullMeetingminutes;
@@ -514,6 +515,8 @@ public class WorkProjectNotifyController extends BaseController {
 	private BusinessQuestionsService businessQuestionsService;
 	@Autowired
 	private SealApplyForService sealApplyForService;
+	@Autowired
+	private SealMaterialService sealMaterialService;
 
 	@ModelAttribute
 	public WorkProjectNotify get(@RequestParam(required=false) String id) {
@@ -5066,10 +5069,21 @@ public class WorkProjectNotifyController extends BaseController {
 				}else if (workProjectNotify.getType().equals("106")) {    //盖章申请
 
 					SealApplyForInfo sealApplyForInfo = sealApplyForService.get(workProjectNotify.getNotifyId());
+					List<SealMaterialInfo> sealMaterialInfos = sealMaterialService.getSealMaterialByProjectId(sealApplyForInfo.getProjectId());
+
+					User user = UserUtils.getUser();
+					SealMaterialInfo sealMaterialInfo = new SealMaterialInfo();
+					sealMaterialInfo.setAgent(user);
+					if(null != sealMaterialInfos){
+						sealMaterialInfo.setSealMaterialInfoList(sealMaterialInfos);
+					}
+					model.addAttribute("sealMaterialInfo",sealMaterialInfo);
+
 					Act act = getByAct(sealApplyForInfo.getProcessInstanceId());
 					sealApplyForInfo.setAct(act);
 					sealApplyForInfo.setUploadMode(uploadMode);
 					sealApplyForInfo.setHome("home");
+					model.addAttribute("sealMaterialInfos",sealMaterialInfos);
 					model.addAttribute("sealApplyForInfo", sealApplyForInfo);
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						return "modules/sealApplyFor/sealApplyForView";

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 59 - 5
src/main/resources/mappings/modules/sealMaterial/sealMaterialDao.xml


+ 48 - 134
src/main/webapp/webpage/modules/sealApplyFor/sealApplyForAudit.jsp

@@ -107,24 +107,8 @@
 
             <input type="hidden" id="flagFile" value="">
 
-            <div class="form-group layui-row first">
-                <div class="form-group-label"><h2>盖章信息</h2></div>
-                <div class="layui-item layui-col-sm6">
-                    <label class="layui-form-label"><span class="require-item">*</span>单位:</label>
-                    <div class="layui-input-block">
-                        <input type="radio" name="sealCompany" value="0" title="东兴" disabled <c:if test="${sealApplyForInfo.sealCompany=='0'}">checked</c:if>>
-                        <input type="radio" name="sealCompany" value="1" title="赣能" disabled <c:if test="${sealApplyForInfo.sealCompany=='1'}">checked</c:if> >
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6 with-textarea">
-                    <label class="layui-form-label">盖章说明:</label>
-                    <div class="layui-input-block">
-                        <textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${sealApplyForInfo.remarks}</textarea>
-                    </div>
-                </div>
-            </div>
 
-            <div id="upTable">
+
             <div class="form-group layui-row first">
                 <div class="form-group-label"><h2>项目基础信息</h2></div>
 
@@ -142,37 +126,12 @@
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">项目编号:</label>
-                    <div class="layui-input-block">
-                        <input id="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input" style="background-color: #f1f1f1" value="${sealApplyForInfo.projectRecords.projectId}"/>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label">项目所在地:</label>
                     <div class="layui-input-block">
                         <input id="area" htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.province}-${sealApplyForInfo.projectRecords.city}-${sealApplyForInfo.projectRecords.county}"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">投资性质:</label>
-                    <div class="layui-input-block">
-                        <c:if test="${sealApplyForInfo.projectRecords.projectProperties==null}">
-                            <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input"/>
-                        </c:if>
-                        <c:forEach  items="${fns:getMainDictList('project_properties')}" var="v">
-                            <c:if test="${v.value==sealApplyForInfo.projectRecords.projectProperties}">
-                                <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${v.label}"/>
-                            </c:if>
-                        </c:forEach>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">建设地点:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" style="background-color: #f1f1f1"  readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.projectSite}"/>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label">创建人:</label>
                     <div class="layui-input-block">
                         <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.createBy.name}"/>
@@ -185,12 +144,6 @@
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">所属部门:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" id="officeName" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.officeName}"/>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label">项目负责人:</label>
                     <div class="layui-input-block">
                         <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.projectMasterName}"/>
@@ -208,108 +161,69 @@
                         <input class="laydate-icondate form-control layui-input layer-date "  style="background-color: #f1f1f1" readonly="true" id="endingDate" name="endingDate" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.endingDate}" pattern="yyyy-MM-dd"/>">
                     </div>
                 </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">创建日期:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false"  style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.createDate}" pattern="yyyy-MM-dd"/>"/>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">项目类别:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" readonly="true"  style="background-color: #f1f1f1" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.attachmentProjectSort}"/>
-                    </div>
-                </div>
-                <%--<div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">盖章数量:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" readonly="true"  style="background-color: #f1f1f1" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.contractsNum}"/>
-                    </div>
-                </div>--%>
-                <div class="layui-item layui-col-sm6 lw6 with-textarea">
-                    <label class="layui-form-label">工程概况:</label>
+            </div>
+
+            <div class="form-group layui-row first">
+                <div class="form-group-label"><h2>盖章信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>单位:</label>
                     <div class="layui-input-block">
-                        <textarea htmlEscape="false" rows="4" readonly="true"  style="background-color: #f1f1f1" maxlength="1000" class="form-control" >${sealApplyForInfo.projectRecords.projectDesc}</textarea>
+                        <input type="radio" name="sealCompany" value="0" title="东兴" disabled <c:if test="${sealApplyForInfo.sealCompany=='0'}">checked</c:if>>
+                        <input type="radio" name="sealCompany" value="1" title="赣能" disabled <c:if test="${sealApplyForInfo.sealCompany=='1'}">checked</c:if> >
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6 with-textarea">
-                    <label class="layui-form-label">备注:</label>
+                    <label class="layui-form-label">盖章说明:</label>
                     <div class="layui-input-block">
-                        <textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${sealApplyForInfo.projectRecords.remarks}</textarea>
+                        <textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${sealApplyForInfo.remarks}</textarea>
                     </div>
                 </div>
             </div>
 
             <div class="form-group layui-row">
-                <div class="form-group-label"><h2>委托方联系人信息</h2></div>
+                <div class="form-group-label"><h2>盖章材料信息列表</h2></div>
                 <div class="layui-item layui-col-xs12 form-table-container" >
-                    <table id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
-                        <thead>
-                        <tr>
-                            <th class="hide"></th>
-                            <th width="25%">委托方</th>
-                            <th width="25%">联系人姓名</th>
-                            <th width="25%">联系方式1</th>
-                            <th width="25%">联系方式2</th>
-                        </tr>
-                        </thead>
-                        <tbody id="workClientLinkmanList">
-                        <c:forEach items="${sealApplyForInfo.projectRecords.workClientLinkmanList}" var="info" varStatus="index">
+                    <div class="layui-item nav-btns">
+                        <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>
+                    </div>
+                    <div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+                        <table id="contentTable1" class="table table-bordered table-condensed no-bottom-margin details">
+                            <thead>
                             <tr>
-                                <td >
-                                        ${info.clientId.name}
-                                </td>
-                                <td>
-                                        ${info.name}
-                                </td>
-                                <td>
-                                        ${info.linkPhone}
-                                </td>
-                                <td>
-                                        ${info.linkMobile}
-                                </td>
+                                <th class="hide"></th>
+                                <th >盖章材料名称</th>
+                                <th >份数</th>
+                                <th >主要内容简述</th>
+                                <th >经办人</th>
+                                <th >备注</th>
                             </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
+                            </thead>
+                            <tbody id="workConstructionLinkmanList">
+                            <c:forEach items="${sealMaterialInfos}" var="info" varStatus="index">
+                                <tr>
+                                    <td>
+                                            ${info.sealMaterialName}
+                                    </td>
+                                    <td>
+                                            ${info.amount}
+                                    </td>
+                                    <td>
+                                            ${info.mainContents}
+                                    </td>
+                                    <td>
+                                            ${info.agent.name}
+                                    </td>
+                                    <td>
+                                            ${info.sealMaterialImportRemarks}
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
                 </div>
             </div>
 
-            <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 id="contentTable1" class="table table-bordered table-condensed no-bottom-margin details">
-                        <thead>
-                        <tr>
-                            <th class="hide"></th>
-                            <th width="25%">施工方单位名称</th>
-                            <th width="25%">联系人姓名</th>
-                            <th width="25%">联系方式1</th>
-                            <th width="25%">联系方式2</th>
-                        </tr>
-                        </thead>
-                        <tbody id="workConstructionLinkmanList">
-                        <c:forEach items="${sealApplyForInfo.projectRecords.workConstructionLinkmanList}" var="info" varStatus="index">
-                            <tr>
-                                <td >
-                                        ${info.clientId.name}
-                                </td>
-                                <td>
-                                        ${info.name}
-                                </td>
-                                <td>
-                                        ${info.linkPhone}
-                                </td>
-                                <td>
-                                        ${info.linkMobile}
-                                </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div></div>
-
 
 
 

+ 10 - 253
src/main/webapp/webpage/modules/sealApplyFor/sealApplyForForm.jsp

@@ -51,11 +51,11 @@
                 if(i==2){
                     $("#inputForm").attr("action","${ctx}/sealApplyFor/sealApplyFor/tstore");
                 }else if(i==1){
-                    /*var projectProperties=$("#projectProperties").val();
-                    if(projectProperties==''){
-                        parent.layer.msg("投资性质未选择!", {icon: 5});
+                    var size = $("#sealMaterialInfoList tr").length;
+                    if(size <= 1){
+                        parent.layer.msg("盖章文件至少存在一条!", {icon: 5});
                         return false;
-                    }*/
+                    }
                 }
                 $("#inputForm").submit();
                 return true;
@@ -73,7 +73,6 @@
                     ,layer = layui.layer
                     ,$ = layui.jquery;
             });
-            var radioVal ;
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
@@ -89,9 +88,6 @@
                     }
                 }
             });
-            if(${falg eq 'true'}){
-                addRow1('#sealMaterialInfoList', sealMaterialInfoListRowIdx, sealMaterialInfoListTpl);
-            }
         });
 
         function setValue(obj){
@@ -104,8 +100,6 @@
 
         function genRow(data) {
             for (var i = 0; i < data.length; i++) {
-                alert(data[i])
-                console.log(data[i])
                 addRow1('#sealMaterialInfoList', sealMaterialInfoListRowIdx, sealMaterialInfoListTpl, data[i])
             }
         }
@@ -169,6 +163,9 @@
                 $("#projectFlag").val("");
             }
         }
+        function num(obj){
+            obj.value = obj.value.replace(/[^\d]/g,""); //清除"数字"以外的字符
+        }
     </script>
 </head>
 <body>
@@ -196,37 +193,12 @@
                             <input id="projectReportDataNumber" htmlEscape="false"  readonly="true" class="form-control layui-input" style="background-color: #f1f1f1" value="${sealApplyForInfo.projectRecords.projectReportNumber}"/>
                         </div>
                     </div>
-<%--                    <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                        <label class="layui-form-label">项目编号:</label>--%>
-<%--                        <div class="layui-input-block">--%>
-<%--                            <input id="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input" style="background-color: #f1f1f1" value="${sealApplyForInfo.projectRecords.projectId}"/>--%>
-<%--                        </div>--%>
-<%--                    </div>--%>
                     <div class="layui-item layui-col-sm6 lw6">
                         <label class="layui-form-label">项目所在地:</label>
                         <div class="layui-input-block">
                             <input id="area" htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.province}-${sealApplyForInfo.projectRecords.city}-${sealApplyForInfo.projectRecords.county}"/>
                         </div>
                     </div>
-<%--                    <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                        <label class="layui-form-label">投资性质:</label>--%>
-<%--                        <div class="layui-input-block">--%>
-<%--                            <c:if test="${sealApplyForInfo.projectRecords.projectProperties==null}">--%>
-<%--                                <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input"/>--%>
-<%--                            </c:if>--%>
-<%--                            <c:forEach  items="${fns:getMainDictList('project_properties')}" var="v">--%>
-<%--                                <c:if test="${v.value==sealApplyForInfo.projectRecords.projectProperties}">--%>
-<%--                                    <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${v.label}"/>--%>
-<%--                                </c:if>--%>
-<%--                            </c:forEach>--%>
-<%--                        </div>--%>
-<%--                    </div>
-                    <div class="layui-item layui-col-sm6 lw6">
-                        <label class="layui-form-label">建设地点:</label>
-                        <div class="layui-input-block">
-                            <input htmlEscape="false" style="background-color: #f1f1f1"  readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.projectSite}"/>
-                        </div>
-                    </div>--%>
                     <div class="layui-item layui-col-sm6 lw6">
                         <label class="layui-form-label">创建人:</label>
                         <div class="layui-input-block">
@@ -239,38 +211,12 @@
                             <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.reviewerPerson}"/>
                         </div>
                     </div>
-<%--                    <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                        <label class="layui-form-label">所属部门:</label>--%>
-<%--                        <div class="layui-input-block">--%>
-<%--                            <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" id="officeName" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.officeName}"/>--%>
-<%--                        </div>--%>
-<%--                    </div>--%>
-                        <%--<div class="layui-item layui-col-sm6 lw6">
-                            <label class="layui-form-label double-line">项目归属部门:</label>
-                            <div class="layui-input-block">
-                                <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" id="belongingDepartmentName" class="form-control layui-input" value="${sealApplyForInfo.belongingDepartmentName}"/>
-                            </div>
-                        </div>--%>
                     <div class="layui-item layui-col-sm6 lw6">
                         <label class="layui-form-label">项目负责人:</label>
                         <div class="layui-input-block">
                             <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.projectMasterName}"/>
                         </div>
                     </div>
-                        <%--<div class="layui-item layui-col-sm6 lw6">
-                            <label class="layui-form-label">工程类型:</label>
-                            <div class="layui-input-block">
-                                <form:select path="engineeringType" disabled="true" style="background-color: #f1f1f1"  class="form-control simple-select">
-                                    <form:options items="${engineeringInfo}" itemLabel="engineeringName" itemValue="id" htmlEscape="false"/>
-                                </form:select>
-                            </div>
-                        </div>--%>
-                        <%--<div class="layui-item layui-col-sm6 lw6">
-                            <label class="layui-form-label double-line">送审规模(万元):</label>
-                            <div class="layui-input-block">
-                                <form:input path="submitScale" readonly="true" style="background-color: #f1f1f1" id="submitScale" maxlength="12" htmlEscape="false" placeholder="请输入送审规模" class="form-control layui-input number"/>
-                            </div>
-                        </div>--%>
                     <div class="layui-item layui-col-sm6 lw6">
                         <label class="layui-form-label double-line">工作开始日期:</label>
                         <div class="layui-input-block">
@@ -283,40 +229,9 @@
                             <input class="laydate-icondate form-control layui-input layer-date "  style="background-color: #f1f1f1" readonly="true" id="endingDate" name="endingDate" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.endingDate}" pattern="yyyy-MM-dd"/>">
                         </div>
                     </div>
-<%--                    <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                        <label class="layui-form-label">创建日期:</label>--%>
-<%--                        <div class="layui-input-block">--%>
-<%--                            <input htmlEscape="false"  style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.createDate}" pattern="yyyy-MM-dd"/>"/>--%>
-<%--                        </div>--%>
-<%--                    </div>--%>
-<%--                    <div class="layui-item layui-col-sm6 lw7">--%>
-<%--                        <label class="layui-form-label">项目类别:</label>--%>
-<%--                        <div class="layui-input-block">--%>
-<%--                            <input htmlEscape="false" readonly="true"  style="background-color: #f1f1f1" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.attachmentProjectSort}"/>--%>
-<%--                        </div>--%>
-<%--                    </div>--%>
-<%--                    <div class="layui-item layui-col-sm6 lw7">--%>
-<%--                        <label class="layui-form-label">盖章数量:</label>--%>
-<%--                        <div class="layui-input-block">--%>
-<%--                            <input htmlEscape="false" readonly="true"  style="background-color: #f1f1f1" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.contractsNum}"/>--%>
-<%--                        </div>--%>
-<%--                    </div>--%>
-<%--                    <div class="layui-item layui-col-sm12 lw6 with-textarea">--%>
-<%--                        <label class="layui-form-label">工程概况:</label>--%>
-<%--                        <div class="layui-input-block">--%>
-<%--                            <textarea htmlEscape="false" rows="4" readonly="true"  style="background-color: #f1f1f1" maxlength="1000" class="form-control" >${sealApplyForInfo.projectRecords.projectDesc}</textarea>--%>
-<%--                        </div>--%>
-<%--                    </div>--%>
-<%--                    <div class="layui-item layui-col-sm12 lw6 with-textarea">--%>
-<%--                        <label class="layui-form-label">备注:</label>--%>
-<%--                        <div class="layui-input-block">--%>
-<%--                            <textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${sealApplyForInfo.projectRecords.remarks}</textarea>--%>
-<%--                        </div>--%>
-<%--                    </div>--%>
                 </div>
             </div>
 
-        <div   class="form-group layui-row first">
         <div class="form-group layui-row first">
                 <div class="form-group-label"><h2>盖章信息</h2></div>
                 <div class="layui-item layui-col-sm6">
@@ -342,8 +257,8 @@
                         <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="10%"><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>
                                 <th width="10%">备注</th>
@@ -386,174 +301,16 @@
                                 var data = ${fns:toJson(sealMaterialInfo.sealMaterialInfoList)};
                                 for (var i=0; i<data.length; i++){
                                     addRow1('#sealMaterialInfoList', sealMaterialInfoListRowIdx, sealMaterialInfoListTpl, data[i])
-                                    sealMaterialInfoListRowIdx = sealMaterialInfoListRowIdx + 1;
                                 }
                             });
                         </script>
                     </div>
                 </div>
 
-<%--            <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 id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">--%>
-<%--                        <thead>--%>
-<%--                        <tr>--%>
-<%--                            <th class="hide"></th>--%>
-<%--                            <th width="25%">委托方</th>--%>
-<%--                            <th width="25%">联系人姓名</th>--%>
-<%--                            <th width="25%">联系方式1</th>--%>
-<%--                            <th width="25%">联系方式2</th>--%>
-<%--                        </tr>--%>
-<%--                        </thead>--%>
-<%--                        <tbody id="workClientLinkmanList">--%>
-<%--                        <c:forEach items="${sealApplyForInfo.projectRecords.workClientLinkmanList}" var="info" varStatus="index">--%>
-<%--                            <tr>--%>
-<%--                                <td >--%>
-<%--                                        ${info.clientId.name}--%>
-<%--                                </td>--%>
-<%--                                <td>--%>
-<%--                                        ${info.name}--%>
-<%--                                </td>--%>
-<%--                                <td>--%>
-<%--                                        ${info.linkPhone}--%>
-<%--                                </td>--%>
-<%--                                <td>--%>
-<%--                                        ${info.linkMobile}--%>
-<%--                                </td>--%>
-<%--                            </tr>--%>
-<%--                        </c:forEach>--%>
-<%--                        </tbody>--%>
-<%--                    </table>--%>
-<%--                </div>--%>
-<%--            </div>--%>
-
-<%--            <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 id="contentTable1" class="table table-bordered table-condensed no-bottom-margin details">--%>
-<%--                        <thead>--%>
-<%--                        <tr>--%>
-<%--                            <th class="hide"></th>--%>
-<%--                            <th width="25%">施工方单位名称</th>--%>
-<%--                            <th width="25%">联系人姓名</th>--%>
-<%--                            <th width="25%">联系方式1</th>--%>
-<%--                            <th width="25%">联系方式2</th>--%>
-<%--                        </tr>--%>
-<%--                        </thead>--%>
-<%--                        <tbody id="workConstructionLinkmanList">--%>
-<%--                        <c:forEach items="${sealApplyForInfo.projectRecords.workConstructionLinkmanList}" var="info" varStatus="index">--%>
-<%--                            <tr>--%>
-<%--                                <td >--%>
-<%--                                        ${info.clientId.name}--%>
-<%--                                </td>--%>
-<%--                                <td>--%>
-<%--                                        ${info.name}--%>
-<%--                                </td>--%>
-<%--                                <td>--%>
-<%--                                        ${info.linkPhone}--%>
-<%--                                </td>--%>
-<%--                                <td>--%>
-<%--                                        ${info.linkMobile}--%>
-<%--                                </td>--%>
-<%--                            </tr>--%>
-<%--                        </c:forEach>--%>
-<%--                        </tbody>--%>
-<%--                    </table>--%>
-<%--                </div>--%>
-<%--            </div></div>--%>
-
-
-
-
-
+        </div>
             <div class="form-group layui-row page-end"></div>
         </form:form>
     </div>
-    </div>
 </div>
-<script>
-    function openBill3(title,url,width,height,target,formId){
-
-        var frameIndex = parent.layer.getFrameIndex(window.name);
-        var urls = url+"&index="+frameIndex;
-        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-            width='auto';
-            height='auto';
-        }else{//如果是PC端,根据用户设置的width和height显示。
-
-        }
-        top.layer.open({
-            type: 2,
-            area: [width, height],
-            title: title,
-            skin:"two-btns",
-            maxmin: false, //开启最大化最小化按钮
-            content: urls ,
-            btn: ['确定','关闭'],
-            yes: function(index, layero){
-                var body = top.layer.getChildFrame('body', index);
-                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-                var inputForm = body.find('#inputForm');
-                var top_iframe;
-                if(target){
-                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
-                }else{
-                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
-                }
-                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
-                inputForm.attr("action","${ctx}/ruralProject/ruralProjectRecords/linkManSave");//表单提交成功后,从服务器返回的url在当前tab中展示
-                var $document = iframeWin.contentWindow.document;
-
-                formSubmit3($document,formId,index);
-            },
-            cancel: function(index){
-            }
-        });
-
-
-        function formSubmit3($document,inputForm,index){
-            var validateForm = $($document.getElementById(inputForm)).validate({
-                submitHandler: function(form){
-                    loading('正在提交,请稍等...');
-                    form.submit();
-                },
-                errorContainer: "#messageBox",
-                errorPlacement: function(error, element) {
-                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-                        error.appendTo(element.parent().parent());
-                    } else {
-                        error.insertAfter(element);
-                    }
-                }
-            });
-            if(validateForm.form()){
-                $($document.getElementById(inputForm)).ajaxSubmit({
-                    success:function(data) {
-                        var d = data;
-                        if(d.msg == "false"){
-                            parent.layer.msg("保存客户信息异常!",{icon:2});
-                            return false;
-                        }
-
-                        addRow("#workConstructionLinkmanList",workConstructionLinkmanRowIdx,workConstructionLinkmanTpl);
-                        workConstructionLinkmanRowIdx=workConstructionLinkmanRowIdx+1;
-                        var row = workClientLinkmanRowIdx;
-
-                        $("#"+"workConstructionLinkmanList"+row+"_id").val(d.id);
-                        $("#"+"workConstructionLinkmanList"+row+"_clientId_id").val(d.clientId);
-                        $("#"+"workConstructionLinkmanList"+row+"_clientName").val(d.clientName);
-                        $("#"+"workConstructionLinkmanList"+row+"_name").val(d.linkName);
-                        $("#"+"workConstructionLinkmanList"+row+"_linkMobile").val(d.linkMobile);
-                        $("#"+"workConstructionLinkmanList"+row+"_linkPhone").val(d.linkPhone);
-                        parent.layer.msg(d.str,{icon:1});
-                        top.layer.close(index)
-                    }
-                });
-            }
-        }
-    }
-</script>
 </body>
 </html>

+ 191 - 291
src/main/webapp/webpage/modules/sealApplyFor/sealApplyForModify.jsp

@@ -19,7 +19,7 @@
             background: red;
         }
         td input{
-            margin-left:-10px !important;
+            margin-left:0px !important;
             height: 42px !important;
         }
         .disables {
@@ -29,12 +29,12 @@
             pointer-events: all;
         }
         .forbidden{
-             background-color:#c2c2c2;
-         }
+            background-color:#c2c2c2;
+        }
 
         .notForbidden{
-             background-color:#3ca2e0;
-         }
+            background-color:#3ca2e0;
+        }
         .spanzj{
             color:red;
             font-size: 12px;
@@ -47,8 +47,11 @@
         var clientCount = 0;
         function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
-
-
+                var size = $("#sealMaterialInfoList tr").length;
+                if(size <= 1){
+                    parent.layer.msg("盖章文件至少存在一条!", {icon: 5});
+                    return false;
+                }
                 $("#inputForm").submit();
                 return true;
             }else{
@@ -90,6 +93,76 @@
                 $("#upTable").load(location.href+"?projectId="+obj + " #upTable");
             }
         }
+
+        function genRow(data) {
+            for (var i = 0; i < data.length; i++) {
+                addRow1('#sealMaterialInfoList', sealMaterialInfoListRowIdx, sealMaterialInfoListTpl, data[i])
+            }
+        }
+
+        function addRow1(list, idx, tpl, row){
+            var idx1 = $("#sealMaterialInfoList tr").length;
+            if(list == '#sealMaterialInfoList'){
+                bornTemplete1(list, idx, tpl, row, idx1);
+                sealMaterialInfoListRowIdx+=1;
+            }
+        }
+
+        function bornTemplete1(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+        }
+
+        function delRow(obj, prefix) {
+            var id = $(prefix + "_invoiceId");
+            var delFlag = $(prefix + "_delFlag");
+            if (id.val() == "") {
+                $(obj).parent().parent().remove();
+            } else if (delFlag.val() == "0") {
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            } else if (delFlag.val() == "1") {
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+            var length=$("#projectMaterialStorageList tr").length;
+            var count=length;
+            for (var i=1;i<=length;i++) {
+                var delFlag = $("#projectMaterialStorageList").find("tr").eq(i-1).find("input").eq(1).val();
+                if (delFlag == "1") {
+                    count =count-1;
+                }
+            }
+            if(count==1){
+                $("#chargeType").val("2")
+                layui.form.render();
+            }else if (count>1){
+                $("#chargeType").val("1")
+                layui.form.render();
+            }else if(count == 0){
+                $("#projectFlag").val("");
+            }
+        }
+
+        function num(obj){
+            obj.value = obj.value.replace(/[^\d]/g,""); //清除"数字"以外的字符
+        }
     </script>
 </head>
 <body>
@@ -106,6 +179,62 @@
             <form:hidden path="act.procDefId"/>
             <form:hidden id="flag" path="act.flag"/>
 
+            <div  id="upTable" class="form-group layui-row first">
+                <div class="form-group layui-row first">
+                    <div class="form-group-label"><h2>项目基础信息</h2></div>
+                    <div class="layui-item layui-col-sm6 lw6">
+                        <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+                        <div class="layui-input-block with-icon">
+                            <sys:gridselectcallproject url="${ctx}/sealApplyFor/sealApplyFor/selectprojectOnList" id="projectRecords" name="projectRecords.id"  value="${sealApplyForInfo.projectRecords.id}"  title="选择所属项目" labelName="projectRecords.projectName" cssStyle="background-color:#fff"
+                                                       labelValue="${sealApplyForInfo.projectRecords.projectName}" cssClass="form-control required layui-input"  fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallproject>
+                        </div>
+                    </div>
+
+                    <div class="layui-item layui-col-sm6 lw6">
+                        <label class="layui-form-label">报告号:</label>
+                        <div class="layui-input-block">
+                            <input id="projectReportDataNumber" htmlEscape="false"  readonly="true" class="form-control layui-input" style="background-color: #f1f1f1" value="${sealApplyForInfo.projectRecords.projectReportNumber}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw6">
+                        <label class="layui-form-label">项目所在地:</label>
+                        <div class="layui-input-block">
+                            <input id="area" htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.province}-${sealApplyForInfo.projectRecords.city}-${sealApplyForInfo.projectRecords.county}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw6">
+                        <label class="layui-form-label">创建人:</label>
+                        <div class="layui-input-block">
+                            <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.createBy.name}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw6">
+                        <label class="layui-form-label">审核人:</label>
+                        <div class="layui-input-block">
+                            <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.reviewerPerson}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw6">
+                        <label class="layui-form-label">项目负责人:</label>
+                        <div class="layui-input-block">
+                            <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.projectMasterName}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw6">
+                        <label class="layui-form-label double-line">工作开始日期:</label>
+                        <div class="layui-input-block">
+                            <input class="laydate-icondate form-control layui-input layer-date ash"  style="background-color: #f1f1f1" readonly="true" id="startDate" name="startDate" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.startDate}" pattern="yyyy-MM-dd"/>">
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw6">
+                        <label class="layui-form-label double-line">工作结束日期:</label>
+                        <div class="layui-input-block">
+                            <input class="laydate-icondate form-control layui-input layer-date "  style="background-color: #f1f1f1" readonly="true" id="endingDate" name="endingDate" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.endingDate}" pattern="yyyy-MM-dd"/>">
+                        </div>
+                    </div>
+                </div>
+            </div>
+
 
             <div class="form-group layui-row first">
                 <div class="form-group-label"><h2>盖章信息</h2></div>
@@ -122,213 +251,67 @@
                         <form:textarea path="remarks" placeholder="请输入盖章说明信息" id="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
                     </div>
                 </div>
-            </div>
-
-            <div id="upTable">
-            <div class="form-group layui-row first">
-                <div class="form-group-label"><h2>项目基础信息</h2></div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
-                    <div class="layui-input-block with-icon">
-                        <sys:gridselectcallproject url="${ctx}/sealApplyFor/sealApplyFor/selectprojectOnList" id="projectRecords" name="projectRecords.id"  value="${sealApplyForInfo.projectRecords.id}"  title="选择所属项目" labelName="projectRecords.projectName" cssStyle="background-color:#fff"
-                                                    labelValue="${sealApplyForInfo.projectRecords.projectName}" cssClass="form-control required layui-input"  fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallproject>
-                    </div>
-                </div>
 
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">报告号:</label>
-                    <div class="layui-input-block">
-                        <input id="projectReportDataNumber" htmlEscape="false"  readonly="true" class="form-control layui-input" style="background-color: #f1f1f1" value="${sealApplyForInfo.projectRecords.projectReportNumber}"/>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">项目编号:</label>
-                    <div class="layui-input-block">
-                        <input id="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input" style="background-color: #f1f1f1" value="${sealApplyForInfo.projectRecords.projectId}"/>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">项目所在地:</label>
-                    <div class="layui-input-block">
-                        <input id="area" htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.province}-${sealApplyForInfo.projectRecords.city}-${sealApplyForInfo.projectRecords.county}"/>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">投资性质:</label>
-                    <div class="layui-input-block">
-                        <c:if test="${sealApplyForInfo.projectRecords.projectProperties==null}">
-                            <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input"/>
-                        </c:if>
-                        <c:forEach  items="${fns:getMainDictList('project_properties')}" var="v">
-                            <c:if test="${v.value==sealApplyForInfo.projectRecords.projectProperties}">
-                                <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${v.label}"/>
-                            </c:if>
-                        </c:forEach>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">建设地点:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" style="background-color: #f1f1f1"  readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.projectSite}"/>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">创建人:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.createBy.name}"/>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">审核人:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.reviewerPerson}"/>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">所属部门:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" id="officeName" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.officeName}"/>
-                    </div>
-                </div>
-                <%--<div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label double-line">项目归属部门:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" id="belongingDepartmentName" class="form-control layui-input" value="${sealApplyForInfo.belongingDepartmentName}"/>
-                    </div>
-                </div>--%>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">项目负责人:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.projectMasterName}"/>
-                    </div>
-                </div>
-                <%--<div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">工程类型:</label>
-                    <div class="layui-input-block">
-                        <form:select path="engineeringType" disabled="true" style="background-color: #f1f1f1"  class="form-control simple-select">
-                            <form:options items="${engineeringInfo}" itemLabel="engineeringName" itemValue="id" htmlEscape="false"/>
-                        </form:select>
-                    </div>
-                </div>--%>
-                <%--<div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label double-line">送审规模(万元):</label>
-                    <div class="layui-input-block">
-                        <form:input path="submitScale" readonly="true" style="background-color: #f1f1f1" id="submitScale" maxlength="12" htmlEscape="false" placeholder="请输入送审规模" class="form-control layui-input number"/>
-                    </div>
-                </div>--%>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label double-line">工作开始日期:</label>
-                    <div class="layui-input-block">
-                        <input class="laydate-icondate form-control layui-input layer-date ash"  style="background-color: #f1f1f1" readonly="true" id="startDate" name="startDate" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.startDate}" pattern="yyyy-MM-dd"/>">
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label double-line">工作结束日期:</label>
-                    <div class="layui-input-block">
-                        <input class="laydate-icondate form-control layui-input layer-date "  style="background-color: #f1f1f1" readonly="true" id="endingDate" name="endingDate" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.endingDate}" pattern="yyyy-MM-dd"/>">
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">创建日期:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false"  style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.createDate}" pattern="yyyy-MM-dd"/>"/>
+                <div class="form-group layui-row">
+                    <div class="layui-item nav-btns">
+                        <a class="nav-btn nav-btn-add" onclick="addRow1('#sealMaterialInfoList', sealMaterialInfoListRowIdx, sealMaterialInfoListTpl);sealMaterialInfoListRowIdx = sealMaterialInfoListRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
+                        <table:importExcelA url="${ctx}/seal/sealMaterial/import"></table:importExcelA><!-- 导入按钮 -->
                     </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">项目类别:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" readonly="true"  style="background-color: #f1f1f1" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.attachmentProjectSort}"/>
-                    </div>
-                </div>
-                <%--<div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">盖章数量:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" readonly="true"  style="background-color: #f1f1f1" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.contractsNum}"/>
-                    </div>
-                </div>--%>
-                <div class="layui-item layui-col-sm12 lw6 with-textarea">
-                    <label class="layui-form-label">工程概况:</label>
-                    <div class="layui-input-block">
-                        <textarea htmlEscape="false" rows="4" readonly="true"  style="background-color: #f1f1f1" maxlength="1000" class="form-control" >${sealApplyForInfo.projectRecords.projectDesc}</textarea>
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm12 lw6 with-textarea">
-                    <label class="layui-form-label">备注:</label>
-                    <div class="layui-input-block">
-                        <textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${sealApplyForInfo.projectRecords.remarks}</textarea>
-                    </div>
-                </div>
-            </div>
-
-            <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 id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
-                        <thead>
-                        <tr>
-                            <th class="hide"></th>
-                            <th width="25%">委托方</th>
-                            <th width="25%">联系人姓名</th>
-                            <th width="25%">联系方式1</th>
-                            <th width="25%">联系方式2</th>
-                        </tr>
-                        </thead>
-                        <tbody id="workClientLinkmanList">
-                        <c:forEach items="${sealApplyForInfo.projectRecords.workClientLinkmanList}" var="info" varStatus="index">
+                    <div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+                        <table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+                            <thead>
                             <tr>
-                                <td >
-                                        ${info.clientId.name}
-                                </td>
-                                <td>
-                                        ${info.name}
-                                </td>
-                                <td>
-                                        ${info.linkPhone}
-                                </td>
-                                <td>
-                                        ${info.linkMobile}
-                                </td>
+                                <th width="20%"><font color="red" >*</font>盖章材料名称</th>
+                                <th width="10%"><font color="red">*</font>份数</th>
+                                <th width="40%">主要内容简述</th>
+                                <th width="10%">经办人</th>
+                                <th width="10%">备注</th>
+                                <th width="10%">操作</th>
                             </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
+                            </thead>
+                            <tbody id="sealMaterialInfoList">
+                            </tbody>
+                        </table>
+                        <script type="text/template" id="sealMaterialInfoListTpl">//<!--
+                    <tr id="sealMaterialInfoList{{idx}}">
+                      <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 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 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 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 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 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" 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,"");
+                            $(document).ready(function() {
+                                var data = ${fns:toJson(sealMaterialInfo.sealMaterialInfoList)};
+                                for (var i=0; i<data.length; i++){
+                                    addRow1('#sealMaterialInfoList', sealMaterialInfoListRowIdx, sealMaterialInfoListTpl, data[i])
+                                }
+                            });
+                        </script>
+                    </div>
                 </div>
-            </div>
 
-            <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 id="contentTable1" class="table table-bordered table-condensed no-bottom-margin details">
-                        <thead>
-                        <tr>
-                            <th class="hide"></th>
-                            <th width="25%">施工方单位名称</th>
-                            <th width="25%">联系人姓名</th>
-                            <th width="25%">联系方式1</th>
-                            <th width="25%">联系方式2</th>
-                        </tr>
-                        </thead>
-                        <tbody id="workConstructionLinkmanList">
-                        <c:forEach items="${sealApplyForInfo.projectRecords.workConstructionLinkmanList}" var="info" varStatus="index">
-                            <tr>
-                                <td >
-                                        ${info.clientId.name}
-                                </td>
-                                <td>
-                                        ${info.name}
-                                </td>
-                                <td>
-                                        ${info.linkPhone}
-                                </td>
-                                <td>
-                                        ${info.linkMobile}
-                                </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div></div>
+            </div>
 
 
 
@@ -345,88 +328,5 @@
         </div>
     </div>
 </div>
-<script>
-    function openBill3(title,url,width,height,target,formId){
-
-        var frameIndex = parent.layer.getFrameIndex(window.name);
-        var urls = url+"&index="+frameIndex;
-        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-            width='auto';
-            height='auto';
-        }else{//如果是PC端,根据用户设置的width和height显示。
-
-        }
-        top.layer.open({
-            type: 2,
-            area: [width, height],
-            title: title,
-            skin:"two-btns",
-            maxmin: false, //开启最大化最小化按钮
-            content: urls ,
-            btn: ['确定','关闭'],
-            yes: function(index, layero){
-                var body = top.layer.getChildFrame('body', index);
-                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-                var inputForm = body.find('#inputForm');
-                var top_iframe;
-                if(target){
-                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
-                }else{
-                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
-                }
-                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
-                inputForm.attr("action","${ctx}/ruralProject/ruralProjectRecords/linkManSave");//表单提交成功后,从服务器返回的url在当前tab中展示
-                var $document = iframeWin.contentWindow.document;
-
-                formSubmit3($document,formId,index);
-            },
-            cancel: function(index){
-            }
-        });
-
-
-        function formSubmit3($document,inputForm,index){
-            var validateForm = $($document.getElementById(inputForm)).validate({
-                submitHandler: function(form){
-                    loading('正在提交,请稍等...');
-                    form.submit();
-                },
-                errorContainer: "#messageBox",
-                errorPlacement: function(error, element) {
-                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-                        error.appendTo(element.parent().parent());
-                    } else {
-                        error.insertAfter(element);
-                    }
-                }
-            });
-            if(validateForm.form()){
-                $($document.getElementById(inputForm)).ajaxSubmit({
-                    success:function(data) {
-                        var d = data;
-                        if(d.msg == "false"){
-                            parent.layer.msg("保存客户信息异常!",{icon:2});
-                            return false;
-                        }
-
-                        addRow("#workConstructionLinkmanList",workConstructionLinkmanRowIdx,workConstructionLinkmanTpl);
-                        workConstructionLinkmanRowIdx=workConstructionLinkmanRowIdx+1;
-                        var row = workClientLinkmanRowIdx;
-
-                        $("#"+"workConstructionLinkmanList"+row+"_id").val(d.id);
-                        $("#"+"workConstructionLinkmanList"+row+"_clientId_id").val(d.clientId);
-                        $("#"+"workConstructionLinkmanList"+row+"_clientName").val(d.clientName);
-                        $("#"+"workConstructionLinkmanList"+row+"_name").val(d.linkName);
-                        $("#"+"workConstructionLinkmanList"+row+"_linkMobile").val(d.linkMobile);
-                        $("#"+"workConstructionLinkmanList"+row+"_linkPhone").val(d.linkPhone);
-                        parent.layer.msg(d.str,{icon:1});
-                        top.layer.close(index)
-                    }
-                });
-            }
-        }
-    }
-</script>
 </body>
 </html>

+ 58 - 178
src/main/webapp/webpage/modules/sealApplyFor/sealApplyForView.jsp

@@ -83,24 +83,6 @@
             <input type="hidden" id="flagFile" value="">
 
             <div class="form-group layui-row first">
-                <div class="form-group-label"><h2>盖章信息</h2></div>
-                <div class="layui-item layui-col-sm6">
-                    <label class="layui-form-label"><span class="require-item">*</span>单位:</label>
-                    <div class="layui-input-block">
-                        <input type="radio" name="sealCompany" value="0" title="东兴" disabled <c:if test="${sealApplyForInfo.sealCompany=='0'}">checked</c:if>>
-                        <input type="radio" name="sealCompany" value="1" title="赣能" disabled <c:if test="${sealApplyForInfo.sealCompany=='1'}">checked</c:if> >
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm6 lw6 with-textarea">
-                    <label class="layui-form-label">盖章说明:</label>
-                    <div class="layui-input-block">
-                        <textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${sealApplyForInfo.remarks}</textarea>
-                    </div>
-                </div>
-            </div>
-
-            <div id="upTable">
-            <div class="form-group layui-row first">
                 <div class="form-group-label"><h2>项目基础信息</h2></div>
 
                 <div class="layui-item layui-col-sm6 lw6">
@@ -116,37 +98,12 @@
                         <input id="projectReportDataNumber" htmlEscape="false"  readonly="true" class="form-control layui-input" style="background-color: #f1f1f1" value="${sealApplyForInfo.projectRecords.projectReportNumber}"/>
                     </div>
                 </div>
-<%--                <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                    <label class="layui-form-label">项目编号:</label>--%>
-<%--                    <div class="layui-input-block">--%>
-<%--                        <input id="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input" style="background-color: #f1f1f1" value="${sealApplyForInfo.projectRecords.projectId}"/>--%>
-<%--                    </div>--%>
-<%--                </div>--%>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label">项目所在地:</label>
                     <div class="layui-input-block">
                         <input id="area" htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.province}-${sealApplyForInfo.projectRecords.city}-${sealApplyForInfo.projectRecords.county}"/>
                     </div>
                 </div>
-<%--                <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                    <label class="layui-form-label">投资性质:</label>--%>
-<%--                    <div class="layui-input-block">--%>
-<%--                        <c:if test="${sealApplyForInfo.projectRecords.projectProperties==null}">--%>
-<%--                            <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input"/>--%>
-<%--                        </c:if>--%>
-<%--                        <c:forEach  items="${fns:getMainDictList('project_properties')}" var="v">--%>
-<%--                            <c:if test="${v.value==sealApplyForInfo.projectRecords.projectProperties}">--%>
-<%--                                <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${v.label}"/>--%>
-<%--                            </c:if>--%>
-<%--                        </c:forEach>--%>
-<%--                    </div>--%>
-<%--                </div>--%>
-<%--                <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                    <label class="layui-form-label">建设地点:</label>--%>
-<%--                    <div class="layui-input-block">--%>
-<%--                        <input htmlEscape="false" style="background-color: #f1f1f1"  readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.projectSite}"/>--%>
-<%--                    </div>--%>
-<%--                </div>--%>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label">创建人:</label>
                     <div class="layui-input-block">
@@ -159,12 +116,6 @@
                         <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.reviewerPerson}"/>
                     </div>
                 </div>
-<%--                <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                    <label class="layui-form-label">所属部门:</label>--%>
-<%--                    <div class="layui-input-block">--%>
-<%--                        <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" id="officeName" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.officeName}"/>--%>
-<%--                    </div>--%>
-<%--                </div>--%>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label">项目负责人:</label>
                     <div class="layui-input-block">
@@ -183,146 +134,75 @@
                         <input class="laydate-icondate form-control layui-input layer-date "  style="background-color: #f1f1f1" readonly="true" id="endingDate" name="endingDate" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.endingDate}" pattern="yyyy-MM-dd"/>">
                     </div>
                 </div>
-<%--                <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                    <label class="layui-form-label">创建日期:</label>--%>
-<%--                    <div class="layui-input-block">--%>
-<%--                        <input htmlEscape="false"  style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${sealApplyForInfo.projectRecords.createDate}" pattern="yyyy-MM-dd"/>"/>--%>
-<%--                    </div>--%>
-<%--                </div>--%>
-<%--                <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                    <label class="layui-form-label">项目类别:</label>--%>
-<%--                    <div class="layui-input-block">--%>
-<%--                        <input htmlEscape="false" readonly="true"  style="background-color: #f1f1f1" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.attachmentProjectSort}"/>--%>
-<%--                    </div>--%>
-<%--                </div>--%>
-<%--                <div class="layui-item layui-col-sm6 lw6">--%>
-<%--                    <label class="layui-form-label">盖章数量:</label>--%>
-<%--                    <div class="layui-input-block">--%>
-<%--                        <input htmlEscape="false" readonly="true"  style="background-color: #f1f1f1" class="form-control layui-input" value="${sealApplyForInfo.projectRecords.contractsNum}"/>--%>
-<%--                    </div>--%>
-<%--                </div>--%>
-<%--                <div class="layui-item layui-col-sm12 lw6 with-textarea">--%>
-<%--                    <label class="layui-form-label">工程概况:</label>--%>
-<%--                    <div class="layui-input-block">--%>
-<%--                        <textarea htmlEscape="false" rows="4" readonly="true"  style="background-color: #f1f1f1" maxlength="1000" class="form-control" >${sealApplyForInfo.projectRecords.projectDesc}</textarea>--%>
-<%--                    </div>--%>
-<%--                </div>--%>
-<%--                <div class="layui-item layui-col-sm12 lw6 with-textarea">--%>
-<%--                    <label class="layui-form-label">备注:</label>--%>
-<%--                    <div class="layui-input-block">--%>
-<%--                        <textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${sealApplyForInfo.projectRecords.remarks}</textarea>--%>
-<%--                    </div>--%>
-<%--                </div>--%>
             </div>
 
-<%--            <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 id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">--%>
-<%--                        <thead>--%>
-<%--                        <tr>--%>
-<%--                            <th class="hide"></th>--%>
-<%--                            <th width="25%">委托方</th>--%>
-<%--                            <th width="25%">联系人姓名</th>--%>
-<%--                            <th width="25%">联系方式1</th>--%>
-<%--                            <th width="25%">联系方式2</th>--%>
-<%--                        </tr>--%>
-<%--                        </thead>--%>
-<%--                        <tbody id="workClientLinkmanList">--%>
-<%--                        <c:forEach items="${sealApplyForInfo.projectRecords.workClientLinkmanList}" var="info" varStatus="index">--%>
-<%--                            <tr>--%>
-<%--                                <td >--%>
-<%--                                        ${info.clientId.name}--%>
-<%--                                </td>--%>
-<%--                                <td>--%>
-<%--                                        ${info.name}--%>
-<%--                                </td>--%>
-<%--                                <td>--%>
-<%--                                        ${info.linkPhone}--%>
-<%--                                </td>--%>
-<%--                                <td>--%>
-<%--                                        ${info.linkMobile}--%>
-<%--                                </td>--%>
-<%--                            </tr>--%>
-<%--                        </c:forEach>--%>
-<%--                        </tbody>--%>
-<%--                    </table>--%>
-<%--                </div>--%>
-<%--            </div>--%>
+            <div class="form-group layui-row first">
+                <div class="form-group-label"><h2>盖章信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>单位:</label>
+                    <div class="layui-input-block">
+                        <input type="radio" name="sealCompany" value="0" title="东兴" disabled <c:if test="${sealApplyForInfo.sealCompany=='0'}">checked</c:if>>
+                        <input type="radio" name="sealCompany" value="1" title="赣能" disabled <c:if test="${sealApplyForInfo.sealCompany=='1'}">checked</c:if> >
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw6 with-textarea">
+                    <label class="layui-form-label">盖章说明:</label>
+                    <div class="layui-input-block">
+                        <textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${sealApplyForInfo.remarks}</textarea>
+                    </div>
+                </div>
+            </div>
+
+
+
 
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>盖章材料信息列表</h2></div>
                 <div class="layui-item layui-col-xs12 form-table-container" >
-                    <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>
-                        </tr>
-                        </thead>
-                        <tbody id="workConstructionLinkmanList">
-                        <c:forEach items="${sealMaterialInfos}" var="info" varStatus="index">
+                    <div class="layui-item nav-btns">
+                        <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>
+                    </div>
+                    <div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+                        <table id="contentTable1" class="table table-bordered table-condensed no-bottom-margin details">
+                            <thead>
                             <tr>
-<%--                                <td >--%>
-<%--                                        ${info.projectName}--%>
-<%--                                </td>--%>
-<%--                                <td>--%>
-<%--                                        ${info.reportId}--%>
-<%--                                </td>--%>
-                                <td>
-                                        ${info.sealMaterialName}
-                                </td>
-                                <td>
-                                        ${info.amount}
-                                </td>
-                                <td>
-                                        ${info.mainContents}
-                                </td>
-                                <td>
-                                        ${info.area}
-                                </td>
-                                <td>
-                                        ${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>--%>
-
+                                <th class="hide"></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.sealMaterialName}
+                                    </td>
+                                    <td>
+                                            ${info.amount}
+                                    </td>
+                                    <td>
+                                            ${info.mainContents}
+                                    </td>
                                     <td>
                                         <fmt:formatDate value="${info.useSealTime}" pattern="yyyy-MM-dd"/>
-<%--                                        ${info.useSealTime}--%>
                                     </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
+                                    <td>
+                                            ${info.agent.name}
+                                    </td>
+                                    <td>
+                                            ${info.sealMaterialImportRemarks}
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
                 </div>
-            </div></div>
-
-
+            </div>