diff --git a/ruoyi-activiti/src/main/java/com/ruoyi/config/ActivitiConfig.java b/ruoyi-activiti/src/main/java/com/ruoyi/config/ActivitiConfig.java new file mode 100644 index 00000000..35c7f2ed --- /dev/null +++ b/ruoyi-activiti/src/main/java/com/ruoyi/config/ActivitiConfig.java @@ -0,0 +1,27 @@ +package com.ruoyi.config; + +import com.ruoyi.common.config.ICustomProcessDiagramGenerator; +import org.activiti.spring.SpringProcessEngineConfiguration; +import org.activiti.spring.boot.ProcessEngineConfigurationConfigurer; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class ActivitiConfig implements ProcessEngineConfigurationConfigurer { + + @Autowired + private ICustomProcessDiagramGenerator customProcessDiagramGenerator; + + /** + * 解決工作流生成图片乱码问题 + * + * @param processEngineConfiguration + */ + @Override + public void configure(SpringProcessEngineConfiguration processEngineConfiguration) { + processEngineConfiguration.setActivityFontName("宋体"); + processEngineConfiguration.setAnnotationFontName("宋体"); + processEngineConfiguration.setLabelFontName("宋体"); + processEngineConfiguration.setProcessDiagramGenerator(customProcessDiagramGenerator); + } +} diff --git a/ruoyi-activiti/src/main/java/com/ruoyi/process/general/controller/ProcessController.java b/ruoyi-activiti/src/main/java/com/ruoyi/process/general/controller/ProcessController.java index 0c29fabd..f945a126 100644 --- a/ruoyi-activiti/src/main/java/com/ruoyi/process/general/controller/ProcessController.java +++ b/ruoyi-activiti/src/main/java/com/ruoyi/process/general/controller/ProcessController.java @@ -4,6 +4,7 @@ package com.ruoyi.process.general.controller; import com.ruoyi.common.config.ICustomProcessDiagramGenerator; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.WorkflowConstants; +import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.process.general.domain.HistoricActivity; import com.ruoyi.process.general.service.IProcessService; @@ -23,8 +24,8 @@ import org.activiti.engine.repository.ProcessDefinitionQuery; import org.activiti.engine.runtime.ProcessInstance; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -60,43 +61,27 @@ public class ProcessController extends BaseController { /** * 加载审批历史弹窗 */ - /*@GetMapping("/historyList/{instanceId}") + @GetMapping("/historyList/{instanceId}") public String historyList(@PathVariable("instanceId") String instanceId, ModelMap mmap) { mmap.put("instanceId", instanceId); return prefix + "/historyList"; - }*/ + } /** * 审批历史列表 * @param instanceId * @return */ - /*@RequiresPermissions("process:leave:list") +// @RequiresPermissions("process:leave:list") @PostMapping("/listHistory") @ResponseBody public TableDataInfo listHistory(String instanceId, HistoricActivity historicActivity) { startPage(); List list = processService.selectHistoryList(instanceId, historicActivity); return getDataTable(list); - }*/ - @RequestMapping("/listHistory") - @ResponseBody - public Map getContractFormList(HttpServletRequest request) { - String instanceId = request.getParameter("instanceId"); - HistoricActivity historicActivity = new HistoricActivity(); - //办理人ID - historicActivity.setAssignee(request.getParameter("assignee")); - //任务名称 - historicActivity.setActivityName(request.getParameter("activityName")); - List list = processService.selectHistoryList(instanceId, historicActivity); - Map result = new HashMap(); - result.put("rows", list); - result.put("total", list.size()); - return result; } - /** * 获取流程图资源 * @param pProcessInstanceId @@ -287,10 +272,10 @@ public class ProcessController extends BaseController { * @param mmap * @return */ - /*@GetMapping("/processImg/{instanceId}") + @GetMapping("/processImg/{instanceId}") public String processImg(@PathVariable("instanceId") String instanceId, ModelMap mmap) { mmap.put("instanceId", instanceId); return prefix + "/processImg"; - }*/ + } } diff --git a/ruoyi-activiti/src/main/java/com/ruoyi/process/general/service/IProcessService.java b/ruoyi-activiti/src/main/java/com/ruoyi/process/general/service/IProcessService.java index 373591fe..e286cf16 100644 --- a/ruoyi-activiti/src/main/java/com/ruoyi/process/general/service/IProcessService.java +++ b/ruoyi-activiti/src/main/java/com/ruoyi/process/general/service/IProcessService.java @@ -2,8 +2,11 @@ package com.ruoyi.process.general.service; import com.ruoyi.process.general.domain.HistoricActivity; +import org.activiti.engine.runtime.ProcessInstance; +import javax.servlet.http.HttpServletRequest; import java.util.List; +import java.util.Map; public interface IProcessService { @@ -21,4 +24,22 @@ public interface IProcessService { * @return */ String selectLastActName(String processInstanceId); + + /** + * 提交申请 + * @param applyUserId 申请人 + * @param businessKey 业务表 id + * @param key 流程定义 key + * @param variables 流程变量 + * @return + */ + ProcessInstance submitApply(String applyUserId, String businessKey, String itemName, String itemConent, String key, Map variables); + + void complete(String taskId, String instanceId, String itemName, String itemContent, String module, Map variables, HttpServletRequest request); + + /** + * 判断流程是否结束 + * @return + */ + boolean judgeProcessIsFinish(String instanceId); } diff --git a/ruoyi-activiti/src/main/java/com/ruoyi/process/general/service/impl/ProcessServiceImpl.java b/ruoyi-activiti/src/main/java/com/ruoyi/process/general/service/impl/ProcessServiceImpl.java index bcd5e928..27352506 100644 --- a/ruoyi-activiti/src/main/java/com/ruoyi/process/general/service/impl/ProcessServiceImpl.java +++ b/ruoyi-activiti/src/main/java/com/ruoyi/process/general/service/impl/ProcessServiceImpl.java @@ -2,28 +2,44 @@ package com.ruoyi.process.general.service.impl; import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.process.general.domain.HistoricActivity; import com.ruoyi.process.general.mapper.ProcessMapper; import com.ruoyi.process.general.service.IProcessService; +import com.ruoyi.process.todoitem.domain.BizTodoItem; +import com.ruoyi.process.todoitem.service.IBizTodoItemService; import com.ruoyi.system.mapper.SysUserMapper; import org.activiti.engine.HistoryService; +import org.activiti.engine.IdentityService; +import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; import org.activiti.engine.history.HistoricActivityInstance; import org.activiti.engine.history.HistoricActivityInstanceQuery; +import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.task.Comment; +import org.activiti.engine.task.Task; +import org.apache.commons.lang3.BooleanUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import javax.servlet.http.HttpServletRequest; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Enumeration; import java.util.List; +import java.util.Map; @Service @Transactional public class ProcessServiceImpl implements IProcessService { + protected final Logger logger = LoggerFactory.getLogger(ProcessServiceImpl.class); @Autowired private TaskService taskService; @@ -36,6 +52,15 @@ public class ProcessServiceImpl implements IProcessService { private ProcessMapper processMapper; + @Autowired + private IdentityService identityService; + + @Autowired + private IBizTodoItemService bizTodoItemService; + + @Autowired + private RuntimeService runtimeService; + @Override public List selectHistoryList(String processInstanceId, HistoricActivity historicActivity) { List activityList = new ArrayList<>(); @@ -82,4 +107,96 @@ public class ProcessServiceImpl implements IProcessService { return list.get(0).getActivityName(); } + @Override + public ProcessInstance submitApply(String applyUserId, String businessKey, String itemName, String itemConent, String module, Map variables) { + // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中 + identityService.setAuthenticatedUserId(applyUserId); + // 启动流程时设置业务 key + ProcessInstance instance = runtimeService.startProcessInstanceByKey(module, businessKey, variables); + // 下一节点处理人待办事项 + bizTodoItemService.insertTodoItem(instance.getProcessInstanceId(), itemName, itemConent, module); + return instance; + } + + @Override + public void complete(String taskId, String instanceId, String itemName, String itemContent, String module, Map variables, HttpServletRequest request) { + Enumeration parameterNames = request.getParameterNames(); + String comment = null; // 批注 + boolean agree = true; + try { + while (parameterNames.hasMoreElements()) { + String parameterName = parameterNames.nextElement(); + if (parameterName.startsWith("p_")) { + // 参数结构:p_B_name,p为参数的前缀,B为类型,name为属性名称 + String[] parameter = parameterName.split("_"); + if (parameter.length == 3) { + String paramValue = request.getParameter(parameterName); + Object value = paramValue; + if (parameter[1].equals("B")) { + value = BooleanUtils.toBoolean(paramValue); + agree = (boolean) value; + } else if (parameter[1].equals("DT")) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + value = sdf.parse(paramValue); + } else if (parameter[1].equals("COM")) { + comment = paramValue; + } + variables.put(parameter[2], value); + } else { + throw new RuntimeException("invalid parameter for activiti variable: " + parameterName); + } + } + } + if (StringUtils.isNotEmpty(comment)) { + identityService.setAuthenticatedUserId(ShiroUtils.getLoginName()); + comment = agree ? "【同意】" + comment : "【拒绝】" + comment; + taskService.addComment(taskId, instanceId, comment); + } + // 被委派人处理完成任务 + // p.s. 被委托的流程需要先 resolved 这个任务再提交。 + // 所以在 complete 之前需要先 resolved + // resolveTask() 要在 claim() 之前,不然 act_hi_taskinst 表的 assignee 字段会为 null + taskService.resolveTask(taskId, variables); + // 只有签收任务,act_hi_taskinst 表的 assignee 字段才不为 null + taskService.claim(taskId, ShiroUtils.getLoginName()); + taskService.complete(taskId, variables); + + // 更新待办事项状态 + BizTodoItem query = new BizTodoItem(); + query.setTaskId(taskId); + // 考虑到候选用户组(或签,多个待办只要一人审批通过就行),会有多个 todoitem 办理同个 task + List updateList = CollectionUtils.isEmpty(bizTodoItemService.selectBizTodoItemList(query)) ? null : bizTodoItemService.selectBizTodoItemList(query); + for (BizTodoItem update: updateList) { + // 找到当前登录用户的 todoitem,置为已办 + if (update.getTodoUserId().equals(ShiroUtils.getLoginName())) { + update.setIsView("1"); + update.setIsHandle("1"); + update.setHandleUserId(ShiroUtils.getLoginName()); + update.setHandleUserName(ShiroUtils.getSysUser().getUserName()); + update.setHandleTime(DateUtils.getNowDate()); + bizTodoItemService.updateBizTodoItem(update); + } else { + bizTodoItemService.deleteBizTodoItemById(update.getId()); // 删除候选用户组其他 todoitem + } + } + + // 下一节点处理人待办事项 + bizTodoItemService.insertTodoItem(instanceId, itemName, itemContent, module); + } catch (Exception e) { + logger.error("error on complete task {}, variables={}", new Object[]{taskId, variables, e}); + } + } + + @Override + public boolean judgeProcessIsFinish(String instanceId) { + boolean result = false; + List taskList = taskService.createTaskQuery() + .processInstanceId(instanceId) + .list(); + if (CollectionUtils.isEmpty(taskList)) { + result = true; + } + return result; + } + } diff --git a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/domain/BizTodoItem.java b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/domain/BizTodoItem.java index 0c6cdf1e..871a3c8d 100644 --- a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/domain/BizTodoItem.java +++ b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/domain/BizTodoItem.java @@ -1,18 +1,19 @@ package com.ruoyi.process.todoitem.domain; import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import java.util.Date; /** - * 待办已办:biz_todo_item + * 待办事项对象 biz_todo_item * * @author Xianlu Tech * @date 2019-11-08 */ -public class BizTodoItem{ +public class BizTodoItem extends BaseEntity { private static final long serialVersionUID = 1L; /** 主键 ID */ @@ -26,14 +27,14 @@ public class BizTodoItem{ @Excel(name = "事项内容") private String itemContent; - /** 模块名称ID (必须以 uri 一致) */ + /** 模块名称 (必须以 uri 一致) */ @Excel(name = "模块名称") private String module; - + /** 任务 ID */ @Excel(name = "任务 ID") private String taskId; - + /** 流程实例 ID */ @Excel(name = "流程实例 ID") private String instanceId; @@ -77,15 +78,6 @@ public class BizTodoItem{ /** 处理时间 */ @Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd") private Date handleTime; - - /** 模块名称 */ - private String moduleName; - /** 模块地址 */ - private String moduleUrl; - /** 工程名称 */ - private String projectName; - - private String keyNo; public void setId(Long id) { this.id = id; @@ -115,18 +107,7 @@ public class BizTodoItem{ public String getModule() { return module; } - - - - public String getModuleName() { - return moduleName; - } - - public void setModuleName(String moduleName) { - this.moduleName = moduleName; - } - - public void setTaskId(String taskId) { + public void setTaskId(String taskId) { this.taskId = taskId; } @@ -204,7 +185,7 @@ public class BizTodoItem{ public Date getHandleTime() { return handleTime; } - + public String getInstanceId() { return instanceId; } @@ -212,44 +193,14 @@ public class BizTodoItem{ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } - - - - public String getModuleUrl() { - return moduleUrl; - } - - public void setModuleUrl(String moduleUrl) { - this.moduleUrl = moduleUrl; - } - - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - public String getKeyNo() { - return keyNo; - } - - public void setKeyNo(String keyNo) { - this.keyNo = keyNo; - } - @Override + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("itemName", getItemName()) .append("itemContent", getItemContent()) .append("module", getModule()) - .append("moduleName", getModuleName()) - .append("moduleUrl", getModuleUrl()) - .append("keyNo", getKeyNo()) .append("instanceId", getInstanceId()) .append("taskId", getTaskId()) .append("taskName", getTaskName()) diff --git a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java index 87b08df3..cc24e081 100644 --- a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java +++ b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.process.todoitem.mapper; import com.ruoyi.process.todoitem.domain.BizTodoItem; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import java.util.List; import java.util.Map; @@ -61,9 +62,6 @@ public interface BizTodoItemMapper { */ public int deleteBizTodoItemByIds(String[] ids); - //@Select("select * from biz_todo_item where task_id = #{taskId}") - //BizTodoItem selectTodoItemByTaskId(@Param(value = "taskId")String taskId); - public List getTodoItemList(Map paraMap); public long getTodoItemTotal(Map paraMap); public String getCurrentFlowUser(Map paraMap); @@ -72,4 +70,21 @@ public interface BizTodoItemMapper { public String selectTodoItemTaskId(@Param(value = "instanceId")String instanceId,@Param(value = "todoUserId")String todoUserId,@Param(value = "isHandle")String isHandle); public List getTodoItemListNoPaging(Map paraMap); + + @Select("SELECT USER_ID_ FROM ACT_ID_MEMBERSHIP WHERE GROUP_ID_ = (SELECT GROUP_ID_ FROM ACT_RU_IDENTITYLINK WHERE TASK_ID_ = #{taskId})") + List selectTodoUserListByTaskId(@Param(value = "taskId") String taskId); + + @Select("SELECT * FROM BIZ_TODO_ITEM WHERE TASK_ID = #{taskId} AND TODO_USER_ID = #{todoUserId}") + BizTodoItem selectTodoItemByCondition(@Param(value = "taskId") String taskId, @Param(value = "todoUserId") String todoUserId); + + @Select("SELECT USER_ID_ FROM ACT_ID_MEMBERSHIP WHERE USER_ID_ = (SELECT USER_ID_ FROM ACT_RU_IDENTITYLINK WHERE TASK_ID_ = #{taskId})") + String selectTodoUserByTaskId(String id); + + /** + * 任务未处理的用户id集合 + * @param taskId + * @return + */ + @Select("SELECT todo_user_id FROM BIZ_TODO_ITEM WHERE TASK_ID = #{taskId} and is_handle = '0'") + List selectUndealTodoUserList(@Param(value = "taskId") String taskId); } diff --git a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/IBizTodoItemService.java b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/IBizTodoItemService.java index df1e5a37..03a70a3d 100644 --- a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/IBizTodoItemService.java +++ b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/IBizTodoItemService.java @@ -71,4 +71,6 @@ public interface IBizTodoItemService { public String selectTodoItemTaskId(String instanceId,String todoUserId,String isHandle); public List getTodoItemListNoPaging(Map paraMap); + int insertTodoItem(String instanceId, String itemName, String itemContent, String module); + } diff --git a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java index b01e8e84..86739e27 100644 --- a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java +++ b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java @@ -16,6 +16,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.util.List; import java.util.Map; @@ -149,6 +150,63 @@ public class BizTodoItemServiceImpl implements IBizTodoItemService { // TODO Auto-generated method stub return bizTodoItemMapper.getTodoItemListNoPaging(paraMap); } + + @Override + public int insertTodoItem(String instanceId, String itemName, String itemContent, String module) { + BizTodoItem todoItem = new BizTodoItem(); + todoItem.setItemName(itemName); + todoItem.setItemContent(itemContent); + todoItem.setIsView("0"); + todoItem.setIsHandle("0"); + todoItem.setModule(module); + todoItem.setTodoTime(DateUtils.getNowDate()); + List taskList = taskService.createTaskQuery().processInstanceId(instanceId).active().list(); + int counter = 0; + for (Task task: taskList) { + + // todoitem 去重 + BizTodoItem bizTodoItem = bizTodoItemMapper.selectTodoItemByTaskId(task.getId(),null); + if (bizTodoItem != null) continue; + + BizTodoItem newItem = new BizTodoItem(); + BeanUtils.copyProperties(todoItem, newItem); + newItem.setInstanceId(instanceId); + newItem.setTaskId(task.getId()); + newItem.setTaskName("task" + task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1)); + newItem.setNodeName(task.getName()); + String assignee = task.getAssignee(); + // 代理人 + if (StringUtils.isNotBlank(assignee)) { + newItem.setTodoUserId(assignee); + SysUser user = userMapper.selectUserByLoginName(assignee); + newItem.setTodoUserName(user.getUserName()); + bizTodoItemMapper.insertBizTodoItem(newItem); + counter++; + } else { + // 查询候选用户组,系统用户角色视图,group是角色 + List todoUserIdList = bizTodoItemMapper.selectTodoUserListByTaskId(task.getId()); + if (!CollectionUtils.isEmpty(todoUserIdList)) { + for (String todoUserId: todoUserIdList) { + SysUser todoUser = userMapper.selectUserByLoginName(todoUserId); + newItem.setTodoUserId(todoUser.getLoginName()); + newItem.setTodoUserName(todoUser.getUserName()); + bizTodoItemMapper.insertBizTodoItem(newItem); + counter++; + } + } else { + // 查询候选用户,用户id匹配的上 + String todoUserId = bizTodoItemMapper.selectTodoUserByTaskId(task.getId()); + SysUser todoUser = userMapper.selectUserByLoginName(todoUserId); + newItem.setTodoUserId(todoUser.getLoginName()); + newItem.setTodoUserName(todoUser.getUserName()); + bizTodoItemMapper.insertBizTodoItem(newItem); + counter++; + } + } + } + return counter; + } + @Override public int insertTodoItem(String instanceId, BizLeaveVo leave, String module) { BizTodoItem todoItem = new BizTodoItem(); diff --git a/ruoyi-activiti/src/main/resources/mapper/process/BizTodoItemMapper.xml b/ruoyi-activiti/src/main/resources/mapper/process/BizTodoItemMapper.xml index 60665a50..8abfa8e9 100644 --- a/ruoyi-activiti/src/main/resources/mapper/process/BizTodoItemMapper.xml +++ b/ruoyi-activiti/src/main/resources/mapper/process/BizTodoItemMapper.xml @@ -9,7 +9,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - @@ -22,13 +21,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - - select id, item_name, item_content, module,modulename,instance_id,task_id, task_name, node_name, is_view, is_handle, todo_user_id, todo_user_name, handle_user_id, handle_user_name, todo_time, handle_time from biz_todo_item + select id, item_name, item_content, module, instance_id, task_id, task_name, node_name, is_view, is_handle, todo_user_id, todo_user_name, handle_user_id, handle_user_name, todo_time, handle_time from biz_todo_item - select * from biz_todo_item where task_id = #{taskId} and is_handle = #{isHandle} + select * from biz_todo_item + where task_id = #{taskId} + and is_handle = #{isHandle} diff --git a/ruoyi-activiti/src/main/resources/static/js/activiti.js b/ruoyi-activiti/src/main/resources/static/js/activiti.js index 2030d715..b1b5e798 100644 --- a/ruoyi-activiti/src/main/resources/static/js/activiti.js +++ b/ruoyi-activiti/src/main/resources/static/js/activiti.js @@ -28,12 +28,12 @@ function formatTotalDateSub (secondSub) { /* 查看审批历史 */ function showHistoryDialog(instanceId) { - var url = ctx + 'process/historyList/' + instanceId; + var url = ctx + 'process/general/historyList/' + instanceId; $.modal.open("查看审批历史", url, null, null, null, true); } function showProcessImgDialog(instanceId) { - var url = ctx + 'process/processImg/' + instanceId; + var url = ctx + 'process/general/processImg/' + instanceId; $.modal.open("查看流程图", url, null, null, null, true); } @@ -47,3 +47,15 @@ function showFormDialog(instanceId, module) { var url = ctx + module + "/showFormDialog/" + instanceId; $.modal.open('申请详情', url, null, null, null, true); } + +/** + * 审批弹出框 + * @param prefix + * @param taskId + * @param taskName + */ +function showVerifyDialog(prefix,taskId,taskName){ + var url = prefix + "/showVerifyDialog/" + taskId; + $.modal.open(taskName, url); +} + diff --git a/ruoyi-activiti/src/main/resources/templates/process/general/historyList.html b/ruoyi-activiti/src/main/resources/templates/process/general/historyList.html index 921303b2..f113b024 100644 --- a/ruoyi-activiti/src/main/resources/templates/process/general/historyList.html +++ b/ruoyi-activiti/src/main/resources/templates/process/general/historyList.html @@ -33,6 +33,7 @@ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/erp/material/taskGczgVerify.html b/ruoyi-admin/src/main/resources/templates/erp/material/taskGczgVerify.html new file mode 100644 index 00000000..4c559727 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/erp/material/taskGczgVerify.html @@ -0,0 +1,292 @@ + + + + + + + + +
+
+ + + +
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 点击上传 +
只能上传jpg/png文件,第一张图片为主图
+
+
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/erp/material/taskModifyApply.html b/ruoyi-admin/src/main/resources/templates/erp/material/taskModifyApply.html new file mode 100644 index 00000000..2809c64e --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/erp/material/taskModifyApply.html @@ -0,0 +1,311 @@ + + + + + + + + +
+
+ + + + +
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 点击上传 +
只能上传jpg/png文件,第一张图片为主图
+
+
+ + + +
+
+
+ +
+ +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/erp/material/taskYfzjVerify.html b/ruoyi-admin/src/main/resources/templates/erp/material/taskYfzjVerify.html new file mode 100644 index 00000000..9e97f1ca --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/erp/material/taskYfzjVerify.html @@ -0,0 +1,292 @@ + + + + + + + + +
+
+ + + +
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 点击上传 +
只能上传jpg/png文件,第一张图片为主图
+
+
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + + + + \ No newline at end of file