Explorar o código

日常签章和报告签章功能开发

user5 hai 1 ano
pai
achega
068d1d039f
Modificáronse 43 ficheiros con 12130 adicións e 20 borrados
  1. 2 0
      src/main/java/com/jeeplus/common/utils/MenuStatusEnum.java
  2. 16 0
      src/main/java/com/jeeplus/modules/projectrecord/dao/ProjectRecordsDao.java
  3. 1 1
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectImplementEarlyService.java
  4. 37 1
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsService.java
  5. 1 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectRecordsController.java
  6. 1 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsController.java
  7. 158 0
      src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/controller/DailyOfficeWorkSignatureCallBackController.java
  8. 481 0
      src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/controller/DailyOfficeWorkSignatureController.java
  9. 41 0
      src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/dao/DailyOfficeWorkDao.java
  10. 224 0
      src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/entity/DailyOfficeWork.java
  11. 1080 0
      src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/service/DailyOfficeWorkService.java
  12. 140 0
      src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/controller/ProjectReportSignatureCallBackController.java
  13. 605 0
      src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/controller/ProjectReportSignatureWorkController.java
  14. 63 0
      src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/dao/ProjectReportSignatureWorkDao.java
  15. 75 0
      src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/entity/ProjectReportSignatureRelation.java
  16. 244 0
      src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/entity/ProjectReportSignatureWork.java
  17. 1187 0
      src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/service/ProjectReportSignatureWorkService.java
  18. 244 0
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  19. 8 0
      src/main/resources/jeeplus.properties
  20. 211 0
      src/main/resources/mappings/modules/projectrecord/ProjectRecordsDao.xml
  21. 353 0
      src/main/resources/mappings/modules/signature/dailyOfficeWork/DailyOfficeWorkDao.xml
  22. 389 0
      src/main/resources/mappings/modules/signature/projectReport/ProjectReportSignatureDao.xml
  23. 2 0
      src/main/resources/spring-context-shiro.xml
  24. 63 0
      src/main/webapp/WEB-INF/tags/sys/gridselectprojectsignatures.tag
  25. 2 0
      src/main/webapp/static/oss/ossupload.js
  26. 0 4
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsForm.jsp
  27. 0 4
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsForm.jsp
  28. 393 0
      src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureAudit.jsp
  29. 440 0
      src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureForm.jsp
  30. 481 0
      src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureList.jsp
  31. 448 0
      src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureModify.jsp
  32. 15 0
      src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureTask.jsp
  33. 521 0
      src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureView.jsp
  34. 98 0
      src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectReportSignatureProjectView.jsp
  35. 605 0
      src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkAudit.jsp
  36. 555 0
      src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkBmzrAudit.jsp
  37. 648 0
      src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkForm.jsp
  38. 484 0
      src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkList.jsp
  39. 653 0
      src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkModify.jsp
  40. 15 0
      src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkTask.jsp
  41. 715 0
      src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkView.jsp
  42. 332 0
      src/main/webapp/webpage/modules/sys/gridprojectreportsignature.jsp
  43. 99 8
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp

+ 2 - 0
src/main/java/com/jeeplus/common/utils/MenuStatusEnum.java

@@ -78,6 +78,8 @@ public enum MenuStatusEnum {
     WORK_CONTRACT_LIST_INFO("4650ceada41d46b382dc81f8980fda66","合同明细一览表"),
     FILING_BATCH ("e7ac5a36777e4dbfb1ca9fec1d2f5d1b","批量归档"),
     INVITATION_REPORTED("9efe77d0948247d186b9cd8e71f24072","招标上报"),
+    DAILY_OFFICE_WORK("a130098e278142e9a47e3b77caccc26d","日常-签章申请"),
+    PROJECT_REPORT_WORK("567496e2311547d89ac2679c496c32c8","报告-签章申请"),
     END("19940722131313","废弃");
 
     private String value;

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

@@ -90,4 +90,20 @@ public interface ProjectRecordsDao extends CrudDao<ProjectRecords> {
      */
     String getListMoney(ProjectRecords ruralProjectRecords);
 
+
+
+    /**
+     * 查询ruralProjectRecord数量
+     * @param records
+     * @return
+     */
+    Integer getProjectReportSignatureCount(ProjectRecords records);
+
+    /**
+     * 查询ruralProjectRecord详情
+     * @param records
+     * @return
+     */
+    List<ProjectRecords> getProjectReportSignatureList(ProjectRecords records);
+
 }

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

@@ -152,7 +152,7 @@ public class ProjectImplementEarlyService extends CrudService<ProjectImplementEa
 
     public Page<ProjectImplementEarly> findOverallProcessProjectPage(Page<ProjectImplementEarly> page, ProjectImplementEarly projectRecords) {
         //设置数据权限
-        if(!UserUtils.getUser().isAdmin()) {
+        if(!UserUtils.getUser().isAdmin() && !UserUtils.getUser().getOffice().getId().equals("51cf27beac274d0ca0317585415d9ec7")) {
             String dataScopeSql = dataScopeFilterOR(projectRecords.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_RECORDS.getValue());
             //判断是否为空,为空则进行新的权限查询
             if(org.apache.commons.lang3.StringUtils.isBlank(dataScopeSql)){

+ 37 - 1
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsService.java

@@ -267,7 +267,8 @@ public class ProjectRecordsService extends CrudService<ProjectRecordsDao, Projec
 
 	public Page<ProjectRecords> findOverallProcessPage(Page<ProjectRecords> page, ProjectRecords projectRecords) {
 		//设置数据权限
-        if(!UserUtils.getUser().isAdmin()) {
+		//苏州分公司造价部门可查看全部
+		if(!UserUtils.getUser().isAdmin() && !UserUtils.getUser().getOffice().getId().equals("51cf27beac274d0ca0317585415d9ec7")) {
             String dataScopeSql = dataScopeFilterOR(projectRecords.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_RECORDS.getValue());
             if(StringUtils.isBlank(dataScopeSql)){
 				dataScopeSql = dataScopeFilterOR(projectRecords.getCurrentUser(), "o", "u", "s", MenuStatusEnum.OVERALL_WORK_RECORDS.getValue());
@@ -1617,4 +1618,39 @@ public class ProjectRecordsService extends CrudService<ProjectRecordsDao, Projec
 		JedisUtils.del(user.getId() + "overAllLockProject");
 		return "项目解除锁定成功";
 	}
+
+
+
+	/**
+	 * 查询ruralProjectRecord信息
+	 * @param page 分页对象
+	 * @param projectRecords
+	 * @return
+	 */
+	public Page<ProjectRecords> getPaogectReportSignaturePage(Page<ProjectRecords> page, ProjectRecords projectRecords) {
+		//设置数据权限
+		if(!UserUtils.getUser().isAdmin()) {
+			String dataScopeSql = dataScopeFilterOR(projectRecords.getCurrentUser(), "o", "u", "s", MenuStatusEnum.OVERALL_WORK_RECORDS.getValue());
+			if(StringUtils.isBlank(dataScopeSql)){
+				dataScopeSql = dataScopeFilterOR(projectRecords.getCurrentUser(), "o", "u", "s", MenuStatusEnum.OVERALL_COST_WORK_RECORDS.getValue());
+			}
+			projectRecords.getSqlMap().put("dsf", dataScopeSql);
+		}
+		//查询数据条数
+		int count = dao.getProjectReportSignatureCount(projectRecords);
+		page.setCount(count);
+		page.setCountFlag(false);
+		projectRecords.setPage(page);
+		List<ProjectRecords> recordsList = dao.getProjectReportSignatureList(projectRecords);
+		//查询负责人信息
+		for (ProjectRecords records : recordsList) {
+			//this.queryContractInfos(records);
+			List<User> users = workProjectUserDao.queryProjectUsers(records.getId(), "1");
+			records.setProjectLeaders(users);
+			records.setLeaderNameStr(Collections3.extractToString(users, "name", ","));
+			records.setLeaderIds(Collections3.extractToString(users, "id", ","));
+		}
+		page.setList(recordsList);
+		return page;
+	}
 }

+ 1 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectRecordsController.java

@@ -389,7 +389,7 @@ public class RuralCostProjectRecordsController extends BaseController {
 				//查询项目报告信息
 				ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(projectRecords.getId());
 				//判定 是否将B类项目修改成A类项目
-				if(StringUtils.isNotBlank(projectReportData.getNumber()) && "1".equals(oldSubmitMoney) && "2".equals(projectRecords.getSubmitMoney())){
+				if(null != projectReportData && StringUtils.isNotBlank(projectReportData.getNumber()) && "1".equals(oldSubmitMoney) && "2".equals(projectRecords.getSubmitMoney())){
 					addMessage(redirectAttributes, "无法将已生成报告号的项目从B类修改成A类项目");
 					return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectRecords/?repage";
 				}

+ 1 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsController.java

@@ -347,7 +347,7 @@ public class RuralProjectRecordsController extends BaseController {
 					//查询项目报告信息
 					ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(projectRecords.getId());
 					//判定 是否将B类项目修改成A类项目
-					if(StringUtils.isNotBlank(projectReportData.getNumber()) && "1".equals(oldSubmitMoney) && "2".equals(projectRecords.getSubmitMoney())){
+					if(null != projectReportData && StringUtils.isNotBlank(projectReportData.getNumber()) && "1".equals(oldSubmitMoney) && "2".equals(projectRecords.getSubmitMoney())){
 						addMessage(redirectAttributes, "无法将已生成报告号的项目从B类修改成A类项目");
 						return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectRecords/?repage";
 					}

+ 158 - 0
src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/controller/DailyOfficeWorkSignatureCallBackController.java

@@ -0,0 +1,158 @@
+package com.jeeplus.modules.signature.dailyOfficeWork.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.utils.JedisUtils;
+import com.jeeplus.common.utils.SpringContextHolder;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectcontentinfo.dao.ProjectReportDataDao;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
+import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectMessageElectronicSealDao;
+import com.jeeplus.modules.ruralprojectrecords.entity.PresignCallBack;
+import com.jeeplus.modules.ruralprojectrecords.entity.ProjectApprovalSignature;
+import com.jeeplus.modules.ruralprojectrecords.entity.ProjectReportSignature;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageElectronicSealService;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.signature.dailyOfficeWork.dao.DailyOfficeWorkDao;
+import com.jeeplus.modules.signature.dailyOfficeWork.entity.DailyOfficeWork;
+import com.jeeplus.modules.signature.dailyOfficeWork.service.DailyOfficeWorkService;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.service.WorkattachmentService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.tools.utils.SignaturePostUtil;
+import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import org.activiti.engine.HistoryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import redis.clients.jedis.Jedis;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 项目签章回调接口Controller
+ * @author 徐滕
+ * @version 2021-11-04
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/dailyOfficeWork/signatureCallBack")
+public class DailyOfficeWorkSignatureCallBackController extends BaseController {
+    @Autowired
+    private DailyOfficeWorkService dailyOfficeWorkService;
+    @Autowired
+    protected HistoryService historyService;
+
+    private final DailyOfficeWorkDao dailyOfficeWorkDao = SpringContextHolder.getBean(DailyOfficeWorkDao.class);
+
+    @ModelAttribute
+    public DailyOfficeWork get(@RequestParam(required=false) String id) {
+        DailyOfficeWork entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = dailyOfficeWorkService.get(id);
+        }
+        if (entity == null){
+            entity = new DailyOfficeWork();
+        }
+        return entity;
+    }
+
+    /**
+     * 审定单签章回调操作
+     * @param presignCallBack  回调参数
+     * @return
+     */
+    @RequestMapping(value = "/getDailyOfficeWorkCoordinates", method=RequestMethod.POST)
+    public String getDailyOfficeWorkCoordinates(PresignCallBack presignCallBack, HttpServletRequest request , HttpServletResponse response) {
+        long t1 = System.currentTimeMillis();
+        //根据contractId查询对应的报告信息
+        String[] documentIds = presignCallBack.getDocumentId().split(",");
+
+        //根据contractId查询对应的报告信息
+        DailyOfficeWork dailyOfficeWork = dailyOfficeWorkService.getByDocumentId(documentIds[0]);
+
+        if(5 == dailyOfficeWork.getStatus()){
+            return null;
+        }
+
+        if(StringUtils.isBlank(presignCallBack.getContractId())){
+
+            return null;
+        }
+        //修改签章信息
+        //签章完成则进行数据的保存
+        dailyOfficeWork.setSignatureFlag(1);
+        dailyOfficeWork.setSignatureContractId(presignCallBack.getContractId());
+        dailyOfficeWork.setSignatureUploadDate(new Date());
+        //对文件回调路径进行处理并保存
+        String signatureUrl = null;
+        if(StringUtils.isNotBlank(presignCallBack.getStoragePath())){
+            signatureUrl = presignCallBack.getStoragePath().replace("oss:/","");
+
+            dailyOfficeWork.setSignatureUrl(signatureUrl);
+            dailyOfficeWork.setSignatureUrlFlag(1);
+
+            String input = signatureUrl;
+            int lastSlashIndex = input.lastIndexOf('/');
+            int lastDotIndex = input.lastIndexOf('.');
+
+            // 检查是否存在 / 和 .,以及 . 是否在 / 之后
+            if (lastSlashIndex != -1 && lastDotIndex != -1 && lastSlashIndex < lastDotIndex) {
+                String result = input.substring(lastSlashIndex + 1, lastDotIndex);
+                //添加文件名称
+                dailyOfficeWork.setSignatureFileName(result);
+            }
+            User userName = UserUtils.getByUserName("管理员");
+            dailyOfficeWork.setSignatureUploadFileUser(userName);
+
+        }
+        //修改签章对应信息文件
+        dailyOfficeWorkDao.updateSignatureInfo(dailyOfficeWork);
+
+        return null;
+    }
+
+    /**
+     * 日常签章每个节点处理方法
+     * @param presignCallBack
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/getDailyOfficeWorkCallBackAccomplish", method= RequestMethod.POST)
+    public String getDailyOfficeWorkCallBackAccomplish(PresignCallBack presignCallBack, HttpServletResponse response) {
+
+        //根据contractId查询对应的报告信息
+        DailyOfficeWork dailyOfficeWork = dailyOfficeWorkService.getByContractId(presignCallBack.getContractId());
+        if(5 == dailyOfficeWork.getStatus()){
+            return null;
+        }
+
+        String json = JSON.toJSONString(presignCallBack);
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtils.getResource();
+            //将页面签数据转json保存到redis中,并设置有效时间为1天
+            jedis.set("dailyOfficeWorkSignatureSign" + dailyOfficeWork.getId(),json);
+            jedis.expire("dailyOfficeWorkSignatureSign" + dailyOfficeWork.getId(), 86400);
+            jedis.set("dailyOfficeWorkSignatureSignStatus" + dailyOfficeWork.getId(),"true");
+            jedis.expire("dailyOfficeWorkSignatureSignStatus" + dailyOfficeWork.getId(),86400);
+        } catch (Exception e) {
+            logger.error("dailyOfficeWorkSignatureSign", e);
+        } finally {
+            JedisUtils.returnResource(jedis);
+        }
+        return null;
+    }
+}

+ 481 - 0
src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/controller/DailyOfficeWorkSignatureController.java

@@ -0,0 +1,481 @@
+package com.jeeplus.modules.signature.dailyOfficeWork.controller;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.oss.OSSClientUtil;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.JedisUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
+import com.jeeplus.modules.signature.dailyOfficeWork.entity.DailyOfficeWork;
+import com.jeeplus.modules.signature.dailyOfficeWork.service.DailyOfficeWorkService;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+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 redis.clients.jedis.Jedis;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 日常签章controller
+ * @author: 徐滕
+ * @version: 2024-01-26 13:41
+ */
+
+@Controller
+@RequestMapping(value = "${adminPath}/dailyOfficeWork/dailyOfficeWorkSignature")
+public class DailyOfficeWorkSignatureController extends BaseController {
+    /**
+     * 阿里云文件服务器前缀
+     */
+    private final static String aliyunUrl = Global.getConfig("aliyunUrl");
+
+    @Autowired
+    private DailyOfficeWorkService dailyOfficeWorkService;
+    @Autowired
+    private ActTaskService actTaskService;
+
+
+    @ModelAttribute
+    public DailyOfficeWork get(@RequestParam(required=false) String id) {
+        DailyOfficeWork entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = dailyOfficeWorkService.get(id);
+        }
+        if (entity == null){
+            entity = new DailyOfficeWork();
+        }
+        return entity;
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("dailyOfficeWork:dailyOfficeWorkSignature:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(DailyOfficeWork dailyOfficeWork, HttpServletRequest request, HttpServletResponse response, Model model) {
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        if (StringUtils.isNotBlank(dailyOfficeWork.getToflag())){
+            if (dailyOfficeWork.getToflag().equals("1")){
+                request.getSession().removeAttribute("searchDailyOfficeWork");
+                DailyOfficeWork search=dailyOfficeWork;
+                request.getSession().setAttribute("searchDailyOfficeWork",search);
+            }
+        }else{
+            if (request.getSession().getAttribute("searchDailyOfficeWork")!=null){
+                dailyOfficeWork= (DailyOfficeWork) request.getSession().getAttribute("searchDailyOfficeWork");
+                model.addAttribute("dailyOfficeWork", dailyOfficeWork);
+            }
+        }
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        //获取项目信息
+        Page<DailyOfficeWork> page = dailyOfficeWorkService.findPage(new Page<DailyOfficeWork>(request, response), dailyOfficeWork);
+        List<DailyOfficeWork> list = page.getList();
+
+        for (DailyOfficeWork officeWork : list) {
+            if(StringUtils.isNotBlank(officeWork.getSignatureUrl())){
+                officeWork.setSignatureUrlFlag(1);
+                //处理文件路径
+                //如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
+                if(officeWork.getSignatureUrl().contains("/xg-qz")){
+                    if(StringUtils.isNotBlank(officeWork.getSignatureUrl())){
+                        String signatureUrl = officeWork.getSignatureUrl().replace("/xg-qz","");
+                        officeWork.setSignatureUrl(signatureUrl);
+                    }
+                    officeWork.setSignatureUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + officeWork.getSignatureUrl()));
+                }else{
+                    officeWork.setSignatureUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + officeWork.getSignatureUrl()));
+                }
+            }else{
+                officeWork.setSignatureUrlFlag(0);
+            }
+        }
+
+        model.addAttribute("page", page);
+        return "modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureList";
+    }
+
+    /**
+     * 查看,增加,编辑项目表单页面
+     */
+    @RequiresPermissions(value={"dailyOfficeWork:dailyOfficeWorkSignature:add","dailyOfficeWork:dailyOfficeWorkSignature:edit"},logical= Logical.OR)
+    @RequestMapping(value = "form")
+    public String form(DailyOfficeWork dailyOfficeWork, Model model) {
+        if (dailyOfficeWork!=null&&StringUtils.isNotBlank(dailyOfficeWork.getId())) {
+            dailyOfficeWork = dailyOfficeWorkService.get(dailyOfficeWork.getId());
+        }else {
+            dailyOfficeWork.setCreateBy(UserUtils.getUser());
+            dailyOfficeWork.setOffice(UserUtils.getSelectOffice());
+            dailyOfficeWork.setCreateDate(new Date());
+        }
+
+
+        model.addAttribute("dailyOfficeWork", dailyOfficeWork);
+        return "modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureForm";
+    }
+
+    /**
+     * 查看,增加,编辑项目表单页面
+     */
+    @RequiresPermissions(value={"dailyOfficeWork:dailyOfficeWorkSignature:edit"},logical= Logical.OR)
+    @RequestMapping(value = "modify")
+    public String modify(DailyOfficeWork dailyOfficeWork, Model model) {
+        if (dailyOfficeWork!=null&&StringUtils.isNotBlank(dailyOfficeWork.getId())) {
+            dailyOfficeWork = dailyOfficeWorkService.get(dailyOfficeWork.getId());
+        }else {
+            dailyOfficeWork.setCreateBy(UserUtils.getUser());
+            dailyOfficeWork.setCreateDate(new Date());
+        }
+
+        if(StringUtils.isNotBlank(dailyOfficeWork.getProcessInstanceId())){
+            ProcessInstance processInstance = actTaskService.getProcIns(dailyOfficeWork.getProcessInstanceId());
+            if (processInstance!=null) {
+                Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+                Act act = new Act();
+                act.setTaskId(taskInfok.getId());
+                act.setTaskName(taskInfok.getName());
+                act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+                act.setProcDefId(taskInfok.getProcessDefinitionId());
+                act.setProcInsId(taskInfok.getProcessInstanceId());
+                act.setTask(taskInfok);
+                dailyOfficeWork.setAct(act);
+            }
+        }
+
+        model.addAttribute("dailyOfficeWork", dailyOfficeWork);
+        return "modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureModify";
+    }
+
+    /**
+     * 查看,增加,编辑项目表单页面
+     */
+    @RequiresPermissions(value={"dailyOfficeWork:dailyOfficeWorkSignature:view"},logical= Logical.OR)
+    @RequestMapping(value = "view")
+    public String view(DailyOfficeWork dailyOfficeWork, Model model) {
+        if (dailyOfficeWork!=null&&StringUtils.isNotBlank(dailyOfficeWork.getId())) {
+            dailyOfficeWork = dailyOfficeWorkService.get(dailyOfficeWork.getId());
+        }else {
+            dailyOfficeWork.setCreateBy(UserUtils.getUser());
+            dailyOfficeWork.setCreateDate(new Date());
+        }
+
+        List<WorkClientAttachment> signatureWorkAttachments = Lists.newArrayList();
+        if(StringUtils.isNotBlank(dailyOfficeWork.getSignatureUrl())){
+            WorkClientAttachment signatureAttachment = new WorkClientAttachment();
+
+            //处理文件路径
+            //如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
+            if(dailyOfficeWork.getSignatureUrl().contains("/xg-qz")){
+                if(StringUtils.isNotBlank(dailyOfficeWork.getSignatureUrl())){
+                    String signatureUrl = dailyOfficeWork.getSignatureUrl().replace("/xg-qz","");
+                    dailyOfficeWork.setSignatureUrl(signatureUrl);
+                }
+                signatureAttachment.setTemporaryUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + dailyOfficeWork.getSignatureUrl()));
+            }else{
+                signatureAttachment.setTemporaryUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + dailyOfficeWork.getSignatureUrl()));
+            }
+            User user = UserUtils.get(dailyOfficeWork.getSignatureUploadFileUser().getId());
+            signatureAttachment.setCreateBy(user);
+            signatureAttachment.setUpdateBy(user);
+            signatureAttachment.setCreateDate(dailyOfficeWork.getSignatureUploadDate());
+            signatureAttachment.setUpdateDate(dailyOfficeWork.getSignatureUploadDate());
+            signatureAttachment.setDelFlag("0");
+            signatureAttachment.setAttachmentName(dailyOfficeWork.getSignatureFileName());
+            String type = dailyOfficeWork.getSignatureUrl().substring(dailyOfficeWork.getSignatureUrl().lastIndexOf(".") + 1);
+            signatureAttachment.setType(type);
+            signatureWorkAttachments.add(signatureAttachment);
+        }
+
+
+        if(signatureWorkAttachments.size()>0){
+            dailyOfficeWork.setSignatureWorkAttachments(signatureWorkAttachments);
+        }
+        model.addAttribute("dailyOfficeWork", dailyOfficeWork);
+        return "modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureView";
+    }
+    /**
+     * 暂存信息
+     */
+    @RequiresPermissions(value={"dailyOfficeWork:dailyOfficeWorkSignature:add","dailyOfficeWork:dailyOfficeWorkSignature:edit"},logical=Logical.OR)
+    @RequestMapping(value = "tstore")
+    public String tstore(DailyOfficeWork dailyOfficeWork, Model model, RedirectAttributes redirectAttributes) {
+        if (!beanValidator(model, dailyOfficeWork)){
+            return form(dailyOfficeWork, model);
+        }
+        try {
+            if (!dailyOfficeWork.getIsNewRecord()) {//编辑表单保存
+                DailyOfficeWork t = dailyOfficeWorkService.get(dailyOfficeWork.getId());//从数据库取出记录的值
+
+                if(t.getStatus() == 2){
+                    addMessage(redirectAttributes, "签章申请已送审,无法重复送审");
+                    return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+                }else if(t.getStatus() == 5){
+                    addMessage(redirectAttributes, "签章申请已审核完成,无法再次送审");
+                    return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+                }
+                MyBeanUtils.copyBeanNotNull2Bean(dailyOfficeWork, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                t.setStatus(1);
+                dailyOfficeWorkService.saveInfo(t);//保存
+            } else {//新增表单保存
+                dailyOfficeWork.setStatus(1);
+                dailyOfficeWorkService.saveInfo(dailyOfficeWork);//保存
+            }
+            addMessage(redirectAttributes, "保存签章申请成功");
+        }catch (Exception e){
+            logger.error("保存签章申请异常:",e);
+            addMessage(redirectAttributes, "保存签章申请异常:"+e.getMessage());
+        }
+        return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+    }
+
+    /**
+     * 保存项目
+     */
+    @RequiresPermissions(value={"dailyOfficeWork:dailyOfficeWorkSignature:add","dailyOfficeWork:dailyOfficeWorkSignature:edit"},logical=Logical.OR)
+    @RequestMapping(value = "save")
+    public String save(DailyOfficeWork dailyOfficeWork, Model model, RedirectAttributes redirectAttributes) throws Exception {
+        if (!beanValidator(model, dailyOfficeWork)){
+            return form(dailyOfficeWork, model);
+        }
+        try {
+
+            if (!dailyOfficeWork.getIsNewRecord()) {//编辑表单保存
+                DailyOfficeWork t = dailyOfficeWorkService.get(dailyOfficeWork.getId());//从数据库取出记录的值
+
+                if(t.getStatus() == 2){
+                    addMessage(redirectAttributes, "签章申请已送审,无法重复送审");
+                    return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+                }else if(t.getStatus() == 5){
+                    addMessage(redirectAttributes, "签章申请已审核完成,无法再次送审");
+                    return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+                }
+                MyBeanUtils.copyBeanNotNull2Bean(dailyOfficeWork, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                dailyOfficeWorkService.save(t, ProjectStatusEnum.SIGNED);//保存
+            } else {//新增表单保存
+                dailyOfficeWorkService.save(dailyOfficeWork, ProjectStatusEnum.SIGNED);//保存
+            }
+            addMessage(redirectAttributes, "保存签章申请成功");
+        }catch (Exception e){
+            logger.error("保存签章申请异常:",e);
+            addMessage(redirectAttributes, "保存签章申请异常:"+e.getMessage());
+        }
+        return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+    }
+
+
+    /**
+     * 撤回操作
+     * @param request
+     * @param redirectAttributes
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping(value = "revoke")
+    public String revoke(HttpServletRequest request, RedirectAttributes redirectAttributes) throws Exception {
+        HashMap<String, String> requestMap = findRequestMap(request);
+        String id = requestMap.get("id");
+        try {
+            DailyOfficeWork dailyOfficeWork = dailyOfficeWorkService.get(id);
+            if(3==dailyOfficeWork.getStatus() || 4==dailyOfficeWork.getStatus()){
+                addMessage(redirectAttributes, "签章申请已撤回、驳回,请勿重复操作");
+                return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+            }else if(5==dailyOfficeWork.getStatus()){
+                addMessage(redirectAttributes, "签章申请已审批通过,无法撤回");
+                return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+            }
+            dailyOfficeWorkService.cancelInvalidate(dailyOfficeWork);
+            addMessage(redirectAttributes, "撤回该签章申请成功");
+        }catch (Exception e){
+            logger.info(e.getMessage());
+            addMessage(redirectAttributes, "撤回该签章申请失败");
+        }
+        return "redirect:" + Global.getAdminPath() + "/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+    }
+
+
+    /**
+     * 删除操作
+     */
+    @RequiresPermissions("projectReport:projectReportSignature:del")
+    @RequestMapping(value = "delete")
+    public String delete(DailyOfficeWork dailyOfficeWork, RedirectAttributes redirectAttributes) {
+
+        dailyOfficeWorkService.delete(dailyOfficeWork);
+        addMessage(redirectAttributes, "作废签章申请成功");
+        if (StringUtils.isNotBlank(dailyOfficeWork.getHome()) && "home".equals(dailyOfficeWork.getHome())){
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }else {
+            return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+        }
+    }
+
+
+    @RequestMapping(value = "getProcess")
+    public String getProcess(DailyOfficeWork dailyOfficeWork, Model model, HttpServletRequest request){
+        model.addAttribute("processInstanceId", dailyOfficeWork.getProcessInstanceId());
+        return "modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureTask";
+    }
+
+    /**
+     * 查询签证审核页面url
+     * @param id
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = "getSignatureUrl")
+    @ResponseBody
+    public HashMap<String, Object> getSignatureUrl( String id, RedirectAttributes redirectAttributes) {
+        HashMap<String, Object> map = Maps.newHashMap();
+        map.put("contractUrl","");
+        map.put("success",false);
+        try {
+
+            //根据项目id查询是否已经提交过了报告签章
+            DailyOfficeWork dailyOfficeWork = dailyOfficeWorkService.get(id);
+            if(null == dailyOfficeWork || StringUtils.isBlank(dailyOfficeWork.getId())){
+                map.put("str","查询不到该签章申请信息");
+                map.put("success",false);
+                return map;
+            }
+            if(null!= dailyOfficeWork.getSignatureFlag() && 1 == dailyOfficeWork.getSignatureFlag()){
+                map.put("str","该签章申请已经盖章完成。请直接进行审核");
+                map.put("success",false);
+                return map;
+            }
+
+
+            //获取contractUrl路径
+            String contractUrl = dailyOfficeWorkService.getSignatureContractUrl(dailyOfficeWork.getSignatureContractId());
+            if("".equals(contractUrl)){
+                map.put("str","签章文件创建失败");
+                map.put("success",false);
+                return map;
+            }else{
+                map.put("contractUrl",contractUrl);
+                map.put("success",true);
+                return map;
+            }
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "签章申请审核页面信息获取失败");
+        }
+
+
+        return map;
+    }
+
+
+    /**
+     * 查询页面签署状态
+     * @param id
+     * @return
+     */
+    @RequestMapping(value = "getSignatureStatus")
+    @ResponseBody
+    public Map<String, Object> getSignatureStatus(String id) {
+        Map<String, Object> map = new HashMap();
+        map.put("success",false);
+
+        //根据项目id查询对应的审定单数据状态是否是已经被送审或者 是否存在值
+        DailyOfficeWork dailyOfficeWork = dailyOfficeWorkService.get(id);
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtils.getResource();
+            if(1 == dailyOfficeWork.getSignatureFlag()){
+                map.put("success",true);
+            }else{
+                String status = jedis.get("dailyOfficeWorkSignatureSignStatus" + dailyOfficeWork.getId());
+                map.put("success",status);
+            }
+        } catch (Exception e) {
+            logger.error("dailyOfficeWorkSignatureSignStatus", e);
+        } finally {
+            JedisUtils.returnResource(jedis);
+        }
+
+        return map;
+    }
+
+    /**
+     * 审批
+     * @param dailyOfficeWork
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping("saveAudit")
+    public String saveAudit(DailyOfficeWork dailyOfficeWork, RedirectAttributes redirectAttributes)  {
+        String home = dailyOfficeWork.getHome();
+        try {
+            String taskDefKey = dailyOfficeWork.getAct().getTaskDefKey();
+            //当状态为未通过时,重新修改数据
+            if ("modifyApply".equals(taskDefKey)) {
+                dailyOfficeWork.getAct().setComment("重新申请");
+            }
+            List<User> users = UserUtils.getByProssType(dailyOfficeWork.getProcessInstanceId(),1);
+            String flag = dailyOfficeWork.getAct().getFlag();
+            if ("yes".equals(flag) && (users==null || users.size()==0)){
+                addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+            }else {
+                if (dailyOfficeWork.getStatus() != 2 && dailyOfficeWork.getStatus() != 4 && dailyOfficeWork.getStatus() != 5) {
+                    addMessage(redirectAttributes, "签章申请未发起,请发起申请");
+                    if (StringUtils.isNotBlank(home) && "home".equals(home)) {
+                        return "redirect:" + Global.getAdminPath() + "/home/?repage";
+                    }else if (StringUtils.isNotBlank(home) && "notifyList".equals(home)){
+                        return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+                    } else {
+                        return "redirect:" + Global.getAdminPath() + "/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+                    }
+                }
+                if(dailyOfficeWork.getStatus() == 5){
+                    addMessage(redirectAttributes, "签章申请已登记完成,无法再次送审");
+                    if (StringUtils.isNotBlank(home) && "home".equals(home)){
+                        return "redirect:" + Global.getAdminPath() + "/home/?repage";
+                    }else if (StringUtils.isNotBlank(home) && "notifyList".equals(home)){
+                        return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+                    }else {
+                        return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+                    }
+                }
+                String str = dailyOfficeWorkService.signatuereSaveAudit(dailyOfficeWork,users);
+                addMessage(redirectAttributes, str);
+            }
+        }catch (Exception e){
+            addMessage(redirectAttributes, "签章申请审批失败");
+            logger.error("Exception e:"+e);
+        }
+
+        if (StringUtils.isNotBlank(home) && "home".equals(home)){
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }else if (StringUtils.isNotBlank(home) && "notifyList".equals(home)){
+            return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+        }else {
+            return "redirect:"+Global.getAdminPath()+"/dailyOfficeWork/dailyOfficeWorkSignature/?repage";
+        }
+    }
+
+}

+ 41 - 0
src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/dao/DailyOfficeWorkDao.java

@@ -0,0 +1,41 @@
+package com.jeeplus.modules.signature.dailyOfficeWork.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.signature.dailyOfficeWork.entity.DailyOfficeWork;
+
+/**
+ * 日常签章dao
+ */
+@MyBatisDao
+public interface DailyOfficeWorkDao extends CrudDao<DailyOfficeWork> {
+
+    /**
+     * 根据签章documentId 查询信息
+     * @param documentId
+     * @return
+     */
+    DailyOfficeWork getByDocumentId(String documentId);
+
+    /**
+     * 根据签章contractId 查询信息
+     * @param contractId
+     * @return
+     */
+    DailyOfficeWork getByContractId(String contractId);
+
+
+    /**
+     * 修改状态值和流程id
+     * @param dailyOfficeWork
+     */
+    void updateProcessIdAndStatus(DailyOfficeWork dailyOfficeWork);
+
+    /**
+     * 修改签章信息
+     * @param dailyOfficeWork
+     * @return
+     */
+    Integer updateSignatureInfo(DailyOfficeWork dailyOfficeWork);
+
+}

+ 224 - 0
src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/entity/DailyOfficeWork.java

@@ -0,0 +1,224 @@
+package com.jeeplus.modules.signature.dailyOfficeWork.entity;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.ActEntity;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 日常签章info
+ * @author: 徐滕
+ * @version: 2024-01-26 13:41
+ */
+public class DailyOfficeWork extends ActEntity<DailyOfficeWork> {
+
+    public static final String DAILY_OFFICE_WORK_KEY ="1011";//日常签章编号key
+
+    private String userId;  //申请人
+    private String userName;    //申请人姓名
+    private String signatureName;    //签章描述
+    private String number;    //签章编号
+    private String signatureType;   //签章类型(字典)
+    private Office office;		// 部门ID
+    private Office company;		// 公司ID
+    private Integer status;  //状态
+    private String processInstanceId;   //流程编号
+
+    private Date beginDate;
+    private Date endDate;
+
+    private String home;
+    private Integer signatureFlag;		//是否已签章(1为已签章)
+    private String signatureDocumentId;		//签章documentid
+    private String signatureContractId;		//签章contractid
+    private String signatureUrl;		//签章附件url
+    private String signatureFileName;		//签章附件名称
+    private Integer signatureUrlFlag;		//签章完成值判定条件
+    private Date signatureUploadDate;		//签章完成时间
+    private User signatureUploadFileUser;		//签章文件上传人信息
+
+
+    private List<WorkClientAttachment> workAttachments = Lists.newArrayList();//签章附件
+    private List<WorkClientAttachment> signatureWorkAttachments = Lists.newArrayList();//已签章附件
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getSignatureName() {
+        return signatureName;
+    }
+
+    public void setSignatureName(String signatureName) {
+        this.signatureName = signatureName;
+    }
+
+    public String getNumber() {
+        return number;
+    }
+
+    public void setNumber(String number) {
+        this.number = number;
+    }
+
+    public String getSignatureType() {
+        return signatureType;
+    }
+
+    public void setSignatureType(String signatureType) {
+        this.signatureType = signatureType;
+    }
+
+    public Office getOffice() {
+        return office;
+    }
+
+    public void setOffice(Office office) {
+        this.office = office;
+    }
+
+    public Office getCompany() {
+        return company;
+    }
+
+    public void setCompany(Office company) {
+        this.company = company;
+    }
+
+    public List<WorkClientAttachment> getWorkAttachments() {
+        return workAttachments;
+    }
+
+    public void setWorkAttachments(List<WorkClientAttachment> workAttachments) {
+        this.workAttachments = workAttachments;
+    }
+
+    public Date getBeginDate() {
+        return beginDate;
+    }
+
+    public void setBeginDate(Date beginDate) {
+        this.beginDate = beginDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getProcessInstanceId() {
+        return processInstanceId;
+    }
+
+    public void setProcessInstanceId(String processInstanceId) {
+        this.processInstanceId = processInstanceId;
+    }
+
+    public String getHome() {
+        return home;
+    }
+
+    public void setHome(String home) {
+        this.home = home;
+    }
+
+    public Integer getSignatureFlag() {
+        return signatureFlag;
+    }
+
+    public void setSignatureFlag(Integer signatureFlag) {
+        this.signatureFlag = signatureFlag;
+    }
+
+    public String getSignatureDocumentId() {
+        return signatureDocumentId;
+    }
+
+    public void setSignatureDocumentId(String signatureDocumentId) {
+        this.signatureDocumentId = signatureDocumentId;
+    }
+
+    public String getSignatureContractId() {
+        return signatureContractId;
+    }
+
+    public void setSignatureContractId(String signatureContractId) {
+        this.signatureContractId = signatureContractId;
+    }
+
+    public String getSignatureUrl() {
+        return signatureUrl;
+    }
+
+    public void setSignatureUrl(String signatureUrl) {
+        this.signatureUrl = signatureUrl;
+    }
+
+    public Integer getSignatureUrlFlag() {
+        return signatureUrlFlag;
+    }
+
+    public void setSignatureUrlFlag(Integer signatureUrlFlag) {
+        this.signatureUrlFlag = signatureUrlFlag;
+    }
+
+    public String getSignatureFileName() {
+        return signatureFileName;
+    }
+
+    public void setSignatureFileName(String signatureFileName) {
+        this.signatureFileName = signatureFileName;
+    }
+
+    public Date getSignatureUploadDate() {
+        return signatureUploadDate;
+    }
+
+    public void setSignatureUploadDate(Date signatureUploadDate) {
+        this.signatureUploadDate = signatureUploadDate;
+    }
+
+    public User getSignatureUploadFileUser() {
+        return signatureUploadFileUser;
+    }
+
+    public void setSignatureUploadFileUser(User signatureUploadFileUser) {
+        this.signatureUploadFileUser = signatureUploadFileUser;
+    }
+
+    public List<WorkClientAttachment> getSignatureWorkAttachments() {
+        return signatureWorkAttachments;
+    }
+
+    public void setSignatureWorkAttachments(List<WorkClientAttachment> signatureWorkAttachments) {
+        this.signatureWorkAttachments = signatureWorkAttachments;
+    }
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1080 - 0
src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/service/DailyOfficeWorkService.java


+ 140 - 0
src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/controller/ProjectReportSignatureCallBackController.java

@@ -0,0 +1,140 @@
+package com.jeeplus.modules.signature.projectReportSignatureWork.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.common.utils.JedisUtils;
+import com.jeeplus.common.utils.SpringContextHolder;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.ruralprojectrecords.entity.PresignCallBack;
+import com.jeeplus.modules.signature.projectReportSignatureWork.dao.ProjectReportSignatureWorkDao;
+import com.jeeplus.modules.signature.projectReportSignatureWork.entity.ProjectReportSignatureWork;
+import com.jeeplus.modules.signature.projectReportSignatureWork.service.ProjectReportSignatureWorkService;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.activiti.engine.HistoryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import redis.clients.jedis.Jedis;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+
+/**
+ * 项目签章回调接口Controller
+ * @author 徐滕
+ * @version 2021-11-04
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/projectReportSignatureCallBack/projectReportSignatureCallBack")
+public class ProjectReportSignatureCallBackController extends BaseController {
+    @Autowired
+    private ProjectReportSignatureWorkService projectReportSignatureService;
+    @Autowired
+    protected HistoryService historyService;
+
+    private final ProjectReportSignatureWorkDao projectReportSignatureWorkDao = SpringContextHolder.getBean(ProjectReportSignatureWorkDao.class);
+
+    @ModelAttribute
+    public ProjectReportSignatureWork get(@RequestParam(required=false) String id) {
+        ProjectReportSignatureWork entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectReportSignatureService.get(id);
+        }
+        if (entity == null){
+            entity = new ProjectReportSignatureWork();
+        }
+        return entity;
+    }
+
+    /**
+     * 审定单签章回调操作
+     * @param presignCallBack  回调参数
+     * @return
+     */
+    @RequestMapping(value = "/getProjectReportSignatureWorkCoordinates", method=RequestMethod.POST)
+    public String getProjectReportSignatureWorkCoordinates(PresignCallBack presignCallBack, HttpServletRequest request , HttpServletResponse response) {
+        long t1 = System.currentTimeMillis();
+        //根据contractId查询对应的报告信息
+        String[] documentIds = presignCallBack.getDocumentId().split(",");
+
+        //根据contractId查询对应的报告信息
+        ProjectReportSignatureWork projectReportSignatureWork = projectReportSignatureService.getByDocumentId(documentIds[0]);
+
+        if(5 == projectReportSignatureWork.getStatus()){
+            return null;
+        }
+
+        if(StringUtils.isBlank(presignCallBack.getContractId())){
+
+            return null;
+        }
+        //修改签章信息
+        //签章完成则进行数据的保存
+        projectReportSignatureWork.setSignatureFlag(1);
+        projectReportSignatureWork.setSignatureContractId(presignCallBack.getContractId());
+        projectReportSignatureWork.setSignatureUploadDate(new Date());
+        //对文件回调路径进行处理并保存
+        String signatureUrl = null;
+        if(StringUtils.isNotBlank(presignCallBack.getStoragePath())){
+            signatureUrl = presignCallBack.getStoragePath().replace("oss:/","");
+
+            projectReportSignatureWork.setSignatureUrl(signatureUrl);
+            projectReportSignatureWork.setSignatureUrlFlag(1);
+
+            String input = signatureUrl;
+            int lastSlashIndex = input.lastIndexOf('/');
+            int lastDotIndex = input.lastIndexOf('.');
+
+            // 检查是否存在 / 和 .,以及 . 是否在 / 之后
+            if (lastSlashIndex != -1 && lastDotIndex != -1 && lastSlashIndex < lastDotIndex) {
+                String result = input.substring(lastSlashIndex + 1, input.length());
+                //添加文件名称
+                projectReportSignatureWork.setSignatureFileName(result);
+            }
+            User userName = UserUtils.getByUserName("管理员");
+            projectReportSignatureWork.setSignatureUploadFileUser(userName);
+
+        }
+        //修改签章对应信息文件
+        projectReportSignatureWorkDao.updateSignatureInfo(projectReportSignatureWork);
+
+        return null;
+    }
+
+    /**
+     * 日常签章每个节点处理方法
+     * @param presignCallBack
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/getProjectReportSignatureWorkCallBackAccomplish", method= RequestMethod.POST)
+    public String getProjectReportSignatureWorkCallBackAccomplish(PresignCallBack presignCallBack, HttpServletResponse response) {
+
+        //根据contractId查询对应的报告信息
+        ProjectReportSignatureWork projectReportSignatureWork = projectReportSignatureService.getByContractId(presignCallBack.getContractId());
+        if(5 == projectReportSignatureWork.getStatus()){
+            return null;
+        }
+
+        String json = JSON.toJSONString(presignCallBack);
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtils.getResource();
+            //将页面签数据转json保存到redis中,并设置有效时间为1天
+            jedis.set("projectReportSignatureWorkSignatureSign" + projectReportSignatureWork.getId(),json);
+            jedis.expire("projectReportSignatureWorkSignatureSign" + projectReportSignatureWork.getId(), 86400);
+            jedis.set("projectReportSignatureWorkSignatureSignStatus" + projectReportSignatureWork.getId(),"true");
+            jedis.expire("projectReportSignatureWorkSignatureSignStatus" + projectReportSignatureWork.getId(),86400);
+        } catch (Exception e) {
+            logger.error("projectReportSignatureWorkSignatureSign", e);
+        } finally {
+            JedisUtils.returnResource(jedis);
+        }
+        return null;
+    }
+}

+ 605 - 0
src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/controller/ProjectReportSignatureWorkController.java

@@ -0,0 +1,605 @@
+package com.jeeplus.modules.signature.projectReportSignatureWork.controller;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.mapper.JsonMapper;
+import com.jeeplus.common.oss.OSSClientUtil;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.JedisUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
+import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
+import com.jeeplus.modules.signature.projectReportSignatureWork.entity.ProjectReportSignatureRelation;
+import com.jeeplus.modules.signature.projectReportSignatureWork.entity.ProjectReportSignatureWork;
+import com.jeeplus.modules.signature.projectReportSignatureWork.service.ProjectReportSignatureWorkService;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.service.OfficeService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
+import com.jeeplus.modules.workinvoice.entity.WorkInvoice;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+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 redis.clients.jedis.Jedis;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author: 徐滕
+ * @version: 2024-02-02 16:15
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/projectReport/projectReportSignature")
+public class ProjectReportSignatureWorkController extends BaseController {
+    /**
+     * 阿里云文件服务器前缀
+     */
+    private final static String aliyunUrl = Global.getConfig("aliyunUrl");
+
+    @Autowired
+    private ProjectReportSignatureWorkService projectReportSignatureService;
+    @Autowired
+    private ActTaskService actTaskService;
+
+    @Autowired
+    protected ProjectRecordsService projectRecordsService;
+    @Autowired
+    protected WorkContractInfoService workContractInfoService;
+
+    @Autowired
+    protected OfficeService officeService;
+
+
+
+    @ModelAttribute
+    public ProjectReportSignatureWork get(@RequestParam(required=false) String id) {
+        ProjectReportSignatureWork entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectReportSignatureService.get(id);
+        }
+        if (entity == null){
+            entity = new ProjectReportSignatureWork();
+        }
+        return entity;
+    }
+
+
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("projectReport:projectReportSignature:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(ProjectReportSignatureWork projectReportSignature, HttpServletRequest request, HttpServletResponse response, Model model) {
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        if (StringUtils.isNotBlank(projectReportSignature.getToflag())){
+            if (projectReportSignature.getToflag().equals("1")){
+                request.getSession().removeAttribute("projectReportSignature");
+                ProjectReportSignatureWork search=projectReportSignature;
+                request.getSession().setAttribute("searchProjectReportSignature",search);
+            }
+        }else{
+            if (request.getSession().getAttribute("searchProjectReportSignature")!=null){
+                projectReportSignature= (ProjectReportSignatureWork) request.getSession().getAttribute("searchProjectReportSignature");
+                model.addAttribute("projectReportSignature", projectReportSignature);
+            }
+        }
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        //获取项目信息
+        Page<ProjectReportSignatureWork> page = projectReportSignatureService.findPage(new Page<ProjectReportSignatureWork>(request, response), projectReportSignature);
+        List<ProjectReportSignatureWork> list = page.getList();
+
+        for (ProjectReportSignatureWork officeWork : list) {
+            if(StringUtils.isNotBlank(officeWork.getSignatureUrl())){
+                officeWork.setSignatureUrlFlag(1);
+                //处理文件路径
+                //如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
+                if(officeWork.getSignatureUrl().contains("/xg-qz")){
+                    if(StringUtils.isNotBlank(officeWork.getSignatureUrl())){
+                        String signatureUrl = officeWork.getSignatureUrl().replace("/xg-qz","");
+                        officeWork.setSignatureUrl(signatureUrl);
+                    }
+                    officeWork.setSignatureUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + officeWork.getSignatureUrl()));
+                }else{
+                    officeWork.setSignatureUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + officeWork.getSignatureUrl()));
+                }
+            }else{
+                officeWork.setSignatureUrlFlag(0);
+            }
+        }
+
+        model.addAttribute("page", page);
+        return "modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkList";
+    }
+
+    /**
+     * 查看,增加,编辑项目表单页面
+     */
+    @RequiresPermissions(value={"projectReport:projectReportSignature:add","projectReport:projectReportSignature:edit"},logical= Logical.OR)
+    @RequestMapping(value = "form")
+    public String form(ProjectReportSignatureWork projectReportSignature, Model model) {
+        if (projectReportSignature!=null&&StringUtils.isNotBlank(projectReportSignature.getId())) {
+            projectReportSignature = projectReportSignatureService.get(projectReportSignature.getId());
+        }else {
+            projectReportSignature.setCreateBy(UserUtils.getUser());
+            projectReportSignature.setOffice(UserUtils.getSelectOffice());
+            projectReportSignature.setCreateDate(new Date());
+        }
+
+
+        model.addAttribute("projectReportSignature", projectReportSignature);
+        return "modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkForm";
+    }
+
+    /**
+     * 查看,增加,编辑项目表单页面
+     */
+    @RequiresPermissions(value={"projectReport:projectReportSignature:edit"},logical= Logical.OR)
+    @RequestMapping(value = "modify")
+    public String modify(ProjectReportSignatureWork projectReportSignature, Model model) {
+        if (projectReportSignature!=null&&StringUtils.isNotBlank(projectReportSignature.getId())) {
+            projectReportSignature = projectReportSignatureService.get(projectReportSignature.getId());
+        }else {
+            projectReportSignature.setCreateBy(UserUtils.getUser());
+            projectReportSignature.setCreateDate(new Date());
+        }
+
+        if(StringUtils.isNotBlank(projectReportSignature.getProcessInstanceId())){
+            ProcessInstance processInstance = actTaskService.getProcIns(projectReportSignature.getProcessInstanceId());
+            if (processInstance!=null) {
+                Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+                Act act = new Act();
+                act.setTaskId(taskInfok.getId());
+                act.setTaskName(taskInfok.getName());
+                act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+                act.setProcDefId(taskInfok.getProcessDefinitionId());
+                act.setProcInsId(taskInfok.getProcessInstanceId());
+                act.setTask(taskInfok);
+                projectReportSignature.setAct(act);
+            }
+        }
+
+        model.addAttribute("projectReportSignature", projectReportSignature);
+        return "modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkModify";
+    }
+
+    /**
+     * 查看,增加,编辑项目表单页面
+     */
+    @RequiresPermissions(value={"projectReport:projectReportSignature:view"},logical= Logical.OR)
+    @RequestMapping(value = "view")
+    public String view(ProjectReportSignatureWork projectReportSignature, Model model) {
+        if (projectReportSignature!=null&&StringUtils.isNotBlank(projectReportSignature.getId())) {
+            projectReportSignature = projectReportSignatureService.get(projectReportSignature.getId());
+        }else {
+            projectReportSignature.setCreateBy(UserUtils.getUser());
+            projectReportSignature.setCreateDate(new Date());
+        }
+
+        List<WorkClientAttachment> signatureWorkAttachments = Lists.newArrayList();
+        if(StringUtils.isNotBlank(projectReportSignature.getSignatureUrl())){
+            WorkClientAttachment signatureAttachment = new WorkClientAttachment();
+
+            //处理文件路径
+            //如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
+            if(projectReportSignature.getSignatureUrl().contains("/xg-qz")){
+                if(StringUtils.isNotBlank(projectReportSignature.getSignatureUrl())){
+                    String signatureUrl = projectReportSignature.getSignatureUrl().replace("/xg-qz","");
+                    projectReportSignature.setSignatureUrl(signatureUrl);
+                }
+                signatureAttachment.setTemporaryUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + projectReportSignature.getSignatureUrl()));
+            }else{
+                signatureAttachment.setTemporaryUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + projectReportSignature.getSignatureUrl()));
+            }
+            User user = UserUtils.get(projectReportSignature.getSignatureUploadFileUser().getId());
+            signatureAttachment.setCreateBy(user);
+            signatureAttachment.setUpdateBy(user);
+            signatureAttachment.setCreateDate(projectReportSignature.getSignatureUploadDate());
+            signatureAttachment.setUpdateDate(projectReportSignature.getSignatureUploadDate());
+            signatureAttachment.setDelFlag("0");
+            signatureAttachment.setAttachmentName(projectReportSignature.getSignatureFileName());
+            String type = projectReportSignature.getSignatureUrl().substring(projectReportSignature.getSignatureUrl().lastIndexOf(".") + 1);
+            signatureAttachment.setType(type);
+            signatureWorkAttachments.add(signatureAttachment);
+        }
+
+
+        if(signatureWorkAttachments.size()>0){
+            projectReportSignature.setSignatureWorkAttachments(signatureWorkAttachments);
+        }
+        model.addAttribute("projectReportSignature", projectReportSignature);
+        return "modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkView";
+    }
+    /**
+     * 暂存信息
+     */
+    @RequiresPermissions(value={"projectReport:projectReportSignature:add","projectReport:projectReportSignature:edit"},logical=Logical.OR)
+    @RequestMapping(value = "tstore")
+    public String tstore(ProjectReportSignatureWork projectReportSignature, Model model, RedirectAttributes redirectAttributes) {
+        if (!beanValidator(model, projectReportSignature)){
+            return form(projectReportSignature, model);
+        }
+        try {
+            if (!projectReportSignature.getIsNewRecord()) {//编辑表单保存
+                ProjectReportSignatureWork t = projectReportSignatureService.get(projectReportSignature.getId());//从数据库取出记录的值
+
+                if(t.getStatus() == 2){
+                    addMessage(redirectAttributes, "报告签章申请已送审,无法重复送审");
+                    return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+                }else if(t.getStatus() == 5){
+                    addMessage(redirectAttributes, "报告签章申请已审核完成,无法再次送审");
+                    return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+                }
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportSignature, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                t.setStatus(1);
+                projectReportSignatureService.saveInfo(t);//保存
+            } else {//新增表单保存
+                projectReportSignature.setStatus(1);
+                projectReportSignatureService.saveInfo(projectReportSignature);//保存
+            }
+            addMessage(redirectAttributes, "保存报告签章申请成功");
+        }catch (Exception e){
+            logger.error("保存报告签章申请异常:",e);
+            addMessage(redirectAttributes, "保存报告签章申请异常:"+e.getMessage());
+        }
+        return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+    }
+
+    /**
+     * 保存项目
+     */
+    @RequiresPermissions(value={"projectReport:projectReportSignature:add","projectReport:projectReportSignature:edit"},logical=Logical.OR)
+    @RequestMapping(value = "save")
+    public String save(ProjectReportSignatureWork projectReportSignature, Model model, RedirectAttributes redirectAttributes) throws Exception {
+        if (!beanValidator(model, projectReportSignature)){
+            return form(projectReportSignature, model);
+        }
+        try {
+
+            if (!projectReportSignature.getIsNewRecord()) {//编辑表单保存
+                ProjectReportSignatureWork t = projectReportSignatureService.get(projectReportSignature.getId());//从数据库取出记录的值
+
+                if(t.getStatus() == 2){
+                    addMessage(redirectAttributes, "报告签章申请已送审,无法重复送审");
+                    return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+                }else if(t.getStatus() == 5){
+                    addMessage(redirectAttributes, "报告签章申请已审核完成,无法再次送审");
+                    return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+                }
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportSignature, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                projectReportSignatureService.save(t, ProjectStatusEnum.SIGNED);//保存
+            } else {//新增表单保存
+                projectReportSignatureService.save(projectReportSignature, ProjectStatusEnum.SIGNED);//保存
+            }
+            addMessage(redirectAttributes, "保存报告签章申请成功");
+        }catch (Exception e){
+            logger.error("保存报告签章申请异常:",e);
+            addMessage(redirectAttributes, "保存报告签章申请异常:"+e.getMessage());
+        }
+        return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+    }
+
+
+    /**
+     * 撤回操作
+     * @param request
+     * @param redirectAttributes
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping(value = "revoke")
+    public String revoke(HttpServletRequest request, RedirectAttributes redirectAttributes) throws Exception {
+        HashMap<String, String> requestMap = findRequestMap(request);
+        String id = requestMap.get("id");
+        try {
+            ProjectReportSignatureWork projectReportSignature = projectReportSignatureService.get(id);
+            if(3==projectReportSignature.getStatus() || 4==projectReportSignature.getStatus()){
+                addMessage(redirectAttributes, "报告签章申请已撤回、驳回,请勿重复操作");
+                return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+            }else if(5==projectReportSignature.getStatus()){
+                addMessage(redirectAttributes, "报告签章申请已审批通过,无法撤回");
+                return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+            }
+            projectReportSignatureService.cancelInvalidate(projectReportSignature);
+            addMessage(redirectAttributes, "撤回该报告签章申请成功");
+        }catch (Exception e){
+            logger.info(e.getMessage());
+            addMessage(redirectAttributes, "撤回该报告签章申请失败");
+        }
+        return "redirect:" + Global.getAdminPath() + "/projectReport/projectReportSignature/?repage";
+    }
+
+
+    /**
+     * 删除操作
+     */
+    @RequiresPermissions("projectReport:projectReportSignature:del")
+    @RequestMapping(value = "delete")
+    public String delete(ProjectReportSignatureWork projectReportSignature, RedirectAttributes redirectAttributes) {
+
+        projectReportSignatureService.delete(projectReportSignature);
+        addMessage(redirectAttributes, "作废报告签章申请成功");
+        if (StringUtils.isNotBlank(projectReportSignature.getHome()) && "home".equals(projectReportSignature.getHome())){
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }else if (StringUtils.isNotBlank(projectReportSignature.getHome()) && "notifyList".equals(projectReportSignature.getHome())){
+            return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+        }else {
+            return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+        }
+    }
+
+
+    @RequestMapping(value = "getProcess")
+    public String getProcess(ProjectReportSignatureWork projectReportSignature, Model model, HttpServletRequest request){
+        model.addAttribute("processInstanceId", projectReportSignature.getProcessInstanceId());
+        return "modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkTask";
+    }
+
+    /**
+     * 查询签证审核页面url
+     * @param id
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = "getSignatureUrl")
+    @ResponseBody
+    public HashMap<String, Object> getSignatureUrl( String id, RedirectAttributes redirectAttributes) {
+        HashMap<String, Object> map = Maps.newHashMap();
+        map.put("contractUrl","");
+        map.put("success",false);
+        try {
+
+            //根据项目id查询是否已经提交过了报告签章
+            ProjectReportSignatureWork projectReportSignature = projectReportSignatureService.get(id);
+            if(null == projectReportSignature || StringUtils.isBlank(projectReportSignature.getId())){
+                map.put("str","查询不到该报告签章申请信息");
+                map.put("success",false);
+                return map;
+            }
+            if(null!= projectReportSignature.getSignatureFlag() && 1 == projectReportSignature.getSignatureFlag()){
+                map.put("str","该报告签章申请已经盖章完成。请直接进行审核");
+                map.put("success",false);
+                return map;
+            }
+
+
+            //获取contractUrl路径
+            String contractUrl = projectReportSignatureService.getSignatureContractUrl(projectReportSignature.getSignatureContractId());
+            if("".equals(contractUrl)){
+                map.put("str","报告签章文件创建失败");
+                map.put("success",false);
+                return map;
+            }else{
+                map.put("contractUrl",contractUrl);
+                map.put("success",true);
+                return map;
+            }
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "报告签章申请审核页面信息获取失败");
+        }
+
+
+        return map;
+    }
+
+
+    /**
+     * 查询页面签署状态
+     * @param id
+     * @return
+     */
+    @RequestMapping(value = "getSignatureStatus")
+    @ResponseBody
+    public Map<String, Object> getSignatureStatus(String id) {
+        Map<String, Object> map = new HashMap();
+        map.put("success",false);
+
+        //根据项目id查询对应的审定单数据状态是否是已经被送审或者 是否存在值
+        ProjectReportSignatureWork projectReportSignature = projectReportSignatureService.get(id);
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtils.getResource();
+            if(1 == projectReportSignature.getSignatureFlag()){
+                map.put("success",true);
+            }else{
+                String status = jedis.get("projectReportSignatureWorkSignatureSignStatus" + projectReportSignature.getId());
+                map.put("success",status);
+            }
+        } catch (Exception e) {
+            logger.error("projectReportSignatureWorkSignatureSignStatus", e);
+        } finally {
+            JedisUtils.returnResource(jedis);
+        }
+
+        return map;
+    }
+
+    /**
+     * 审批
+     * @param projectReportSignature
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping("saveAudit")
+    public String saveAudit(ProjectReportSignatureWork projectReportSignature, RedirectAttributes redirectAttributes)  {
+        String home = projectReportSignature.getHome();
+        try {
+            String taskDefKey = projectReportSignature.getAct().getTaskDefKey();
+            //当状态为未通过时,重新修改数据
+            if ("modifyApply".equals(taskDefKey)) {
+                projectReportSignature.getAct().setComment("重新申请");
+            }
+            List<User> users = null;
+            //所属部门
+            Office office = officeService.get(projectReportSignature.getOffice().getId());
+            if ("bmzr".equals(taskDefKey)){
+                users = UserUtils.getByProssType(projectReportSignature.getProcessInstanceId(),2);
+                if (users == null)
+                    users = UserUtils.getByRoleActivityEnname("bgsquhe", 3, office.getId(), "11", projectReportSignature.getCreateBy());
+            }else if ("bgs".equals(taskDefKey)){
+                users = UserUtils.getByProssType(projectReportSignature.getProcessInstanceId(),2);
+                if (users == null)
+                    users = UserUtils.getByRoleActivityEnname("bgsquhe", 3, office.getId(), "11", projectReportSignature.getCreateBy());
+            }else if ("modifyApply".equals(taskDefKey)){
+                users = UserUtils.getByProssType(projectReportSignature.getProcessInstanceId(), 1);
+            }
+
+            String flag = projectReportSignature.getAct().getFlag();
+            if ("yes".equals(flag) && (users==null || users.size()==0)){
+                addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+            }else {
+                if (projectReportSignature.getStatus() != 2 && projectReportSignature.getStatus() != 4 && projectReportSignature.getStatus() != 5) {
+                    addMessage(redirectAttributes, "报告签章申请未发起,请发起申请");
+                    if (StringUtils.isNotBlank(home) && "home".equals(home)) {
+                        return "redirect:" + Global.getAdminPath() + "/home/?repage";
+                    }else if (StringUtils.isNotBlank(home) && "notifyList".equals(home)){
+                        return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+                    } else {
+                        return "redirect:" + Global.getAdminPath() + "/projectReport/projectReportSignature/?repage";
+                    }
+                }
+                if(projectReportSignature.getStatus() == 5){
+                    addMessage(redirectAttributes, "报告签章申请已登记完成,无法再次送审");
+                    if (StringUtils.isNotBlank(home) && "home".equals(home)){
+                        return "redirect:" + Global.getAdminPath() + "/home/?repage";
+                    }else if (StringUtils.isNotBlank(home) && "notifyList".equals(home)){
+                        return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+                    }else {
+                        return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+                    }
+                }
+                String str = projectReportSignatureService.signatuereSaveAudit(projectReportSignature,users);
+                addMessage(redirectAttributes, str);
+            }
+        }catch (Exception e){
+            addMessage(redirectAttributes, "报告签章申请审批失败");
+            logger.error("Exception e:"+e);
+        }
+
+        if (StringUtils.isNotBlank(home) && "home".equals(home)){
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }else if (StringUtils.isNotBlank(home) && "notifyList".equals(home)){
+            return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+        }else {
+            return "redirect:"+Global.getAdminPath()+"/projectReport/projectReportSignature/?repage";
+        }
+    }
+
+
+    /**
+     * 选择签章项目报告
+     */
+    @RequestMapping(value = "getProjectReportList")
+    public String selectproject(ProjectRecords project, String url, String fieldLabels, String fieldKeys, String searchLabel, String searchKey, String ids, Integer isProject, Integer isProjectFalg, String details, HttpServletRequest request, HttpServletResponse response, Model model) {
+        project.setCompany(UserUtils.getSelectCompany());
+        project.setProjectStatus(com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum.SIGNED.getValue());//已签状态
+        Page<ProjectRecords> page = projectRecordsService.getPaogectReportSignaturePage(new Page<ProjectRecords>(request, response), project);
+        List<ProjectRecords> list = page.getList();
+        try {
+            fieldLabels = URLDecoder.decode(fieldLabels, "UTF-8");
+            fieldKeys = URLDecoder.decode(fieldKeys, "UTF-8");
+            searchLabel = URLDecoder.decode(searchLabel, "UTF-8");
+            searchKey = URLDecoder.decode(searchKey, "UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+            logger.error("Exception e:"+e);
+        }
+        model.addAttribute("labelNames", fieldLabels.split("\\|"));
+        model.addAttribute("labelValues", fieldKeys.split("\\|"));
+        model.addAttribute("fieldLabels", fieldLabels);
+        model.addAttribute("fieldKeys", fieldKeys);
+        model.addAttribute("url", url);
+        model.addAttribute("searchLabel", searchLabel);
+        model.addAttribute("searchKey", searchKey);
+        project.setDetails(details);
+        model.addAttribute("obj", project);
+        model.addAttribute("isProject", isProject);
+        model.addAttribute("isProjectFalg", isProjectFalg);
+        model.addAttribute("page",page);
+        return "modules/sys/gridprojectreportsignature";
+    }
+
+
+    /**
+     * 获取项目编号
+     * @return
+     */
+    @RequestMapping(value = "getPNumber")
+    @ResponseBody
+    public String getPNumber(HttpServletRequest request) {
+        HashMap<Object, Object> map = Maps.newHashMap();
+        String obj = request.getParameter("obj");
+        ProjectRecords projectRecords = projectRecordsService.getRuralInfo(obj);
+        map.put("projectName",projectRecords.getProjectName());//项目名称
+        map.put("id",projectRecords.getId());//项目id
+        map.put("areaId",projectRecords.getArea().getId());//项目地区id
+        map.put("areaName",projectRecords.getArea().getName());//项目地区名称
+        map.put("projectNum",projectRecords.getProjectId());//项目编号
+        map.put("reportDataNum",projectRecords.getReportData().getNumber());//报告号
+        if(projectRecords.getWorkContractInfo() == null || null == projectRecords.getWorkContractInfo().getClient() || StringUtils.isBlank(projectRecords.getWorkContractInfo().getClient().getName())){
+            //无合同状态下,获取委托方的名称
+            projectRecordsService.queryLinkmanInfos(projectRecords);
+            if (projectRecords.getWorkClientLinkmanList() != null && projectRecords.getWorkClientLinkmanList().size() > 0) {
+                WorkClientLinkman linkman = projectRecords.getWorkClientLinkmanList().get(0);
+                map.put("clientName",linkman.getClientId().getName());//委托方
+            }
+        }else{
+            map.put("clientName",projectRecords.getWorkContractInfo().getClient().getName());//委托方
+        }
+        map.put("workContractName",projectRecords.getWorkContractInfo().getName());//合同名称
+        String id = projectRecords.getWorkContractInfo().getId();
+
+        WorkContractInfo workContractInfo = workContractInfoService.get(id);
+        if(workContractInfo!=null){
+            String oid = workContractInfo.getChargeCompany();
+            Office office = officeService.get(oid);
+            if(office!=null){
+                map.put("officeName",office.getTopCompany());//部门
+                map.put("officeId",office.getId());//部门
+            }
+        }
+        return JsonMapper.toJsonString(map);
+    }
+
+
+    /**
+     * 开票管理列表页面
+     */
+    @RequestMapping(value = "projectview")
+    public String view(ProjectReportSignatureWork projectReportSignature, HttpServletRequest request, HttpServletResponse response, Model model) {
+        List<ProjectReportSignatureRelation> projectRelation = projectReportSignatureService.getProjectRelation(projectReportSignature);
+        projectReportSignature.setProjectReportSignatureRelationList(projectRelation);
+        model.addAttribute("projectRelation", projectReportSignature);
+        return "modules/signature/projectRerpotSignatureWork/ProjectReportSignatureProjectView";
+    }
+
+}

+ 63 - 0
src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/dao/ProjectReportSignatureWorkDao.java

@@ -0,0 +1,63 @@
+package com.jeeplus.modules.signature.projectReportSignatureWork.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.signature.projectReportSignatureWork.entity.ProjectReportSignatureRelation;
+import com.jeeplus.modules.signature.projectReportSignatureWork.entity.ProjectReportSignatureWork;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@MyBatisDao
+public interface ProjectReportSignatureWorkDao extends CrudDao<ProjectReportSignatureWork> {
+    /**
+     * 根据签章documentId 查询信息
+     * @param documentId
+     * @return
+     */
+    ProjectReportSignatureWork getByDocumentId(String documentId);
+
+    /**
+     * 根据签章contractId 查询信息
+     * @param contractId
+     * @return
+     */
+    ProjectReportSignatureWork getByContractId(String contractId);
+
+
+    /**
+     * 修改状态值和流程id
+     * @param projectReportSignature
+     */
+    void updateProcessIdAndStatus(ProjectReportSignatureWork projectReportSignature);
+
+    /**
+     * 修改签章信息
+     * @param projectReportSignature
+     * @return
+     */
+    Integer updateSignatureInfo(ProjectReportSignatureWork projectReportSignature);
+
+    /**
+     * 删除关联报告信息
+     * @param id
+     * @return
+     */
+    void deleteProjectReportRelevanceBySignatureId(String id);
+
+    /**
+     * 删除关联报告信息
+     * @param id
+     * @return
+     */
+    Integer insertProjectReportRelevance(@Param("signatureId")String signatureId, @Param("projectId")String projectId);
+
+
+
+    /**
+     * 根据开票id查询所有开票项目 关联信息
+     * @param invoiceId
+     * @return
+     */
+    List<ProjectReportSignatureRelation> getProjectRelation(String invoiceId);
+}

+ 75 - 0
src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/entity/ProjectReportSignatureRelation.java

@@ -0,0 +1,75 @@
+package com.jeeplus.modules.signature.projectReportSignatureWork.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.modules.workinvoice.entity.WorkInvoice;
+
+/**
+ * 开票和项目关系表
+ * @author: 徐滕
+ * @create: 2021-05-11 15:44
+ **/
+public class ProjectReportSignatureRelation extends DataEntity<WorkInvoice> {
+    private String signatureId;       //开票编号
+    private String projectId;       //项目id
+    private String projectName;     //项目名称
+    private String workContractName;    //合同名称
+    private String projectNum;     //项目编号
+    private String clientName;  //委托方
+    private String reportDataNum;   //报告号
+
+    public String getSignatureId() {
+        return signatureId;
+    }
+
+    public void setSignatureId(String signatureId) {
+        this.signatureId = signatureId;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public String getWorkContractName() {
+        return workContractName;
+    }
+
+    public void setWorkContractName(String workContractName) {
+        this.workContractName = workContractName;
+    }
+
+    public String getProjectNum() {
+        return projectNum;
+    }
+
+    public void setProjectNum(String projectNum) {
+        this.projectNum = projectNum;
+    }
+
+    public String getClientName() {
+        return clientName;
+    }
+
+    public void setClientName(String clientName) {
+        this.clientName = clientName;
+    }
+
+    public String getReportDataNum() {
+        return reportDataNum;
+    }
+
+    public void setReportDataNum(String reportDataNum) {
+        this.reportDataNum = reportDataNum;
+    }
+}

+ 244 - 0
src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/entity/ProjectReportSignatureWork.java

@@ -0,0 +1,244 @@
+package com.jeeplus.modules.signature.projectReportSignatureWork.entity;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.ActEntity;
+import com.jeeplus.modules.ruralprojectrecords.entity.ProjectReportSignatureInfo;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workinvoice.entity.WorkInvoiceProjectRelation;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author: 徐滕
+ * @version: 2024-02-02 16:15
+ */
+public class ProjectReportSignatureWork extends ActEntity<ProjectReportSignatureWork> {
+    public static final String DAILY_OFFICE_WORK_KEY ="1012";//报告签章编号key
+
+    private String userId;  //申请人
+    private String userName;    //申请人姓名
+    private String signatureName;    //签章描述
+    private String number;    //签章编号
+    private String signatureType;   //签章类型(字典)
+    private Office office;		// 部门ID
+    private Office company;		// 公司ID
+    private Integer status;  //状态
+    private String processInstanceId;   //流程编号
+
+    private Date beginDate;
+    private Date endDate;
+
+    private String home;
+    private Integer signatureFlag;		//是否已签章(1为已签章)
+    private String signatureDocumentId;		//签章documentid
+    private String signatureContractId;		//签章contractid
+    private String signatureUrl;		//签章附件url
+    private String signatureFileName;		//签章附件名称
+    private Integer signatureUrlFlag;		//签章完成值判定条件
+    private Date signatureUploadDate;		//签章完成时间
+    private User signatureUploadFileUser;		//签章文件上传人信息
+
+
+    private List<ProjectReportSignatureRelation> projectReportSignatureRelationList;//开票和项目关系表
+
+
+    private List<WorkClientAttachment> workAttachments = Lists.newArrayList();//签章附件
+    private List<WorkClientAttachment> signatureWorkAttachments = Lists.newArrayList();//已签章附件
+
+    private String projectName;   //签章项目名称
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getSignatureName() {
+        return signatureName;
+    }
+
+    public void setSignatureName(String signatureName) {
+        this.signatureName = signatureName;
+    }
+
+    public String getNumber() {
+        return number;
+    }
+
+    public void setNumber(String number) {
+        this.number = number;
+    }
+
+    public String getSignatureType() {
+        return signatureType;
+    }
+
+    public void setSignatureType(String signatureType) {
+        this.signatureType = signatureType;
+    }
+
+    public Office getOffice() {
+        return office;
+    }
+
+    public void setOffice(Office office) {
+        this.office = office;
+    }
+
+    public Office getCompany() {
+        return company;
+    }
+
+    public void setCompany(Office company) {
+        this.company = company;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getProcessInstanceId() {
+        return processInstanceId;
+    }
+
+    public void setProcessInstanceId(String processInstanceId) {
+        this.processInstanceId = processInstanceId;
+    }
+
+    public Date getBeginDate() {
+        return beginDate;
+    }
+
+    public void setBeginDate(Date beginDate) {
+        this.beginDate = beginDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getHome() {
+        return home;
+    }
+
+    public void setHome(String home) {
+        this.home = home;
+    }
+
+    public Integer getSignatureFlag() {
+        return signatureFlag;
+    }
+
+    public void setSignatureFlag(Integer signatureFlag) {
+        this.signatureFlag = signatureFlag;
+    }
+
+    public String getSignatureDocumentId() {
+        return signatureDocumentId;
+    }
+
+    public void setSignatureDocumentId(String signatureDocumentId) {
+        this.signatureDocumentId = signatureDocumentId;
+    }
+
+    public String getSignatureContractId() {
+        return signatureContractId;
+    }
+
+    public void setSignatureContractId(String signatureContractId) {
+        this.signatureContractId = signatureContractId;
+    }
+
+    public String getSignatureUrl() {
+        return signatureUrl;
+    }
+
+    public void setSignatureUrl(String signatureUrl) {
+        this.signatureUrl = signatureUrl;
+    }
+
+    public String getSignatureFileName() {
+        return signatureFileName;
+    }
+
+    public void setSignatureFileName(String signatureFileName) {
+        this.signatureFileName = signatureFileName;
+    }
+
+    public Integer getSignatureUrlFlag() {
+        return signatureUrlFlag;
+    }
+
+    public void setSignatureUrlFlag(Integer signatureUrlFlag) {
+        this.signatureUrlFlag = signatureUrlFlag;
+    }
+
+    public Date getSignatureUploadDate() {
+        return signatureUploadDate;
+    }
+
+    public void setSignatureUploadDate(Date signatureUploadDate) {
+        this.signatureUploadDate = signatureUploadDate;
+    }
+
+    public User getSignatureUploadFileUser() {
+        return signatureUploadFileUser;
+    }
+
+    public void setSignatureUploadFileUser(User signatureUploadFileUser) {
+        this.signatureUploadFileUser = signatureUploadFileUser;
+    }
+
+    public List<WorkClientAttachment> getWorkAttachments() {
+        return workAttachments;
+    }
+
+    public void setWorkAttachments(List<WorkClientAttachment> workAttachments) {
+        this.workAttachments = workAttachments;
+    }
+
+    public List<WorkClientAttachment> getSignatureWorkAttachments() {
+        return signatureWorkAttachments;
+    }
+
+    public void setSignatureWorkAttachments(List<WorkClientAttachment> signatureWorkAttachments) {
+        this.signatureWorkAttachments = signatureWorkAttachments;
+    }
+
+    public List<ProjectReportSignatureRelation> getProjectReportSignatureRelationList() {
+        return projectReportSignatureRelationList;
+    }
+
+    public void setProjectReportSignatureRelationList(List<ProjectReportSignatureRelation> projectReportSignatureRelationList) {
+        this.projectReportSignatureRelationList = projectReportSignatureRelationList;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1187 - 0
src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/service/ProjectReportSignatureWorkService.java


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

@@ -79,6 +79,10 @@ import com.jeeplus.modules.ruralprojectrecords.entity.*;
 import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
 import com.jeeplus.modules.ruralprojectrecords.service.*;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
+import com.jeeplus.modules.signature.dailyOfficeWork.entity.DailyOfficeWork;
+import com.jeeplus.modules.signature.dailyOfficeWork.service.DailyOfficeWorkService;
+import com.jeeplus.modules.signature.projectReportSignatureWork.entity.ProjectReportSignatureWork;
+import com.jeeplus.modules.signature.projectReportSignatureWork.service.ProjectReportSignatureWorkService;
 import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.statement.service.StatementCompanyComprehensiveService;
 import com.jeeplus.modules.sys.dao.RoleDao;
@@ -546,6 +550,12 @@ public class WorkProjectNotifyController extends BaseController {
 	@Autowired
 	private FilialeWorkInvoiceService filialeWorkInvoiceService;
 
+	@Autowired
+	private DailyOfficeWorkService dailyOfficeWorkService;
+
+	@Autowired
+	private ProjectReportSignatureWorkService projectReportSignatureService;
+
 	@ModelAttribute
 	public WorkProjectNotify get(@RequestParam(required=false) String id) {
 		WorkProjectNotify entity = null;
@@ -1636,6 +1646,119 @@ public class WorkProjectNotifyController extends BaseController {
 					} else {
 						return "modules/ruralprojectrecords/electronicSeal/ruralProjectRecordsApprovalView";
 					}
+				} else if (workProjectNotify.getType().equals("170")) {    //日常签章
+
+					DailyOfficeWork dailyOfficeWork = dailyOfficeWorkService.get(workProjectNotify.getNotifyId());
+
+					if (dailyOfficeWork != null && StringUtils.isNotBlank(dailyOfficeWork.getId())) {
+
+
+						if(StringUtils.isNotBlank(dailyOfficeWork.getSignatureUrl())){
+							dailyOfficeWork.setSignatureUrlFlag(1);
+							//处理文件路径
+							//如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
+							if(dailyOfficeWork.getSignatureUrl().contains("/xg-qz")){
+								if(StringUtils.isNotBlank(dailyOfficeWork.getSignatureUrl())){
+									String signatureUrl = dailyOfficeWork.getSignatureUrl().replace("/xg-qz","");
+									dailyOfficeWork.setSignatureUrl(signatureUrl);
+								}
+								dailyOfficeWork.setSignatureUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + dailyOfficeWork.getSignatureUrl()));
+							}else{
+								dailyOfficeWork.setSignatureUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + dailyOfficeWork.getSignatureUrl()));
+							}
+						}else{
+							dailyOfficeWork.setSignatureUrlFlag(0);
+						}
+					}
+					dailyOfficeWork.setAct(getByAct(dailyOfficeWork.getProcessInstanceId()));
+					if(StringUtils.isNotBlank(workProjectNotify.getHome())){
+						dailyOfficeWork.setHome(workProjectNotify.getHome());
+					}else{
+						dailyOfficeWork.setHome("home");
+					}
+					//判定当前流程页面签署是否已经签署过,若签署过,则auditFlag 赋值 1
+					model.addAttribute("auditFlag",dailyOfficeWork.getSignatureFlag());
+
+					model.addAttribute("processInstanceId", dailyOfficeWork.getProcessInstanceId());
+					model.addAttribute("dailyOfficeWork", dailyOfficeWork);
+
+					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+						List<WorkClientAttachment> signatureWorkAttachments = Lists.newArrayList();
+						if(StringUtils.isNotBlank(dailyOfficeWork.getSignatureUrl())){
+							WorkClientAttachment signatureAttachment = new WorkClientAttachment();
+
+							//处理文件路径
+							//如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
+							if(dailyOfficeWork.getSignatureUrl().contains("/xg-qz")){
+								if(StringUtils.isNotBlank(dailyOfficeWork.getSignatureUrl())){
+									String signatureUrl = dailyOfficeWork.getSignatureUrl().replace("/xg-qz","");
+									dailyOfficeWork.setSignatureUrl(signatureUrl);
+								}
+								signatureAttachment.setTemporaryUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + dailyOfficeWork.getSignatureUrl()));
+							}else{
+								signatureAttachment.setTemporaryUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + dailyOfficeWork.getSignatureUrl()));
+							}
+							User user = UserUtils.get(dailyOfficeWork.getSignatureUploadFileUser().getId());
+							signatureAttachment.setCreateBy(user);
+							signatureAttachment.setUpdateBy(user);
+							signatureAttachment.setCreateDate(dailyOfficeWork.getSignatureUploadDate());
+							signatureAttachment.setUpdateDate(dailyOfficeWork.getSignatureUploadDate());
+							signatureAttachment.setDelFlag("0");
+							signatureAttachment.setAttachmentName(dailyOfficeWork.getSignatureFileName());
+							String type = dailyOfficeWork.getSignatureUrl().substring(dailyOfficeWork.getSignatureUrl().lastIndexOf(".") + 1);
+							signatureAttachment.setType(type);
+							signatureWorkAttachments.add(signatureAttachment);
+						}
+
+
+						if(signatureWorkAttachments.size()>0){
+							dailyOfficeWork.setSignatureWorkAttachments(signatureWorkAttachments);
+						}
+						return "modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureView";
+					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						//审核模板标识
+						model.addAttribute("identification", "signatureDailyOfficeWork");
+						model.addAttribute("identificationName","日常签章申请审核意见");
+						return "modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureAudit";
+					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+						return "modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureModify";
+					} else {
+						List<WorkClientAttachment> signatureWorkAttachments = Lists.newArrayList();
+						if(StringUtils.isNotBlank(dailyOfficeWork.getSignatureUrl())){
+							WorkClientAttachment signatureAttachment = new WorkClientAttachment();
+
+							//处理文件路径
+							//如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
+							if(dailyOfficeWork.getSignatureUrl().contains("/xg-qz")){
+								if(StringUtils.isNotBlank(dailyOfficeWork.getSignatureUrl())){
+									String signatureUrl = dailyOfficeWork.getSignatureUrl().replace("/xg-qz","");
+									dailyOfficeWork.setSignatureUrl(signatureUrl);
+								}
+								signatureAttachment.setTemporaryUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + dailyOfficeWork.getSignatureUrl()));
+							}else{
+								signatureAttachment.setTemporaryUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + dailyOfficeWork.getSignatureUrl()));
+							}
+							User user = UserUtils.get(dailyOfficeWork.getSignatureUploadFileUser().getId());
+							signatureAttachment.setCreateBy(user);
+							signatureAttachment.setUpdateBy(user);
+							signatureAttachment.setCreateDate(dailyOfficeWork.getSignatureUploadDate());
+							signatureAttachment.setUpdateDate(dailyOfficeWork.getSignatureUploadDate());
+							signatureAttachment.setDelFlag("0");
+							signatureAttachment.setAttachmentName(dailyOfficeWork.getSignatureFileName());
+							String type = dailyOfficeWork.getSignatureUrl().substring(dailyOfficeWork.getSignatureUrl().lastIndexOf(".") + 1);
+							signatureAttachment.setType(type);
+							signatureWorkAttachments.add(signatureAttachment);
+						}
+
+
+						if(signatureWorkAttachments.size()>0){
+							dailyOfficeWork.setSignatureWorkAttachments(signatureWorkAttachments);
+						}
+						return "modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureView";
+					}
+				} else if (workProjectNotify.getType().equals("173")) {    //报告签章
+					return this.disposeProjectReportSignatureWork(workProjectNotify,model);
+
 				} else if (workProjectNotify.getType().equals("171")) {    //合同管理new
 					RuralProjectRecords ruralProjectRecords = ruralProjectMessageElectronicSealService.getProjectApprovalSignatureById(workProjectNotify.getNotifyId());
 					ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(ruralProjectRecords.getId());
@@ -9646,6 +9769,127 @@ public class WorkProjectNotifyController extends BaseController {
 		return "modules/businessQuestions/businessQuestionsForm";
 	}
 
+
+	private String disposeProjectReportSignatureWork(WorkProjectNotify workProjectNotify,Model model) {
+		ProjectReportSignatureWork projectReportSignatureWork = projectReportSignatureService.get(workProjectNotify.getNotifyId());
+
+		if (projectReportSignatureWork != null && StringUtils.isNotBlank(projectReportSignatureWork.getId())) {
+
+
+			if(StringUtils.isNotBlank(projectReportSignatureWork.getSignatureUrl())){
+				projectReportSignatureWork.setSignatureUrlFlag(1);
+				//处理文件路径
+				//如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
+				/*if(projectReportSignatureWork.getSignatureUrl().contains("/xg-qz")){
+					if(StringUtils.isNotBlank(projectReportSignatureWork.getSignatureUrl())){
+						String signatureUrl = projectReportSignatureWork.getSignatureUrl().replace("/xg-qz","");
+						projectReportSignatureWork.setSignatureUrl(signatureUrl);
+					}
+					projectReportSignatureWork.setSignatureUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + projectReportSignatureWork.getSignatureUrl()));
+				}else{
+					projectReportSignatureWork.setSignatureUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + projectReportSignatureWork.getSignatureUrl()));
+				}*/
+			}else{
+				projectReportSignatureWork.setSignatureUrlFlag(0);
+			}
+		}
+		projectReportSignatureWork.setAct(getByAct(projectReportSignatureWork.getProcessInstanceId()));
+		if(StringUtils.isNotBlank(workProjectNotify.getHome())){
+			projectReportSignatureWork.setHome(workProjectNotify.getHome());
+		}else{
+			projectReportSignatureWork.setHome("home");
+		}
+		//判定当前流程页面签署是否已经签署过,若签署过,则auditFlag 赋值 1
+		model.addAttribute("auditFlag",projectReportSignatureWork.getSignatureFlag());
+
+		model.addAttribute("processInstanceId", projectReportSignatureWork.getProcessInstanceId());
+		model.addAttribute("projectReportSignature", projectReportSignatureWork);
+
+		if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+			List<WorkClientAttachment> signatureWorkAttachments = Lists.newArrayList();
+			if(StringUtils.isNotBlank(projectReportSignatureWork.getSignatureUrl())){
+				WorkClientAttachment signatureAttachment = new WorkClientAttachment();
+
+				//处理文件路径
+				//如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
+				if(projectReportSignatureWork.getSignatureUrl().contains("/xg-qz")){
+					if(StringUtils.isNotBlank(projectReportSignatureWork.getSignatureUrl())){
+						String signatureUrl = projectReportSignatureWork.getSignatureUrl().replace("/xg-qz","");
+						projectReportSignatureWork.setSignatureUrl(signatureUrl);
+					}
+					signatureAttachment.setTemporaryUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + projectReportSignatureWork.getSignatureUrl()));
+				}else{
+					signatureAttachment.setTemporaryUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + projectReportSignatureWork.getSignatureUrl()));
+				}
+				User user = UserUtils.get(projectReportSignatureWork.getSignatureUploadFileUser().getId());
+				signatureAttachment.setCreateBy(user);
+				signatureAttachment.setUpdateBy(user);
+				signatureAttachment.setCreateDate(projectReportSignatureWork.getSignatureUploadDate());
+				signatureAttachment.setUpdateDate(projectReportSignatureWork.getSignatureUploadDate());
+				signatureAttachment.setDelFlag("0");
+				signatureAttachment.setAttachmentName(projectReportSignatureWork.getSignatureFileName());
+				String type = projectReportSignatureWork.getSignatureUrl().substring(projectReportSignatureWork.getSignatureUrl().lastIndexOf(".") + 1);
+				signatureAttachment.setType(type);
+				signatureWorkAttachments.add(signatureAttachment);
+			}
+
+
+			if(signatureWorkAttachments.size()>0){
+				projectReportSignatureWork.setSignatureWorkAttachments(signatureWorkAttachments);
+			}
+			return "modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkView";
+		}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+			//审核模板标识
+			model.addAttribute("identification", "signatureprojectReportSignatureWork");
+			model.addAttribute("identificationName","签章申请审核意见");
+
+			String taskDefKey = projectReportSignatureWork.getAct().getTaskDefKey();
+
+			if (StringUtils.isNotBlank(taskDefKey) && ("bmzr".equals(taskDefKey) ||
+					"scbzr".equals(taskDefKey))) {
+				return "modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkBmzrAudit";
+			} else{
+				return "modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkAudit";
+			}
+
+		} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+			return "modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkModify";
+		} else {
+			List<WorkClientAttachment> signatureWorkAttachments = Lists.newArrayList();
+			if(StringUtils.isNotBlank(projectReportSignatureWork.getSignatureUrl())){
+				WorkClientAttachment signatureAttachment = new WorkClientAttachment();
+
+				//处理文件路径
+				//如果文件路径中包含 /xg-qz 则表示文件存储在签章的对应文件库中需要单独进行处理
+				if(projectReportSignatureWork.getSignatureUrl().contains("/xg-qz")){
+					if(StringUtils.isNotBlank(projectReportSignatureWork.getSignatureUrl())){
+						String signatureUrl = projectReportSignatureWork.getSignatureUrl().replace("/xg-qz","");
+						projectReportSignatureWork.setSignatureUrl(signatureUrl);
+					}
+					signatureAttachment.setTemporaryUrl(new OSSClientUtil().getQzFileTemporaryLookUrl(aliyunUrl + projectReportSignatureWork.getSignatureUrl()));
+				}else{
+					signatureAttachment.setTemporaryUrl(new OSSClientUtil().getFileTemporaryLookUrl(aliyunUrl + projectReportSignatureWork.getSignatureUrl()));
+				}
+				User user = UserUtils.get(projectReportSignatureWork.getSignatureUploadFileUser().getId());
+				signatureAttachment.setCreateBy(user);
+				signatureAttachment.setUpdateBy(user);
+				signatureAttachment.setCreateDate(projectReportSignatureWork.getSignatureUploadDate());
+				signatureAttachment.setUpdateDate(projectReportSignatureWork.getSignatureUploadDate());
+				signatureAttachment.setDelFlag("0");
+				signatureAttachment.setAttachmentName(projectReportSignatureWork.getSignatureFileName());
+				String type = projectReportSignatureWork.getSignatureUrl().substring(projectReportSignatureWork.getSignatureUrl().lastIndexOf(".") + 1);
+				signatureAttachment.setType(type);
+				signatureWorkAttachments.add(signatureAttachment);
+			}
+
+
+			if(signatureWorkAttachments.size()>0){
+				projectReportSignatureWork.setSignatureWorkAttachments(signatureWorkAttachments);
+			}
+			return "modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkView";
+		}
+	}
+
 	private String workReimbursementElectronicInvoiceAudit(WorkProjectNotify workProjectNotify,Model model) {
 		WorkReimbursement workReimbursement = workReimbursementService.get(workProjectNotify.getNotifyId());
 		//判断报销类型状态并添加报销类型信息数据

+ 8 - 0
src/main/resources/jeeplus.properties

@@ -357,6 +357,14 @@ approval_YC_category_id = 2932214418853044239
 #报告用印流程id(盐城)
 report_YC_category_id = 2933233458312618324
 
+#日常签章流程id
+signature_daily_office_work = 3190218693018722598
+
+#报告签章流程id
+signature_project_report_work = 3196710189708420066
+
+
+
 
 #其他系统的地址
 CPA_PATH:   http://localhost:8084

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

@@ -1522,4 +1522,215 @@
 			</otherwise>
 		</choose>
 	</select>
+
+
+	<select id="getProjectReportSignatureCount" resultType="int" >
+		SELECT count(DISTINCT a.id)
+		FROM rural_project_records a
+		<if test="leaderNameStr !=null and leaderNameStr !=''">
+			LEFT JOIN work_project_user w on a.id = w.project_id
+			LEFT JOIN sys_user su on w.user_id = su.id
+		</if>
+		LEFT JOIN work_project_user w1 on a.id = w1.project_id
+		<if test="workContractInfo !=null">
+			LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+		</if>
+		LEFT JOIN project_report_data prd on a.id = prd.project_id
+		<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+			LEFT JOIN work_client_info wct on wci.client_id = wct.id
+		</if>
+		left join work_invoice_project_relation wipr on wipr.project_id = a.id
+		left join work_invoice wi on wi.id = wipr.invoice_id
+		<where>
+			(prd.number is not null or prd.number != '')
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id like concat('%',#{projectId},'%')
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="scaleType != null and scaleType != ''">
+				AND a.scale_type = #{scaleType}
+			</if>
+			<if test="scaleUnit != null and scaleUnit != ''">
+				AND a.scale_unit = #{scaleUnit}
+			</if>
+			<if test="scaleQuantity != null and scaleQuantity != ''">
+				AND a.scale_quantity = #{scaleQuantity}
+			</if>
+			<if test="projectSite != null and projectSite != ''">
+				AND a.project_site LIKE concat('%',#{projectSite},'%')
+			</if>
+			<if test="remarks != null and remarks != ''">
+				AND a.remarks LIKE concat('%',#{remarks},'%')
+			</if>
+			<if test="projectDesc != null and projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND a.area_id = #{area.id}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{workContractInfo.contractNum}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{workContractInfo.contractPrice}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !=''">
+				AND wci.contract_type = #{workContractInfo.contractType}
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+			<if test="leaderNameStr !=null and leaderNameStr !=''">
+				AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+			</if>
+			<if test="projectStatus !=null">
+				AND a.status = #{projectStatus}
+			</if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+			<if test="reportData != null and reportData != ''">
+				<if test="reportData.number != null and reportData.number != ''">
+					AND prd.number like concat(concat('%',#{reportData.number}),'%')
+				</if>
+			</if>
+			<if test="invoiceStatus != null and invoiceStatus != ''">
+				<choose>
+					<when test="invoiceStatus== 5">
+						AND wi.invoice_state = '5'
+					</when>
+					<otherwise>
+						AND wi.invoice_state in (1,2,3,4)
+					</otherwise>
+				</choose>
+			</if>
+			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+			/*and prd.number is not null*/
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id})${sqlMap.dsf} )
+			</if>
+		</where>
+	</select>
+
+	<select id="getProjectReportSignatureList" resultType="ProjectRecords" >
+		SELECT
+		<include refid="projectRecordsColumns"/>
+		,
+		wci.name AS "workContractInfo.name",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name",
+		o.top_company AS "office.name",
+		dsu.name as "projectRegistrant",
+		prd.number as "reportData.number",
+		if(wipr.project_id is not null,"1","") as invoiceFlag,
+		wi.invoice_state as "invoiceStatus"
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+
+
+		LEFT JOIN project_report_data prd on a.id = prd.project_id
+		LEFT JOIN work_project_user w on a.id = w.project_id
+		LEFT JOIN sys_user su on w.user_id = su.id
+		LEFT JOIN sys_user dsu on a.create_by = dsu.id
+		LEFT JOIN work_project_user w1 on a.id = w1.project_id
+		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+		LEFT JOIN work_client_info wct on wci.client_id = wct.id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		left join work_invoice_project_relation wipr on wipr.project_id = a.id
+		left join work_invoice wi on wi.id = wipr.invoice_id
+		<where>
+			(prd.number is not null or prd.number != '')
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id like concat('%',#{projectId},'%')
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="scaleType != null and scaleType != ''">
+				AND a.scale_type = #{scaleType}
+			</if>
+			<if test="scaleUnit != null and scaleUnit != ''">
+				AND a.scale_unit = #{scaleUnit}
+			</if>
+			<if test="scaleQuantity != null and scaleQuantity != ''">
+				AND a.scale_quantity = #{scaleQuantity}
+			</if>
+			<if test="projectSite != null and projectSite != ''">
+				AND a.project_site LIKE concat('%',#{projectSite},'%')
+			</if>
+			<if test="remarks != null and remarks != ''">
+				AND a.remarks LIKE concat('%',#{remarks},'%')
+			</if>
+			<if test="projectDesc != null and projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND a.area_id = #{area.id}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{workContractInfo.contractNum}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{workContractInfo.contractPrice}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !=''">
+				AND wci.contract_type = #{workContractInfo.contractType}
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+			<if test="leaderNameStr !=null and leaderNameStr !=''">
+				AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+			</if>
+			<if test="projectStatus !=null">
+				AND a.status = #{projectStatus}
+			</if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+			<if test="reportData != null and reportData != ''">
+				<if test="reportData.number != null and reportData.number != ''">
+					AND prd.number like concat(concat('%',#{reportData.number}),'%')
+				</if>
+			</if>
+			<if test="invoiceStatus != null and invoiceStatus != ''">
+				<choose>
+					<when test="invoiceStatus== 5">
+						AND wi.invoice_state = '5'
+					</when>
+					<otherwise>
+						AND wi.invoice_state in (1,2,3,4)
+					</otherwise>
+				</choose>
+			</if>
+			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+			/*and prd.number is not null*/
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
+		</where>
+		GROUP BY a.id
+		<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>
 </mapper>

+ 353 - 0
src/main/resources/mappings/modules/signature/dailyOfficeWork/DailyOfficeWorkDao.xml

@@ -0,0 +1,353 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.signature.dailyOfficeWork.dao.DailyOfficeWorkDao">
+
+	<sql id="dailyOfficeWorkColumns">
+		distinct a.id AS "id",
+		a.create_by AS "createBy.id",
+		su.name as "createBy.name",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.remarks as "remarks",
+		a.signature_name as "signatureName",
+		a.number  as "number",
+		a.signature_type as "signatureType",
+		a.office_id as "office.id",
+		o.name as "office.name",
+		a.company_id as "company.id",
+		a.status as "status",
+		a.process_instance_id as "processInstanceId",
+		a.signature_contract_id as "signatureContractId",
+		a.signature_document_id as "signatureDocumentId",
+		a.signature_url as "signatureUrl",
+		a.signature_url_flag as "signatureUrlFlag",
+		a.signature_file_name as "signatureFileName",
+		a.signature_upload_date as "signatureUploadDate",
+		a.signature_upload_file_user as "signatureUploadFileUser.id",
+		sus.name as "signatureUploadFileUser.name",
+		a.signature_flag as "signatureFlag"
+	</sql>
+
+	<sql id="dailyOfficeWorkLeftColumns">
+        LEFT JOIN sys_user su ON su.id = a.create_by
+        LEFT JOIN sys_user sus ON sus.id = a.signature_upload_file_user
+		LEFT JOIN sys_office o ON o.id = a.office_id
+	</sql>
+
+	<select id="get" resultType="DailyOfficeWork" >
+		SELECT
+			<include refid="dailyOfficeWorkColumns"/>
+        FROM signature_daily_office_work a
+		<include refid="dailyOfficeWorkLeftColumns"/>
+		WHERE a.id = #{id} and a.del_flag = 0
+	</select>
+
+	<select id="getByDocumentId" resultType="DailyOfficeWork" >
+		SELECT
+			<include refid="dailyOfficeWorkColumns"/>
+        FROM signature_daily_office_work a
+		<include refid="dailyOfficeWorkLeftColumns"/>
+		WHERE a.signature_document_id like concat ('%',#{documentId},'%') and a.del_flag = 0
+	</select>
+
+	<select id="getByContractId" resultType="DailyOfficeWork" >
+		SELECT
+			<include refid="dailyOfficeWorkColumns"/>
+        FROM signature_daily_office_work a
+		<include refid="dailyOfficeWorkLeftColumns"/>
+		WHERE a.signature_contract_id =#{contractId} and a.del_flag = 0
+	</select>
+
+
+	<select id="findList" resultType="DailyOfficeWork" >
+		SELECT
+		<include refid="dailyOfficeWorkColumns"/>
+
+		FROM signature_daily_office_work a
+		<include refid="dailyOfficeWorkLeftColumns"/>
+		<where>
+			a.del_flag = 0
+			<if test="signatureName != null and signatureName != ''">
+				AND a.signature_name like concat('%',#{signatureName},'%')
+			</if>
+			<if test="number != null and number != ''">
+				AND a.number like concat('%',#{number},'%')
+			</if>
+
+			<if test="signatureType != null and signatureType != ''">
+				AND a.signature_type = #{signatureType}
+			</if>
+
+			<if test="createBy != null and((createBy.id != null and createBy.id != '') or (createBy.name != null and createBy.name != ''))">
+				AND (a.create_by = #{createBy.id} or su.name like concat('%',#{createBy.name},'%'))
+			</if>
+
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and su.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ( a.company_id = #{currentUser.company.id} ${sqlMap.dsf} )
+			</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="queryCount" resultType="int" >
+		SELECT count(a.id)
+		FROM signature_daily_office_work a
+		<include refid="dailyOfficeWorkLeftColumns"/>
+		<where>
+			a.del_flag = 0
+			<if test="signatureName != null and signatureName != ''">
+				AND a.signature_name like concat('%',#{signatureName},'%')
+			</if>
+			<if test="number != null and number != ''">
+				AND a.number like concat('%',#{number},'%')
+			</if>
+
+			<if test="signatureType != null and signatureType != ''">
+				AND a.signature_type = #{signatureType}
+			</if>
+
+			<if test="createBy != null and((createBy.id != null and createBy.id != '') or (createBy.name != null and createBy.name != ''))">
+				AND (a.create_by = #{createBy.id} or su.name like concat('%',#{createBy.name},'%'))
+			</if>
+
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and su.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ( a.company_id = #{currentUser.company.id} ${sqlMap.dsf} )
+			</if>
+		</where>
+	</select>
+
+	<insert id="insert">
+		INSERT INTO signature_daily_office_work(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			del_flag,
+			remarks,
+			signature_name,
+			number,
+			signature_type,
+			office_id,
+			company_id,
+			status,
+			process_instance_id
+
+			<if test="signatureContractId != null and signatureContractId != ''">
+				,signature_contract_id
+			</if>
+
+			<if test="signatureDocumentId != null and signatureDocumentId != ''">
+				,signature_document_id
+			</if>
+
+			<if test="signatureUrl != null and signatureUrl != ''">
+				,signature_url
+			</if>
+
+			<if test="signatureUrlFlag != null">
+				,signature_url_flag
+			</if>
+
+			<if test="signatureFileName != null and signatureFileName != ''">
+				,signature_file_name
+			</if>
+
+			<if test="signatureFileName != null">
+				,signature_upload_date
+			</if>
+
+			<if test="signatureUploadFileUser != null and signatureUploadFileUser.id != null and signatureUploadFileUser.id != ''">
+				,signature_upload_file_user
+			</if>
+
+			<if test="signatureFlag != null">
+				,#signature_flag
+			</if>
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{delFlag},
+			#{remarks},
+			#{signatureName},
+			#{number},
+			#{signatureType},
+			#{office.id},
+			#{company.id},
+			#{status},
+			#{processInstanceId}
+
+			<if test="signatureContractId != null and signatureContractId != ''">
+				,#{signatureContractId}
+			</if>
+
+			<if test="signatureDocumentId != null and signatureDocumentId != ''">
+				,#{signatureDocumentId}
+			</if>
+
+			<if test="signatureUrl != null and signatureUrl != ''">
+				,#{signatureUrl}
+			</if>
+
+			<if test="signatureUrlFlag != null">
+				,#{signatureUrlFlag}
+			</if>
+
+			<if test="signatureFileName != null and signatureFileName != ''">
+				,#{signatureFileName}
+			</if>
+
+			<if test="signatureFileName != null">
+				,#{signatureUploadDate}
+			</if>
+
+			<if test="signatureUploadFileUser != null and signatureUploadFileUser.id != null and signatureUploadFileUser.id != ''">
+				,#{signatureUploadFileUser}
+			</if>
+
+			<if test="signatureFlag != null">
+				,#{signatureFlag}
+			</if>
+		)
+	</insert>
+
+	<update id="update">
+		UPDATE signature_daily_office_work SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks}
+			<if test="signatureName != null and signatureName != ''">
+				,signature_name = #{signatureName}
+			</if>
+			<if test="signatureType != null and signatureType != ''">
+				,signature_type = #{signatureType}
+			</if>
+			<if test="status != null and status != ''">
+				,status = #{status}
+			</if>
+			<if test="processInstanceId != null and processInstanceId != ''">
+				,process_instance_id = #{processInstanceId}
+			</if>
+			<if test="signatureDocumentId != null and signatureDocumentId != ''">
+				,signature_document_id = #{signatureDocumentId}
+			</if>
+			<if test="signatureUrl != null">
+				,signature_url = #{signatureUrl}
+			</if>
+			<if test="signatureUrlFlag != null">
+				,signature_url_flag = #{signatureUrlFlag}
+			</if>
+			<if test="signatureContractId != null and signatureContractId != ''">
+				,signature_contract_id = #{signatureContractId}
+			</if>
+			<if test="signatureFlag != null">
+				,signature_flag = #{signatureFlag}
+			</if>
+			<if test="signatureFileName != null and signatureFileName != ''">
+				,signature_file_name = #{signatureFileName}
+			</if>
+			<if test="signatureUploadFileUser != null and signatureUploadFileUser.id != null and signatureUploadFileUser.id != ''">
+				,signature_upload_file_user = #{signatureUploadFileUser.id}
+			</if>
+			<if test="signatureUploadDate != null">
+				,signature_upload_date = #{signatureUploadDate}
+			</if>
+		WHERE id = #{id}
+	</update>
+
+	<update id="delete">
+		update signature_daily_office_work set del_flag = 1 where id= #{id}
+	</update>
+
+
+
+	<update id="updateProcessIdAndStatus" >
+		UPDATE  signature_daily_office_work SET
+		update_date = now()
+		<if test="null != processInstanceId and '' != processInstanceId">
+			,process_instance_id = #{processInstanceId}
+		</if>
+		<if test="null != status and '' != status">
+			,status = #{status}
+		</if>
+		,update_date = now()
+		WHERE id = #{id}
+	</update>
+
+
+	<update id="updateSignatureInfo" >
+		UPDATE signature_daily_office_work SET
+		<if test="signatureDocumentId != null and signatureDocumentId != ''">
+			signature_document_id = #{signatureDocumentId}
+		</if>
+		<if test="signatureUrl != null">
+			,signature_url = #{signatureUrl}
+		</if>
+		<if test="signatureUrlFlag != null">
+			,signature_url_flag = #{signatureUrlFlag}
+		</if>
+		<if test="signatureContractId != null and signatureContractId != ''">
+			,signature_contract_id = #{signatureContractId}
+		</if>
+		<if test="signatureFlag != null">
+			,signature_flag = #{signatureFlag}
+		</if>
+		<if test="signatureFileName != null and signatureFileName != ''">
+			,signature_file_name = #{signatureFileName}
+		</if>
+		<if test="signatureUploadFileUser != null and signatureUploadFileUser.id != null and signatureUploadFileUser.id != ''">
+			,signature_upload_file_user = #{signatureUploadFileUser.id}
+		</if>
+		<if test="signatureUploadDate != null">
+			,signature_upload_date = #{signatureUploadDate}
+		</if>
+		WHERE id = #{id}
+	</update>
+
+
+</mapper>

+ 389 - 0
src/main/resources/mappings/modules/signature/projectReport/ProjectReportSignatureDao.xml

@@ -0,0 +1,389 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.signature.projectReportSignatureWork.dao.ProjectReportSignatureWorkDao">
+
+	<sql id="dailyOfficeWorkColumns">
+		distinct a.id AS "id",
+		a.create_by AS "createBy.id",
+		su.name as "createBy.name",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.remarks as "remarks",
+		a.signature_name as "signatureName",
+		a.number  as "number",
+		a.signature_type as "signatureType",
+		a.office_id as "office.id",
+		o.name as "office.name",
+		a.company_id as "company.id",
+		a.status as "status",
+		a.process_instance_id as "processInstanceId",
+		a.signature_contract_id as "signatureContractId",
+		a.signature_document_id as "signatureDocumentId",
+		a.signature_url as "signatureUrl",
+		a.signature_url_flag as "signatureUrlFlag",
+		a.signature_file_name as "signatureFileName",
+		a.signature_upload_date as "signatureUploadDate",
+		a.signature_upload_file_user as "signatureUploadFileUser.id",
+		sus.name as "signatureUploadFileUser.name",
+		a.signature_flag as "signatureFlag"
+	</sql>
+
+	<sql id="dailyOfficeWorkLeftColumns">
+        LEFT JOIN sys_user su ON su.id = a.create_by
+        LEFT JOIN sys_user sus ON sus.id = a.signature_upload_file_user
+		LEFT JOIN sys_office o ON o.id = a.office_id
+	</sql>
+
+	<select id="get" resultType="ProjectReportSignatureWork" >
+		SELECT
+			<include refid="dailyOfficeWorkColumns"/>
+        FROM signature_project_report_relation a
+		<include refid="dailyOfficeWorkLeftColumns"/>
+		WHERE a.id = #{id} and a.del_flag = 0
+	</select>
+
+	<select id="getByDocumentId" resultType="ProjectReportSignatureWork" >
+		SELECT
+			<include refid="dailyOfficeWorkColumns"/>
+        FROM signature_project_report_relation a
+		<include refid="dailyOfficeWorkLeftColumns"/>
+		WHERE a.signature_document_id like concat ('%',#{documentId},'%') and a.del_flag = 0
+	</select>
+
+	<select id="getByContractId" resultType="ProjectReportSignatureWork" >
+		SELECT
+			<include refid="dailyOfficeWorkColumns"/>
+        FROM signature_project_report_relation a
+		<include refid="dailyOfficeWorkLeftColumns"/>
+		WHERE a.signature_contract_id =#{contractId} and a.del_flag = 0
+	</select>
+
+
+	<select id="findList" resultType="ProjectReportSignatureWork" >
+		SELECT
+		<include refid="dailyOfficeWorkColumns"/>
+		,( select group_concat(rpr.project_name) from rural_project_records rpr
+		LEFT JOIN signature_project_report_relevance_number sprrn ON rpr.id = sprrn.project_id
+		WHERE sprrn.signature_project_report_id = a.id) as "projectName"
+		FROM signature_project_report_relation a
+		<include refid="dailyOfficeWorkLeftColumns"/>
+		<where>
+			a.del_flag = 0
+			<if test="signatureName != null and signatureName != ''">
+				AND a.signature_name like concat('%',#{signatureName},'%')
+			</if>
+			<if test="number != null and number != ''">
+				AND a.number like concat('%',#{number},'%')
+			</if>
+
+			<if test="signatureType != null and signatureType != ''">
+				AND a.signature_type = #{signatureType}
+			</if>
+
+			<if test="createBy != null and((createBy.id != null and createBy.id != '') or (createBy.name != null and createBy.name != ''))">
+				AND (a.create_by = #{createBy.id} or su.name like concat('%',#{createBy.name},'%'))
+			</if>
+
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and su.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ( a.company_id = #{currentUser.company.id} ${sqlMap.dsf} )
+			</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="queryCount" resultType="int" >
+		SELECT count(a.id)
+		FROM signature_project_report_relation a
+		<include refid="dailyOfficeWorkLeftColumns"/>
+		<where>
+			a.del_flag = 0
+			<if test="signatureName != null and signatureName != ''">
+				AND a.signature_name like concat('%',#{signatureName},'%')
+			</if>
+			<if test="number != null and number != ''">
+				AND a.number like concat('%',#{number},'%')
+			</if>
+
+			<if test="signatureType != null and signatureType != ''">
+				AND a.signature_type = #{signatureType}
+			</if>
+
+			<if test="createBy != null and((createBy.id != null and createBy.id != '') or (createBy.name != null and createBy.name != ''))">
+				AND (a.create_by = #{createBy.id} or su.name like concat('%',#{createBy.name},'%'))
+			</if>
+
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and su.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ( a.company_id = #{currentUser.company.id} ${sqlMap.dsf} )
+			</if>
+		</where>
+	</select>
+
+	<insert id="insert">
+		INSERT INTO signature_project_report_relation(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			del_flag,
+			remarks,
+			signature_name,
+			number,
+			signature_type,
+			office_id,
+			company_id,
+			status,
+			process_instance_id
+
+			<if test="signatureContractId != null and signatureContractId != ''">
+				,signature_contract_id
+			</if>
+
+			<if test="signatureDocumentId != null and signatureDocumentId != ''">
+				,signature_document_id
+			</if>
+
+			<if test="signatureUrl != null and signatureUrl != ''">
+				,signature_url
+			</if>
+
+			<if test="signatureUrlFlag != null">
+				,signature_url_flag
+			</if>
+
+			<if test="signatureFileName != null and signatureFileName != ''">
+				,signature_file_name
+			</if>
+
+			<if test="signatureFileName != null">
+				,signature_upload_date
+			</if>
+
+			<if test="signatureUploadFileUser != null and signatureUploadFileUser.id != null and signatureUploadFileUser.id != ''">
+				,signature_upload_file_user
+			</if>
+
+			<if test="signatureFlag != null">
+				,#signature_flag
+			</if>
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{delFlag},
+			#{remarks},
+			#{signatureName},
+			#{number},
+			#{signatureType},
+			#{office.id},
+			#{company.id},
+			#{status},
+			#{processInstanceId}
+
+			<if test="signatureContractId != null and signatureContractId != ''">
+				,#{signatureContractId}
+			</if>
+
+			<if test="signatureDocumentId != null and signatureDocumentId != ''">
+				,#{signatureDocumentId}
+			</if>
+
+			<if test="signatureUrl != null and signatureUrl != ''">
+				,#{signatureUrl}
+			</if>
+
+			<if test="signatureUrlFlag != null">
+				,#{signatureUrlFlag}
+			</if>
+
+			<if test="signatureFileName != null and signatureFileName != ''">
+				,#{signatureFileName}
+			</if>
+
+			<if test="signatureFileName != null">
+				,#{signatureUploadDate}
+			</if>
+
+			<if test="signatureUploadFileUser != null and signatureUploadFileUser.id != null and signatureUploadFileUser.id != ''">
+				,#{signatureUploadFileUser}
+			</if>
+
+			<if test="signatureFlag != null">
+				,#{signatureFlag}
+			</if>
+		)
+	</insert>
+
+	<update id="update">
+		UPDATE signature_project_report_relation SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks}
+			<if test="number != null and number != ''">
+				,number = #{number}
+			</if>
+			<if test="signatureName != null and signatureName != ''">
+				,signature_name = #{signatureName}
+			</if>
+			<if test="signatureType != null and signatureType != ''">
+				,signature_type = #{signatureType}
+			</if>
+			<if test="status != null and status != ''">
+				,status = #{status}
+			</if>
+			<if test="processInstanceId != null and processInstanceId != ''">
+				,process_instance_id = #{processInstanceId}
+			</if>
+			<if test="signatureDocumentId != null and signatureDocumentId != ''">
+				,signature_document_id = #{signatureDocumentId}
+			</if>
+			<if test="signatureUrl != null">
+				,signature_url = #{signatureUrl}
+			</if>
+			<if test="signatureUrlFlag != null">
+				,signature_url_flag = #{signatureUrlFlag}
+			</if>
+			<if test="signatureContractId != null and signatureContractId != ''">
+				,signature_contract_id = #{signatureContractId}
+			</if>
+			<if test="signatureFlag != null">
+				,signature_flag = #{signatureFlag}
+			</if>
+			<if test="signatureFileName != null and signatureFileName != ''">
+				,signature_file_name = #{signatureFileName}
+			</if>
+			<if test="signatureUploadFileUser != null and signatureUploadFileUser.id != null and signatureUploadFileUser.id != ''">
+				,signature_upload_file_user = #{signatureUploadFileUser.id}
+			</if>
+			<if test="signatureUploadDate != null">
+				,signature_upload_date = #{signatureUploadDate}
+			</if>
+		WHERE id = #{id}
+	</update>
+
+	<update id="delete">
+		update signature_project_report_relation set del_flag = 1 where id= #{id}
+	</update>
+
+	<update id="updateProcessIdAndStatus" >
+		UPDATE  signature_project_report_relation SET
+		update_date = now()
+		<if test="null != processInstanceId and '' != processInstanceId">
+			,process_instance_id = #{processInstanceId}
+		</if>
+		<if test="null != status and '' != status">
+			,status = #{status}
+		</if>
+		,update_date = now()
+		WHERE id = #{id}
+	</update>
+
+	<update id="updateSignatureInfo" >
+		UPDATE signature_project_report_relation SET
+		<if test="signatureDocumentId != null and signatureDocumentId != ''">
+			signature_document_id = #{signatureDocumentId}
+		</if>
+		<if test="signatureUrl != null">
+			,signature_url = #{signatureUrl}
+		</if>
+		<if test="signatureUrlFlag != null">
+			,signature_url_flag = #{signatureUrlFlag}
+		</if>
+		<if test="signatureContractId != null and signatureContractId != ''">
+			,signature_contract_id = #{signatureContractId}
+		</if>
+		<if test="signatureFlag != null">
+			,signature_flag = #{signatureFlag}
+		</if>
+		<if test="signatureFileName != null and signatureFileName != ''">
+			,signature_file_name = #{signatureFileName}
+		</if>
+		<if test="signatureUploadFileUser != null and signatureUploadFileUser.id != null and signatureUploadFileUser.id != ''">
+			,signature_upload_file_user = #{signatureUploadFileUser.id}
+		</if>
+		<if test="signatureUploadDate != null">
+			,signature_upload_date = #{signatureUploadDate}
+		</if>
+		WHERE id = #{id}
+	</update>
+
+	<delete id="deleteProjectReportRelevanceBySignatureId">
+		delete from signature_project_report_relevance_number where signature_project_report_id = #{id}
+	</delete>
+
+
+	<insert id="insertProjectReportRelevance">
+		INSERT INTO signature_project_report_relevance_number(
+			signature_project_report_id,
+			project_id
+		) VALUES (
+			#{signatureId},
+			#{projectId}
+		)
+	</insert>
+
+
+	<select id="getProjectRelation" resultType="com.jeeplus.modules.signature.projectReportSignatureWork.entity.ProjectReportSignatureRelation">
+		select
+		  a.signature_project_report_id as 'signatureId',
+		  a.project_id as 'projectId',
+		  rpr.project_name as 'projectName',
+		  rpr.project_id as 'projectNum',
+		  wci.name as 'workContractName',
+		  prd.number as 'reportDataNum',
+		  wct.name as 'clientName'
+		from signature_project_report_relevance_number a
+		left join rural_project_records rpr on a.project_id = rpr.id
+		left join work_contract_info wci on rpr.contract_id = wci.id
+		left join work_client_info wct on wci.client_id = wct.id
+		left join project_report_data prd on prd.project_id = a.project_id
+		where a.signature_project_report_id = #{signatureId}
+		order by rpr.create_by asc
+	</select>
+
+</mapper>

+ 2 - 0
src/main/resources/spring-context-shiro.xml

@@ -21,6 +21,8 @@
                 ${adminPath}/weChatCallBack/** = anon
                 ${adminPath}/ruralProject/ruralProjectRecords/getDownloadProjectView = anon
                 ${adminPath}/ruralProject/signatureCallBack/** = anon
+                ${adminPath}/dailyOfficeWork/signatureCallBack/** = anon
+                ${adminPath}/projectReportSignatureCallBack/projectReportSignatureCallBack/** = anon
                 ${adminPath}/weXin/theOrder/** = anon
                 ${adminPath}/viewFile/viewFile/** = anon
                 ${adminPath}/webpage/weixin/orderMeal.jsp = anon

+ 63 - 0
src/main/webapp/WEB-INF/tags/sys/gridselectprojectsignatures.tag

@@ -0,0 +1,63 @@
+<%@ tag language="java" pageEncoding="UTF-8"%>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ attribute name="id" type="java.lang.String" required="true" description="编号"%>
+<%@ attribute name="name" type="java.lang.String" required="true" description="隐藏域名称(ID)"%>
+<%@ attribute name="value" type="java.lang.String" required="true" description="隐藏域值(ID)"%>
+<%@ attribute name="labelName" type="java.lang.String" required="true" description="输入框名称(Name)"%>
+<%@ attribute name="labelValue" type="java.lang.String" required="true" description="输入框值(Name)"%>
+<%@ attribute name="fieldLabels" type="java.lang.String" required="true" description="表格Th里显示的名字"%>
+<%@ attribute name="fieldKeys" type="java.lang.String" required="true" description="表格Td里显示的值"%>
+<%@ attribute name="searchLabel" type="java.lang.String" required="true" description="表格Td里显示的值"%>
+<%@ attribute name="searchKey" type="java.lang.String" required="true" description="表格Td里显示的值"%>
+<%@ attribute name="title" type="java.lang.String" required="true" description="选择框标题"%>
+<%@ attribute name="url" type="java.lang.String" required="true" description="数据地址"%>
+<%@ attribute name="cssClass" type="java.lang.String" required="false" description="css样式"%>
+<%@ attribute name="cssStyle" type="java.lang.String" required="false" description="css样式"%>
+<%@ attribute name="disabled" type="java.lang.String" required="false" description="是否限制选择,如果限制,设置为disabled"%>
+<%@ attribute name="isProject" type="java.lang.String" required="false" description="是否是项目开票"%>
+<%@ attribute name="isProjectFalg" type="java.lang.String" required="false" description="是否是项目开票"%>
+<%@ attribute name="details" type="java.lang.String" required="false" description="非项目开票详情"%>
+
+<script type="text/javascript">
+function searchGrid${id}(){
+	var ids =  $("#ids").val();
+	//alert(ids);
+    //$(" #id").val();
+	top.layer.open({
+	    type: 2,
+	    area: ['90%','90%'],
+	    title:"${title}",
+	    name:'friend',
+		skin:"two-btns",
+	    content: encodeURI("${url}?fieldLabels=${fieldLabels}&fieldKeys=${fieldKeys}&url=${url}&searchLabel=${searchLabel}&searchKey=${searchKey}&isProject=${isProject}&isProjectFalg=${isProjectFalg}&details=${details}&ids="+ids) ,
+	    btn: ['确定', '关闭'],
+	    yes: function(index, layero){
+	    	 var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+	    	 var item = iframeWin.getSelectedItem();
+	    	 console.log(item)
+	    	 if(item == "-1"){
+		    	 return;
+	    	 }
+	    	 var isProject=item.split('_item_')[3];
+	    	 var details=item.split('_item_')[4];
+	    	 var projectFlag=item.split('_item_')[5];
+			 var idArray= new Array(); //定义一数组
+			 idArray=item.split('_item_')[0].split(","); //字符分割
+			 $("#${id}Id").val(idArray[0]);
+			 $("#${id}Name").val(item.split('_item_')[1]);
+	    	 $("#projectFlag").val(projectFlag);
+	    	 console.log(item.split('_item_')[0]);
+			 top.layer.close(index);//关闭对话框。
+			newSetPNumber(item.split('_item_')[0],'${id}',isProject,details);
+		  },
+		  cancel: function(index){
+	       }
+	});
+};
+</script>
+	<input id="${id}Id" name="${name}"  type="hidden" value="${value}"/>
+	<div class="input-group" style="width: 100%">
+		<input id="${id}Name"  onclick="searchGrid${id}()" placeholder="${title}" name="${labelName }" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}"
+		class="${cssClass}" style="${cssStyle}"/>
+    </div>
+	 <label id="${id}Name-error" class="error" for="${id}Name" style="display:none"></label>

+ 2 - 0
src/main/webapp/static/oss/ossupload.js

@@ -1218,6 +1218,8 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
                 }else {
                     parent.layer.msg("上传失败!",{icon:2});
                 }
+
+                $("#flagFile").val(true);
             }
         })
     }).catch(function (err) {

+ 0 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsForm.jsp

@@ -293,14 +293,10 @@
                 var emergencyProject="${ruralProjectRecords.emergencyProject}"
                 if (emergencyProject=="1"){
                     $("#emergencyProjectFlag").val("1");
-                    document.getElementById('reportSwitch').checked = true;
-                    document.getElementById('reportSwitch').disabled = false;
                     // $("#emergencyProject").prop("checked",true);
                     layui.form.render();
                 }else{
                     $("#emergencyProjectFlag").val("0");
-                    document.getElementById('reportSwitch').checked = false;
-                    document.getElementById('reportSwitch').disabled = true;
                     // $("#emergencyProject").prop("checked",false);
                     layui.form.render();
                 }

+ 0 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsForm.jsp

@@ -275,14 +275,10 @@
                 var emergencyProject="${ruralProjectRecords.emergencyProject}"
                 if (emergencyProject=="1"){
                     $("#emergencyProjectFlag").val("1");
-                    document.getElementById('reportSwitch').checked = true;
-                    document.getElementById('reportSwitch').disabled = false;
                     // $("#emergencyProject").prop("checked",true);
                     layui.form.render();
                 }else{
                     $("#emergencyProjectFlag").val("0");
-                    document.getElementById('reportSwitch').checked = false;
-                    document.getElementById('reportSwitch').disabled = true;
                     // $("#emergencyProject").prop("checked",false);
                     layui.form.render();
                 }

+ 393 - 0
src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureAudit.jsp

@@ -0,0 +1,393 @@
+<%@ 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>
+	<script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+	<script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+	<script src="${ctxStatic}/common/html/js/script.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+				var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+				$("#opinion").val(ss);
+                if(obj == 1) {
+
+					var auditFlag = $("#auditFlag").val();
+					if(auditFlag != 1){
+						top.layer.msg('签章未审核完成,请审核后点击同意', {icon: 0});
+						return false;
+					}
+                    $("#flag").val("yes");
+                }else {
+                    if(obj == 2){
+                        $("#flag").val("no1");
+					}else {
+                        $("#flag").val("no2");
+					}
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+		  return false;
+		}
+		$(document).ready(function() {
+
+			layui.use(['form', 'layer'], function () {
+				var form = layui.form;
+			});
+
+			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);
+					}
+				}
+			});
+		});
+        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 = "170";
+				console.log(file);
+				var timestamp=new Date().getTime();
+
+					var storeAs = "signatureDailyOfficeWork";
+				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){
+            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 getManualSignatureUrl(id){
+			$.ajax({
+				type:"post",
+				url:'${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/getSignatureUrl',
+				data:{"id": id},
+				dataType:"json",
+				success:function(data){
+					if(data.success) {
+						window.open(data.contractUrl);
+						//对审核结果进行查询(定时任务。每3秒进行一次查询)
+						var interVal = setInterval(function (){
+									$.ajax({
+										type:"post",
+										url:'${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/getSignatureStatus',
+										data:{"id": id},
+										dataType:"json",
+										success:function(data){
+											if(data.success) {
+												//签章按钮隐藏
+												$("#approvaButton").css("display","none");
+												//设置可以审核操作
+												$("#auditFlag").val(1)
+												clearInterval(interVal)
+												top.layer.msg('签章已完成,请点击审核通过或驳回!', {icon: 1});
+											}
+										}
+									})
+								}
+								,3000)
+					}else {
+						top.layer.msg("签章失败!", {icon: 0});
+					}
+				}
+			})
+			return;
+		}
+	</script>
+</head>
+<body >
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="dailyOfficeWork" enctype="multipart/form-data" action="${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/saveAudit" method="post" class="form-horizontal layui-form">
+		<form:hidden path="id"/>
+		<form:hidden path="home"/>
+		<form:hidden path="act.taskId"/>
+		<form:hidden path="act.taskName"/>
+		<form:hidden id="taskDefKey" path="act.taskDefKey"/>
+		<form:hidden path="act.procInsId"/>
+		<form:hidden path="act.procDefId"/>
+		<form:hidden path="processInstanceId"/>
+		<form:hidden id="flag" path="act.flag"/>
+		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="255">
+		<input type="hidden" id="auditFlag" name="auditFlag" value="${auditFlag}">
+		<c:set var="status" value="${dailyOfficeWork.act.status}" />
+
+
+
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>项目基础信息</h2></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" style="background-color: #f1f1f1" value="${dailyOfficeWork.signatureName}"/>
+					</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="number" htmlEscape="false"  readonly="true" class="form-control layui-input" cssStyle="background-color: #f1f1f1"/>
+						</div>
+					</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 readOnlyFFF">
+						<form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" id="signatureType" disabled="true"  readonly="true" value="${dailyOfficeWork.signatureType}">
+							<form:option value=""/>
+							<form:options items="${fns:getMainDictList('signature_type_daily_office_work')}" itemLabel="label" itemValue="value" 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="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">
+						<form:input path="office.name" htmlEscape="false" id="officeName" 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 id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${dailyOfficeWork.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control judgment layui-input"/>
+					</div>
+				</div>
+
+
+				<div class="layui-item layui-col-sm12 lw7 with-textarea">
+					<label class="layui-form-label">备注:</label>
+					<div class="layui-input-block">
+						<textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${dailyOfficeWork.remarks}</textarea>
+					</div>
+				</div>
+			</div>
+
+
+			<div class="form-group layui-row">
+				<c:if test="${auditFlag != 1}">
+					<div style="float: right"> <a id="approvaButton" href=javascript:void(0);  onclick="getManualSignatureUrl('${dailyOfficeWork.id}')" class="layui-btn layui-btn-sm" >签章审核</a></div>
+				</c:if>
+				<div class="form-group-label"><h2>签章申请附件信息</h2></div>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${dailyOfficeWork.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${dailyOfficeWork.uploadMode == 2}">
+										<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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+															</c:when>
+															<c:otherwise>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</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}">
+											</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="${workReimbursement.uploadMode == 2}">
+																<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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+																			</c:when>
+																			<c:otherwise>
+																				<c:choose>
+																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+																					</c:when>
+																					<c:otherwise>
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+																					</c:otherwise>
+																				</c:choose>
+																			</c:otherwise>
+																		</c:choose>
+																	</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}">
+																	</c:when>
+																	<c:otherwise>
+																		<c:choose>
+																			<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																				<td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+																			</c:when>
+																			<c:otherwise>
+																				<c:choose>
+																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+																					</c:when>
+																					<c:otherwise>
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+																					</c:otherwise>
+																				</c:choose>
+																			</c:otherwise>
+																		</c:choose>
+																	</c:otherwise>
+																</c:choose>
+															</c:otherwise>
+														</c:choose>
+													</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>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+											<%--													<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">--%>
+											<%--														<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>--%>
+											<%--													</c:if>--%>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+
+
+	</form:form>
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('个人模板列表', '${ctx}/auditTemplate/auditTemplate/templateList?identification=${signatureDailyOfficeWork}&name=${identificationName}','80%', '70%','','关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 审核意见模板列表</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${signatureDailyOfficeWork}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>${projectNotifyType}审批流程</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>

+ 440 - 0
src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureForm.jsp

@@ -0,0 +1,440 @@
+<%@ 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>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <style>
+        #projectDesc-error{
+            left:0;
+            top:82px;
+        }
+        .layui-layer-dialog{
+            background: red;
+        }
+        td input{
+            margin-left:-10px !important;
+            height: 42px !important;
+        }
+        .disables {
+            pointer-events: none;
+        }
+        .notDisables {
+            pointer-events: all;
+        }
+        .forbidden{
+            background-color:#c2c2c2;
+        }
+
+        .notForbidden{
+            background-color:#3ca2e0;
+        }
+        .spanzj{
+            color: red;
+            font-size: 12px;
+            padding-left: 10px;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(i==2){
+                    $("#inputForm").attr("action","${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/tstore");
+                }else{
+                    var flag = $("#flagFile").val();
+                    if(flag == 'false'){
+                        top.layer.msg('附件信息未上传完成,请等待!', {icon: 0});
+                        return;
+                    }
+                    var length = $("#file_attachment").find("tr").length ;
+                    if(length == 0){
+                        top.layer.msg("请上传签章附件", {icon: 0});
+                        return;
+                    }
+                    var flags=judgment();
+                    if (!flags){
+                        return flags;
+                    }
+                }
+                $("#inputForm").submit();
+                return true;
+            }else{
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            var radioVal ;
+            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);
+                    }
+                }
+            });
+
+        });
+
+        function insertTitle(tValue){
+            $("#flagFile").val(false);
+            var files = $("#attachment_file")[0].files;
+            for(var i = 0;i<files.length;i++) {
+                var file = files[i];
+                var attachTypes = "doc,docx,pdf";
+                var suffixResult = 0;
+                var fileName = file.name.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
+                var fileNameLength = file.name.length;//获取到文件名长度
+                var suffix = file.name.substring(fileName + 1, fileNameLength);//截取后缀名
+                suffix = suffix.toLowerCase();//后缀名转换小写
+                attachTypes = attachTypes.toLowerCase();
+                var attachTypeList = attachTypes.split(",");
+                for (var x in attachTypeList) {
+                    if(attachTypeList[x] == suffix){
+                        suffixResult = 1;
+                        break;
+                    }
+                }
+                if(suffixResult == 0 ){
+                    top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
+                    return false;
+                }
+
+                var attachmentId = $("#id").val();
+                var attachmentFlag = "170";
+                /*console.log(file);*/
+                var timestamp=new Date().getTime();
+
+                var storeAs = "signatureDailyOfficeWork";
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                console.log(32145121)
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);
+            }
+        }
+
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function addRow(list, idx, tpl, row){
+            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();
+        }
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="dailyOfficeWork" action="${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/save" method="post" class="form-horizontal layui-form ">
+            <form:hidden path="id"/>
+            <input type="hidden" id="flagFile" value="">
+
+            <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="signatureName" id="signatureName" maxlength="255" htmlEscape="false" placeholder="请输入签章描述" 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="number" 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 dailyOfficeWork.projectStatus}">${fns:getDictLabel(dailyOfficeWork.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"><span class="require-item">*</span>签章类型:</label>
+                    <div class="layui-input-block readOnlyFFF">
+                        <form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" id="signatureType" value="${dailyOfficeWork.signatureType}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('signature_type_daily_office_work')}" itemLabel="label" itemValue="value" 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="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">
+                        <form:input path="office.name" htmlEscape="false" id="officeName" 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 id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${dailyOfficeWork.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control judgment layui-input"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm12 lw7 with-textarea">
+                    <label class="layui-form-label ">备注:</label>
+                    <div class="layui-input-block">
+                        <form:textarea placeholder="请输入备注" 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">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><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" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th>文件</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="200px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${dailyOfficeWork.workAttachments}" var="workClientAttachment"
+                                   varStatus="status">
+                            <tr>
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                        <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </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}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)"
+                                                               onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
+                                                        </td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                                                <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </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}">
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </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>
+                                <td class="op-td">
+                                    <div class="op-btn-box">
+
+                                            <%--附件下载删除--%>
+                                        <c:choose>
+                                            <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+                                            <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>
+                                        </c:if>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn layui-btn-warm" >&nbsp;收藏</a>
+                                        </c:if>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 481 - 0
src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureList.jsp

@@ -0,0 +1,481 @@
+<%@ 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}/layui/layuidown.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+    <%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            layui.use(['dropdown', 'util', 'layer'], function () {
+                var form = layui.form;
+            })
+
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+                , trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+                , trigger: 'click'
+            });
+        });
+
+        function reset() {
+            $("#searchForm").resetForm();
+        }
+
+        function openDialog(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['送审', '暂存', '关闭'],
+                btn1: 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(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2: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(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+        //打开对话框(查看)
+        function openDialogReportView(title,url,id,width,height){
+
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            $.ajax({
+                async: false,
+                url: "${ctx}/ruralProject/ruralCostProjectMessage/getReportExist?id="+id,
+                dataType: "json",
+                success: function (data) {
+                    if(data.success){
+                        top.layer.open({
+                            type: 2,
+                            skin: 'one-btn',
+                            area: [width, height],
+                            title: title,
+                            maxmin: true, //开启最大化最小化按钮
+                            content: url ,
+                            btn: ['关闭'],
+                            cancel: function(index){
+                            }
+                        });
+                    }else{
+                        top.layer.msg("该签章申请信息已删除!", {icon: 0});
+                        window.location.reload();
+                    }
+                }
+            });
+
+        }
+        function openDialogre(title,url,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                btn1: 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(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    if(split.length==2){return}
+                    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(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+        function adminDelete(title,url,width,height,target,id) {
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 0,
+                title: title,
+                content: '确定删除这个申请吗?',
+                btn:["确定","取消"],
+                btn1: function (index){
+                    layer.close(index);
+                    $.ajax({
+                        async: false,
+                        url: url,
+                        dataType: "json",
+                        success: function (data) {
+                            if(data.success){
+                                $.ajax({
+                                    async: false,
+                                    url: "${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/adminDelete?id="+id,
+                                    dataType: "json",
+                                    success: function (data) {
+                                        if(data.success){
+                                            top.layer.msg("该申请删除成功!", {icon: 0});
+                                            window.location.reload();
+                                        }else{
+                                            top.layer.msg("该申请删除失败!", {icon: 0});
+                                        }
+                                    }
+                                });
+                            }else{
+                            }
+                        }
+                    });
+                },
+                btn2:function (index) {
+                    layer.close(index);
+
+                }
+            });
+        }
+    </script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="layui-row contentShadow shadowLR" id="queryDiv">
+                <form:form id="searchForm" modelAttribute="dailyOfficeWork" action="${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/" 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}"/>
+                    <input id="toflag" name="toflag" type="hidden" value="1"/>
+                    <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+                    <div class="commonQuery lw6">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">签章描述:</label>
+                            <div class="layui-input-block">
+                                <form:input path="signatureName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">签章类型:</label>
+                            <div class="layui-input-block readOnlyFFF">
+                                <form:select placeholder="请选择" path="signatureType" class="form-control editable-select layui-input" id="attachmentProjectSort" value="${signatureType}">
+                                    <form:option value=""/>
+                                    <form:options items="${fns:getMainDictList('signature_type_daily_office_work')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                </form:select>
+                            </div>
+                        </div>
+                        <div class="layui-item athird">
+                            <div class="input-group">
+                                <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+                                <div class="layui-btn-group search-spacing">
+                                    <button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+                                    <button id="searchReset" class="layui-btn layui-btn-sm" onclick="resetSearch()">重置</button>
+                                </div>
+                            </div>
+                        </div>
+                        <div style="    clear:both;"></div>
+                    </div>
+                    <div id="moresees" style="clear:both;display:none;" class="lw6">
+
+                        <div class="layui-item query athird ">
+                            <label class="layui-form-label">登记人:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:inquireselectUserNotReadolny id="createBy" name="createBy.id" value="${dailyOfficeWork.createBy.id}" labelName="createBy.name" labelValue="${dailyOfficeWork.createBy.name}" cssStyle="background-color: #fff"
+                                                                  title="登记人" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">部门:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:treeselectMoHu id="officeId" name="office.id" value="${dailyOfficeWork.office.id}" labelName="office.name" labelValue="${dailyOfficeWork.office.name}"
+                                                    title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird ">
+                            <label class="layui-form-label">创建时间:</label>
+                            <div class="layui-input-block readOnlyFFF">
+                                <input id="beginDate" name="beginDate" placeholder="开始时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${dailyOfficeWork.beginDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endDate" name="endDate" placeholder="结束时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${dailyOfficeWork.endDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird ">
+                            <label class="layui-form-label">状态:</label>
+                            <div class="layui-input-block">
+                                <form:select path="status" class=" form-control  simple-select">
+                                    <form:option value="" label=""/>
+                                    <form:options items="${fns:getRuralDictList('rural_project_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                </form:select>
+                            </div>
+                        </div>
+                        <div style="clear:both;"></div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+        <div class="full-width fl">
+            <div class="layui-form contentDetails contentShadow shadowLBR">
+                <div class="nav-btns">
+                    <div class="layui-btn-group">
+                        <shiro:hasPermission name="dailyOfficeWork:dailyOfficeWorkSignature:add">
+                            <table:addRow url="${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/form" title="签章申请"></table:addRow><!-- 增加按钮 -->
+                        </shiro:hasPermission>
+                        <shiro:hasPermission name="dailyOfficeWork:dailyOfficeWorkSignature:del">
+                            <%--<table:delRow url="${ctx}/project/dailyOfficeWork/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->--%>
+                        </shiro:hasPermission>
+                        <button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+                    </div>
+                    <div style="clear: both;"></div>
+                </div>
+                <table class="oa-table layui-table" id="contentTable1"></table>
+
+                <!-- 分页代码 -->
+                <table:page page="${page}"></table:page>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<%--<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>--%>
+<script>
+
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,id:"checkboxTable"
+            ,elem: '#contentTable1'
+            ,page: false
+            ,cols: [[
+                /*{checkbox: true, fixed: true},*/
+                {field:'index',align:'center', title: '序号',width:60}
+                ,{field:'number',align:'center', title: '签章编号',  width:160}
+                ,{field:'signatureName',align:'center', title: '签章描述',minWidth:200,templet:function(d){
+                        return "<a class=\"attention-info\" title=\"" + d.signatureName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看签章申请', '${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/view?id=" + d.id +"','95%', '95%')\">" + d.signatureName + "</a>";
+                    }}
+
+                ,{field:'signatureType',align:'center', title: '签章类型',  width:120}
+                ,{field:'createName', align:'center',title: '签章人', width:100,templet:function(d){
+                        return "<span title=\"" + d.createName + "\">" + d.createName + "</span>";
+                    }}
+                ,{field:'createDate',align:'center', title: '创建日期',  width:100}
+                ,{align:'center', title: '状态',  width:100,templet:function(d){
+                        var st = getruralProjectState(d.status);
+                        if(st.action)
+                            var xml ="<span onclick=\"openDialogView('流程追踪', '${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/getProcess?id=" + d.id + "','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;
+                    }}
+                ,{field:'op',align:'center',title:"操作",width:240,templet:function(d){
+                        ////对操作进行初始化
+                        var xml="<div class=\"layui-btn-group\">";
+                        if(d.canedit1 != undefined && d.canedit1 =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('修改签章申请', '${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/form?id=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                        }
+                        if(d.canedit2 != undefined && d.canedit2 =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('调整签章申请', '${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                        }
+                        if(d.canrecall != undefined && d.canrecall =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('调整签章申请', '${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/form?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                        }
+                        if(d.candel != undefined && d.candel =="1")
+                        {
+                            xml+="<a href=\"${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要作废该签章申请信息吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\"> 作废</a>";
+                        }
+                        if(d.cancancel != undefined && d.cancancel =="1")
+                        {
+                            xml+="<a href=\"${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "&status="+d.status+"\" onclick=\"return confirmx('确认要撤回该签章申请审批吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\" > 撤回</a>";
+                        }
+
+
+                        if(d.status == 5){
+                            //上传审定单进行签章
+
+                            if(d.signatureUrlFlag == 1){
+                                xml+="<a href=\""+ d.signatureUrl +"\" class=\"layui-btn  layui-btn-xs layui-bg-orange\" style='height:32px;margin-top: 5px;margin-bottom: 5px;'>签章文件下载</a>"
+                            }else{
+                                if(d.signatureContractId){
+                                    xml+="<a href=\"${ctx}/ruralProject/signatureCallBack/downLoadAttach?contractId="+ d.signatureContractId +"\" class=\"layui-btn  layui-btn-xs layui-bg-orange\" style='height:32px;margin-top: 5px;margin-bottom: 5px;'>签章文件下载</a>"
+                                }
+                            }
+
+                        }
+
+                        /*if(d.deleteAdmin != undefined && d.deleteAdmin =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('修改签章申请', '${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/adminModify?id=" + d.id + "','95%', '95%','','提交,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                            xml+="<a href=\"#\" onclick=\"adminDelete('管理员删除', '${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/queryProjectIsUse?id=" + d.id +"','95%', '95%','','"+ d.id + "')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 删除</a>";
+
+                        }*/
+                        xml+="</div>"
+                        return xml;
+
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="dailyOfficeWork" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${dailyOfficeWork.id}"
+                    ,"signatureName":"<c:out value="${dailyOfficeWork.signatureName}" escapeXml="false"/>"
+                    ,"signatureType":"${fns:getMainDictLabels(dailyOfficeWork.signatureType,',','signature_type_daily_office_work', '')}"
+                    ,"createDate":"<fmt:formatDate value="${dailyOfficeWork.createDate}" pattern="yyyy-MM-dd"/>"
+                    ,"status":"${dailyOfficeWork.status}"
+                    ,"signatureUrl":"${dailyOfficeWork.signatureUrl}"
+                    ,"number":"${dailyOfficeWork.number}"
+                    ,"signatureUrlFlag":"${dailyOfficeWork.signatureUrlFlag}"
+                    ,"signatureContractId":"${dailyOfficeWork.signatureContractId}"
+                    ,"createName":"<c:out value="${dailyOfficeWork.createBy.name}" escapeXml="false"/>"
+                    <c:choose><c:when test="${flag == '1' or fns:getUser().id == dailyOfficeWork.createBy.id}">
+                    <shiro:hasPermission name="dailyOfficeWork:dailyOfficeWorkSignature:del">,"candel":	<c:choose><c:when test="${(dailyOfficeWork.status == 1 or dailyOfficeWork.status == 3 or dailyOfficeWork.status == 4) && fns:getUser().id == dailyOfficeWork.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="dailyOfficeWork:dailyOfficeWorkSignature:edit">,"canedit1":	<c:choose><c:when test="${dailyOfficeWork.status == 1 && fns:getUser().id == dailyOfficeWork.createBy.id }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canedit2":<c:choose><c:when test="${dailyOfficeWork.status == 4 && fns:getUser().id == dailyOfficeWork.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canrecall":<c:choose><c:when test="${dailyOfficeWork.status == 3 && fns:getUser().id == dailyOfficeWork.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    </shiro:hasPermission>
+                    ,"cancancel":<c:choose><c:when test="${dailyOfficeWork.status == 2 && fns:getUser().id == dailyOfficeWork.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+
+                    </c:when>
+                    <c:otherwise>
+                    ,"candel":"0"
+                    ,"canedit1":"0"
+                    ,"canedit2":"0"
+                    ,"canrecall":"0"
+                    ,"cancancel":"0"
+                    /*,"deleteAdmin":"0"*/
+                    </c:otherwise>
+                    </c:choose>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+    })
+
+    resizeListTable();
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+</body>
+</html>

+ 448 - 0
src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureModify.jsp

@@ -0,0 +1,448 @@
+<%@ 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>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <style>
+        #projectDesc-error{
+            left:0;
+            top:82px;
+        }
+        .layui-layer-dialog{
+            background: red;
+        }
+        td input{
+            margin-left:-10px !important;
+            height: 42px !important;
+        }
+        .disables {
+            pointer-events: none;
+        }
+        .notDisables {
+            pointer-events: all;
+        }
+        .forbidden{
+            background-color:#c2c2c2;
+        }
+
+        .notForbidden{
+            background-color:#3ca2e0;
+        }
+        .spanzj{
+            color: red;
+            font-size: 12px;
+            padding-left: 10px;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(i==2){
+                    $("#inputForm").attr("action","${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/tstore");
+                }else{
+                    var flag = $("#flagFile").val();
+                    if(flag == 'false'){
+                        top.layer.msg('附件信息未上传完成,请等待!', {icon: 0});
+                        return;
+                    }
+                    var length = $("#file_attachment").find("tr").length ;
+                    if(length == 0){
+                        top.layer.msg("请上传签章附件", {icon: 0});
+                        return;
+                    }
+                    var flags=judgment();
+                    if (!flags){
+                        return flags;
+                    }
+                }
+                $("#inputForm").submit();
+                return true;
+            }else{
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            var radioVal ;
+            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);
+                    }
+                }
+            });
+
+        });
+
+        function insertTitle(tValue){
+            $("#flagFile").val(false);
+            var files = $("#attachment_file")[0].files;
+            for(var i = 0;i<files.length;i++) {
+                var file = files[i];
+                var attachTypes = "doc,docx,pdf";
+                var suffixResult = 0;
+                var fileName = file.name.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
+                var fileNameLength = file.name.length;//获取到文件名长度
+                var suffix = file.name.substring(fileName + 1, fileNameLength);//截取后缀名
+                suffix = suffix.toLowerCase();//后缀名转换小写
+                attachTypes = attachTypes.toLowerCase();
+                var attachTypeList = attachTypes.split(",");
+                for (var x in attachTypeList) {
+                    if(attachTypeList[x] == suffix){
+                        suffixResult = 1;
+                        break;
+                    }
+                }
+                if(suffixResult == 0 ){
+                    top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
+                    return false;
+                }
+
+                var attachmentId = $("#id").val();
+                var attachmentFlag = "170";
+                /*console.log(file);*/
+                var timestamp=new Date().getTime();
+
+                var storeAs = "signatureDailyOfficeWork";
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                console.log(32145121)
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);
+            }
+        }
+
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function addRow(list, idx, tpl, row){
+            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();
+        }
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="dailyOfficeWork" action="${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/saveAudit" method="post" class="form-horizontal layui-form ">
+            <form:hidden path="id"/>
+            <form:hidden path="home"/>
+            <form:hidden path="act.taskId"/>
+            <form:hidden path="act.taskName"/>
+            <form:hidden id="taskDefKey" path="act.taskDefKey"/>
+            <form:hidden path="act.procInsId"/>
+            <form:hidden path="act.procDefId"/>
+            <form:hidden path="processInstanceId"/>
+            <form:hidden id="flag" path="act.flag"/>
+            <input type="hidden" id="flagFile" value="">
+
+            <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="signatureName" id="signatureName" maxlength="255" htmlEscape="false" placeholder="请输入签章描述" 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="number" 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 dailyOfficeWork.projectStatus}">${fns:getDictLabel(dailyOfficeWork.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"><span class="require-item">*</span>签章类型:</label>
+                    <div class="layui-input-block readOnlyFFF">
+                        <form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" id="signatureType" value="${dailyOfficeWork.signatureType}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('signature_type_daily_office_work')}" itemLabel="label" itemValue="value" 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="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">
+                        <form:input path="office.name" htmlEscape="false" id="officeName" 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 id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${dailyOfficeWork.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control judgment layui-input"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm12 lw7 with-textarea">
+                    <label class="layui-form-label ">备注:</label>
+                    <div class="layui-input-block">
+                        <form:textarea placeholder="请输入备注" 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">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><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" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th>文件</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="200px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${dailyOfficeWork.workAttachments}" var="workClientAttachment"
+                                   varStatus="status">
+                            <tr>
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                        <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </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}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)"
+                                                               onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
+                                                        </td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                                                <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </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}">
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </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>
+                                <td class="op-td">
+                                    <div class="op-btn-box">
+
+                                            <%--附件下载删除--%>
+                                        <c:choose>
+                                            <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+                                            <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>
+                                        </c:if>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn layui-btn-warm" >&nbsp;收藏</a>
+                                        </c:if>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 15 - 0
src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureTask.jsp

@@ -0,0 +1,15 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>流程追踪</title>
+	<meta name="decorator" content="default"/>
+</head>
+<body class="gray-bg">
+<div class="container form layui-form">
+	<act:flowChart procInsId="${processInstanceId}"/>
+	<act:histoicFlow procInsId="${processInstanceId}"/>
+</div>
+</body>
+</html>
+

+ 521 - 0
src/main/webapp/webpage/modules/signature/dailyOfficeWorkSignature/DailyOfficeWorkSignatureView.jsp

@@ -0,0 +1,521 @@
+<%@ 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>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <style>
+        #projectDesc-error{
+            left:0;
+            top:82px;
+        }
+        .layui-layer-dialog{
+            background: red;
+        }
+        td input{
+            margin-left:-10px !important;
+            height: 42px !important;
+        }
+        .disables {
+            pointer-events: none;
+        }
+        .notDisables {
+            pointer-events: all;
+        }
+        .forbidden{
+            background-color:#c2c2c2;
+        }
+
+        .notForbidden{
+            background-color:#3ca2e0;
+        }
+        .spanzj{
+            color: red;
+            font-size: 12px;
+            padding-left: 10px;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            var radioVal ;
+            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);
+                    }
+                }
+            });
+
+        });
+
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="dailyOfficeWork" action="${ctx}/dailyOfficeWork/dailyOfficeWorkSignature/view" method="post" class="form-horizontal layui-form ">
+            <form:hidden path="id"/>
+
+            <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="signatureName" id="signatureName" maxlength="255" readonly="true" htmlEscape="false" placeholder="请输入签章描述" 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="number" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+                        </div>
+                    </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 readOnlyFFF">
+                        <form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" id="signatureType" disabled="true"  readonly="true" value="${dailyOfficeWork.signatureType}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('signature_type_daily_office_work')}" itemLabel="label" itemValue="value" 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="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">
+                        <form:input path="office.name" htmlEscape="false" id="officeName" 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 id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${dailyOfficeWork.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control judgment layui-input"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm12 lw7 with-textarea">
+                    <label class="layui-form-label ">备注:</label>
+                    <div class="layui-input-block">
+                        <form:textarea placeholder="请输入备注" path="remarks" readonly="true" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+                    </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>上传时间</th>
+                            <th width="200px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${dailyOfficeWork.workAttachments}" var="workClientAttachment"
+                                   varStatus="status">
+                            <tr>
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                        <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </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}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)"
+                                                               onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
+                                                        </td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                                                <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </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}">
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </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>
+                                <td class="op-td">
+                                    <div class="op-btn-box">
+
+                                            <%--附件下载删除--%>
+                                        <c:choose>
+                                            <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn layui-btn-warm" >&nbsp;收藏</a>
+                                        </c:if>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </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>上传时间</th>
+                            <th width="200px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${dailyOfficeWork.signatureWorkAttachments}" var="workClientAttachment"
+                                   varStatus="status">
+                            <tr>
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                        <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </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}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)"
+                                                               onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
+                                                        </td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                                                <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </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}">
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </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>
+                                <td class="op-td">
+                                    <div class="op-btn-box">
+
+                                            <%--附件下载删除--%>
+                                        <c:choose>
+                                            <c:when test="${dailyOfficeWork.uploadMode == 2}">
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn layui-btn-warm" >&nbsp;收藏</a>
+                                        </c:if>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 98 - 0
src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectReportSignatureProjectView.jsp

@@ -0,0 +1,98 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>签章项目管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		#workInvoiceProjectRelationList td{
+			padding-left: 0px;
+			padding-right: 0px;
+		}
+	</style>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+
+		  return false;
+		}
+		$(document).ready(function() {
+			$("#name").focus();
+			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);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body >
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectRelation" action="" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<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"/>
+
+			<div class="form-group layui-row first lw14">
+				<div class="form-group-label"><h2>签章项目信息</h2></div>
+				<div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+					<table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+						<thead>
+						<tr>
+							<th width="200px"><font color="red">*</font>项目名称</th>
+							<th width="200px">合同名称</th>
+							<th width="200px">项目编号</th>
+							<th width="200px">委托方</th>
+							<th width="200px">报告号</th>
+						</tr>
+						</thead>
+						<tbody id="workInvoiceProjectRelationList">
+						<c:forEach items="${projectRelation.projectReportSignatureRelationList}" var="list">
+							<tr>
+								<td>
+									<a onclick="openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectView/view?id=${list.projectId}','95%', '95%')">
+									<input type="text" value="${list.projectName}" readonly="readonly"  class="form-control"/></a>
+								</td>
+								<td>
+									<input type="text" value="${list.workContractName}" readonly="readonly"  class="form-control"/>
+								</td>
+								<td style="text-align:center;">
+									<input type="text" value="${list.projectNum}" readonly="readonly"  class="form-control"/>
+								</td>
+								<td>
+									<input type="text" value="${list.clientName}" readonly="readonly"  class="form-control"/>
+								</td>
+								<td>
+									<input type="text" value="${list.reportDataNum}" readonly="readonly"  class="form-control"/>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 605 - 0
src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkAudit.jsp

@@ -0,0 +1,605 @@
+<%@ 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>
+	<script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+	<script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+	<script src="${ctxStatic}/common/html/js/script.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+			if(validateForm.form()){
+				var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+				$("#opinion").val(ss);
+				if(obj == 1) {
+
+					var auditFlag = $("#auditFlag").val();
+					if(auditFlag != 1){
+						top.layer.msg('报告签章未审核完成,请审核后点击同意', {icon: 0});
+						return false;
+					}
+					$("#flag").val("yes");
+				}else {
+					if(obj == 2){
+						$("#flag").val("no1");
+					}else {
+						$("#flag").val("no2");
+					}
+				}
+				$("#inputForm").submit();
+				return true;
+			}
+			return false;
+		}
+		$(document).ready(function() {
+
+			layui.use(['form', 'layer'], function () {
+				var form = layui.form;
+			});
+
+			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);
+					}
+				}
+			});
+		});
+
+		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 = "173";
+				console.log(file);
+				var timestamp=new Date().getTime();
+
+				var storeAs = "signatureProjectReportWork";
+				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){
+			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 getManualSignatureUrl(id){
+			$.ajax({
+				type:"post",
+				url:'${ctx}/projectReport/projectReportSignature/getSignatureUrl',
+				data:{"id": id},
+				dataType:"json",
+				success:function(data){
+					if(data.success) {
+						window.open(data.contractUrl);
+						//对审核结果进行查询(定时任务。每3秒进行一次查询)
+						var interVal = setInterval(function (){
+									$.ajax({
+										type:"post",
+										url:'${ctx}/projectReport/projectReportSignature/getSignatureStatus',
+										data:{"id": id},
+										dataType:"json",
+										success:function(data){
+											if(data.success) {
+												//签章按钮隐藏
+												$("#approvaButton").css("display","none");
+												//设置可以审核操作
+												$("#auditFlag").val(1)
+												clearInterval(interVal)
+												top.layer.msg('签章已完成,请点击审核通过或驳回!', {icon: 1});
+											}
+										}
+									})
+								}
+								,3000)
+					}else {
+						top.layer.msg("签章失败!", {icon: 0});
+					}
+				}
+			})
+			return;
+		}
+
+
+
+		function addRow1(list, idx, tpl, row){
+			var idx1 = $("#projectReportSignatureRelationList tr").length;
+			if(idx1>0){
+				var count=0;
+				for (var i=1;i<=idx1;i++) {
+					var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+					if (delFlag == "1") {
+						count = i;
+					}
+				}
+				if (idx1>count){
+					var id=$("#projectReportSignatureRelationList").find("tr").eq(count).find("input").eq(5).val();
+					if (id!=undefined && id != ''){
+						if (row== undefined){
+							row={"isProject": "1","isProjectFalg": "1"};
+							layui.form.render();
+						}
+					}else{
+						parent.layer.msg("请选择项目报告信息",{icon:6});
+						layui.form.render();
+						return false;
+					}
+				}
+			}
+			if(list == '#projectReportSignatureRelationList'){
+				bornTemplete1(list, idx, tpl, row, idx1);
+			}
+		}
+		function bornTemplete1(list, idx, tpl, row, idx1){
+			$(list).append(Mustache.render(tpl, {
+				idx: idx, delBtn: true, row: row,
+				order:idx1 + 1
+			}));
+			$(list+idx).find("select").each(function(){
+				$(this).val($(this).attr("data-value"));
+			});
+			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+				var ss = $(this).attr("data-value").split(',');
+				for (var i=0; i<ss.length; i++){
+					if($(this).val() == ss[i]){
+						$(this).attr("checked","checked");
+					}
+				}
+			});
+		}
+
+		function delRow1(obj, prefix) {
+			var id = $(prefix + "_signatureId");
+			var delFlag = $(prefix + "_delFlag");
+			if (id.val() == "") {
+				$(obj).parent().parent().remove();
+			} else if (delFlag.val() == "0") {
+				delFlag.val("1");
+				$(obj).html("&divide;").attr("title", "撤回删除");
+				$(obj).parent().parent().addClass("error");
+				$(obj).parent().parent().addClass("hide");
+			} else if (delFlag.val() == "1") {
+				delFlag.val("0");
+				$(obj).html("&times;").attr("title", "删除");
+				$(obj).parent().parent().removeClass("error");
+			}
+			var length=$("#projectReportSignatureRelationList tr").length;
+			var count=length;
+			for (var i=1;i<=length;i++) {
+				var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+				if (delFlag == "1") {
+					count =count-1;
+				}
+			}
+			if(count==1){
+				layui.form.render();
+			}else if (count>1){
+				layui.form.render();
+			}else if(count == 0){
+				$("#projectFlag").val("");
+			}
+		}
+
+		function newSetPNumber(obj,ids,details){
+			var idx=ids.split("_")[0]
+			var idArray= new Array(); //定义一数组
+			idArray=obj.split(","); //字符分割
+
+			for (var k=0;k<idArray.length ;k++ )
+			{
+				$.ajax({
+					async:false,
+					type:'post',
+					url:'${ctx}/projectReport/projectReportSignature/getPNumber',
+					data:{
+						"obj":idArray[k]
+					},
+					success:function(data){
+						if(k>=1){
+							var row = projectReportSignatureRelationListRowIdx;
+							addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl, data[k])
+							projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;
+							var d = JSON.parse(data);
+							var workContractName="#projectReportSignatureRelationList"+row+"_workContractName";
+							var projectNum="#projectReportSignatureRelationList"+row+"_projectNum";
+							var clientName="#projectReportSignatureRelationList"+row+"_clientName";
+							var reportDataNum="#projectReportSignatureRelationList"+row+"_reportDataNum";
+							var projectName="#projectReportSignatureRelationList"+row+"_projectIdName";
+							var id="#projectReportSignatureRelationList"+row+"_projectIdId";
+							$(id).val(d.id);
+							$(projectName).val(d.projectName);
+							$(workContractName).val(d.workContractName);
+							$(projectNum).val(d.projectNum);
+							$(clientName).val(d.clientName);
+							$(reportDataNum).val(d.reportDataNum);
+							var areaId = $("#areaId").val();
+							if(undefined ==areaId || null == areaId || '' == areaId){
+								$("#areaId").val(d.areaId);
+								$("#areaName").val(d.areaName);
+							}
+						}else{
+							var d = JSON.parse(data);
+							var workContractName="#"+idx+"_workContractName";
+							var projectNum="#"+idx+"_projectNum";
+							var clientName="#"+idx+"_clientName";
+							var reportDataNum="#"+idx+"_reportDataNum";
+							$(workContractName).val(d.workContractName);
+							$(projectNum).val(d.projectNum);
+							$(clientName).val(d.clientName);
+							$(reportDataNum).val(d.reportDataNum);
+							var areaId = $("#areaId").val();
+							if(undefined ==areaId || null == areaId || '' == areaId){
+								$("#areaId").val(d.areaId);
+								$("#areaName").val(d.areaName);
+							}
+						}
+					}
+				})
+			}
+
+			var length=$("#projectReportSignatureRelationList tr").length;
+			var count=length;
+			for (var i=1;i<=length;i++) {
+				var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+				if (delFlag == "1") {
+					count =count-1;
+				}
+			}
+			if(count==1){
+				layui.form.render();
+			}else if (count>1){
+				layui.form.render();
+			}else if(count == 0){
+				$("#projectFlag").val("");
+			}
+
+		}
+	</script>
+</head>
+<body >
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectReportSignature" enctype="multipart/form-data" action="${ctx}/projectReport/projectReportSignature/saveAudit" method="post" class="form-horizontal layui-form">
+			<form:hidden path="id"/>
+			<form:hidden path="home"/>
+			<form:hidden path="act.taskId"/>
+			<form:hidden path="act.taskName"/>
+			<form:hidden id="taskDefKey" path="act.taskDefKey"/>
+			<form:hidden path="act.procInsId"/>
+			<form:hidden path="act.procDefId"/>
+			<form:hidden path="processInstanceId"/>
+			<form:hidden id="flag" path="act.flag"/>
+			<input type="hidden" id="opinion" name="act.comment" value="" maxlength="255">
+			<input type="hidden" id="auditFlag" name="auditFlag" value="${auditFlag}">
+			<c:set var="status" value="${projectReportSignature.act.status}" />
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>签章项目信息</h2></div>
+				<div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+					<table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+						<thead>
+						<tr>
+							<th width="200px"><font color="red">*</font>项目名称</th>
+							<th width="200px">报告号</th>
+							<th width="200px">合同名称</th>
+							<th width="200px">项目编号</th>
+							<th width="200px">委托方</th>
+						</tr>
+						</thead>
+						<tbody id="projectReportSignatureRelationList">
+						</tbody>
+					</table>
+					<script type="text/template" id="projectReportSignatureRelationListTpl">//<!--
+                    <tr id="projectReportSignatureRelationList{{idx}}">
+                        <td class="hide">
+                            <input id="projectReportSignatureRelationList{{idx}}_signatureId" name="projectReportSignatureRelationList[{{idx}}].signatureId" type="hidden" value="{{row.signatureId}}"/>
+							<input id="projectReportSignatureRelationList{{idx}}_delFlag" name="projectReportSignatureRelationList[{{idx}}].delFlag" type="hidden" value="0"/>
+							<input id="projectReportSignatureRelationList{{idx}}_contractId" name="projectReportSignatureRelationList[{{idx}}].contractId" type="hidden" value="{{row.contractId}}"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_projectName"  type="text" value="{{row.projectName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_reportDataNum"  type="text" value="{{row.reportDataNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_workContractName"  type="text" value="{{row.workContractName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td style="text-align:center;">
+							<input id="projectReportSignatureRelationList{{idx}}_projectNum"  type="text" value="{{row.projectNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_clientName"  type="text" value="{{row.clientName}}" readonly="readonly"  class="form-control"/>
+                        </td>、
+                    </tr>//-->
+					</script>
+					<script type="text/javascript">
+						var projectReportSignatureRelationListRowIdx = 0, projectReportSignatureRelationListTpl = $("#projectReportSignatureRelationListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+						/*if($("#id").val()){
+                            projectReportSignatureRelationListRowIdx = ${fn:length(projectReportSignature.projectReportSignatureRelationList)};
+						}*/
+						$(document).ready(function() {
+							var data = ${fns:toJson(projectReportSignature.projectReportSignatureRelationList)};
+							console.log(data)
+							for (var i=0; i<data.length; i++){
+								addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl, data[i])
+								projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;
+							}
+						});
+					</script>
+				</div>
+
+			</div>
+
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>签章基础信息</h2></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" style="background-color: #f1f1f1" value="${projectReportSignature.signatureName}"/>
+					</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="number" htmlEscape="false"  readonly="true" class="form-control layui-input" cssStyle="background-color: #f1f1f1"/>
+						</div>
+					</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 readOnlyFFF">
+						<form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" id="signatureType" disabled="true"  readonly="true" value="${projectReportSignature.signatureType}">
+							<form:option value=""/>
+							<form:options items="${fns:getMainDictList('signature_type_project_report_work')}" itemLabel="label" itemValue="value" 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="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">
+						<form:input path="office.name" htmlEscape="false" id="officeName" 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 id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectReportSignature.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control judgment layui-input"/>
+					</div>
+				</div>
+
+
+				<div class="layui-item layui-col-sm12 lw7 with-textarea">
+					<label class="layui-form-label">备注:</label>
+					<div class="layui-input-block">
+						<textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${projectReportSignature.remarks}</textarea>
+					</div>
+				</div>
+			</div>
+
+
+			<div class="form-group layui-row">
+				<c:if test="${auditFlag != 1}">
+					<div style="float: right"> <a id="approvaButton" href=javascript:void(0);  onclick="getManualSignatureUrl('${projectReportSignature.id}')" class="layui-btn layui-btn-sm" >签章审核</a></div>
+				</c:if>
+				<div class="form-group-label"><h2>签章申请附件信息</h2></div>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectReportSignature.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${projectReportSignature.uploadMode == 2}">
+										<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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+															</c:when>
+															<c:otherwise>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</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}">
+											</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="${workReimbursement.uploadMode == 2}">
+																<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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+																			</c:when>
+																			<c:otherwise>
+																				<c:choose>
+																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+																					</c:when>
+																					<c:otherwise>
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+																					</c:otherwise>
+																				</c:choose>
+																			</c:otherwise>
+																		</c:choose>
+																	</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}">
+																	</c:when>
+																	<c:otherwise>
+																		<c:choose>
+																			<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																				<td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+																			</c:when>
+																			<c:otherwise>
+																				<c:choose>
+																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+																					</c:when>
+																					<c:otherwise>
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+																					</c:otherwise>
+																				</c:choose>
+																			</c:otherwise>
+																		</c:choose>
+																	</c:otherwise>
+																</c:choose>
+															</c:otherwise>
+														</c:choose>
+													</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>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+											<%--													<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">--%>
+											<%--														<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>--%>
+											<%--													</c:if>--%>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+
+
+		</form:form>
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('个人模板列表', '${ctx}/auditTemplate/auditTemplate/templateList?identification=${signatureProjectReportWork}&name=${identificationName}','80%', '70%','','关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 审核意见模板列表</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${signatureProjectReportWork}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>${projectNotifyType}审批流程</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>

+ 555 - 0
src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkBmzrAudit.jsp

@@ -0,0 +1,555 @@
+<%@ 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>
+	<script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+	<script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+	<script src="${ctxStatic}/common/html/js/script.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+				var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+				$("#opinion").val(ss);
+                if(obj == 1) {
+                    $("#flag").val("yes");
+                }else {
+                    if(obj == 2){
+                        $("#flag").val("no1");
+					}else {
+                        $("#flag").val("no2");
+					}
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+		  return false;
+		}
+		$(document).ready(function() {
+
+			layui.use(['form', 'layer'], function () {
+				var form = layui.form;
+			});
+
+			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);
+					}
+				}
+			});
+		});
+
+        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 = "173";
+				console.log(file);
+				var timestamp=new Date().getTime();
+
+					var storeAs = "signatureProjectReportWork";
+				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){
+            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 addRow1(list, idx, tpl, row){
+			var idx1 = $("#projectReportSignatureRelationList tr").length;
+			if(idx1>0){
+				var count=0;
+				for (var i=1;i<=idx1;i++) {
+					var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+					if (delFlag == "1") {
+						count = i;
+					}
+				}
+				if (idx1>count){
+					var id=$("#projectReportSignatureRelationList").find("tr").eq(count).find("input").eq(5).val();
+					if (id!=undefined && id != ''){
+						if (row== undefined){
+							row={"isProject": "1","isProjectFalg": "1"};
+							layui.form.render();
+						}
+					}else{
+						parent.layer.msg("请选择项目报告信息",{icon:6});
+						layui.form.render();
+						return false;
+					}
+				}
+			}
+			if(list == '#projectReportSignatureRelationList'){
+				bornTemplete1(list, idx, tpl, row, idx1);
+			}
+		}
+		function bornTemplete1(list, idx, tpl, row, idx1){
+			$(list).append(Mustache.render(tpl, {
+				idx: idx, delBtn: true, row: row,
+				order:idx1 + 1
+			}));
+			$(list+idx).find("select").each(function(){
+				$(this).val($(this).attr("data-value"));
+			});
+			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+				var ss = $(this).attr("data-value").split(',');
+				for (var i=0; i<ss.length; i++){
+					if($(this).val() == ss[i]){
+						$(this).attr("checked","checked");
+					}
+				}
+			});
+		}
+
+		function delRow1(obj, prefix) {
+			var id = $(prefix + "_signatureId");
+			var delFlag = $(prefix + "_delFlag");
+			if (id.val() == "") {
+				$(obj).parent().parent().remove();
+			} else if (delFlag.val() == "0") {
+				delFlag.val("1");
+				$(obj).html("&divide;").attr("title", "撤回删除");
+				$(obj).parent().parent().addClass("error");
+				$(obj).parent().parent().addClass("hide");
+			} else if (delFlag.val() == "1") {
+				delFlag.val("0");
+				$(obj).html("&times;").attr("title", "删除");
+				$(obj).parent().parent().removeClass("error");
+			}
+			var length=$("#projectReportSignatureRelationList tr").length;
+			var count=length;
+			for (var i=1;i<=length;i++) {
+				var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+				if (delFlag == "1") {
+					count =count-1;
+				}
+			}
+			if(count==1){
+				layui.form.render();
+			}else if (count>1){
+				layui.form.render();
+			}else if(count == 0){
+				$("#projectFlag").val("");
+			}
+		}
+
+		function newSetPNumber(obj,ids,details){
+			var idx=ids.split("_")[0]
+			var idArray= new Array(); //定义一数组
+			idArray=obj.split(","); //字符分割
+
+			for (var k=0;k<idArray.length ;k++ )
+			{
+				$.ajax({
+					async:false,
+					type:'post',
+					url:'${ctx}/projectReport/projectReportSignature/getPNumber',
+					data:{
+						"obj":idArray[k]
+					},
+					success:function(data){
+						if(k>=1){
+							var row = projectReportSignatureRelationListRowIdx;
+							addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl, data[k])
+							projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;
+							var d = JSON.parse(data);
+							var workContractName="#projectReportSignatureRelationList"+row+"_workContractName";
+							var projectNum="#projectReportSignatureRelationList"+row+"_projectNum";
+							var clientName="#projectReportSignatureRelationList"+row+"_clientName";
+							var reportDataNum="#projectReportSignatureRelationList"+row+"_reportDataNum";
+							var projectName="#projectReportSignatureRelationList"+row+"_projectIdName";
+							var id="#projectReportSignatureRelationList"+row+"_projectIdId";
+							$(id).val(d.id);
+							$(projectName).val(d.projectName);
+							$(workContractName).val(d.workContractName);
+							$(projectNum).val(d.projectNum);
+							$(clientName).val(d.clientName);
+							$(reportDataNum).val(d.reportDataNum);
+							var areaId = $("#areaId").val();
+							if(undefined ==areaId || null == areaId || '' == areaId){
+								$("#areaId").val(d.areaId);
+								$("#areaName").val(d.areaName);
+							}
+						}else{
+							var d = JSON.parse(data);
+							var workContractName="#"+idx+"_workContractName";
+							var projectNum="#"+idx+"_projectNum";
+							var clientName="#"+idx+"_clientName";
+							var reportDataNum="#"+idx+"_reportDataNum";
+							$(workContractName).val(d.workContractName);
+							$(projectNum).val(d.projectNum);
+							$(clientName).val(d.clientName);
+							$(reportDataNum).val(d.reportDataNum);
+							var areaId = $("#areaId").val();
+							if(undefined ==areaId || null == areaId || '' == areaId){
+								$("#areaId").val(d.areaId);
+								$("#areaName").val(d.areaName);
+							}
+						}
+					}
+				})
+			}
+
+			var length=$("#projectReportSignatureRelationList tr").length;
+			var count=length;
+			for (var i=1;i<=length;i++) {
+				var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+				if (delFlag == "1") {
+					count =count-1;
+				}
+			}
+			if(count==1){
+				layui.form.render();
+			}else if (count>1){
+				layui.form.render();
+			}else if(count == 0){
+				$("#projectFlag").val("");
+			}
+
+		}
+	</script>
+</head>
+<body >
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectReportSignature" enctype="multipart/form-data" action="${ctx}/projectReport/projectReportSignature/saveAudit" method="post" class="form-horizontal layui-form">
+		<form:hidden path="id"/>
+		<form:hidden path="home"/>
+		<form:hidden path="act.taskId"/>
+		<form:hidden path="act.taskName"/>
+		<form:hidden id="taskDefKey" path="act.taskDefKey"/>
+		<form:hidden path="act.procInsId"/>
+		<form:hidden path="act.procDefId"/>
+		<form:hidden path="processInstanceId"/>
+		<form:hidden id="flag" path="act.flag"/>
+		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="255">
+		<c:set var="status" value="${projectReportSignature.act.status}" />
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>签章项目信息</h2></div>
+				<div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+					<table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+						<thead>
+						<tr>
+							<th width="200px"><font color="red">*</font>项目名称</th>
+							<th width="200px">报告号</th>
+							<th width="200px">合同名称</th>
+							<th width="200px">项目编号</th>
+							<th width="200px">委托方</th>
+						</tr>
+						</thead>
+						<tbody id="projectReportSignatureRelationList">
+						</tbody>
+					</table>
+					<script type="text/template" id="projectReportSignatureRelationListTpl">//<!--
+                    <tr id="projectReportSignatureRelationList{{idx}}">
+                        <td class="hide">
+                            <input id="projectReportSignatureRelationList{{idx}}_signatureId" name="projectReportSignatureRelationList[{{idx}}].signatureId" type="hidden" value="{{row.signatureId}}"/>
+							<input id="projectReportSignatureRelationList{{idx}}_delFlag" name="projectReportSignatureRelationList[{{idx}}].delFlag" type="hidden" value="0"/>
+							<input id="projectReportSignatureRelationList{{idx}}_contractId" name="projectReportSignatureRelationList[{{idx}}].contractId" type="hidden" value="{{row.contractId}}"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_projectName"  type="text" value="{{row.projectName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_reportDataNum"  type="text" value="{{row.reportDataNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_workContractName"  type="text" value="{{row.workContractName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td style="text-align:center;">
+							<input id="projectReportSignatureRelationList{{idx}}_projectNum"  type="text" value="{{row.projectNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_clientName"  type="text" value="{{row.clientName}}" readonly="readonly"  class="form-control"/>
+                        </td>、
+                    </tr>//-->
+					</script>
+					<script type="text/javascript">
+						var projectReportSignatureRelationListRowIdx = 0, projectReportSignatureRelationListTpl = $("#projectReportSignatureRelationListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+						/*if($("#id").val()){
+                            projectReportSignatureRelationListRowIdx = ${fn:length(projectReportSignature.projectReportSignatureRelationList)};
+						}*/
+						$(document).ready(function() {
+							var data = ${fns:toJson(projectReportSignature.projectReportSignatureRelationList)};
+							console.log(data)
+							for (var i=0; i<data.length; i++){
+								addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl, data[i])
+								projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;
+							}
+						});
+					</script>
+				</div>
+
+			</div>
+
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>签章基础信息</h2></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" style="background-color: #f1f1f1" value="${projectReportSignature.signatureName}"/>
+					</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="number" htmlEscape="false"  readonly="true" class="form-control layui-input" cssStyle="background-color: #f1f1f1"/>
+						</div>
+					</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 readOnlyFFF">
+						<form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" id="signatureType" disabled="true"  readonly="true" value="${projectReportSignature.signatureType}">
+							<form:option value=""/>
+							<form:options items="${fns:getMainDictList('signature_type_project_report_work')}" itemLabel="label" itemValue="value" 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="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">
+						<form:input path="office.name" htmlEscape="false" id="officeName" 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 id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectReportSignature.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control judgment layui-input"/>
+					</div>
+				</div>
+
+
+				<div class="layui-item layui-col-sm12 lw7 with-textarea">
+					<label class="layui-form-label">备注:</label>
+					<div class="layui-input-block">
+						<textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000"  style="background-color: #f1f1f1" class="form-control" >${projectReportSignature.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" style="padding:0 16px;">
+					<table id="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectReportSignature.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${projectReportSignature.uploadMode == 2}">
+										<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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+															</c:when>
+															<c:otherwise>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</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}">
+											</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="${workReimbursement.uploadMode == 2}">
+																<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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+																			</c:when>
+																			<c:otherwise>
+																				<c:choose>
+																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+																					</c:when>
+																					<c:otherwise>
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+																					</c:otherwise>
+																				</c:choose>
+																			</c:otherwise>
+																		</c:choose>
+																	</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}">
+																	</c:when>
+																	<c:otherwise>
+																		<c:choose>
+																			<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																				<td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+																			</c:when>
+																			<c:otherwise>
+																				<c:choose>
+																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+																					</c:when>
+																					<c:otherwise>
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+																					</c:otherwise>
+																				</c:choose>
+																			</c:otherwise>
+																		</c:choose>
+																	</c:otherwise>
+																</c:choose>
+															</c:otherwise>
+														</c:choose>
+													</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>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+											<%--													<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">--%>
+											<%--														<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>--%>
+											<%--													</c:if>--%>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+
+
+	</form:form>
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('个人模板列表', '${ctx}/auditTemplate/auditTemplate/templateList?identification=${signatureProjectReportWork}&name=${identificationName}','80%', '70%','','关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 审核意见模板列表</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${signatureProjectReportWork}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>${projectNotifyType}审批流程</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>

+ 648 - 0
src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkForm.jsp

@@ -0,0 +1,648 @@
+<%@ 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>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <style>
+
+        #contractTypeDoc-error{
+            top:80px;
+            left:0;
+        }
+        /*超过5个汉字,调整label的长度,以下是配套的*/
+        .layui-item .layui-form-label{
+            width:90px;
+        }
+        #projectReportSignatureRelationList td{
+            padding-left: 0px;
+            padding-right: 0px;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(i==2){
+                    $("#inputForm").attr("action","${ctx}/projectReport/projectReportSignature/tstore");
+                }else{
+
+                    var flag = $("#flagFile").val();
+                    if(flag == 'false'){
+                        top.layer.msg('附件信息未上传完成,请等待!', {icon: 0});
+                        return;
+                    }
+                    var length = $("#file_attachment").find("tr").length ;
+                    if(length == 0){
+                        top.layer.msg("请上传报告签章附件", {icon: 0});
+                        return;
+                    }
+                    var flags=judgment();
+                    if (!flags){
+                        return flags;
+                    }
+                }
+                $("#inputForm").submit();
+                return true;
+            }else{
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            var radioVal ;
+            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);
+                    }
+                }
+            });
+
+        });
+
+        function insertTitle(tValue){
+            $("#flagFile").val(false);
+            var files = $("#attachment_file")[0].files;
+            for(var i = 0;i<files.length;i++) {
+                var file = files[i];
+                var attachTypes = "doc,docx,pdf";
+                var suffixResult = 0;
+                var fileName = file.name.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
+                var fileNameLength = file.name.length;//获取到文件名长度
+                var suffix = file.name.substring(fileName + 1, fileNameLength);//截取后缀名
+                suffix = suffix.toLowerCase();//后缀名转换小写
+                attachTypes = attachTypes.toLowerCase();
+                var attachTypeList = attachTypes.split(",");
+                for (var x in attachTypeList) {
+                    if(attachTypeList[x] == suffix){
+                        suffixResult = 1;
+                        break;
+                    }
+                }
+                if(suffixResult == 0 ){
+                    top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
+                    return false;
+                }
+
+                var attachmentId = $("#id").val();
+                var attachmentFlag = "173";
+                /*console.log(file);*/
+                var timestamp=new Date().getTime();
+
+                var storeAs = "signatureProjectReportWork";
+                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){
+            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 addRow1(list, idx, tpl, row){
+            var idx1 = $("#projectReportSignatureRelationList tr").length;
+            if(idx1>0){
+                var count=0;
+                for (var i=1;i<=idx1;i++) {
+                    var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+                    if (delFlag == "1") {
+                        count = i;
+                    }
+                }
+                if (idx1>count){
+                    var id=$("#projectReportSignatureRelationList").find("tr").eq(count).find("input").eq(5).val();
+                    if (id!=undefined && id != ''){
+                        if (row== undefined){
+                            row={"isProject": "1","isProjectFalg": "1"};
+                            layui.form.render();
+                        }
+                    }else{
+                        parent.layer.msg("请选择项目报告信息",{icon:6});
+                        layui.form.render();
+                        return false;
+                    }
+                }
+            }
+            if(list == '#projectReportSignatureRelationList'){
+                bornTemplete1(list, idx, tpl, row, idx1);
+            }
+        }
+        function bornTemplete1(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+        }
+
+        function delRow1(obj, prefix) {
+            var id = $(prefix + "_signatureId");
+            var delFlag = $(prefix + "_delFlag");
+            if (id.val() == "") {
+                $(obj).parent().parent().remove();
+            } else if (delFlag.val() == "0") {
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            } else if (delFlag.val() == "1") {
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+            var length=$("#projectReportSignatureRelationList tr").length;
+            var count=length;
+            for (var i=1;i<=length;i++) {
+                var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+                if (delFlag == "1") {
+                    count =count-1;
+                }
+            }
+            if(count==1){
+                layui.form.render();
+            }else if (count>1){
+                layui.form.render();
+            }else if(count == 0){
+                $("#projectFlag").val("");
+            }
+        }
+
+        function newSetPNumber(obj,ids,details){
+            var idx=ids.split("_")[0]
+            var idArray= new Array(); //定义一数组
+            idArray=obj.split(","); //字符分割
+
+            for (var k=0;k<idArray.length ;k++ )
+            {
+                $.ajax({
+                    async:false,
+                    type:'post',
+                    url:'${ctx}/projectReport/projectReportSignature/getPNumber',
+                    data:{
+                        "obj":idArray[k]
+                    },
+                    success:function(data){
+                        if(k>=1){
+                            var row = projectReportSignatureRelationListRowIdx;
+                            addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl, data[k])
+                            projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;
+                            var d = JSON.parse(data);
+                            var workContractName="#projectReportSignatureRelationList"+row+"_workContractName";
+                            var projectNum="#projectReportSignatureRelationList"+row+"_projectNum";
+                            var clientName="#projectReportSignatureRelationList"+row+"_clientName";
+                            var reportDataNum="#projectReportSignatureRelationList"+row+"_reportDataNum";
+                            var projectName="#projectReportSignatureRelationList"+row+"_projectIdName";
+                            var id="#projectReportSignatureRelationList"+row+"_projectIdId";
+                            $(id).val(d.id);
+                            $(projectName).val(d.projectName);
+                            $(workContractName).val(d.workContractName);
+                            $(projectNum).val(d.projectNum);
+                            $(clientName).val(d.clientName);
+                            $(reportDataNum).val(d.reportDataNum);
+                            var areaId = $("#areaId").val();
+                            if(undefined ==areaId || null == areaId || '' == areaId){
+                                $("#areaId").val(d.areaId);
+                                $("#areaName").val(d.areaName);
+                            }
+                        }else{
+                            var d = JSON.parse(data);
+                            var workContractName="#"+idx+"_workContractName";
+                            var projectNum="#"+idx+"_projectNum";
+                            var clientName="#"+idx+"_clientName";
+                            var reportDataNum="#"+idx+"_reportDataNum";
+                            $(workContractName).val(d.workContractName);
+                            $(projectNum).val(d.projectNum);
+                            $(clientName).val(d.clientName);
+                            $(reportDataNum).val(d.reportDataNum);
+                            var areaId = $("#areaId").val();
+                            if(undefined ==areaId || null == areaId || '' == areaId){
+                                $("#areaId").val(d.areaId);
+                                $("#areaName").val(d.areaName);
+                            }
+                        }
+                    }
+                })
+            }
+
+            var length=$("#projectReportSignatureRelationList tr").length;
+            var count=length;
+            for (var i=1;i<=length;i++) {
+                var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+                if (delFlag == "1") {
+                    count =count-1;
+                }
+            }
+            if(count==1){
+                layui.form.render();
+            }else if (count>1){
+                layui.form.render();
+            }else if(count == 0){
+                $("#projectFlag").val("");
+            }
+
+        }
+
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="projectReportSignature" action="${ctx}/projectReport/projectReportSignature/save" method="post" class="form-horizontal layui-form ">
+            <form:hidden path="id"/>
+            <input type="hidden" id="flagFile" value="">
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>签章项目信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a class="nav-btn nav-btn-add" onclick="addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl);projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
+                </div>
+                <div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+                    <table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+                        <thead>
+                        <tr>
+                            <th width="200px"><font color="red">*</font>项目名称</th>
+                            <th width="200px">报告号</th>
+                            <th width="200px">合同名称</th>
+                            <th width="200px">项目编号</th>
+                            <th width="200px">委托方</th>
+                            <th width="100px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="projectReportSignatureRelationList">
+                        </tbody>
+                    </table>
+                    <script type="text/template" id="projectReportSignatureRelationListTpl">//<!--
+                    <tr id="projectReportSignatureRelationList{{idx}}">
+                        <td class="hide">
+                            <input id="projectReportSignatureRelationList{{idx}}_signatureId" name="projectReportSignatureRelationList[{{idx}}].signatureId" type="hidden" value="{{row.signatureId}}"/>
+							<input id="projectReportSignatureRelationList{{idx}}_delFlag" name="projectReportSignatureRelationList[{{idx}}].delFlag" type="hidden" value="0"/>
+							<input id="projectReportSignatureRelationList{{idx}}_contractId" name="projectReportSignatureRelationList[{{idx}}].contractId" type="hidden" value="{{row.contractId}}"/>
+                        </td>
+                        <td>
+                            <sys:gridselectprojectsignatures url="${ctx}/projectReport/projectReportSignature/getProjectReportList" id="projectReportSignatureRelationList{{idx}}_projectId" name="projectReportSignatureRelationList[{{idx}}].projectId"  value="{{row.projectId}}"  title="选择所属项目" labelName="projectReportSignatureRelationList[{{idx}}].projectName" cssStyle="background-color: #fff"
+													labelValue="{{row.projectName}}" cssClass="form-control judgment layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName"  isProject="{{row.isProject}}" isProjectFalg="{{row.isProjectFalg}}" details="{{row.details}}"></sys:gridselectprojectsignatures>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_reportDataNum"  type="text" value="{{row.reportDataNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_workContractName"  type="text" value="{{row.workContractName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td style="text-align:center;">
+							<input id="projectReportSignatureRelationList{{idx}}_projectNum"  type="text" value="{{row.projectNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_clientName"  type="text" value="{{row.clientName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td class="text-center op-td" >
+                            {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow1(this, '#projectReportSignatureRelationList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                        </td>
+                    </tr>//-->
+                    </script>
+                    <script type="text/javascript">
+                        var projectReportSignatureRelationListRowIdx = 0, projectReportSignatureRelationListTpl = $("#projectReportSignatureRelationListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        /*if($("#id").val()){
+                            projectReportSignatureRelationListRowIdx = ${fn:length(projectReportSignature.projectReportSignatureRelationList)};
+						}*/
+                        $(document).ready(function() {
+                            var data = ${fns:toJson(projectReportSignature.projectReportSignatureRelationList)};
+                            console.log(data)
+                            for (var i=0; i<data.length; i++){
+                                addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl, data[i])
+                                projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;
+                            }
+                        });
+                    </script>
+                </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="signatureName" id="signatureName" maxlength="255" htmlEscape="false" placeholder="请输入签章描述" 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="number" 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 projectReportSignature.status}">${fns:getDictLabel(projectReportSignature.status, '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"><span class="require-item">*</span>签章类型:</label>
+                    <div class="layui-input-block readOnlyFFF">
+                        <form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" id="signatureType" value="${projectReportSignature.signatureType}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('signature_type_project_report_work')}" itemLabel="label" itemValue="value" 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="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">
+                        <form:input path="office.name" htmlEscape="false" id="officeName" 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 id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectReportSignature.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control judgment layui-input"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm12 lw7 with-textarea">
+                    <label class="layui-form-label ">备注:</label>
+                    <div class="layui-input-block">
+                        <form:textarea placeholder="请输入备注" 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">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><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" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th>文件</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="200px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectReportSignature.workAttachments}" var="workClientAttachment"
+                                   varStatus="status">
+                            <tr>
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${projectReportSignature.uploadMode == 2}">
+                                        <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </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}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)"
+                                                               onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
+                                                        </td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${projectReportSignature.uploadMode == 2}">
+                                                                <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </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}">
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </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>
+                                <td class="op-td">
+                                    <div class="op-btn-box">
+
+                                            <%--附件下载删除--%>
+                                        <c:choose>
+                                            <c:when test="${projectReportSignature.uploadMode == 2}">
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+                                            <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>
+                                        </c:if>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn layui-btn-warm" >&nbsp;收藏</a>
+                                        </c:if>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 484 - 0
src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkList.jsp

@@ -0,0 +1,484 @@
+<%@ 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}/layui/layuidown.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+    <%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            layui.use(['dropdown', 'util', 'layer'], function () {
+                var form = layui.form;
+            })
+
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+                , trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+                , trigger: 'click'
+            });
+        });
+
+        function reset() {
+            $("#searchForm").resetForm();
+        }
+
+        function openDialog(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['送审', '暂存', '关闭'],
+                btn1: 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(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2: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(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+        //打开对话框(查看)
+        function openDialogReportView(title,url,id,width,height){
+
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            $.ajax({
+                async: false,
+                url: "${ctx}/ruralProject/ruralCostProjectMessage/getReportExist?id="+id,
+                dataType: "json",
+                success: function (data) {
+                    if(data.success){
+                        top.layer.open({
+                            type: 2,
+                            skin: 'one-btn',
+                            area: [width, height],
+                            title: title,
+                            maxmin: true, //开启最大化最小化按钮
+                            content: url ,
+                            btn: ['关闭'],
+                            cancel: function(index){
+                            }
+                        });
+                    }else{
+                        top.layer.msg("该签章申请信息已删除!", {icon: 0});
+                        window.location.reload();
+                    }
+                }
+            });
+
+        }
+        function openDialogre(title,url,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                btn1: 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(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    if(split.length==2){return}
+                    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(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+        function adminDelete(title,url,width,height,target,id) {
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 0,
+                title: title,
+                content: '确定删除这个申请吗?',
+                btn:["确定","取消"],
+                btn1: function (index){
+                    layer.close(index);
+                    $.ajax({
+                        async: false,
+                        url: url,
+                        dataType: "json",
+                        success: function (data) {
+                            if(data.success){
+                                $.ajax({
+                                    async: false,
+                                    url: "${ctx}/projectReport:projectReportSignature/adminDelete?id="+id,
+                                    dataType: "json",
+                                    success: function (data) {
+                                        if(data.success){
+                                            top.layer.msg("该申请删除成功!", {icon: 0});
+                                            window.location.reload();
+                                        }else{
+                                            top.layer.msg("该申请删除失败!", {icon: 0});
+                                        }
+                                    }
+                                });
+                            }else{
+                            }
+                        }
+                    });
+                },
+                btn2:function (index) {
+                    layer.close(index);
+
+                }
+            });
+        }
+    </script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="layui-row contentShadow shadowLR" id="queryDiv">
+                <form:form id="searchForm" modelAttribute="projectReportSignatureWork" action="${ctx}/projectReport/projectReportSignature/" 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}"/>
+                    <input id="toflag" name="toflag" type="hidden" value="1"/>
+                    <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+                    <div class="commonQuery lw6">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">签章描述:</label>
+                            <div class="layui-input-block">
+                                <form:input path="signatureName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">签章类型:</label>
+                            <div class="layui-input-block readOnlyFFF">
+                                <form:select placeholder="请选择" path="signatureType" class="form-control editable-select layui-input" id="attachmentProjectSort" value="${signatureType}">
+                                    <form:option value=""/>
+                                    <form:options items="${fns:getMainDictList('signature_type_project_report_work')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                </form:select>
+                            </div>
+                        </div>
+                        <div class="layui-item athird">
+                            <div class="input-group">
+                                <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+                                <div class="layui-btn-group search-spacing">
+                                    <button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+                                    <button id="searchReset" class="layui-btn layui-btn-sm" onclick="resetSearch()">重置</button>
+                                </div>
+                            </div>
+                        </div>
+                        <div style="    clear:both;"></div>
+                    </div>
+                    <div id="moresees" style="clear:both;display:none;" class="lw6">
+
+                        <div class="layui-item query athird ">
+                            <label class="layui-form-label">登记人:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:inquireselectUserNotReadolny id="createBy" name="createBy.id" value="${projectReportSignature.createBy.id}" labelName="createBy.name" labelValue="${projectReportSignature.createBy.name}" cssStyle="background-color: #fff"
+                                                                  title="登记人" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">部门:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:treeselectMoHu id="officeId" name="office.id" value="${projectReportSignature.office.id}" labelName="office.name" labelValue="${projectReportSignature.office.name}"
+                                                    title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird ">
+                            <label class="layui-form-label">创建时间:</label>
+                            <div class="layui-input-block readOnlyFFF">
+                                <input id="beginDate" name="beginDate" placeholder="开始时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${projectReportSignature.beginDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endDate" name="endDate" placeholder="结束时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${projectReportSignature.endDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird ">
+                            <label class="layui-form-label">状态:</label>
+                            <div class="layui-input-block">
+                                <form:select path="status" class=" form-control  simple-select">
+                                    <form:option value="" label=""/>
+                                    <form:options items="${fns:getRuralDictList('rural_project_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                </form:select>
+                            </div>
+                        </div>
+                        <div style="clear:both;"></div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+        <div class="full-width fl">
+            <div class="layui-form contentDetails contentShadow shadowLBR">
+                <div class="nav-btns">
+                    <div class="layui-btn-group">
+                        <shiro:hasPermission name="projectReport:projectReportSignature:add">
+                            <table:addRow url="${ctx}/projectReport/projectReportSignature/form" title="签章申请"></table:addRow><!-- 增加按钮 -->
+                        </shiro:hasPermission>
+                        <shiro:hasPermission name="projectReport:projectReportSignature:del">
+                            <%--<table:delRow url="${ctx}/project/dailyOfficeWork/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->--%>
+                        </shiro:hasPermission>
+                        <button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+                    </div>
+                    <div style="clear: both;"></div>
+                </div>
+                <table class="oa-table layui-table" id="contentTable1"></table>
+
+                <!-- 分页代码 -->
+                <table:page page="${page}"></table:page>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<%--<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>--%>
+<script>
+
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,id:"checkboxTable"
+            ,elem: '#contentTable1'
+            ,page: false
+            ,cols: [[
+                /*{checkbox: true, fixed: true},*/
+                {field:'index',align:'center', title: '序号',width:60}
+                ,{field:'number',align:'center', title: '签章编号',  width:160}
+                ,{field:'signatureName',align:'center', title: '签章描述',minWidth:200,templet:function(d){
+                        return "<a class=\"attention-info\" title=\"" + d.signatureName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看签章申请', '${ctx}/projectReport/projectReportSignature/view?id=" + d.id +"','95%', '95%')\">" + d.signatureName + "</a>";
+                    }}
+                ,{field:'projectName',align:'center', title: '签章项目',  minWidth:200,templet:function(d){
+                        return "<a class=\"attention-info\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/projectReport/projectReportSignature/projectview?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
+                    }}
+                ,{field:'signatureType',align:'center', title: '签章类型',  width:120}
+                ,{field:'createName', align:'center',title: '签章人', width:100,templet:function(d){
+                        return "<span title=\"" + d.createName + "\">" + d.createName + "</span>";
+                    }}
+                ,{field:'createDate',align:'center', title: '创建日期',  width:100}
+                ,{align:'center', title: '状态',  width:100,templet:function(d){
+                        var st = getruralProjectState(d.status);
+                        if(st.action)
+                            var xml ="<span onclick=\"openDialogView('流程追踪', '${ctx}/projectReport/projectReportSignature/getProcess?id=" + d.id + "','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;
+                    }}
+                ,{field:'op',align:'center',title:"操作",width:240,templet:function(d){
+                        ////对操作进行初始化
+                        var xml="<div class=\"layui-btn-group\">";
+                        if(d.canedit1 != undefined && d.canedit1 =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('修改签章申请', '${ctx}/projectReport/projectReportSignature/form?id=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                        }
+                        if(d.canedit2 != undefined && d.canedit2 =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('调整签章申请', '${ctx}/projectReport/projectReportSignature/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                        }
+                        if(d.canrecall != undefined && d.canrecall =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('调整签章申请', '${ctx}/projectReport/projectReportSignature/form?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                        }
+                        if(d.candel != undefined && d.candel =="1")
+                        {
+                            xml+="<a href=\"${ctx}/projectReport/projectReportSignature/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要作废该签章申请信息吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\"> 作废</a>";
+                        }
+                        if(d.cancancel != undefined && d.cancancel =="1")
+                        {
+                            xml+="<a href=\"${ctx}/projectReport/projectReportSignature/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "&status="+d.status+"\" onclick=\"return confirmx('确认要撤回该签章申请审批吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\" > 撤回</a>";
+                        }
+
+
+                        if(d.status == 5){
+                            //上传审定单进行签章
+
+                            if(d.signatureUrlFlag == 1){
+                                xml+="<a href=\""+ d.signatureUrl +"\" class=\"layui-btn  layui-btn-xs layui-bg-orange\" style='height:32px;margin-top: 5px;margin-bottom: 5px;'>签章文件下载</a>"
+                            }else{
+                                if(d.signatureContractId){
+                                    xml+="<a href=\"${ctx}/ruralProject/signatureCallBack/downLoadAttach?contractId="+ d.signatureContractId +"\" class=\"layui-btn  layui-btn-xs layui-bg-orange\" style='height:32px;margin-top: 5px;margin-bottom: 5px;'>签章文件下载</a>"
+                                }
+                            }
+
+                        }
+
+                        /*if(d.deleteAdmin != undefined && d.deleteAdmin =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('修改签章申请', '${ctx}/projectReport/projectReportSignature/adminModify?id=" + d.id + "','95%', '95%','','提交,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                            xml+="<a href=\"#\" onclick=\"adminDelete('管理员删除', '${ctx}/projectReport/projectReportSignature/queryProjectIsUse?id=" + d.id +"','95%', '95%','','"+ d.id + "')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 删除</a>";
+
+                        }*/
+                        xml+="</div>"
+                        return xml;
+
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="projectReportSignature" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${projectReportSignature.id}"
+                    ,"signatureName":"<c:out value="${projectReportSignature.signatureName}" escapeXml="false"/>"
+                    ,"projectName":"<c:out value="${projectReportSignature.projectName}" escapeXml="false"/>"
+                    ,"signatureType":"${fns:getMainDictLabels(projectReportSignature.signatureType,',','signature_type_project_report_work', '')}"
+                    ,"createDate":"<fmt:formatDate value="${projectReportSignature.createDate}" pattern="yyyy-MM-dd"/>"
+                    ,"status":"${projectReportSignature.status}"
+                    ,"signatureUrl":"${projectReportSignature.signatureUrl}"
+                    ,"number":"${projectReportSignature.number}"
+                    ,"signatureUrlFlag":"${projectReportSignature.signatureUrlFlag}"
+                    ,"signatureContractId":"${projectReportSignature.signatureContractId}"
+                    ,"createName":"<c:out value="${projectReportSignature.createBy.name}" escapeXml="false"/>"
+                    <c:choose><c:when test="${flag == '1' or fns:getUser().id == projectReportSignature.createBy.id}">
+                    <shiro:hasPermission name="projectReport:projectReportSignature:del">,"candel":	<c:choose><c:when test="${(projectReportSignature.status == 1 or projectReportSignature.status == 3 or projectReportSignature.status == 4) && fns:getUser().id == projectReportSignature.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="projectReport:projectReportSignature:edit">,"canedit1":	<c:choose><c:when test="${projectReportSignature.status == 1 && fns:getUser().id == projectReportSignature.createBy.id }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canedit2":<c:choose><c:when test="${projectReportSignature.status == 4 && fns:getUser().id == projectReportSignature.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canrecall":<c:choose><c:when test="${projectReportSignature.status == 3 && fns:getUser().id == projectReportSignature.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    </shiro:hasPermission>
+                    ,"cancancel":<c:choose><c:when test="${projectReportSignature.status == 2 && fns:getUser().id == projectReportSignature.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+
+                    </c:when>
+                    <c:otherwise>
+                    ,"candel":"0"
+                    ,"canedit1":"0"
+                    ,"canedit2":"0"
+                    ,"canrecall":"0"
+                    ,"cancancel":"0"
+                    /*,"deleteAdmin":"0"*/
+                    </c:otherwise>
+                    </c:choose>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+    })
+
+    resizeListTable();
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+</body>
+</html>

+ 653 - 0
src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkModify.jsp

@@ -0,0 +1,653 @@
+<%@ 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>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <style>
+
+        #contractTypeDoc-error{
+            top:80px;
+            left:0;
+        }
+        /*超过5个汉字,调整label的长度,以下是配套的*/
+        .layui-item .layui-form-label{
+            width:90px;
+        }
+        #projectReportSignatureRelationList td{
+            padding-left: 0px;
+            padding-right: 0px;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(i==2){
+                    $("#inputForm").attr("action","${ctx}/projectReport/projectReportSignature/tstore");
+                }else{
+                    var flag = $("#flagFile").val();
+                    if(flag == 'false'){
+                        top.layer.msg('报告签章附件信息未上传完成,请等待!', {icon: 0});
+                        return;
+                    }
+                    var length = $("#file_attachment").find("tr").length ;
+                    if(length == 0){
+                        top.layer.msg("请上传报告签章附件", {icon: 0});
+                        return;
+                    }
+                    var flags=judgment();
+                    if (!flags){
+                        return flags;
+                    }
+                }
+                $("#inputForm").submit();
+                return true;
+            }else{
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            var radioVal ;
+            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);
+                    }
+                }
+            });
+
+        });
+
+        function insertTitle(tValue){
+            $("#flagFile").val(false);
+            var files = $("#attachment_file")[0].files;
+            for(var i = 0;i<files.length;i++) {
+                var file = files[i];
+                var attachTypes = "doc,docx,pdf";
+                var suffixResult = 0;
+                var fileName = file.name.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
+                var fileNameLength = file.name.length;//获取到文件名长度
+                var suffix = file.name.substring(fileName + 1, fileNameLength);//截取后缀名
+                suffix = suffix.toLowerCase();//后缀名转换小写
+                attachTypes = attachTypes.toLowerCase();
+                var attachTypeList = attachTypes.split(",");
+                for (var x in attachTypeList) {
+                    if(attachTypeList[x] == suffix){
+                        suffixResult = 1;
+                        break;
+                    }
+                }
+                if(suffixResult == 0 ){
+                    top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
+                    return false;
+                }
+
+                var attachmentId = $("#id").val();
+                var attachmentFlag = "173";
+                /*console.log(file);*/
+                var timestamp=new Date().getTime();
+
+                var storeAs = "signatureProjectReportWork";
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                console.log(32145121)
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);
+            }
+        }
+
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function addRow(list, idx, tpl, row){
+            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 addRow1(list, idx, tpl, row){
+            var idx1 = $("#projectReportSignatureRelationList tr").length;
+            if(idx1>0){
+                var count=0;
+                for (var i=1;i<=idx1;i++) {
+                    var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+                    if (delFlag == "1") {
+                        count = i;
+                    }
+                }
+                if (idx1>count){
+                    var id=$("#projectReportSignatureRelationList").find("tr").eq(count).find("input").eq(5).val();
+                    if (id!=undefined && id != ''){
+                        if (row== undefined){
+                            row={"isProject": "1","isProjectFalg": "1"};
+                            layui.form.render();
+                        }
+                    }else{
+                        parent.layer.msg("请选择项目报告信息",{icon:6});
+                        layui.form.render();
+                        return false;
+                    }
+                }
+            }
+            if(list == '#projectReportSignatureRelationList'){
+                bornTemplete1(list, idx, tpl, row, idx1);
+            }
+        }
+        function bornTemplete1(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+        }
+
+        function delRow1(obj, prefix) {
+            var id = $(prefix + "_signatureId");
+            var delFlag = $(prefix + "_delFlag");
+            if (id.val() == "") {
+                $(obj).parent().parent().remove();
+            } else if (delFlag.val() == "0") {
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            } else if (delFlag.val() == "1") {
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+            var length=$("#projectReportSignatureRelationList tr").length;
+            var count=length;
+            for (var i=1;i<=length;i++) {
+                var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+                if (delFlag == "1") {
+                    count =count-1;
+                }
+            }
+            if(count==1){
+                layui.form.render();
+            }else if (count>1){
+                layui.form.render();
+            }else if(count == 0){
+                $("#projectFlag").val("");
+            }
+        }
+
+        function newSetPNumber(obj,ids,details){
+            var idx=ids.split("_")[0]
+            var idArray= new Array(); //定义一数组
+            idArray=obj.split(","); //字符分割
+
+            for (var k=0;k<idArray.length ;k++ )
+            {
+                $.ajax({
+                    async:false,
+                    type:'post',
+                    url:'${ctx}/projectReport/projectReportSignature/getPNumber',
+                    data:{
+                        "obj":idArray[k]
+                    },
+                    success:function(data){
+                        if(k>=1){
+                            var row = projectReportSignatureRelationListRowIdx;
+                            addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl, data[k])
+                            projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;
+                            var d = JSON.parse(data);
+                            var workContractName="#projectReportSignatureRelationList"+row+"_workContractName";
+                            var projectNum="#projectReportSignatureRelationList"+row+"_projectNum";
+                            var clientName="#projectReportSignatureRelationList"+row+"_clientName";
+                            var reportDataNum="#projectReportSignatureRelationList"+row+"_reportDataNum";
+                            var projectName="#projectReportSignatureRelationList"+row+"_projectIdName";
+                            var id="#projectReportSignatureRelationList"+row+"_projectIdId";
+                            $(id).val(d.id);
+                            $(projectName).val(d.projectName);
+                            $(workContractName).val(d.workContractName);
+                            $(projectNum).val(d.projectNum);
+                            $(clientName).val(d.clientName);
+                            $(reportDataNum).val(d.reportDataNum);
+                            var areaId = $("#areaId").val();
+                            if(undefined ==areaId || null == areaId || '' == areaId){
+                                $("#areaId").val(d.areaId);
+                                $("#areaName").val(d.areaName);
+                            }
+                        }else{
+                            var d = JSON.parse(data);
+                            var workContractName="#"+idx+"_workContractName";
+                            var projectNum="#"+idx+"_projectNum";
+                            var clientName="#"+idx+"_clientName";
+                            var reportDataNum="#"+idx+"_reportDataNum";
+                            $(workContractName).val(d.workContractName);
+                            $(projectNum).val(d.projectNum);
+                            $(clientName).val(d.clientName);
+                            $(reportDataNum).val(d.reportDataNum);
+                            var areaId = $("#areaId").val();
+                            if(undefined ==areaId || null == areaId || '' == areaId){
+                                $("#areaId").val(d.areaId);
+                                $("#areaName").val(d.areaName);
+                            }
+                        }
+                    }
+                })
+            }
+
+            var length=$("#projectReportSignatureRelationList tr").length;
+            var count=length;
+            for (var i=1;i<=length;i++) {
+                var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+                if (delFlag == "1") {
+                    count =count-1;
+                }
+            }
+            if(count==1){
+                layui.form.render();
+            }else if (count>1){
+                layui.form.render();
+            }else if(count == 0){
+                $("#projectFlag").val("");
+            }
+
+        }
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="projectReportSignature" action="${ctx}/projectReport/projectReportSignature/saveAudit" method="post" class="form-horizontal layui-form ">
+            <form:hidden path="id"/>
+            <form:hidden path="home"/>
+            <form:hidden path="act.taskId"/>
+            <form:hidden path="act.taskName"/>
+            <form:hidden id="taskDefKey" path="act.taskDefKey"/>
+            <form:hidden path="act.procInsId"/>
+            <form:hidden path="act.procDefId"/>
+            <form:hidden path="processInstanceId"/>
+            <form:hidden id="flag" path="act.flag"/>
+            <input type="hidden" id="flagFile" value="">
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>签章项目信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a class="nav-btn nav-btn-add" onclick="addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl);projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
+                </div>
+                <div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+                    <table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+                        <thead>
+                        <tr>
+                            <th width="200px"><font color="red">*</font>项目名称</th>
+                            <th width="200px">报告号</th>
+                            <th width="200px">合同名称</th>
+                            <th width="200px">项目编号</th>
+                            <th width="200px">委托方</th>
+                            <th width="100px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="projectReportSignatureRelationList">
+                        </tbody>
+                    </table>
+                    <script type="text/template" id="projectReportSignatureRelationListTpl">//<!--
+                    <tr id="projectReportSignatureRelationList{{idx}}">
+                        <td class="hide">
+                            <input id="projectReportSignatureRelationList{{idx}}_signatureId" name="projectReportSignatureRelationList[{{idx}}].signatureId" type="hidden" value="{{row.signatureId}}"/>
+							<input id="projectReportSignatureRelationList{{idx}}_delFlag" name="projectReportSignatureRelationList[{{idx}}].delFlag" type="hidden" value="0"/>
+							<input id="projectReportSignatureRelationList{{idx}}_contractId" name="projectReportSignatureRelationList[{{idx}}].contractId" type="hidden" value="{{row.contractId}}"/>
+                        </td>
+                        <td>
+                            <sys:gridselectprojectsignatures url="${ctx}/projectReport/projectReportSignature/getProjectReportList" id="projectReportSignatureRelationList{{idx}}_projectId" name="projectReportSignatureRelationList[{{idx}}].projectId"  value="{{row.projectId}}"  title="选择所属项目" labelName="projectReportSignatureRelationList[{{idx}}].projectName" cssStyle="background-color: #fff"
+													labelValue="{{row.projectName}}" cssClass="form-control judgment layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName"  isProject="{{row.isProject}}" isProjectFalg="{{row.isProjectFalg}}" details="{{row.details}}"></sys:gridselectprojectsignatures>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_reportDataNum"  type="text" value="{{row.reportDataNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_workContractName"  type="text" value="{{row.workContractName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td style="text-align:center;">
+							<input id="projectReportSignatureRelationList{{idx}}_projectNum"  type="text" value="{{row.projectNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_clientName"  type="text" value="{{row.clientName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td class="text-center op-td" >
+                            {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow1(this, '#projectReportSignatureRelationList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                        </td>
+                    </tr>//-->
+                    </script>
+                    <script type="text/javascript">
+                        var projectReportSignatureRelationListRowIdx = 0, projectReportSignatureRelationListTpl = $("#projectReportSignatureRelationListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        /*if($("#id").val()){
+                            projectReportSignatureRelationListRowIdx = ${fn:length(projectReportSignature.projectReportSignatureRelationList)};
+						}*/
+                        $(document).ready(function() {
+                            var data = ${fns:toJson(projectReportSignature.projectReportSignatureRelationList)};
+                            console.log(data)
+                            for (var i=0; i<data.length; i++){
+                                addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl, data[i])
+                                projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;
+                            }
+                        });
+                    </script>
+                </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="signatureName" id="signatureName" maxlength="255" htmlEscape="false" placeholder="请输入签章描述" 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="number" 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 projectReportSignature.status}">${fns:getDictLabel(projectReportSignature.status, '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"><span class="require-item">*</span>签章类型:</label>
+                    <div class="layui-input-block readOnlyFFF">
+                        <form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" id="signatureType" value="${projectReportSignature.signatureType}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('signature_type_project_report_work')}" itemLabel="label" itemValue="value" 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="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">
+                        <form:input path="office.name" htmlEscape="false" id="officeName" 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 id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectReportSignature.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control judgment layui-input"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm12 lw7 with-textarea">
+                    <label class="layui-form-label ">备注:</label>
+                    <div class="layui-input-block">
+                        <form:textarea placeholder="请输入备注" 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">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><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" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th>文件</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="200px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectReportSignature.workAttachments}" var="workClientAttachment"
+                                   varStatus="status">
+                            <tr>
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${projectReportSignature.uploadMode == 2}">
+                                        <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </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}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)"
+                                                               onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
+                                                        </td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${projectReportSignature.uploadMode == 2}">
+                                                                <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </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}">
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </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>
+                                <td class="op-td">
+                                    <div class="op-btn-box">
+
+                                            <%--附件下载删除--%>
+                                        <c:choose>
+                                            <c:when test="${projectReportSignature.uploadMode == 2}">
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+                                            <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>
+                                        </c:if>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn layui-btn-warm" >&nbsp;收藏</a>
+                                        </c:if>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 15 - 0
src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkTask.jsp

@@ -0,0 +1,15 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>流程追踪</title>
+	<meta name="decorator" content="default"/>
+</head>
+<body class="gray-bg">
+<div class="container form layui-form">
+	<act:flowChart procInsId="${processInstanceId}"/>
+	<act:histoicFlow procInsId="${processInstanceId}"/>
+</div>
+</body>
+</html>
+

+ 715 - 0
src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkView.jsp

@@ -0,0 +1,715 @@
+<%@ 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>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <style>
+
+        #contractTypeDoc-error{
+            top:80px;
+            left:0;
+        }
+        /*超过5个汉字,调整label的长度,以下是配套的*/
+        .layui-item .layui-form-label{
+            width:90px;
+        }
+        #projectReportSignatureRelationList td{
+            padding-left: 0px;
+            padding-right: 0px;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            var radioVal ;
+            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);
+                    }
+                }
+            });
+
+        });
+        function addRow1(list, idx, tpl, row){
+            var idx1 = $("#projectReportSignatureRelationList tr").length;
+            if(idx1>0){
+                var count=0;
+                for (var i=1;i<=idx1;i++) {
+                    var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+                    if (delFlag == "1") {
+                        count = i;
+                    }
+                }
+                if (idx1>count){
+                    var id=$("#projectReportSignatureRelationList").find("tr").eq(count).find("input").eq(5).val();
+                    if (id!=undefined && id != ''){
+                        if (row== undefined){
+                            row={"isProject": "1","isProjectFalg": "1"};
+                            layui.form.render();
+                        }
+                    }else{
+                        parent.layer.msg("请选择项目报告信息",{icon:6});
+                        layui.form.render();
+                        return false;
+                    }
+                }
+            }
+            if(list == '#projectReportSignatureRelationList'){
+                bornTemplete1(list, idx, tpl, row, idx1);
+            }
+        }
+        function bornTemplete1(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+        }
+
+        function delRow1(obj, prefix) {
+            var id = $(prefix + "_signatureId");
+            var delFlag = $(prefix + "_delFlag");
+            if (id.val() == "") {
+                $(obj).parent().parent().remove();
+            } else if (delFlag.val() == "0") {
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            } else if (delFlag.val() == "1") {
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+            var length=$("#projectReportSignatureRelationList tr").length;
+            var count=length;
+            for (var i=1;i<=length;i++) {
+                var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+                if (delFlag == "1") {
+                    count =count-1;
+                }
+            }
+            if(count==1){
+                layui.form.render();
+            }else if (count>1){
+                layui.form.render();
+            }else if(count == 0){
+                $("#projectFlag").val("");
+            }
+        }
+
+        function newSetPNumber(obj,ids,details){
+            var idx=ids.split("_")[0]
+            var idArray= new Array(); //定义一数组
+            idArray=obj.split(","); //字符分割
+
+            for (var k=0;k<idArray.length ;k++ )
+            {
+                $.ajax({
+                    async:false,
+                    type:'post',
+                    url:'${ctx}/projectReport/projectReportSignature/getPNumber',
+                    data:{
+                        "obj":idArray[k]
+                    },
+                    success:function(data){
+                        if(k>=1){
+                            var row = projectReportSignatureRelationListRowIdx;
+                            addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl, data[k])
+                            projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;
+                            var d = JSON.parse(data);
+                            var workContractName="#projectReportSignatureRelationList"+row+"_workContractName";
+                            var projectNum="#projectReportSignatureRelationList"+row+"_projectNum";
+                            var clientName="#projectReportSignatureRelationList"+row+"_clientName";
+                            var reportDataNum="#projectReportSignatureRelationList"+row+"_reportDataNum";
+                            var projectName="#projectReportSignatureRelationList"+row+"_projectIdName";
+                            var id="#projectReportSignatureRelationList"+row+"_projectIdId";
+                            $(id).val(d.id);
+                            $(projectName).val(d.projectName);
+                            $(workContractName).val(d.workContractName);
+                            $(projectNum).val(d.projectNum);
+                            $(clientName).val(d.clientName);
+                            $(reportDataNum).val(d.reportDataNum);
+                            var areaId = $("#areaId").val();
+                            if(undefined ==areaId || null == areaId || '' == areaId){
+                                $("#areaId").val(d.areaId);
+                                $("#areaName").val(d.areaName);
+                            }
+                        }else{
+                            var d = JSON.parse(data);
+                            var workContractName="#"+idx+"_workContractName";
+                            var projectNum="#"+idx+"_projectNum";
+                            var clientName="#"+idx+"_clientName";
+                            var reportDataNum="#"+idx+"_reportDataNum";
+                            $(workContractName).val(d.workContractName);
+                            $(projectNum).val(d.projectNum);
+                            $(clientName).val(d.clientName);
+                            $(reportDataNum).val(d.reportDataNum);
+                            var areaId = $("#areaId").val();
+                            if(undefined ==areaId || null == areaId || '' == areaId){
+                                $("#areaId").val(d.areaId);
+                                $("#areaName").val(d.areaName);
+                            }
+                        }
+                    }
+                })
+            }
+
+            var length=$("#projectReportSignatureRelationList tr").length;
+            var count=length;
+            for (var i=1;i<=length;i++) {
+                var delFlag = $("#projectReportSignatureRelationList").find("tr").eq(i-1).find("input").eq(1).val();
+                if (delFlag == "1") {
+                    count =count-1;
+                }
+            }
+            if(count==1){
+                layui.form.render();
+            }else if (count>1){
+                layui.form.render();
+            }else if(count == 0){
+                $("#projectFlag").val("");
+            }
+
+        }
+
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="projectReportSignature" action="${ctx}/projectReport/projectReportSignature/view" method="post" class="form-horizontal layui-form ">
+            <form:hidden path="id"/>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>签章项目信息</h2></div>
+                <div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+                    <table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+                        <thead>
+                        <tr>
+                            <th width="200px"><font color="red">*</font>项目名称</th>
+                            <th width="200px">报告号</th>
+                            <th width="200px">合同名称</th>
+                            <th width="200px">项目编号</th>
+                            <th width="200px">委托方</th>
+                        </tr>
+                        </thead>
+                        <tbody id="projectReportSignatureRelationList">
+                        </tbody>
+                    </table>
+                    <script type="text/template" id="projectReportSignatureRelationListTpl">//<!--
+                    <tr id="projectReportSignatureRelationList{{idx}}">
+                        <td class="hide">
+                            <input id="projectReportSignatureRelationList{{idx}}_signatureId" name="projectReportSignatureRelationList[{{idx}}].signatureId" type="hidden" value="{{row.signatureId}}"/>
+							<input id="projectReportSignatureRelationList{{idx}}_delFlag" name="projectReportSignatureRelationList[{{idx}}].delFlag" type="hidden" value="0"/>
+							<input id="projectReportSignatureRelationList{{idx}}_contractId" name="projectReportSignatureRelationList[{{idx}}].contractId" type="hidden" value="{{row.contractId}}"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_projectName"  type="text" value="{{row.projectName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_reportDataNum"  type="text" value="{{row.reportDataNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_workContractName"  type="text" value="{{row.workContractName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td style="text-align:center;">
+							<input id="projectReportSignatureRelationList{{idx}}_projectNum"  type="text" value="{{row.projectNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="projectReportSignatureRelationList{{idx}}_clientName"  type="text" value="{{row.clientName}}" readonly="readonly"  class="form-control"/>
+                        </td>、
+                    </tr>//-->
+                    </script>
+                    <script type="text/javascript">
+                        var projectReportSignatureRelationListRowIdx = 0, projectReportSignatureRelationListTpl = $("#projectReportSignatureRelationListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        /*if($("#id").val()){
+                            projectReportSignatureRelationListRowIdx = ${fn:length(projectReportSignature.projectReportSignatureRelationList)};
+						}*/
+                        $(document).ready(function() {
+                            var data = ${fns:toJson(projectReportSignature.projectReportSignatureRelationList)};
+                            console.log(data)
+                            for (var i=0; i<data.length; i++){
+                                addRow1('#projectReportSignatureRelationList', projectReportSignatureRelationListRowIdx, projectReportSignatureRelationListTpl, data[i])
+                                projectReportSignatureRelationListRowIdx = projectReportSignatureRelationListRowIdx + 1;
+                            }
+                        });
+                    </script>
+                </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="signatureName" id="signatureName" maxlength="255" readonly="true" htmlEscape="false" placeholder="请输入签章描述" 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="number" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+                        </div>
+                    </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 readOnlyFFF">
+                        <form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" id="signatureType" disabled="true"  readonly="true" value="${projectReportSignature.signatureType}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('signature_type_project_report_work')}" itemLabel="label" itemValue="value" 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="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">
+                        <form:input path="createBy.office.name" htmlEscape="false" id="officeName" 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 id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectReportSignature.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control judgment layui-input"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm12 lw7 with-textarea">
+                    <label class="layui-form-label ">备注:</label>
+                    <div class="layui-input-block">
+                        <form:textarea placeholder="请输入备注" path="remarks" readonly="true" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+                    </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>上传时间</th>
+                            <th width="200px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectReportSignature.workAttachments}" var="workClientAttachment"
+                                   varStatus="status">
+                            <tr>
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${projectReportSignature.uploadMode == 2}">
+                                        <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </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}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)"
+                                                               onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
+                                                        </td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${projectReportSignature.uploadMode == 2}">
+                                                                <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','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="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </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}">
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </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>
+                                <td class="op-td">
+                                    <div class="op-btn-box">
+
+                                            <%--附件下载删除--%>
+                                        <c:choose>
+                                            <c:when test="${projectReportSignature.uploadMode == 2}">
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn layui-btn-warm" >&nbsp;收藏</a>
+                                        </c:if>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </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>上传时间</th>
+                            <th width="200px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectReportSignature.signatureWorkAttachments}" var="signatureWorkAttachment"
+                                   varStatus="status">
+                            <tr>
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${projectReportSignature.uploadMode == 2}">
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jpg')
+                                                   or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'png')
+                                                   or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'gif')
+                                                   or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'bmp')
+                                                   or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jpeg')}">
+                                                <td><img src="${signatureWorkAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${signatureWorkAttachment.temporaryUrl}','90%','90%')" alt="${signatureWorkAttachment.attachmentName}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'pdf')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${signatureWorkAttachment.temporaryUrl}',1)">${signatureWorkAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'7z')}">
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${signatureWorkAttachment.temporaryUrl}',3)">${signatureWorkAttachment.attachmentName}</a></td>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${signatureWorkAttachment.temporaryUrl}',2)">${signatureWorkAttachment.attachmentName}</a></td>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jpg')
+                                             or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'png')
+                                             or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'gif')
+                                             or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'bmp')
+                                             or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jpeg')}">
+                                                <td><img src="${signatureWorkAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${signatureWorkAttachment.url}','90%','90%')" alt="${signatureWorkAttachment.attachmentName}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'pdf')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)"
+                                                               onclick="openPreview('${signatureWorkAttachment.url}',1)">${signatureWorkAttachment.attachmentName}</a>
+                                                        </td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${projectReportSignature.uploadMode == 2}">
+                                                                <c:choose>
+                                                                    <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jpg')
+                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'png')
+                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'gif')
+                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'bmp')
+                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jpeg')}">
+                                                                        <td><img src="${signatureWorkAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${signatureWorkAttachment.temporaryUrl}','90%','90%')" alt="${signatureWorkAttachment.attachmentName}">
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'pdf')}">
+                                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${signatureWorkAttachment.temporaryUrl}',1)">${signatureWorkAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${signatureWorkAttachment.temporaryUrl}',3)">${signatureWorkAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${signatureWorkAttachment.temporaryUrl}',2)">${signatureWorkAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <c:choose>
+                                                                    <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jpg')
+                                                   or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'png')
+                                                   or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'gif')
+                                                   or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'bmp')
+                                                   or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jpeg')}">
+                                                                        <td><img src="${signatureWorkAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${signatureWorkAttachment.url}','90%','90%')" alt="${signatureWorkAttachment.attachmentName}">
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'pdf')}">
+                                                                                <td><a href="javascript:void(0)" onclick="openPreview('${signatureWorkAttachment.url}',1)">${signatureWorkAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <c:choose>
+                                                                                    <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'7z')}">
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${signatureWorkAttachment.url}',3)">${signatureWorkAttachment.attachmentName}</a></td>
+                                                                                    </c:when>
+                                                                                    <c:otherwise>
+                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${signatureWorkAttachment.url}',2)">${signatureWorkAttachment.attachmentName}</a></td>
+                                                                                    </c:otherwise>
+                                                                                </c:choose>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+
+
+
+                                <td>${signatureWorkAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${signatureWorkAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box">
+
+                                            <%--附件下载删除--%>
+                                        <c:choose>
+                                            <c:when test="${projectReportSignature.uploadMode == 2}">
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(signatureWorkAttachment.attachmentName,'pdf')}">
+                                                        <a href="${signatureWorkAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="${signatureWorkAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${signatureWorkAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <c:if test="${signatureWorkAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${signatureWorkAttachment.url}','${signatureWorkAttachment.createBy.id}','${signatureWorkAttachment.fileSize}')" class="op-btn layui-btn-warm" >&nbsp;收藏</a>
+                                        </c:if>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 332 - 0
src/main/webapp/webpage/modules/sys/gridprojectreportsignature.jsp

@@ -0,0 +1,332 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			layui.use(['form', 'layer'], function () {
+				var form = layui.form;
+			})
+            <%--var val = "<%=request.getAttribute("state")%>";--%>
+            <%--if(val!=null){--%>
+                <%--alert("++++++++++");--%>
+			<%--};--%>
+
+            $('#contentTable thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
+			    	  $('#contentTable tbody tr td input.i-checks').iCheck('check');
+			    	});
+
+			    $('#contentTable thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
+			    	  $('#contentTable tbody tr td input.i-checks').iCheck('uncheck');
+			    	});
+
+			//搜索框收放
+			$('#moresee').click(function(){
+				if($('#moresees').is(':visible'))
+				{
+					$('#moresees').slideUp(0,resizeListWindow1);
+					$('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+				}else{
+					$('#moresees').slideDown(0,resizeListWindow1);
+					$('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+				}
+			});
+
+			$("#contentTable tr td").each(function(){
+				$(this).attr("title",$(this).text());
+			});
+		});
+
+		function getSelectedItem(){
+			var array = new Array();
+			var size = $("#contentTable tbody tr td input.i-checks:checked").size();
+			var sizeChecked = $("#contentTable tbody tr td input.i-checks:checked");
+
+			for (var i=0;i<size;i++){
+				array.push(sizeChecked[i].id);
+			}
+			if(size == 0 ){
+				top.layer.alert('请至少选择一条数据!', {icon: 0, title:'警告'});
+				return "-1";
+			}
+			/*if(size > 1 ){
+				top.layer.alert('只能选择一条数据!', {icon: 0, title:'警告'});
+				return "-1";
+			}*/
+			$("#projectFlag").val(1);
+
+			var id =  $("#contentTable tbody tr td input.i-checks:checkbox:checked").attr("id");
+			var label = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel").html();
+			var number = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codenumber").html();
+			var details = $("#details").val();
+			var projectFlag = $("#projectFlag").val();
+			console.log(array.toString())
+			return array.toString()+"_item_"+label+"_item_"+number+"_item_"+details+"_item_"+projectFlag;
+		}
+		function page(n,s){
+			if(n) $("#pageNo").val(n);
+			if(s) $("#pageSize").val(s);
+			$("#searchForm").attr("action","${url}");
+			$("#searchForm").submit();
+	    	return false;
+	    }
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="obj" action="${url}" method="post" class="form-inline layui-form">
+					<input type="hidden" name="url" value="${url}"/>
+					<input type="hidden" name="isTotal" value="${isTotal}"/>
+					<input type="hidden" name="fieldLabels" value="${fieldLabels}"/>
+					<input type="hidden" name="fieldKeys" value="${fieldKeys}"/>
+					<input type="hidden" name="searchLabel" value="${searchLabel}"/>
+					<input type="hidden" name="searchKey" value="${searchKey}"/>
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<input id="projectFlag" name="projectFlag" type="hidden" value=""/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="project">
+						<div class="commonQuery">
+							<div class="layui-item query athird" style="width: 25%">
+								<span class="layui-form-label">项目名称:</span>
+								<div class="layui-input-block">
+									<form:input path="${searchKey}" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+								</div>
+							</div>
+							<div class="layui-item query athird" style="width: 25%">
+								<span class="layui-form-label">项目编号:</span>
+								<div class="layui-input-block">
+									<form:input path="projectId" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+								</div>
+							</div>
+							<div class="layui-item query athird" style="width: 25%">
+								<span class="layui-form-label">报告号:</span>
+								<div class="layui-input-block">
+									<form:input path="reportData.number" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+								</div>
+							</div>
+							<div class="layui-item athird fr">
+								<div class="input-group">
+									<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+									<div class="layui-btn-group search-spacing">
+										<button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+										<button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
+									</div>
+								</div>
+							</div>
+							<div style="    clear:both;"></div>
+						</div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl form-group first  project">
+			<div class="layui-item layui-col-xs12 form-table-container">
+				<table id="contentTable" class="table details table-bordered table-condensed">
+					<thead>
+						<tr>
+							<th width="50px"></th>
+							<c:forEach items="${labelNames}" var="projectName"  varStatus="status">
+								<th>项目名称</th>
+								<th width="180px">项目编号</th>
+								<th width="220px">项目报告号</th>
+								<th width="80px">登记人</th>
+								<th width="80px">责任人</th>
+								<th width="250px">委托方</th>
+							</c:forEach>
+						</tr>
+					</thead>
+					<tbody><%@ page contentType="text/html;charset=UTF-8" %>
+					<%@ include file="/webpage/include/taglib.jsp"%>
+					<html>
+					<head>
+						<meta name="decorator" content="default"/>
+						<script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+						<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+						<script type="text/javascript">
+							$(document).ready(function() {
+								layui.use(['form', 'layer'], function () {
+									var form = layui.form;
+								})
+								<%--var val = "<%=request.getAttribute("state")%>";--%>
+								<%--if(val!=null){--%>
+								<%--alert("++++++++++");--%>
+								<%--};--%>
+
+								$('#contentTable thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
+									$('#contentTable tbody tr td input.i-checks').iCheck('check');
+								});
+
+								$('#contentTable thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
+									$('#contentTable tbody tr td input.i-checks').iCheck('uncheck');
+								});
+
+								//搜索框收放
+								$('#moresee').click(function(){
+									if($('#moresees').is(':visible'))
+									{
+										$('#moresees').slideUp(0,resizeListWindow1);
+										$('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+									}else{
+										$('#moresees').slideDown(0,resizeListWindow1);
+										$('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+									}
+								});
+
+								$("#contentTable tr td").each(function(){
+									$(this).attr("title",$(this).text());
+								});
+							});
+
+							function getSelectedItem(){
+								var array = new Array();
+									var size = $("#contentTable tbody tr td input.i-checks:checked").size();
+									var sizeChecked = $("#contentTable tbody tr td input.i-checks:checked");
+
+									for (var i=0;i<size;i++){
+										array.push(sizeChecked[i].id);
+									}
+									if(size == 0 ){
+										top.layer.alert('请至少选择一条数据!', {icon: 0, title:'警告'});
+										return "-1";
+									}
+									/*if(size > 1 ){
+                                        top.layer.alert('只能选择一条数据!', {icon: 0, title:'警告'});
+                                        return "-1";
+                                    }*/
+									$("#projectFlag").val(1);
+
+								var id =  $("#contentTable tbody tr td input.i-checks:checkbox:checked").attr("id");
+								var label = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel").html();
+								var number = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codenumber").html();
+								var details = $("#details").val();
+								var projectFlag = $("#projectFlag").val();
+								console.log(array.toString())
+								return array.toString()+"_item_"+label+"_item_"+number+"_item_"+details+"_item_"+projectFlag;
+							}
+							function page(n,s){
+								if(n) $("#pageNo").val(n);
+								if(s) $("#pageSize").val(s);
+								$("#searchForm").attr("action","${url}");
+								$("#searchForm").submit();
+								return false;
+							}
+						</script>
+					</head>
+					<body>
+					<div class="wrapper wrapper-content">
+						<div class="layui-row">
+							<div class="full-width fl">
+								<div class="layui-row" id="queryDiv">
+									<form:form id="searchForm" modelAttribute="obj" action="${url}" method="post" class="form-inline layui-form">
+										<input type="hidden" name="url" value="${url}"/>
+										<input type="hidden" name="isTotal" value="${isTotal}"/>
+										<input type="hidden" name="fieldLabels" value="${fieldLabels}"/>
+										<input type="hidden" name="fieldKeys" value="${fieldKeys}"/>
+										<input type="hidden" name="searchLabel" value="${searchLabel}"/>
+										<input type="hidden" name="searchKey" value="${searchKey}"/>
+										<input type="hidden" name="reportNumberKey" value="${reportNumberKey}"/>
+										<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+										<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+										<input id="projectFlag" name="projectFlag" type="hidden" value=""/>
+										<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+										<div class="project">
+											<div class="commonQuery">
+												<div class="layui-item query athird " style="width: 25%">
+													<span class="layui-form-label">项目名称:</span>
+													<div class="layui-input-block">
+														<form:input path="${searchKey}" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+													</div>
+												</div>
+												<div class="layui-item query athird" style="width: 25%">
+													<span class="layui-form-label">项目编号:</span>
+													<div class="layui-input-block">
+														<form:input path="projectId" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+													</div>
+												</div>
+												<div class="layui-item query athird" style="width: 25%">
+													<span class="layui-form-label">报告号:</span>
+													<div class="layui-input-block">
+														<form:input path="reportData.number" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+													</div>
+												</div>
+												<div class="layui-item athird fr" style="width: 25%">
+													<div class="input-group">
+														<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+														<div class="layui-btn-group search-spacing">
+															<button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+															<button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
+														</div>
+													</div>
+												</div>
+												<div style="    clear:both;"></div>
+											</div>
+										</div>
+									</form:form>
+								</div>
+							</div>
+							<div class="full-width fl form-group first  project">
+								<div class="layui-item layui-col-xs12 form-table-container">
+									<table id="contentTable" class="table details table-bordered table-condensed">
+										<thead>
+										<tr>
+											<th width="50px"></th>
+											<c:forEach items="${labelNames}" var="projectName"  varStatus="status">
+												<th>项目名称</th>
+												<th width="180px">项目编号</th>
+												<th width="220px">项目报告号</th>
+												<th width="80px">登记人</th>
+												<th width="80px">责任人</th>
+												<th width="250px">委托方</th>
+											</c:forEach>
+										</tr>
+										</thead>
+										<tbody>
+										<c:choose>
+											<c:when test="${not empty page.list}">
+												<c:forEach items="${page.list}" var="obj">
+													<tr>
+														<td> <input type="checkbox" id="${fns:getValue(obj, 'id')}" class="i-checks"></td>
+														<td class="codelabel">${obj.projectName}</td>
+														<td class="codelabel">${obj.projectId}</td>
+														<td class="codenumber">${obj.reportData.number}</td>
+														<td class="codelabel">${obj.projectRegistrant}</td>
+														<td class="codelabel">${obj.leaderNameStr}</td>
+														<td class="codelabel">${obj.workContractInfo.client.name}</td>
+													</tr>
+												</c:forEach>
+											</c:when>
+											<c:otherwise>
+												<tr>
+													<td colspan="6" align="center">
+														暂无数据
+													</td>
+												</tr>
+											</c:otherwise>
+										</c:choose>
+										</tbody>
+									</table>
+									<table:page page="${page}"></table:page>
+								</div>
+							</div>
+
+						</div>
+					</div>
+					</body>
+					</html>
+					</tbody>
+				</table>
+				<table:page page="${page}"></table:page>
+	</div>
+</div>
+
+	</div>
+</div>
+</body>
+</html>

+ 99 - 8
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp

@@ -182,6 +182,94 @@
                 $("#roleId").empty();
                 var officeId = $(this).val();
                 $.ajax({
+                    type:'post',
+                    url: '${ctx}/sys/role/getNewByOfficeId',
+                    data: {'id':officeId},
+                    success:function(data){
+                        if(data.success) {
+                            var data = data.body.list;
+                            var newDataList = data;
+                            var showList = [];
+                            $.ajax({
+                                type:'post',
+                                url:'${ctx}/sys/role/getRoleIdByUserIdList',
+                                data:{
+                                    "id":$("#userId").val()
+                                },
+                                success:function(dataListById){
+
+                                    if(dataListById.success) {
+                                        var showDataList = dataListById.body.list;
+                                        var lists = [];
+                                        for (i in newDataList) {
+                                            for (j in showDataList) {
+                                                if (newDataList[i].value == showDataList[j].value) {
+                                                    var newData = {
+                                                        "name": newDataList[i].name,
+                                                        "value": newDataList[i].value,
+                                                        "selected": true
+
+                                                    }
+                                                    lists.push(newDataList[i].value);
+                                                    showList.push(newData);
+                                                    data.splice(i,1,newData);
+                                                }
+                                            }
+                                        }
+                                        if(0 == showDataList.length){
+                                            var roleIdShow = $("#roleIdShow").val();
+                                            if(undefined != roleIdShow && null != roleIdShow && '' != roleIdShow){
+                                                for (i in newDataList) {
+                                                    if (newDataList[i].value == roleIdShow) {
+                                                        var newData = {
+                                                            "name": newDataList[i].name,
+                                                            "value": newDataList[i].value,
+                                                            "selected": true
+
+                                                        }
+                                                        lists.push(newDataList[i].value);
+                                                        showList.push(newData);
+                                                        data.splice(i,1,newData);
+                                                    }
+                                                }
+                                            }else{
+
+                                                console.log(newDataList)
+                                                if(newDataList.length>0){
+                                                    var newData = {
+                                                        "name": newDataList[0].name,
+                                                        "value": newDataList[0].value,
+                                                        "selected": false
+
+                                                    }
+                                                    lists.push(newDataList[0].value);
+                                                    showList.push(newData);
+                                                    data.splice(0,1,newData);
+                                                }
+                                            }
+                                        }
+
+                                        $("#roleStr").val(lists);
+                                        xmSelect.render({
+                                            el: '#roleId',
+                                            language: 'zn',
+                                            data:data
+                                        })
+                                    }
+                                }
+                            })
+                        }
+                    }
+                })
+            });
+
+            /*$('#officeId').on("change", function () {
+                // $("#roleId").find("option:selected").remove();
+                // var maxIndex=$("#roleId option:last").attr("index")
+                // console.log(maxIndex)
+                $("#roleId").empty();
+                var officeId = $(this).val();
+                $.ajax({
                     type: 'POST',
                     url: '${ctx}/sys/role/getByOfficeId',
                     data: {'id': officeId},
@@ -194,7 +282,7 @@
                         $("#roleId").append(html);
                     }
                 });
-            });
+            });*/
 
             //第一次,验证手机号
            checkMobile();
@@ -2210,15 +2298,18 @@
                                         }
                                     }else{
 
-                                        var newData = {
-                                            "name": newDataList[0].name,
-                                            "value": newDataList[0].value,
-                                            "selected": true
+                                        console.log(newDataList)
+                                        if(newDataList.length>0){
+                                            var newData = {
+                                                "name": newDataList[0].name,
+                                                "value": newDataList[0].value,
+                                                "selected": true
 
+                                            }
+                                            lists.push(newDataList[0].value);
+                                            showList.push(newData);
+                                            data.splice(0,1,newData);
                                         }
-                                        lists.push(newDataList[0].value);
-                                        showList.push(newData);
-                                        data.splice(0,1,newData);
                                     }
                                 }