Selaa lähdekoodia

项目列表模块内容

user5 5 vuotta sitten
vanhempi
commit
f42e3874ce
26 muutettua tiedostoa jossa 2697 lisäystä ja 890 poistoa
  1. 2 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportDataDao.java
  2. 2 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectcontentinfoDao.java
  3. 29 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java
  4. 6 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectcontentinfoService.java
  5. 1 0
      src/main/java/com/jeeplus/modules/projectrecord/dao/ProjectRecordsDao.java
  6. 38 24
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsAlterService.java
  7. 27 17
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsService.java
  8. 12 0
      src/main/java/com/jeeplus/modules/projectreportnum/service/ProjectReportNumService.java
  9. 7 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectMessageDao.java
  10. 565 761
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java
  11. 101 39
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java
  12. 2 0
      src/main/java/com/jeeplus/modules/sys/dao/WorkattachmentDao.java
  13. 10 1
      src/main/java/com/jeeplus/modules/sys/entity/Workattachment.java
  14. 1 0
      src/main/java/com/jeeplus/modules/sys/web/WorkattachmentController.java
  15. 84 9
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  16. 6 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml
  17. 10 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml
  18. 12 0
      src/main/resources/mappings/modules/projectrecord/ProjectRecordsDao.xml
  19. 60 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml
  20. 26 2
      src/main/resources/mappings/modules/sys/WorkattachmentDao.xml
  21. 2 1
      src/main/webapp/static/bos/bosupload.js
  22. 390 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageAudit.jsp
  23. 736 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageModify.jsp
  24. 557 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageView.jsp
  25. 7 3
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp
  26. 4 33
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp

+ 2 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportDataDao.java

@@ -25,6 +25,8 @@ public interface ProjectReportDataDao extends CrudDao<ProjectReportData> {
 
     int updateFileStatus(ProjectReportData projectReportData);
 
+    int updateNumber(ProjectReportData projectReportData);
+
     List<ProjectReportData> findInvalidList(ProjectReportData projectReportData);
 
     List<ProjectReportData> findInfoList(ProjectReportData projectReportData);

+ 2 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectcontentinfoDao.java

@@ -47,4 +47,6 @@ public interface ProjectcontentinfoDao extends CrudDao<Projectcontentinfo> {
 	List<RuralProjectcontentinfo> findListByProjectOnRural(RuralProjectcontentinfo projectcontentinfo);
 
 	void insertOnRural(Projectcontentinfo projectcontentinfo);
+
+	void updateInfoId(Projectcontentinfo projectcontentinfo);
 }

+ 29 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java

@@ -131,6 +131,25 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 		}
 		return projectReportData;
 	}
+
+	public ProjectReportData getOnRural(String id) {
+		ProjectReportData projectReportData = super.get(id);
+		if (projectReportData!=null && StringUtils.isNotBlank(projectReportData.getId())){
+			Workattachment workattachment = new Workattachment();
+			workattachment.setAttachmentFlag("86");
+			workattachment.setAttachmentId(id);
+			projectReportData.setWorkAttachments(workattachmentDao.findListOnRural(workattachment));
+			projectReportData.setProjectContentDataList(projectContentDataDao.findReportContent(projectReportData.getId(),"1"));
+			projectReportData.setProjectBasedDataList(projectBasedDataDao.findReportBased(projectReportData.getId(),"3"));
+            WorkReviewAudit workReviewAudit = new WorkReviewAudit();
+            workReviewAudit.setType("1");
+            workReviewAudit.setReportId(projectReportData.getId());
+            workReviewAudit.setCompanyId(projectReportData.getCompanyId());
+			projectReportData.setProjectReviewList(workReviewAuditDao.findList(workReviewAudit));
+		}
+		return projectReportData;
+	}
+
 	public List<Workattachment> getWorkattachments(String id) {
 		ProjectReportData projectReportData = super.get(id);
 		if (projectReportData!=null && StringUtils.isNotBlank(projectReportData.getId())){
@@ -256,6 +275,16 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 		}
 		dao.updateFileStatus(projectReportData);
 	}
+
+	@Transactional(readOnly = false)
+	public void updateNumber(ProjectReportData projectReportData) {
+		projectReportData.preUpdate();
+		if (StringUtils.isBlank(projectReportData.getFileStatus())) {
+			projectReportData.setFileStatus("1");
+		}
+		dao.updateFileStatus(projectReportData);
+		int result = dao.updateNumber(projectReportData);
+	}
 	@Transactional(readOnly = false)
 	public void  updateFileStatus(ProjectReportData projectReportData) {
 		if (StringUtils.isBlank(projectReportData.getFileStatus())) {

+ 6 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectcontentinfoService.java

@@ -101,6 +101,12 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 	public Projectcontentinfo getByInfoId(String infoId) {
 		return dao.getByInfoId(infoId);
 	}
+
+	public Projectcontentinfo getByInfoIdOnRural(String infoId) {
+		return dao.getByInfoId(infoId);
+	}
+
+
 	public List<Projectcontentinfo> getByChangeInfoId(String infoId) {
 		return projectContentChangeDao.getByInfoId(infoId);
 	}

+ 1 - 0
src/main/java/com/jeeplus/modules/projectrecord/dao/ProjectRecordsDao.java

@@ -17,6 +17,7 @@ import java.util.List;
 @MyBatisDao
 public interface ProjectRecordsDao extends CrudDao<ProjectRecords> {
 
+    ProjectRecords getRuralProjectRecodes(String id);
 
     void updateProcessIdAndStatus(ProjectRecords projectRecords);
 

+ 38 - 24
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsAlterService.java

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.modules.projectrecord.service;
 
+import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
@@ -51,17 +52,16 @@ import org.activiti.engine.history.HistoricTaskInstance;
 import org.activiti.engine.history.HistoricTaskInstanceQuery;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.apache.commons.beanutils.BeanUtils;
+import org.apache.commons.collections.IteratorUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.formula.functions.T;
 import org.java_websocket.WebSocket;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 项目登记Service
@@ -199,20 +199,32 @@ public class ProjectRecordsAlterService extends CrudService<ProjectRecordsAlterD
 	 * @param isEntrust   是否委托方
 	 */
 	private void saveLinkmanInfos(String projectId, List<WorkClientLinkman> linkmanList, boolean isEntrust) {
-		assert (projectId != null);
-        if(linkmanList == null || linkmanList.isEmpty()){
-            return;
+	    if (null != linkmanList){
+            List<WorkClientLinkman> newLinkmanList = new ArrayList<WorkClientLinkman>();
+            Iterator<WorkClientLinkman> iterator = linkmanList.iterator();
+            while (iterator.hasNext()){
+                WorkClientLinkman next = iterator.next();
+                if (null == next.getId()){
+                    iterator.remove();
+                }else {
+                    newLinkmanList.add(next);
+                }
+            }
+            assert (projectId != null);
+            if(newLinkmanList == null || newLinkmanList.isEmpty()){
+                return;
+            }
+            HashMap<String, Object> map = new HashMap<>(5);
+            map.put("projectId", projectId);
+            map.put("linkmanList", newLinkmanList);
+            int entrust = 0;
+            if (isEntrust) {
+                entrust = 1;
+            }
+            clientLinkmanDao.deleteProjectLinkmans(projectId, entrust);
+            map.put("isEntrust", entrust);
+            clientLinkmanDao.batchInsert(map);
         }
-		HashMap<String, Object> map = new HashMap<>(5);
-		map.put("projectId", projectId);
-		map.put("linkmanList", linkmanList);
-		int entrust = 0;
-		if (isEntrust) {
-			entrust = 1;
-		}
-		clientLinkmanDao.deleteProjectLinkmans(projectId, entrust);
-		map.put("isEntrust", entrust);
-		clientLinkmanDao.batchInsert(map);
 	}
 
 	/**
@@ -803,14 +815,16 @@ public class ProjectRecordsAlterService extends CrudService<ProjectRecordsAlterD
 
 	public void queryContractInfo(ProjectRecordsAlter projectRecords) {
 		WorkContractInfo workContractInfo = contractInfoService.get(projectRecords.getWorkContractInfo().getId());
-		workContractInfo.setConstructionProjectTypeStr(DictUtils.getDictLabel(String.valueOf(workContractInfo.getConstructionProjectType()), "construction_project_type", ""));
-        if(workContractInfo.getWorkClientInfoList()!=null&&!workContractInfo.getWorkClientInfoList().isEmpty()){
-            StringBuilder workClinetInfoIds = new StringBuilder();
-            for (WorkClientInfo workClientInfo : workContractInfo.getWorkClientInfoList()) {
-                workClinetInfoIds.append(workClientInfo.getId()).append(",");
+		if(null != workContractInfo){
+            workContractInfo.setConstructionProjectTypeStr(DictUtils.getDictLabel(String.valueOf(workContractInfo.getConstructionProjectType()), "construction_project_type", ""));
+            if(workContractInfo.getWorkClientInfoList()!=null&&!workContractInfo.getWorkClientInfoList().isEmpty()){
+                StringBuilder workClinetInfoIds = new StringBuilder();
+                for (WorkClientInfo workClientInfo : workContractInfo.getWorkClientInfoList()) {
+                    workClinetInfoIds.append(workClientInfo.getId()).append(",");
+                }
+                workClinetInfoIds.deleteCharAt(workClinetInfoIds.length()-1);
+                workContractInfo.setWorkClinetInfoIds(workClinetInfoIds.toString());
             }
-            workClinetInfoIds.deleteCharAt(workClinetInfoIds.length()-1);
-            workContractInfo.setWorkClinetInfoIds(workClinetInfoIds.toString());
         }
 		projectRecords.setWorkContractInfo(workContractInfo);
 	}

+ 27 - 17
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsService.java

@@ -148,6 +148,12 @@ public class ProjectRecordsService extends CrudService<ProjectRecordsDao, Projec
 		projectRecords.setProjectLeaders(users);
 		return projectRecords;
 	}
+	public ProjectRecords getRuralMasters(String id) {
+		ProjectRecords projectRecords = dao.getRuralProjectRecodes(id);
+		List<User> users = workProjectUserDao.queryProjectUsers(projectRecords.getId(), "1");
+		projectRecords.setProjectLeaders(users);
+		return projectRecords;
+	}
 	public Boolean getByUsers(ProjectRecords projectRecords) {
 		List<User> users = workProjectUserDao.queryAllProjectUsers(projectRecords.getId());
 		User user = UserUtils.getUser();
@@ -240,13 +246,15 @@ public class ProjectRecordsService extends CrudService<ProjectRecordsDao, Projec
 		WorkClientInfo workClientInfo = new WorkClientInfo();
 		Office company= new Office();
 		Office office =  new Office();
-        if(StringUtils.isNotBlank((projectRecords.getWorkContractInfo().getId()))){
-            //有合同状态
-			workContractInfo = workContractInfoDao.get(projectRecords.getWorkContractInfo().getId());
-			company.setId(workContractInfo.getCompanyId());
-//			office.setId(workContractInfo.getChargeCompany());
-			office.setId(UserUtils.getUser().getOffice().getId());
-        }else{
+		if (null != projectRecords.getWorkContractInfo()){
+			if(StringUtils.isNotBlank((projectRecords.getWorkContractInfo().getId()))){
+				//有合同状态
+				workContractInfo = workContractInfoDao.get(projectRecords.getWorkContractInfo().getId());
+				company.setId(workContractInfo.getCompanyId());
+	//			office.setId(workContractInfo.getChargeCompany());
+				office.setId(UserUtils.getUser().getOffice().getId());
+			}
+		}else{
         	//无合同
 			company.setId(UserUtils.getUser().getCompany().getId());
 			office.setId(UserUtils.getUser().getOffice().getId());
@@ -1030,19 +1038,21 @@ public class ProjectRecordsService extends CrudService<ProjectRecordsDao, Projec
 	 * @param projectRecords
 	 */
 	public void queryContractInfos(ProjectRecords projectRecords) {
-		WorkContractInfo workContractInfo = contractInfoService.get(projectRecords.getWorkContractInfo().getId());
-		if(workContractInfo!=null){
-			workContractInfo.setConstructionProjectTypeStr(DictUtils.getMainDictLabel(String.valueOf(workContractInfo.getContractType()), "contract_type", ""));
-			if(workContractInfo.getWorkClientInfoList()!=null&&!workContractInfo.getWorkClientInfoList().isEmpty()){
-				StringBuilder workClinetInfoIds = new StringBuilder();
-				for (WorkClientInfo workClientInfo : workContractInfo.getWorkClientInfoList()) {
-					workClinetInfoIds.append(workClientInfo.getId()).append(",");
+		if (null != projectRecords.getWorkContractInfo()){
+			WorkContractInfo workContractInfo = contractInfoService.get(projectRecords.getWorkContractInfo().getId());
+			if(workContractInfo!=null){
+				workContractInfo.setConstructionProjectTypeStr(DictUtils.getMainDictLabel(String.valueOf(workContractInfo.getContractType()), "contract_type", ""));
+				if(workContractInfo.getWorkClientInfoList()!=null&&!workContractInfo.getWorkClientInfoList().isEmpty()){
+					StringBuilder workClinetInfoIds = new StringBuilder();
+					for (WorkClientInfo workClientInfo : workContractInfo.getWorkClientInfoList()) {
+						workClinetInfoIds.append(workClientInfo.getId()).append(",");
+					}
+					workClinetInfoIds.deleteCharAt(workClinetInfoIds.length()-1);
+					workContractInfo.setWorkClinetInfoIds(workClinetInfoIds.toString());
 				}
-				workClinetInfoIds.deleteCharAt(workClinetInfoIds.length()-1);
-				workContractInfo.setWorkClinetInfoIds(workClinetInfoIds.toString());
 			}
+			projectRecords.setWorkContractInfo(workContractInfo);
 		}
-		projectRecords.setWorkContractInfo(workContractInfo);
 	}
 
     public ProjectRecords findUseableByProjectId(String projectId) {

+ 12 - 0
src/main/java/com/jeeplus/modules/projectreportnum/service/ProjectReportNumService.java

@@ -73,6 +73,18 @@ public class ProjectReportNumService extends CrudService<ProjectReportNumDao, Re
 		}
         return "领取成功";
 	}
+
+	@Transactional(readOnly = false)
+	public String  saveNumber() {
+		ReportNum reportNum = null;
+		int count = projectReportNumDao.countNum(UserUtils.getUser().getId());
+		String num = serialNumTplService.genSerialNum(UserUtils.getUser().getCompany(), "10");
+		reportNum = new ReportNum();
+		reportNum.setNum(num);
+		reportNum.setState("1");
+		super.save(reportNum);
+        return num;
+	}
 	
 	@Transactional(readOnly = false)
 	public void delete(ReportNum reportNum) {

+ 7 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectMessageDao.java

@@ -5,6 +5,8 @@ package com.jeeplus.modules.ruralprojectrecords.dao;
 
 import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 
 import java.util.List;
@@ -30,4 +32,9 @@ public interface RuralProjectMessageDao extends CrudDao<RuralProjectRecords> {
     List<RuralProjectRecords> findPageByRe(RuralProjectRecords records);
     int queryCount(RuralProjectRecords records);
     int queryCountByStatus(RuralProjectRecords records);
+
+
+    ProjectRecords getRuralProjectRecords(String id);
+
+    ProjectReportData getProjectReportDateByProjectId(String projectId);
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 565 - 761
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java


+ 101 - 39
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java

@@ -2,28 +2,22 @@ package com.jeeplus.modules.ruralprojectrecords.web;
 
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.MyBeanUtils;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.web.BaseController;
-import com.jeeplus.modules.act.service.ActTaskService;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
-import com.jeeplus.modules.projectcontentinfo.service.ProjectBasedDataService;
-import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
-import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
-import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
+import com.jeeplus.modules.projectcontentinfo.service.*;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.projectreportnum.service.ProjectReportNumService;
 import com.jeeplus.modules.ruralprojectrecords.entity.*;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.utils.UserUtils;
-import com.jeeplus.modules.workactivity.service.ActivityService;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
-import com.jeeplus.modules.workclientinfo.service.WorkClientInfoService;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
-import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -31,14 +25,11 @@ import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 /**
  * 项目列表Controller
@@ -49,32 +40,19 @@ import java.util.Map;
 @RequestMapping(value = "${adminPath}/ruralProject/ruralProjectMessage")
 public class RuralProjectMessageController extends BaseController {
     @Autowired
-    private WorkClientInfoService workClientInfoService;
-
-    @Autowired
     private RuralProjectRecordsService projectRecordsService;
     @Autowired
+    private ProjectRecordsService projectRecordsServices;
+    @Autowired
     private RuralProjectMessageService ruralProjectMessageService;
-
     @Autowired
     private ProjectReportDataService projectReportDataService;
-
-    @Autowired
-    private ProjectBasedDataService projectBasedDataService;
-
-    @Autowired
-    private WorkContractInfoService contractInfoService;
-    @Autowired
-    private ActTaskService actTaskService;
-    @Autowired
-    private ActivityService activityService;
     @Autowired
     private ProjectcontentinfoService projectcontentinfoService;
     @Autowired
-    private ProjectContentDataService projectContentDataService;
-
-    @Autowired
     private ProjectReportNumService projectReportNumService;
+    @Autowired
+    private ProjectReportChangeService projectReportChangeService;
 
     @ModelAttribute
     public RuralProjectRecords get(@RequestParam(required=false) String id) {
@@ -116,6 +94,15 @@ public class RuralProjectMessageController extends BaseController {
         return "modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList";
     }
 
+    /**
+     * 跳转新增报告页面
+     * @param projectcontentinfo
+     * @param request
+     * @param response
+     * @param model
+     * @param attr
+     * @return
+     */
     @RequestMapping(value = {"form"})
     public String form(RuralProjectcontentinfo projectcontentinfo, HttpServletRequest request, HttpServletResponse response, Model model, RedirectAttributes attr) {
         Projectcontentinfo projectcontentinfo1 = projectcontentinfoService.getByProjectId(projectcontentinfo.getProjectId());
@@ -179,14 +166,14 @@ public class RuralProjectMessageController extends BaseController {
     @RequestMapping(value = {"saveReport"})
     public String saveReport(Projectcontentinfo projectcontentinfo, Model model,RedirectAttributes redirectAttributes)  {
         try{
-            String str = projectcontentinfoService.saveData(projectcontentinfo,2);
+            String str = ruralProjectMessageService.saveData(projectcontentinfo,2);
             addMessage(redirectAttributes, "发起报告审批"+(str.equals("true")?"成功":"失败"));
             ProjectReportData projectReportData = projectcontentinfo.getProjectReportData();
             if (projectReportData!=null){
                 if (StringUtils.isNotBlank(projectcontentinfo.getEdit()) && projectcontentinfo.getEdit().equals("edit")){
-                    return "redirect:"+ Global.getAdminPath()+"/projectcontentinfo/projectcontentinfo/list?id="+projectcontentinfo.getId()+"&edit=edit";
+                    return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
                 }
-                return "redirect:"+Global.getAdminPath()+"/projectcontentinfo/projectcontentinfo/?id="+projectcontentinfo.getId();
+                return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
             }
         }catch (Exception e){
             logger.error("ProjectcontentinfoController save Exception e"+e);
@@ -196,17 +183,92 @@ public class RuralProjectMessageController extends BaseController {
         }
         addMessage(redirectAttributes, "发起报告审批失败");
         ProjectRecords projectRecords = projectcontentinfo.getProject()==null?new ProjectRecords():projectcontentinfo.getProject();
-        return "redirect:"+Global.getAdminPath()+"/projectcontentinfo/projectcontentinfo/?project.id="+projectRecords.getId();
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
     }
 
-
     /**
-     * 生成一个报告号
+     * 读取单个实体流程
+     * @return
      */
-    public String createReportNo(){
-        String msg = projectReportNumService.save("one");//保存
-        return msg;
+    @RequestMapping(value = "getProcessOne")
+    public String getProcessOne(Projectcontentinfo projectcontentinfo,String type,Model model) {
+        ProjectReportData projectReportDataInfo = ruralProjectMessageService.getProjectReportDateByProjectId(projectcontentinfo.getId());
+        projectcontentinfo.setProjectReportData(projectReportDataInfo);
+        if ("2".equals(type)){          //审批中流程
+            ProjectReportData projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+            model.addAttribute("processInstanceId", projectReportData.getProcessInstanceId());
+        }else if("3".equals(type)){     //变更中流程
+            ProjectReportData projectReportData = projectReportChangeService.get(projectcontentinfo.getProjectReportData().getId());
+            model.addAttribute("processInstanceId", projectReportData.getProcessInstanceId());
+        } else if("8".equals(type)){         //变更中流程
+            ProjectReportData projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+            model.addAttribute("processInstanceId", projectReportData.getUpId());
+        }else if("6".equals(type) || "7".equals(type)){      //作废流程
+            ProjectReportData projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+            model.addAttribute("processInstanceId", projectReportData.getInvalidProcessInstanceId());
+        }else if("5".equals(type)){
+            ProjectReportData projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+            if(projectReportData.getUpId() != null){
+                model.addAttribute("processInstanceId", projectReportData.getUpId());
+            }else {
+                model.addAttribute("processInstanceId", projectReportData.getProcessInstanceId());
+            }
+        }
+        return "modules/workreimbursement/workReimbursementTrack";
     }
 
+    //报告流程审批
+    @RequestMapping(value = {"reportAudit"})
+    public String reportAudit(Projectcontentinfo projectcontentinfo, HttpServletRequest request, HttpServletResponse response, Model model,
+                              RedirectAttributes redirectAttributes) throws Exception {
+        ProjectReportData projectReportData = projectcontentinfo.getProjectReportData();
+        ProjectReportData t = projectReportDataService.getOnRural(projectReportData.getId());//从数据库取出记录的值
+        try {
+            MyBeanUtils.copyBeanNotNull2Bean(projectReportData, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        String taskDefKey =  t.getAct().getTaskDefKey();
+        List<User> users = null;
+        ProjectRecords projectRecord = projectRecordsServices.getRuralMasters(projectcontentinfo.getProject().getId());
+        projectReportData.setProject(projectRecord);
+        if ("master".equals(taskDefKey)){
+            users = UserUtils.getByProssType(t.getProcessInstanceId(),2);
+            if (users==null )
+                users = UserUtils.getByRoleActivityEnname("bzshb",3,t.getOfficeId(),"12",t.getCreateBy());
+        }else if ("bzshb".equals(taskDefKey)){
+            users = UserUtils.getByProssType(t.getProcessInstanceId(),5);
+            if (users==null )
+                users = UserUtils.getByRoleActivityEnname("gzr",3,t.getOfficeId(),"12",t.getCreateBy());
+        }else if ("gzr".equals(taskDefKey)){
+            users = UserUtils.getByProssType(t.getProcessInstanceId(),5);
+            if (users==null )
+                users = UserUtils.getByRoleActivityEnname("gzr",3,t.getOfficeId(),"12",t.getCreateBy());
+        }else if ("modifyApply".equals(taskDefKey)){
+            users = UserUtils.getByProssType(t.getProcessInstanceId(),1);
+        }
+        String flag = t.getAct().getFlag();
+        if ("yes".equals(flag) && (users==null || users.size()==0)){
+            addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+        }else {
+            if ("modifyApply".equals(taskDefKey)){
+                projectcontentinfoService.saveData(projectcontentinfo,3);
+            }
+            String str = ruralProjectMessageService.auditSave(t, users);
+            addMessage(redirectAttributes, str);
+        }
+        if (StringUtils.isNotBlank(projectcontentinfo.getHome()) && projectcontentinfo.getHome().equals("home")){
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }else {
+            if (StringUtils.isNotBlank(projectcontentinfo.getEdit()) && projectcontentinfo.getEdit().equals("edit")){
+                return "redirect:"+Global.getAdminPath()+"/projectcontentinfo/projectcontentinfo/list?id="+projectcontentinfo.getId()+"&edit=edit";
+            }
+            return "redirect:"+Global.getAdminPath()+"/projectcontentinfo/projectcontentinfo/?id="+projectcontentinfo.getId();
+        }
+
+    }
+
+
+
 
 }

+ 2 - 0
src/main/java/com/jeeplus/modules/sys/dao/WorkattachmentDao.java

@@ -40,5 +40,7 @@ public interface WorkattachmentDao extends CrudDao<Workattachment> {
     //相同attachmentId的 集合
     List<Workattachment> getListByAttachmentIdAndFlag(Map<String, String> map);
 
+    List<Workattachment> findListOnRural(Workattachment workattachment);
+
     int updateAttachmentId(@Param("oldAttachmentId") String oldAttachmentId, @Param("newAttachmentId") String newAttachmentId);
 }

+ 10 - 1
src/main/java/com/jeeplus/modules/sys/entity/Workattachment.java

@@ -22,7 +22,16 @@ public class Workattachment extends DataEntity<Workattachment> {
 	private String attachmentName;		// 文件名
 	private String companyId;           //企业id
 	private String attachmentFlag;     //附件类别(0:评价汇总表、1:标书方案编制表)
-	
+	private String divIdType;//判定条件
+
+	public String getDivIdType() {
+		return divIdType;
+	}
+
+	public void setDivIdType(String divIdType) {
+		this.divIdType = divIdType;
+	}
+
 	public Workattachment() {
 		super();
 	}

+ 1 - 0
src/main/java/com/jeeplus/modules/sys/web/WorkattachmentController.java

@@ -165,6 +165,7 @@ public class WorkattachmentController extends BaseController {
 			map.put("createDate", sdf.format(new Date()));
 			map.put("attachmentFlag", workattachment.getAttachmentFlag());
 			map.put("id", workattachment.getId());
+			map.put("divIdType", workattachment.getDivIdType());
 		}catch (Exception e){
 			map.put("status","Fail");
 		}

+ 84 - 9
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -7,18 +7,15 @@ import com.google.common.collect.Lists;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.utils.DateUtils;
-import com.jeeplus.common.utils.IdGen;
 import com.jeeplus.common.utils.MyBeanUtils;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.utils.excel.ExportExcel;
 import com.jeeplus.common.utils.excel.ImportExcel;
 import com.jeeplus.common.web.BaseController;
-import com.jeeplus.common.websocket.onchat.ChatServerPool;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.caseinfo.entity.CaseInfo;
 import com.jeeplus.modules.caseinfo.service.CaseInfoService;
-import com.jeeplus.modules.hr.entity.UserInfo;
 import com.jeeplus.modules.iim.entity.MailBox;
 import com.jeeplus.modules.iim.entity.MailPage;
 import com.jeeplus.modules.iim.service.MailBoxService;
@@ -39,7 +36,6 @@ import com.jeeplus.modules.oabuy.service.OaBuyService;
 import com.jeeplus.modules.oaperformance.entity.OaPerformance;
 import com.jeeplus.modules.oaperformance.service.OaPerformanceService;
 import com.jeeplus.modules.officeintroduce.dao.OfficeintroduceDao;
-import com.jeeplus.modules.officeintroduce.entity.Officeintroduce;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
@@ -59,6 +55,7 @@ import com.jeeplus.modules.serialnum.service.SerialNumTplService;
 import com.jeeplus.modules.sys.entity.*;
 import com.jeeplus.modules.sys.service.CompanyService;
 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.sysuseroffice.entity.Useroffice;
 import com.jeeplus.modules.sysuseroffice.service.UserofficeService;
@@ -108,7 +105,6 @@ import com.jeeplus.modules.workfulldesignchange.entity.WorkFullDesignchange;
 import com.jeeplus.modules.workfulldesignchange.service.WorkFullDesignchangeService;
 import com.jeeplus.modules.workfullexecute.entity.WorkFullExecute;
 import com.jeeplus.modules.workfullexecute.service.WorkFullExecuteService;
-import com.jeeplus.modules.workfullmanage.entity.WorkFullManage;
 import com.jeeplus.modules.workfullmanage.entity.WorkFullPay;
 import com.jeeplus.modules.workfullmanage.entity.WorkFullRecord;
 import com.jeeplus.modules.workfullmanage.service.WorkFullManageService;
@@ -156,7 +152,6 @@ import com.jeeplus.modules.workpayment.entity.WorkPayment;
 import com.jeeplus.modules.workpayment.service.WorkPaymentService;
 import com.jeeplus.modules.workpettycash.entity.WorkPettyCash;
 import com.jeeplus.modules.workpettycash.service.WorkPettyCashService;
-import com.jeeplus.modules.workproject.entity.WorkProject;
 import com.jeeplus.modules.workproject.service.WorkProjectService;
 import com.jeeplus.modules.workprojectcompletion.entity.WorkProjectCompletionInfo;
 import com.jeeplus.modules.workprojectcompletion.service.WorkProjectCompletionService;
@@ -182,9 +177,7 @@ import com.jeeplus.modules.workrepay.entity.WorkRepay;
 import com.jeeplus.modules.workrepay.service.WorkRepayService;
 import com.jeeplus.modules.workresignation.entity.WorkResignation;
 import com.jeeplus.modules.workresignation.service.WorkResignationService;
-import com.jeeplus.modules.workresignationtemplate.entity.WorkResignationTemplate;
 import com.jeeplus.modules.workreview.entity.WorkReviewAudit;
-import com.jeeplus.modules.workreview.entity.WorkReviewStandard;
 import com.jeeplus.modules.workreview.service.WorkReviewStandardService;
 import com.jeeplus.modules.workscrap.entity.WorkScrap;
 import com.jeeplus.modules.workscrap.service.WorkScrapService;
@@ -206,7 +199,6 @@ import org.activiti.engine.HistoryService;
 import org.activiti.engine.history.HistoricProcessInstance;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.activiti.engine.task.Task;
-import org.java_websocket.WebSocket;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -657,6 +649,10 @@ public class WorkProjectNotifyController extends BaseController {
 				ProjectReportData projectReportData = projectReportDataService.get(workProjectNotify.getNotifyId());
 				if (projectReportData != null)
 				processInstanceId = projectReportData.getProcessInstanceId();
+			}else if(workProjectNotify.getType().equals("92")){	//工作内容报告
+				ProjectReportData projectReportData = projectReportDataService.get(workProjectNotify.getNotifyId());
+				if (projectReportData != null)
+				processInstanceId = projectReportData.getProcessInstanceId();
 			}
 			else if(workProjectNotify.getType().equals("46")){	//工作内容报告变更
 				ProjectReportData projectReportData = projectReportChangeService.get(workProjectNotify.getNotifyId());
@@ -1324,6 +1320,78 @@ public class WorkProjectNotifyController extends BaseController {
 					} else {
 						return "modules/projectcontentinfo/reportView";
 					}
+				} else if (workProjectNotify.getType().equals("43")) {    //合同作废
+					WorkContractInfo workContractInfo = workContractInfoService.get(workProjectNotify.getNotifyId());
+					Act act = getByAct(workContractInfo.getInvalidateProcessInstanceId());
+					workContractInfo.setHome("home");
+					workContractInfo.setAct(act);
+					String view = "contractInvalidateAudit";
+					if (act.getProcInsId() != null) {
+						if (actTaskService.getProcIns(act.getProcInsId()) != null) {
+							act.setProcIns(actTaskService.getProcIns(act.getProcInsId()));
+						} else {
+							act.setFinishedProcIns(actTaskService.getFinishedProcIns(act.getProcInsId()));
+						}
+					}
+					if (act != null && StringUtils.isNotBlank(act.getTaskId())) {
+						workContractInfo.setAct(act);
+						model.addAttribute("processInstanceId", workContractInfo.getInvalidateProcessInstanceId());
+					}
+					// 环节编号,默认是 "bmzrAudit"
+					String taskDefKey = workContractInfo.getAct().getTaskDefKey();
+
+					model.addAttribute("workContractInfo", workContractInfo);
+					if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						return "modules/workcontractinfo/" + view;
+					} else if (("3").equals(workContractInfo.getInvalidateStatus())) {
+						return "modules/workcontractinfo/contractInvalidateFormModify";
+					} else {
+						return "modules/workcontractinfo/workContractInfoLookForm";
+					}
+				} else if (workProjectNotify.getType().equals("92")) {    //工作内容报告
+					ProjectReportData projectReportData = projectReportDataService.getOnRural(workProjectNotify.getNotifyId());
+					Act act = getByAct(projectReportData.getProcessInstanceId());
+					projectReportData.setAct(act);
+					Projectcontentinfo projectcontentinfo = projectcontentinfoService.getByInfoId(projectReportData.getId());
+					projectcontentinfo.setProjectReportData(projectReportData);
+                    List<MainDictDetail> achievementTypes = DictUtils.getMainDictList("achievement_type");
+                    if(null != achievementTypes){
+                        for (MainDictDetail achievementType:achievementTypes) {
+                            if(achievementType.getValue().equals(projectReportData.getAchievementType())){
+                                projectReportData.setAchievementType(achievementType.getLabel());
+                                break;
+                            }
+                        }
+                    }
+                    projectcontentinfo.setHome("home");
+                    model.addAttribute("processInstanceId",projectReportData.getProcessInstanceId());
+					model.addAttribute("projectId", projectcontentinfo.getProject().getId());
+					model.addAttribute("id", projectcontentinfo.getId());
+					model.addAttribute("projectcontentinfo", projectcontentinfo);
+					WorkReviewAudit workReviewAudit = new WorkReviewAudit();
+					String type = "";
+					if ("master".equals(act.getTaskDefKey())) {
+						type = "2";
+					} else if ("bmzr".equals(act.getTaskDefKey())) {
+						type = "3";
+					} else if ("bzshbyg".equals(act.getTaskDefKey())) {
+						type = "4";
+					} else if ("bzshb".equals(act.getTaskDefKey())) {
+						type = "4";
+					}
+					workReviewAudit.setCompanyId(UserUtils.getSelectCompany().getId());
+					workReviewAudit.setType(type);
+					workReviewAudit.setReportId(workProjectNotify.getNotifyId());
+					List<WorkReviewAudit> workReviewAudits = workReviewStandardService.findAuditList(workReviewAudit);
+					model.addAttribute("type", type);
+					model.addAttribute("list", workReviewAudits);
+					if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageAudit";
+					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+						return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageModify";
+					} else {
+						return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageView";
+					}
 				} else if (workProjectNotify.getType().equals("46")) {    //工作内容报告变更
 					ProjectReportData projectReportData = projectReportChangeService.get(workProjectNotify.getNotifyId());
 					Act act = getByAct(projectReportData.getProcessInstanceId());
@@ -2178,6 +2246,13 @@ public class WorkProjectNotifyController extends BaseController {
 					model.addAttribute("projectcontentinfo", projectcontentinfo);
 					return "modules/projectcontentinfo/reportView";
 				}
+				else if("92".equals(workProjectNotify.getType())){
+					ProjectReportData projectReportData = projectReportDataService.get(workProjectNotify.getNotifyId());
+					Projectcontentinfo projectcontentinfo = projectcontentinfoService.getByInfoId(projectReportData.getId());
+					projectcontentinfo.setProjectReportData(projectReportData);
+					model.addAttribute("projectcontentinfo", projectcontentinfo);
+					return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportView";
+				}
 				else if("46".equals(workProjectNotify.getType())){ //工作内容报告
 					ProjectReportData projectReportData = projectReportChangeService.get(workProjectNotify.getNotifyId());
 					Act act = getByAct(projectReportData.getProcessInstanceId());

+ 6 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml

@@ -576,6 +576,12 @@
 		WHERE id = #{id}
 	</update>
 
+	<update id="updateNumber">
+		UPDATE project_report_data SET
+			number = #{number}
+		WHERE id = #{id}
+	</update>
+
 	<update id="updateFileStatus">
 		UPDATE project_report_data SET
 		file_status = #{fileStatus}

+ 10 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml

@@ -367,6 +367,16 @@
 			link_id = #{linkId}
 		WHERE id = #{id}
 	</update>
+
+	<update id="updateInfoId">
+		UPDATE project_content_info SET
+			info_id = #{infoId},
+			dict_type = #{dictType}
+		WHERE id = #{id}
+	</update>
+
+
+
 	<update id="updateByLinkId">
 		UPDATE project_content_info SET
 			name = #{dataName}

+ 12 - 0
src/main/resources/mappings/modules/projectrecord/ProjectRecordsDao.xml

@@ -60,6 +60,18 @@
         LEFT JOIN sys_office o ON o.id = a.office_id
 		WHERE a.id = #{id}
 	</select>
+
+	<select id="getRuralProjectRecodes" resultType="ProjectRecords" >
+		SELECT
+			<include refid="projectRecordsColumns"/>
+        ,su.name AS "createBy.name"
+        ,o.top_company AS "office.name"
+        FROM rural_project_records a
+        <include refid="projectRecordsJoins"/>
+        LEFT JOIN sys_user su ON su.id = a.create_by
+        LEFT JOIN sys_office o ON o.id = a.office_id
+		WHERE a.id = #{id}
+	</select>
 	
 	<select id="findList" resultType="ProjectRecords" >
 		SELECT

+ 60 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml

@@ -43,6 +43,44 @@
 		a.install_unit_fees AS "installUnitFees",
 		a.total_fees AS "totalFees"
 	</sql>
+
+	<sql id="projectReportDataColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.company_id AS "companyId",
+		a.office_id AS "officeId",
+		a.project_id AS "project.id",
+		a.name AS "name",
+		a.number AS "number",
+		a.type AS "type",
+		a.achievement_type AS "achievementType",
+		a.review_standard AS "reviewStandard",
+		a.sign_cost_one AS "signCostOne.id",
+		a.sign_cost_two AS "signCostTwo.id",
+		a.master AS "master.id",
+		a.report_date AS "reportDate",
+		a.file_status AS "fileStatus",
+		a.status AS "status",
+		a.invalid_status AS "invalidStatus",
+		a.report_type AS "reportType",
+		a.process_instance_id AS "processInstanceId",
+		a.invalid_process_instance_id AS "invalidProcessInstanceId",
+		a.number_path as "numberPath",
+		a.update_process_instance_id as "upId",
+		a.review_fee AS "reviewFee",
+		a.approval_fee AS "approvalFee",
+		a.contract_fee AS "contractFee",
+		a.verify_fee AS "verifyFee",
+		a.verify_rate AS "verifyRate",
+		a.consult_fee AS "consultFee",
+		a.building_fee AS "buildingFee",
+		a.install_fee AS "installFee"
+	</sql>
 	
 	<sql id="projectRecordsJoins">
 		LEFT JOIN sys_area area ON area.id = a.area_id
@@ -60,6 +98,27 @@
         LEFT JOIN sys_office o ON o.id = a.office_id
 		WHERE a.id = #{id}
 	</select>
+
+	<select id="getRuralProjectRecords" resultType="ProjectRecords" >
+		SELECT
+		<include refid="projectRecordsColumns"/>
+		,su.name AS "createBy.name"
+		,o.top_company AS "office.name"
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+		LEFT JOIN sys_user su ON su.id = a.create_by
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="getProjectReportDateByProjectId" resultType="ProjectReportData">
+		SELECT
+		<include refid="projectReportDataColumns"/>
+		from project_report_data a
+		where a.project_id = #{projectId}
+	</select>
+
+
 	
 	<select id="findList" resultType="RuralProjectRecords" >
 		SELECT
@@ -169,6 +228,7 @@
             LEFT JOIN work_client_info wct on wci.client_id = wct.id
         </if>
         <where>
+            a.status = 5
             <if test="projectId != null and projectId != ''">
                 AND a.project_id like concat('%',#{projectId},'%')
             </if>

+ 26 - 2
src/main/resources/mappings/modules/sys/WorkattachmentDao.xml

@@ -17,6 +17,7 @@
 		a.attachment_name AS "attachmentName",
 		a.company_id AS "companyId",
 		a.attachment_flag AS "attachmentFlag",
+		a.div_id_type AS "divIdType",
 		createBy.name AS "createBy.name"
 	</sql>
 	
@@ -121,6 +122,27 @@
 			</otherwise>
 		</choose>
 	</select>
+
+	<select id="findListOnRural" resultType="Workattachment" >
+		SELECT
+		<include refid="workattachmentColumns"/>
+		FROM work_attachment a
+		<include refid="workattachmentJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="attachmentId != null and attachmentId != ''">
+				AND a.attachment_id = #{attachmentId}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
 	
 	<select id="findAllList" resultType="Workattachment" >
 		SELECT 
@@ -185,7 +207,8 @@
 			attachment_user,
 			attachment_name,
 			company_id,
-			attachment_flag
+			attachment_flag,
+			div_id_type
 		) VALUES (
 			#{id},
 			#{createBy.id},
@@ -200,7 +223,8 @@
 			#{attachmentUser},
 			#{attachmentName},
 			#{companyId},
-			#{attachmentFlag}
+			#{attachmentFlag},
+			#{divIdType}
 		)
 	</insert>
 	

+ 2 - 1
src/main/webapp/static/bos/bosupload.js

@@ -59,7 +59,8 @@ function multitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,
                         "attachmentName":file['name'],
                         "attachmentId":attachmentId,
                         "attachmentFlag":attachmentFlag,
-                        "url":data1.url
+                        "url":data1.url,
+                        "divIdType":divId
                     },
                     success:function(data){
                         // console.log('ajax requst : ' + data.status);

+ 390 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageAudit.jsp

@@ -0,0 +1,390 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目审批管理</title>
+	<meta name="decorator" content="default"/>
+	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+	<script type="text/javascript">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 1) {
+                    $("#flag").val("yes");
+                    /*if($("#taskDefKey").val()== "projectplan" && $(".trIdAdds").length==0){
+                        top.layer.alert('请至少上传一个项目计划表或者实施方案文档!', {icon: 0});
+                        return;
+                    }*/
+                }else {
+                    if(obj == 2){
+                        $("#flag").val("no1");
+                    }else {
+                        $("#flag").val("no2");
+                    }
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+            var contractNum = $("#contractNum").val();
+            if (contractNum == null || contractNum === "") {
+                $("#div1").hide();
+                $("#div3").hide();
+                setTimeout(function () {
+                    var tt = $("#workClientLinkmanList").find("tr").eq(0).find("td").eq(1).text().trim();
+                    $("#clientName").val(tt);
+                },100);
+            }
+        });
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+                var attachmentId = $("#id").val();
+                var attachmentFlag = "86";
+                console.log(file);
+                var timestamp=new Date().getTime();
+
+                var storeAs = "attachment-file/projectRecords/"+timestamp+"/"+file['name'];
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function addRow(list, idx, tpl, row){
+            // var idx1 = $("#workClientLinkmanList tr").length;
+            bornTemplete(list, idx, tpl, row, idx);
+        }
+
+        function bornTemplete(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");
+                    }
+                }
+            });
+        }
+	</script>
+</head>
+<body >
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectcontentinfo" enctype="multipart/form-data" action="${ctx}/ruralProject/ruralProjectMessage/reportAudit" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="home"/>
+			<form:hidden path="project.id"/>
+			<form:hidden path="projectReportData.act.taskId"/>
+			<form:hidden path="projectReportData.id"/>
+			<form:hidden path="projectReportData.act.taskName"/>
+			<form:hidden id="taskDefKey" path="projectReportData.act.taskDefKey"/>
+			<form:hidden path="projectReportData.act.procInsId"/>
+			<form:hidden path="projectReportData.act.procDefId"/>
+			<form:hidden id="flag" path="projectReportData.act.flag"/>
+			<c:set var="status" value="${projectReportData.act.status}" />
+
+
+			<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw12">
+				<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">
+						<form:input path="projectReportData.achievementType" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">签章类型:</label>
+					<div class="layui-input-block">
+						<form:input path="projectReportData.ReportType" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>项目信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">送审价(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="reviewFee" path="projectReportData.reviewFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">审定价(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="approvalFee" path="projectReportData.approvalFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同价(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="contractFee" path="projectReportData.contractFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">核增核减额(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="verifyFee" path="projectReportData.verifyFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">核增核减率(%):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="verifyRate" path="projectReportData.verifyRate" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">咨询标的额(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="consultFee" path="projectReportData.consultFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">土建造价(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="buildingFee" path="projectReportData.buildingFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">安装造价(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="installFee" path="projectReportData.installFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>报告文件</h2></div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_attachment'}">
+								<tr>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+											<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+													<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+												</c:when>
+												<c:otherwise>
+													<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td>${workClientAttachment.createBy.name}</td>
+									<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+									<td class="op-td">
+										<div class="op-btn-box" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+										</div>
+									</td>
+								</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>依据性资料</h2></div>
+				<div id="addFile_gistdata" style="display: none" class="upload-progress">
+					<span id="fileName_gistdata" ></span>
+					<b><span id="baifenbi_gistdata" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
+				<span id="gistdata_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="gistdata_upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_gistdata'}">
+								<tr>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+											<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+													<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+												</c:when>
+												<c:otherwise>
+													<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td>${workClientAttachment.createBy.name}</td>
+									<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+									<td class="op-td">
+										<div class="op-btn-box" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+										</div>
+									</td>
+								</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>其他文件</h2></div>
+				<div id="addFile_other" style="display: none" class="upload-progress">
+					<span id="fileName_other" ></span>
+					<b><span id="baifenbi_other" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+				<span id="other_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_other" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_other'}">
+								<tr>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+											<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+													<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+												</c:when>
+												<c:otherwise>
+													<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td>${workClientAttachment.createBy.name}</td>
+									<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+									<td class="op-td">
+										<div class="op-btn-box" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+										</div>
+									</td>
+								</tr>
+							</c:if>
+						</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-sm12 lw6 with-textarea">
+					<label class="layui-form-label">审批意见:</label>
+					<div class="layui-input-block">
+						<form:textarea path="projectReportData.act.comment" class="form-control" rows="4" maxlength="127" />
+						<input type="file" name="upload_files" style="display: none;">
+					</div>
+				</div>
+			</div>
+
+		</form:form>
+
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>审批流程</h2></div>
+			<div class="layui-item layui-col-xs12 form-table-container" >
+				<act:flowChart procInsId="${processInstanceId}"/>
+				<act:histoicFlow procInsId="${processInstanceId}"/>
+			</div>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 736 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageModify.jsp

@@ -0,0 +1,736 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+              if($(".trIdAdds").length==0){
+                  top.layer.alert('请至少上传一个项目计划表或者实施方案文档!', {icon: 0});
+                  return;
+              }
+              if($("#workClientLinkmanList tr").length==0){
+                  top.layer.alert('请至少选择一个委托方联系人!', {icon: 0});
+                  return;
+              }
+		      if(i==2){
+		          $("#inputForm").attr("action","${ctx}/project/projectRecords/tstore");
+			  }
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+
+            <%--$('#scaleType').editableSelect({--%>
+                <%--effects: 'slide'--%>
+            <%--});--%>
+            <%--$('#scaleType').val("${projectRecords.scaleType}")--%>
+            <%--$('#scaleUnit').editableSelect({--%>
+                <%--effects: 'slide'--%>
+            <%--});--%>
+            <%--$('#scaleUnit').val("${projectRecords.scaleUnit}")--%>
+            $('#areaId').on("change", function () {
+                var areaId = $("#areaId").val();
+                $("#province").val('');
+                $("#city").val('');
+                $("#county").val('');
+                $.ajax({
+                    type : "POST",
+                    url : "${ctx}/sys/area/getParent",
+                    data : {'areaId':areaId},
+                    //请求成功
+                    success : function(result) {
+                        var pro = result.province;
+                        var city = result.city;
+                        var county  = result.county;
+                        if(pro != '') {
+                            $("#province").val(pro);
+                        }
+                        if(city != '') {
+                            $("#city").val(city);
+                        }
+                        if(county != '') {
+                            $("#county").val(county);
+                        }
+                    },
+
+                });
+            })
+		});
+
+        function setContractValue(obj){
+            var clientId = $("#contractClientId").val();
+            $.ajax({
+                type:'post',
+                url:'${ctx}/project/projectRecords/getContractInfo',
+                data:{
+                    "id":obj
+                },
+                success:function(data){
+                    $("#contractName").val(data.name);
+                    $("#contractPrice").val(data.contractPrice);
+                    formatNum($("#contractPrice"));
+                    $("#contractClientName").val(data.client.name);
+                    $("#contractClientId").val(data.client.id);
+                    $("#constructionProjectType").val(data.constructionProjectTypeStr);
+                    $("#linkmanId").val(data.workClinetInfoIds);
+                }
+            })
+            var newClientId  =$("#contractClientId").val();
+            if (clientId != newClientId){
+				$("#workClientLinkmanList tr").remove();
+			}
+        }
+
+        function setValuee(obj){
+            for(var i=0;i<obj.length;i++){
+                var idArr = $("#workClientLinkmanList tr:visible .clientId");
+                if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+                    addRow("#workClientLinkmanList",workClientLinkmanRowIdx,workClientLinkmanTpl,obj[i]);
+                    workClientLinkmanRowIdx=workClientLinkmanRowIdx+1;
+                }
+            }
+        }
+        function getFee() {
+            $("#unitFees").val('');
+            var totalFee = $("#totalFees").val();
+            var count = $("#buildingScale").val();
+            if(count != '' && totalFee != '') {
+                var cFee = Math.round(parseInt(totalFee) / parseInt(count) * 100) / 100 * 10000;
+                $("#unitFees").val(cFee);
+            }
+        }
+
+        function getBudlingFees() {
+            $("#buildingPercent").val('');
+            $("#buildingUnitFees").val('');
+            var totalFee = $("#totalFees").val();
+            var budFee = $("#buildingFees").val();
+            var count = $("#buildingScale").val();
+            if(totalFee != '') {
+                var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
+            }
+            if(count != '') {
+                var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            $("#buildingPercent").val(p);
+            $("#buildingUnitFees").val(pp);
+        }
+
+        function getInstallFees() {
+            $("#installPercent").val('');
+            $("#installUnitFees").val('');
+            var totalFee = $("#totalFees").val();
+            var budFee = $("#installFees").val();
+            var count = $("#buildingScale").val();
+            if(totalFee != '') {
+                var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
+            }
+            if(count != '') {
+                var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            $("#installPercent").val(p);
+            $("#installUnitFees").val(pp);
+        }
+        function hasInArr(id,idArr) {
+            for(var i=0;i<idArr.length;i++){
+                if(id==$(idArr[i]).val()){
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        function existLinkman(id,length) {
+            for (var i=0;i<length;i++) {
+                var val = $('#workClientLinkmanList'+i+'_id').val();
+                if(id==val){
+                    return true;
+				}
+            }
+            return false;
+        }
+
+        function setClientInfo(obj) {
+            for(var i=0;i<obj.length;i++){
+                var idArr = $("#workConstructionLinkmanList tr:visible .linkmanId");
+                if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+                    addRow("#workConstructionLinkmanList",workConstructionLinkmanRowIdx,workConstructionLinkmanTpl,obj[i]);
+                    workConstructionLinkmanRowIdx=workConstructionLinkmanRowIdx+1;
+                }
+            }
+        }
+		
+        function existConstructionLinkman(obj,length) {
+            for (var i=0;i<length;i++) {
+                var val = $('#workConstructionLinkmanList'+i+'_id').val();
+                var cid = $('#workConstructionLinkmanList'+i+'_cid').val();
+                if(obj.id==val&&obj.client.id==cid){
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = $("#id").val();
+            var attachmentFlag = "82";
+            /*console.log(file);*/
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/projectRecords/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+        
+        function addRow(list, idx, tpl, row){
+            // var idx1 = $("#workClientLinkmanList tr").length;
+                bornTemplete(list, idx, tpl, row, idx);
+        }
+
+        function bornTemplete(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+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            $(obj).parent().parent().remove();
+        }
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+	</script>
+</head>
+<body >
+<div class="single-form">
+    <div class="container">
+		<form:form id="inputForm" modelAttribute="projectRecords" enctype="multipart/form-data" action="${ctx}/project/projectRecords/saveAudit" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+            <form:hidden path="home"/>
+            <form:hidden path="act.taskId"/>
+            <form:hidden path="act.taskName"/>
+            <form:hidden path="act.taskDefKey"/>
+            <form:hidden path="act.procInsId"/>
+            <form:hidden path="act.procDefId"/>
+            <form:hidden id="flag" path="act.flag"/>
+		    <form:hidden path="workContractInfo.client.id" id="contractClientId" value="${workContractInfo.client.id}"/>
+
+            <div class="form-group layui-row first">
+                <div class="form-group-label"><h2>项目合同信息</h2></div>
+                <div class="layui-item layui-col-sm12 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>选择合同:</label>
+                    <div class="layui-input-block  with-icon">
+                        <sys:gridselectContract url="${ctx}/project/projectRecords/selectcontract" type="" isTotal="1" id="contractId" name="workContractInfo.id"  value="${projectRecords.workContractInfo.id}"  title="选择合同" labelName="workContractInfo.name"
+                                                labelValue="${projectRecords.workContractInfo.name}" cssClass="form-control required layui-input" fieldLabels="合同名称" fieldKeys="name" searchLabel="合同名称" searchKey="name" ></sys:gridselectContract>
+                    </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" id="contractName"  class="form-control layui-input" value="${projectRecords.workContractInfo.name}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">合同金额(元):</label>
+                    <div class="layui-input-block">
+                        <input  htmlEscape="false"  readonly="true" id="contractPrice"  class="form-control layui-input" value="<fmt:formatNumber value="${projectRecords.workContractInfo.contractPrice}" pattern="#,##0.00#"/>" onchange="formatNum(this);"/>
+                    </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" id="contractClientName" name="workContractInfo.client.name" class="form-control layui-input" value="${projectRecords.workContractInfo.client.name}"/>
+                    </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" id="constructionProjectType"  class="form-control layui-input" value="${projectRecords.workContractInfo.constructionProjectTypeStr}"/>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目基础信息</h2></div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>项目名称</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectName" htmlEscape="false"  class="form-control layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目编号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+                            <span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty projectRecords.projectStatus}">${fns:getDictLabel(projectRecords.projectStatus, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
+                             </span>
+                        </div>
+                    </div>
+                </div>
+                <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                    <%--<label class="layui-form-label">规模类型:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<form:select path="scaleType" class="form-control editable-select layui-input" id="scaleType" value="${scaleType}">--%>
+                            <%--<form:option value=""/>--%>
+                            <%--<form:options items="${fns:getMainDictList('scale_type')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+                        <%--</form:select>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
+                <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                    <%--<label class="layui-form-label">规模单位:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<form:select path="scaleUnit" class="form-control editable-select layui-input" id="scaleUnit" value="${scaleUnit}">--%>
+                            <%--<form:option value=""/>--%>
+                            <%--<form:options items="${fns:getMainDictList('scale_unit')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+                        <%--</form:select>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
+                <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                    <%--<label class="layui-form-label">规模数量:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<form:input path="scaleQuantity" htmlEscape="false"  class="form-control number layui-input"/>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目所在地:</label>
+                    <div class="layui-input-block  with-icon">
+                        <sys:treeselect id="area" name="area.id" value="${projectRecords.area.id}" labelName="area.name" labelValue="${projectRecords.area.name}"
+                                        title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">所在省份:</label>
+                    <div class="layui-input-block">
+                        <form:input path="province" htmlEscape="false" id="province" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">所在地级市:</label>
+                    <div class="layui-input-block">
+                        <form:input path="city" htmlEscape="false" id="city" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">所在区县:</label>
+                    <div class="layui-input-block">
+                        <form:input path="county" htmlEscape="false" id="county" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">建设地点:</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectSite" htmlEscape="false"  class="form-control layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>项目负责人:</label>
+                    <div class="layui-input-block  with-icon">
+                        <sys:treeselectt id="master" name="projectLeaders" value="${projectRecords.leaderIds}" labelName="leaderNameStr" labelValue="${projectRecords.leaderNameStr}"
+                                         title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">创建人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="createBy.name" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+                        <form:hidden path="createBy.id" htmlEscape="false"   readonly="true"  class="form-control  layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">创建日期:</label>
+                    <div class="layui-input-block">
+                        <input id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control required layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">工程结构:</label>
+                    <div class="layui-input-block">
+                        <form:select path="projectStructure" class="form-control editable-select layui-input" id="projectStructure" value="${projectStructure}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('project_structure')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">地上层数:</label>
+                    <div class="layui-input-block">
+                        <form:input path="onGroundNum" htmlEscape="false"  class="form-control layui-input number"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">底下层数:</label>
+                    <div class="layui-input-block">
+                        <form:input path="underGroundNum" htmlEscape="false"  class="form-control layui-input number"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>建筑面积或规模:</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input required number" onchange="getFee()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">计量单位:</label>
+                    <div class="layui-input-block">
+                        <form:select path="measuringUnit" class="form-control editable-select layui-input" id="measuringUnit" value="${measuringUnit}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('scale_unit')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">工程用途:</label>
+                    <div class="layui-input-block">
+                        <form:select path="projectUse" class="form-control editable-select layui-input" id="projectUse" value="${projectUse}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('project_use')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>咨询标的额(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="totalFees" htmlEscape="false" id="totalFees" class="form-control layui-input required number" onchange="getFee()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中土建造价(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingFees" htmlEscape="false" id="buildingFees" class="form-control layui-input" onchange="getBudlingFees()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中安装造价(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="installFees" htmlEscape="false" id="installFees" class="form-control layui-input" onchange="getInstallFees()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中土建百分比(%):</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingPercent" htmlEscape="false" id="buildingPercent" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中安装百分比(%):</label>
+                    <div class="layui-input-block">
+                        <form:input path="installPercent" htmlEscape="false" id="installPercent" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">单位造价(元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="unitFees" htmlEscape="false" id="unitFees" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">土建单位造价(元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingUnitFees" htmlEscape="false" id="buildingUnitFees" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">安装单位造价(元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="installUnitFees" htmlEscape="false" id="installUnitFees" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7 with-textarea">
+                    <label class="layui-form-label"><span class="require-item">*</span>工程概况:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="projectDesc" htmlEscape="false" rows="4"  maxlength="255"  class="form-control required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7 with-textarea">
+                    <label class="layui-form-label ">特殊要求:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2><span class="require-item">*</span>委托方联系人信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <sys:gridselect1 url="${ctx}/workclientinfo/workClientInfo/linkmanList" id="linkman" name="linkman.id"  title="选择客户" value="${projectRecords.workContractInfo.workClinetInfoIds}"
+                                     cssClass="form-control required" fieldLabels="联系人" fieldKeys="name"  searchLabel="联系人" searchKey="name"></sys:gridselect1>
+                </div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="contentTable" class="table table-bordered table-condensed details">
+                        <thead>
+                    <tr>
+                        <th class="hide"></th>
+                        <th width="20%">委托方</th>
+                        <th width="20%">联系人姓名</th>
+                        <th width="20%">联系方式1</th>
+                        <th width="20%">联系方式2</th>
+                        <th width="20%">操作</th>
+                    </tr>
+                    </thead>
+                        <tbody id="workClientLinkmanList">
+                        </tbody>
+                    </table>
+                    <script type="text/template" id="workClientLinkmanTpl">//<!--
+					<tr id="workClientLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workClientLinkmanList{{idx}}_id" name="workClientLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
+						<input id="workClientLinkmanList{{idx}}_delFlag" name="workClientLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td>
+						<input id="workClientLinkmanList{{idx}}_cid" name = "workClientLinkmanList[{{idx}}].clientId.id" type="hidden" value="{{row.clientId.id}}"/>
+						{{row.clientId.name}}
+					</td>
+					<td>
+						{{row.name}}
+					</td>
+					<td>
+						{{row.linkPhone}}
+					</td>
+					<td>
+						{{row.linkMobile}}
+					</td>
+					<td class="op-td">
+						{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workClientLinkmanList{{idx}}')" title="删除"><i class="fa fa-trash"></i>&nbsp;删除</span>{{/delBtn}}
+					</td>
+				</tr>//-->
+                    </script>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2><span class="require-item">*</span>施工方信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <sys:gridselectClientLink url="${ctx}/workclientinfo/workClientInfo/clientInfolist" id="constructionOrgList"   title="选择施工单位"
+                                              cssClass="form-control required" fieldLabels="客户编号" fieldKeys="name"  searchLabel="客户名称" searchKey="name"></sys:gridselectClientLink>
+                </div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="contentTable2" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th class="hide"></th>
+                            <th style="text-align: center" width="20%">施工方单位名称</th>
+                            <th style="text-align: center" width="20%">联系人姓名</th>
+                            <th style="text-align: center" width="20%">联系方式1</th>
+                            <th style="text-align: center" width="20%">联系方式2</th>
+                            <th width="20%">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="workConstructionLinkmanList">
+                        </tbody>
+                    </table>
+                    <script type="text/template" id="workConstructionLinkmanTpl">//<!--
+					<tr id="workConstructionLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workConstructionLinkmanList{{idx}}_id" name="workConstructionLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}" class="linkmanId"/>
+						<input id="workConstructionLinkmanList{{idx}}_delFlag" name="workConstructionLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td style="text-align: center">
+						<input id="workConstructionLinkmanList{{idx}}_cid" name = "workConstructionLinkmanList[{{idx}}].clientId.id" type="hidden" value="{{row.clientId.id}}"/>
+						{{row.clientId.name}}
+					</td>
+					<td style="text-align: center">
+						{{row.name }}
+					</td>
+					<td style="text-align: center">
+						{{row.linkPhone}}
+					</td>
+					<td style="text-align: center">
+						{{row.linkMobile}}
+					</td>
+					<td class="text-center" width="10">
+						{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workConstructionLinkmanList{{idx}}')" title="删除"><i class="fa fa-trash"></i>&nbsp;删除</span>{{/delBtn}}
+					</td>
+				</tr>//-->
+                    </script>
+
+                <script>
+                    var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var workConstructionLinkmanRowIdx = 0, workConstructionLinkmanTpl = $("#workConstructionLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    $(document).ready(function() {
+                        var data = ${fns:toJson(projectRecords.workClientLinkmanList)};
+                        for (var i=0; i<data.length; i++){
+                            addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                            workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                        }
+                        var dataBank = ${fns:toJson(projectRecords.workConstructionLinkmanList)};
+                        for (var i=0; i<dataBank.length; i++){
+                            addRow('#workConstructionLinkmanList', workConstructionLinkmanRowIdx, workConstructionLinkmanTpl, dataBank[i]);
+                            workConstructionLinkmanRowIdx = workConstructionLinkmanRowIdx + 1;
+                        }
+                    });
+                </script>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2><span class="require-item">*</span>项目计划附件信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"  onclick="addFile()"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                </div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="listAttachment" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th width="25%">文件</th>
+                            <th width="25%">上传人</th>
+                            <th width="25%">上传时间</th>
+                            <th width="25%">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectRecords.workAttachments}" var = "workClientAttachment" varStatus="status">
+                            <tr class="trIdAdds">
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workClientAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                        <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+                                    </div>
+                                </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="usersListTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th width="25%">姓名</th>
+                            <th width="25%">部门</th>
+                            <th width="25%">职级</th>
+                            <th width="25%">状态</th>
+                        </tr>
+                        </thead>
+                        <tbody id="usersList">
+                        <c:if test="${not empty projectRecords.projectMembers}">
+                            <c:forEach items="${projectRecords.projectMembers}" var="user">
+                                <tr id="${user.id}">
+                                    <td>
+                                            ${user.name}
+                                    </td>
+                                    <td>
+                                            ${user.office.name}
+                                    </td>
+                                    <td>
+                                            ${user.basicInfo.jobGrade.name}
+                                    </td>
+                                    <td>
+                                        <c:choose>
+                                            <c:when test="${user.delFlag == 0}">
+                                                正常
+                                            </c:when>
+                                            <c:otherwise>
+                                                移除
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                        </c:if>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+
+</body>
+</html>

+ 557 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageView.jsp

@@ -0,0 +1,557 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目审批管理</title>
+	<meta name="decorator" content="default"/>
+	<script>
+		$(document).ready(function () {
+			var tt = $("#contractNum").val();
+			if (tt == null || tt === "") {
+				$("#divv").hide();
+				$("#divv3").hide();
+				setTimeout(function () {
+					var tt = $("#workClientLinkmanList").find("tr").eq(0).find("td").eq(1).text().trim();
+					$("#clientName").val(tt);
+				},100);
+			}
+
+		})
+	</script>
+	<script type="text/javascript">
+        function addRow(list, idx, tpl, row){
+            // var idx1 = $("#workClientLinkmanList tr").length;
+            bornTemplete(list, idx, tpl, row, idx);
+        }
+
+        function bornTemplete(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 seeFile(fileUrl,fileName) {
+            //   location.href = "/followRecord/seeFile";
+            var index = fileName.lastIndexOf(".");
+            var fileType = fileName.substring(index);
+            // debugger
+            if (".pdf" == fileType) {
+                window.open(fileUrl);
+            } else {
+                window.open("${ctx}/isignature/iSignatureDocument/seeFile?fileUrl="+fileUrl+"&fileName="+fileName);
+            }
+        }
+	</script>
+	<script>
+		function initRecordStatus(index,id,dataid,status)
+		{
+			var elem = document.getElementById("status_td_" + index);
+			var st = getAuditState(status);
+			if(st.action)
+				var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + id + "&projectReportData.id="+ dataid + "&type="+status+"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+			else
+				var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+
+			elem.innerHTML = xml;
+		}
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="projectRecords" action="${ctx}/project/projectRecords/saveAudit" method="post" class="form-horizontal">
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>项目合同信息</h2></div>
+               <div id="divv">
+				   <div class="layui-item layui-col-sm12 lw6">
+					   <label class="layui-form-label">合同编号:</label>
+					   <div class="layui-input-block">
+						   <input htmlEscape="false" id="contractNum" readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.contractNum}"/>
+					   </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" class="form-control layui-input" value="${projectRecords.workContractInfo.name}"/>
+					   </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"  readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${projectRecords.workContractInfo.contractPrice}" pattern="#,##0.00#"/>"/>
+					   </div>
+				   </div>
+			   </div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">主委托方:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="clientName" readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.client.name}"/>
+					</div>
+				</div>
+				<div id="divv3">
+					<div class="layui-item layui-col-sm6 lw6">
+						<label class="layui-form-label">工程分类:</label>
+						<div class="layui-input-block">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.constructionProjectTypeStr}"/>
+						</div>
+					</div>
+				</div>
+			</div>
+
+			<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">项目名称:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectName}"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">项目编号:</label>
+					<div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+                            <span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty projectRecords.projectStatus}">${fns:getDictLabel(projectRecords.projectStatus, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
+                             </span>
+                        </div>
+					</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" class="form-control layui-input" value="${projectRecords.scaleType}"/>--%>
+					<%--</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" class="form-control layui-input" value="${projectRecords.scaleUnit}"/>--%>
+					<%--</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" class="form-control layui-input" value="${projectRecords.scaleQuantity}"/>--%>
+					<%--</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" class="form-control layui-input" value="${projectRecords.area.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">所在省份:</label>
+					<div class="layui-input-block">
+						<form:input path="province" htmlEscape="false" id="province" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">所在地级市:</label>
+					<div class="layui-input-block">
+						<form:input path="city" htmlEscape="false" id="city" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">所在区县:</label>
+					<div class="layui-input-block">
+						<form:input path="county" htmlEscape="false" id="areaName1" class="form-control layui-input" readonly="true"/>
+					</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" class="form-control layui-input" value="${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"  readonly="true" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
+					</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" class="form-control layui-input" value="${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"  readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${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" class="form-control layui-input" value="${projectRecords.projectStructure}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">地上层数:</label>
+					<div class="layui-input-block">
+						<form:input path="onGroundNum" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">底下层数:</label>
+					<div class="layui-input-block">
+						<form:input path="underGroundNum" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>建筑面积或规模:</label>
+					<div class="layui-input-block">
+						<form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input required number" readonly="true"/>
+					</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" class="form-control layui-input" value="${projectRecords.measuringUnit}"/>
+					</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" class="form-control layui-input" value="${projectRecords.projectUse}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>咨询标的额(万元):</label>
+					<div class="layui-input-block">
+						<input value="<fmt:formatNumber value="${projectRecords.totalFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="totalFees" class="form-control layui-input required number"  readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中土建造价(万元):</label>
+					<div class="layui-input-block">
+						<input   value="<fmt:formatNumber value="${projectRecords.buildingFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="buildingFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中安装造价(万元):</label>
+					<div class="layui-input-block">
+						<input  value="<fmt:formatNumber value="${projectRecords.installFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="installFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中土建百分比(%):</label>
+					<div class="layui-input-block">
+						<form:input path="buildingPercent" htmlEscape="false" id="buildingPercent" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中安装百分比(%):</label>
+					<div class="layui-input-block">
+						<form:input path="installPercent" htmlEscape="false" id="installPercent" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">单位造价(元):</label>
+					<div class="layui-input-block">
+						<input value="<fmt:formatNumber value="${projectRecords.unitFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="unitFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">土建单位造价(元):</label>
+					<div class="layui-input-block">
+						<input  value="<fmt:formatNumber value="${projectRecords.buildingUnitFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="buildingUnitFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">安装单位造价(元):</label>
+					<div class="layui-input-block">
+						<input  value="<fmt:formatNumber value="${projectRecords.installUnitFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="installUnitFees" class="form-control layui-input" readonly="readonly"/>
+					</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" class="form-control" >${projectRecords.projectDesc}</textarea>
+					</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" class="form-control" >${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">
+						</tbody>
+					</table>
+					<script type="text/template" id="workClientLinkmanTpl">//<!--
+					<tr id="workClientLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workClientLinkmanList{{idx}}_id" name="workClientLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+						<input id="workClientLinkmanList{{idx}}_delFlag" name="workClientLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td>
+						{{row.clientId.name}}
+					</td>
+					<td>
+						{{row.name}}
+					</td>
+					<td>
+						{{row.linkPhone}}
+					</td>
+					<td>
+						{{row.linkMobile}}
+					</td>
+				</tr>//-->
+					</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="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">
+						</tbody>
+					</table>
+					<script type="text/template" id="workConstructionLinkmanTpl">//<!--
+					<tr id="workConstructionLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workConstructionLinkmanList{{idx}}_id" name="workConstructionLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+						<input id="workConstructionLinkmanList{{idx}}_delFlag" name="workConstructionLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td>
+						{{row.clientId.name}}
+					</td>
+					<td>
+						{{row.name }}
+					</td>
+					<td>
+						{{row.linkPhone}}
+					</td>
+					<td>
+						{{row.linkMobile}}
+					</td>
+				</tr>//-->
+					</script>
+				</div>
+			</div>
+
+			<c:if test="${not empty projectRecords.workAttachments}">
+			<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="listAttachment" class="table table-bordered table-condensed no-bottom-margin details">
+						<thead>
+						<tr>
+							<th width="25%">文件预览</th>
+							<th width="25%">上传人</th>
+							<th width="25%">上传时间</th>
+							<th width="25%">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectRecords.workAttachments}" var="workClientAttachment" varStatus="status">
+							<tr>
+									<%--<td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','95%','95%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','95%','95%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" pattern="yyyy-MM-dd"/></td>
+								<td  class="op-td">
+									<a href="javascript:location.href=encodeURI('${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file=${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									<%--<a href="#" onclick="seeFile('${workClientAttachment.url}','${workClientAttachment.attachmentName}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;查看</a>--%>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			</c:if>
+			<script>
+                var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                var workConstructionLinkmanRowIdx = 0, workConstructionLinkmanTpl = $("#workConstructionLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                $(document).ready(function() {
+                    var data = ${fns:toJson(projectRecords.workClientLinkmanList)};
+                    for (var i=0; i<data.length; i++){
+                        addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                        workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                    }
+                    var dataBank = ${fns:toJson(projectRecords.workConstructionLinkmanList)};
+                    for (var i=0; i<dataBank.length; i++){
+                        addRow('#workConstructionLinkmanList', workConstructionLinkmanRowIdx, workConstructionLinkmanTpl, dataBank[i]);
+                        workConstructionLinkmanRowIdx = workConstructionLinkmanRowIdx + 1;
+                    }
+                });
+
+			</script>
+
+			<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="usersListTable" class="table table-bordered table-condensed no-bottom-margin details">
+					<thead>
+					<tr>
+						<th width="25%">姓名</th>
+						<th width="25%">部门</th>
+						<th width="25%">职级</th>
+						<th width="25%">状态</th>
+					</tr>
+					</thead>
+					<tbody id="usersList">
+					<c:if test="${not empty projectRecords.projectMembers}">
+						<c:forEach items="${projectRecords.projectMembers}" var="user">
+							<tr id="${user.id}">
+								<td>
+										${user.name}
+								</td>
+								<td>
+										${user.office.name}
+								</td>
+								<td>
+										${user.basicInfo.jobGrade.name}
+								</td>
+								<td>
+									<c:choose>
+										<c:when test="${user.delFlag == 0}">
+											正常
+										</c:when>
+										<c:otherwise>
+											移除
+										</c:otherwise>
+									</c:choose>
+								</td>
+							</tr>
+						</c:forEach>
+					</c:if>
+					</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="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th width="25%">报告编号</th>
+							<th width="25%">报告名称</th>
+							<th width="20%">工作内容类型</th>
+							<th width="10%">签章类型</th>
+							<th width="10%">创建日期</th>
+							<th width="10%">状态</th>
+						</tr>
+						</thead>
+						<tbody>
+						<c:choose>
+							<c:when test="${not empty projectRecords.projectReportData}">
+								<c:forEach items="${projectRecords.projectReportData}" var="projectReportData" varStatus="index">
+									<tr>
+										<td><a title="${projectReportData.number}" href="javascript:void(0)" onclick="openDialogView('查看报告详情', '${ctx}/projectcontentinfo/projectcontentinfo/form1?id=${projectReportData.id}','95%', '95%')">
+												${projectReportData.number}
+										</a></td>
+										<td>
+													${projectReportData.name}
+										</td>
+										<td title="${fns:getContentTypeName(projectReportData.type,"")}">
+												${fns:getContentTypeName(projectReportData.type,"")}
+										</td>
+										<td title="${projectReportData.reportType}">
+												${projectReportData.reportType}
+										</td>
+										<td>
+											<fmt:formatDate value="${projectReportData.reportDate}" pattern="yyyy-MM-dd"/>
+										</td>
+										<td class="op-td">
+												<%--<c:choose>--%>
+												<%--<c:when test="${empty projectReportData.status || projectReportData.status eq 1}">--%>
+												<%--<div style="text-align: center">--%>
+												<%--<a href="javascript:void(0)" class="op-btn op-btn-trace" >${fns:getDictLabel(projectReportData.status, 'audit_state', '')}</a>--%>
+												<%--</div>--%>
+												<%--</c:when>--%>
+												<%--<c:otherwise>--%>
+												<%--<div style="text-align: center">--%>
+												<%--<a href="javascript:void(0)" onclick="openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=${id}&projectReportData.id=${projectReportData.id}&type=1','95%','95%')" class="op-btn op-btn-trace" >${fns:getDictLabel(projectReportData.status, 'audit_state', '')}</a>--%>
+												<%--</div>--%>
+												<%--</c:otherwise>--%>
+												<%--</c:choose>--%>
+											<div style="text-align: center" id="status_td_${index.index+1}">
+											</div>
+											<script>
+												initRecordStatus(${index.index+1},"${id}","${projectReportData.id}","${projectReportData.status}");
+											</script>
+										</td>
+									</tr>
+								</c:forEach>
+							</c:when>
+							<c:otherwise>
+								<tr>
+									<td colspan="7">
+										暂无数据
+									</td>
+								</tr>
+							</c:otherwise>
+						</c:choose>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 7 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp

@@ -70,7 +70,7 @@
             for(var i=0;i<files.length;i++) {
                 var file = files[i];
                 var attachmentId = "";
-                var attachmentFlag = "84";
+                var attachmentFlag = "86";
                 console.log(file);
                 var timestamp = new Date().getTime();
 
@@ -88,7 +88,7 @@
             for(var i=0;i<files.length;i++) {
                 var file = files[i];
                 var gistdataId = "";
-                var gistdataFlag = "84";
+                var gistdataFlag = "152";
                 console.log(file);
                 var timestamp = new Date().getTime();
 
@@ -106,7 +106,7 @@
             for(var i=0;i<files.length;i++) {
                 var file = files[i];
                 var attachmentId = "";
-                var attachmentFlag = "84";
+                var attachmentFlag = "153";
                 console.log(file);
                 var timestamp = new Date().getTime();
 
@@ -312,6 +312,7 @@
 		<form:hidden path="edit"/>
 		<form:hidden path="projectReportData.id"/>
 		<form:hidden path="projectReportData.createBy.id"/>
+		<form:hidden path="project.id"/>
 		<sys:message content="${message}"/>
 		<div class="form-group layui-row first lw12">
 			<div class="form-group-label"><h2>基本信息</h2></div>
@@ -410,6 +411,7 @@
 				</div>
 				<div id="addFile_attachment" style="display: none" class="upload-progress">
 					<span id="fileName_attachment" ></span>
+					<span id="_attachment" ></span>
 					<b><span id="baifenbi_attachment" ></span></b>
 					<div class="progress">
 						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
@@ -477,6 +479,7 @@
 				</div>
 				<div id="addFile_gistdata" style="display: none" class="upload-progress">
 					<span id="fileName_gistdata" ></span>
+					<span id="_gistdata" ></span>
 					<b><span id="baifenbi_gistdata" ></span></b>
 					<div class="progress">
 						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
@@ -544,6 +547,7 @@
 				</div>
 				<div id="addFile_other" style="display: none" class="upload-progress">
 					<span id="fileName_other" ></span>
+					<span id="_other" ></span>
 					<b><span id="baifenbi_other" ></span></b>
 					<div class="progress">
 						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">

+ 4 - 33
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp

@@ -4,7 +4,6 @@
 <head>
 	<title>项目列表</title>
 	<meta name="decorator" content="default"/>
-	<%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
 	<script type="text/javascript">
         $(document).ready(function() {
 
@@ -52,26 +51,6 @@
                 content: url,
                 skin: 'three-btns',
                 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中展示
-
-                    if (iframeWin.contentWindow.doSubmit()) {
-                        // top.layer.close(index);//关闭对话框。
-                        setTimeout(function () {
-                            top.layer.close(index)
-                        }, 100);//延时0.1秒,对应360 7.1版本bug
-                    }
-
-                },*/
                 btn1: function(index, layero){
                     var body = top.layer.getChildFrame('body', index);
                     var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
@@ -184,7 +163,7 @@
 	<div class="layui-row">
 		<div class="full-width fl">
 			<div class="layui-row contentShadow shadowLR" id="queryDiv">
-				<form:form id="searchForm" modelAttribute="ruralProjectRecords" action="${ctx}/ruralProject/ruralProjectRecords/" method="post" class="form-inline">
+				<form:form id="searchForm" modelAttribute="ruralProjectRecords" action="${ctx}/ruralProject/ruralProjectMessage/" method="post" class="form-inline">
 					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
 					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
@@ -258,14 +237,6 @@
 		<div class="full-width fl">
 			<div class="layui-form contentDetails contentShadow shadowLBR">
 				<div class="nav-btns">
-					<%--<shiro:hasPermission name="project:projectRecords:add">
-						<table:addRow url="${ctx}/ruralProject/ruralProjectRecords/form" title="项目"></table:addRow><!-- 增加按钮 -->
-					</shiro:hasPermission>
-					<shiro:hasPermission name="project:projectRecords:del">
-					</shiro:hasPermission>
-					<shiro:hasPermission name="project:projectRecords:export">
-						<table:exportExcel url="${ctx}/ruralProject/ruralProjectRecords/export"></table:exportExcel><!-- 导出按钮 -->
-					</shiro:hasPermission>--%>
 					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
 					<div style="clear: both;"></div>
 				</div>
@@ -313,7 +284,7 @@
                 ,{align:'center', title: '状态',  width:70,templet:function(d){
                         var st = getAuditState(d.projectReportStatus);
                         if(st.action)
-                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralProjectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralProjectMessage/getProcessOne?id=" + d.id + "&projectReportData.id=" + d.bid + "&type=2','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                         else
                             var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                         return xml;
@@ -341,10 +312,10 @@
                         {
                             xml+="<a href=\"${ctx}/ruralProject/ruralProjectRecords/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该项目报告审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
                         }
-                        if(d.canedit3 != undefined && d.canedit3 =="1")
+                        /*if(d.canedit3 != undefined && d.canedit3 =="1")
                         {
                             xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogre('项目变更管理', '${ctx}/ruralProject/ruralProjectRecordsAlter/form?alterBeforeRecords.id='+encodeURIComponent('" + d.id + "'),'95%','95%','','送审,暂存,关闭')\" style=\"color: white;background: darkseagreen\" class=\"op-btn op-btn-op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";
-                        }
+                        }*/
                         return xml;
 
                     }}