Browse Source

全过程分布结算审核功能开发

user5 2 years ago
parent
commit
e7dec98933
17 changed files with 2078 additions and 858 deletions
  1. 9 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectBasedData.java
  2. 25 17
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java
  3. 7 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectcontentinfoService.java
  4. 59 2
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectcontentinfoController.java
  5. 7 0
      src/main/java/com/jeeplus/modules/projectrecord/dao/ProjectImplementEarlyDao.java
  6. 18 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectAttachmentInfo.java
  7. 9 0
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectImplementEarlyService.java
  8. 1 1
      src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java
  9. 70 0
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  10. 1 1
      src/main/resources/mappings/modules/projectType/ProjectTypeDao.xml
  11. 9 2
      src/main/resources/mappings/modules/projectrecord/ProjectImplementEarlyDao.xml
  12. 25 0
      src/main/webapp/webpage/modules/projectcontentinfo/reportAudit.jsp
  13. 1481 571
      src/main/webapp/webpage/modules/projectcontentinfo/reportModifyApply.jsp
  14. 74 4
      src/main/webapp/webpage/modules/projectcontentinfo/reportView.jsp
  15. 2 2
      src/main/webapp/webpage/modules/projectrecord/check/checkDistributionSettlementList.jsp
  16. 6 2
      src/main/webapp/webpage/modules/projectrecord/check/reportForm.jsp
  17. 275 256
      src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/reportForm.jsp

+ 9 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectBasedData.java

@@ -40,6 +40,7 @@ public class ProjectBasedData extends DataEntity<ProjectBasedData> {
 	private Date endDate;
     private String typeLabel;
 
+    private String fileId;	//文件id
     private String fileType;
     private String fileName;
     private String fileUrl;
@@ -258,4 +259,12 @@ public class ProjectBasedData extends DataEntity<ProjectBasedData> {
 	public void setDataCategories(String dataCategories) {
 		this.dataCategories = dataCategories;
 	}
+
+	public String getFileId() {
+		return fileId;
+	}
+
+	public void setFileId(String fileId) {
+		this.fileId = fileId;
+	}
 }

+ 25 - 17
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java

@@ -541,12 +541,12 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 				variables.put("glydaList", glydas);
 				variables.put("gzrList", gzrs);*/
 			//|| bmzrs.size()==0 || fglds.size()==0 || bzshbs.size()==0 || fgzlfzs.size()==0 || glydas.size()==0 || gzrs.size()==0
-			if (masters.size()==0 ){
+			if (bzshbs.size()==0 ){
 				projectReportData.setStatus("1");
 				this.save(projectReportData);
 			}
-			if (masters.size()==0){
-				return "流程审批人不能为空,项目负责人下无用户,请联系管理员!";
+			if (bzshbs.size()==0){
+				return "流程审批人不能为空,总审下无用户,请联系管理员!";
 			}
 				/*if (bmzrs.size()==0){
 					return "流程审批人不能为空,角色部门负责人下无用户,请联系管理员!";
@@ -574,13 +574,13 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 				variables.put("glydacount",glydas.size());
 				variables.put("gzrcount",gzrs.size());*/
 			processType = "reportAudit";
-			users.addAll(masters);
-			variables.put("masterList", masters);
-			variables.put("mastercount", masters.size());
+			users.addAll(bzshbs);
+			variables.put("bzshbList", bzshbs);
+			variables.put("bzshbcount", bzshbs.size());
 		}
 		for (User u : users){
 			workProjectNotify.setUser(u);
-			workProjectNotify.setNotifyRole("项目负责人审批");
+			workProjectNotify.setNotifyRole("总审审批");
 			workProjectNotify.setId("");
 			workProjectNotifyService
 					.save(workProjectNotify);
@@ -622,10 +622,10 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 			workActivityProcess.setProcessInstanceId(processInstance.getId());
 			workActivityProcess.setIsApproval("0");
 			workActivityProcessService.insert(workActivityProcess);
-			workActivityProcess.setCount(2);
+			/*workActivityProcess.setCount(2);
 			workActivityProcessService.insert(workActivityProcess);
 			workActivityProcess.setCount(3);
-			workActivityProcessService.insert(workActivityProcess);
+			workActivityProcessService.insert(workActivityProcess);*/
 //			workActivityProcess.setCount(4);
 //			workActivityProcessService.insert(workActivityProcess);
 //			workActivityProcess.setCount(5);
@@ -636,14 +636,14 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 //			workActivityProcessService.insert(workActivityProcess);
 //			workActivityProcess.setCount(8);
 //			workActivityProcessService.insert(workActivityProcess);
-			workActivityProcessService.insertAuditsByType(masters,processInstance.getId(),1,1);
+			workActivityProcessService.insertAuditsByType(bzshbs,processInstance.getId(),1,1);
 //			workActivityProcessService.insertAuditsByType(bmzrs,processInstance.getId(),2,0);
 //			workActivityProcessService.insertAuditsByType(bzshbygs,processInstance.getId(),3,0);
-			workActivityProcessService.insertAuditsByType(bzshbs,processInstance.getId(),2,0);
+			//workActivityProcessService.insertAuditsByType(bzshbs,processInstance.getId(),2,0);
 //			workActivityProcessService.insertAuditsByType(fglds,processInstance.getId(),5,0);
 //			workActivityProcessService.insertAuditsByType(fgzlfzs,processInstance.getId(),6,0);
 //			workActivityProcessService.insertAuditsByType(glydas,processInstance.getId(),4,0);
-			workActivityProcessService.insertAuditsByType(gzrs,processInstance.getId(),3,0);
+			//workActivityProcessService.insertAuditsByType(gzrs,processInstance.getId(),3,0);
 		}
        /* logger.info("保存数据:"+(s2-s1)+"[ms],查询每个节点的审批用户列表"+(s3-s2)+
                 "[ms],工作流加入参数:"+(s4-s3)+"[ms],发送推送IM APP消息:"+(s5-s4)+
@@ -1045,10 +1045,10 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 						workActivityProcess.setIsApproval("2");
 					}
 					break;
-				}else if ("bzshb".equals(taskDefKey) && count.contains("2")) {
-					taskCount = "2";
+				}else if ("bzshb".equals(taskDefKey) && count.contains("1")) {
+					taskCount = "1";
 					exp = "pass";
-					if ("yes".equals(flag)) {
+					/*if ("yes".equals(flag)) {
 						workActivityProcessService.insertAuditsByType(auditUsers,reportData.getProcessInstanceId(),5,1);
 
 						notifyRole = "盖章人盖章";
@@ -1059,6 +1059,14 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 					} else {
 						notifyRole = "调整报告";
 						workActivityProcess.setIsApproval("2");
+					}*/
+
+					if ("yes".equals(flag)) {
+						notifyRole = "审批通过";
+						workActivityProcess.setIsApproval("1");
+					} else {
+						notifyRole = "调整报告";
+						workActivityProcess.setIsApproval("2");
 					}
 					break;
 				} else if ("gzr".equals(taskDefKey) && count.contains("3")) {
@@ -1073,11 +1081,11 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 					}
 					break;
 				} else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
-					notifyRole = "负责人审批";
+					notifyRole = "总审审批";
 					taskCount = "0";
 					exp = "pass";
 					workActivityProcess.setCount(0);
-					enname = "master";
+					enname = "bzshb";
 					if (!"yes".equals(flag)) {
 						projectReportData.setStatus("3");
 					}

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

@@ -361,6 +361,8 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 							ProjectAttachmentInfo projectAttachmentInfo = new ProjectAttachmentInfo();
 							projectAttachmentInfo.setAttachmentId(workattachment.getId());
 							projectAttachmentInfo.setProjectId(data.getId());
+							projectAttachmentInfo.setProjectId(data.getId());
+							projectAttachmentInfo.setType(projectContentData.getType());
 							projectImplementEarlyService.saveProjectAndAttachmentContact(projectAttachmentInfo);
 						}
 					}else{
@@ -503,6 +505,8 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 					//判定是否为全过程管理中的项目复核模块
 					if("132".equals(data.getFlag())){
 						if("132".equals(data.getFileAttachmentFlag())) {
+							//删除已存在的工作内容和依据性资料关系
+							projectImplementEarlyService.delProjectContrntAndBasedId(projectReportData.getProjectContentDataList().get(0).getId(),data.getId());
 							//添加工作内容和依据性资料关系
 							projectImplementEarlyService.saveProjectContrntAndBasedId(projectReportData.getProjectContentDataList().get(0).getId(),data.getId());
 							//将工作内容信息附件保存
@@ -520,6 +524,9 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 							ProjectAttachmentInfo projectAttachmentInfo = new ProjectAttachmentInfo();
 							projectAttachmentInfo.setAttachmentId(workattachment.getId());
 							projectAttachmentInfo.setProjectId(data.getId());
+							projectAttachmentInfo.setType(projectReportData.getType());
+							projectAttachmentInfo.setContentDataId(projectReportData.getProjectContentDataList().get(0).getId());
+							projectImplementEarlyService.delProjectAndAttachmentContact(projectAttachmentInfo);
 							projectImplementEarlyService.saveProjectAndAttachmentContact(projectAttachmentInfo);
 						}
 					}else{

+ 59 - 2
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectcontentinfoController.java

@@ -909,6 +909,9 @@ public class ProjectcontentinfoController extends BaseController {
 			model.addAttribute("achievementId", projectReportData.getAchievementType());
 			model.addAttribute("reviewStandard", projectReportData.getReviewStandard());
 			model.addAttribute("projectId", records.getId());
+			if(StringUtils.isNotBlank(projectReportData.getAchievementType())){
+				projectReportData.setTemplateTypeName(DictUtils.getMainDictLabel(projectReportData.getAchievementType(), "achievement_type", ""));
+			}
 			if("according".equals(projectcontentinfo.getCondition()) || "completion".equals(projectcontentinfo.getCondition())){
 				if(StringUtils.isNotBlank(projectReportData.getAchievementType())){
 					ProjectTemplateType projectTemplateType = projectResultsFileTemplateService.get(projectReportData.getAchievementType());
@@ -916,7 +919,14 @@ public class ProjectcontentinfoController extends BaseController {
 						projectReportData.setTemplateTypeName(projectTemplateType.getTypeName());
 					}
 				}
+
+				Act act = getByAct(projectReportData.getProcessInstanceId());
+				projectReportData.setAct(act);
 				if ("edit".equals(projectcontentinfo.getFlag())) {
+					if("modifyApply".equals(act.getTaskDefKey())){
+						model.addAttribute("condition", "according");
+						return "modules/projectcontentinfo/reportModifyApply";
+					}
 					return "modules/projectrecord/workContentFromAndView/reportForm";
 				} else {
 					return "modules/projectrecord/workContentFromAndView/reportView";
@@ -1105,7 +1115,7 @@ public class ProjectcontentinfoController extends BaseController {
 					model.addAttribute("list", list);*/
 
 					if("according".equals(projectcontentinfo.getCondition())){
-						return "redirect:"+Global.getAdminPath()+"/project/projectEarlyReview/?repage";
+						return "redirect:"+Global.getAdminPath()+"/project/checkDistributionSettlement/?repage";
 					}
 					if("completion".equals(projectcontentinfo.getCondition())){
 						return "redirect:"+Global.getAdminPath()+"/project/projectCompletionReview/?repage";
@@ -1177,7 +1187,7 @@ public class ProjectcontentinfoController extends BaseController {
 					return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
 				}
 				if("according".equals(projectcontentinfo.getCondition())){
-					return "redirect:"+Global.getAdminPath()+"/project/projectEarlyReview/?repage";
+					return "redirect:"+Global.getAdminPath()+"/project/checkDistributionSettlement/?repage";
 				}
 				if("completion".equals(projectcontentinfo.getCondition())){
 					return "redirect:"+Global.getAdminPath()+"/project/projectCompletionReview/?repage";
@@ -1847,6 +1857,53 @@ public class ProjectcontentinfoController extends BaseController {
 	@RequestMapping("form1")
 	public String form1(String id,Model model){
 		ProjectReportData projectReportData = projectReportDataService.get(id);
+
+		/**
+		 * 查询配置的宜居性资料并添加到展示view中
+		 */
+		List<ProjectBasedData> projectBasedDataList =  projectTypeService.getAccrdingDataList(projectReportData.getProjectContentDataList().get(0).getType());
+		for (ProjectBasedData projectBasedData: projectBasedDataList) {
+			ProjectBasedData contentAttachmentData =  projectTypeService.getBasedData(projectReportData.getProjectContentDataList().get(0).getId(),projectBasedData.getId());
+			if (null != contentAttachmentData) {
+				try {
+					MyBeanUtils.copyBeanNotNull2Bean(contentAttachmentData, projectBasedData);
+				}catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+			projectBasedData.setFlag("according");
+			if (StringUtils.isNotBlank(projectBasedData.getFileAttachmentId())) {
+				projectBasedData.setUploadUser(UserUtils.get(projectBasedData.getFileAttachmentId()));
+			}
+		}
+		for (ProjectBasedData info : projectBasedDataList) {
+			if(StringUtils.isNotBlank(info.getFileUrl())){
+				String newUrl = workattachmentService.fileUrlManageOnPrefix(info.getFileUrl());
+				info.setFileUrl(newUrl);
+				info.setTemporaryUrl(workattachmentService.fileUrlManage(info.getFileUrl()));
+			}
+		}
+		for (ProjectBasedData projectBasedData: projectReportData.getProjectBasedDataList()) {
+			projectBasedData.setType(dictService.dictLabel("project_document_type",projectBasedData.getType()));
+		}
+		projectReportData.getProjectBasedDataList().addAll(projectBasedDataList);
+
+		if (projectReportData.getMaster()==null || StringUtils.isBlank(projectReportData.getMaster().getId())){
+			projectReportData.setMaster(UserUtils.getUser());
+		}
+		if (StringUtils.isBlank(projectReportData.getStatus())){
+			projectReportData.setFileStatus("1");
+		}
+
+		if(StringUtils.isNotBlank(projectReportData.getAchievementType())){
+			ProjectTemplateType projectTemplateType = projectResultsFileTemplateService.get(projectReportData.getAchievementType());
+			if(null != projectTemplateType){
+				projectReportData.setTemplateTypeName(projectTemplateType.getTypeName());
+			}
+		}
+
+
+
 		Projectcontentinfo projectcontentinfo = new Projectcontentinfo();
 		projectcontentinfo.setProjectReportData(projectReportData);
 		model.addAttribute("projectcontentinfo", projectcontentinfo);

+ 7 - 0
src/main/java/com/jeeplus/modules/projectrecord/dao/ProjectImplementEarlyDao.java

@@ -25,6 +25,13 @@ public interface ProjectImplementEarlyDao extends CrudDao<ProjectImplementEarly>
     Integer saveProjectAndAttachmentContact(ProjectAttachmentInfo projectAttachmentInfo);
 
     /**
+     * 删除依据性文件 信息
+     * @param projectAttachmentInfo
+     * @return
+     */
+    Integer delProjectAndAttachmentContact(ProjectAttachmentInfo projectAttachmentInfo);
+
+    /**
      * 添加项目内容id和项目报告id的关系
      * @param contentId
      * @param reportId

+ 18 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectAttachmentInfo.java

@@ -7,6 +7,8 @@ public class ProjectAttachmentInfo {
 
     private String projectId;   //项目id
     private String AttachmentId;  //文件id
+    private String type;  //类型
+    private String contentDataId;  //项目id
 
     public String getProjectId() {
         return projectId;
@@ -23,4 +25,20 @@ public class ProjectAttachmentInfo {
     public void setAttachmentId(String attachmentId) {
         AttachmentId = attachmentId;
     }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getContentDataId() {
+        return contentDataId;
+    }
+
+    public void setContentDataId(String contentDataId) {
+        this.contentDataId = contentDataId;
+    }
 }

+ 9 - 0
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectImplementEarlyService.java

@@ -994,6 +994,15 @@ public class ProjectImplementEarlyService extends CrudService<ProjectImplementEa
      * @param projectAttachmentInfo
      * @return
      */
+    public Integer delProjectAndAttachmentContact(ProjectAttachmentInfo projectAttachmentInfo){
+        return dao.delProjectAndAttachmentContact(projectAttachmentInfo);
+    }
+
+    /**
+     * 添加依据性资料和文件id关系
+     * @param projectAttachmentInfo
+     * @return
+     */
     public Integer saveProjectAndAttachmentContact(ProjectAttachmentInfo projectAttachmentInfo){
         return dao.saveProjectAndAttachmentContact(projectAttachmentInfo);
     }

+ 1 - 1
src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java

@@ -1315,7 +1315,7 @@ public class WorkFullManageController extends BaseController {
 			if(StringUtils.isBlank(currentConsultant.getAuditOpinion())){
 				data.put("projectMasterRemarks","");
 			}else{
-				data.put("projectMasterRemarks",currentConsultant.getAuditOpinion());
+				data.put("projectMasterRemarks","<p>3312</p><p>432</p><p>753543</p>");
 			}
 			data.put("projectYear","");
 			data.put("projectMonth","");

+ 70 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -56,6 +56,8 @@ import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchProInfo;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation;
 import com.jeeplus.modules.projectFilingBatch.service.ProjectFilingBatchService;
+import com.jeeplus.modules.projectType.entity.ProjectTemplateType;
+import com.jeeplus.modules.projectType.service.ProjectResultsFileTemplateService;
 import com.jeeplus.modules.projectType.service.ProjectTypeService;
 import com.jeeplus.modules.projectcontentinfo.entity.*;
 import com.jeeplus.modules.projectcontentinfo.service.*;
@@ -522,6 +524,8 @@ public class WorkProjectNotifyController extends BaseController {
 	private BusinessQuestionsService businessQuestionsService;
 	@Autowired
 	private WorkProjectNotifyRecoverService workProjectNotifyRecoverService;
+	@Autowired
+	private ProjectResultsFileTemplateService projectResultsFileTemplateService;
 
 	@ModelAttribute
 	public WorkProjectNotify get(@RequestParam(required=false) String id) {
@@ -3450,8 +3454,74 @@ public class WorkProjectNotifyController extends BaseController {
 					workReviewAudit.setType(type);
 					workReviewAudit.setReportId(workProjectNotify.getNotifyId());
 					List<WorkReviewAudit> workReviewAudits = workReviewStandardService.findAuditList(workReviewAudit);
+
+
+
+					model.addAttribute("reportType",projectcontentinfo.getReportType());
+					projectReportData = new ProjectReportData();
+					projectReportData.setType(projectcontentinfo.getDictType());
+					if (StringUtils.isNotBlank(projectcontentinfo.getInfoId())){
+						projectReportData = projectReportDataService.get(projectcontentinfo.getInfoId());
+					}else if (projectcontentinfo.getProjectReportData()!=null && StringUtils.isNotBlank(projectcontentinfo.getProjectReportData().getId())) {
+						projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+					}else {
+						projectReportData.setNumber("");
+					}
+					/**
+					 * 查询配置的宜居性资料并添加到展示view中
+					 */
+					List<ProjectBasedData> projectBasedDataList =  projectTypeService.getAccrdingDataList(projectReportData.getProjectContentDataList().get(0).getType());
+					for (ProjectBasedData projectBasedData: projectBasedDataList) {
+						ProjectBasedData contentAttachmentData =  projectTypeService.getBasedData(projectReportData.getProjectContentDataList().get(0).getId(),projectBasedData.getId());
+						if (null != contentAttachmentData) {
+							try {
+								MyBeanUtils.copyBeanNotNull2Bean(contentAttachmentData, projectBasedData);
+							}catch (Exception e) {
+								e.printStackTrace();
+							}
+						}
+						projectBasedData.setFlag("according");
+						if (StringUtils.isNotBlank(projectBasedData.getFileAttachmentId())) {
+							projectBasedData.setUploadUser(UserUtils.get(projectBasedData.getFileAttachmentId()));
+						}
+					}
+					for (ProjectBasedData info : projectBasedDataList) {
+						if(StringUtils.isNotBlank(info.getFileUrl())){
+							String newUrl = workattachmentService.fileUrlManageOnPrefix(info.getFileUrl());
+							info.setFileUrl(newUrl);
+							info.setTemporaryUrl(workattachmentService.fileUrlManage(info.getFileUrl()));
+						}
+					}
+					for (ProjectBasedData projectBasedData: projectReportData.getProjectBasedDataList()) {
+						projectBasedData.setType(dictService.dictLabel("project_document_type",projectBasedData.getType()));
+					}
+					projectReportData.getProjectBasedDataList().addAll(projectBasedDataList);
+
+					if (projectReportData.getMaster()==null || StringUtils.isBlank(projectReportData.getMaster().getId())){
+						projectReportData.setMaster(UserUtils.getUser());
+					}
+					if (StringUtils.isBlank(projectReportData.getStatus())){
+						projectReportData.setFileStatus("1");
+					}
+
+					if(StringUtils.isNotBlank(projectReportData.getAchievementType())){
+						ProjectTemplateType projectTemplateType = projectResultsFileTemplateService.get(projectReportData.getAchievementType());
+						if(null != projectTemplateType){
+							projectReportData.setTemplateTypeName(projectTemplateType.getTypeName());
+						}
+					}
+
+					projectcontentinfo.setProjectReportData(projectReportData);
+
+
+					projectReportData.setAct(act);
 					model.addAttribute("type", type);
 					model.addAttribute("list", workReviewAudits);
+					model.addAttribute("projectcontentinfo", projectcontentinfo);
+					model.addAttribute("achievementParentId", projectReportData.getType());
+					model.addAttribute("achievementId", projectReportData.getAchievementType());
+					model.addAttribute("reviewStandard", projectReportData.getReviewStandard());
+					model.addAttribute("condition", "according");
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						return "modules/projectcontentinfo/reportView";
 					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {

+ 1 - 1
src/main/resources/mappings/modules/projectType/ProjectTypeDao.xml

@@ -206,7 +206,7 @@
 	</select>
 
 	<select id="getBasedData" resultType="ProjectBasedData">
-		select ifnull(wa.url,'') as fileUrl,ifnull(wa.type,'') as fileType,ifnull(wa.attachment_flag,'') as fileAttachmentFlag,
+		select wa.id as "fileId",ifnull(wa.url,'') as fileUrl,ifnull(wa.type,'') as fileType,ifnull(wa.attachment_flag,'') as fileAttachmentFlag,
 		ifnull(wa.attachment_name,'') as fileName,ifnull(wa.update_date,'') as uploadDate,
 		ifnull(wa.update_by,'') as fileAttachmentId
 		from project_content_based_relation pcbr

+ 9 - 2
src/main/resources/mappings/modules/projectrecord/ProjectImplementEarlyDao.xml

@@ -231,11 +231,18 @@
     </select>
 
 	<insert id="saveProjectAndAttachmentContact">
-		insert into project_attachment_info (project_id, attachment_id)
+		insert into project_attachment_info (project_id, attachment_id,`type`,content_data_id)
 		values
-  		(#{projectId}, #{attachmentId})
+  		(#{projectId}, #{attachmentId},#{type},#{contentDataId})
 	</insert>
 
+	<delete id="delProjectAndAttachmentContact">
+		delete from project_attachment_info
+		where project_id = #{projectId}
+		and `type` = #{type}
+		and content_data_id = #{contentDataId}
+	</delete>
+
 	<insert id="saveProjectContrntAndReport">
 		insert into project_content_report (content_id, report_id)
 		values

+ 25 - 0
src/main/webapp/webpage/modules/projectcontentinfo/reportAudit.jsp

@@ -445,6 +445,31 @@
 	</div>
 	<script>
     $(function () {
+		var leftPanel = document.getElementsByClassName("left-panel");//获取到的是一个类数组
+		for(var i=0;i<leftPanel.length;i++){
+			leftPanel[i].style.display = "none";        //隐藏
+		}
+
+		var rightPanel = document.getElementsByClassName("right-panel");//获取到的是一个类数组
+		for(var i=0;i<rightPanel.length;i++){
+			rightPanel[i].style.display = "none";        //隐藏
+		}
+
+		var checkTabs = document.getElementsByClassName("check-tabs");//获取到的是一个类数组
+		for(var i=0;i<checkTabs.length;i++){
+			checkTabs[i].style.display = "none";        //隐藏
+		}
+
+		var leftClose = document.getElementsByClassName("left-close");//获取到的是一个类数组
+		for(var i=0;i<leftClose.length;i++){
+			leftClose[i].style.display = "none";        //隐藏
+		}
+		var rightClose = document.getElementsByClassName("right-close");//获取到的是一个类数组
+		for(var i=0;i<rightClose.length;i++){
+			rightClose[i].style.display = "none";        //隐藏
+		}
+		$(".middle-panel").attr('style','margin:0px')
+		$(".middle-panel-content").attr('style','margin:0px')
    	 	$('.check_menuTabs').on('click', '.check_menuTab', activeCheckTab);
         $('.check_menuTabs').on('click', '.check_menuTab i', closeCheckTab);
         // 左移按扭

File diff suppressed because it is too large
+ 1481 - 571
src/main/webapp/webpage/modules/projectcontentinfo/reportModifyApply.jsp


+ 74 - 4
src/main/webapp/webpage/modules/projectcontentinfo/reportView.jsp

@@ -152,11 +152,13 @@
 					<thead>
 					<tr>
 						<th class="hide"></th>
-						<th >资料编号</th>
 						<th >资料名称</th>
 						<th >资料类别</th>
+						<th >资料性质</th>
+						<th >资料内容</th>
 						<th >上传人</th>
 						<th >上传日期</th>
+						<th>操作</th>
 					</tr>
 					</thead>
 					<tbody id="workBaseDataList">
@@ -166,13 +168,64 @@
 								<input type="hidden" id="workBaseDataList${idx.index}_id" value="${projectBasedData.id}">
 							</td>
 							<td style="text-align:center;">
-									${projectBasedData.number}
+									${projectBasedData.name}
 							</td>
 							<td style="text-align:center;">
-									${projectBasedData.name}
+									${projectBasedData.type}
+							</td>
+							<td style="text-align:center;">
+								<div id="workBaseDataList${idx.index}_nature">
+										${projectBasedData.nature}
+								</div>
 							</td>
 							<td style="text-align:center;">
-									${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}
+								<div id="workBaseDataList${idx.index}_fileTypeDiv">
+									<c:choose>
+										<c:when test="${projectcontentinfo.projectReportData.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(projectBasedData.fileName,'jpg')
+                                                           or fn:containsIgnoreCase(projectBasedData.fileName,'png')
+                                                           or fn:containsIgnoreCase(projectBasedData.fileName,'gif')
+                                                           or fn:containsIgnoreCase(projectBasedData.fileName,'bmp')
+                                                           or fn:containsIgnoreCase(projectBasedData.fileName,'jpeg')}">
+													<img src="${projectBasedData.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${projectBasedData.temporaryUrl}','90%','90%')" alt="${projectBasedData.fileName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(projectBasedData.fileName,'pdf')}">
+															<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${projectBasedData.temporaryUrl}','90%','90%','1')">${projectBasedData.fileName}</a>
+														</c:when>
+														<c:otherwise>
+															<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${projectBasedData.temporaryUrl}','90%','90%')">${projectBasedData.fileName}</a>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(projectBasedData.fileName,'jpg')
+															   or fn:containsIgnoreCase(projectBasedData.fileName,'png')
+															   or fn:containsIgnoreCase(projectBasedData.fileName,'gif')
+															   or fn:containsIgnoreCase(projectBasedData.fileName,'bmp')
+															   or fn:containsIgnoreCase(projectBasedData.fileName,'jpeg')}">
+													<img src="${projectBasedData.fileUrl}" width="50" height="50" title ="${projectBasedData.fileName}" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${projectBasedData.fileUrl}','90%','90%')" alt="${projectBasedData.fileName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(projectBasedData.fileName,'pdf')}">
+															<a class="attention-info" href="javascript:void(0)" title ="${projectBasedData.fileName}" onclick="preview('预览','${projectBasedData.fileUrl}','90%','90%','1')">${projectBasedData.fileName}</a>
+														</c:when>
+														<c:otherwise>
+															<a class="attention-info" href="javascript:void(0)" title ="${projectBasedData.fileName}" onclick="preview('预览','${projectBasedData.fileUrl}','90%','90%')">${projectBasedData.fileName}</a>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+
+								</div>
 							</td>
 							<td style="text-align:center;">
 									${projectBasedData.uploadUser.name}
@@ -180,6 +233,23 @@
 							<td style="text-align:center;">
 								<fmt:formatDate value="${projectBasedData.uploadDate}" pattern="yyyy-MM-dd"/>
 							</td>
+							<td class="text-center op-td">
+								<div id="workBaseDataList${idx.index}_operation">
+									<c:choose>
+										<c:when test="${ projectBasedData.flag =='according'}">
+											<c:choose>
+												<c:when test="${not empty projectBasedData.fileUrl}">
+													<a href="${projectBasedData.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:when>
+												<c:otherwise>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+										</c:otherwise>
+									</c:choose>
+								</div>
+							</td>
 						</tr>
 					</c:forEach>
 					</tbody>

+ 2 - 2
src/main/webapp/webpage/modules/projectrecord/check/checkDistributionSettlementList.jsp

@@ -170,7 +170,7 @@
                 </ul>
             </div>
             <div class="layui-row contentShadow shadowLR" id="queryDiv">
-                <form:form id="searchForm" modelAttribute="constructionContract" action="${ctx}/project/distributionSettlement/list" method="post" class="form-inline">
+                <form:form id="searchForm" modelAttribute="constructionContract" action="${ctx}/project/checkDistributionSettlement/list" 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}"/>
                     <div class="commonQuery lw14">
@@ -549,7 +549,7 @@
                             parent.layer.msg(data.msg,{icon:2});
                         }
                         //parent.refreshTrees();
-                        location = '${ctx}/project/projectVisa/list';
+                        location = '${ctx}/project/checkDistributionSettlement/list';
                     }
                 });
             }

+ 6 - 2
src/main/webapp/webpage/modules/projectrecord/check/reportForm.jsp

@@ -924,7 +924,7 @@
 				<label class="layui-form-label"><span class="require-item">*</span>报告编号:</label>
 				<div class="layui-input-block">
 					<div class="input-group">
-						<form:input  path="projectReportData.number" onclick="selectNum()" id="number" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
+						<form:input  path="projectReportData.number" onclick="selectNum()"  style="background-color: #FFFFFF;" id="number" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
 						<span class="input-group-btn" onclick="selectNum()">
 								<label class="form-status">
 									<c:choose>
@@ -957,7 +957,7 @@
 			<div class="layui-item layui-col-sm6">
 				<label class="layui-form-label"><span class="require-item">*</span>报告日期:</label>
 				<div class="layui-input-block">
-					<input id="reportDate" name="projectReportData.reportDate" type="text" htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+					<input id="reportDate" name="projectReportData.reportDate"  style="background-color: #FFFFFF;" type="text" htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
 						   value="<fmt:formatDate value="${projectcontentinfo.projectReportData.reportDate}" pattern="yyyy-MM-dd"/>"/>
 				</div>
 			</div>
@@ -1138,6 +1138,9 @@
 											<c:choose>
 												<c:when test="${not empty projectBasedData.fileUrl}">
 													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${projectBasedData.fileUrl}');" 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=${projectBasedData.url}&id=${projectBasedData.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>--%>
+													<%--<a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>--%>
+													<a href="javascript:void(0)" onclick="accordingBtn(this,'#workBaseDataList${idx.index}')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i>&nbsp;修改</a>
 												</c:when>
 												<c:otherwise>
 													<a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
@@ -1238,6 +1241,7 @@
                         });
                     }
                     function delRowBaseData(obj, prefix,userId){
+						console.log(${projectcontentinfo});
                         var id = $(prefix+"_id").val();
                         /* var createBy = $(prefix+"_userId").val();*/
                         var currentUser = '${fns:getUser().id}';

+ 275 - 256
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/reportForm.jsp

@@ -93,7 +93,7 @@
             $.ajax({
                 type:"post",
                 url:'${ctx}/projectcontentinfo/projectcontentinfo/getAchievementTypeList',
-                data:{"achievementParentId":achievementParentId,type:1},
+                data:{"achievementParentId":"",type:1},
                 dataType:"json",
                 success:function(data){
                     if(data.success) {
@@ -108,7 +108,7 @@
                             $('#achievementType').append(new Option(dataList[i].label, dataList[i].value,null,flag));
                         }
 
-                        layui.form.render("select");
+						layui.form.render("select");
                     }else {
                         top.layer.msg("获取数据失败!", {icon: 0});
                     }
@@ -843,6 +843,24 @@
 				}
 			})
 		}
+
+
+		function deleteFileFromAliyun(obj,deleteUrl){
+			$.ajax({
+				type:"post",
+				url:deleteUrl,
+				success:function(data){
+					if(data.str){
+						parent.layer.msg('删除成功',{icon:1});
+
+						$("#contentTableBase").load(location.href + " #contentTableBase");
+
+					}else {
+						parent.layer.msg('删除失败',{icon:1});
+					}
+				}
+			});
+		}
 	</script>
 
 </head>
@@ -916,11 +934,11 @@
 			<div class="layui-item layui-col-sm6">
 				<label class="layui-form-label"><span class="require-item">*</span>成果类型:</label>
 				<div class="layui-input-block">
-					<select name="projectReportData.achievementType" id="achievementType" lay-verify="achievementType" lay-filter="reviewStandardFilter"></select>
-					<%--<form:select  path="projectReportData.achievementType" class="required">
+					<%--<select name="projectReportData.achievementType" id="achievementType" disabled  lay-verify="achievementType" lay-filter="reviewStandardFilter"></select>--%>
+					<form:select  path="projectReportData.achievementType" class="required" lay-verify="achievementType" lay-filter="reviewStandardFilter">
 						<form:option value="" label=""/>
 						<form:options items="${fns:getMainDictList('achievement_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-					</form:select>--%>
+					</form:select>
 				</div>
 			</div>
 			<div class="layui-item layui-col-sm6">
@@ -1029,19 +1047,19 @@
 				</div>--%>
 			<div class="form-group layui-row first lw12">
 				<div class="form-group-label"><h2>依据性资料明细</h2></div>
-				<%--<div class="layui-item nav-btns">
-					<a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${projectcontentinfo.dictType}&id=${projectcontentinfo.id}&parentIds=${projectcontentinfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
+					<%--<div class="layui-item nav-btns">
+                        <a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${projectcontentinfo.dictType}&id=${projectcontentinfo.id}&parentIds=${projectcontentinfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
 
-					<sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"
-											cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>
-				</div>--%>
+                        <sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"
+                                                cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>
+                    </div>--%>
 
 				<div class="layui-item layui-col-xs12 form-table-container">
 					<table id="contentTableBase" class="table table-bordered table-condensed details">
 						<thead>
 						<tr>
 							<th class="hide"></th>
-							<%--<th >资料编号</th>--%>
+								<%--<th >资料编号</th>--%>
 							<th >资料名称</th>
 							<th >资料类别</th>
 							<th >资料性质</th>
@@ -1069,9 +1087,9 @@
 									<input id="workBaseDataList${idx.index}_fileAttachmentFlag"	 name="projectReportData.projectBasedDataList[${idx.index}].fileAttachmentFlag"   type="hidden" value=""/>
 									<input id="workBaseDataList${idx.index}_fileAttachmentId"	 name="projectReportData.projectBasedDataList[${idx.index}].fileAttachmentId"   type="hidden" value=""/>
 								</td>
-							<%--	<td style="text-align:center;">
-										${idx.index+1}
-								</td>--%>
+									<%--	<td style="text-align:center;">
+                                                ${idx.index+1}
+                                        </td>--%>
 								<td style="text-align:center;">
 										${projectBasedData.name}
 								</td>
@@ -1141,22 +1159,23 @@
 
 								<td class="text-center op-td">
 									<div id="workBaseDataList${idx.index}_operation">
-									<c:choose>
-										<c:when test="${ projectBasedData.flag =='according'}">
-											<c:choose>
-												<c:when test="${not empty projectBasedData.fileUrl}">
-													<a href="${projectBasedData.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:when>
-												<c:otherwise>
-													<a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
-												</c:otherwise>
-											</c:choose>
+										<c:choose>
+											<c:when test="${ projectBasedData.flag =='according'}">
+												<c:choose>
+													<c:when test="${not empty projectBasedData.fileUrl}">
+														<%--<a href="${projectBasedData.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>--%>
+														<a href="javascript:void(0)" onclick="accordingBtn(this,'#workBaseDataList${idx.index}')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i>&nbsp;修改</a>
+													</c:when>
+													<c:otherwise>
+														<a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
+													</c:otherwise>
+												</c:choose>
 
-										</c:when>
-										<c:otherwise>
-											<%--<a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>--%>
-										</c:otherwise>
-									</c:choose>
+											</c:when>
+											<c:otherwise>
+												<%--<a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>--%>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
 							</tr>
@@ -1200,157 +1219,157 @@
                 </tr>//-->
 				</script>
 				<script type="text/javascript">
-                    var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-                    var workBaseDataRowIdx = ${fn:length(projectcontentinfo.projectReportData.projectBasedDataList)};
-                 /*   function setValuee(obj){
-                        var idx = $("#workBaseDataList tr").length;
-                        if(existBaseData(obj.id,idx)) {
-                            return;
-                        }
-                        addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,obj);
-                    }*/
-                    function setValuee(obj){
-                        for(var i=0;i<obj.length;i++){
-                            var idArr = $("#workBaseDataList tr:visible .clientId");
-                            if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
-                                addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
-                                workBaseDataRowIdx=workBaseDataRowIdx+1;
-                            }
-                        }
-                    }
-                    function existBaseData(id,length) {
-                        for (var i=0;i<length;i++) {
-                            var val = $('#workBaseDataList'+i+'_id').val();
-                            if(id==val){
-                                return true;
-                            }
-                        }
-                        return false;
-                    }
+					var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+					var workBaseDataRowIdx = ${fn:length(projectcontentinfo.projectReportData.projectBasedDataList)};
+					/*   function setValuee(obj){
+                           var idx = $("#workBaseDataList tr").length;
+                           if(existBaseData(obj.id,idx)) {
+                               return;
+                           }
+                           addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,obj);
+                       }*/
+					function setValuee(obj){
+						for(var i=0;i<obj.length;i++){
+							var idArr = $("#workBaseDataList tr:visible .clientId");
+							if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+								addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
+								workBaseDataRowIdx=workBaseDataRowIdx+1;
+							}
+						}
+					}
+					function existBaseData(id,length) {
+						for (var i=0;i<length;i++) {
+							var val = $('#workBaseDataList'+i+'_id').val();
+							if(id==val){
+								return true;
+							}
+						}
+						return false;
+					}
 
-                    function addRowBaseData(list, idx, tpl, row){
-                        bornTemplete(list, idx, tpl, row, idx);
-                    }
+					function addRowBaseData(list, idx, tpl, row){
+						bornTemplete(list, idx, tpl, row, idx);
+					}
 
-                    function bornTemplete(list, idx, tpl, row, idx1){
-                        var idx1 = $("#workBaseDataList tr").length +1;
-                        $(list).append(Mustache.render(tpl, {
-                            idx: idx, delBtn: true, row: row,
-                            order:idx1 + 1, idx1:idx1
-                        }));
-                        $(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 delRowBaseData(obj, prefix,userId){
-                        var id = $(prefix+"_id").val();
-                        /* var createBy = $(prefix+"_userId").val();*/
-                        var currentUser = '${fns:getUser().id}';
-                        var contentId = '${projectcontentinfo.projectReportData.id}';
-                        console.log(contentId);
-
-                        $.ajax({
-                            type:"post",
-                            url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
-                            data:{"contentId":contentId,"basedId":id},
-                            dataType:"json",
-                            success:function(data){
-                                if(data.success) {
-                                    $(obj).parent().parent().remove();
-                                    /*parent.parent.refreshTrees();*/
-                                    if(data.body.inuse){
-                                        return;
-                                    }
-                                    if (currentUser == userId) {
-                                        confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
-                                    }
-                                }else {
-                                    top.layer.msg("删除依据资料失败!", {icon: 0});
-                                }
-                            }
-                        })
-                        return;
-                    }
+					function bornTemplete(list, idx, tpl, row, idx1){
+						var idx1 = $("#workBaseDataList tr").length +1;
+						$(list).append(Mustache.render(tpl, {
+							idx: idx, delBtn: true, row: row,
+							order:idx1 + 1, idx1:idx1
+						}));
+						$(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 delRowBaseData(obj, prefix,userId){
+						var id = $(prefix+"_id").val();
+						/* var createBy = $(prefix+"_userId").val();*/
+						var currentUser = '${fns:getUser().id}';
+						var contentId = '${projectcontentinfo.projectReportData.id}';
+						console.log(contentId);
 
-                    function confirmDelete(mess, href){
-                        top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
-                            //do something
-                            if (typeof href == 'function') {
-                                href();
-                            }else{
-                                $.ajax({
-                                    url:href,
-                                    type:"post",
-                                    success:function(data){
-                                        if(data.success){
-                                            top.layer.msg("删除依据资料成功!", {icon: 0});
-                                        }
-                                    }
-                                });
-                            }
-                            top.layer.close(index);
-                        });
-                        return false;
-                    }
+						$.ajax({
+							type:"post",
+							url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+							data:{"contentId":contentId,"basedId":id},
+							dataType:"json",
+							success:function(data){
+								if(data.success) {
+									$(obj).parent().parent().remove();
+									/*parent.parent.refreshTrees();*/
+									if(data.body.inuse){
+										return;
+									}
+									if (currentUser == userId) {
+										confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
+									}
+								}else {
+									top.layer.msg("删除依据资料失败!", {icon: 0});
+								}
+							}
+						})
+						return;
+					}
+
+					function confirmDelete(mess, href){
+						top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+							//do something
+							if (typeof href == 'function') {
+								href();
+							}else{
+								$.ajax({
+									url:href,
+									type:"post",
+									success:function(data){
+										if(data.success){
+											top.layer.msg("删除依据资料成功!", {icon: 0});
+										}
+									}
+								});
+							}
+							top.layer.close(index);
+						});
+						return false;
+					}
 				</script>
 			</div>
 			<div class="form-group layui-row first lw12">
-			<div class="form-group-label"><h2>依据工作内容</h2></div>
+				<div class="form-group-label"><h2>依据工作内容</h2></div>
 
-			<!-- 表格 -->
-			<%--<div class="layui-item nav-btns">
-				<sys:gridselectContentData url="${ctx}/projectcontentinfo/projectContentData/selectcontentData" id="contentData" title="选择工作内容"
-										cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('工作内容名称')}" searchKey="name"></sys:gridselectContentData>
-			</div>--%>
-			<div class="layui-item layui-col-xs12 form-table-container">
-				<table id="contentTable" class="table details table-bordered table-condensed">
-					<thead>
-					<tr>
-						<th style="text-align: center;width:10%">工作内容编号</th>
-						<th style="text-align: center;width:20%">工作内容名称</th>
-						<th style="text-align: center;width:25%">工作内容类型</th>
-						<th style="text-align: center;width:15%">负责人</th>
-						<th style="text-align: center;width:20%">创建时间</th>
-						<%--<th style="text-align: center;width:10%">操作</th>--%>
-					</tr>
-					</thead>
-					<tbody id="projectContentDataList">
-					<c:forEach items="${projectcontentinfo.projectReportData.projectContentDataList}" var="projectContentData" varStatus="index">
+				<!-- 表格 -->
+					<%--<div class="layui-item nav-btns">
+                        <sys:gridselectContentData url="${ctx}/projectcontentinfo/projectContentData/selectcontentData" id="contentData" title="选择工作内容"
+                                                cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('工作内容名称')}" searchKey="name"></sys:gridselectContentData>
+                    </div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container">
+					<table id="contentTable" class="table details table-bordered table-condensed">
+						<thead>
 						<tr>
-							<td>
-								<input id="projectContentDataList${index.index}_id" name="projectReportData.projectContentDataList[${index.index}].id" type="hidden" value="${projectContentData.id}"/>
-								<input id="projectContentDataList${index.index}_delFalg" name="projectReportData.projectContentDataList[${index.index}].delFalg" type="hidden" value="1"/>
-
-								${projectContentData.number}
-							</td>
-							<td>
-									${projectContentData.name}
-							</td>
-							<td>
-									${fns:getProjectTypeName(projectContentData.type,"")}
-							</td>
-							<td>
-									${projectContentData.masterName}
-							</td>
-							<td>
-								<fmt:formatDate value="${projectContentData.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
-							</td>
-							<%--<td>
-								<a href="javascript:void(0)" onclick="delRowData(this, '#projectContentDataList${index.index}','${projectContentData.id}')"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 取消</a>
-							</td>--%>
+							<th style="text-align: center;width:10%">工作内容编号</th>
+							<th style="text-align: center;width:20%">工作内容名称</th>
+							<th style="text-align: center;width:25%">工作内容类型</th>
+							<th style="text-align: center;width:15%">负责人</th>
+							<th style="text-align: center;width:20%">创建时间</th>
+								<%--<th style="text-align: center;width:10%">操作</th>--%>
 						</tr>
-					</c:forEach>
-					</tbody>
-				</table>
-				<script type="text/template" id="projectContentDataTpl">//<!--
+						</thead>
+						<tbody id="projectContentDataList">
+						<c:forEach items="${projectcontentinfo.projectReportData.projectContentDataList}" var="projectContentData" varStatus="index">
+							<tr>
+								<td>
+									<input id="projectContentDataList${index.index}_id" name="projectReportData.projectContentDataList[${index.index}].id" type="hidden" value="${projectContentData.id}"/>
+									<input id="projectContentDataList${index.index}_delFalg" name="projectReportData.projectContentDataList[${index.index}].delFalg" type="hidden" value="1"/>
+
+										${projectContentData.number}
+								</td>
+								<td>
+										${projectContentData.name}
+								</td>
+								<td>
+										${fns:getProjectTypeName(projectContentData.type,"")}
+								</td>
+								<td>
+										${projectContentData.masterName}
+								</td>
+								<td>
+									<fmt:formatDate value="${projectContentData.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+								</td>
+									<%--<td>
+                                        <a href="javascript:void(0)" onclick="delRowData(this, '#projectContentDataList${index.index}','${projectContentData.id}')"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 取消</a>
+                                    </td>--%>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+					<script type="text/template" id="projectContentDataTpl">//<!--
 			<tr id="budgetList{{idx}}">
 				<td class="hide">
 					<input id="projectContentDataList{{idx}}_id" name="projectReportData.projectContentDataList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
@@ -1375,75 +1394,75 @@
 					<a href="#" onclick="delRow(this, '#projectContentDataList{{idx}}','{{row.id}}')"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 取消</a>
 				</td>
 			</tr>//-->
-				</script>
-				<script type="text/javascript">
-					var projectContentDataTpl = $("#projectContentDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-					function setValueeContent(obj){
-						var idx = $("#projectContentDataList tr").length;
-						if(existContentData(obj.id,idx)) {
-							return;
-						}
-						addRowContentData("#projectContentDataList",idx,projectContentDataTpl,obj);
-					}
-
-					function existContentData(id,length) {
-						for (var i=0;i<length;i++) {
-							var val = $('#projectContentDataList'+i+'_id').val();
-							if(id==val){
-								return true;
+					</script>
+					<script type="text/javascript">
+						var projectContentDataTpl = $("#projectContentDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+						function setValueeContent(obj){
+							var idx = $("#projectContentDataList tr").length;
+							if(existContentData(obj.id,idx)) {
+								return;
 							}
+							addRowContentData("#projectContentDataList",idx,projectContentDataTpl,obj);
 						}
-						return false;
-					}
 
-					function addRowContentData(list, idx, tpl, row){
-						bornTemplete(list, idx, tpl, row, idx);
-					}
-					function bornTemplete(list, idx, tpl, row, idx1){
-						var idx1 = $("#workBaseDataList tr").length +1;
-						$(list).append(Mustache.render(tpl, {
-							idx: idx, delBtn: true, row: row,
-							order:idx1 + 1, idx1:idx1
-						}));
-						$(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 existContentData(id,length) {
+							for (var i=0;i<length;i++) {
+								var val = $('#projectContentDataList'+i+'_id').val();
+								if(id==val){
+									return true;
 								}
 							}
-						});
-					}
+							return false;
+						}
 
-					function delRow(obj, prefix){
-						$(prefix+"_delFalg").val("1");
-						$(obj).parent().parent().remove();
-					}
-					function delRowData(obj, prefix){
-						var contentId = $(prefix+"_id").val();
-						var reportId = '${projectcontentinfo.projectReportData.id}';
-						var projectId = '${projectcontentinfo.project.id}';
-						if(reportId!=null&&reportId!=''){
-							$.ajax({
-								type:"post",
-								url:'${ctx}/projectcontentinfo/projectcontentinfo/ajaxContentdelete',
-								data:{"contentId":contentId,"reportId":reportId,"projectId":projectId},
-								dataType:"json",
-								success:function(data){
-									if(data.success) {
-										$(obj).parent().parent().remove();
+						function addRowContentData(list, idx, tpl, row){
+							bornTemplete(list, idx, tpl, row, idx);
+						}
+						function bornTemplete(list, idx, tpl, row, idx1){
+							var idx1 = $("#workBaseDataList tr").length +1;
+							$(list).append(Mustache.render(tpl, {
+								idx: idx, delBtn: true, row: row,
+								order:idx1 + 1, idx1:idx1
+							}));
+							$(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");
 									}
 								}
-							})
-							return;
+							});
 						}
-					}
-				</script>
+
+						function delRow(obj, prefix){
+							$(prefix+"_delFalg").val("1");
+							$(obj).parent().parent().remove();
+						}
+						function delRowData(obj, prefix){
+							var contentId = $(prefix+"_id").val();
+							var reportId = '${projectcontentinfo.projectReportData.id}';
+							var projectId = '${projectcontentinfo.project.id}';
+							if(reportId!=null&&reportId!=''){
+								$.ajax({
+									type:"post",
+									url:'${ctx}/projectcontentinfo/projectcontentinfo/ajaxContentdelete',
+									data:{"contentId":contentId,"reportId":reportId,"projectId":projectId},
+									dataType:"json",
+									success:function(data){
+										if(data.success) {
+											$(obj).parent().parent().remove();
+										}
+									}
+								})
+								return;
+							}
+						}
+					</script>
+				</div>
 			</div>
-		</div>
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>成果文件</h2></div>
 				<div class="layui-item nav-btns">
@@ -1474,50 +1493,50 @@
 						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
 							<tr>
 									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${projectcontentinfo.projectReportData.uploadMode == 2}">
 										<c:choose>
-											<c:when test="${projectcontentinfo.projectReportData.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+											<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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></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.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-															</c:when>
-															<c:otherwise>
-																<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
-															</c:otherwise>
-														</c:choose>
+														<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
 													</c:otherwise>
 												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+											</c:otherwise>
+										</c:choose>
+									</c:when>
+									<c:otherwise>
+										<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>
+												<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>
-														<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>
+														<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>
+									</c:otherwise>
+								</c:choose>
 
 								<td>${workClientAttachment.createBy.name}</td>
 								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
@@ -1585,7 +1604,7 @@
 				</table>
 			</div>
 		</div>--%>
-		<div class="form-group layui-row page-end"></div>
+			<div class="form-group layui-row page-end"></div>
 		</form:form>
 	</div>
 </div>