蔡德晨 hace 5 años
padre
commit
147b8d4980
Se han modificado 58 ficheros con 4553 adiciones y 856 borrados
  1. 1 1
      src/main/java/com/jeeplus/modules/projectapproval/service/ProjectApprovalService.java
  2. 26 9
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java
  3. 5 1
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectcontentinfoController.java
  4. 22 3
      src/main/java/com/jeeplus/modules/workadministrativeatamp/entity/WorkAdministrativeAtamp.java
  5. 21 13
      src/main/java/com/jeeplus/modules/workadministrativeatamp/service/WorkAdministrativeAtampService.java
  6. 33 33
      src/main/java/com/jeeplus/modules/workadministrativeatamp/web/WorkAdministrativeAtampController.java
  7. 9 0
      src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractInfo.java
  8. 89 22
      src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java
  9. 32 12
      src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java
  10. 47 9
      src/main/java/com/jeeplus/modules/workcontractrev/service/WorkContractReService.java
  11. 16 7
      src/main/java/com/jeeplus/modules/workcontractrev/web/WorkContractReController.java
  12. 36 0
      src/main/java/com/jeeplus/modules/workleave/dao/WorkLeaveDao.java
  13. 287 0
      src/main/java/com/jeeplus/modules/workleave/entity/WorkLeave.java
  14. 702 0
      src/main/java/com/jeeplus/modules/workleave/service/WorkLeaveService.java
  15. 292 0
      src/main/java/com/jeeplus/modules/workleave/web/WorkLeaveController.java
  16. 19 3
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  17. 43 29
      src/main/java/com/jeeplus/modules/workregularapply/service/WorkRegularApplyService.java
  18. 8 6
      src/main/java/com/jeeplus/modules/workregularapply/web/WorkRegularApplyController.java
  19. 3 1
      src/main/java/com/jeeplus/modules/workreimbursement/dao/ReimbursementVATTaxDao.java
  20. 7 7
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java
  21. 19 3
      src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementController.java
  22. 7 8
      src/main/java/com/jeeplus/modules/workresignation/service/WorkResignationService.java
  23. 3 3
      src/main/java/com/jeeplus/modules/workresignation/web/WorkResignationController.java
  24. 314 0
      src/main/resources/act/designs/oa/expense_account/workPositive.bpmn
  25. 4 3
      src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml
  26. 14 0
      src/main/resources/mappings/modules/workadministrativeatamp/WorkAdministrativeAtampDao.xml
  27. 10 0
      src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml
  28. 254 0
      src/main/resources/mappings/modules/workleave/WorkLeaveDao.xml
  29. 8 0
      src/main/resources/mappings/modules/workreimbursement/ReimbursementVATTaxDao.xml
  30. 2 2
      src/main/webapp/webpage/modules/projectapproval/projectApprovalForm.jsp
  31. 7 7
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordAudit.jsp
  32. 11 10
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordForm.jsp
  33. 9 9
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordModifyApply.jsp
  34. 7 7
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordView.jsp
  35. 62 62
      src/main/webapp/webpage/modules/projectcontentinfo/projectcontentinfoForm.jsp
  36. 2 2
      src/main/webapp/webpage/modules/projectcontentinfo/projectcontentinfoList.jsp
  37. 5 5
      src/main/webapp/webpage/modules/projectcontentinfo/reportModifyApply.jsp
  38. 177 172
      src/main/webapp/webpage/modules/projectcontentinfo/workContentForm.jsp
  39. 12 8
      src/main/webapp/webpage/modules/projectcontentinfo/workContentView.jsp
  40. 24 24
      src/main/webapp/webpage/modules/projectrecord/projectRecordsList.jsp
  41. 33 13
      src/main/webapp/webpage/modules/workadministrativeatamp/workAdministrativeAtampAudit.jsp
  42. 74 22
      src/main/webapp/webpage/modules/workadministrativeatamp/workAdministrativeAtampForm.jsp
  43. 38 37
      src/main/webapp/webpage/modules/workadministrativeatamp/workAdministrativeAtampList.jsp
  44. 73 21
      src/main/webapp/webpage/modules/workadministrativeatamp/workAdministrativeAtampModifyApply.jsp
  45. 32 13
      src/main/webapp/webpage/modules/workadministrativeatamp/workAdministrativeAtampView.jsp
  46. 2 2
      src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp
  47. 69 60
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp
  48. 44 44
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoList.jsp
  49. 45 39
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoLookForm.jsp
  50. 1 1
      src/main/webapp/webpage/modules/workcontractre/workContractReAudit.jsp
  51. 256 0
      src/main/webapp/webpage/modules/workleave/workLeaveAudit.jsp
  52. 274 0
      src/main/webapp/webpage/modules/workleave/workLeaveForm.jsp
  53. 316 0
      src/main/webapp/webpage/modules/workleave/workLeaveList.jsp
  54. 265 0
      src/main/webapp/webpage/modules/workleave/workLeaveModify.jsp
  55. 230 0
      src/main/webapp/webpage/modules/workleave/workLeaveView.jsp
  56. 15 0
      src/main/webapp/webpage/modules/workleave/workTrack.jsp
  57. 135 121
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormAdd.jsp
  58. 2 2
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementModifyApply.jsp

+ 1 - 1
src/main/java/com/jeeplus/modules/projectapproval/service/ProjectApprovalService.java

@@ -51,7 +51,7 @@ public class ProjectApprovalService extends CrudService<ProjectApprovalDao, Proj
 	}
 	
 	public Page<ProjectApproval> findPage(Page<ProjectApproval> page, ProjectApproval projectBasedData) {
-		projectBasedData.getSqlMap().put("dsf", dataScopeFilter(projectBasedData.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_REGULARAPPLY.getValue()));
+		projectBasedData.getSqlMap().put("dsf", dataScopeFilter(UserUtils.getUser(), "o", "u","s", MenuStatusEnum.WORK_OVERTIME.getValue()));
 		return super.findPage(page, projectBasedData);
 	}
 	

+ 26 - 9
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java

@@ -213,7 +213,7 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 		projectReportData.setPage(page);
 //		projectReportData.getSqlMap().put("dsf", dataScopeFilter(projectReportData.getCurrentUser(), "o", "u","s", MenuStatusEnum.PROJECT_REPORTDATA.getValue()));
 		User user = UserUtils.getUser();
-		projectReportData.setMaster(user);
+		projectReportData.setCreateBy(user);
 		List<ProjectReportData> projectReportDatas = dao.findInfoListByStatus(projectReportData);
 //		for (ProjectReportData reportData:projectReportDatas){
 //			String projectMaster = projectRecordsService.getMasterStr(reportData.getProject().getId());
@@ -346,6 +346,7 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 //		List<User> fgzlfzs = UserUtils.getByRoleActivityEnname("zlfgld",3,recordsOffice.getId(),"12",projectReportData.getCreateBy());
 //		List<User> glydas = UserUtils.getByRoleActivityEnname("bggdgly",3,recordsOffice.getId(),"12",projectReportData.getCreateBy());
 		List<User> gzrs = UserUtils.getByRoleActivityEnname("zjl",3,recordsOffice.getId(),"12",projectReportData.getCreateBy());
+		List<User> glydas  = UserUtils.getByRoleActivityEnname("fzjl",3,recordsOffice.getId(),"12",projectReportData.getCreateBy());
 		if (StringUtils.isNotBlank(workActivityMenu.getId())) {
 			workProjectNotify.setNotifyRole("");
 			workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
@@ -477,8 +478,8 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 			workActivityProcessService.insert(workActivityProcess);
 			workActivityProcess.setCount(3);
 			workActivityProcessService.insert(workActivityProcess);
-//			workActivityProcess.setCount(4);
-//			workActivityProcessService.insert(workActivityProcess);
+			workActivityProcess.setCount(4);
+			workActivityProcessService.insert(workActivityProcess);
 //			workActivityProcess.setCount(5);
 //			workActivityProcessService.insert(workActivityProcess);
 //			workActivityProcess.setCount(6);
@@ -493,8 +494,8 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 			workActivityProcessService.insertAuditsByType(bzshbs,processInstance.getId(),2,0);
 //			workActivityProcessService.insertAuditsByType(fglds,processInstance.getId(),5,0);
 //			workActivityProcessService.insertAuditsByType(fgzlfzs,processInstance.getId(),6,0);
-//			workActivityProcessService.insertAuditsByType(glydas,processInstance.getId(),4,0);
-			workActivityProcessService.insertAuditsByType(gzrs,processInstance.getId(),3,0);
+			workActivityProcessService.insertAuditsByType(glydas,processInstance.getId(),3,0);
+			workActivityProcessService.insertAuditsByType(gzrs,processInstance.getId(),4,0);
 		}
        /* logger.info("保存数据:"+(s2-s1)+"[ms],查询每个节点的审批用户列表"+(s3-s2)+
                 "[ms],工作流加入参数:"+(s4-s3)+"[ms],发送推送IM APP消息:"+(s5-s4)+
@@ -896,9 +897,25 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 					taskCount = "2";
 					exp = "pass";
 					if ("yes".equals(flag)) {
-						workActivityProcessService.insertAuditsByType(auditUsers,reportData.getProcessInstanceId(),5,1);
+						workActivityProcessService.insertAuditsByType(auditUsers,reportData.getProcessInstanceId(),3,1);
 
-						notifyRole = "总经理审核";
+						notifyRole = "副总经理审核";
+						workActivityProcess.setIsApproval("1");
+						enname = "glyda";
+						vars.put("glydaList", auditUsers);
+						vars.put("glydacount",auditUsers.size());
+					} else {
+						notifyRole = "调整报告";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
+				} else if ("glyda".equals(taskDefKey) && count.contains("3")) {
+					taskCount = "3";
+					exp = "pass";
+					if ("yes".equals(flag)) {
+						workActivityProcessService.insertAuditsByType(auditUsers,reportData.getProcessInstanceId(),3,1);
+
+						notifyRole = "副总经理审核";
 						workActivityProcess.setIsApproval("1");
 						enname = "gzr";
 						vars.put("gzrList", auditUsers);
@@ -908,8 +925,8 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 						workActivityProcess.setIsApproval("2");
 					}
 					break;
-				} else if ("gzr".equals(taskDefKey) && count.contains("3")) {
-					taskCount = "3";
+				}else if ("gzr".equals(taskDefKey) && count.contains("4")) {
+					taskCount = "4";
 					exp = "pass";
 					if ("yes".equals(flag)) {
 						notifyRole = "审批通过";

+ 5 - 1
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectcontentinfoController.java

@@ -912,7 +912,11 @@ public class ProjectcontentinfoController extends BaseController {
 			if (users==null )
 				users = UserUtils.getByRoleActivityEnname("bzshb",3,t.getOfficeId(),"12",t.getCreateBy());
 		}else if ("bzshb".equals(taskDefKey)){
-			users = UserUtils.getByProssType(t.getProcessInstanceId(),5);
+			users = UserUtils.getByProssType(t.getProcessInstanceId(),3);
+			if (users==null )
+				users = UserUtils.getByRoleActivityEnname("fzjl",3,t.getOfficeId(),"12",t.getCreateBy());
+		}else if ("glyda".equals(taskDefKey)){
+			users = UserUtils.getByProssType(t.getProcessInstanceId(),4);
 			if (users==null )
 				users = UserUtils.getByRoleActivityEnname("zjl",3,t.getOfficeId(),"12",t.getCreateBy());
 		}else if ("gzr".equals(taskDefKey)){

+ 22 - 3
src/main/java/com/jeeplus/modules/workadministrativeatamp/entity/WorkAdministrativeAtamp.java

@@ -5,6 +5,7 @@ package com.jeeplus.modules.workadministrativeatamp.entity;
 
 import com.google.common.collect.Lists;
 import com.jeeplus.common.persistence.ActEntity;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.sys.entity.Office;
 import javax.validation.constraints.NotNull;
 import java.util.Date;
@@ -41,7 +42,26 @@ public class WorkAdministrativeAtamp extends ActEntity<WorkAdministrativeAtamp>
     private Date beginDate;
     private Date endDate;
     private String home;
-	
+    private ProjectRecords project;
+    private String ext;
+
+
+	public String getExt() {
+		return ext;
+	}
+
+	public void setExt(String ext) {
+		this.ext = ext;
+	}
+
+	public ProjectRecords getProject() {
+		return project;
+	}
+
+	public void setProject(ProjectRecords project) {
+		this.project = project;
+	}
+
 	public WorkAdministrativeAtamp() {
 		super();
 	}
@@ -86,7 +106,7 @@ public class WorkAdministrativeAtamp extends ActEntity<WorkAdministrativeAtamp>
 		this.num = num;
 	}
 	
-	@NotNull(message="签章公司不能为空")
+
 	@ExcelField(title="签章公司", fieldType=Office.class, value="", align=2, sort=11)
 	public Office getComSign() {
 		return comSign;
@@ -105,7 +125,6 @@ public class WorkAdministrativeAtamp extends ActEntity<WorkAdministrativeAtamp>
     }
 
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-	@NotNull(message="申请日期不能为空")
 	@ExcelField(title="申请日期", align=2, sort=13)
 	public Date getSubmitDate() {
 		return submitDate;

+ 21 - 13
src/main/java/com/jeeplus/modules/workadministrativeatamp/service/WorkAdministrativeAtampService.java

@@ -51,7 +51,7 @@ import com.jeeplus.modules.workadministrativeatamp.entity.WorkAdministrativeAtam
 import com.jeeplus.modules.workadministrativeatamp.dao.WorkAdministrativeAtampDao;
 
 /**
- * 行政盖章Service
+ * 项目盖章Service
  * @author ssrh
  * @version 2018-07-10
  */
@@ -123,10 +123,11 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
         preSave(workAdministrativeAtamp);
 		super.save(workAdministrativeAtamp);
 		this.saveAttachments(workAdministrativeAtamp);
-		logger.info("保存行政签章耗时:{}ms",System.currentTimeMillis()-t1);
+		logger.info("保存项目签章耗时:{}ms",System.currentTimeMillis()-t1);
 	}
 
     private void preSave(WorkAdministrativeAtamp workAdministrativeAtamp) {
+
         if(workAdministrativeAtamp.getOffice()==null|| StringUtils.isBlank(workAdministrativeAtamp.getOffice().getId())){
             workAdministrativeAtamp.setOffice(UserUtils.getSelectOffice());
         }
@@ -134,7 +135,7 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
             workAdministrativeAtamp.setCompany(UserUtils.getSelectCompany());
         }
         if (StringUtils.isBlank(workAdministrativeAtamp.getNum())){
-            String serialNum = serialNumTplService.genSerialNum(workAdministrativeAtamp.getComSign(), WorkAdministrativeAtamp.SERIAL_BIZCODE);
+            String serialNum = serialNumTplService.genSerialNum(UserUtils.getUser().getCompany(), WorkAdministrativeAtamp.SERIAL_BIZCODE);
             workAdministrativeAtamp.setNum(serialNum);
         }
     }
@@ -194,8 +195,8 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
         long t1 = System.currentTimeMillis();
         Map<String, Object> variables = new HashMap<String, Object>();
         identityService.setAuthenticatedUserId(workAdministrativeAtamp.getCurrentUser().getId());
-        String contentStr = "申请编号:"+workAdministrativeAtamp.getNum()+",文档类型:"+ DictUtils.getDictLabel(workAdministrativeAtamp.getDocType(),"sign_doc_type","")+",印章类型:"+DictUtils.getMainDictLabel(workAdministrativeAtamp.getSealType(),"seal_type","")+",申请日期:"+ DateUtils.formatDate(workAdministrativeAtamp.getCreateDate());
-        String titleStr = "签章公司:"+ workAdministrativeAtamp.getComSign().getName();
+        String contentStr = "申请编号:"+workAdministrativeAtamp.getNum()+",申请日期:"+ DateUtils.formatDate(workAdministrativeAtamp.getCreateDate());
+        String titleStr = "申请人:"+ workAdministrativeAtamp.getSubmiter().getName();
 
         String businessKey = workAdministrativeAtamp.getId();
         Office office = UserUtils.getSelectOffice();
@@ -218,8 +219,8 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
 
         List<User> users = new ArrayList<>();
         List<User> bmzrList = UserUtils.getByRoleActivityEnname("bmzr",2,office.getId(),"11",workAdministrativeAtamp.getCreateBy());
-        List<User> fgldList = UserUtils.getByRoleActivityEnname("fgld",2,office.getId(),"11",workAdministrativeAtamp.getCreateBy());
-        List<User> gzrList = UserUtils.getByRoleActivityEnname("gzr",3,workAdministrativeAtamp.getComSign().getId(),"11",workAdministrativeAtamp.getCreateBy());
+        List<User> fgldList = UserUtils.getByRoleActivityEnname("fzjl",3,office.getId(),"11",workAdministrativeAtamp.getCreateBy());
+        List<User> gzrList = UserUtils.getByRoleActivityEnname("zjl",3,office.getId(),"11",workAdministrativeAtamp.getCreateBy());
         if (StringUtils.isNotBlank(workActivityMenu.getId())) {
             workProjectNotify.setNotifyRole("");
             workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
@@ -259,6 +260,8 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
                 this.updateStateById(workAdministrativeAtamp);
                 return "流程审批人不能为空,部门负责人下无用户,请联系管理员!";
             }
+            variables.put("bmzrList", bmzrList);
+            variables.put("bmzrCount",bmzrList.size());
             processType = "administrativeAtamp";
             users.addAll(bmzrList);
         }
@@ -277,7 +280,7 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
         }
         long t2 = System.currentTimeMillis();
         UserUtils.pushIm(userIds,contentStr);
-        logger.info("行政签章推送消息耗时:{}ms",System.currentTimeMillis()-t2);
+        logger.info("项目签章推送消息耗时:{}ms",System.currentTimeMillis()-t2);
 
         variables.put("busId", businessKey);
         variables.put("type", processType);
@@ -313,7 +316,7 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
         workAdministrativeAtamp.setProcessInstanceId(processInstance.getId());
         workAdministrativeAtamp.setState(ProjectStatusEnum.IN_APRL.getValue());
         dao.updateProcessIdAndStatus(workAdministrativeAtamp);
-        logger.info("启动行政签章审批流程耗时:{}ms",System.currentTimeMillis()-t1);
+        logger.info("启动项目签章审批流程耗时:{}ms",System.currentTimeMillis()-t1);
         return "";
     }
 
@@ -322,8 +325,8 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
      */
     @Transactional(readOnly = false)
     public String auditSave(WorkAdministrativeAtamp workAdministrativeAtamp,List<User> auditUsers) {
-        String str = "申请编号:"+workAdministrativeAtamp.getNum()+",文档类型:"+ DictUtils.getDictLabel(workAdministrativeAtamp.getDocType(),"sign_doc_type","")+",印章类型:"+DictUtils.getMainDictLabel(workAdministrativeAtamp.getSealType(),"seal_type","")+",申请日期:"+ DateUtils.formatDate(workAdministrativeAtamp.getCreateDate());
-        String title = "签章公司:"+ workAdministrativeAtamp.getComSign().getName();
+        String str = "申请编号:"+workAdministrativeAtamp.getNum()+",申请人:"+workAdministrativeAtamp.getSubmiter().getName() +",申请日期:"+ DateUtils.formatDate(workAdministrativeAtamp.getCreateDate());
+        String title = "申请人:"+ workAdministrativeAtamp.getSubmiter().getName();
         // 对不同环节的业务逻辑进行操作
         String taskDefKey = workAdministrativeAtamp.getAct().getTaskDefKey();
         if (!"modifyApply".equals(taskDefKey) && !taskDefKey.contains("audit")) {
@@ -420,9 +423,11 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
                     if ("yes".equals(workAdministrativeAtamp.getAct().getFlag())) {
                         workActivityProcessService.insertAuditsByType(auditUsers,workAdministrativeAtamp.getProcessInstanceId(),2,1);
 
-                        notifyRole = "业务分管领导审核";
+                        notifyRole = "副总经理审核";
                         workActivityProcess.setIsApproval("1");
                         enname = "fgld";
+                        vars.put("fgldCount",auditUsers.size());
+                        vars.put("fgldList", auditUsers);
                     } else {
                         notifyRole = "调整申请";
                         workActivityProcess.setIsApproval("2");
@@ -434,9 +439,11 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
                     if ("yes".equals(workAdministrativeAtamp.getAct().getFlag())) {
                         workActivityProcessService.insertAuditsByType(auditUsers,workAdministrativeAtamp.getProcessInstanceId(),3,1);
 
-                        notifyRole = "签章人审批";
+                        notifyRole = "总经理审批";
                         workActivityProcess.setIsApproval("1");
                         enname = "gzr";
+                        vars.put("gzrCount",auditUsers.size());
+                        vars.put("gzrList", auditUsers);
                     } else {
                         notifyRole = "调整签章信息";
                         workActivityProcess.setIsApproval("2");
@@ -473,6 +480,7 @@ public class WorkAdministrativeAtampService extends CrudService<WorkAdministrati
         workAdministrativeAtamp.preUpdate();
         // 提交流程任务
         vars.put(exp, "yes".equals(workAdministrativeAtamp.getAct().getFlag()) ? true : false);
+        vars.put("passs", true);
         workActivityProcessService.updateProcess(workActivityProcess,workActivityMenu,key,taskCount, workAdministrativeAtamp.getProcessInstanceId(),taskDefKey,"modifyApply", workAdministrativeAtamp.getAct().getFlag(),comment, activities);
         // 提交流程任务
         actTaskService.complete(workAdministrativeAtamp.getAct().getTaskId(), workAdministrativeAtamp.getAct().getProcInsId(), workAdministrativeAtamp.getAct().getComment(), vars);

+ 33 - 33
src/main/java/com/jeeplus/modules/workadministrativeatamp/web/WorkAdministrativeAtampController.java

@@ -45,7 +45,7 @@ import com.jeeplus.modules.workadministrativeatamp.entity.WorkAdministrativeAtam
 import com.jeeplus.modules.workadministrativeatamp.service.WorkAdministrativeAtampService;
 
 /**
- * 行政盖章Controller
+ * 项目盖章Controller
  * @author ssrh
  * @version 2018-07-10
  */
@@ -71,7 +71,7 @@ public class WorkAdministrativeAtampController extends BaseController {
 	}
 	
 	/**
-	 * 行政盖章列表页面
+	 * 项目盖章列表页面
 	 */
 	@RequiresPermissions("workadministrativeatamp:workAdministrativeAtamp:list")
 	@RequestMapping(value = {"list", ""})
@@ -82,7 +82,7 @@ public class WorkAdministrativeAtampController extends BaseController {
 	}
 
 	/**
-	 * 查看,增加,编辑行政盖章表单页面
+	 * 查看,增加,编辑项目盖章表单页面
 	 */
 	@RequiresPermissions(value={"workadministrativeatamp:workAdministrativeAtamp:view","workadministrativeatamp:workAdministrativeAtamp:add","workadministrativeatamp:workAdministrativeAtamp:edit"},logical=Logical.OR)
 	@RequestMapping(value = "form")
@@ -110,7 +110,7 @@ public class WorkAdministrativeAtampController extends BaseController {
 	}
 
 	/**
-	 * 查看,增加,编辑行政盖章表单页面
+	 * 查看,增加,编辑项目盖章表单页面
 	 */
 	@RequiresPermissions(value={"workadministrativeatamp:workAdministrativeAtamp:view"},logical=Logical.OR)
 	@RequestMapping(value = "view")
@@ -134,16 +134,16 @@ public class WorkAdministrativeAtampController extends BaseController {
             } else {//新增表单保存
                 workAdministrativeAtampService.save(workAdministrativeAtamp);//保存
             }
-            addMessage(redirectAttributes, "暂存行政盖章成功");
+            addMessage(redirectAttributes, "暂存项目盖章成功");
         }catch (Exception e){
-            logger.error("暂存行政盖章异常:",e);
-            addMessage(redirectAttributes, "暂存行政盖章异常:"+e.getMessage());
+            logger.error("暂存项目盖章异常:",e);
+            addMessage(redirectAttributes, "暂存项目盖章异常:"+e.getMessage());
         }
         return "redirect:"+Global.getAdminPath()+"/workadministrativeatamp/workAdministrativeAtamp/?repage";
     }
 
 	/**
-	 * 保存行政盖章
+	 * 保存项目盖章
 	 */
 	@RequiresPermissions(value={"workadministrativeatamp:workAdministrativeAtamp:add","workadministrativeatamp:workAdministrativeAtamp:edit"},logical=Logical.OR)
 	@RequestMapping(value = "save")
@@ -161,35 +161,35 @@ public class WorkAdministrativeAtampController extends BaseController {
             str = workAdministrativeAtampService.saveAtamp(workAdministrativeAtamp);//保存
         }
         if (StringUtils.isNotBlank(str)){
-            addMessage(redirectAttributes, "保存行政盖章失败:"+str);
+            addMessage(redirectAttributes, "保存项目盖章失败:"+str);
         }else {
-            addMessage(redirectAttributes, "保存行政盖章成功");
+            addMessage(redirectAttributes, "保存项目盖章成功");
         }
 		return "redirect:"+Global.getAdminPath()+"/workadministrativeatamp/workAdministrativeAtamp/?repage";
 	}
 	
 	/**
-	 * 删除行政盖章
+	 * 删除项目盖章
 	 */
 	@RequiresPermissions("workadministrativeatamp:workAdministrativeAtamp:del")
 	@RequestMapping(value = "delete")
 	public String delete(WorkAdministrativeAtamp workAdministrativeAtamp, RedirectAttributes redirectAttributes) {
         if(5==workAdministrativeAtamp.getState()|| 2==workAdministrativeAtamp.getState()){
             if(5==workAdministrativeAtamp.getState()){
-                addMessage(redirectAttributes, "行政盖章已审批通过,无法删除");
+                addMessage(redirectAttributes, "项目盖章已审批通过,无法删除");
                 return "redirect:"+Global.getAdminPath()+"/workadministrativeatamp/workAdministrativeAtamp/?repage";
             }else{
-                addMessage(redirectAttributes, "行政盖章正在审核中,无法删除");
+                addMessage(redirectAttributes, "项目盖章正在审核中,无法删除");
                 return "redirect:"+Global.getAdminPath()+"/workadministrativeatamp/workAdministrativeAtamp/?repage";
             }
         }
 		workAdministrativeAtampService.delete(workAdministrativeAtamp);
-		addMessage(redirectAttributes, "删除行政盖章成功");
+		addMessage(redirectAttributes, "删除项目盖章成功");
 		return "redirect:"+Global.getAdminPath()+"/workadministrativeatamp/workAdministrativeAtamp/?repage";
 	}
 	
 	/**
-	 * 批量删除行政盖章
+	 * 批量删除项目盖章
 	 */
 	@RequiresPermissions("workadministrativeatamp:workAdministrativeAtamp:del")
 	@RequestMapping(value = "deleteAll")
@@ -198,7 +198,7 @@ public class WorkAdministrativeAtampController extends BaseController {
 		for(String id : idArray){
 			workAdministrativeAtampService.delete(workAdministrativeAtampService.get(id));
 		}
-		addMessage(redirectAttributes, "删除行政盖章成功");
+		addMessage(redirectAttributes, "删除项目盖章成功");
 		return "redirect:"+Global.getAdminPath()+"/workadministrativeatamp/workAdministrativeAtamp/?repage";
 	}
 	
@@ -209,12 +209,12 @@ public class WorkAdministrativeAtampController extends BaseController {
     @RequestMapping(value = "export", method=RequestMethod.POST)
     public String exportFile(WorkAdministrativeAtamp workAdministrativeAtamp, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
 		try {
-            String fileName = "行政盖章"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            String fileName = "项目盖章"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
             Page<WorkAdministrativeAtamp> page = workAdministrativeAtampService.findPage(new Page<WorkAdministrativeAtamp>(request, response, -1), workAdministrativeAtamp);
-    		new ExportExcel("行政盖章", WorkAdministrativeAtamp.class).setDataList(page.getList()).write(response, fileName).dispose();
+    		new ExportExcel("项目盖章", WorkAdministrativeAtamp.class).setDataList(page.getList()).write(response, fileName).dispose();
     		return null;
 		} catch (Exception e) {
-			addMessage(redirectAttributes, "导出行政盖章记录失败!失败信息:"+e.getMessage());
+			addMessage(redirectAttributes, "导出项目盖章记录失败!失败信息:"+e.getMessage());
 		}
 		return "redirect:"+Global.getAdminPath()+"/workadministrativeatamp/workAdministrativeAtamp/?repage";
     }
@@ -243,25 +243,25 @@ public class WorkAdministrativeAtampController extends BaseController {
 				}
 			}
 			if (failureNum>0){
-				failureMsg.insert(0, ",失败 "+failureNum+" 条行政盖章记录。");
+				failureMsg.insert(0, ",失败 "+failureNum+" 条项目盖章记录。");
 			}
-			addMessage(redirectAttributes, "已成功导入 "+successNum+" 条行政盖章记录"+failureMsg);
+			addMessage(redirectAttributes, "已成功导入 "+successNum+" 条项目盖章记录"+failureMsg);
 		} catch (Exception e) {
-			addMessage(redirectAttributes, "导入行政盖章失败!失败信息:"+e.getMessage());
+			addMessage(redirectAttributes, "导入项目盖章失败!失败信息:"+e.getMessage());
 		}
 		return "redirect:"+Global.getAdminPath()+"/workadministrativeatamp/workAdministrativeAtamp/?repage";
     }
 	
 	/**
-	 * 下载导入行政盖章数据模板
+	 * 下载导入项目盖章数据模板
 	 */
 	@RequiresPermissions("workadministrativeatamp:workAdministrativeAtamp:import")
     @RequestMapping(value = "import/template")
     public String importFileTemplate(HttpServletResponse response, RedirectAttributes redirectAttributes) {
 		try {
-            String fileName = "行政盖章数据导入模板.xlsx";
+            String fileName = "项目盖章数据导入模板.xlsx";
     		List<WorkAdministrativeAtamp> list = Lists.newArrayList(); 
-    		new ExportExcel("行政盖章数据", WorkAdministrativeAtamp.class, 1).setDataList(list).write(response, fileName).dispose();
+    		new ExportExcel("项目盖章数据", WorkAdministrativeAtamp.class, 1).setDataList(list).write(response, fileName).dispose();
     		return null;
 		} catch (Exception e) {
 			addMessage(redirectAttributes, "导入模板下载失败!失败信息:"+e.getMessage());
@@ -298,18 +298,18 @@ public class WorkAdministrativeAtampController extends BaseController {
     @RequestMapping(value = "saveAudit")
     public String saveAudit(WorkAdministrativeAtamp workAdministrativeAtamp, Model model,
                             RedirectAttributes redirectAttributes) {
-        try {
+//        try {
             // 对不同环节的业务逻辑进行操作
             String taskDefKey = workAdministrativeAtamp.getAct().getTaskDefKey();
             List<User> users = null;
             if ("bmzr".equals(taskDefKey)){
                 users = UserUtils.getByProssType(workAdministrativeAtamp.getProcessInstanceId(),2);
                 if (users==null )
-                    users = UserUtils.getByRoleActivityEnname("fgld",2,UserUtils.getSelectOffice().getId(),"11",workAdministrativeAtamp.getCreateBy());
+                    users = UserUtils.getByRoleActivityEnname("fzjl",3,UserUtils.getSelectOffice().getId(),"11",workAdministrativeAtamp.getCreateBy());
             }else  if ("fgld".equals(taskDefKey)){
                 users = UserUtils.getByProssType(workAdministrativeAtamp.getProcessInstanceId(),3);
                 if (users==null )
-                    users = UserUtils.getByRoleActivityEnname("gzr",3,workAdministrativeAtamp.getComSign().getId(),"11",workAdministrativeAtamp.getCreateBy());
+                    users = UserUtils.getByRoleActivityEnname("zjl",3,UserUtils.getUser().getOffice().getId(),"11",workAdministrativeAtamp.getCreateBy());
             }else if ("gzr".equals(taskDefKey)){
                 users = UserUtils.getByProssType(workAdministrativeAtamp.getProcessInstanceId(),3);
             }else if ("modifyApply".equals(taskDefKey)){
@@ -322,10 +322,10 @@ public class WorkAdministrativeAtampController extends BaseController {
                 String str = workAdministrativeAtampService.auditSave(workAdministrativeAtamp,users);
                 addMessage(redirectAttributes, str);
             }
-        }catch (Exception e){
-            logger.info("Exception e:"+e);
-            addMessage(redirectAttributes, "审批失败");
-        }
+//        }catch (Exception e){
+//            logger.info("Exception e:"+e);
+//            addMessage(redirectAttributes, "审批失败");
+//        }
         if (StringUtils.isNotBlank(workAdministrativeAtamp.getHome()) && "home".equals(workAdministrativeAtamp.getHome())){
             return "redirect:" + Global.getAdminPath() + "/home/?repage";
         }else {
@@ -367,7 +367,7 @@ public class WorkAdministrativeAtampController extends BaseController {
         try {
             WorkAdministrativeAtamp workAdministrativeAtamp = workAdministrativeAtampService.get(id);
             if(5==workAdministrativeAtamp.getState()){
-                addMessage(redirectAttributes, "行政盖章已审批通过,无法撤回");
+                addMessage(redirectAttributes, "项目盖章已审批通过,无法撤回");
                 return "redirect:"+Global.getAdminPath()+"/workadministrativeatamp/workAdministrativeAtamp/?repage";
             }
             workAdministrativeAtampService.cancelProcess(workAdministrativeAtamp);

+ 9 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractInfo.java

@@ -113,6 +113,15 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 	private String contractNumPath;
 	private String beginInvestmentAmount ;
 	private String endInvestmentAmount;
+	private String payment;
+
+	public String getPayment() {
+		return payment;
+	}
+
+	public void setPayment(String payment) {
+		this.payment = payment;
+	}
 
 	public String getBeginInvestmentAmount() {
 		return beginInvestmentAmount;

+ 89 - 22
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java

@@ -650,9 +650,11 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 				);
 		List<User> users = new ArrayList<>();
 		String officeId = UserUtils.getSelectOffice().getId();
-		List<User>  bmzrs = UserUtils.getByRoleActivityEnname("bmzr",2,office.getId(),"2",workContractInfo.getCreateBy());
-//		List<User>  scyfglbzrs = UserUtils.getByRoleActivityEnname("scyfglbzr",1,office.getId(),"2",workContractInfo.getCreateBy());
-//		List<User>  fglds = UserUtils.getByRoleActivityEnname("scfgld",3,office.getId(),"2",workContractInfo.getCreateBy());
+		List<User> bmzrList = UserUtils.getByRoleActivityEnname("cwzg",3,office.getId(),"2",workContractInfo.getCreateBy());
+		List<User> rszrList = UserUtils.getByRoleActivityEnname("bmzr",2,office.getId(),"2",workContractInfo.getCreateBy());
+		List<User> fgldList = UserUtils.getByRoleActivityEnname("bzshb",3,office.getId(),"2",workContractInfo.getCreateBy());
+		List<User> zjlList = UserUtils.getByRoleActivityEnname("fzjl",3,office.getId(),"2",workContractInfo.getCreateBy());
+		List<User> zjllList = UserUtils.getByRoleActivityEnname("zjl",3,office.getId(),"2",workContractInfo.getCreateBy());
 		long end3 = System.currentTimeMillis();
 		logger.info("合同送审-查找人员审核任务结束,共耗时:[" + (end3-begin2) / 1000 + "]秒");
 		long begin3 = System.currentTimeMillis();
@@ -691,14 +693,14 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 			workProjectNotify.setId("");
 		} else {
 			processType = "contractCheck";
-			if(bmzrs==null||bmzrs.size()==0){
+			if(rszrList==null||rszrList.size()==0){
 				workContractInfo.setContractState("1");
 				this.save(workContractInfo);
 				return "流程审批人不能为空,角色部门负责人下无用户,请联系管理员!";
 			}
-			variables.put("bmzrList", bmzrs);
-			variables.put("bmzrCount",bmzrs.size());
-			users.addAll(bmzrs);
+			variables.put("bmzrList", rszrList);
+			variables.put("bmzrcount",rszrList.size());
+			users.addAll(rszrList);
 		}
 
 		for (User u : users) {
@@ -741,16 +743,20 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 			workActivityProcess.setCount(1);
 			workActivityProcess.setProcessInstanceId(processInstance.getId());
 			workActivityProcess.setIsApproval("0");
-			workActivityProcessService.save(workActivityProcess);
-//			workActivityProcess.setCount(2);
-//			workActivityProcess.setId("");
-//			workActivityProcessService.save(workActivityProcess);
-//			workActivityProcess.setCount(3);
-//			workActivityProcess.setId("");
-//			workActivityProcessService.save(workActivityProcess);
-			workActivityProcessService.insertAuditsByType(bmzrs,processInstance.getId(),1,1);
-//			workActivityProcessService.insertAuditsByType(scyfglbzrs,processInstance.getId(),2,0);
-//			workActivityProcessService.insertAuditsByType(fglds,processInstance.getId(),3,0);
+			workActivityProcessService.insert(workActivityProcess);
+			workActivityProcess.setCount(2);
+			workActivityProcessService.insert(workActivityProcess);
+			workActivityProcess.setCount(3);
+			workActivityProcessService.insert(workActivityProcess);
+			workActivityProcess.setCount(4);
+			workActivityProcessService.insert(workActivityProcess);
+			workActivityProcess.setCount(5);
+			workActivityProcessService.insert(workActivityProcess);
+			workActivityProcessService.insertAuditsByType(rszrList,processInstance.getId(),1,1);
+			workActivityProcessService.insertAuditsByType(fgldList,processInstance.getId(),2,0);
+			workActivityProcessService.insertAuditsByType(zjlList,processInstance.getId(),4,0);
+			workActivityProcessService.insertAuditsByType(bmzrList,processInstance.getId(),3,0);
+			workActivityProcessService.insertAuditsByType(zjllList,processInstance.getId(),5,0);
 		}
 		long end = System.currentTimeMillis();
 		logger.info("合同送审任务结束,共耗时:[" + (end-begin) / 1000 + "]秒,流程启动时间:"+(s2-s1)+"ms");
@@ -978,17 +984,78 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 				if (!workActivityProcess.getIsApproval().equals("0")){
 					workActivityProcess.setId("");
 				}
-				// 审核环节
-				 if ("bmzr".equals(taskDefKey) && count.contains("1")) {
+				if ("bmzr".equals(taskDefKey) && count.contains("1")) {
 					taskCount = "1";
 					exp = "pass";
-					if("yes".equals(workContractInfo.getAct().getFlag())){
-						notifyRole = "审核通过";
+					if ("yes".equals(workContractInfo.getAct().getFlag())) {
+						vars.put("fgldList", auditUsers);
+						vars.put("fgldcount",auditUsers.size());
+						workActivityProcessService.insertAuditsByType(auditUsers,workContractInfo.getProcessInstanceId(),2,1);
+
+						notifyRole = "总工审核";
 						workActivityProcess.setIsApproval("1");
-					}else{
+						enname = "fgld";
+					} else {
+						notifyRole = "调整申请";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
+				} else if ("fgld".equals(taskDefKey) && count.contains("2")) {
+					taskCount = "2";
+					exp = "pass";
+					if ("yes".equals(workContractInfo.getAct().getFlag())) {
+						vars.put("zjlList", auditUsers);
+						vars.put("zjlcount",auditUsers.size());
+						workActivityProcessService.insertAuditsByType(auditUsers,workContractInfo.getProcessInstanceId(),3,1);
+						notifyRole = "财务审核";
+						workActivityProcess.setIsApproval("1");
+						enname = "zjl";
+					} else {
+						notifyRole = "调整申请";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
+				} else if ("zjl".equals(taskDefKey) && count.contains("3")) {
+					taskCount = "3";
+					exp = "pass";
+					if ("yes".equals(workContractInfo.getAct().getFlag())) {
+						vars.put("r", auditUsers);
+						vars.put("c",auditUsers.size());
+						workActivityProcessService.insertAuditsByType(auditUsers,workContractInfo.getProcessInstanceId(),4,1);
+						workActivityProcess.setIsApproval("1");
+						notifyRole = "副总经理审批";
+						enname = "rlzy";
+					} else {
 						notifyRole = "调整申请";
 						workActivityProcess.setIsApproval("2");
 					}
+					break;
+				} else if ("rlzy".equals(taskDefKey) && count.contains("4")) {
+					taskCount = "4";
+					exp = "pass";
+					if ("yes".equals(workContractInfo.getAct().getFlag())) {
+						vars.put("zjllList", auditUsers);
+						vars.put("zjllcount",auditUsers.size());
+						workActivityProcessService.insertAuditsByType(auditUsers,workContractInfo.getProcessInstanceId(),5,1);
+						notifyRole = "总经理审批";
+						workActivityProcess.setIsApproval("1");
+						enname = "zjll";
+					} else {
+						notifyRole = "调整申请";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
+				}else if ("zjll".equals(taskDefKey) && count.contains("5")) {
+					taskCount = "5";
+					exp = "pass";
+					if ("yes".equals(workContractInfo.getAct().getFlag())) {
+						notifyRole = "审批通过";
+						workActivityProcess.setIsApproval("1");
+					} else {
+						notifyRole = "调整申请";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
 				}else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
 					notifyRole = "部门主任审批";
 					taskCount = "0";

+ 32 - 12
src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java

@@ -744,7 +744,7 @@ public class WorkContractInfoController extends BaseController {
         }
         String url = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();
         String contextPath = request.getContextPath();
-        try {
+//        try {
             //判断是否有总合同
             if(!Strings.isNullOrEmpty(workContractInfo.getTotalContractId()) && !"0".equals(workContractInfo.getTotalContractId())){
                 workContractInfo.setIsTotalName("子合同");
@@ -842,12 +842,12 @@ public class WorkContractInfoController extends BaseController {
                     addMessage(redirectAttributes, "保存合同管理成功");
                 }
             }
-        }catch (Exception e){
-            addMessage(redirectAttributes, "保存合同管理失败");
-
-            logger.error("Exception e:"+e);
-            e.printStackTrace();
-        }
+//        }catch (Exception e){
+//            addMessage(redirectAttributes, "保存合同管理失败");
+//
+//            logger.error("Exception e:"+e);
+//            e.printStackTrace();
+//        }
         return "redirect:" + Global.getAdminPath() + "/workcontractinfo/workContractInfo/?repage";
     }
 
@@ -1395,11 +1395,31 @@ public class WorkContractInfoController extends BaseController {
 //        try{
             // 对不同环节的业务逻辑进行操作
             List<User> users = null;
-            if ("bmzr".equals(taskDefKey)){
-                users = UserUtils.getByProssType(workContractInfo.getProcessInstanceId(),2);
-                if (users==null )
-                    users = UserUtils.getByRoleActivityEnname("scyfglbzr",1,workContractInfo.getChargeCompany(),"2",workContractInfo.getCreateBy());
-            }else if ("modifyApply".equals(taskDefKey)){
+        if ("bmzr".equals(taskDefKey)){
+            users = UserUtils.getByProssType(workContractInfo.getProcessInstanceId(),2);
+            if (users==null ) {
+//					users = UserUtils.getByRoleActivityEnname("fgld", 3, workRegularApply.getOfficeId(), "19", user);
+                users = UserUtils.getByRoleActivityEnname("bzshb", 3, workContractInfo.getOfficeId(), "2", workContractInfo.getCreateBy());
+            }
+        }else  if ("fgld".equals(taskDefKey)){
+            users = UserUtils.getByProssType(workContractInfo.getProcessInstanceId(),3);
+            if (users==null )
+                users = UserUtils.getByRoleActivityEnname("cwzg", 3, workContractInfo.getOfficeId(), "2", workContractInfo.getCreateBy());
+
+        }else  if ("zjl".equals(taskDefKey)){
+            users = UserUtils.getByProssType(workContractInfo.getProcessInstanceId(),4);
+            if (users==null )
+                users = UserUtils.getByRoleActivityEnname("fzjl", 3, workContractInfo.getOfficeId(), "2", workContractInfo.getCreateBy());
+
+        }else if ("rlzy".equals(taskDefKey)){
+            users = UserUtils.getByProssType(workContractInfo.getProcessInstanceId(),5);
+            if (users==null )
+                users = UserUtils.getByRoleActivityEnname("zjl", 3, workContractInfo.getOfficeId(), "2", workContractInfo.getCreateBy());
+        }else if ("zjll".equals(taskDefKey)){
+            List<User> list = Lists.newArrayList();
+            list.add(UserUtils.getUser());
+            users = list;
+        }else if ("modifyApply".equals(taskDefKey)){
                 users = UserUtils.getByProssType(workContractInfo.getProcessInstanceId(),1);
             }
 //            String flag = workContractInfo.getAct().getFlag();

+ 47 - 9
src/main/java/com/jeeplus/modules/workcontractrev/service/WorkContractReService.java

@@ -166,7 +166,7 @@ public class WorkContractReService extends CrudService<WorkContractReDao, WorkCo
 		if(StringUtils.isBlank(workContractRe.getNumber())){
 			User user = UserUtils.getUser();
 //			projectBasedData.setNum(serialNumTplService.genSerialNum(user.getCompany(), WorkReimbursement.SERIAL_BIZCODE));
-			workContractRe.setNumber(serialNumTplService.genSerialNum(user.getCompany(),"7"));
+			workContractRe.setNumber(serialNumTplService.genSerialNum(user.getCompany(),"40"));
 		}
 		this.save(workContractRe);
 		return this.startAudit(workContractRe,workContractRe.getProcessInstanceId());
@@ -203,9 +203,11 @@ public class WorkContractReService extends CrudService<WorkContractReDao, WorkCo
 					);
 
 			List<User> users = new ArrayList<>();
-			List<User> rszrList = UserUtils.getByRoleActivityEnname("cwzg",3,office.getId(),"23",workContractRe.getCreateBy());
+			List<User> bmzrList = UserUtils.getByRoleActivityEnname("cwzg",3,office.getId(),"23",workContractRe.getCreateBy());
+			List<User> rszrList = UserUtils.getByRoleActivityEnname("bmzr",2,office.getId(),"23",workContractRe.getCreateBy());
 			List<User> fgldList = UserUtils.getByRoleActivityEnname("bzshb",3,office.getId(),"23",workContractRe.getCreateBy());
 			List<User> zjlList = UserUtils.getByRoleActivityEnname("fzjl",3,office.getId(),"23",workContractRe.getCreateBy());
+			List<User> zjllList = UserUtils.getByRoleActivityEnname("zjl",3,office.getId(),"23",workContractRe.getCreateBy());
 			if (StringUtils.isNotBlank(workActivityMenu.getId())) {
 				workProjectNotify.setNotifyRole("");
 				workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
@@ -246,7 +248,7 @@ public class WorkContractReService extends CrudService<WorkContractReDao, WorkCo
 					return "流程审批人不能为空,,请联系管理员!";
 				}
 				variables.put("bmzrList", rszrList);
-				variables.put("bmzrCount",rszrList.size());
+				variables.put("bmzrcount",rszrList.size());
 				processType = "contractRe";
 				users.addAll(rszrList);
 			}
@@ -289,9 +291,15 @@ public class WorkContractReService extends CrudService<WorkContractReDao, WorkCo
 				workActivityProcessService.insert(workActivityProcess);
 				workActivityProcess.setCount(3);
 				workActivityProcessService.insert(workActivityProcess);
+				workActivityProcess.setCount(4);
+				workActivityProcessService.insert(workActivityProcess);
+				workActivityProcess.setCount(5);
+				workActivityProcessService.insert(workActivityProcess);
 				workActivityProcessService.insertAuditsByType(rszrList,processInstance.getId(),1,1);
 				workActivityProcessService.insertAuditsByType(fgldList,processInstance.getId(),2,0);
-				workActivityProcessService.insertAuditsByType(zjlList,processInstance.getId(),3,0);
+				workActivityProcessService.insertAuditsByType(zjlList,processInstance.getId(),4,0);
+				workActivityProcessService.insertAuditsByType(bmzrList,processInstance.getId(),3,0);
+				workActivityProcessService.insertAuditsByType(zjllList,processInstance.getId(),5,0);
 			}
 			workContractRe.setProcessInstanceId(processInstance.getId());
 			workContractRe.setState("2");
@@ -412,8 +420,9 @@ public class WorkContractReService extends CrudService<WorkContractReDao, WorkCo
 					exp = "pass";
 					if ("yes".equals(workContractRe.getAct().getFlag())) {
 						vars.put("fgldList", auditUsers);
-						vars.put("fgldCount",auditUsers.size());
+						vars.put("fgldcount",auditUsers.size());
 						workActivityProcessService.insertAuditsByType(auditUsers,workContractRe.getProcessInstanceId(),2,1);
+
 						notifyRole = "总工审核";
 						workActivityProcess.setIsApproval("1");
 						enname = "fgld";
@@ -427,9 +436,9 @@ public class WorkContractReService extends CrudService<WorkContractReDao, WorkCo
 					exp = "pass";
 					if ("yes".equals(workContractRe.getAct().getFlag())) {
 						vars.put("zjlList", auditUsers);
-						vars.put("zjlCount",auditUsers.size());
+						vars.put("zjlcount",auditUsers.size());
 						workActivityProcessService.insertAuditsByType(auditUsers,workContractRe.getProcessInstanceId(),3,1);
-						notifyRole = "副总经理审核";
+						notifyRole = "财务审核";
 						workActivityProcess.setIsApproval("1");
 						enname = "zjl";
 					} else {
@@ -441,8 +450,37 @@ public class WorkContractReService extends CrudService<WorkContractReDao, WorkCo
 					taskCount = "3";
 					exp = "pass";
 					if ("yes".equals(workContractRe.getAct().getFlag())) {
+						vars.put("r", auditUsers);
+						vars.put("c",auditUsers.size());
+						workActivityProcessService.insertAuditsByType(auditUsers,workContractRe.getProcessInstanceId(),4,1);
+						workActivityProcess.setIsApproval("1");
+						notifyRole = "副总经理审批";
+						enname = "rlzy";
+					} else {
+						notifyRole = "调整申请";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
+				} else if ("rlzy".equals(taskDefKey) && count.contains("4")) {
+					taskCount = "4";
+					exp = "pass";
+					if ("yes".equals(workContractRe.getAct().getFlag())) {
+						vars.put("zjllList", auditUsers);
+						vars.put("zjllcount",auditUsers.size());
+						workActivityProcessService.insertAuditsByType(auditUsers,workContractRe.getProcessInstanceId(),5,1);
+						notifyRole = "总经理审批";
+						workActivityProcess.setIsApproval("1");
+						enname = "zjll";
+					} else {
+						notifyRole = "调整申请";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
+				}else if ("zjll".equals(taskDefKey) && count.contains("5")) {
+					taskCount = "5";
+					exp = "pass";
+					if ("yes".equals(workContractRe.getAct().getFlag())) {
 						notifyRole = "审批通过";
-
 						workActivityProcess.setIsApproval("1");
 					} else {
 						notifyRole = "调整申请";
@@ -450,7 +488,7 @@ public class WorkContractReService extends CrudService<WorkContractReDao, WorkCo
 					}
 					break;
 				}
-				 else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
+				else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
 					notifyRole = "财务审核";
 					taskCount = "0";
 					exp = "pass";

+ 16 - 7
src/main/java/com/jeeplus/modules/workcontractrev/web/WorkContractReController.java

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.modules.workcontractrev.web;
 
+import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.mapper.JsonMapper;
@@ -212,7 +213,7 @@ public class WorkContractReController extends BaseController {
 	@RequestMapping(value = "saveAudit")
 	public String saveAudit(WorkContractRe workContractRe, Model model,
 							RedirectAttributes redirectAttributes) {
-		try {
+//		try {
 			// 对不同环节的业务逻辑进行操作
 			String taskDefKey = workContractRe.getAct().getTaskDefKey();
 
@@ -226,13 +227,21 @@ public class WorkContractReController extends BaseController {
 			}else  if ("fgld".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workContractRe.getProcessInstanceId(),3);
 				if (users==null )
-					users = UserUtils.getByRoleActivityEnname("fzjl", 3, workContractRe.getOfficeId(), "66", workContractRe.getCreateBy());
+					users = UserUtils.getByRoleActivityEnname("cwzg", 3, workContractRe.getOfficeId(), "66", workContractRe.getCreateBy());
 
 			}else  if ("zjl".equals(taskDefKey)){
-				users = UserUtils.getByProssType(workContractRe.getProcessInstanceId(),3);
+				users = UserUtils.getByProssType(workContractRe.getProcessInstanceId(),4);
 				if (users==null )
 					users = UserUtils.getByRoleActivityEnname("fzjl", 3, workContractRe.getOfficeId(), "66", workContractRe.getCreateBy());
 
+			}else if ("rlzy".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workContractRe.getProcessInstanceId(),5);
+				if (users==null )
+					users = UserUtils.getByRoleActivityEnname("zjl", 3, workContractRe.getOfficeId(), "66", workContractRe.getCreateBy());
+			}else if ("zjll".equals(taskDefKey)){
+				List<User> list = Lists.newArrayList();
+				list.add(UserUtils.getUser());
+				users = list;
 			}
 			else if ("modifyApply".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workContractRe.getProcessInstanceId(),1);
@@ -240,10 +249,10 @@ public class WorkContractReController extends BaseController {
 				String str = workContractReService.auditSave(workContractRe,users);
 				addMessage(redirectAttributes, str);
 
-		}catch (Exception e){
-			logger.info("Exception e:"+e);
-			addMessage(redirectAttributes, "审批失败");
-		}
+//		}catch (Exception e){
+//			logger.info("Exception e:"+e);
+//			addMessage(redirectAttributes, "审批失败");
+//		}
 		if (StringUtils.isNotBlank(workContractRe.getHome()) && "home".equals(workContractRe.getHome())) {
 			return "redirect:" + Global.getAdminPath() + "/home/?repage";
 		} else {

+ 36 - 0
src/main/java/com/jeeplus/modules/workleave/dao/WorkLeaveDao.java

@@ -0,0 +1,36 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workleave.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.workleave.entity.WorkLeave;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+@MyBatisDao
+public interface WorkLeaveDao extends CrudDao<WorkLeave> {
+    /**
+     * 更新流程实例ID
+     * @return
+     */
+    public int updateProcessInstanceId(WorkLeave workLeave);
+
+    /**
+     * 根据流程实例ID获取
+     * @param processInstanceId
+     * @return
+     */
+    public WorkLeave getByProcessInstanceId(String processInstanceId);
+    /**
+     * 根据时间和档案id查询数据
+     * @param staffId,time
+     * @return
+     */
+    public WorkLeave getByStaffIdAndTime(@Param("staffId") String staffId, @Param("time") String time);
+
+    List<WorkLeave> findListValidateTime(String staffId);
+}

+ 287 - 0
src/main/java/com/jeeplus/modules/workleave/entity/WorkLeave.java

@@ -0,0 +1,287 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workleave.entity;
+
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.ActEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
+import org.activiti.engine.history.HistoricProcessInstance;
+import org.activiti.engine.repository.ProcessDefinition;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+
+public class WorkLeave extends ActEntity<WorkLeave> {
+
+
+
+	private static final long serialVersionUID = 1L;
+
+	public static final String SERIAL_BIZCODE = "27";
+
+	private String processInstanceId;		// 流程号
+	private String officeId;		// 部门
+	private String companyId;		// 公司
+	private String num;		// 编号
+	private String name;		// 姓名
+	private Date startDate;		// 开始日期
+	private String startType;		// 类型1(1上午2下午)
+	private Date endDate;		// 结束日期
+	private String endType;		// 类型2(1上午2下午 date_type)
+	private String reason;		// 原因
+	private WorkStaffBasicInfo workStaffBasicInfo;		// 档案
+	private String status;		// 状态
+	private String home;
+	private String day;
+	private String time;
+	private String job;
+	private String type;
+	private String car;
+	private String carNum;
+	private ProjectRecords project;
+	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();
+	// 流程任务
+	private Task task;
+	private Map<String, Object> variables;
+	// 运行中的流程实例
+	private ProcessInstance processInstance;
+	// 历史的流程实例
+	private HistoricProcessInstance historicProcessInstance;
+	// 流程定义
+	private ProcessDefinition processDefinition;
+
+	public WorkLeave() {
+		super();
+	}
+
+	public WorkLeave(String id){
+		super(id);
+	}
+
+	public String getCar() {
+		return car;
+	}
+
+	public void setCar(String car) {
+		this.car = car;
+	}
+
+	public String getCarNum() {
+		return carNum;
+	}
+
+	public ProjectRecords getProject() {
+		return project;
+	}
+
+	public void setProject(ProjectRecords project) {
+		this.project = project;
+	}
+
+	public void setCarNum(String carNum) {
+		this.carNum = carNum;
+	}
+
+	public String getDay() {
+        return day;
+    }
+
+    public void setDay(String day) {
+        this.day = day;
+    }
+
+    public String getTime() {
+        return time;
+    }
+
+    public void setTime(String time) {
+        this.time = time;
+    }
+
+    public String getJob() {
+        return job;
+    }
+
+    public void setJob(String job) {
+        this.job = job;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Task getTask() {
+		return task;
+	}
+
+	public void setTask(Task task) {
+		this.task = task;
+	}
+
+	public Map<String, Object> getVariables() {
+		return variables;
+	}
+
+	public void setVariables(Map<String, Object> variables) {
+		this.variables = variables;
+	}
+
+	public ProcessInstance getProcessInstance() {
+		return processInstance;
+	}
+
+	public void setProcessInstance(ProcessInstance processInstance) {
+		this.processInstance = processInstance;
+	}
+
+	public HistoricProcessInstance getHistoricProcessInstance() {
+		return historicProcessInstance;
+	}
+
+	public void setHistoricProcessInstance(HistoricProcessInstance historicProcessInstance) {
+		this.historicProcessInstance = historicProcessInstance;
+	}
+
+	public ProcessDefinition getProcessDefinition() {
+		return processDefinition;
+	}
+
+	public void setProcessDefinition(ProcessDefinition processDefinition) {
+		this.processDefinition = processDefinition;
+	}
+
+	public String getHome() {
+		return home;
+	}
+
+	public void setHome(String home) {
+		this.home = home;
+	}
+
+	@ExcelField(title="流程号", align=2, sort=7)
+	public String getProcessInstanceId() {
+		return processInstanceId;
+	}
+
+	public void setProcessInstanceId(String processInstanceId) {
+		this.processInstanceId = processInstanceId;
+	}
+	
+	@ExcelField(title="部门", align=2, sort=8)
+	public String getOfficeId() {
+		return officeId;
+	}
+
+	public void setOfficeId(String officeId) {
+		this.officeId = officeId;
+	}
+	
+	@ExcelField(title="公司", align=2, sort=9)
+	public String getCompanyId() {
+		return companyId;
+	}
+
+	public void setCompanyId(String companyId) {
+		this.companyId = companyId;
+	}
+	
+	@ExcelField(title="加班编号", align=2, sort=10)
+	public String getNum() {
+		return num;
+	}
+
+	public void setNum(String num) {
+		this.num = num;
+	}
+	
+	@ExcelField(title="姓名", align=2, sort=11)
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+
+	public List<WorkClientAttachment> getWorkAttachments() {
+		return workAttachments;
+	}
+
+	public void setWorkAttachments(List<WorkClientAttachment> workAttachments) {
+		this.workAttachments = workAttachments;
+	}
+
+
+	public String getStartType() {
+		return startType;
+	}
+
+	public void setStartType(String startType) {
+		this.startType = startType;
+	}
+
+	public Date getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+	public String getEndType() {
+		return endType;
+	}
+
+	public void setEndType(String endType) {
+		this.endType = endType;
+	}
+
+	@ExcelField(title="加班原因", align=2, sort=16)
+	public String getReason() {
+		return reason;
+	}
+
+	public void setReason(String reason) {
+		this.reason = reason;
+	}
+
+	public WorkStaffBasicInfo getWorkStaffBasicInfo() {
+		return workStaffBasicInfo;
+	}
+
+	public void setWorkStaffBasicInfo(WorkStaffBasicInfo workStaffBasicInfo) {
+		this.workStaffBasicInfo = workStaffBasicInfo;
+	}
+
+	@ExcelField(title="状态", align=2, sort=18)
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+	
+}

+ 702 - 0
src/main/java/com/jeeplus/modules/workleave/service/WorkLeaveService.java

@@ -0,0 +1,702 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workleave.service;
+
+import com.google.common.collect.Maps;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.MenuStatusEnum;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.act.utils.ActUtils;
+import com.jeeplus.modules.leaveapply.service.LeaveApplyService;
+import com.jeeplus.modules.serialnum.service.SerialNumTplService;
+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.workactivity.dao.WorkActivityProcessDao;
+import com.jeeplus.modules.workactivity.entity.Activity;
+import com.jeeplus.modules.workactivity.entity.WorkActivityProcess;
+import com.jeeplus.modules.workactivity.service.ActivityService;
+import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
+import com.jeeplus.modules.workactivitymenu.entity.WorkActivityMenu;
+import com.jeeplus.modules.workactivitymenu.service.WorkActivityMenuService;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workfield.service.WorkFieldService;
+import com.jeeplus.modules.workleave.dao.WorkLeaveDao;
+import com.jeeplus.modules.workleave.entity.WorkLeave;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import com.jeeplus.modules.workstaff.dao.WorkStaffAchivesDao;
+import org.activiti.engine.ActivitiObjectNotFoundException;
+import org.activiti.engine.IdentityService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@Service
+@Transactional(readOnly = true)
+public class WorkLeaveService extends CrudService<WorkLeaveDao, WorkLeave> {
+	@Autowired
+	private IdentityService identityService;
+	@Autowired
+	private WorkActivityMenuService workActivityMenuService;
+	@Autowired
+	private WorkProjectNotifyService workProjectNotifyService;
+	@Autowired
+	private SerialNumTplService serialNumTplService;
+
+	@Autowired
+	private RuntimeService runtimeService;
+	@Autowired
+	private OfficeService officeService;
+	@Autowired
+	private WorkActivityProcessService workActivityProcessService;
+	@Autowired
+	private ActTaskService actTaskService;
+	@Autowired
+	private WorkFieldService workFieldService;
+	@Autowired
+	private ActivityService activityService;
+	@Autowired
+	private LeaveApplyService leaveApplyService;
+	@Autowired
+	private WorkActivityProcessDao workActivityProcessDao;
+	@Autowired
+	private WorkStaffAchivesDao workStaffAchivesDao;
+	@Autowired
+	private WorkLeaveDao workLeaveDao;
+	@Autowired
+	private WorkClientAttachmentDao workClientAttachmentDao;
+
+	public WorkLeave get(String id) {
+		WorkLeave workLeave = super.get(id);
+		if(workLeave!=null){
+			//附件
+			WorkClientAttachment workClientAttachment = new WorkClientAttachment();
+			workClientAttachment.setAttachmentId(id);
+			workClientAttachment.setAttachmentFlag("99");
+			workLeave.setWorkAttachments(workClientAttachmentDao.findList(workClientAttachment));
+		}
+		return workLeave;
+	}
+	public WorkLeave getByStaffIdAndTime(String staffId, String time) {
+		WorkLeave workLeave = dao.getByStaffIdAndTime(staffId, time);
+		return workLeave;
+	}
+
+	public List<WorkLeave> findList(WorkLeave workLeave) {
+		return super.findList(workLeave);
+	}
+	
+	public Page<WorkLeave> findPage(Page<WorkLeave> page, WorkLeave workLeave) {
+		workLeave.getSqlMap().put("dsf", dataScopeFilter(workLeave.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_OVERTIME.getValue()));
+		workLeave.setPage(page);
+		page.setList(findList(workLeave));
+		return page;
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(WorkLeave workLeave) {
+		super.save(workLeave);
+		updateInfo(workLeave);
+	}
+	@Transactional(readOnly = false)
+	public void updateInfo(WorkLeave workLeave) {
+		//附件信息
+		for (WorkClientAttachment workClientAttachment : workLeave.getWorkAttachments()) {
+			if (workClientAttachment.getId() == null) {
+				continue;
+			}
+			if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())) {
+				workClientAttachment.setAttachmentId(workLeave.getId());
+				workClientAttachment.setAttachmentFlag("99");
+				workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
+				if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())) {
+					workClientAttachment.preInsert();
+					workClientAttachmentDao.insert(workClientAttachment);
+				} else {
+					workClientAttachment.preUpdate();
+					workClientAttachmentDao.update(workClientAttachment);
+				}
+			} else {
+				workClientAttachmentDao.delete(workClientAttachment);
+			}
+		}
+	}
+	/**
+	 * 提交存储
+	 * @param
+	 * @param variables
+	 */
+	@Transactional(readOnly = false)
+	public String save(WorkLeave workLeave, Map<String, Object> variables, String processInstanceId) {
+		User user = UserUtils.getUser();
+		if (StringUtils.isBlank(workLeave.getNum())) {
+			workLeave.setNum(serialNumTplService.genSerialNum(user.getCompany(), "20"));
+
+		}
+		workLeave.setName(user.getName());
+		super.save(workLeave);
+		Office office = officeService.get(workLeave.getOfficeId());
+		String str =  "申请编号:"+workLeave.getNum()+",所属部门:"+office.getName();
+		String title = "申请人:"+user.getName();
+		updateInfo(workLeave);
+		// 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中
+		identityService.setAuthenticatedUserId(user.getId());
+		// 启动流程
+		String businessKey = workLeave.getId().toString();
+		WorkActivityMenu workActivityMenu = workActivityMenuService.findByParentAndOffice("zzsql3125f1f194clzsqasdfiiii75904", office);
+		// 启动流程
+		String processType = workActivityMenu.getProcessType();
+		StringBuffer buffer = new StringBuffer();
+		Activity activity = new Activity();
+		WorkProjectNotify workProjectNotify = UtilNotify
+				.saveNotify(workLeave.getId(),
+						null,
+						workLeave.getCompanyId(),
+						title,
+						str,
+						"102",
+						"0",
+						"待审批",
+						""
+				);
+		List<User> users = new ArrayList<>();
+		List<User> bmzrs = UserUtils.getByRoleActivityEnname("bmzr",2,office.getId(),"25",workLeave.getCreateBy());
+        List<User> fgldList = UserUtils.getByRoleActivityEnname("fzjl",3,office.getId(),"25",workLeave.getCreateBy());
+        List<User> zjlList = UserUtils.getByRoleActivityEnname("zjl",3,office.getId(),"25",workLeave.getCreateBy());
+		if (StringUtils.isNotBlank(workActivityMenu.getId())) {
+			workProjectNotify.setNotifyRole("");
+			workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
+			List<Activity> activities = workActivityMenu.getActivities();
+			for (Activity a : activities) {
+				String encount = a.getEncount();
+				String enlist = a.getEnlist();
+				if (a.getRole()!=null && StringUtils.isNotBlank(a.getRole().getEnname())){
+					List enusers = UserUtils.getByRoleActivityEnnames(a.getRole().getEnname(),office.getId(),"19",workLeave.getCreateBy());
+					if (enusers.size()==0){
+						workLeave.setStatus("1");
+						super.save(workLeave);
+						return "流程审批人不能为空,角色"+a.getRole().getName()+"下无用户,请联系管理员!";
+					}
+					variables.put(enlist, enusers);
+					variables.put(encount, enusers.size());
+				}
+				if (a.getDelFlag().equals("0") && a.getCount() == 1) {
+					activity = a;
+				}
+			}
+			buffer.append(activity.getRole().getEnname());
+			if (activity != null && StringUtils.isNotBlank(activity.getId())) {
+				//角色审批
+				if (StringUtils.isNotBlank(activity.getRole().getEnname())) {
+					users = UserUtils.getByRoleActivityEnnames(activity.getRole().getEnname(),office.getId(),"25",workLeave.getCreateBy());
+				}
+				//人员审批
+				if (StringUtils.isNotBlank(activity.getUser().getId())) {
+					users.add(activity.getUser());
+				}
+			}
+			workProjectNotify.setId("");
+		} else {
+			variables.put("bmzrList", bmzrs);
+			if (bmzrs.size()==0 ){
+				workLeave.setStatus("1");
+				super.save(workLeave);
+			}
+			if (bmzrs.size()==0){
+				return "流程审批人不能为空,角色部门负责人下无用户,请联系管理员!";
+			}
+			variables.put("bmzrCount",bmzrs.size());
+			processType = "workLeave";
+			users.addAll(bmzrs);
+		}
+		for (User u : users){
+			workProjectNotify.setUser(u);
+			workProjectNotify.setId("");
+			workProjectNotify.setNotifyRole("部门负责人审批");
+			workProjectNotifyService
+					.save(workProjectNotify);
+			Map<String,Object> extras = new HashMap<>();
+			extras.put("type","7002");
+			extras.put("id",workProjectNotify.getId());
+			extras.put("procDefKey","102");
+			UserUtils.pushInfoToApp(title,str,extras,u.getId());
+			UserUtils.pushIm(u.getId(),str);
+		}
+		variables.put("type", processType);
+		variables.put("busId", businessKey);
+		variables.put("title", "审批单:" + workLeave.getNum());//设置标题;
+
+		ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processType, businessKey, variables);
+		workLeave.setProcessInstance(processInstance);
+		if (StringUtils.isNotBlank(processInstanceId)) {
+			workActivityProcessService.updateProcessInstanceId(processInstance.getId(),processInstanceId);
+			workActivityProcessService.deleteProcessInstanceId(processInstanceId);
+			workActivityProcessService.deleteProcessIdAuditUsers(processInstanceId);
+		}
+		// 更新流程实例ID
+		workLeave.setProcessInstanceId(processInstance.getId());
+		workLeaveDao.updateProcessInstanceId(workLeave);
+		List<Activity> list = workActivityMenu.getActivities();
+		if (list != null && list.size() != 0) {
+			workActivityProcessService.saveList(list, processInstance.getId());
+		} else {
+			WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+			workActivityProcess.setProcessKey("workLeave");
+			workActivityProcess.setCount(1);
+			workActivityProcess.setProcessInstanceId(processInstance.getId());
+			workActivityProcess.setIsApproval("0");
+			workActivityProcessService.save(workActivityProcess);
+            workActivityProcess.setCount(2);
+            workActivityProcessService.insert(workActivityProcess);
+            workActivityProcess.setCount(3);
+            workActivityProcessService.insert(workActivityProcess);
+			workActivityProcessService.insertAuditsByType(bmzrs,processInstance.getId(),1,1);
+            workActivityProcessService.insertAuditsByType(fgldList,processInstance.getId(),2,0);
+            workActivityProcessService.insertAuditsByType(zjlList,processInstance.getId(),3,0);
+		}
+		logger.debug("start process of {key={}, bkey={}, pid={}, variables={}}", new Object[]{
+				ActUtils.PD_REIMBURSEMENT[0], businessKey, processInstance.getId(), variables});
+		return "";
+	}
+
+	@Transactional(readOnly = false)
+	public void delete(WorkLeave workLeave) {
+		super.delete(workLeave);
+		WorkProjectNotify notify = new WorkProjectNotify();
+		notify.setNotifyId(workLeave.getId());
+		List<User> users = workProjectNotifyService.readByNotifyId(notify);
+		if (users!=null && users.size()!=0){
+			for (User user:users){
+				UserUtils.pushMeIm(user.getId());
+			}
+		}
+	}
+
+	/**
+	 * 审核流程
+	 * @param
+	 */
+	@Transactional(readOnly = false)
+	public String auditSave(WorkLeave workLeave, List<User> auditUsers) {
+		String userName = UserUtils.get(workLeave.getCreateBy().getId()).getName();
+		Office office = officeService.get(workLeave.getOfficeId());
+		String title = "申请人:"+userName;
+		String str  =  "出差申请编号:"+workLeave.getNum()+",所属部门:"+office.getName();
+		// 对不同环节的业务逻辑进行操作
+		String taskDefKey = workLeave.getAct().getTaskDefKey();
+		if (!"modifyApply".equals(taskDefKey)) {
+			actTaskService.claim(workLeave.getAct().getTaskId(), UserUtils.getUser().getId());
+		}else{
+			workLeave.getAct().setFlag("yes");
+			updateInfo(workLeave);
+		}
+		String comment = "";
+		if (workLeave.getStatus().equals("4")){
+			comment = ("yes".equals(workLeave.getAct().getFlag())?"[重新申请] ":"[已撤销] ");
+		}else {
+			comment = ("yes".equals(workLeave.getAct().getFlag())?"[同意] ":"[驳回] ")+workLeave.getAct().getComment();
+		}
+		//yes 的时候状态为审核通过 否则为未通过
+		//1 审核中 2 未通过
+		workLeave.setStatus(("yes".equals(workLeave.getAct().getFlag()) ? "2" : "4"));
+		Map<String, Object> vars = Maps.newHashMap();
+		//业务逻辑对应的条件表达式
+		String exp = "";
+		String taskCount = "";
+		String notifyRole = "";
+		int key = 0;
+		String enname = "";
+		List<Activity> activitieList = activityService.getByProcessInstanceId(workLeave.getProcessInstanceId());
+		WorkActivityMenu workActivityMenu = new WorkActivityMenu();
+		if (activitieList != null && activitieList.size() != 0) {
+			workActivityMenu.setProcessType(activitieList.get(0).getProcessKey());
+			workActivityMenu.setActivities(activitieList);
+		}
+
+		WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+		WorkActivityProcess selectProcess = new WorkActivityProcess();
+		selectProcess.setProcessInstanceId(workLeave.getProcessInstanceId());
+		List<WorkActivityProcess> workActivityProcesses = workActivityProcessService.findList(selectProcess);
+		List<Activity> activities = workActivityMenu.getActivities();
+		if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("workLeave")) {
+			key = 1;
+			for (int i = 0; i < workActivityProcesses.size(); i++) {
+				WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+				if (taskDefKey.equals(activityProcess.getActivityTask()) && !taskDefKey.equals("modifyApply")) {
+					taskCount = activityProcess.getCount()+"";
+					workActivityProcess = activityProcess;
+					if (!workActivityProcess.getIsApproval().equals("0")) {
+						workActivityProcess.setId("");
+					}
+					exp = "pass";
+					if (!"yes".equals(workLeave.getAct().getFlag())) {
+						workLeave.setStatus("4");
+						workActivityProcess.setIsApproval("2");
+						String returnBack = "-1";
+						for (Activity activity : activities) {
+							if (activity.getCount() == activityProcess.getCount()) {
+								returnBack = activity.getReturnBack();
+								notifyRole = activity.getName();
+								break;
+							}
+						}
+						if (returnBack.equals("0")) {
+							workActivityProcess.setId("");
+						}
+
+					} else {
+						workActivityProcess.setIsApproval("1");
+					}
+				}else if(taskDefKey.equals("modifyApply")){
+					notifyRole = "调整申请";
+					taskCount = "0";
+					exp = "pass";
+					workActivityProcess.setId("");
+					workActivityProcess.setCount(0);
+					if (!"yes".equals(workLeave.getAct().getFlag())) {
+						workLeave.setStatus("3");
+						workActivityProcess.setIsApproval("2");
+					} else {
+						workActivityProcess.setIsApproval("1");
+					}
+					break;
+				}
+			}
+		} else {
+			workActivityMenu.setProcessType("workLeave");
+			for (int i = 0; i < workActivityProcesses.size(); i++) {
+				WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+				String count = activityProcess.getCount() + "";
+				workActivityProcess = activityProcess;
+				if (!workActivityProcess.getIsApproval().equals("0")) {
+					workActivityProcess.setId("");
+				}
+				// 审核环节
+				if ("bmzr".equals(taskDefKey) && count.contains("1")) {
+					taskCount = "1";
+					exp = "pass";
+					if ("yes".equals(workLeave.getAct().getFlag())) {
+                        vars.put("fgldList", auditUsers);
+                        vars.put("fgldCount",auditUsers.size());
+                        workActivityProcessService.insertAuditsByType(auditUsers,workLeave.getProcessInstanceId(),2,1);
+
+                        notifyRole = "副经理审核";
+                        workActivityProcess.setIsApproval("1");
+                        enname = "fgld";
+                    } else {
+                        notifyRole = "调整申请";
+                        workActivityProcess.setIsApproval("2");
+                    }
+                    break;
+				}else if ("fgld".equals(taskDefKey) && count.contains("2")) {
+                    taskCount = "2";
+                    exp = "pass";
+                    if ("yes".equals(workLeave.getAct().getFlag())) {
+                        vars.put("zjlList", auditUsers);
+                        vars.put("zjlCount",auditUsers.size());
+                        workActivityProcessService.insertAuditsByType(auditUsers,workLeave.getProcessInstanceId(),3,1);
+                        notifyRole = "总经理审核";
+                        workActivityProcess.setIsApproval("1");
+                        enname = "zjl";
+                    } else {
+                        notifyRole = "调整申请";
+                        workActivityProcess.setIsApproval("2");
+                    }
+                    break;
+                }
+             else if ("zjl".equals(taskDefKey) && count.contains("3")) {
+                taskCount = "3";
+                exp = "pass";
+                if ("yes".equals(workLeave.getAct().getFlag())) {
+                    notifyRole = "审批通过";
+                    workActivityProcess.setIsApproval("1");
+                } else {
+                    notifyRole = "调整申请";
+                    workActivityProcess.setIsApproval("2");
+                }
+                break;
+              } else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
+					taskCount = "0";
+					notifyRole = "部门负责人审批";
+					exp = "pass";
+					workActivityProcess.setCount(0);
+					enname = "bmzr";
+					if (!"yes".equals(workLeave.getAct().getFlag())) {
+						workLeave.setStatus("3");
+					}
+					break;
+				}
+
+			}
+		}
+		// 设置意见
+		workLeave.getAct().setComment(("yes".equals(workLeave.getAct().getFlag()) ? "[同意] " : "[驳回] ") + workLeave.getAct().getComment());
+		workLeave.preUpdate();
+		// 提交流程任务
+		vars.put(exp, "yes".equals(workLeave.getAct().getFlag()) ? true : false);
+		vars.put("passs", true);
+		workActivityProcessService.updateProcess(workActivityProcess,workActivityMenu,key,taskCount,workLeave.getProcessInstanceId(),taskDefKey,"modifyApply",workLeave.getAct().getFlag(),comment, activities);
+		// 提交流程任务
+		actTaskService.complete(workLeave.getAct().getTaskId(), workLeave.getAct().getProcInsId(), workLeave.getAct().getComment(), vars);
+		boolean state = actTaskService.isProcessEnd(workLeave.getAct().getProcInsId());
+		List<User> users = new ArrayList<>();
+		List<User> userList = new ArrayList<>();
+		if (!state) {
+			users.add(workLeave.getCreateBy());
+			if ("yes".equals(workLeave.getAct().getFlag())) {
+				workLeave.setStatus("5");
+				WorkProjectNotify notify = new WorkProjectNotify();
+				notify.setNotifyId(workLeave.getId());
+				userList = workProjectNotifyService.readByNotifyId(notify);
+				workProjectNotifyService
+						.save(UtilNotify
+								.saveNotify(workLeave.getId(),
+										workLeave.getCreateBy(),
+										workLeave.getCompanyId(),
+										title,
+										str,
+										"102",
+										"0",
+										"待通知",
+										notifyRole));
+
+			} else {
+				WorkProjectNotify notify = new WorkProjectNotify();
+				notify.setNotifyId(workLeave.getId());
+				userList = workProjectNotifyService.readByNotifyId(notify);
+				if (StringUtils.isNotBlank(workLeave.getStatus()) && !workLeave.getStatus().equals("3")){
+					workLeave.setStatus("4");
+					workProjectNotifyService
+							.save(UtilNotify
+									.saveNotify(workLeave.getId(),
+											workLeave.getCreateBy(),
+											workLeave.getCompanyId(),
+											title,
+											str,
+											"102",
+											"0",
+											"待通知",
+											notifyRole));
+				}
+			}
+			workActivityProcessService.deleteProcessIdAuditUsers(workLeave.getProcessInstanceId());
+		} else {
+			if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("workLeave")) {
+				WorkProjectNotify notify = new WorkProjectNotify();
+				notify.setNotifyId(workLeave.getId());
+				userList = workProjectNotifyService.readByNotifyId(notify);
+				//users.addAll(userList);
+				WorkProjectNotify workProjectNotify = UtilNotify
+						.saveNotify(workLeave.getId(),
+								new User(),
+								workLeave.getCompanyId(),
+								title,
+								str,
+								"102",
+								"0",
+								"待审批",
+								notifyRole);
+				List<WorkProjectNotify> workProjectNotifys = activityService.getByFlagAndTaskDefKeyList(
+						activities,
+						workProjectNotify,
+						taskDefKey,
+						workLeave.getAct().getFlag(),
+						taskCount,
+						workLeave.getCreateBy(),
+						workLeave.getOfficeId(),
+						"19");
+				for (WorkProjectNotify workProjectNotify1:workProjectNotifys){
+					users.add(workProjectNotify1.getUser());
+					workProjectNotify1.setId("");
+					workProjectNotify1.setIsNewRecord(false);
+					workProjectNotifyService
+							.save(workProjectNotify1);
+					if (!"modifyApply".equals(taskDefKey)){
+						Map<String,Object> extras = new HashMap<>();
+						extras.put("type","7002");
+						extras.put("id",workProjectNotify.getId());
+						extras.put("procDefKey","102");
+						UserUtils.pushInfoToApp(title,str,extras,workProjectNotify1.getUser().getId());
+
+					}
+				}
+
+			} else {
+				if (!"yes".equals(workLeave.getAct().getFlag())) {
+					WorkProjectNotify notify = new WorkProjectNotify();
+					notify.setNotifyId(workLeave.getId());
+					userList = workProjectNotifyService.readByNotifyId(notify);
+					//users.addAll(userList);
+					workProjectNotifyService
+							.save(UtilNotify
+									.saveNotify(workLeave.getId(),
+											workLeave.getCreateBy(),
+											workLeave.getCompanyId(),
+											title,
+											str,
+											"102",
+											"0",
+											"重新申请",
+											notifyRole));
+					users.add( workLeave.getCreateBy());
+				} else {
+					if (StringUtils.isNotBlank(enname)) {
+						WorkProjectNotify notify = new WorkProjectNotify();
+						notify.setNotifyId(workLeave.getId());
+						userList = workProjectNotifyService.readByNotifyId(notify);
+						//users.addAll(userList1);
+						WorkProjectNotify workProjectNotify = UtilNotify
+								.saveNotify(workLeave.getId(),
+										new User(),
+										workLeave.getCompanyId(),
+										title,
+										str,
+										"102",
+										"0",
+										"待审批",
+										notifyRole);
+						users.addAll(auditUsers);
+						for (User user1:auditUsers){
+							workProjectNotify.setId("");
+							workProjectNotify.setUser(user1);
+							workProjectNotify.setIsNewRecord(false);
+							workProjectNotifyService
+									.save(workProjectNotify);
+							if (!"modifyApply".equals(taskDefKey)){
+								Map<String,Object> extras = new HashMap<>();
+								extras.put("type","7002");
+								extras.put("id",workProjectNotify.getId());
+								extras.put("procDefKey","102");
+								UserUtils.pushInfoToApp(title,str,extras,user1.getId());
+
+							}
+						}
+					}else {
+						WorkProjectNotify notify = new WorkProjectNotify();
+						notify.setNotifyId(workLeave.getId());
+						userList = workProjectNotifyService.readByNotifyId(notify);
+						users.addAll(userList);
+						users.add(workLeave.getCreateBy());
+						workProjectNotifyService
+								.save(UtilNotify
+										.saveNotify(workLeave.getId(),
+												workLeave.getCreateBy(),
+												workLeave.getCompanyId(),
+												title,
+												str,
+												"102",
+												"0",
+												"重新申请",
+												notifyRole));
+					}
+				}
+			}
+		}
+		if (users!=null && users.size()!=0) {
+			for (User u : users) {
+				UserUtils.pushIm(u.getId(),str);
+			}
+		}
+		if (userList!=null && userList.size()!=0) {
+			for (User u : userList) {
+				UserUtils.pushMeIm(u.getId());
+			}
+		}
+
+		workLeaveDao.update(workLeave);
+		return "保存审核意见成功!";
+	}
+
+	/**
+	 * 获取流程详细信息
+	 * @param processInstanceId
+	 */
+	@SuppressWarnings("unchecked")
+	public WorkLeave getByProcessInstanceId(String processInstanceId) {
+		WorkLeave workLeave = workLeaveDao.getByProcessInstanceId(processInstanceId);
+		return workLeave;
+	}
+
+	/**
+	 * 强制撤销
+	 * @param
+	 */
+	@Transactional(readOnly = false)
+	public void cancelInvalidate(WorkLeave workLeave) {
+		String invalidateProcessInstanceId = workLeave.getProcessInstanceId();
+		try {
+			//将流程图中尚未走到的task的流程追踪信息逻辑删除,添加一条"撤销"流程追踪信息
+			WorkActivityProcess process = new WorkActivityProcess();
+			process.setProcessInstanceId(workLeave.getProcessInstanceId());
+			process.setIsApproval("0");
+			WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+			workActivityProcess.setProcessInstanceId(workLeave.getProcessInstanceId());
+			List<WorkActivityProcess> processList = workActivityProcessService.findList(workActivityProcess);
+			WorkProjectNotify notify = new WorkProjectNotify();
+			notify.setNotifyId(workLeave.getId());
+			List<User> userList = workProjectNotifyService.readByNotifyId(notify);
+			if (userList!=null && userList.size()!=0) {
+				for (User u : userList) {
+					User user = UserUtils.get(u.getId());
+					/*List<WebSocket> toUserConns = ChatServerPool.getWebSocketByUser(u.getId());
+					for (WebSocket toUserConn : toUserConns) {
+						String message = "{\"to\":\""+u.getId()+"\"," +
+								"\"msg\":\"审批信息 归档申请人:"+ user.getName()+",归档编号:"+workContractRecord.getRecordNum()+" 强制撤销!\"," +
+								"\"useType\":\"sys\"}";
+						ChatServerPool.sendMessageToUser(toUserConn, message);//同时向本人发送消息
+					}*/
+					UserUtils.pushIm(u.getId(),"申请人:"+ user.getName()+",申请编号:"+workLeave.getNum()+" 强制撤销!");
+
+				}
+			}
+			if(processList!=null && processList.size()>0){
+				for (int i =0;i<processList.size();i++) {
+					WorkActivityProcess p = processList.get(i);
+					if(StringUtils.isNotBlank(p.getIsApproval()) && "0".equals(p.getIsApproval())){
+						p.setDelFlag("1");
+						p.setIsApproval("-1");
+						workActivityProcessDao.updateDelFlagAndIsApproval(p);
+					}
+				}
+				WorkActivityProcess pro = new WorkActivityProcess();
+				pro.setId("");
+				pro.preInsert();
+				pro.setDelFlag("0");
+				pro.setRemarks("[强制撤销]");
+				pro.setProcessKey(processList.get(0).getProcessKey());
+				pro.setIsApproval("1");
+				pro.setProcessInstanceId(processList.get(0).getProcessInstanceId());
+				pro.setCount(0);
+				workActivityProcessDao.insert(pro);
+			}
+
+			//结束该流程,设为"撤销"状态
+			actTaskService.endProcessInstance(invalidateProcessInstanceId,"申请-强制撤销");
+			workLeave.setStatus("3");
+			workLeave.preUpdate();
+			workLeaveDao.update(workLeave);
+
+		}catch (ActivitiObjectNotFoundException e){
+			System.err.println("撤销异常,因为这个流程已不存在!");
+			e.printStackTrace();
+		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+}

+ 292 - 0
src/main/java/com/jeeplus/modules/workleave/web/WorkLeaveController.java

@@ -0,0 +1,292 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workleave.web;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+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.sysmtree.service.SysMtreeService;
+import com.jeeplus.modules.workactivity.service.ActivityService;
+import com.jeeplus.modules.workleave.entity.WorkLeave;
+import com.jeeplus.modules.workleave.service.WorkLeaveService;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
+import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.TaskService;
+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.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+/**
+ *请假
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/workleave/workLeave")
+public class WorkLeaveController extends BaseController {
+
+	@Autowired
+	protected RuntimeService runtimeService;
+
+	@Autowired
+	protected TaskService taskService;
+
+	@Autowired
+	private ActTaskService actTaskService;
+
+	@Autowired
+	private HttpServletRequest request;
+
+	@Autowired
+	private SysMtreeService sysMtreeService;
+	@Autowired
+	private ActivityService activityService;
+	@Autowired
+	private OfficeService officeService;
+
+	@Autowired
+	private WorkLeaveService workLeaveService;
+
+	@Autowired
+	private WorkStaffBasicInfoService workStaffBasicInfoService;
+	
+	@ModelAttribute
+	public WorkLeave get(@RequestParam(required=false) String id) {
+		WorkLeave entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = workLeaveService.get(id);
+		}
+		if (entity == null){
+			entity = new WorkLeave();
+		}
+		return entity;
+	}
+	
+	/**
+	 * 申请列表页面
+	 */
+	@RequiresPermissions("workleave:workLeave:list")
+	@RequestMapping(value = {"list", ""})
+	public String list(WorkLeave workLeave, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<WorkLeave> page = workLeaveService.findPage(new Page<WorkLeave>(request, response), workLeave);
+		model.addAttribute("page", page);
+		return "modules/workleave/workLeaveList";
+	}
+
+	/**
+	 * 查看,增加,编辑申请表单页面
+	 */
+	//@RequiresPermissions(value={"workLeave:workLeave:view","workLeave:workLeave:add","workLeave:workLeave:edit"},logical=Logical.OR)
+	@RequestMapping(value = "form")
+	public String form(WorkLeave workLeave, Model model) {
+		String view = "workLeaveForm";
+		Office office = UserUtils.getSelectOffice();
+		String tabId = request.getParameter("tabId");
+		if("1".equals(tabId)){
+			view = "workLeaveView";
+		}else if("3".equals(tabId)){
+			ProcessInstance processInstance = actTaskService.getProcIns(workLeave.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);
+				workLeave.setAct(act);
+				view = "workLeaveModify";
+			}
+		}
+		// 环节编号
+		String taskDefKey = workLeave.getAct().getTaskDefKey();
+		if (StringUtils.isNotBlank(taskDefKey) && ("bmzr".equals(taskDefKey))){
+			view = "workLeaveAudit";
+		}
+		if(StringUtils.isBlank(workLeave.getId())){
+			workLeave.setName(UserUtils.getUser().getName());
+			WorkStaffBasicInfo workStaffBasicInfo = new WorkStaffBasicInfo();
+			workStaffBasicInfo.setUserId(UserUtils.getUser().getId());
+			workStaffBasicInfo.setOffice(UserUtils.getSelectOffice());
+			workStaffBasicInfo = workStaffBasicInfoService.getByUserOffice(workStaffBasicInfo);
+			workLeave.setWorkStaffBasicInfo(workStaffBasicInfo);
+		}
+		model.addAttribute("workLeave", workLeave);
+		return "modules/workleave/"+view;
+	}
+	/**
+	 * 暂存
+	 */
+	@RequestMapping(value = "store")
+	public String store(WorkLeave workLeave,
+                        Model model,
+                        RedirectAttributes redirectAttributes) throws Exception{
+		if (!beanValidator(model, workLeave)){
+			return form(workLeave, model);
+		}
+		User user = workLeave.getCreateBy();
+		String submitter = "";
+		if(user != null){
+			submitter = user.getId();
+		}
+		String sta = workLeave.getStatus();
+		if(!UserUtils.getUser().getId().equals(submitter) && !Strings.isNullOrEmpty(submitter) && sta != null){
+			addMessage(redirectAttributes, "您不是申请人,无法修改");
+			return "redirect:"+ Global.getAdminPath()+"/workleave/workLeave/?repage";
+		}
+		workLeave.setStatus("1"); //暂存状态
+		workLeave.setCompanyId(UserUtils.getSelectCompany().getId());
+		workLeave.setOfficeId(UserUtils.getSelectOffice().getId());
+		if (StringUtils.isNotBlank(workLeave.getProcessInstanceId()) && workLeave.getProcessInstanceId().equals("NULL")){
+			workLeave.setProcessInstanceId("");
+		}
+		if(!workLeave.getIsNewRecord()){//编辑表单保存
+			WorkLeave t = workLeaveService.get(workLeave.getId());//从数据库取出记录的值
+			MyBeanUtils.copyBeanNotNull2Bean(workLeave, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+			workLeaveService.save(t);//保存
+		}else{//新增表单保存
+			workLeaveService.save(workLeave);//保存
+		}
+		addMessage(redirectAttributes, "保存成功");
+		return "redirect:"+ Global.getAdminPath()+"/workleave/workLeave/?repage";
+	}
+	/**
+	 * 保存申请
+	 */
+	@RequiresPermissions(value={"workleave:workLeave:add","workleave:workLeave:edit"},logical=Logical.OR)
+	@RequestMapping(value = "save")
+	public String save(WorkLeave workLeave, Model model, RedirectAttributes redirectAttributes) throws Exception{
+		if (!beanValidator(model, workLeave)){
+			return form(workLeave, model);
+		}
+		User user = workLeave.getCreateBy();
+		String sta = workLeave.getStatus();
+		if(user!=null && !UserUtils.getUser().getId().equals(user.getId()) && StringUtils.isNotBlank(user.getId())){
+			addMessage(redirectAttributes, "您不是申请人,无法修改");
+			return "redirect:"+ Global.getAdminPath()+"/workleave/workLeave/?repage";
+		}
+		//状态设置为审核中
+		workLeave.setStatus("2");
+		String processInstanceId ="";
+		if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
+			processInstanceId = workLeaveService.get(workLeave.getId()).getProcessInstanceId();
+		}
+//		try {
+			Map<String, Object> variables = Maps.newHashMap();
+			workLeave.setCompanyId(UserUtils.getSelectCompany().getId());
+			workLeave.setOfficeId(UserUtils.getSelectOffice().getId());
+			String str = workLeaveService.save(workLeave, variables,processInstanceId);
+			if (StringUtils.isNotBlank(str)){
+				addMessage(redirectAttributes, "申请提交失败:"+str);
+			}else {
+				addMessage(redirectAttributes, "申请已经提交");
+			}
+
+//		} catch (Exception e) {
+//			addMessage(redirectAttributes, "申请提交失败!");
+//			addMessage(redirectAttributes, "系统内部错误");
+//		}
+		return "redirect:"+ Global.getAdminPath()+"/workleave/workLeave/?repage";
+	}
+	/**
+	 * 工单执行(完成任务)
+	 * @param model
+	 * @return
+	 */
+	@RequestMapping(value = "saveAudit")
+	public String saveAudit(WorkLeave workLeave, Model model,
+                            RedirectAttributes redirectAttributes) {
+		try {
+            // 对不同环节的业务逻辑进行操作
+            String taskDefKey = workLeave.getAct().getTaskDefKey();
+            List<User> users = null;
+            if ("bmzr".equals(taskDefKey)){
+                users = UserUtils.getByProssType(workLeave.getProcessInstanceId(),2);
+                if (users==null )
+                    users = UserUtils.getByRoleActivityEnname("fzjl",3,workLeave.getOfficeId(),"25",workLeave.getCreateBy());
+            }else  if ("fgld".equals(taskDefKey)){
+                users = UserUtils.getByProssType(workLeave.getProcessInstanceId(),3);
+                if (users==null )
+                    users = UserUtils.getByRoleActivityEnname("zjl", 3, workLeave.getOfficeId(), "25", workLeave.getCreateBy());
+            }else  if ("zjl".equals(taskDefKey)){
+                users = UserUtils.getByProssType(workLeave.getProcessInstanceId(),3);
+                if (users==null )
+                    users = UserUtils.getByRoleActivityEnname("zjl", 3, workLeave.getOfficeId(), "25", workLeave.getCreateBy());
+            }else if ("modifyApply".equals(taskDefKey)){
+                users = UserUtils.getByProssType(workLeave.getProcessInstanceId(),1);
+                if (users==null )
+                    users = UserUtils.getByRoleActivityEnname("bmzr",3,workLeave.getOfficeId(),"25",workLeave.getCreateBy());
+            }
+            if (users==null || (users==null || users.size()==0)){
+                addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+            }else {
+                String str = workLeaveService.auditSave(workLeave,users);
+                addMessage(redirectAttributes, str);
+            }
+		}catch (Exception e){
+			addMessage(redirectAttributes, "审批失败");
+		}
+
+		if (StringUtils.isNotBlank(workLeave.getHome()) && "home".equals(workLeave.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/home/?repage";
+		}else {
+			return "redirect:"+ Global.getAdminPath()+"/workleave/workLeave/?repage";
+		}
+	}
+	/**
+	 * 删除加班申请
+	 */
+	@RequiresPermissions("workleave:workLeave:del")
+	@RequestMapping(value = "delete")
+	public String delete(WorkLeave workLeave, RedirectAttributes redirectAttributes) {
+		workLeaveService.delete(workLeave);
+		addMessage(redirectAttributes, "删除申请成功");
+		return "redirect:"+ Global.getAdminPath()+"/workleave/workLeave/?repage";
+	}
+	
+
+
+	/**
+	 * 强制撤销
+	 */
+	@RequestMapping("cancelInvalidate")
+	public String cancelInvalidate(WorkLeave workLeave, RedirectAttributes redirectAttributes){
+		workLeaveService.cancelInvalidate(workLeave);
+		return "redirect:"+ Global.getAdminPath()+"/workleave/workLeave/?repage";
+	}
+	/**
+	 * 读取单个实体流程
+	 * @return
+	 */
+	@RequestMapping(value = "getProcessOne")
+	public String getProcessOne(WorkLeave workLeave, Model model) {
+		model.addAttribute("processInstanceId", workLeave.getProcessInstanceId());
+		return "modules/workleave/workTrack";
+	}
+	
+
+}

+ 19 - 3
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -138,6 +138,8 @@ import com.jeeplus.modules.workitemcollar.entity.WorkItemCollarItem;
 import com.jeeplus.modules.workitemcollar.service.WorkItemCollarService;
 import com.jeeplus.modules.workitemstock.entity.WorkItemStock;
 import com.jeeplus.modules.workitemstock.service.WorkItemStockService;
+import com.jeeplus.modules.workleave.entity.WorkLeave;
+import com.jeeplus.modules.workleave.service.WorkLeaveService;
 import com.jeeplus.modules.workloan.entity.WorkLoan;
 import com.jeeplus.modules.workloan.service.WorkLoanService;
 import com.jeeplus.modules.workofficechange.entity.WorkOfficeChange;
@@ -415,6 +417,8 @@ public class WorkProjectNotifyController extends BaseController {
 	private WorkRepayService workRepayService;
 	@Autowired
 	private WorkContractReService workContractReService;
+	@Autowired
+	private WorkLeaveService workLeaveService;
 
 	@ModelAttribute
 	public WorkProjectNotify get(@RequestParam(required=false) String id) {
@@ -1441,7 +1445,19 @@ public class WorkProjectNotifyController extends BaseController {
 						return "modules/workstockcontract/workStockContractView";
 					}
 
-				} else if ("58".equals(workProjectNotify.getType())) {    //日常事务
+				} else if ("102".equals(workProjectNotify.getType())) {  //出差
+					WorkLeave workLeave = workLeaveService.get(workProjectNotify.getNotifyId());
+					workLeave.setHome("home");
+					workLeave.setAct(getByAct(workLeave.getProcessInstanceId()));
+					model.addAttribute("workLeave", workLeave);
+					if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						return "modules/workleave/workLeaveAudit";
+					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+						return "modules/workleave/workLeaveModify";
+					} else if (workProjectNotify.getRemarks().contains("待通知")) {
+						return "modules/workleave/workLeaveView";
+					}
+				}else if ("58".equals(workProjectNotify.getType())) {    //日常事务
 					if (workProjectNotify.getRemarks().contains("待处理") && !"1".equals(workProjectNotify.getStatus())) {
 						WorkDailyRoutineDetail workDailyRoutineDetail = workDailyRoutineDetailService.getByDailyId(workProjectNotify.getNotifyId());
 						workDailyRoutineDetail.setHome("home");
@@ -1793,10 +1809,10 @@ public class WorkProjectNotifyController extends BaseController {
 					workResignation.setHome("home");
 					model.addAttribute("workResignation", workResignation);
 					if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
-						if ("bmzr".equals(workResignation.getAct().getTaskDefKey()) || "fgld".equals(workResignation.getAct().getTaskDefKey()) ||"zjl".equals(workResignation.getAct().getTaskDefKey()) ) {
+						if ("bmzr".equals(workResignation.getAct().getTaskDefKey()) || "fgld".equals(workResignation.getAct().getTaskDefKey()) ||"zjl".equals(workResignation.getAct().getTaskDefKey())||"rlzy".equals(workResignation.getAct().getTaskDefKey() )) {
 							return "modules/workresignation/workResignationAudit";
 						} else {
-							if ("各级审批".equals(workProjectNotify.getNotifyRole())) {
+							if ("各级审批".equals(workProjectNotify.getNotifyRole())||"总经理审批".equals(workProjectNotify.getNotifyRole())) {
 								model.addAttribute("workResignation", workResignation);
 								return "modules/workresignation/workResignationAudits";
 							} else if ("人力专员审核".equals(workProjectNotify.getNotifyRole())) {

+ 43 - 29
src/main/java/com/jeeplus/modules/workregularapply/service/WorkRegularApplyService.java

@@ -123,7 +123,7 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 	public WorkRegularApply get(String id) {
 		return super.get(id);
 	}
-	
+
 	public List<WorkRegularApply> findList(WorkRegularApply workRegularApply) {
 
 		return super.findList(workRegularApply);
@@ -266,9 +266,9 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 
 			List<User> users = new ArrayList<>();
 			List<User> bmzrList = UserUtils.getByRoleActivityEnname("bmzr",2,applyOffice.getId(),"22",user);
-//			List<User> fgldList = UserUtils.getByRoleActivityEnname("fgld",2,applyOffice.getId(),"22",user);
+			List<User> fzjlList = UserUtils.getByRoleActivityEnname("fzjl",3,applyOffice.getId(),"22",user);
 			List<User> zjlList = UserUtils.getByRoleActivityEnname("zjl",3,applyOffice.getId(),"22",user);
-////			List<User> rlzyList = UserUtils.getByRoleActivityEnname("rlzy",3,applyOffice.getId(),"22",user);
+//			List<User> rlzyList = UserUtils.getByRoleActivityEnname("rlzy",3,applyOffice.getId(),"22",user);
 			if (StringUtils.isNotBlank(workActivityMenu.getId())) {
 				workProjectNotify.setNotifyRole("");
 				workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
@@ -310,7 +310,7 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 				}
 //				processType = "workPositive";
 				processType = "workPositive";
-				variables.put("bmzrCount",bmzrList.size());
+				variables.put("bmzrcount",bmzrList.size());
 				variables.put("bmzrList",bmzrList);
 				users.addAll(bmzrList);
 			}
@@ -353,15 +353,15 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 				workActivityProcessService.insert(workActivityProcess);
 				workActivityProcess.setCount(3);
 				workActivityProcessService.insert(workActivityProcess);
-//				workActivityProcess.setCount(4);
-//				workActivityProcessService.insert(workActivityProcess);
+				workActivityProcess.setCount(4);
+				workActivityProcessService.insert(workActivityProcess);
 //				workActivityProcess.setCount(5);
 //				workActivityProcessService.insert(workActivityProcess);
 //				workActivityProcessService.insertAuditsByType(zzr,processInstance.getId(),1,1);
 				workActivityProcessService.insertAuditsByType(bmzrList,processInstance.getId(),1,1);
 				workActivityProcessService.insertAuditsByType(fgldList,processInstance.getId(),2,0);
-				workActivityProcessService.insertAuditsByType(zjlList,processInstance.getId(),3,0);
-//				workActivityProcessService.insertAuditsByType(rlzyList,processInstance.getId(),5,0);
+				workActivityProcessService.insertAuditsByType(zjlList,processInstance.getId(),4,0);
+				workActivityProcessService.insertAuditsByType(fzjlList,processInstance.getId(),3,0);
 
 			}
 			workRegularApply.setProcessInstanceId(processInstance.getId());
@@ -400,7 +400,7 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 		}
 		String comment = "";
 		if (workRegularApply.getState().equals("4")){
-			comment = ("yes".equals(flag)?"[同意] ":"[已撤销] ");
+			comment = ("yes".equals(flag)?"[重新申请]":"[已撤销] ");
 		}else {
 			comment = ("yes".equals(flag)?"[同意] ":"[驳回] ")+act.getComment();
 		}
@@ -485,7 +485,7 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 					exp = "pass";
 					if ("yes".equals(workRegularApply.getAct().getFlag())) {
 						vars.put("fgldList", auditUsers);
-						vars.put("fgldCount",auditUsers.size());
+						vars.put("fgldcount",auditUsers.size());
 						workActivityProcessService.insertAuditsByType(auditUsers,workRegularApply.getProcessInstanceId(),2,1);
 
 						notifyRole = "人事主任审核";
@@ -501,9 +501,9 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 					exp = "pass";
 					if ("yes".equals(workRegularApply.getAct().getFlag())) {
 						vars.put("zjlList", auditUsers);
-						vars.put("zjlCount",auditUsers.size());
+						vars.put("zjlcount",auditUsers.size());
 						workActivityProcessService.insertAuditsByType(auditUsers,workRegularApply.getProcessInstanceId(),3,1);
-						notifyRole = "总经理审核";
+						notifyRole = "总经理审核";
 						workActivityProcess.setIsApproval("1");
 						enname = "zjl";
 					} else {
@@ -515,6 +515,21 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 					taskCount = "3";
 					exp = "pass";
 					if ("yes".equals(workRegularApply.getAct().getFlag())) {
+						vars.put("r", auditUsers);
+						vars.put("c",auditUsers.size());
+						workActivityProcessService.insertAuditsByType(auditUsers,workRegularApply.getProcessInstanceId(),4,1);
+						workActivityProcess.setIsApproval("1");
+						notifyRole = "总经理审批";
+						enname = "rlzy";
+					} else {
+						notifyRole = "调整申请";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
+				} else if ("rlzy".equals(taskDefKey) && count.contains("4")) {
+					taskCount = "4";
+					exp = "pass";
+					if ("yes".equals(workRegularApply.getAct().getFlag())) {
 						notifyRole = "审批通过";
 						workActivityProcess.setIsApproval("1");
 						workStaffBasicInfoService.updateStatus(workRegularApply.getUserId());
@@ -523,13 +538,13 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 						workActivityProcess.setIsApproval("2");
 					}
 					break;
-				} else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
-					notifyRole = "部门负责人审批";
+				}  else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
 					taskCount = "0";
+					notifyRole = "部门负责人审批";
 					exp = "pass";
 					workActivityProcess.setCount(0);
 					enname = "bmzr";
-					if (!"yes".equals(flag)) {
+					if (!"yes".equals(workRegularApply.getAct().getFlag())) {
 						workRegularApply.setState("3");
 					}
 					break;
@@ -542,7 +557,7 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 		// 提交流程任务
 		vars.put(exp, "yes".equals(flag) ? true : false);
 		vars.put("passs", true);
-		workActivityProcessService.updateProcessRegular(workActivityProcess,workActivityMenu,key,taskCount,workRegularApply.getProcessInstanceId(),taskDefKey,"modifyApply",flag,comment, activities);
+		workActivityProcessService.updateProcess(workActivityProcess,workActivityMenu,key,taskCount,workRegularApply.getProcessInstanceId(),taskDefKey,"modifyApply",flag,comment, activities);
 		// 提交流程任务
 		actTaskService.complete(act.getTaskId(), act.getProcInsId(), act.getComment(), vars);
 		boolean state = actTaskService.isProcessEnd(act.getProcInsId());
@@ -638,7 +653,7 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 											str,
 											"66",
 											"0",
-											"待审批",
+											"重新申请",
 											notifyRole));
 					users.add(zzrUser);
 				} else {
@@ -683,23 +698,22 @@ public class WorkRegularApplyService extends CrudService<WorkRegularApplyDao, Wo
 												str,
 												"66",
 												"0",
-												"待审批",
+												"重新申请",
 												notifyRole));
 					}
 				}
 			}
 		}
-		if (users!=null && users.size()!=0) {
-			for (User u : users) {
-				UserUtils.pushIm(u.getId(),title);
-			}
-		}
-		if (users!=null && userList.size()!=0) {
-			for (User u : userList) {
-				UserUtils.pushMeIm(u.getId());
-			}
-		}
-		dao.update(workRegularApply);
+//		if (users!=null && users.size()!=0) {
+//			for (User u : users) {
+//				UserUtils.pushIm(u.getId(),title);
+//			}
+//		}
+//		if (users!=null && userList.size()!=0) {
+//			for (User u : userList) {
+//				UserUtils.pushMeIm(u.getId());
+//			}
+//		}
 
 		return "保存审核意见成功!";
 	}

+ 8 - 6
src/main/java/com/jeeplus/modules/workregularapply/web/WorkRegularApplyController.java

@@ -373,14 +373,16 @@ public class WorkRegularApplyController extends BaseController {
 			}else  if ("fgld".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workRegularApply.getProcessInstanceId(),3);
 				if (users==null )
-					users = UserUtils.getByRoleActivityEnname("zjl", 3, applyOffice.getId(), "66", user);
-
+					users = UserUtils.getByRoleActivityEnname("fzjl", 3, applyOffice.getId(), "18", user);
 			}else  if ("zjl".equals(taskDefKey)){
-				users = UserUtils.getByProssType(workRegularApply.getProcessInstanceId(),3);
+				users = UserUtils.getByProssType(workRegularApply.getProcessInstanceId(),4);
 				if (users==null )
-					users = UserUtils.getByRoleActivityEnname("zjl", 3, applyOffice.getId(), "66", user);
-
-			} else if ("modifyApply".equals(taskDefKey)){
+					users = UserUtils.getByRoleActivityEnname("zjl",3,applyOffice.getId(),"18",user);
+			}else if ("rlzy".equals(taskDefKey)){
+				List<User> list = Lists.newArrayList();
+				list.add(UserUtils.getUser());
+				users = list;
+			}else if ("modifyApply".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workRegularApply.getProcessInstanceId(),1);
 			}
 			if (users==null || users.size()==0){

+ 3 - 1
src/main/java/com/jeeplus/modules/workreimbursement/dao/ReimbursementVATTaxDao.java

@@ -7,6 +7,8 @@ import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
 
+import java.util.List;
+
 /**
  * 财务报销DAO接口
  * @author 孟祥越
@@ -15,5 +17,5 @@ import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
 @MyBatisDao
 public interface ReimbursementVATTaxDao extends CrudDao<ReimbursementVATTax> {
 
-	
+	List<ReimbursementVATTax>  getById(String number);
 }

+ 7 - 7
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java

@@ -282,7 +282,7 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                         ""
                 );
         List<User> users = new ArrayList<>();
-        List<User> bmzrs = UserUtils.getByRoleActivityEnname("cwzg",3,office.getId(),"18",workReimbursement.getCreateBy());
+        List<User> bmzrs = UserUtils.getByRoleActivityEnname("bmzr",2,office.getId(),"18",workReimbursement.getCreateBy());
         List<User> fglds = UserUtils.getByRoleActivityEnname("fzjl",3,office.getId(),"18",workReimbursement.getCreateBy());
         List<User> zjls = UserUtils.getByRoleActivityEnname("zjl",3,office.getId(),"18",workReimbursement.getCreateBy());
         List<User> rlzys = UserUtils.getByRoleActivityEnname("cwzg",3,office.getId(),"18",workReimbursement.getCreateBy());
@@ -424,9 +424,9 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
             workActivityProcess.setId("");
             workActivityProcessService.save(workActivityProcess);
             workActivityProcessService.insertAuditsByType(bmzrs,processInstance.getId(),1,1);
-            workActivityProcessService.insertAuditsByType(fglds,processInstance.getId(),2,0);
-            workActivityProcessService.insertAuditsByType(zjls,processInstance.getId(),3,0);
-            workActivityProcessService.insertAuditsByType(rlzys,processInstance.getId(),4,0);
+            workActivityProcessService.insertAuditsByType(fglds,processInstance.getId(),3,0);
+            workActivityProcessService.insertAuditsByType(zjls,processInstance.getId(),4,0);
+            workActivityProcessService.insertAuditsByType(rlzys,processInstance.getId(),2,0);
         }
         logger.debug("start process of {key={}, bkey={}, pid={}, variables={}}", new Object[]{
                 ActUtils.PD_REIMBURSEMENT[0], businessKey, processInstance.getId(), variables});
@@ -695,7 +695,7 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                         vars.put("fgldcount",auditUsers.size());
                         workActivityProcessService.insertAuditsByType(auditUsers,workReimbursement.getProcessInstanceId(),2,1);
                         workActivityProcess.setIsApproval("1");
-                        notifyRole = "副总经理审批";
+                        notifyRole = "财务审批";
                         enname = "fgld";
 
                     } else {
@@ -710,7 +710,7 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                         vars.put("zjlList", auditUsers);
                         vars.put("zjlcount",auditUsers.size());
                         workActivityProcessService.insertAuditsByType(auditUsers,workReimbursement.getProcessInstanceId(),3,1);
-                        notifyRole = "总经理审核";
+                        notifyRole = "总经理审核";
                         workActivityProcess.setIsApproval("1");
                         enname = "zjl";
                     } else {
@@ -726,7 +726,7 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                         vars.put("c",auditUsers.size());
                         workActivityProcessService.insertAuditsByType(auditUsers,workReimbursement.getProcessInstanceId(),4,1);
                         workActivityProcess.setIsApproval("1");
-                        notifyRole = "人力专员审核";
+                        notifyRole = "总经理审批";
                         enname = "rlzy";
                     } else {
                         workActivityProcess.setIsApproval("2");

+ 19 - 3
src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementController.java

@@ -37,6 +37,8 @@ import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
 import com.jeeplus.modules.workfullmanage.service.WorkFullManageService;
 import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
+import com.jeeplus.modules.workreimbursement.dao.ReimbursementVATTaxDao;
+import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
 import com.jeeplus.modules.workreimbursement.entity.WorkAccount;
 import com.jeeplus.modules.workreimbursement.entity.WorkAccountAudit;
 import com.jeeplus.modules.workreimbursement.entity.WorkReimbursement;
@@ -87,6 +89,8 @@ public class WorkReimbursementController extends BaseController {
 	private WorkSupplierService workSupplierService;
 	@Autowired
 	private WorkContractInfoService workContractInfoService;
+	@Autowired
+	private ReimbursementVATTaxDao reimbursementVATTaxDao;
 
 	@Autowired
 	protected RuntimeService runtimeService;
@@ -302,15 +306,15 @@ public class WorkReimbursementController extends BaseController {
 		if ("bmzr".equals(taskDefKey)){
 			users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),2);
 			if (users==null )
-				users = UserUtils.getByRoleActivityEnname("fzjl", 3, workReimbursement.getOfficeId(), "18", workReimbursement.getCreateBy());
+				users = UserUtils.getByRoleActivityEnname("cwzg", 3, workReimbursement.getOfficeId(), "18", workReimbursement.getCreateBy());
 		}else  if ("fgld".equals(taskDefKey)){
 			users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),3);
 			if (users==null )
-				users = UserUtils.getByRoleActivityEnname("zjl", 3, workReimbursement.getOfficeId(), "18", workReimbursement.getCreateBy());
+				users = UserUtils.getByRoleActivityEnname("fzjl", 3, workReimbursement.getOfficeId(), "18", workReimbursement.getCreateBy());
 		}else  if ("zjl".equals(taskDefKey)){
 			users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),4);
 			if (users==null )
-				users = UserUtils.getByRoleActivityEnname("cwzg",3,workReimbursement.getOfficeId(),"18",workReimbursement.getCreateBy());
+				users = UserUtils.getByRoleActivityEnname("zjl",3,workReimbursement.getOfficeId(),"18",workReimbursement.getCreateBy());
 		}else if ("rlzy".equals(taskDefKey)){
 			List<User> list = Lists.newArrayList();
 			list.add(UserUtils.getUser());
@@ -740,4 +744,16 @@ public class WorkReimbursementController extends BaseController {
 		return "modules/sys/gridselectcallproject";
 		//return "modules/sys/gridselect";
 	}
+	@RequestMapping("getById")
+	@ResponseBody
+	public Map getById(String number ){
+		Map map = new HashMap();
+		List<ReimbursementVATTax> byId = reimbursementVATTaxDao.getById(number);
+		if(byId != null && byId.size()>0){
+			map.put("code","0");
+		}else {
+			map.put("code","1");
+		}
+		return map;
+	}
 }

+ 7 - 8
src/main/java/com/jeeplus/modules/workresignation/service/WorkResignationService.java

@@ -243,7 +243,7 @@ public class WorkResignationService extends CrudService<WorkResignationDao, Work
 		List<User> bmzrs = UserUtils.getByRoleActivityEnname("bmzr",2,office.getId(),"18",workResignation.getCreateBy());
 		List<User> fglds = UserUtils.getByRoleActivityEnname("fzjl",3,office.getId(),"18",workResignation.getCreateBy());
 		List<User> zjls = UserUtils.getByRoleActivityEnname("zjl",3,office.getId(),"18",workResignation.getCreateBy());
-		List<User> rlzys = UserUtils.getByRoleActivityEnname("rlzy",3,office.getId(),"18",workResignation.getCreateBy());
+		List<User> rlzys = UserUtils.findRszrList(UserUtils.getUser());
 		if (StringUtils.isNotBlank(workActivityMenu.getId())) {
 			workProjectNotify.setNotifyRole("");
 			workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
@@ -380,9 +380,9 @@ public class WorkResignationService extends CrudService<WorkResignationDao, Work
 			workActivityProcess.setId("");
 			workActivityProcessService.save(workActivityProcess);
 			workActivityProcessService.insertAuditsByType(bmzrs,processInstance.getId(),1,1);
-			workActivityProcessService.insertAuditsByType(fglds,processInstance.getId(),2,0);
-			workActivityProcessService.insertAuditsByType(zjls,processInstance.getId(),3,0);
-			workActivityProcessService.insertAuditsByType(rlzys,processInstance.getId(),4,0);
+			workActivityProcessService.insertAuditsByType(fglds,processInstance.getId(),3,0);
+			workActivityProcessService.insertAuditsByType(zjls,processInstance.getId(),4,0);
+			workActivityProcessService.insertAuditsByType(rlzys,processInstance.getId(),2,0);
 		}
 		//重新申请置空审核列表状态值
 		List<WorkResignationTemplate> tList = workResignation.getTemplateList();
@@ -524,7 +524,7 @@ public class WorkResignationService extends CrudService<WorkResignationDao, Work
 						vars.put("fgldcount",auditUsers.size());
 						workActivityProcessService.insertAuditsByType(auditUsers,workResignation.getProcessInstanceId(),2,1);
 						workActivityProcess.setIsApproval("1");
-						notifyRole = "副总经理审批";
+						notifyRole = "人事主任审批";
 						enname = "fgld";
 
 					} else {
@@ -539,7 +539,7 @@ public class WorkResignationService extends CrudService<WorkResignationDao, Work
 						vars.put("zjlList", auditUsers);
 						vars.put("zjlcount",auditUsers.size());
 						workActivityProcessService.insertAuditsByType(auditUsers,workResignation.getProcessInstanceId(),3,1);
-						notifyRole = "总经理审核";
+						notifyRole = "总经理审核";
 						workActivityProcess.setIsApproval("1");
 						enname = "zjl";
 					} else {
@@ -555,7 +555,7 @@ public class WorkResignationService extends CrudService<WorkResignationDao, Work
 						vars.put("c",auditUsers.size());
 						workActivityProcessService.insertAuditsByType(auditUsers,workResignation.getProcessInstanceId(),4,1);
 						workActivityProcess.setIsApproval("1");
-						notifyRole = "人力专员审核";
+						notifyRole = "总经理审核";
 						enname = "rlzy";
 					} else {
 						workActivityProcess.setIsApproval("2");
@@ -583,7 +583,6 @@ public class WorkResignationService extends CrudService<WorkResignationDao, Work
 						workResignation.setStatus("3");
 					}
 					break;
-				} else if ("apply_end".equals(taskDefKey)) {
 				}
 
 			}

+ 3 - 3
src/main/java/com/jeeplus/modules/workresignation/web/WorkResignationController.java

@@ -339,15 +339,15 @@ public class WorkResignationController extends BaseController {
 			if ("bmzr".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workResignation.getProcessInstanceId(),2);
 				if (users==null )
-					users = UserUtils.getByRoleActivityEnname("fzjl", 3, workResignation.getOfficeId(), "18", workResignation.getCreateBy());
+					users = UserUtils.findRszrList(UserUtils.getUser());
 			}else  if ("fgld".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workResignation.getProcessInstanceId(),3);
 				if (users==null )
-					users = UserUtils.getByRoleActivityEnname("zjl", 3, workResignation.getOfficeId(), "18", workResignation.getCreateBy());
+					users = UserUtils.getByRoleActivityEnname("fzjl", 3, workResignation.getOfficeId(), "18", workResignation.getCreateBy());
 			}else  if ("zjl".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workResignation.getProcessInstanceId(),4);
 				if (users==null )
-					users = UserUtils.getByRoleActivityEnname("rlzy",3,workResignation.getOfficeId(),"18",workResignation.getCreateBy());
+					users = UserUtils.getByRoleActivityEnname("zjl",3,workResignation.getOfficeId(),"18",workResignation.getCreateBy());
 			}else if ("rlzy".equals(taskDefKey)){
 				List<User> list = Lists.newArrayList();
 				list.add(UserUtils.getUser());

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 314 - 0
src/main/resources/act/designs/oa/expense_account/workPositive.bpmn


+ 4 - 3
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml

@@ -315,9 +315,9 @@
 			<if test="signCostTwo!=null and signCostTwo.id != null and signCostTwo.id != ''">
 				AND a.sign_cost_two = #{signCostTwo.id}
 			</if>
-			<if test="master!=null and master.id != null and master.id != ''">
-				AND a.master = #{master.id}
-			</if>
+			<!--<if test="master!=null and master.id != null and master.id != ''">-->
+				<!--AND a.master = #{master.id}-->
+			<!--</if>-->
 			<if test="reviewStandard != null and reviewStandard != ''">
 				AND a.review_standard = #{reviewStandard}
 			</if>
@@ -359,6 +359,7 @@
 				AND #{projectMasterId} in (select user_id from work_project_user pm WHERE pm.project_id = a.project_id AND is_master = '1' AND pm.del_flag = '0')
 			</if>
 			AND a.status in ('5','7')
+			AND a.create_by = #{createBy.id}
 			${sqlMap.dsf}
 		</where>
 		<choose>

+ 14 - 0
src/main/resources/mappings/modules/workadministrativeatamp/WorkAdministrativeAtampDao.xml

@@ -14,6 +14,7 @@
 		a.company_id AS "company.id",
 		a.doc_type AS "docType",
 		a.num AS "num",
+	    a.ext,
 		a.com_sign AS "comSign.id",
 		a.submiter AS "submiter.id",
 		a.submit_date AS "submitDate",
@@ -23,6 +24,9 @@
 		u1.name AS "submiter.name",
 		comSign.name AS "comSign.name",
 		o.name AS "office.name",
+		p.project_name AS "project.projectName",
+		p.project_id  AS "project.projectId",
+		a.project_id AS "project.id",
 		o.top_company AS "office.topCompany"
 	</sql>
 	
@@ -32,6 +36,7 @@
         LEFT JOIN sys_office s ON s.id = a.company_id
         LEFT JOIN sys_user u ON u.id = a.create_by
         LEFT JOIN sys_user u1 ON u1.id = a.submiter
+        LEFT JOIN project_records p ON p.id = a.project_id
 	</sql>
 	
     
@@ -67,6 +72,9 @@
             <if test="docType != null and docType != ''">
                 AND a.doc_type = #{docType}
             </if>
+            <if test="project != null and project.projectName != null and project.projectName != ''">
+				AND p.project_name LIKE concat('%',#{project.projectName},'%')
+			</if>
             <if test="state != null">
                 AND a.state = #{state}
             </if>
@@ -155,6 +163,8 @@
 			submit_date,
 			seal_type,
 			state,
+			project_id,
+			ext,
 			process_instance_id
 		) VALUES (
 			#{id},
@@ -173,6 +183,8 @@
 			#{submitDate},
 			#{sealType},
 			#{state},
+			#{project.id},
+			#{ext},
 			#{processInstanceId}
 		)
 	</insert>
@@ -191,6 +203,8 @@
 			submit_date = #{submitDate},
 			seal_type = #{sealType},
 			state = #{state},
+			ext = #{ext},
+			project_id = #{project.id},
 			process_instance_id = #{processInstanceId}
 		WHERE id = #{id}
 	</update>

+ 10 - 0
src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml

@@ -61,6 +61,7 @@
 		a.completion_status AS "completionStatus",
 		a.signature_status as "signatureStatus",
 		a.office_id AS "officeId",
+		a.payment,
 		(select count(1) from work_contract_info c where c.total_contract_id = a.id)  cnt
 	</sql>
 	
@@ -130,6 +131,7 @@
 		a.completion_status AS "completionStatus",
 		a.common_flag AS "commonFlag",
 		a.office_id AS "officeId",
+		a.payment,
 		a.signature_status as "signatureStatus"
 		FROM work_contract_info a
 		<include refid="workContractInfoJoins"/>
@@ -245,6 +247,7 @@
 		a.alterbefore_id AS "alterBeforeId",
 		a.completion_status AS "completionStatus",
 		a.common_flag AS "commonFlag",
+		a.payment,
 		a.signature_status as "signatureStatus"
 		FROM work_contract_info a
 		<include refid="workContractInfoJoins"/>
@@ -418,6 +421,7 @@
 		a.alter_state AS "alterState",
 		a.alter_sign AS "alterSign",
 		a.record_state AS "recordState",
+		a.payment,
 		a.completion_status AS "completionStatus",
 		a.alterbefore_id AS "alterBeforeId",
 		(select name from work_contract_info where id  = a.total_contract_id) AS "totalContractName",
@@ -502,6 +506,7 @@
 		a.alter_state AS "alterState",
 		a.alter_sign AS "alterSign",
 		a.record_state AS "recordState",
+		a.payment,
 		a.completion_status AS "completionStatus",
 		a.alterbefore_id AS "alterBeforeId",
 		(select name from work_contract_info where id  = a.total_contract_id) AS "totalContractName",
@@ -624,6 +629,7 @@
 		a.alter_sign AS "alterSign",
 		a.record_state AS "recordState",
 		a.alterbefore_id AS "alterBeforeId",
+		a.payment,
 		a.completion_status AS "completionStatus",
 		(select name from work_contract_info where id  = a.total_contract_id) AS "totalContractName",
 		a.common_flag AS "commonFlag",
@@ -738,6 +744,7 @@
 		a.create_bys AS "createBys",
 		a.alter_state AS "alterState",
 		a.alter_sign AS "alterSign",
+		a.payment,
 		a.record_state AS "recordState",
 		a.alterbefore_id AS "alterBeforeId",
 		a.completion_status AS "completionStatus",
@@ -868,6 +875,7 @@
 			completion_status,
 			sort,
 			signature_status,
+			payment,
 			contract_num_path
 		) VALUES (
 			#{id},
@@ -923,6 +931,7 @@
 			#{completionStatus},
 			#{sort},
 			#{signatureStatus},
+			#{payment},
 			#{contractNumPath}
 		)
 	</insert>
@@ -976,6 +985,7 @@
 			alterbefore_id = #{alterBeforeId},
 			completion_status = #{completionStatus},
 			sort = #{sort},
+			payment = #{payment},
 			signature_status=#{signatureStatus},
 			contract_num_path=#{contractNumPath}
 

+ 254 - 0
src/main/resources/mappings/modules/workleave/WorkLeaveDao.xml

@@ -0,0 +1,254 @@
+<?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.workleave.dao.WorkLeaveDao">
+    
+	<sql id="workLeaveColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.process_instance_id AS "processInstanceId",
+		a.office_id AS "officeId",
+		a.company_id AS "companyId",
+		a.num AS "num",
+		a.name AS "name",
+		a.start_date AS "startDate",
+		a.start_type AS "startType",
+		a.end_date AS "endDate",
+		a.end_type AS "endType",
+		a.reason AS "reason",
+		a.job AS "job",
+		a.type AS "type",
+		a.time AS "time",
+		a.day AS "day",
+		a.car AS "car",
+		a.car_num AS "carNum",
+		p.project_name AS "project.projectName",
+		p.project_id  AS "project.projectId",
+		a.achives_id AS "workStaffBasicInfo.id",
+	    a.project_id AS "project.id",
+		sa.no AS "workStaffBasicInfo.no",
+		sa.status AS "workStaffBasicInfo.status",
+		o.top_company AS "workStaffBasicInfo.office.name",
+		jg.name AS "workStaffBasicInfo.jobGrade.name",
+		su.name AS "createBy.name",
+		a.status AS "status"
+	</sql>
+	
+	<sql id="workLeaveJoins">
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		LEFT JOIN sys_office s ON s.id = a.company_id
+		left JOIN sys_user su on su.id = a.create_by
+		LEFT JOIN work_staff_achives sa on sa.id = a.achives_id
+		LEFT JOIN work_job_grade jg ON jg.id = sa.job_grade
+		LEFT JOIN project_records p ON p.id = a.project_id
+	</sql>
+
+	<update id="updateProcessInstanceId">
+		UPDATE work_leave SET
+		process_instance_id = #{processInstanceId}
+		WHERE id = #{id}
+	</update>
+
+	<!-- 获取流程ID -->
+	<select id="getByProcessInstanceId" resultType="WorkLeave">
+		SELECT
+		<include refid="workLeaveColumns"/>
+		FROM work_leave a
+		<include refid="workLeaveJoins"/>
+		WHERE a.process_instance_id = #{processInstanceId}
+	</select>
+    
+	<select id="get" resultType="WorkLeave" >
+		SELECT 
+			<include refid="workLeaveColumns"/>
+		FROM work_leave a
+		<include refid="workLeaveJoins"/>
+		WHERE a.id = #{id}
+	</select>
+	<select id="getByStaffIdAndTime" resultType="WorkLeave" >
+		SELECT
+			<include refid="workLeaveColumns"/>
+		FROM work_leave a
+		<include refid="workLeaveJoins"/>
+		WHERE a.achives_id = #{staffId}
+		AND a.status = '5'
+		AND #{time} BETWEEN a.start_date AND a.end_date
+	</select>
+
+	<select id="findList" resultType="WorkLeave" >
+		SELECT 
+			<include refid="workLeaveColumns"/>
+		FROM work_leave a
+		<include refid="workLeaveJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="workStaffBasicInfo != null and workStaffBasicInfo.no !=null and workStaffBasicInfo.no != ''">
+				AND sa.no = #{workStaffBasicInfo.no}
+			</if>
+			<if test="workStaffBasicInfo != null and workStaffBasicInfo.id !=null and workStaffBasicInfo.id != ''">
+				AND a.achives_id = #{workStaffBasicInfo.id}
+			</if>
+			<if test="num != null and num != ''">
+				AND a.num = #{num}
+			</if>
+			<if test="name != null and name != ''">
+				AND a.name LIKE
+				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+			${sqlMap.dsf}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.create_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="findListValidateTime" resultType="WorkLeave" parameterType="java.lang.String">
+		SELECT
+		<include refid="workLeaveColumns"/>
+		FROM work_leave a
+		<include refid="workLeaveJoins"/>
+		<where>
+			a.del_flag = '0'
+			AND a.achives_id=#{staffId}
+			AND a.status not in('1','3','4')
+		</where>
+	</select>
+
+	<select id="findAllList" resultType="WorkLeave" >
+		SELECT 
+			<include refid="workLeaveColumns"/>
+		FROM work_leave a
+		<include refid="workLeaveJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.create_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert">
+		INSERT INTO work_leave(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			process_instance_id,
+			office_id,
+			company_id,
+			num,
+			name,
+			start_date,
+			start_type,
+			end_date,
+			end_type,
+			reason,
+			achives_id,
+			day,
+			type,
+			time,
+			job,
+			car,
+			car_num,
+			project_id,
+			status
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{processInstanceId},
+			#{officeId},
+			#{companyId},
+			#{num},
+			#{name},
+			#{startDate},
+			#{startType},
+			#{endDate},
+			#{endType},
+			#{reason},
+			#{workStaffBasicInfo.id},
+			#{day},
+			#{type},
+			#{time},
+			#{job},
+			#{car},
+			#{carNum},
+			#{project.id},
+			#{status}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE work_leave SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks},
+			process_instance_id = #{processInstanceId},
+			office_id = #{officeId},
+			company_id = #{companyId},
+			num = #{num},
+			name = #{name},
+			start_date = #{startDate},
+			start_type = #{startType},
+			end_date = #{endDate},
+			end_type = #{endType},
+			reason = #{reason},
+			day = #{day},
+			time = #{time},
+			type = #{type},
+			job = #{job},
+			car = #{car},
+			car_num = #{carNum},
+			project_id = #{project.id},
+			achives_id = #{workStaffBasicInfo.id},
+			status = #{status}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM work_leave
+		WHERE id = #{id}
+	</update>
+	
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE work_leave SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="WorkLeave" statementType="STATEMENT">
+		select * FROM work_overtime  where ${propertyName} = '${value}'
+	</select>
+	
+</mapper>

+ 8 - 0
src/main/resources/mappings/modules/workreimbursement/ReimbursementVATTaxDao.xml

@@ -29,6 +29,14 @@
 		<include refid="ReimbursementVATTaxJoins"/>
 		WHERE a.id = #{id}
 	</select>
+
+	<select id="getById" resultType="ReimbursementVATTax">
+		SELECT
+		<include refid="ReimbursementVATTaxColumns"/>
+		FROM reimbursement_vat_tax a
+		<include refid="ReimbursementVATTaxJoins"/>
+		WHERE a.invoice_number = #{number}
+	</select>
 	
 	<select id="findList" resultType="ReimbursementVATTax" >
 		SELECT 

+ 2 - 2
src/main/webapp/webpage/modules/projectapproval/projectApprovalForm.jsp

@@ -131,9 +131,9 @@
 					<%--</div>--%>
 				<%--</div>--%>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">报批名称:</label>
+					<label class="layui-form-label"><span class="require-item">*</span>报批名称:</label>
 					<div class="layui-input-block">
-						<form:input id ="name" path="name" htmlEscape="false"   class="form-control layui-input"/>
+						<form:input id ="name" path="name" htmlEscape="false"   class="form-control required layui-input"/>
 					</div>
 				</div>
 					<%--<div class="layui-item layui-col-sm6">--%>

+ 7 - 7
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordAudit.jsp

@@ -81,17 +81,17 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">签字造价师一:</label>
+					<label class="layui-form-label">环评工程师:</label>
 					<div class="layui-input-block">
 						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.signCostOne.name}"/>
 					</div>
 				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">签字造价师二:</label>
-					<div class="layui-input-block">
-						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.signCostTwo.name}"/>
-					</div>
-				</div>
+				<%--<div class="layui-item layui-col-sm6">--%>
+					<%--<label class="layui-form-label">签字造价师二:</label>--%>
+					<%--<div class="layui-input-block">--%>
+						<%--<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.signCostTwo.name}"/>--%>
+					<%--</div>--%>
+				<%--</div>--%>
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label">报告名称:</label>
 					<div class="layui-input-block">

+ 11 - 10
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordForm.jsp

@@ -74,6 +74,7 @@
             $("#clientName").val(obj.clientName);
             $("#projectName").val(obj.projectName);
             $("#projectNum").val(obj.projectNum);
+            $("#name").val("JY-"+obj.projectName);
             $.ajax({
                 type:'post',
                 url:'${ctx}/projectcontentinfo/projectReportRecord/getNumber',
@@ -124,18 +125,18 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>签字造价师一:</label>
+					<label class="layui-form-label"><span class="require-item">*</span>环评工程师:</label>
 					<div class="layui-input-block with-icon">
 						<sys:treeselect id="signCostOne" name="signCostOne.id" value="${projectReportRecord.signCostOne.id}" labelName="signCostOne.name" labelValue="${projectReportRecord.signCostOne.name}"
-										title="签字造价师一" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/></div>
-				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">签字造价师二:</label>
-					<div class="layui-input-block with-icon">
-						<sys:treeselect id="signCostTwo" name="signCostTwo.id" value="${projectReportRecord.signCostTwo.id}" labelName="signCostTwo.name" labelValue="${projectReportRecord.signCostTwo.name}"
-										title="签字造价师二" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
-					</div>
+										title="环评工程师" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/></div>
 				</div>
+				<%--<div class="layui-item layui-col-sm6">--%>
+					<%--<label class="layui-form-label">签字造价师二:</label>--%>
+					<%--<div class="layui-input-block with-icon">--%>
+						<%--<sys:treeselect id="signCostTwo" name="signCostTwo.id" value="${projectReportRecord.signCostTwo.id}" labelName="signCostTwo.name" labelValue="${projectReportRecord.signCostTwo.name}"--%>
+										<%--title="签字造价师二" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>--%>
+					<%--</div>--%>
+				<%--</div>--%>
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label"><span class="require-item">*</span>报告名称:</label>
 					<div class="layui-input-block">
@@ -201,7 +202,7 @@
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label">档案名称:</label>
 					<div class="layui-input-block">
-						<form:input path="name" htmlEscape="false"    class="form-control  layui-input"/>
+						<form:input path="name" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">

+ 9 - 9
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordModifyApply.jsp

@@ -119,18 +119,18 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>签字造价师一:</label>
+					<label class="layui-form-label"><span class="require-item">*</span>环评工程师:</label>
 					<div class="layui-input-block with-icon">
 						<sys:treeselect id="signCostOne" name="signCostOne.id" value="${projectReportRecord.signCostOne.id}" labelName="signCostOne.name" labelValue="${projectReportRecord.signCostOne.name}"
-										title="签字造价师一" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/></div>
-				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>签字造价师二:</label>
-					<div class="layui-input-block with-icon">
-						<sys:treeselect id="signCostTwo" name="signCostTwo.id" value="${projectReportRecord.signCostTwo.id}" labelName="signCostTwo.name" labelValue="${projectReportRecord.signCostTwo.name}"
-										title="签字造价师二" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/>
-					</div>
+										title="环评工程师" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/></div>
 				</div>
+				<%--<div class="layui-item layui-col-sm6">--%>
+					<%--<label class="layui-form-label"><span class="require-item">*</span>签字造价师二:</label>--%>
+					<%--<div class="layui-input-block with-icon">--%>
+						<%--<sys:treeselect id="signCostTwo" name="signCostTwo.id" value="${projectReportRecord.signCostTwo.id}" labelName="signCostTwo.name" labelValue="${projectReportRecord.signCostTwo.name}"--%>
+										<%--title="签字造价师二" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/>--%>
+					<%--</div>--%>
+				<%--</div>--%>
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label"><span class="require-item">*</span>报告名称:</label>
 					<div class="layui-input-block">

+ 7 - 7
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordView.jsp

@@ -36,17 +36,17 @@
 				</div>
 			</div>
 			<div class="layui-item layui-col-sm6">
-				<label class="layui-form-label">签字造价师一:</label>
+				<label class="layui-form-label">环评工程师:</label>
 				<div class="layui-input-block">
 					<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.signCostOne.name}"/>
 				</div>
 			</div>
-			<div class="layui-item layui-col-sm6">
-				<label class="layui-form-label">签字造价师二:</label>
-				<div class="layui-input-block">
-					<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.signCostTwo.name}"/>
-				</div>
-			</div>
+			<%--<div class="layui-item layui-col-sm6">--%>
+				<%--<label class="layui-form-label">签字造价师二:</label>--%>
+				<%--<div class="layui-input-block">--%>
+					<%--<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.signCostTwo.name}"/>--%>
+				<%--</div>--%>
+			<%--</div>--%>
 			<div class="layui-item layui-col-sm6">
 				<label class="layui-form-label">报告名称:</label>
 				<div class="layui-input-block">

+ 62 - 62
src/main/webapp/webpage/modules/projectcontentinfo/projectcontentinfoForm.jsp

@@ -414,68 +414,68 @@
 						</table>
 					</div>
 				</div>
-				<%--<div class="form-group layui-row">--%>
-					<%--<div class="form-group-label"><h2>工作内容列表</h2></div>--%>
-					<%--<div class="layui-item nav-btns">--%>
-						<%--<c:if test="${empty change}">--%>
-						<%--<a href="javascript:void(0)" onclick="openDialogWork('新增工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&dictType=${dictType}&id=${id}&parentIds=${parentIds}','95%','95%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i>&nbsp; 新增</a>--%>
-						<%--</c:if>--%>
-					<%--</div>--%>
-					<%--<div class="layui-item layui-col-xs12 form-table-container">--%>
-						<%--<table id="contentTable2" class="table table-bordered table-condensed details">--%>
-							<%--<thead>--%>
-							<%--<tr>--%>
-								<%--<th>内容编号</th>--%>
-								<%--<th>内容名称</th>--%>
-								<%--<th width="80">内容类型</th>--%>
-								<%--<th width="90">负责人</th>--%>
-								<%--<th width="90">创建日期</th>--%>
-								<%--<th width="130">操作</th>--%>
-							<%--</tr>--%>
-							<%--</thead>--%>
-							<%--<tbody>--%>
-							<%--<c:choose>--%>
-								<%--<c:when test="${not empty projectContentDatas}">--%>
-									<%--<c:forEach items="${projectContentDatas}" var="projectContentData" varStatus="idx">--%>
-										<%--<tr>--%>
-											<%--<td title="${projectContentData.number}">--%>
-													<%--${projectContentData.number}--%>
-											<%--</td>--%>
-											<%--<td><a title="${projectContentData.name}" href="#" onclick="openDialogView('查看工作内容详情', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=${dictType}&id=${id}&parentIds=${parentIds}&infoId=${projectContentData.id}','95%','95%')">--%>
-													<%--${projectContentData.name}</a>--%>
-											<%--</td>--%>
-											<%--<td title="${fns:getContentTypeName(projectContentData.type,"")}">--%>
-													<%--${fns:getContentTypeName(projectContentData.type,"")}--%>
-											<%--</td>--%>
-											<%--<td title="${projectContentData.master.name}">--%>
-													<%--${projectContentData.master.name}--%>
-											<%--</td>--%>
-											<%--<td>--%>
-												<%--<fmt:formatDate value="${projectContentData.createDate}" pattern="yyyy-MM-dd"/>--%>
-											<%--</td>--%>
-											<%--<td class="op-td">--%>
-												<%--<div class="op-btn-box">--%>
-													<%--<c:if test="${fns:getUser().id == projectContentData.createBy.id && empty change}">--%>
-														<%--<a href="#" onclick="openDialog('修改工作内容详情', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&dictType=${dictType}&id=${id}&parentIds=${parentIds}&infoId=${projectContentData.id}','95%','95%')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>--%>
-														<%--<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId=${projectContentData.id}&id=${id}&type=2" onclick="return confirmxRefresh('确认要删除该工作内容详情吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>--%>
-													<%--</c:if>--%>
-												<%--</div>--%>
-											<%--</td>--%>
-										<%--</tr>--%>
-									<%--</c:forEach>--%>
-								<%--</c:when>--%>
-								<%--<c:otherwise>--%>
-									<%--<tr>--%>
-										<%--<td colspan="6">--%>
-											<%--暂无数据--%>
-										<%--</td>--%>
-									<%--</tr>--%>
-								<%--</c:otherwise>--%>
-							<%--</c:choose>--%>
-							<%--</tbody>--%>
-						<%--</table>--%>
-					<%--</div>--%>
-				<%--</div>--%>
+				<div class="form-group layui-row">
+					<div class="form-group-label"><h2>工作内容列表</h2></div>
+					<div class="layui-item nav-btns">
+						<c:if test="${empty change}">
+						<a href="javascript:void(0)" onclick="openDialogWork('新增工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&dictType=${dictType}&id=${id}&parentIds=${parentIds}','95%','95%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i>&nbsp; 新增</a>
+						</c:if>
+					</div>
+					<div class="layui-item layui-col-xs12 form-table-container">
+						<table id="contentTable2" class="table table-bordered table-condensed details">
+							<thead>
+							<tr>
+								<th>内容编号</th>
+								<th>内容名称</th>
+								<th width="80">内容类型</th>
+								<th width="90">负责人</th>
+								<th width="90">创建日期</th>
+								<th width="130">操作</th>
+							</tr>
+							</thead>
+							<tbody>
+							<c:choose>
+								<c:when test="${not empty projectContentDatas}">
+									<c:forEach items="${projectContentDatas}" var="projectContentData" varStatus="idx">
+										<tr>
+											<td title="${projectContentData.number}">
+													${projectContentData.number}
+											</td>
+											<td><a title="${projectContentData.name}" href="#" onclick="openDialogView('查看工作内容详情', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=${dictType}&id=${id}&parentIds=${parentIds}&infoId=${projectContentData.id}','95%','95%')">
+													${projectContentData.name}</a>
+											</td>
+											<td title="${fns:getContentTypeName(projectContentData.type,"")}">
+													${fns:getContentTypeName(projectContentData.type,"")}
+											</td>
+											<td title="${projectContentData.master.name}">
+													${projectContentData.master.name}
+											</td>
+											<td>
+												<fmt:formatDate value="${projectContentData.createDate}" pattern="yyyy-MM-dd"/>
+											</td>
+											<td class="op-td">
+												<div class="op-btn-box">
+													<c:if test="${fns:getUser().id == projectContentData.createBy.id && empty change}">
+														<a href="#" onclick="openDialog('修改工作内容详情', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&dictType=${dictType}&id=${id}&parentIds=${parentIds}&infoId=${projectContentData.id}','95%','95%')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>
+														<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId=${projectContentData.id}&id=${id}&type=2" onclick="return confirmxRefresh('确认要删除该工作内容详情吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
+													</c:if>
+												</div>
+											</td>
+										</tr>
+									</c:forEach>
+								</c:when>
+								<c:otherwise>
+									<tr>
+										<td colspan="6">
+											暂无数据
+										</td>
+									</tr>
+								</c:otherwise>
+							</c:choose>
+							</tbody>
+						</table>
+					</div>
+				</div>
 				<div class="form-group layui-row">
 					<div class="form-group-label"><h2>报告列表</h2></div>
 					<div class="layui-item nav-btns">

+ 2 - 2
src/main/webapp/webpage/modules/projectcontentinfo/projectcontentinfoList.jsp

@@ -164,8 +164,8 @@
                 ,{field:'projMaster', align:'center',title: '项目负责人',width:80}
                 ,{field:'contract', align:'center',title: '合同名称',minWidth:150}
                 ,{field:'client', align:'center',title: '主委托方',minWidth:150}
-                ,{field:'constructionProjectTypeStr', align:'center',title: '工程分类',width:100}
-                ,{field:'officeName', align:'center',title: '所属部门',width:100}
+                // ,{field:'constructionProjectTypeStr', align:'center',title: '工程分类',width:100}
+                // ,{field:'officeName', align:'center',title: '所属部门',width:100}
                 ,{field:'createDate', align:'center',title: '创建日期',width:80}
                 ,{align:'center',title:"操作",width:80,templet:function(d){
                     ////对操作进行初始化

+ 5 - 5
src/main/webapp/webpage/modules/projectcontentinfo/reportModifyApply.jsp

@@ -898,11 +898,11 @@
 				<%--</table>--%>
 			<%--</div>--%>
 		<%--</div>--%>
-			<c:if test="${not empty projectcontentinfo.infoId}">
-				<div class="pull-right">
-					<button id="btnSubmit" class="btn btn-primary btn-rounded btn-outline btn-sm" type="submit" onclick="$('#edit').val('edit')"><i class="fa fa-chevron-up"></i>暂 存</button>
-				</div>
-			</c:if>
+			<%--<c:if test="${not empty projectcontentinfo.infoId}">--%>
+				<%--<div class="pull-right">--%>
+					<%--<button id="btnSubmit" class="btn btn-primary btn-rounded btn-outline btn-sm" type="submit" onclick="$('#edit').val('edit')"><i class="fa fa-chevron-up"></i>暂 存</button>--%>
+				<%--</div>--%>
+			<%--</c:if>--%>
 		<div class="form-group layui-row page-end"></div>
 		</form:form>
 	</div>

+ 177 - 172
src/main/webapp/webpage/modules/projectcontentinfo/workContentForm.jsp

@@ -450,38 +450,39 @@
             <form:hidden path="parentIds"/>
             <form:hidden path="project.id"/>
             <form:hidden path="projectContentData.id"/>
+            <input type="hidden" name="projectContentData.type" value="1" />
             <input type="hidden" id="contentDeta" name="projectContentData.contentDetail">
             <sys:message content="${message}"/>
             <div class="form-group layui-row first lw12">
                 <div class="form-group-label"><h2>基本信息</h2></div>
-                <div class="layui-item layui-col-sm6">
-                    <label class="layui-form-label"><span class="require-item">*</span>工作内容类型:</label>
-                    <div class="layui-input-block">
-                        <form:select id="projectContentDataType" path="projectContentData.type"  htmlEscape="false"   onchange="changeContentDetail(this)"  class="form-control simple-select required">
-                            <form:option value=""></form:option>
-                            <c:choose>
-                                <c:when test="${projectcontentinfo.type != null and projectcontentinfo.type !=''}">
-                                    <optgroup label=${fns:getContentTypeName(projectcontentinfo.type-1,'' )}/>
-                                    <form:options items="${fns:getContentTypeList(projectcontentinfo.type-1)}" itemLabel="typeName" itemValue="typeId"></form:options>
-                                </c:when>
-                                <c:otherwise>
-                                    <optgroup label="决策阶段"/>
-                                    <form:options items="${fns:getContentTypeList('1')}" itemLabel="typeName" itemValue="typeId"></form:options>
-                                    <optgroup label="设计阶段"/>
-                                    <form:options items="${fns:getContentTypeList('2')}" itemLabel="typeName" itemValue="typeId"></form:options>
-                                    <optgroup label="发承包阶段"/>
-                                    <form:options items="${fns:getContentTypeList('3')}" itemLabel="typeName" itemValue="typeId"></form:options>
-                                    <optgroup label="实施阶段"/>
-                                    <form:options items="${fns:getContentTypeList('4')}" itemLabel="typeName" itemValue="typeId"></form:options>
-                                    <optgroup label="竣工阶段"/>
-                                    <form:options items="${fns:getContentTypeList('5')}" itemLabel="typeName" itemValue="typeId"></form:options>
-                                    <optgroup label="运营阶段"/>
-                                    <form:options items="${fns:getContentTypeList('6')}" itemLabel="typeName" itemValue="typeId"></form:options>
-                                </c:otherwise>
-                            </c:choose>
-                        </form:select>
-                    </div>
-                </div>
+                <%--<div class="layui-item layui-col-sm6">--%>
+                    <%--<label class="layui-form-label"><span class="require-item">*</span>工作内容类型:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<form:select id="projectContentDataType" path="projectContentData.type"  htmlEscape="false"   onchange="changeContentDetail(this)"  class="form-control simple-select required">--%>
+                            <%--<form:option value=""></form:option>--%>
+                            <%--<c:choose>--%>
+                                <%--<c:when test="${projectcontentinfo.type != null and projectcontentinfo.type !=''}">--%>
+                                    <%--<optgroup label=${fns:getContentTypeName(projectcontentinfo.type-1,'' )}/>--%>
+                                    <%--<form:options items="${fns:getContentTypeList(projectcontentinfo.type-1)}" itemLabel="typeName" itemValue="typeId"></form:options>--%>
+                                <%--</c:when>--%>
+                                <%--<c:otherwise>--%>
+                                    <%--<optgroup label="决策阶段"/>--%>
+                                    <%--<form:options items="${fns:getContentTypeList('1')}" itemLabel="typeName" itemValue="typeId"></form:options>--%>
+                                    <%--<optgroup label="设计阶段"/>--%>
+                                    <%--<form:options items="${fns:getContentTypeList('2')}" itemLabel="typeName" itemValue="typeId"></form:options>--%>
+                                    <%--<optgroup label="发承包阶段"/>--%>
+                                    <%--<form:options items="${fns:getContentTypeList('3')}" itemLabel="typeName" itemValue="typeId"></form:options>--%>
+                                    <%--<optgroup label="实施阶段"/>--%>
+                                    <%--<form:options items="${fns:getContentTypeList('4')}" itemLabel="typeName" itemValue="typeId"></form:options>--%>
+                                    <%--<optgroup label="竣工阶段"/>--%>
+                                    <%--<form:options items="${fns:getContentTypeList('5')}" itemLabel="typeName" itemValue="typeId"></form:options>--%>
+                                    <%--<optgroup label="运营阶段"/>--%>
+                                    <%--<form:options items="${fns:getContentTypeList('6')}" itemLabel="typeName" itemValue="typeId"></form:options>--%>
+                                <%--</c:otherwise>--%>
+                            <%--</c:choose>--%>
+                        <%--</form:select>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label">工作内容编号:</label>
                     <div class="layui-input-block">
@@ -511,90 +512,94 @@
             </div>
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>内容详情</h2></div>
-                <div style="padding: 0 15px;">
-                    <div id="contentDetail"></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>说明:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="projectContentData.remarks"  htmlEscape="false"   id="note"  class="form-control layui-textarea"  cols="30" rows="10" align="center"
+                        />
+                    </div>
                 </div>
             </div>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>依据性资料明细</h2></div>
-                <div class="layui-item nav-btns">
-                    <a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${projectcontentinfo.dictType}&id=${projectcontentinfo.id}&parentIds=${projectcontentinfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
+            <%--<div class="form-group layui-row">--%>
+                <%--<div class="form-group-label"><h2>依据性资料明细</h2></div>--%>
+                <%--<div class="layui-item nav-btns">--%>
+                    <%--<a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${projectcontentinfo.dictType}&id=${projectcontentinfo.id}&parentIds=${projectcontentinfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>--%>
 
-                    <sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"
-                                            cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>
-                </div>
-                <div class="layui-item layui-col-xs12 form-table-container">
-                    <table id="contentTableBase" class="table table-bordered table-condensed details">
-                <thead>
-                <tr>
-                    <th class="hide"></th>
-                    <th >资料编号</th>
-                    <th >资料名称</th>
-                    <th >资料类别</th>
-                    <th >上传人</th>
-                    <th >上传日期</th>
-                    <th>操作</th>
-                </tr>
-                </thead>
-                <tbody id="workBaseDataList">
-                <c:forEach items="${projectcontentinfo.projectContentData.projectBasedDataList}" var="projectBasedData" varStatus="idx">
-                    <tr>
-                        <td class="hide">
-                            <input type="hidden" id="workBaseDataList${idx.index}_id" value="${projectBasedData.id}" class="clientId">
-                        </td>
-                        <td style="text-align:center;">
-                                ${projectBasedData.number}
-                        </td>
-                        <td style="text-align:center;">
-                                ${projectBasedData.name}
-                        </td>
-                        <td style="text-align:center;">
-                                ${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}
-                        </td>
-                        <td style="text-align:center;">
-                                ${projectBasedData.uploadUser.name}
-                        </td>
-                        <td style="text-align:center;">
-                            <fmt:formatDate value="${projectBasedData.uploadDate}" pattern="yyyy-MM-dd"/>
-                        </td>
+                    <%--<sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"--%>
+                                            <%--cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>--%>
+                <%--</div>--%>
+                <%--<div class="layui-item layui-col-xs12 form-table-container">--%>
+                    <%--<table id="contentTableBase" class="table table-bordered table-condensed details">--%>
+                <%--<thead>--%>
+                <%--<tr>--%>
+                    <%--<th class="hide"></th>--%>
+                    <%--<th >资料编号</th>--%>
+                    <%--<th >资料名称</th>--%>
+                    <%--<th >资料类别</th>--%>
+                    <%--<th >上传人</th>--%>
+                    <%--<th >上传日期</th>--%>
+                    <%--<th>操作</th>--%>
+                <%--</tr>--%>
+                <%--</thead>--%>
+                <%--<tbody id="workBaseDataList">--%>
+                <%--<c:forEach items="${projectcontentinfo.projectContentData.projectBasedDataList}" var="projectBasedData" varStatus="idx">--%>
+                    <%--<tr>--%>
+                        <%--<td class="hide">--%>
+                            <%--<input type="hidden" id="workBaseDataList${idx.index}_id" value="${projectBasedData.id}" class="clientId">--%>
+                        <%--</td>--%>
+                        <%--<td style="text-align:center;">--%>
+                                <%--${projectBasedData.number}--%>
+                        <%--</td>--%>
+                        <%--<td style="text-align:center;">--%>
+                                <%--${projectBasedData.name}--%>
+                        <%--</td>--%>
+                        <%--<td style="text-align:center;">--%>
+                                <%--${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}--%>
+                        <%--</td>--%>
+                        <%--<td style="text-align:center;">--%>
+                                <%--${projectBasedData.uploadUser.name}--%>
+                        <%--</td>--%>
+                        <%--<td style="text-align:center;">--%>
+                            <%--<fmt:formatDate value="${projectBasedData.uploadDate}" pattern="yyyy-MM-dd"/>--%>
+                        <%--</td>--%>
 
-                        <td class="text-center op-td">
-                            <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
-                        </td>
-                    </tr>
-                </c:forEach>
-                </tbody>
-            </table>
-                </div>
-            </div>
-            <script type="text/template" id="workBaseDataTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="workBaseDataList{{idx}}_id" name="projectContentData.projectBasedDataList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
-                        <input id="workBaseDataList{{idx}}_number" name="projectContentData.projectBasedDataList[{{idx}}].number" type="hidden" value="{{row.number}}"/>
-                        <input id="workBaseDataList{{idx}}_name" name="projectContentData.projectBasedDataList[{{idx}}].name" type="hidden" value="{{row.name}}"/>
-                        <input id="workBaseDataList{{idx}}_type" name="projectContentData.projectBasedDataList[{{idx}}].type" type="hidden" value="{{row.type}}"/>
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.number}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.name}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.typeLabel}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.uploadUser.name}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.uploadDate}}
-                    </td>
-                    <td class="text-center op-td">
-                        <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList{{idx}}','{{row.uploadUser.id}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
-                    </td>
-                </tr>//-->
-            </script>
+                        <%--<td class="text-center op-td">--%>
+                            <%--<a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>--%>
+                        <%--</td>--%>
+                    <%--</tr>--%>
+                <%--</c:forEach>--%>
+                <%--</tbody>--%>
+            <%--</table>--%>
+                <%--</div>--%>
+            <%--</div>--%>
+            <%--<script type="text/template" id="workBaseDataTpl">//<!----%>
+                <%--<tr id="budgetList{{idx}}">--%>
+                    <%--<td class="hide">--%>
+                        <%--<input id="workBaseDataList{{idx}}_id" name="projectContentData.projectBasedDataList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>--%>
+                        <%--<input id="workBaseDataList{{idx}}_number" name="projectContentData.projectBasedDataList[{{idx}}].number" type="hidden" value="{{row.number}}"/>--%>
+                        <%--<input id="workBaseDataList{{idx}}_name" name="projectContentData.projectBasedDataList[{{idx}}].name" type="hidden" value="{{row.name}}"/>--%>
+                        <%--<input id="workBaseDataList{{idx}}_type" name="projectContentData.projectBasedDataList[{{idx}}].type" type="hidden" value="{{row.type}}"/>--%>
+                    <%--</td>--%>
+                    <%--<td style="text-align:center;">--%>
+                        <%--{{row.number}}--%>
+                    <%--</td>--%>
+                    <%--<td style="text-align:center;">--%>
+                        <%--{{row.name}}--%>
+                    <%--</td>--%>
+                    <%--<td style="text-align:center;">--%>
+                        <%--{{row.typeLabel}}--%>
+                    <%--</td>--%>
+                    <%--<td style="text-align:center;">--%>
+                        <%--{{row.uploadUser.name}}--%>
+                    <%--</td>--%>
+                    <%--<td style="text-align:center;">--%>
+                        <%--{{row.uploadDate}}--%>
+                    <%--</td>--%>
+                    <%--<td class="text-center op-td">--%>
+                        <%--<a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList{{idx}}','{{row.uploadUser.id}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>--%>
+                    <%--</td>--%>
+                <%--</tr>//-->--%>
+            <%--</script>--%>
             <script type="text/javascript">
                 var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                 var workBaseDataRowIdx = ${fn:length(projectcontentinfo.projectReportData.projectBasedDataList)};
@@ -705,70 +710,70 @@
                     return false;
                 }
             </script>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>过程控制明细</h2></div>
-                <div class="layui-item nav-btns">
-                    <a href="javascript:void(0)" onclick="openDialogreControl('新增控制表格', '${ctx}/projectcontroltable/projectControlTable/form?pfId=${projectcontentinfo.project.id}','90%','90%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
-                </div>
-                <div class="layui-item layui-col-xs12 form-table-container">
-                    <table id="contentTable" class="table table-bordered table-condensed details">
-                        <thead>
-                            <tr>
-                                <th  >表格名称</th>
-                                <th  >表格类型</th>
-                                <th  >负责人</th>
-                                <th  >创建日期</th>
-                                <th>操作</th>
-                            </tr>
-                        </thead>
-                        <tbody id="projectControlTables">
-                    <c:choose>
-                        <c:when test="${not empty projectcontentinfo.projectContentData.projectControlTableList}">
-                            <c:forEach items="${projectcontentinfo.projectContentData.projectControlTableList}" var="projectControlTable" varStatus="status">
-                                <tr id="tr${status.index}">
-                                    <td style="text-align:center;">
-                                            ${projectControlTable.tName}
-                                        <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].id" value="${projectControlTable.id}">
-                                        <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].tName" value="${projectControlTable.tName}">
-                                        <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].pfId" value="${projectControlTable.pfId}">
-                                    </td>
-                                    <td style="text-align:center;">
-                                            ${projectControlTable.processName}
-                                        <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].tType" value="${projectControlTable.tType}">
-                                    </td>
-                                    <td style="text-align:center;">
-                                            ${projectControlTable.tUser.name}
-                                    </td>
-                                    <td style="text-align:center;">
-                                        <fmt:formatDate value="${projectControlTable.createDate}" pattern="yyyy-MM-dd" />
-                                            <%--<input type="hidden" name="projectControlTableList[${status.index}].createDate" value="${projectControlTable.createDate}">--%>
-                                            <%--<input type="hidden" name="projectControlTableList[${status.index}].updateDate" value="${projectControlTable.updateDate}">--%>
-                                            <%--<input type="hidden" name="projectControlTableList[${status.index}].delFlag" value="${projectControlTable.delFlag}">--%>
-                                            <%--<input type="hidden" name="projectControlTableList[${status.index}].createBy.id" value="${projectControlTable.createBy.id}">--%>
-                                    </td>
-                                    <td class="op-td text-center">
-                                        <div class="op-btn-box">
-                                            <%--<shiro:hasPermission name="projectcontentinfo:projectBasedData:view">--%>
-                                        <a href="#" onclick="openDialogView('查看过程控制明细', '${ctx}/projectcontroltable/projectControlTable/form?id=${projectControlTable.id}&view=view','90%', '90%')" class="op-btn op-btn-view" ><i class="fa fa-search-plus"></i> 查看</a>
-                                            <%--</shiro:hasPermission>--%>
-                                            <%--<shiro:hasPermission name="projectcontentinfo:projectBasedData:del">--%>
-                                        <a href="javascript:initControlData('0','#tr${status.index}','del','${projectControlTable.id}')" onclick="return confirmx('确认要删除该过程控制数据吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
-                                            <%--</shiro:hasPermission>--%>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-                        </c:when>
-                        <c:otherwise>
-                            <tr>
-                                <td colspan="5" align="center">暂无数据</td>
-                            </tr>
-                        </c:otherwise>
-                    </c:choose>
-                    </tbody>
-                    </table>
-                </div>
-            </div>
+            <%--<div class="form-group layui-row">--%>
+                <%--<div class="form-group-label"><h2>过程控制明细</h2></div>--%>
+                <%--<div class="layui-item nav-btns">--%>
+                    <%--<a href="javascript:void(0)" onclick="openDialogreControl('新增控制表格', '${ctx}/projectcontroltable/projectControlTable/form?pfId=${projectcontentinfo.project.id}','90%','90%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>--%>
+                <%--</div>--%>
+                <%--<div class="layui-item layui-col-xs12 form-table-container">--%>
+                    <%--<table id="contentTable" class="table table-bordered table-condensed details">--%>
+                        <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th  >表格名称</th>--%>
+                                <%--<th  >表格类型</th>--%>
+                                <%--<th  >负责人</th>--%>
+                                <%--<th  >创建日期</th>--%>
+                                <%--<th>操作</th>--%>
+                            <%--</tr>--%>
+                        <%--</thead>--%>
+                        <%--<tbody id="projectControlTables">--%>
+                    <%--<c:choose>--%>
+                        <%--<c:when test="${not empty projectcontentinfo.projectContentData.projectControlTableList}">--%>
+                            <%--<c:forEach items="${projectcontentinfo.projectContentData.projectControlTableList}" var="projectControlTable" varStatus="status">--%>
+                                <%--<tr id="tr${status.index}">--%>
+                                    <%--<td style="text-align:center;">--%>
+                                            <%--${projectControlTable.tName}--%>
+                                        <%--<input type="hidden" name="projectContentData.projectControlTableList[${status.index}].id" value="${projectControlTable.id}">--%>
+                                        <%--<input type="hidden" name="projectContentData.projectControlTableList[${status.index}].tName" value="${projectControlTable.tName}">--%>
+                                        <%--<input type="hidden" name="projectContentData.projectControlTableList[${status.index}].pfId" value="${projectControlTable.pfId}">--%>
+                                    <%--</td>--%>
+                                    <%--<td style="text-align:center;">--%>
+                                            <%--${projectControlTable.processName}--%>
+                                        <%--<input type="hidden" name="projectContentData.projectControlTableList[${status.index}].tType" value="${projectControlTable.tType}">--%>
+                                    <%--</td>--%>
+                                    <%--<td style="text-align:center;">--%>
+                                            <%--${projectControlTable.tUser.name}--%>
+                                    <%--</td>--%>
+                                    <%--<td style="text-align:center;">--%>
+                                        <%--<fmt:formatDate value="${projectControlTable.createDate}" pattern="yyyy-MM-dd" />--%>
+                                            <%--&lt;%&ndash;<input type="hidden" name="projectControlTableList[${status.index}].createDate" value="${projectControlTable.createDate}">&ndash;%&gt;--%>
+                                            <%--&lt;%&ndash;<input type="hidden" name="projectControlTableList[${status.index}].updateDate" value="${projectControlTable.updateDate}">&ndash;%&gt;--%>
+                                            <%--&lt;%&ndash;<input type="hidden" name="projectControlTableList[${status.index}].delFlag" value="${projectControlTable.delFlag}">&ndash;%&gt;--%>
+                                            <%--&lt;%&ndash;<input type="hidden" name="projectControlTableList[${status.index}].createBy.id" value="${projectControlTable.createBy.id}">&ndash;%&gt;--%>
+                                    <%--</td>--%>
+                                    <%--<td class="op-td text-center">--%>
+                                        <%--<div class="op-btn-box">--%>
+                                            <%--&lt;%&ndash;<shiro:hasPermission name="projectcontentinfo:projectBasedData:view">&ndash;%&gt;--%>
+                                        <%--<a href="#" onclick="openDialogView('查看过程控制明细', '${ctx}/projectcontroltable/projectControlTable/form?id=${projectControlTable.id}&view=view','90%', '90%')" class="op-btn op-btn-view" ><i class="fa fa-search-plus"></i> 查看</a>--%>
+                                            <%--&lt;%&ndash;</shiro:hasPermission>&ndash;%&gt;--%>
+                                            <%--&lt;%&ndash;<shiro:hasPermission name="projectcontentinfo:projectBasedData:del">&ndash;%&gt;--%>
+                                        <%--<a href="javascript:initControlData('0','#tr${status.index}','del','${projectControlTable.id}')" onclick="return confirmx('确认要删除该过程控制数据吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>--%>
+                                            <%--&lt;%&ndash;</shiro:hasPermission>&ndash;%&gt;--%>
+                                        <%--</div>--%>
+                                    <%--</td>--%>
+                                <%--</tr>--%>
+                            <%--</c:forEach>--%>
+                        <%--</c:when>--%>
+                        <%--<c:otherwise>--%>
+                            <%--<tr>--%>
+                                <%--<td colspan="5" align="center">暂无数据</td>--%>
+                            <%--</tr>--%>
+                        <%--</c:otherwise>--%>
+                    <%--</c:choose>--%>
+                    <%--</tbody>--%>
+                    <%--</table>--%>
+                <%--</div>--%>
+            <%--</div>--%>
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>附件信息</h2></div>
                 <div class="layui-item nav-btns">

+ 12 - 8
src/main/webapp/webpage/modules/projectcontentinfo/workContentView.jsp

@@ -404,12 +404,12 @@
             <form:hidden path="id"/>
             <div class="form-group layui-row first lw12">
                 <div class="form-group-label"><h2>基本信息</h2></div>
-                <div class="layui-item layui-col-sm6">
-                    <label class="layui-form-label"><span class="require-item">*</span>工作内容类型:</label>
-                    <div class="layui-input-block">
-                        <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${fns:getContentTypeName(projectcontentinfo.projectContentData.type,"")}"/>
-                    </div>
-                </div>
+                <%--<div class="layui-item layui-col-sm6">--%>
+                    <%--<label class="layui-form-label"><span class="require-item">*</span>工作内容类型:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<input htmlEscape="false" readonly="true" class="form-control layui-input" value="${fns:getContentTypeName(projectcontentinfo.projectContentData.type,"")}"/>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label">工作内容编号:</label>
                     <div class="layui-input-block">
@@ -437,8 +437,12 @@
             </div>
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>内容详情</h2></div>
-                <div style="padding: 0 15px;">
-                    <div id="contentDetail"></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>说明:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="projectContentData.remarks"  htmlEscape="false" readonly="true"  id="note"  class="form-control layui-textarea"  cols="30" rows="10" align="center"
+                                       />
+                    </div>
                 </div>
             </div>
             <div class="form-group layui-row">

+ 24 - 24
src/main/webapp/webpage/modules/projectrecord/projectRecordsList.jsp

@@ -182,23 +182,23 @@
 <div class="wrapper wrapper-content">
 	<sys:message content="${message}"/>
 	<div class="layui-row">
-		<div class="full-width fl">
-			<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
-				<ul class="list-tabs" >
-					<li class="active"><a href="${ctx}/project/projectRecords/list">项目登记列表</a></li>
-					<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>
-				</ul>
-			</div>
-
-			<%--<div class="layui-row" id="tabDiv">--%>
-			<%--<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">--%>
-			<%--<ul class="layui-tab-title">--%>
-			<%--<li class="layui-this"><a href="${ctx}/project/projectRecords/list">项目登记列表</a></li>--%>
-			<%--<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>--%>
-			<%--</ul>--%>
+		<%--<div class="full-width fl">--%>
+			<%--<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">--%>
+				<%--<ul class="list-tabs" >--%>
+					<%--<li class="active"><a href="${ctx}/project/projectRecords/list">项目登记列表</a></li>--%>
+					<%--<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>--%>
+				<%--</ul>--%>
 			<%--</div>--%>
-			<%--</div>--%>
-		</div>
+
+			<%--&lt;%&ndash;<div class="layui-row" id="tabDiv">&ndash;%&gt;--%>
+			<%--&lt;%&ndash;<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">&ndash;%&gt;--%>
+			<%--&lt;%&ndash;<ul class="layui-tab-title">&ndash;%&gt;--%>
+			<%--&lt;%&ndash;<li class="layui-this"><a href="${ctx}/project/projectRecords/list">项目登记列表</a></li>&ndash;%&gt;--%>
+			<%--&lt;%&ndash;<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>&ndash;%&gt;--%>
+			<%--&lt;%&ndash;</ul>&ndash;%&gt;--%>
+			<%--&lt;%&ndash;</div>&ndash;%&gt;--%>
+			<%--&lt;%&ndash;</div>&ndash;%&gt;--%>
+		<%--</div>--%>
 		<div class="full-width fl">
 			<div class="layui-row contentShadow shadowLR" id="queryDiv">
 				<form:form id="searchForm" modelAttribute="projectRecords" action="${ctx}/project/projectRecords/" method="post" class="form-inline">
@@ -343,10 +343,10 @@
                         {
                             xml+="<a href=\"#\" onclick=\"openDialogre('修改项目', '${ctx}/project/projectRecords/form?id=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
                         }
-                        if(d.canedit2 != undefined && d.canedit2 =="1")
-                        {
-                            xml+="<a href=\"#\" onclick=\"openDialogre('调整项目', '${ctx}/project/projectRecords/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
-                        }
+                        <%--if(d.canedit2 != undefined && d.canedit2 =="1")--%>
+                        <%--{--%>
+                            <%--xml+="<a href=\"#\" onclick=\"openDialogre('调整项目', '${ctx}/project/projectRecords/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";--%>
+                        <%--}--%>
                         if(d.canrecall != undefined && d.canrecall =="1")
                         {
                             xml+="<a href=\"#\" onclick=\"openDialogre('调整项目', '${ctx}/project/projectRecords/form?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
@@ -359,10 +359,10 @@
                         {
                             xml+="<a href=\"${ctx}/project/projectRecords/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该项目审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
                         }
-                        if(d.canedit3 != undefined && d.canedit3 =="1")
-                        {
-                            xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogre('项目变更管理', '${ctx}/project/projectRecordsAlter/form?alterBeforeRecords.id='+encodeURIComponent('" + d.id + "'),'95%','95%','','送审,暂存,关闭')\" style=\"color: white;background: darkseagreen\" class=\"op-btn op-btn-op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";
-                        }
+                        <%--if(d.canedit3 != undefined && d.canedit3 =="1")--%>
+                        <%--{--%>
+                            <%--xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogre('项目变更管理', '${ctx}/project/projectRecordsAlter/form?alterBeforeRecords.id='+encodeURIComponent('" + d.id + "'),'95%','95%','','送审,暂存,关闭')\" style=\"color: white;background: darkseagreen\" class=\"op-btn op-btn-op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";--%>
+                        <%--}--%>
                         return xml;
 
                     }}

+ 33 - 13
src/main/webapp/webpage/modules/workadministrativeatamp/workAdministrativeAtampAudit.jsp

@@ -58,38 +58,58 @@
                 <form:hidden path="act.taskDefKey"/>
                 <form:hidden path="act.procInsId"/>
                 <form:hidden path="act.procDefId"/>
+                <form:hidden path="project.id"/>
                 <form:hidden id="flag" path="act.flag"/>
                 <div class="form-group layui-row first">
                     <div class="form-group-label"><h2>基本信息</h2></div>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>文档类型:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input type="text" readonly="readonly" class="form-control layui-input" value="${fns:getMainDictLabel(workAdministrativeAtamp.docType, 'sign_doc_type', '')}"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
                     <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>文档类型:</label>
+                        <label class="layui-form-label">用印类型:</label>
                         <div class="layui-input-block">
-                            <input type="text" readonly="readonly" class="form-control layui-input" value="${fns:getMainDictLabel(workAdministrativeAtamp.docType, 'sign_doc_type', '')}"/>
+                            <input readonly="true" htmlEscape="false" class="form-control layui-input"
+                                   value="<c:choose><c:when test="${workAdministrativeAtamp.ext == 0}">项目用印</c:when><c:otherwise>非项目用印</c:otherwise></c:choose>"/>
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>申请编号:</label>
+                        <label class="layui-form-label">项目名称:</label>
                         <div class="layui-input-block">
-                            <div class="input-group">
-                                <form:input path="num" 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 workAdministrativeAtamp.state}">${fns:getDictLabel(workAdministrativeAtamp.state, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
-                             </span>
-                            </div>
+                            <form:input  path="project.projectName" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>签章公司:</label>
+                        <label class="layui-form-label">项目编号:</label>
                         <div class="layui-input-block">
-                            <input type="text" readonly="readonly" class="form-control layui-input" value="${workAdministrativeAtamp.comSign.name}"/>
+                            <form:input  path="project.projectId" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>印章类型:</label>
+                        <label class="layui-form-label"><span class="require-item">*</span>申请编号:</label>
                         <div class="layui-input-block">
-                            <input type="text" readonly="readonly" class="form-control layui-input" value="${fns:getMainDictLabel(workAdministrativeAtamp.sealType, 'seal_type', '')}"/>
+                            <div class="input-group">
+                                <form:input path="num" 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 workAdministrativeAtamp.state}">${fns:getDictLabel(workAdministrativeAtamp.state, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
+                             </span>
+                            </div>
                         </div>
                     </div>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>签章公司:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input type="text" readonly="readonly" class="form-control layui-input" value="${workAdministrativeAtamp.comSign.name}"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>印章类型:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input type="text" readonly="readonly" class="form-control layui-input" value="${fns:getMainDictLabel(workAdministrativeAtamp.sealType, 'seal_type', '')}"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
                     <div class="layui-item layui-col-sm6">
                         <label class="layui-form-label"><span class="require-item">*</span>申请人:</label>
                         <div class="layui-input-block">

+ 74 - 22
src/main/webapp/webpage/modules/workadministrativeatamp/workAdministrativeAtampForm.jsp

@@ -2,7 +2,7 @@
 <%@ include file="/webpage/include/taglib.jsp"%>
 <html>
 <head>
-	<title>行政盖章管理</title>
+	<title>盖章管理</title>
 	<meta name="decorator" content="default"/>
     <style>
         label.error{
@@ -24,6 +24,19 @@
 		  return false;
 		}
         $(document).ready(function() {
+            $("input[name='ext']").on('ifChecked', function(event){
+                var radioVal = $(this).val();
+                if(radioVal == 0){
+                    $(".td1").removeClass("hide");
+                }else{
+                    $(".td1").addClass("hide");
+                }
+            });
+            if("${workReimbursement.ext}" == "1"){
+                $("#ext1").iCheck('check')
+            }else{
+                $("#ext").iCheck('check')
+            }
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
@@ -59,6 +72,21 @@
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
         }
+        function setPNumber(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoice/workInvoice/getPNumber',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#pNumber").val(d.pNumber);
+                    $("#cInfoName").val(d.cInfoName);
+                    $("#cName").val(d.cName);
+                }
+            })
+        }
 	</script>
 </head>
 <body>
@@ -68,13 +96,37 @@
             <form:hidden path="id"/>
                 <div class="form-group layui-row first">
                     <div class="form-group-label"><h2>基本信息</h2></div>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>文档类型:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<form:select path="docType" class="form-control simple-select required">--%>
+                                <%--<form:option value="" label=""/>--%>
+                                <%--<form:options items="${fns:getMainDictList('sign_doc_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+                            <%--</form:select>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
                     <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>文档类型:</label>
+                        <label class="layui-form-label"><span class="require-item">*</span>用印类型:</label>
+                        <div class="layui-input-block">
+                            <input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
+                            <label for="ext">项目用印</label>
+                            <input type="radio" class="i-checks" name="ext" id="ext1" value="1">
+                            <label for="ext1">非项目用印</label>
+                                <%--<input type="text" name="title" lay-verify="title" autocomplete="off" readonly="true" placeholder="" class="layui-input" value="全过程管理用户01">--%>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 td1">
+                        <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+                        <div class="layui-input-block  with-icon">
+                            <input type="hidden" value="" id ="ids">
+                            <sys:gridselectcallprojectt url="${ctx}/workinvoice/workInvoice/selectproject" id="project" name="project.id"  value="${workAdministrativeAtamp.project.id}"  title="选择所属项目" labelName="projectApproval.project.projectName"
+                                                        labelValue="${workAdministrativeAtamp.project.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 td1">
+                        <label class="layui-form-label"><span class="require-item">*</span>项目编号:</label>
                         <div class="layui-input-block">
-                            <form:select path="docType" class="form-control simple-select required">
-                                <form:option value="" label=""/>
-                                <form:options items="${fns:getMainDictList('sign_doc_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-                            </form:select>
+                            <form:input id ="pNumber" path="project.projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm6">
@@ -88,22 +140,22 @@
                             </div>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>签章公司:</label>
-                        <div class="layui-input-block with-icon">
-                            <sys:treeselect id="comSign" name="comSign.id" value="${workAdministrativeAtamp.comSign.id}" labelName="comSign.name" labelValue="${workAdministrativeAtamp.comSign.name}"
-                                            title="签章公司" url="/sys/office/treeDataCompany?type=2" cssClass="form-control layui-input required" allowClear="true" />
-                        </div>
-                    </div>
-                    <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>印章类型:</label>
-                        <div class="layui-input-block">
-                            <form:select path="sealType" class="form-control simple-select required">
-                                <form:option value="" label=""/>
-                                <form:options items="${fns:getMainDictList('seal_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-                            </form:select>
-                        </div>
-                    </div>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>签章公司:</label>--%>
+                        <%--<div class="layui-input-block with-icon">--%>
+                            <%--<sys:treeselect id="comSign" name="comSign.id" value="${workAdministrativeAtamp.comSign.id}" labelName="comSign.name" labelValue="${workAdministrativeAtamp.comSign.name}"--%>
+                                            <%--title="签章公司" url="/sys/office/treeDataCompany?type=2" cssClass="form-control layui-input required" allowClear="true" />--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>印章类型:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<form:select path="sealType" class="form-control simple-select required">--%>
+                                <%--<form:option value="" label=""/>--%>
+                                <%--<form:options items="${fns:getMainDictList('seal_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+                            <%--</form:select>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
                     <div class="layui-item layui-col-sm6">
                         <label class="layui-form-label"><span class="require-item">*</span>申请人:</label>
                         <div class="layui-input-block">

+ 38 - 37
src/main/webapp/webpage/modules/workadministrativeatamp/workAdministrativeAtampList.jsp

@@ -2,7 +2,7 @@
 <%@ include file="/webpage/include/taglib.jsp"%>
 <html>
 <head>
-	<title>行政盖章管理</title>
+	<title>用印申请管理</title>
 	<meta name="decorator" content="default"/>
     <style>
         .widthClass{
@@ -192,18 +192,24 @@
                         <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                         <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
                         <div class="commonQuery">
-                            <div class="layui-item query athird">
-                                <label class="layui-form-label">申请日期:</label>
-                                <div class="layui-input-block with-icon">
-                                    <input id="beginDate" name="beginDate" type="text" readonly="readonly" placeholder="开始时间" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
-                                           value="<fmt:formatDate value="${workAdministrativeAtamp.beginDate}" pattern="yyyy-MM-dd"/>"/>
-                                    </input>
-                                    <span class="group-sep">-</span>
-                                    <input id="endDate" name="endDate" type="text" readonly="readonly" placeholder="结束时间" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
-                                           value="<fmt:formatDate value="${workAdministrativeAtamp.endDate}" pattern="yyyy-MM-dd"/>"/>
-                                    </input>
+                            <%--<div class="layui-item query athird">--%>
+                                <%--<label class="layui-form-label">申请日期:</label>--%>
+                                <%--<div class="layui-input-block with-icon">--%>
+                                    <%--<input id="beginDate" name="beginDate" type="text" readonly="readonly" placeholder="开始时间" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"--%>
+                                           <%--value="<fmt:formatDate value="${workAdministrativeAtamp.beginDate}" pattern="yyyy-MM-dd"/>"/>--%>
+                                    <%--</input>--%>
+                                    <%--<span class="group-sep">-</span>--%>
+                                    <%--<input id="endDate" name="endDate" type="text" readonly="readonly" placeholder="结束时间" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"--%>
+                                           <%--value="<fmt:formatDate value="${workAdministrativeAtamp.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:input path="project.projectName" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                                    </div>
                                 </div>
-                            </div>
                             <div class="layui-item query athird">
                                 <label class="layui-form-label">申请人:</label>
                                 <div class="layui-input-block">
@@ -226,21 +232,16 @@
                                     <form:input path="num" 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">
-                                    <form:select path="docType" class="form-control layui-input required">
-                                        <form:option value="" label=""/>
-                                        <form:options items="${fns:getMainDictList('sign_doc_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-                                    </form:select>
-                                </div>
-                            </div>
-                            <div class="layui-item query athird">
-                                <label class="layui-form-label">签章公司:</label>
-                                <div class="layui-input-block">
-                                    <form:input path="comSign.name" 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">--%>
+                                    <%--<form:select path="docType" class="form-control layui-input required">--%>
+                                        <%--<form:option value="" label=""/>--%>
+                                        <%--<form:options items="${fns:getMainDictList('sign_doc_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+                                    <%--</form:select>--%>
+                                <%--</div>--%>
+                            <%--</div>--%>
+
                             <div class="layui-item query athird">
                                 <label class="layui-form-label">申请状态:</label>
                                 <div class="layui-input-block">
@@ -260,7 +261,7 @@
                 <div class="contentShadow layui-form contentDetails">
                     <div class="nav-btns">
                         <shiro:hasPermission name="workadministrativeatamp:workAdministrativeAtamp:add">
-                            <table:addRow url="${ctx}/workadministrativeatamp/workAdministrativeAtamp/form" title="行政盖章"></table:addRow><!-- 增加按钮 -->
+                            <table:addRow url="${ctx}/workadministrativeatamp/workAdministrativeAtamp/form" title="项目盖章"></table:addRow><!-- 增加按钮 -->
                         </shiro:hasPermission>
                         <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
                         <div style="clear: both;"></div>
@@ -285,12 +286,12 @@
                 ,cols: [[
                     {field:'index',align:'center', title: '序号',width:40}
                     ,{field:'num',align:'center', title: '申请编号',minWidth:200,templet:function(d){
-                            var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看行政盖章', '${ctx}/workadministrativeatamp/workAdministrativeAtamp/view?id="+d.id+"','95%','95%')\">" +
+                            var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看用印申请', '${ctx}/workadministrativeatamp/workAdministrativeAtamp/view?id="+d.id+"','95%','95%')\">" +
                                 "<span title=" + d.num + ">" + d.num + "</span></a>";
                             return xml;
                         }}
-                    ,{field:'docType',align:'center', title: '文档类型',minWidth:150}
-                    ,{field:'comSign',align:'center', title: '签章公司',minWidth:150}
+                    // ,{field:'docType',align:'center', title: '文档类型',minWidth:150}
+                    ,{field:'comSign',align:'center', title: '项目名称',minWidth:150}
                     ,{field:'submiter',align:'center', title: '申请人', minWidth:150}
                     ,{field:'submitDate', align:'center',sort:true,title: '申请日期',minWidth:200}
                     ,{align:'center', title: '申请状态',  width:70,templet:function(d){
@@ -303,19 +304,19 @@
                             var xml = "";
 
                             if(d.canedit != undefined && d.canedit == "1"){
-                                xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改行政盖章', '${ctx}/workadministrativeatamp/workAdministrativeAtamp/form?id=" + d.id+"','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>修改</a>"
+                                xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改用印申请', '${ctx}/workadministrativeatamp/workAdministrativeAtamp/form?id=" + d.id+"','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>修改</a>"
                             }
                             if(d.canmodify != undefined && d.canmodify =="1"){
-                                xml+="<a href=\"#\" onclick=\"openDialogre('修改行政盖章', '${ctx}/workadministrativeatamp/workAdministrativeAtamp/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                                xml+="<a href=\"#\" onclick=\"openDialogre('修改用印申请', '${ctx}/workadministrativeatamp/workAdministrativeAtamp/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
                             }
                             if(d.canrecall != undefined && d.canrecall =="1"){
-                                xml+="<a href=\"#\" onclick=\"openDialogre('修改行政盖章', '${ctx}/workadministrativeatamp/workAdministrativeAtamp/form?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                                xml+="<a href=\"#\" onclick=\"openDialogre('修改用印申请', '${ctx}/workadministrativeatamp/workAdministrativeAtamp/form?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
                             }
                             if(d.candelete != undefined && d.candelete == "1"){
-                                xml +="<a href=\"${ctx}/workadministrativeatamp/workAdministrativeAtamp/delete?id=" + d.id+"\" onclick=\"return confirmx('确认要删除该行政盖章吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+                                xml +="<a href=\"${ctx}/workadministrativeatamp/workAdministrativeAtamp/delete?id=" + d.id+"\" onclick=\"return confirmx('确认要删除该用印申请吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
                             }
                             if(d.cancancel != undefined && d.cancancel =="1"){
-                                xml+="<a href=\"${ctx}/workadministrativeatamp/workAdministrativeAtamp/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该行政盖章审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
+                                xml+="<a href=\"${ctx}/workadministrativeatamp/workAdministrativeAtamp/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该用印申请审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
                             }
 
                             return xml;
@@ -330,7 +331,7 @@
                         ,"id":"${workAdministrativeAtamp.id}"
                         ,"num":"<c:out value="${workAdministrativeAtamp.num}" escapeXml="true"/>"
                         ,'docType':"${fns:getMainDictLabel(workAdministrativeAtamp.docType, 'sign_doc_type', '')}"
-                        ,'comSign':"${workAdministrativeAtamp.comSign.name}"
+                        ,'comSign':"${workAdministrativeAtamp.project.projectName}"
                         ,'submiter':"${workAdministrativeAtamp.submiter.name}"
                         ,"submitDate":"<fmt:formatDate value="${workAdministrativeAtamp.submitDate}" pattern="yyyy-MM-dd"/>"
                         ,"state":"${workAdministrativeAtamp.state}"

+ 73 - 21
src/main/webapp/webpage/modules/workadministrativeatamp/workAdministrativeAtampModifyApply.jsp

@@ -15,6 +15,19 @@
 		  return false;
 		}
         $(document).ready(function() {
+            $("input[name='ext']").on('ifChecked', function(event){
+                var radioVal = $(this).val();
+                if(radioVal == 0){
+                    $(".td1").removeClass("hide");
+                }else{
+                    $(".td1").addClass("hide");
+                }
+            });
+            if("${workReimbursement.ext}" == "1"){
+                $("#ext1").iCheck('check')
+            }else{
+                $("#ext").iCheck('check')
+            }
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
@@ -50,6 +63,21 @@
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
         }
+        function setPNumber(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoice/workInvoice/getPNumber',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#pNumber").val(d.pNumber);
+                    $("#cInfoName").val(d.cInfoName);
+                    $("#cName").val(d.cName);
+                }
+            })
+        }
 	</script>
 </head>
 <body>
@@ -66,13 +94,37 @@
                 <form:hidden id="flag" path="act.flag"/>
                 <div class="form-group layui-row first">
                     <div class="form-group-label"><h2>基本信息</h2></div>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>文档类型:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<form:select path="docType" class="form-control simple-select required">--%>
+                                <%--<form:option value="" label=""/>--%>
+                                <%--<form:options items="${fns:getMainDictList('doc_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+                            <%--</form:select>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label"><span class="require-item">*</span>用印类型:</label>
+                        <div class="layui-input-block">
+                            <input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
+                            <label for="ext">项目用印</label>
+                            <input type="radio" class="i-checks" name="ext" id="ext1" value="1">
+                            <label for="ext1">非项目用印</label>
+                                <%--<input type="text" name="title" lay-verify="title" autocomplete="off" readonly="true" placeholder="" class="layui-input" value="全过程管理用户01">--%>
+                        </div>
+                    </div>
                     <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>文档类型:</label>
+                        <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+                        <div class="layui-input-block  with-icon">
+                            <input type="hidden" value="" id ="ids">
+                            <sys:gridselectcallprojectt url="${ctx}/workinvoice/workInvoice/selectproject" id="project" name="project.id"  value="${workAdministrativeAtamp.project.id}"  title="选择所属项目" labelName="projectApproval.project.projectName"
+                                                        labelValue="${workAdministrativeAtamp.project.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label"><span class="require-item">*</span>项目编号:</label>
                         <div class="layui-input-block">
-                            <form:select path="docType" class="form-control simple-select required">
-                                <form:option value="" label=""/>
-                                <form:options items="${fns:getMainDictList('doc_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-                            </form:select>
+                            <form:input id ="pNumber" path="project.projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm6">
@@ -86,22 +138,22 @@
                             </div>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>签章公司:</label>
-                        <div class="layui-input-block with-icon">
-                            <sys:treeselect id="comSign" name="comSign.id" value="${workAdministrativeAtamp.comSign.id}" labelName="comSign.name" labelValue="${workAdministrativeAtamp.comSign.name}"
-                                            title="签章公司" url="/sys/office/treeDataCompany?type=2" cssClass="form-control layui-input required" allowClear="true" />
-                        </div>
-                    </div>
-                    <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>印章类型:</label>
-                        <div class="layui-input-block">
-                            <form:select path="sealType" class="form-control simple-select required">
-                                <form:option value="" label=""/>
-                                <form:options items="${fns:getMainDictList('seal_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-                            </form:select>
-                        </div>
-                    </div>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>签章公司:</label>--%>
+                        <%--<div class="layui-input-block with-icon">--%>
+                            <%--<sys:treeselect id="comSign" name="comSign.id" value="${workAdministrativeAtamp.comSign.id}" labelName="comSign.name" labelValue="${workAdministrativeAtamp.comSign.name}"--%>
+                                            <%--title="签章公司" url="/sys/office/treeDataCompany?type=2" cssClass="form-control layui-input required" allowClear="true" />--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>印章类型:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<form:select path="sealType" class="form-control simple-select required">--%>
+                                <%--<form:option value="" label=""/>--%>
+                                <%--<form:options items="${fns:getMainDictList('seal_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+                            <%--</form:select>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
                     <div class="layui-item layui-col-sm6">
                         <label class="layui-form-label"><span class="require-item">*</span>申请人:</label>
                         <div class="layui-input-block">

+ 32 - 13
src/main/webapp/webpage/modules/workadministrativeatamp/workAdministrativeAtampView.jsp

@@ -12,35 +12,54 @@
             <form:hidden path="id"/>
                 <div class="form-group layui-row first">
                     <div class="form-group-label"><h2>基本信息</h2></div>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>文档类型:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input type="text" readonly="readonly" class="form-control layui-input" value="${fns:getMainDictLabel(workAdministrativeAtamp.docType, 'sign_doc_type', '')}"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
                     <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>文档类型:</label>
+                        <label class="layui-form-label">用印类型:</label>
                         <div class="layui-input-block">
-                            <input type="text" readonly="readonly" class="form-control layui-input" value="${fns:getMainDictLabel(workAdministrativeAtamp.docType, 'sign_doc_type', '')}"/>
+                            <input readonly="true" htmlEscape="false" class="form-control layui-input"
+                                   value="<c:choose><c:when test="${workAdministrativeAtamp.ext == 0}">项目用印</c:when><c:otherwise>非项目用印</c:otherwise></c:choose>"/>
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>申请编号:</label>
+                        <label class="layui-form-label">项目名称:</label>
                         <div class="layui-input-block">
-                            <div class="input-group">
-                                <form:input path="num" 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 workAdministrativeAtamp.state}">${fns:getDictLabel(workAdministrativeAtamp.state, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
-                             </span>
-                            </div>
+                            <form:input  path="project.projectName" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>签章公司:</label>
+                        <label class="layui-form-label">项目编号:</label>
                         <div class="layui-input-block">
-                            <input type="text" readonly="readonly" class="form-control layui-input" value="${workAdministrativeAtamp.comSign.name}"/>
+                            <form:input  path="project.projectId" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
                         </div>
                     </div>
                     <div class="layui-item layui-col-sm6">
-                        <label class="layui-form-label"><span class="require-item">*</span>印章类型:</label>
+                        <label class="layui-form-label"><span class="require-item">*</span>申请编号:</label>
                         <div class="layui-input-block">
-                            <input type="text" readonly="readonly" class="form-control layui-input" value="${fns:getMainDictLabel(workAdministrativeAtamp.sealType, 'seal_type', '')}"/>
+                            <div class="input-group">
+                                <form:input path="num" 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 workAdministrativeAtamp.state}">${fns:getDictLabel(workAdministrativeAtamp.state, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
+                             </span>
+                            </div>
                         </div>
                     </div>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>签章公司:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input type="text" readonly="readonly" class="form-control layui-input" value="${workAdministrativeAtamp.comSign.name}"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item layui-col-sm6">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>印章类型:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input type="text" readonly="readonly" class="form-control layui-input" value="${fns:getMainDictLabel(workAdministrativeAtamp.sealType, 'seal_type', '')}"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
                     <div class="layui-item layui-col-sm6">
                         <label class="layui-form-label"><span class="require-item">*</span>申请人:</label>
                         <div class="layui-input-block">

+ 2 - 2
src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp

@@ -408,8 +408,8 @@
                     <label class="layui-form-label"><span class="require-item">*</span>客户名称:&nbsp;&nbsp;</label>
                     <div class="layui-input-block">
                         <form:input path="name" htmlEscape="false" id="name" class="form-control required layui-input"/>
-                        <a onclick="fuzzyQuery()"  class="nav-btn nav-btn-add" style="margin-right: 0px;top:0px;right:1px;position: absolute;height:40px;line-height: 40px;">查询</a>
-                        <span id="ph" style="color:#cc5965"></span>
+                        <%--<a onclick="fuzzyQuery()"  class="nav-btn nav-btn-add" style="margin-right: 0px;top:0px;right:1px;position: absolute;height:40px;line-height: 40px;">查询</a>--%>
+                        <%--<span id="ph" style="color:#cc5965"></span>--%>
                     </div>
                     <div id="fuzzyQuerySelect"
                          style="z-index:1;display:none;background-color:white; position: relative; width:333px;left:120px; border: 1px solid gray;">

+ 69 - 60
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp

@@ -64,25 +64,25 @@
                 }
             });
 
-            $("input[name='ext']").on('ifChecked', function(event){
-                var radioVal = $(this).val();
-                if(radioVal == 0){
-                    $("#td1").removeClass("hide");
-                    $("#td2").addClass("hide");
-                    $("#tr1").show()
-                    $("#tr2").show()
-                }else{
-                    $("#td1").addClass("hide");
-                    $("#td2").removeClass("hide");
-                    $("#tr1").hide()
-                    $("#tr2").hide()
-                }
-            });
-            if("${workContractInfo.ext}" == "1"){
-                $("#ext1").iCheck('check')
-            }else{
-                $("#ext").iCheck('check')
-            }
+            <%--$("input[name='ext']").on('ifChecked', function(event){--%>
+                <%--var radioVal = $(this).val();--%>
+                <%--if(radioVal == 0){--%>
+                    <%--$("#td1").removeClass("hide");--%>
+                    <%--$("#td2").addClass("hide");--%>
+                    <%--$("#tr1").show()--%>
+                    <%--$("#tr2").show()--%>
+                <%--}else{--%>
+                    <%--$("#td1").addClass("hide");--%>
+                    <%--$("#td2").removeClass("hide");--%>
+                    <%--$("#tr1").hide()--%>
+                    <%--$("#tr2").hide()--%>
+                <%--}--%>
+            <%--});--%>
+            <%--if("${workContractInfo.ext}" == "1"){--%>
+                <%--$("#ext1").iCheck('check')--%>
+            <%--}else{--%>
+                <%--$("#ext").iCheck('check')--%>
+            <%--}--%>
 
             // getRandom();
             $("#contractFee").change(function(){
@@ -628,15 +628,15 @@
 					<div id="tab-11" class="tab-pane active">
 						<div class="form-group layui-row first lw9">
 							<div class="form-group-label"><h2>合同基础信息</h2></div>
-							<div class="layui-item layui-col-sm6">
-								<label class="layui-form-label"><span class="require-item">*</span>合同来源:</label>
-								<div class="layui-input-block">
-									<input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
-									<label for="ext">投标项目</label>
-									<input type="radio" class="i-checks" name="ext" id="ext1" value="1">
-									<label for="ext1">非投标项目</label>
-								</div>
-							</div>
+							<%--<div class="layui-item layui-col-sm6">--%>
+								<%--<label class="layui-form-label"><span class="require-item">*</span>合同来源:</label>--%>
+								<%--<div class="layui-input-block">--%>
+									<%--<input type="radio" class="i-checks" name="ext" checked id="ext" value="0">--%>
+									<%--<label for="ext">投标项目</label>--%>
+									<%--<input type="radio" class="i-checks" name="ext" id="ext1" value="1">--%>
+									<%--<label for="ext1">非投标项目</label>--%>
+								<%--</div>--%>
+							<%--</div>--%>
 							<div class="layui-item layui-col-sm6">
 								<label class="layui-form-label">合同编号:</label>
 								<div class="layui-input-block">
@@ -648,21 +648,21 @@
 									</div>
 								</div>
 							</div>
-							<div class="layui-item layui-col-sm6" id="tr1">
-								<label class="layui-form-label"><span class="require-item">*</span>投标项目:</label>
-								<div class="layui-input-block with-icon">
-									<input type="hidden" value="" id ="ids">
-									<sys:gridselectcallprojectt url="${ctx}/workinvoice/workInvoice/selectprojectt" id="project" name="project.id"  value="${workContractInfo.project.id}"  title="选择投标项目" labelName="workContractInfo.project.projectName"
-																labelValue="${workContractInfo.project.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+							<%--<div class="layui-item layui-col-sm6" id="tr1">--%>
+								<%--<label class="layui-form-label"><span class="require-item">*</span>投标项目:</label>--%>
+								<%--<div class="layui-input-block with-icon">--%>
+									<%--<input type="hidden" value="" id ="ids">--%>
+									<%--<sys:gridselectcallprojectt url="${ctx}/workinvoice/workInvoice/selectprojectt" id="project" name="project.id"  value="${workContractInfo.project.id}"  title="选择投标项目" labelName="workContractInfo.project.projectName"--%>
+																<%--labelValue="${workContractInfo.project.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>--%>
 
-								</div>
-							</div>
-							<div class="layui-item layui-col-sm6" id="tr2">
-								<label class="layui-form-label">投标编号:</label>
-								<div class="layui-input-block">
-									<form:input id ="pNumber" path="project.projectNumber" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
-								</div>
-							</div>
+								<%--</div>--%>
+							<%--</div>--%>
+							<%--<div class="layui-item layui-col-sm6" id="tr2">--%>
+								<%--<label class="layui-form-label">投标编号:</label>--%>
+								<%--<div class="layui-input-block">--%>
+									<%--<form:input id ="pNumber" path="project.projectNumber" htmlEscape="false"  readonly="true" class="form-control layui-input"/>--%>
+								<%--</div>--%>
+							<%--</div>--%>
 							<%--<div class="layui-item layui-col-sm6">--%>
 								<%--<label class="layui-form-label"><span class="require-item">*</span>合同名称:</label>--%>
 								<%--<div class="layui-input-block">--%>
@@ -743,24 +743,24 @@
 									<form:input path="anotherContractNum" htmlEscape="false" class="form-control layui-input"/>
 								</div>
 							</div>
-							<div class="layui-item layui-col-sm6 ">
-								<label class="layui-form-label"><span class="require-item">*</span>工程分类:</label>
-								<div class="layui-input-block">
-									<form:select path="contractType" cssClass="form-control required simple-select">
-										<form:option value="" label=""/>
-										<form:options items="${fns:getMainDictList('contract_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-									</form:select>
-									<style>
-										#contractType{
-											height:40px;
-											line-height: 40px;
-											-moz-box-sizing: border-box;
-											-webkit-box-sizing: border-box;
-											box-sizing: border-box;
-										}
-									</style>
-								</div>
-							</div>
+							<%--<div class="layui-item layui-col-sm6 ">--%>
+								<%--<label class="layui-form-label"><span class="require-item">*</span>工程分类:</label>--%>
+								<%--<div class="layui-input-block">--%>
+									<%--<form:select path="contractType" cssClass="form-control required simple-select">--%>
+										<%--<form:option value="" label=""/>--%>
+										<%--<form:options items="${fns:getMainDictList('contract_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+									<%--</form:select>--%>
+									<%--<style>--%>
+										<%--#contractType{--%>
+											<%--height:40px;--%>
+											<%--line-height: 40px;--%>
+											<%---moz-box-sizing: border-box;--%>
+											<%---webkit-box-sizing: border-box;--%>
+											<%--box-sizing: border-box;--%>
+										<%--}--%>
+									<%--</style>--%>
+								<%--</div>--%>
+							<%--</div>--%>
 							<div class="layui-item layui-col-sm6 ">
 								<label class="layui-form-label">归档状态:</label>
 								<div class="layui-input-block">
@@ -782,6 +782,15 @@
 									<input class="laydate-icondate form-control layui-input layer-date laydate-icon" id="createDate" name="createDate" value="<fmt:formatDate value="${workContractInfo.createDate}" pattern="yyyy-MM-dd"/>">
 								</div>
 							</div>
+							<div class="layui-item layui-col-sm6 ">
+								<label class="layui-form-label"><span class="require-item">*</span>付款方式:</label>
+								<div class="layui-input-block">
+									<form:select path="payment" cssClass="form-control required simple-select">
+										<form:option value="" label=""/>
+										<form:options items="${fns:getMainDictList('payment_type')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+									</form:select>
+								</div>
+							</div>
 
 							<div class="layui-item layui-col-sm12 with-textarea">
 								<label class="layui-form-label ">付款摘要:</label>

+ 44 - 44
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoList.jsp

@@ -400,17 +400,17 @@
 <div class="wrapper wrapper-content">
 	<sys:message content="${message}"/>
 	<div class="layui-row">
-		<div class="full-width fl">
-			<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
-				<ul class="list-tabs" >
-					<li class="active"><a href="${ctx}/workcontractinfo/workContractInfo/list">合同管理</a></li>
-					<li><a href="${ctx}/workcontractinfoalter/workContractInfoAlter/alterLists">合同变更</a></li>
-					<li><a href="${ctx}/workcontractinfoi/workContractInfoI/ilist">合同作废</a></li>
-					<li><a href="${ctx}/workcontractsignature/workContractSignature/list">合同签章</a></li>
-					<li><a href="${ctx}/workcontractrecord/workContractRecord/list">合同归档</a></li>
-				</ul>
-			</div>
-		</div>
+		<%--<div class="full-width fl">--%>
+			<%--<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">--%>
+				<%--<ul class="list-tabs" >--%>
+					<%--<li class="active"><a href="${ctx}/workcontractinfo/workContractInfo/list">合同管理</a></li>--%>
+					<%--<li><a href="${ctx}/workcontractinfoalter/workContractInfoAlter/alterLists">合同变更</a></li>--%>
+					<%--<li><a href="${ctx}/workcontractinfoi/workContractInfoI/ilist">合同作废</a></li>--%>
+					<%--<li><a href="${ctx}/workcontractsignature/workContractSignature/list">合同签章</a></li>--%>
+					<%--<li><a href="${ctx}/workcontractrecord/workContractRecord/list">合同归档</a></li>--%>
+				<%--</ul>--%>
+			<%--</div>--%>
+		<%--</div>--%>
 		<div class="full-width fl">
 			<div class="layui-row contentShadow shadowLR" id="queryDiv">
 				<form:form id="searchForm" modelAttribute="workContractInfo" action="${ctx}/workcontractinfo/workContractInfo/list" method="post" class="form-inline">
@@ -530,7 +530,7 @@
                 ,{field:'clientName',align:'center', title: '客户名称',minWidth:160,templet:function(d){
                         return "<a class=\"attention-info\" title=\""+d.clientName+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看客户管理', '${ctx}/workclientinfo/workClientInfo/detail?id=" + d.clientId +"','95%', '95%')\">" + d.clientName + "</a>";
                     }}
-                ,{field:'clientType', align:'center',title: '工程分类', width:90,templet:function(d){
+                ,{field:'clientType', align:'center',title: '合同类型', width:90,templet:function(d){
                         return "<span title='"+ d.clientType +"'>" + d.clientType + "</span>";
                     }}
                 ,{field:'contractPrice', align:'center',sort:true,title: '合同金额(元)',width:100,templet:function(d){
@@ -554,26 +554,26 @@
                 ,{align:'center',title:"操作",minWidth:180,templet:function(d){
                         ////对操作进行初始化
                         var xml="";
-                        if(d.signature != undefined && d.signature =="1")
-                        {
-                            xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('签章申请', '${ctx}/workcontractsignature/workContractSignature/form?id="+ d.id +"&tbal=1','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 签章</a>";
-                        }
-                        if(d.back != undefined && d.back =="1")
-                        {
-                            xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('归档申请', '${ctx}/workcontractrecord/workContractRecord/form?id="+ d.id +"&tabId=4','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 归档</a>";
-                        }
-                        if(d.canalter != undefined && d.canalter =="1")
-                        {
-                            xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogre('变更合同管理', '${ctx}/workcontractinfo/workContractInfo/alterForm?id="+ d.id +"','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";
-                        }
-                        if(d.caninvalid != undefined && d.caninvalid =="1")
-                        {
-                            xml += "<a href=\"javascript:void(0)\" onclick=\"contractInvalidateForm('合同作废送审', '${ctx}/workcontractinfo/workContractInfo/contractInvalidateForm?id=" + d.id + "&dialog=invalidateReasonForm','95%','95%')\"   class=\"op-btn op-btn-invalid\"><i class=\"fa fa-trash-o\"></i> 作废</a>";
-                        }
-                        if(d.canedit != undefined && d.canedit =="1")
-                        {
-                            xml +="<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogre('修改合同管理', '${ctx}/workcontractinfo/workContractInfo/form?id=" + d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
-                        }
+                        <%--if(d.signature != undefined && d.signature =="1")--%>
+                        <%--{--%>
+                            <%--xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('签章申请', '${ctx}/workcontractsignature/workContractSignature/form?id="+ d.id +"&tbal=1','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 签章</a>";--%>
+                        <%--}--%>
+                        <%--if(d.back != undefined && d.back =="1")--%>
+                        <%--{--%>
+                            <%--xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('归档申请', '${ctx}/workcontractrecord/workContractRecord/form?id="+ d.id +"&tabId=4','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 归档</a>";--%>
+                        <%--}--%>
+                        <%--if(d.canalter != undefined && d.canalter =="1")--%>
+                        <%--{--%>
+                            <%--xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogre('变更合同管理', '${ctx}/workcontractinfo/workContractInfo/alterForm?id="+ d.id +"','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";--%>
+                        <%--}--%>
+                        <%--if(d.caninvalid != undefined && d.caninvalid =="1")--%>
+                        <%--{--%>
+                            <%--xml += "<a href=\"javascript:void(0)\" onclick=\"contractInvalidateForm('合同作废送审', '${ctx}/workcontractinfo/workContractInfo/contractInvalidateForm?id=" + d.id + "&dialog=invalidateReasonForm','95%','95%')\"   class=\"op-btn op-btn-invalid\"><i class=\"fa fa-trash-o\"></i> 作废</a>";--%>
+                        <%--}--%>
+                        <%--if(d.canedit != undefined && d.canedit =="1")--%>
+                        <%--{--%>
+                            <%--xml +="<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogre('修改合同管理', '${ctx}/workcontractinfo/workContractInfo/form?id=" + d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";--%>
+                        <%--}--%>
 						if(d.canedits != undefined && d.canedits =="1")
 						{
 							xml +="<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('修改合同管理', '${ctx}/workcontractinfo/workContractInfo/form?id=" + d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
@@ -587,21 +587,21 @@
                             xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/revoke?id="+ d.id +"&processInstanceId="+ d.processInstanceId +"\" onclick=\"return confirmx('确认要撤回该合同管理吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
                         }
 
-                        if(d.canalterCom != undefined && d.canalterCom =="1")
-                        {
-							<shiro:hasPermission name="workcontractinfo:workContractInfo:contractPrice">
-								xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/saveCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要发起合同完成吗?', this.href)\"   class=\"op-btn op-btn-revert\"><i class=\"fa fa-edit\"></i> 完成</a>";
-							</shiro:hasPermission>
-                         }
+                        <%--if(d.canalterCom != undefined && d.canalterCom =="1")--%>
+                        <%--{--%>
+							<%--<shiro:hasPermission name="workcontractinfo:workContractInfo:contractPrice">--%>
+								<%--xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/saveCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要发起合同完成吗?', this.href)\"   class=\"op-btn op-btn-revert\"><i class=\"fa fa-edit\"></i> 完成</a>";--%>
+							<%--</shiro:hasPermission>--%>
+                         <%--}--%>
                         if(d.canalterComRevoke != undefined && d.canalterComRevoke =="1")
                         {
                             xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/revokeCompletion?id="+ d.id +"\" onclick=\"return confirmx('确认要撤回该合同管理吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
                         }
-                        if(d.canalterComDel != undefined && d.canalterComDel =="1")
-                        {
-                           <%--/* xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/saveCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要发起合同完成吗?', this.href)\"   class=\"op-btn op-btn-revert\"><i class=\"fa fa-edit\"></i> 完成</a>";*/--%>
-							xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/deleteCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该合同完成吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
-                        }
+                        <%--if(d.canalterComDel != undefined && d.canalterComDel =="1")--%>
+                        <%--{--%>
+                           <%--&lt;%&ndash;/* xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/saveCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要发起合同完成吗?', this.href)\"   class=\"op-btn op-btn-revert\"><i class=\"fa fa-edit\"></i> 完成</a>";*/&ndash;%&gt;--%>
+							<%--xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/deleteCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该合同完成吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";--%>
+                        <%--}--%>
 
                         return xml;
 
@@ -618,7 +618,7 @@
                     ,"contractName":"${workContractInfo.name}"
 					,"clientId":"${workContractInfo.client.id}"
                     ,"clientName":"${workContractInfo.client.name}"
-                    ,"clientType":"${fns:getMainDictLabel(workContractInfo.contractType, 'contract_type', '')}"
+                    ,"clientType":"${fns:getMainDictLabel(workContractInfo.contractTypeDoc, 'contract_info_type', '')}"
                     ,"contractPrice":"${workContractInfo.contractPrice}"
                     ,"contractPrice2":"<fmt:formatNumber value="${workContractInfo.contractPrice}" pattern="#,#00.00"/>"
                     ,"signDate":"<fmt:formatDate value="${workContractInfo.contractDate}" pattern="yyyy-MM-dd"/>"

+ 45 - 39
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoLookForm.jsp

@@ -120,13 +120,38 @@
 				<div id="tab-11" class="tab-pane active">
 					<div class="form-group layui-row first lw9">
 						<div class="form-group-label"><h2>项目合同信息</h2></div>
-						<c:if test="${workContractInfo.ext == 0}">
-							<div class="layui-item layui-col-sm6">
-								<label class="layui-form-label">合同来源:</label>
-								<div class="layui-input-block">
-									<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="投标项目"/>
-								</div>
-							</div>
+						<%--<c:if test="${workContractInfo.ext == 0}">--%>
+							<%--<div class="layui-item layui-col-sm6">--%>
+								<%--<label class="layui-form-label">合同来源:</label>--%>
+								<%--<div class="layui-input-block">--%>
+									<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="投标项目"/>--%>
+								<%--</div>--%>
+							<%--</div>--%>
+							<%--<div class="layui-item layui-col-sm6">--%>
+								<%--<label class="layui-form-label ">合同编号:</label>--%>
+								<%--<div class="layui-input-block">--%>
+									<%--<div class="input-group">--%>
+										<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workContractInfo.contractNum}"/>--%>
+										<%--<span class="input-group-btn">--%>
+											<%--<label class="form-status"><c:choose><c:when test="${ empty workContractInfo.contractState}">新添</c:when><c:otherwise>${fns:getDictLabel(workContractInfo.contractState, 'audit_completion_state','')}</c:otherwise>	</c:choose></label>--%>
+										<%--</span>--%>
+									<%--</div>--%>
+								<%--</div>--%>
+							<%--</div>--%>
+							<%--<div class="layui-item layui-col-sm6">--%>
+								<%--<label class="layui-form-label">投标项目:</label>--%>
+								<%--<div class="layui-input-block">--%>
+									<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workContractInfo.project.projectName}"/>--%>
+								<%--</div>--%>
+							<%--</div>--%>
+						<%--</c:if>--%>
+						<%--<c:if test="${workContractInfo.ext != 0}">--%>
+							<%--<div class="layui-item layui-col-sm6">--%>
+								<%--<label class="layui-form-label">合同来源:</label>--%>
+								<%--<div class="layui-input-block">--%>
+									<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="非投标项目"/>--%>
+								<%--</div>--%>
+							<%--</div>--%>
 							<div class="layui-item layui-col-sm6">
 								<label class="layui-form-label ">合同编号:</label>
 								<div class="layui-input-block">
@@ -138,32 +163,7 @@
 									</div>
 								</div>
 							</div>
-							<div class="layui-item layui-col-sm6">
-								<label class="layui-form-label">投标项目:</label>
-								<div class="layui-input-block">
-									<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workContractInfo.project.projectName}"/>
-								</div>
-							</div>
-						</c:if>
-						<c:if test="${workContractInfo.ext != 0}">
-							<div class="layui-item layui-col-sm6">
-								<label class="layui-form-label">合同来源:</label>
-								<div class="layui-input-block">
-									<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="非投标项目"/>
-								</div>
-							</div>
-							<div class="layui-item layui-col-sm6">
-								<label class="layui-form-label ">合同编号:</label>
-								<div class="layui-input-block">
-									<div class="input-group">
-										<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workContractInfo.contractNum}"/>
-										<span class="input-group-btn">
-											<label class="form-status"><c:choose><c:when test="${ empty workContractInfo.contractState}">新添</c:when><c:otherwise>${fns:getDictLabel(workContractInfo.contractState, 'audit_completion_state','')}</c:otherwise>	</c:choose></label>
-										</span>
-									</div>
-								</div>
-							</div>
-						</c:if>
+						<%--</c:if>--%>
 
 						<div class="layui-item layui-col-sm6">
 							<label class="layui-form-label ">合同名称:</label>
@@ -195,12 +195,12 @@
 								</c:if>
 							</shiro:hasPermission>
 						</div>
-						<div class="layui-item layui-col-sm6">
-							<label class="layui-form-label ">工程分类:</label>
-							<div class="layui-input-block">
-								<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${fns:getMainDictLabel(workContractInfo.contractType, 'contract_type', '')}"/>
-							</div>
-						</div>
+						<%--<div class="layui-item layui-col-sm6">--%>
+							<%--<label class="layui-form-label ">工程分类:</label>--%>
+							<%--<div class="layui-input-block">--%>
+								<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${fns:getMainDictLabel(workContractInfo.contractType, 'contract_type', '')}"/>--%>
+							<%--</div>--%>
+						<%--</div>--%>
 						<div class="layui-item layui-col-sm6">
 							<label class="layui-form-label ">主委托方:</label>
 							<div class="layui-input-block">
@@ -255,6 +255,12 @@
 								<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${workContractInfo.createDate}" pattern="yyyy年MM月dd日" type="date" dateStyle="full"/>"/>
 							</div>
 						</div>
+						<div class="layui-item layui-col-sm6">
+							<label class="layui-form-label ">付款方式:</label>
+							<div class="layui-input-block">
+								<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workContractInfo.payment}"/>
+							</div>
+						</div>
 						<div class="layui-item layui-col-sm12 with-textarea">
 							<label class="layui-form-label">付款摘要:</label>
 							<div class="layui-input-block">

+ 1 - 1
src/main/webapp/webpage/modules/workcontractre/workContractReAudit.jsp

@@ -624,7 +624,7 @@
 							<div class="layui-item layui-col-sm12 with-textarea">
 								<label class="layui-form-label ">备注:</label>
 								<div class="layui-input-block">
-									<form:textarea path="remarks" id="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+									<form:textarea path="remarks" readonly="true" id="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
 								</div>
 							</div>
 						</div>

+ 256 - 0
src/main/webapp/webpage/modules/workleave/workLeaveAudit.jsp

@@ -0,0 +1,256 @@
+<%@ 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">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 1){
+                    $('#flag').val('yes');
+                }else{
+                    $('#flag').val('no');
+                }
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+             laydate.render({
+                 elem: '#startDate',
+                 event: 'focus',
+                 type : 'datetime'
+             });
+            laydate.render({
+                elem: '#endDate',
+                event: 'focus',
+                type : 'datetime'
+            });
+        });
+        function insertTitle(tValue){
+            var list = "${workLeave.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "72";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workLeave/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="workLeave" action="${ctx}/workleave/workLeave/saveAudit" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="home"/>
+			<form:hidden path="act.taskId"/>
+			<form:hidden path="act.taskName"/>
+			<form:hidden path="act.taskDefKey"/>
+			<form:hidden path="act.procInsId"/>
+			<form:hidden path="project.id"/>
+			<form:hidden id="flag" path="act.flag"/>
+			<sys:message content="${message}"/>
+			<input type="hidden" name="workStaffBasicInfo.id" value="${workLeave.workStaffBasicInfo.id}">
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">项目名称:</label>
+					<div class="layui-input-block">
+						<form:input  path="project.projectName" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">项目编号:</label>
+					<div class="layui-input-block">
+						<form:input  path="project.projectId" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="name" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">申请编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="num" path="num" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+							<span class="input-group-btn">
+								<label class="form-status"><c:choose><c:when test="${ empty workLeave.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workLeave.status, 'audit_state','')}</c:otherwise>	</c:choose></label>
+							</span>
+						</div>
+					</div>
+				</div>
+
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<form:input  path="workStaffBasicInfo.office.name" htmlEscape="false" readonly="true" class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>开始时间:</label>
+					<div class="layui-input-block">
+						<input  type="text" name="startDate" readonly="readonly"  maxlength="20" class="laydate-icondate  form-control layer-date layui-input laydate-icon "
+							   value="<fmt:formatDate value="${workLeave.startDate}" pattern="yyyy-MM-dd "/>"/>
+						</input>
+						<%--<span class="group-sep">-</span>--%>
+						<%--<input value="${fns:getDictLabel(workLeave.startType, 'date_type', '')}" readonly="true" class="form-control  simple-select query-group">--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>结束时间:</label>
+					<div class="layui-input-block">
+						<input  type="text" maxlength="20" name="endDate"  readonly="readonly" class="laydate-icondate  form-control layer-date layui-input laydate-icon "
+							   value="<fmt:formatDate value="${workLeave.endDate}" pattern="yyyy-MM-dd "/>"/>
+						</input>
+						<%--<span class="group-sep">-</span>--%>
+						<%--<input value="${fns:getDictLabel(workLeave.endType, 'date_type', '')}" readonly="true" class="form-control  simple-select query-group">--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>目的地:</label>
+					<div class="layui-input-block">
+						<form:input  path="job" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>用车情况:</label>
+					<div class="layui-input-block">
+						<form:input  path="car" htmlEscape="false" readonly="true"  class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">车牌号:</label>
+					<div class="layui-input-block">
+						<form:input  path="carNum" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">情况说明:</label>
+					<div class="layui-input-block">
+						<textarea  htmlEscape="false" rows="4" readonly="true"  class="form-control ">${workLeave.reason}</textarea>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</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 width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workLeave.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${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')" 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>
+			<div class="form-group layui-row lw8">
+				<div class="form-group-label"><h2>审批意见</h2></div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">审批意见:</label>
+					<div class="layui-input-block">
+						<form:textarea path="act.comment" class="form-control" rows="4" maxlength="127" />
+						<input type="file" name="upload_files" style="display: none;">
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>审批流程</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<act:flowChart procInsId="${workLeave.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workLeave.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 274 - 0
src/main/webapp/webpage/modules/workleave/workLeaveForm.jsp

@@ -0,0 +1,274 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>申请管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		label.error{
+			top:40px;
+			left:0;
+		}
+		#reason-error{
+			top:80px;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 2){
+                    $("#inputForm").attr("action","${ctx}/workleave/workLeave/store");
+                }else{
+                    $("#inputForm").attr("action","${ctx}/workleave/workLeave/save");
+                }
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+            laydate.render({
+                elem: '#startDate',
+				format: 'yyyy-MM-dd',
+                event: 'focus',
+                type : 'date',
+
+            });
+            laydate.render({
+                elem: '#endDate',
+				format: 'yyyy-MM-dd',
+                event: 'focus',
+                type : 'date',
+            });
+            laydate.render({
+                elem: '#time',//目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                format: 'yyyy-MM-dd',
+                type: 'date'
+                ,range: '-'
+            });
+        });
+        function insertTitle(tValue){
+            var list = "${workLeave.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "72";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workLeave/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+		function setPNumber(obj){
+			$.ajax({
+				type:'post',
+				url:'${ctx}/workinvoice/workInvoice/getPNumber',
+				data:{
+					"obj":obj
+				},
+				success:function(data){
+					var d = JSON.parse(data);
+					$("#pNumber").val(d.pNumber);
+					$("#cInfoName").val(d.cInfoName);
+					$("#cName").val(d.cName);
+				}
+			})
+		}
+
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workLeave" action="${ctx}/workleave/workLeave/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<input type="hidden" name="workStaffBasicInfo.id" value="${workLeave.workStaffBasicInfo.id}">
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+					<div class="layui-input-block  with-icon">
+						<input type="hidden" value="" id ="ids">
+						<sys:gridselectcallprojectt url="${ctx}/workinvoice/workInvoice/selectproject" id="project" name="project.id"  value="${workLeave.project.id}"  title="选择所属项目" labelName="projectApproval.project.projectName"
+													labelValue="${workLeave.project.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>项目编号:</label>
+					<div class="layui-input-block">
+						<form:input id ="pNumber" path="project.projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="name" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">申请编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="num" path="num" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+							<span class="input-group-btn">
+								<label class="form-status"><c:choose><c:when test="${ empty workLeave.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workLeave.status, 'audit_state','')}</c:otherwise>	</c:choose></label>
+							</span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<form:input  path="workStaffBasicInfo.office.name" htmlEscape="false" readonly="true" class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>开始时间:</label>
+					<div class="layui-input-block">
+						<input id="startDate" name="startDate" style="background-color: #ffffff;" readonly="true"  htmlEscape="false"  maxlength="20" class="laydate-icondate required form-control layer-date layui-input laydate-icon "
+							   value="<fmt:formatDate value="${workLeave.startDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+						<%--<span class="group-sep">-</span>--%>
+						<%--<form:select path="startType" class="form-control  simple-select query-group">--%>
+							<%--<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+						<%--</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>结束时间:</label>
+					<div class="layui-input-block">
+						<input id="endDate" name="endDate" style="background-color: #ffffff;" readonly="true"  htmlEscape="false" maxlength="20" class="laydate-icondate required form-control layer-date layui-input laydate-icon "
+							   value="<fmt:formatDate value="${workLeave.endDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+						<%--<span class="group-sep">-</span>--%>
+						<%--<form:select path="endType" class="form-control  simple-select query-group">--%>
+							<%--<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+						<%--</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>目的地:</label>
+					<div class="layui-input-block">
+						<form:input  path="job" htmlEscape="false"  class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 ">
+					<label class="layui-form-label"><span class="require-item">*</span>用车情况:</label>
+					<div class="layui-input-block">
+						<form:select path="car" cssClass="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getMainDictList('card_type')}" itemLabel="label" itemValue="lable" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">车牌号:</label>
+                    <div class="layui-input-block">
+                        <form:input  path="carNum" htmlEscape="false"  class="form-control  layui-input"/>
+                    </div>
+                </div>
+
+
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">情况说明:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" 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 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="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workLeave.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${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')" 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>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 316 - 0
src/main/webapp/webpage/modules/workleave/workLeaveList.jsp

@@ -0,0 +1,316 @@
+<%@ 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">
+		$(document).ready(function() {
+            //搜索框收放
+            $('#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");
+                }
+            });
+            laydate.render({
+                elem: '#beginContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+
+            laydate.render({
+                elem: '#endContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+		});
+
+        function openDialogre(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: false, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url ,
+                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
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+        }
+        function openDialogreplay(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: false, //开启最大化最小化按钮
+                skin: 'two-btns',
+                content: url ,
+                btn: ['送审','关闭'],
+                yes: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                    if(iframeWin.contentWindow.doSubmit() ){
+                        top.layer.close(index);//关闭对话框。
+                        //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+
+                },
+                cancel: function(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="contentShadow layui-row" id="queryDiv">
+
+				<form:form id="searchForm" modelAttribute="workLeave" action="${ctx}/workleave/workLeave/" method="post" class="form-inline">
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<%--<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->--%>
+
+					<div class="commonQuery lw8">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">姓名:</label>
+							<div class="layui-input-block">
+								<form:input path="name" htmlEscape="false" class="form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" class="lw8" style="clear:both;display:none;">
+						<%--<div class="layui-item query athird">
+							<label class="layui-form-label">归档日期:</label>
+							<div class="layui-input-block">
+								<input id="beginContractDate" name="beginContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workContractRecord.beginContractDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endContractDate" name="endContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workContractRecord.endContractDate}" 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:input path="num" 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">
+								<form:select path="status"  class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+							<div style="clear:both;"></div>
+						</div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<%--此处按钮样式包括 nav-btn-add nav-btn-refresh nav-btn-import nav-btn-export nav-btn-query nav-btn-reset--%>
+					<shiro:hasPermission name="workleave:workLeave:add">
+						<button class="nav-btn nav-btn-add" title="出差申请" onclick="openDialogre('出差申请','${ctx}/workleave/workLeave/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>
+					</shiro:hasPermission>
+
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></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 }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'num',align:'center',title: '编号',minWidth:160,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看出差申请', '${ctx}/workleave/workLeave/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.num + ">" + d.num + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'name',align:'center', title: '姓名',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.name +"'>" + d.name + "</span>";
+                }}
+                ,{field:'officeName',align:'center', title: '部门',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                }}
+                // ,{field:'createDate',align:'center', sort:true,title: '申请时间',minWidth:160}
+                ,{field:'startDate',align:'center', sort:true,title: '开始日期',minWidth:160}
+                ,{field:'endDate',align:'center', sort:true, title: '结束日期', minWidth:160}
+                ,{field:'type',align:'center',  title: '项目', minWidth:160}
+                ,{field:'status',align:'center', title: '状态',minWidth:160,templet:function(d){
+                    <%--var st = getAuditState(d.status);--%>
+                    <%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractrecord/workContractRecord/getProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
+                    <%--return xml;--%>
+                    var st = getAuditState(d.status);
+                    if(st.action)
+                        var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workleave/workLeave/getProcessOne?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;
+                }}
+                // ,{fixed: 'right',align:'center', toolbar: '#op',title:"操作"}
+                ,{field:'op',align:'center',title:"操作",minWidth:160,templet:function(d){
+                    ////对操作进行初始化
+                    var xml = "";
+                    if(d.cancancel != undefined && d.cancancel == "1")
+                        xml += "<a href=\"${ctx}/workleave/workLeave/cancelInvalidate?id=" + d.id + "\" onclick=\"return confirmx('确认要强制撤回?', this.href)\"   class=\"op-btn op-btn-cancel\"><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
+                    if(d.canedit1 != undefined && d.canedit1 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogre('修改信息', '${ctx}/workleave/workLeave/form?id="+ d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit2 != undefined && d.canedit2 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('修改信息', '${ctx}/workleave/workLeave/form?id="+ d.id + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit3 != undefined && d.canedit3 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请', '${ctx}/workleave/workLeave/form?id=" + d.id + "&tabId=4','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.candelete != undefined && d.candelete == "1")
+                        xml +="<a href=\"${ctx}/workleave/workLeave/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该出差申请吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+                    return xml;
+                }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workLeave" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workLeave.id}"
+                    ,"num":"${workLeave.num}"
+                    ,"name":"${workLeave.name}"
+                    ,"no":"${workLeave.workStaffBasicInfo.no}"
+                    ,"officeName":"${workLeave.workStaffBasicInfo.office.name}"
+                    ,"jg":"${workLeave.workStaffBasicInfo.jobGrade.name}"
+                    ,"type":"${workLeave.project.projectName}"
+                    ,"startDate":"<fmt:formatDate value="${workLeave.startDate}" pattern="yyyy-MM-dd hh:mm"/>"
+                    ,"endDate":"<fmt:formatDate value="${workLeave.endDate}" pattern="yyyy-MM-dd hh:mm"/>"
+                    ,"createDate":"<fmt:formatDate value="${workLeave.createDate}" pattern="yyyy-MM-dd hh:mm"/>"
+                    ,"status":"${workLeave.status}"
+                    <c:if test="${fns:getUser().id == workLeave.createBy.id}">
+                    <c:if test="${workLeave.status == '2' }">,"cancancel":"1"</c:if>
+                    <shiro:hasPermission name="workleave:workLeave:edit"><c:choose>
+                    <c:when test="${workLeave.status == '1' }">,"canedit1":"1"</c:when>
+                    <c:when test="${workLeave.status == '4'}">,"canedit2":"1"</c:when>
+                    <c:when test="${workLeave.status == '3'}">,"canedit3":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="workleave:workLeave:del"><c:choose>
+                    <c:when test="${(workLeave.status == '1' or workLeave.status == '3' or workLeave.status == '4')}">,"candelete":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 265 - 0
src/main/webapp/webpage/modules/workleave/workLeaveModify.jsp

@@ -0,0 +1,265 @@
+<%@ 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">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 2){
+                    $("#flag").val("no");
+                }else{
+                    $("#flag").val("yes");
+                }
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+            laydate.render({
+                elem: '#startDate',
+                event: 'focus',
+                type : 'date',
+                
+            });
+            laydate.render({
+                elem: '#endDate',
+                event: 'focus',
+                type : 'date',
+               
+            });
+        });
+        function insertTitle(tValue){
+            var list = "${workLeave.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "72";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workLeave/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+		function setPNumber(obj){
+			$.ajax({
+				type:'post',
+				url:'${ctx}/workinvoice/workInvoice/getPNumber',
+				data:{
+					"obj":obj
+				},
+				success:function(data){
+					var d = JSON.parse(data);
+					$("#pNumber").val(d.pNumber);
+					$("#cInfoName").val(d.cInfoName);
+					$("#cName").val(d.cName);
+				}
+			})
+		}
+
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workLeave" action="${ctx}/workleave/workLeave/saveAudit" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="home"/>
+			<form:hidden path="act.taskId"/>
+			<form:hidden path="act.taskName"/>
+			<form:hidden path="act.taskDefKey"/>
+			<form:hidden path="act.procInsId"/>
+			<form:hidden path="act.procDefId"/>
+			<form:hidden id="flag" path="act.flag"/>
+			<input type="hidden" name="workStaffBasicInfo.id" value="${workLeave.workStaffBasicInfo.id}">
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+					<div class="layui-input-block  with-icon">
+						<input type="hidden" value="" id ="ids">
+						<sys:gridselectcallprojectt url="${ctx}/workinvoice/workInvoice/selectproject" id="project" name="project.id"  value="${workLeave.project.id}"  title="选择所属项目" labelName="projectApproval.project.projectName"
+													labelValue="${workLeave.project.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>项目编号:</label>
+					<div class="layui-input-block">
+						<form:input id ="pNumber" path="project.projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="name" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">申请编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="num" path="num" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+							<span class="input-group-btn">
+								<label class="form-status"><c:choose><c:when test="${ empty workLeave.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workLeave.status, 'audit_state','')}</c:otherwise>	</c:choose></label>
+							</span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<form:input  path="workStaffBasicInfo.office.name" htmlEscape="false" readonly="true" class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>开始时间:</label>
+					<div class="layui-input-block">
+						<input id="startDate" name="startDate" style="background-color: #ffffff;" readonly="true"  htmlEscape="false"  maxlength="20" class="laydate-icondate required form-control layer-date layui-input laydate-icon "
+							   value="<fmt:formatDate value="${workLeave.startDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+							<%--<span class="group-sep">-</span>--%>
+							<%--<form:select path="startType" class="form-control  simple-select query-group">--%>
+							<%--<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+							<%--</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>结束时间:</label>
+					<div class="layui-input-block">
+						<input id="endDate" name="endDate" style="background-color: #ffffff;" readonly="true"  htmlEscape="false" maxlength="20" class="laydate-icondate required form-control layer-date layui-input laydate-icon "
+							   value="<fmt:formatDate value="${workLeave.endDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+							<%--<span class="group-sep">-</span>--%>
+							<%--<form:select path="endType" class="form-control  simple-select query-group">--%>
+							<%--<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
+							<%--</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>目的地:</label>
+					<div class="layui-input-block">
+						<form:input  path="job" htmlEscape="false"  class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 ">
+					<label class="layui-form-label"><span class="require-item">*</span>用车情况:</label>
+					<div class="layui-input-block">
+						<form:select path="car" cssClass="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getMainDictList('card_type')}" itemLabel="label" itemValue="lable" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">车牌号:</label>
+					<div class="layui-input-block">
+						<form:input  path="carNum" htmlEscape="false"  class="form-control  layui-input"/>
+					</div>
+				</div>
+
+
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">情况说明:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" 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 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 width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workLeave.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${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')" 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>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 230 - 0
src/main/webapp/webpage/modules/workleave/workLeaveView.jsp

@@ -0,0 +1,230 @@
+<%@ 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">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 2){
+                    $("#inputForm").attr("action","${ctx}/workleave/workLeave/store");
+                }else{
+                    $("#inputForm").attr("action","${ctx}/workleave/workLeave/save");
+                }
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+             laydate.render({
+                 elem: '#startDate',
+                 event: 'focus',
+                 type : 'date'
+             });
+            laydate.render({
+                elem: '#endDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+        function insertTitle(tValue){
+            var list = "${workLeave.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "72";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workLeave/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="workLeave" action="${ctx}/workleave/workLeave/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<input type="hidden" name="workStaffBasicInfo.id" value="${workLeave.workStaffBasicInfo.id}">
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">项目名称:</label>
+                    <div class="layui-input-block">
+                        <form:input  path="project.projectName" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">项目编号:</label>
+                    <div class="layui-input-block">
+                        <form:input  path="project.projectId" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="name" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">申请编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="num" path="num" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+							<span class="input-group-btn">
+								<label class="form-status"><c:choose><c:when test="${ empty workLeave.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workLeave.status, 'audit_state','')}</c:otherwise>	</c:choose></label>
+							</span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<form:input  path="workStaffBasicInfo.office.name" htmlEscape="false" readonly="true" class="form-control required layui-input"/>
+					</div>
+				</div>
+
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>开始日期:</label>
+					<div class="layui-input-block">
+						<input  type="text"  maxlength="20" class="laydate-icondate required form-control layer-date layui-input laydate-icon "
+							   value="<fmt:formatDate value="${workLeave.startDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+						<%--<span class="group-sep">-</span>--%>
+						<%--<input value="${fns:getDictLabel(workLeave.startType, 'date_type', '')}" readonly="true" class="form-control  simple-select query-group">--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>结束日期:</label>
+					<div class="layui-input-block">
+						<input  type="text" maxlength="20" class="laydate-icondate required form-control layer-date layui-input laydate-icon "
+							   value="<fmt:formatDate value="${workLeave.endDate}" pattern="yyyy-MM-dd "/>"/>
+						</input>
+						<%--<span class="group-sep">-</span>--%>
+						<%--<input value="${fns:getDictLabel(workLeave.endType, 'date_type', '')}" readonly="true" class="form-control  simple-select query-group">--%>
+					</div>
+				</div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>目的地:</label>
+                    <div class="layui-input-block">
+                        <form:input  path="job" htmlEscape="false" readonly="true" class="form-control required layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>用车情况:</label>
+                    <div class="layui-input-block">
+                        <form:input  path="car" htmlEscape="false" readonly="true"  class="form-control required layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">车牌号:</label>
+                    <div class="layui-input-block">
+                        <form:input  path="carNum" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">情况说明:</label>
+					<div class="layui-input-block">
+						<textarea  htmlEscape="false" rows="4" readonly="true"  class="form-control ">${workLeave.reason}</textarea>
+					</div>
+				</div>
+			</div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>附件信息</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 width="150px">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="file_attachment">
+                    <c:forEach items="${workLeave.workAttachments}" var = "workClientAttachment" varStatus="status">
+                        <tr>
+
+                            <c:choose>
+                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                    <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                </c:when>
+                                <c:otherwise>
+                                    <c:choose>
+                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                        </c:otherwise>
+                                    </c:choose>
+                                </c:otherwise>
+                            </c:choose>
+                            <td>${workClientAttachment.createBy.name}</td>
+                            <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                            <td class="op-td">
+                                <div class="op-btn-box" >
+                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${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')" 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>
+            <div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 15 - 0
src/main/webapp/webpage/modules/workleave/workTrack.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>
+

+ 135 - 121
src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormAdd.jsp

@@ -236,6 +236,20 @@
             }
 
         }
+        function checkId() {
+            var size = $("#reimbursementVATTaxes tr").length;
+            for (var i = 0;i<size;i++){
+                var number= $("#reimbursementVATTaxes_invoiceNumber"+i+"_invoiceNumber").val();
+                $.post("${ctx}/workreimbursement/workReimbursement/getById",
+                    {"number":number},
+                    function(result){
+                        if(result.code == '0'){
+                            parent.layer.msg("该发票已报销!", {icon: 5});
+                        }
+                    });
+
+            }
+        }
         function getNowFormatDate() {
             var date = new Date();
             var seperator1 = "-";
@@ -515,9 +529,9 @@
                 </div>
             </div>
             <div class="layui-item layui-col-sm6">
-                <label class="layui-form-label"><span class="require-item">*</span>银行卡号:</label>
+                <label class="layui-form-label">银行卡号:</label>
                 <div class="layui-input-block">
-                    <form:input path="bankCard" htmlEscape="false"  id="bankCard" minlength="16" maxlength="19" class="form-control number required layui-input" value = "${workReimbursement.bankCard}"/>
+                    <form:input path="bankCard" htmlEscape="false"  id="bankCard" minlength="16" maxlength="19" class="form-control number  layui-input" value = "${workReimbursement.bankCard}"/>
                 </div>
             </div>
             <div class="layui-item layui-col-sm6">
@@ -600,125 +614,125 @@
             </div>
 
         </div>
-        <div class="form-group layui-row">
-            <div class="form-group-label"><h2>借款明细</h2></div>
-            <div class="layui-item layui-col-xs12 form-table-container" >
-                <table id="contentTable3" class="table table-bordered table-condensed can-edit no-bottom-margin">
-                    <thead>
-                    <tr>
-                        <th width="190px">借款日期</th>
-                        <th width="190px">借款类型</th>
-                        <th width="190px">借款项目</th>
-                        <th width="190px">借款金额</th>
-                        <th width="180px">未还金额</th>
-                        <th width="100px">本次还款</th>
-                        <th width="120px">借款编号</th>
-                    </tr>
-                    </thead>
-                    <tbody id="reimbursementBackList">
-                    <c:if test="${not empty workReimbursement.reimbursementBackList}">
-                        <c:forEach items="${workReimbursement.reimbursementBackList}" var="reimbursementBack" varStatus="index">
-                            <tr id="reimbursementBackList${index.index}">
-                                <td class="hide">
-                                    <input id="reimbursementBackList${index.index}_id" name="reimbursementBackList[${index.index}].id" type="hidden" value="${reimbursementBack.id}"/>
-                                    <input id="reimbursementBackList${index.index}_workLoanId" name="reimbursementBackList[${index.index}].workLoan.id" type="hidden" value="${reimbursementBack.workLoan.id}"/>
-                                    <input id="reimbursementBackList${index.index}_delFlag" name="reimbursementBackList[${index.index}].delFlag" type="hidden" value="0"/>
-                                </td>
-                                <td>
-                                    <input id="reimbursementBackList${index.index}_1"   type="text" maxlength="20"  readonly="true" class=" form-control layui-input"
-                                           value="<fmt:formatDate value="${reimbursementBack.workLoan.loanDate}" pattern="yyyy-MM-dd"/>"/>
-                                    </input>
-                                </td>
-                                <td>
-                                    <input id="reimbursementBackList${index.index}_2"  readonly="true" type="text" value="${reimbursementBack.workLoan.type}"   class="form-control"/>
-                                </td>
-                                <td>
-                                    <input id="reimbursementBackList${index.index}_3"  readonly="true" type="text" value="${reimbursementBack.workLoan.projectRecords.projectName}"   class="form-control"/>
-                                </td>
-                                <td>
-                                    <input id="reimbursementBackList${index.index}_4"  readonly="true" type="text" value="${reimbursementBack.workLoan.money}"   class="form-control"/>
-                                </td>
-                                <td>
-                                    <input id="reimbursementBackList${index.index}_5"  readonly="true" type="text" value="${reimbursementBack.workLoan.notRepay}"   class="form-control"/>
-                                </td>
-                                <td>
-                                    <input id="reimbursementBackList${index.index}_6" onchange="getBackMoney(this.value)" name="reimbursementBackList[${index.index}].money" type="text" value="${reimbursementBack.money}"  placeholder="请输入金额" maxlength="10"  class="form-control number "/>
-                                </td>
-                                <td>
-                                    <input id="reimbursementBackList${index.index}_7"  readonly="true" type="text" value="${reimbursementBack.workLoan.num}"   class="form-control"/>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                    </c:if>
-                    </tbody>
-                </table>
-                <table id="contentMoneys1" class="table table-bordered table-condensed can-edit summary">
-                    <tr>
-                        <td  style="width:190px;vertical-align:middle;text-align: center;"><label><font color="red">*</font>合计</label></td>
-                        <td  width="190px" style="vertical-align:middle;text-align: center;">
-                           -
-                        </td >
-                        <td  width="190px" style="vertical-align:middle;text-align: center;">
-                           -
-                        </td>
-                        <td  width="190px" style="vertical-align:middle;text-align: center;">
-                           -
-                        </td>
-                        <td width="180px" style="vertical-align:middle;text-align: center;">
-                           -
-                        </td>
-                        <td width="100px" style="vertical-align:middle;text-align: center;">
-                            <input  id="backmoney" value="${workReimbursement.backmoney}" name="backmoney" htmlEscape="false" readonly="true"   maxlength="12"  class="form-control "/>
-                        </td>
-                        <td  width="120px" style="vertical-align:middle;text-align: center;">
-                            -
-                        </td>
-                    </tr>
-                </table>
-                <script type="text/template" id="reimbursementBackTpl">//<!--
-                        <tr>
-                            <td class="hide">
-                                <input  id="reimbursementBackList{{idx}}_id" name="reimbursementBackList[{{idx}}].id" type="hidden" value="{{row.id}}">
-                                <input id="reimbursementBackList{{idx}}_delFlag" name="reimbursementBackList[{{idx}}].delFlag" type="hidden" value="0"/>
-                                <input id="reimbursementBackList{{idx}}_workLoanId" name="reimbursementBackList[{{idx}}].workLoan.id" type="hidden" value="{{row.workLoan.id}}"/>
-                            </td>
-                              <td>
-                              <input  id="leaveDetailList{{idx}}_1" value="{{row.workLoan.loanDate}} "  readOnly="true"  type="text" maxlength="20" class=" form-control layer-date layui-input "/></input>
-							</td>
-                            <td >
-                                <input id="reimbursementBackList{{idx}}_2"  readOnly="true"  value="{{row.workLoan.type}}" class="form-control"/>
-                            </td>
-                            <td >
-                                <input id="reimbursementBackList{{idx}}_3"  readOnly="true"  value="{{row.workLoan.projectRecords.projectName}}" class="form-control"/>
-                            </td>
-                             <td >
-                                <input id="reimbursementBackList{{idx}}_4"  readOnly="true"  value="{{row.workLoan.money}}" class="form-control"/>
-                            </td>
-                             <td >
-                                <input id="reimbursementBackList{{idx}}_5"  readOnly="true"  value="{{row.workLoan.notRepay}}" class="form-control"/>
-                            </td>
-                             <td >
-                                <input id="reimbursementBackList{{idx}}_6" onchange="getBackMoney(this.value)" name="reimbursementBackList[{{idx}}].money"  value="{{row.money}}" placeholder="请输入金额" maxlength="10"  class="form-control number "/>
-                            </td>
-                             <td >
-                                <input id="reimbursementBackList{{idx}}_7"  readOnly="true"  value="{{row.workLoan.num}}" class="form-control"/>
-                            </td>
+        <%--<div class="form-group layui-row">--%>
+            <%--<div class="form-group-label"><h2>借款明细</h2></div>--%>
+            <%--<div class="layui-item layui-col-xs12 form-table-container" >--%>
+                <%--<table id="contentTable3" class="table table-bordered table-condensed can-edit no-bottom-margin">--%>
+                    <%--<thead>--%>
+                    <%--<tr>--%>
+                        <%--<th width="190px">借款日期</th>--%>
+                        <%--<th width="190px">借款类型</th>--%>
+                        <%--<th width="190px">借款项目</th>--%>
+                        <%--<th width="190px">借款金额</th>--%>
+                        <%--<th width="180px">未还金额</th>--%>
+                        <%--<th width="100px">本次还款</th>--%>
+                        <%--<th width="120px">借款编号</th>--%>
+                    <%--</tr>--%>
+                    <%--</thead>--%>
+                    <%--<tbody id="reimbursementBackList">--%>
+                    <%--<c:if test="${not empty workReimbursement.reimbursementBackList}">--%>
+                        <%--<c:forEach items="${workReimbursement.reimbursementBackList}" var="reimbursementBack" varStatus="index">--%>
+                            <%--<tr id="reimbursementBackList${index.index}">--%>
+                                <%--<td class="hide">--%>
+                                    <%--<input id="reimbursementBackList${index.index}_id" name="reimbursementBackList[${index.index}].id" type="hidden" value="${reimbursementBack.id}"/>--%>
+                                    <%--<input id="reimbursementBackList${index.index}_workLoanId" name="reimbursementBackList[${index.index}].workLoan.id" type="hidden" value="${reimbursementBack.workLoan.id}"/>--%>
+                                    <%--<input id="reimbursementBackList${index.index}_delFlag" name="reimbursementBackList[${index.index}].delFlag" type="hidden" value="0"/>--%>
+                                <%--</td>--%>
+                                <%--<td>--%>
+                                    <%--<input id="reimbursementBackList${index.index}_1"   type="text" maxlength="20"  readonly="true" class=" form-control layui-input"--%>
+                                           <%--value="<fmt:formatDate value="${reimbursementBack.workLoan.loanDate}" pattern="yyyy-MM-dd"/>"/>--%>
+                                    <%--</input>--%>
+                                <%--</td>--%>
+                                <%--<td>--%>
+                                    <%--<input id="reimbursementBackList${index.index}_2"  readonly="true" type="text" value="${reimbursementBack.workLoan.type}"   class="form-control"/>--%>
+                                <%--</td>--%>
+                                <%--<td>--%>
+                                    <%--<input id="reimbursementBackList${index.index}_3"  readonly="true" type="text" value="${reimbursementBack.workLoan.projectRecords.projectName}"   class="form-control"/>--%>
+                                <%--</td>--%>
+                                <%--<td>--%>
+                                    <%--<input id="reimbursementBackList${index.index}_4"  readonly="true" type="text" value="${reimbursementBack.workLoan.money}"   class="form-control"/>--%>
+                                <%--</td>--%>
+                                <%--<td>--%>
+                                    <%--<input id="reimbursementBackList${index.index}_5"  readonly="true" type="text" value="${reimbursementBack.workLoan.notRepay}"   class="form-control"/>--%>
+                                <%--</td>--%>
+                                <%--<td>--%>
+                                    <%--<input id="reimbursementBackList${index.index}_6" onchange="getBackMoney(this.value)" name="reimbursementBackList[${index.index}].money" type="text" value="${reimbursementBack.money}"  placeholder="请输入金额" maxlength="10"  class="form-control number "/>--%>
+                                <%--</td>--%>
+                                <%--<td>--%>
+                                    <%--<input id="reimbursementBackList${index.index}_7"  readonly="true" type="text" value="${reimbursementBack.workLoan.num}"   class="form-control"/>--%>
+                                <%--</td>--%>
+                            <%--</tr>--%>
+                        <%--</c:forEach>--%>
+                    <%--</c:if>--%>
+                    <%--</tbody>--%>
+                <%--</table>--%>
+                <%--<table id="contentMoneys1" class="table table-bordered table-condensed can-edit summary">--%>
+                    <%--<tr>--%>
+                        <%--<td  style="width:190px;vertical-align:middle;text-align: center;"><label><font color="red">*</font>合计</label></td>--%>
+                        <%--<td  width="190px" style="vertical-align:middle;text-align: center;">--%>
+                           <%-----%>
+                        <%--</td >--%>
+                        <%--<td  width="190px" style="vertical-align:middle;text-align: center;">--%>
+                           <%-----%>
+                        <%--</td>--%>
+                        <%--<td  width="190px" style="vertical-align:middle;text-align: center;">--%>
+                           <%-----%>
+                        <%--</td>--%>
+                        <%--<td width="180px" style="vertical-align:middle;text-align: center;">--%>
+                           <%-----%>
+                        <%--</td>--%>
+                        <%--<td width="100px" style="vertical-align:middle;text-align: center;">--%>
+                            <%--<input  id="backmoney" value="${workReimbursement.backmoney}" name="backmoney" htmlEscape="false" readonly="true"   maxlength="12"  class="form-control "/>--%>
+                        <%--</td>--%>
+                        <%--<td  width="120px" style="vertical-align:middle;text-align: center;">--%>
+                            <%-----%>
+                        <%--</td>--%>
+                    <%--</tr>--%>
+                <%--</table>--%>
+                <%--<script type="text/template" id="reimbursementBackTpl">//<!----%>
+                        <%--<tr>--%>
+                            <%--<td class="hide">--%>
+                                <%--<input  id="reimbursementBackList{{idx}}_id" name="reimbursementBackList[{{idx}}].id" type="hidden" value="{{row.id}}">--%>
+                                <%--<input id="reimbursementBackList{{idx}}_delFlag" name="reimbursementBackList[{{idx}}].delFlag" type="hidden" value="0"/>--%>
+                                <%--<input id="reimbursementBackList{{idx}}_workLoanId" name="reimbursementBackList[{{idx}}].workLoan.id" type="hidden" value="{{row.workLoan.id}}"/>--%>
+                            <%--</td>--%>
+                              <%--<td>--%>
+                              <%--<input  id="leaveDetailList{{idx}}_1" value="{{row.workLoan.loanDate}} "  readOnly="true"  type="text" maxlength="20" class=" form-control layer-date layui-input "/></input>--%>
+							<%--</td>--%>
+                            <%--<td >--%>
+                                <%--<input id="reimbursementBackList{{idx}}_2"  readOnly="true"  value="{{row.workLoan.type}}" class="form-control"/>--%>
+                            <%--</td>--%>
+                            <%--<td >--%>
+                                <%--<input id="reimbursementBackList{{idx}}_3"  readOnly="true"  value="{{row.workLoan.projectRecords.projectName}}" class="form-control"/>--%>
+                            <%--</td>--%>
+                             <%--<td >--%>
+                                <%--<input id="reimbursementBackList{{idx}}_4"  readOnly="true"  value="{{row.workLoan.money}}" class="form-control"/>--%>
+                            <%--</td>--%>
+                             <%--<td >--%>
+                                <%--<input id="reimbursementBackList{{idx}}_5"  readOnly="true"  value="{{row.workLoan.notRepay}}" class="form-control"/>--%>
+                            <%--</td>--%>
+                             <%--<td >--%>
+                                <%--<input id="reimbursementBackList{{idx}}_6" onchange="getBackMoney(this.value)" name="reimbursementBackList[{{idx}}].money"  value="{{row.money}}" placeholder="请输入金额" maxlength="10"  class="form-control number "/>--%>
+                            <%--</td>--%>
+                             <%--<td >--%>
+                                <%--<input id="reimbursementBackList{{idx}}_7"  readOnly="true"  value="{{row.workLoan.num}}" class="form-control"/>--%>
+                            <%--</td>--%>
 
-                        </tr>//-->
-                </script>
-                <script type="text/javascript">
-                    var reimbursementBackIdx = 0; var reimbursementBackTpl = $("#reimbursementBackTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-                    function addRowRecord(list, idx, tpl, row){
-                        if(idx==0) {
-                            reimbursementBackIdx = $("#reimbursementBackList tr").length;
-                            idx = reimbursementBackIdx;
-                        }
-                        bornTemplete(list, idx, tpl, row, idx);
-                        reimbursementBackIdx +=1;
-                    }
-                </script>
-            </div>
-        </div>
+                        <%--</tr>//-->--%>
+                <%--</script>--%>
+                <%--<script type="text/javascript">--%>
+                    <%--var reimbursementBackIdx = 0; var reimbursementBackTpl = $("#reimbursementBackTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");--%>
+                    <%--function addRowRecord(list, idx, tpl, row){--%>
+                        <%--if(idx==0) {--%>
+                            <%--reimbursementBackIdx = $("#reimbursementBackList tr").length;--%>
+                            <%--idx = reimbursementBackIdx;--%>
+                        <%--}--%>
+                        <%--bornTemplete(list, idx, tpl, row, idx);--%>
+                        <%--reimbursementBackIdx +=1;--%>
+                    <%--}--%>
+                <%--</script>--%>
+            <%--</div>--%>
+        <%--</div>--%>
         <div class="form-group layui-row">
             <div class="form-group-label"><h2>报销详情</h2></div>
             <div class="layui-item nav-btns">
@@ -863,7 +877,7 @@
                                 </td>
 
                                 <td>
-                                    <input id="reimbursementVATTaxes${index.index}_invoiceNumber" maxlength="8" minlength="8" name="reimbursementVATTaxes[${index.index}].invoiceNumber" type="text" maxlength="32" value="${reimbursementVATTaxes.invoiceNumber}"  placeholder="请输入发票号"  class="form-control number required"/>
+                                    <input id="reimbursementVATTaxes${index.index}_invoiceNumber" maxlength="8" minlength="8" name="reimbursementVATTaxes[${index.index}].invoiceNumber" type="text" maxlength="32" value="${reimbursementVATTaxes.invoiceNumber}" onchange="checkId()" placeholder="请输入发票号"  class="form-control number required"/>
                                 </td>
                                 <td>
                                     <input id="reimbursementVATTaxes${index.index}_money" onchange="getMoneyVATT(${index.index})" name="reimbursementVATTaxes[${index.index}].money" type="text" maxlength="32" value="${reimbursementVATTaxes.money}"  placeholder="请输入金额"  class="form-control number required"/>

+ 2 - 2
src/main/webapp/webpage/modules/workreimbursement/workReimbursementModifyApply.jsp

@@ -533,9 +533,9 @@
                 </div>
             </div>
             <div class="layui-item layui-col-sm6">
-                <label class="layui-form-label"><span class="require-item">*</span>银行卡号:</label>
+                <label class="layui-form-label">银行卡号:</label>
                 <div class="layui-input-block">
-                    <form:input path="bankCard" htmlEscape="false"  id="bankCard" minlength="16" maxlength="19" class="form-control number required layui-input" value = "${workReimbursement.bankCard}"/>
+                    <form:input path="bankCard" htmlEscape="false"  id="bankCard" minlength="16" maxlength="19" class="form-control number  layui-input" value = "${workReimbursement.bankCard}"/>
                 </div>
             </div>
             <div class="layui-item layui-col-sm6">