Browse Source

[feat] 基础资料

解决:新增前端出差单流程审核定义
解决:修改出差单的前端新增页面
解决:修改出差单修改页面
解决:新增出差单VO类。加上流程相关字段
解决:修改后端出差单列表查询接口
解决:修改后端出差单列表导出接口
解决:修改后端保存出差单接口:新增开始审核方法和审核状态
解决:新增 加载审批弹窗后端接口
解决:新增 自动绑定页面字段后端接口
解决:新增 完成任务后端接口
解决:修改查询出差单详情接口
解决:修改查询出差单集合接口
解决:修改出差单的resultMap为vo类型
解决:新增发起人节点判断后端接口,加入需要的角色节点人
解决:新增售后单驳回调整页面
解决:新增出差单上级经理审核页面
解决:新增出差单上级主管审核页面
解决:新增出差单副总经理审核页面
解决:新增出差单总经理审核页面
dev
liuxiaoxu 4 months ago
parent
commit
b7c99610df
  1. 119
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java
  2. 21
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseEvectionForm.java
  3. 34
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/BaseEvectionFormVo.java
  4. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEvectionFormMapper.java
  5. 14
      ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java
  6. 191
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java
  7. 11
      ruoyi-admin/src/main/resources/mapper/system/BaseEvectionFormMapper.xml
  8. 24
      ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html
  9. 55
      ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html
  10. 134
      ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/taskFzjlVerify.html
  11. 121
      ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/taskModifyApply.html
  12. 134
      ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/taskZjlVerify.html
  13. 134
      ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/taskccjlVerify.html
  14. 134
      ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/taskcczgVerify.html

119
ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java

@ -1,15 +1,22 @@
package com.ruoyi.system.controller;
import java.util.HashMap;
import java.util.List;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.system.domain.Vo.BaseEvectionFormVo;
import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo;
import com.ruoyi.system.service.ISysUserService;
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.commons.lang3.BooleanUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.BaseEvectionForm;
@ -19,6 +26,9 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/**
* 出差单Controller
*
@ -34,6 +44,16 @@ public class BaseEvectionFormController extends BaseController
@Autowired
private IBaseEvectionFormService baseEvectionFormService;
@Autowired
private TaskService taskService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private IProcessService processService;
@RequiresPermissions("system:baseEvectionForm:view")
@GetMapping()
public String baseEvectionForm()
@ -47,10 +67,10 @@ public class BaseEvectionFormController extends BaseController
@RequiresPermissions("system:baseEvectionForm:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BaseEvectionForm baseEvectionForm)
public TableDataInfo list(BaseEvectionFormVo baseEvectionFormVo)
{
startPage();
List<BaseEvectionForm> list = baseEvectionFormService.selectBaseEvectionFormList(baseEvectionForm);
List<BaseEvectionFormVo> list = baseEvectionFormService.selectBaseEvectionFormList(baseEvectionFormVo);
return getDataTable(list);
}
@ -61,10 +81,10 @@ public class BaseEvectionFormController extends BaseController
@Log(title = "出差单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BaseEvectionForm baseEvectionForm)
public AjaxResult export(BaseEvectionFormVo baseEvectionFormVo)
{
List<BaseEvectionForm> list = baseEvectionFormService.selectBaseEvectionFormList(baseEvectionForm);
ExcelUtil<BaseEvectionForm> util = new ExcelUtil<BaseEvectionForm>(BaseEvectionForm.class);
List<BaseEvectionFormVo> list = baseEvectionFormService.selectBaseEvectionFormList(baseEvectionFormVo);
ExcelUtil<BaseEvectionFormVo> util = new ExcelUtil<BaseEvectionFormVo>(BaseEvectionFormVo.class);
return util.exportExcel(list, "出差单数据");
}
@ -86,7 +106,84 @@ public class BaseEvectionFormController extends BaseController
@ResponseBody
public AjaxResult addSave(BaseEvectionForm baseEvectionForm)
{
return toAjax(baseEvectionFormService.insertBaseEvectionForm(baseEvectionForm));
// 审核状态-待审核
baseEvectionForm.setAuditStatus("0");
baseEvectionFormService.submitApply(baseEvectionForm);
return AjaxResult.success();
}
/**
* 加载审批弹窗
* */
@GetMapping("/showVerifyDialog/{taskId}")
public String showVerifyDialog(@PathVariable("taskId") String taskId, ModelMap mmap) {
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
String processInstanceId = task.getProcessInstanceId();
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
BaseEvectionFormVo baseEvectionFormVo = baseEvectionFormService.selectBaseEvectionFormById(new Long(processInstance.getBusinessKey()));
mmap.put("formData", baseEvectionFormVo);
mmap.put("taskId", taskId);
String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1);
return prefix + "/task" + verifyName;
}
@ModelAttribute("/preloadObj")
public BaseEvectionFormVo getObj(@RequestParam(value = "evectionId", required = false) Long evectionId, HttpSession session) {
if (evectionId != null) {
return baseEvectionFormService.selectBaseEvectionFormById(evectionId);
}
return new BaseEvectionFormVo();
}
/**
* 完成任务
*
* @return
*/
@RequestMapping(value = "/complete/{taskId}", method = {RequestMethod.POST, RequestMethod.GET})
@ResponseBody
public AjaxResult complete(@PathVariable("taskId") String taskId, @RequestParam(value = "saveEntity", required = false) String saveEntity,
@ModelAttribute("preloadObj") BaseEvectionFormVo baseEvectionFormVo, HttpServletRequest request) {
boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity);
if (saveEntityBoolean){
baseEvectionFormService.updateBaseEvectionForm(baseEvectionFormVo);
}
String instanceId = baseEvectionFormVo.getInstanceId();
String instanceType = baseEvectionFormVo.getInstanceType();
boolean approvedFlag = processService.complete(taskId, instanceId, baseEvectionFormVo.getApplyTitle(),
baseEvectionFormVo.getEvectionCode(),
"evection", new HashMap<String, Object>(), request);
if(!approvedFlag){
// 审核状态-审核拒绝
baseEvectionFormVo.setAuditStatus("2");
}
// 如果任务已结束更新业务表状态 方法中传入的值为原来的instanceId,只是做了调整
boolean processIsFinish = processService.judgeProcessIsFinish(instanceId);
if (processIsFinish) {
// 审核通过
baseEvectionFormVo.setAuditStatus("1");
// 提交
if("submit".equals(instanceType)){
// 使用状态-是
baseEvectionFormVo.setUseStatus("1");
}
// 作废
else if("cancel".equals(instanceType)){
// 使用状态-已作废
baseEvectionFormVo.setUseStatus("2");
}
// 恢复
else if("restore".equals(instanceType)){
// 使用状态-是
baseEvectionFormVo.setUseStatus("1");
}
}
baseEvectionFormService.updateBaseEvectionForm(baseEvectionFormVo);
// 驳回申请后继续申请,可能修改表单
if (saveEntityBoolean) {
baseEvectionFormService.updateBaseEvectionForm(baseEvectionFormVo);
}
return success("任务已完成");
}
/**

21
ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseEvectionForm.java

@ -68,10 +68,10 @@ public class BaseEvectionForm extends BaseEntity
/** 出差时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "预计出差开始时间")
private String evectionBeginTime;
private Date evectionBeginTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "预计出差结束时间")
private String evectionEndTime;
private Date evectionEndTime;
/** 派工单号 */
@Excel(name = "派工单号")
@ -119,8 +119,7 @@ public class BaseEvectionForm extends BaseEntity
/** 流程实例类型 */
private String instanceType;
/** 流程实例类型名称 */
private String instanceTypeName;
/** 提交流程实例ID */
private String submitInstanceId;
@ -154,13 +153,7 @@ public class BaseEvectionForm extends BaseEntity
public void setInstanceType(String instanceType) {
this.instanceType = instanceType;
}
public String getInstanceTypeName() {
return instanceTypeName;
}
public void setInstanceTypeName(String instanceTypeName) {
this.instanceTypeName = instanceTypeName;
}
public String getSubmitInstanceId() {
return submitInstanceId;
}
@ -310,19 +303,19 @@ public class BaseEvectionForm extends BaseEntity
return evectionCauses;
}
public String getEvectionBeginTime() {
public Date getEvectionBeginTime() {
return evectionBeginTime;
}
public void setEvectionBeginTime(String evectionBeginTime) {
public void setEvectionBeginTime(Date evectionBeginTime) {
this.evectionBeginTime = evectionBeginTime;
}
public String getEvectionEndTime() {
public Date getEvectionEndTime() {
return evectionEndTime;
}
public void setEvectionEndTime(String evectionEndTime) {
public void setEvectionEndTime(Date evectionEndTime) {
this.evectionEndTime = evectionEndTime;
}

34
ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/BaseEvectionFormVo.java

@ -0,0 +1,34 @@
package com.ruoyi.system.domain.Vo;
import com.ruoyi.system.domain.BaseEvectionForm;
import lombok.Data;
import java.util.Date;
//出差单VO类
@Data
public class BaseEvectionFormVo extends BaseEvectionForm {
private static final long serialVersionUID = -3627380777050403384L;
/** 申请人姓名 */
private String applyUserName;
/** 任务ID */
private String taskId;
/** 任务名称 */
private String taskName;
/** 办理时间 */
private Date doneTime;
/** 创建人 */
private String createUserName;
/** 流程实例状态 1 激活 2 挂起 */
private String suspendState;
/** 待办用户id */
private String todoUserId;
/** 流程实例类型名称 */
private String instanceTypeName;
/**
* 关键词
*/
private String keyword;
}

5
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEvectionFormMapper.java

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.BaseEvectionForm;
import com.ruoyi.system.domain.Vo.BaseEvectionFormVo;
/**
* 出差单Mapper接口
@ -17,7 +18,7 @@ public interface BaseEvectionFormMapper
* @param evectionId 出差单ID
* @return 出差单
*/
public BaseEvectionForm selectBaseEvectionFormById(Long evectionId);
public BaseEvectionFormVo selectBaseEvectionFormById(Long evectionId);
/**
* 查询出差单列表
@ -25,7 +26,7 @@ public interface BaseEvectionFormMapper
* @param baseEvectionForm 出差单
* @return 出差单集合
*/
public List<BaseEvectionForm> selectBaseEvectionFormList(BaseEvectionForm baseEvectionForm);
public List<BaseEvectionFormVo> selectBaseEvectionFormList(BaseEvectionForm baseEvectionForm);
/**
* 新增出差单

14
ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java

@ -1,7 +1,11 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.sales.domain.SalesAftersalesNotice;
import com.ruoyi.system.domain.BaseEvectionForm;
import com.ruoyi.system.domain.Vo.BaseEvectionFormVo;
import org.activiti.engine.runtime.ProcessInstance;
/**
* 出差单Service接口
@ -17,7 +21,7 @@ public interface IBaseEvectionFormService
* @param evectionId 出差单ID
* @return 出差单
*/
public BaseEvectionForm selectBaseEvectionFormById(Long evectionId);
public BaseEvectionFormVo selectBaseEvectionFormById(Long evectionId);
/**
* 查询出差单列表
@ -25,7 +29,7 @@ public interface IBaseEvectionFormService
* @param baseEvectionForm 出差单
* @return 出差单集合
*/
public List<BaseEvectionForm> selectBaseEvectionFormList(BaseEvectionForm baseEvectionForm);
public List<BaseEvectionFormVo> selectBaseEvectionFormList(BaseEvectionForm baseEvectionForm);
/**
* 新增出差单
@ -74,4 +78,10 @@ public interface IBaseEvectionFormService
int restoreBaseEvectionFormById(Long evectionId);
Object getId();
/**
* 审批流程启动
* */
ProcessInstance submitApply(BaseEvectionForm baseEvectionForm);
}

191
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java

@ -1,16 +1,37 @@
package com.ruoyi.system.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.github.pagehelper.Page;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.core.page.TableSupport;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.system.domain.BaseExpenseAccount;
import com.ruoyi.system.domain.Vo.BaseEvectionFormVo;
import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysRoleService;
import org.activiti.engine.TaskService;
import org.activiti.engine.impl.persistence.entity.TaskEntityImpl;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BaseEvectionFormMapper;
import com.ruoyi.system.domain.BaseEvectionForm;
import com.ruoyi.system.service.IBaseEvectionFormService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
/**
* 出差单Service业务层处理
@ -27,6 +48,22 @@ public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService
@Autowired
private RedisCache redisCache;
@Autowired
private SysUserMapper userMapper;
@Autowired
private TaskService taskService;
@Autowired
private BizTodoItemMapper todoItemMapper;
@Autowired
private IProcessService processService;
@Autowired
private ISysRoleService roleService;
/**
* 查询出差单
*
@ -34,7 +71,7 @@ public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService
* @return 出差单
*/
@Override
public BaseEvectionForm selectBaseEvectionFormById(Long evectionId)
public BaseEvectionFormVo selectBaseEvectionFormById(Long evectionId)
{
return baseEvectionFormMapper.selectBaseEvectionFormById(evectionId);
}
@ -46,9 +83,59 @@ public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService
* @return 出差单
*/
@Override
public List<BaseEvectionForm> selectBaseEvectionFormList(BaseEvectionForm baseEvectionForm)
public List<BaseEvectionFormVo> selectBaseEvectionFormList(BaseEvectionForm baseEvectionForm)
{
return baseEvectionFormMapper.selectBaseEvectionFormList(baseEvectionForm);
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
//PageHelper 仅对第一List分页有效
Page<BaseEvectionFormVo> list = (Page<BaseEvectionFormVo>) baseEvectionFormMapper.selectBaseEvectionFormList(baseEvectionForm);
Page<BaseEvectionFormVo> returnList = new Page<>();
for(BaseEvectionFormVo baseEvectionFormVo : list){
SysUser sysUser = userMapper.selectUserByLoginName(baseEvectionFormVo.getCreateBy());
if (sysUser != null) {
baseEvectionFormVo.setCreateBy(sysUser.getUserName());
}
SysUser sysUser2 = userMapper.selectUserByLoginName(baseEvectionFormVo.getApplyUser());
if (sysUser2!=null){
baseEvectionFormVo.setApplyUserName(sysUser2.getUserName());
}
String instanceId = baseEvectionFormVo.getInstanceId();
// 当前环节
if (StringUtils.isNotBlank(instanceId)) {
List<Task> taskList = taskService.createTaskQuery()
.processInstanceId(instanceId)
// .singleResult();
.list(); // 例如请假会签,会同时拥有多个任务
if (!CollectionUtils.isEmpty(taskList)) {
TaskEntityImpl task = (TaskEntityImpl) taskList.get(0);
String taskId = task.getId();
baseEvectionFormVo.setTaskId(taskId);
// 设置待办用户
List<String> todoUserList = todoItemMapper.selectUndealTodoUserList(taskId);
if(!CollectionUtils.isEmpty(taskList)){
baseEvectionFormVo.setTodoUserId(String.join(",",todoUserList));
}
if (task.getSuspensionState() == 2) {
baseEvectionFormVo.setTaskName("已挂起");
baseEvectionFormVo.setSuspendState("2");
} else {
baseEvectionFormVo.setTaskName(task.getName());
baseEvectionFormVo.setSuspendState("1");
}
} else {
// 已办结或者已撤销
baseEvectionFormVo.setTaskName("已结束");
}
} else {
baseEvectionFormVo.setTaskName("未启动");
}
returnList.add(baseEvectionFormVo);
}
returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal());
returnList.setPageNum(pageNum);
returnList.setPageSize(pageSize);
return returnList;
}
/**
@ -132,4 +219,102 @@ public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService
public Object getId() {
return redisCache.getCacheObject("CC");
}
/**
* 审批流程启动
* */
@Transactional(rollbackFor = Exception.class)
@Override
public ProcessInstance submitApply(BaseEvectionForm baseEvectionForm) {
SysUser user = ShiroUtils.getSysUser();
baseEvectionForm.setApplyUser(user.getLoginName());
baseEvectionForm.setApplyTime(DateUtils.getNowDate());
baseEvectionForm.setEvectionCode(redisCache.generateBillNo("CC"));
// 保存
insertBaseEvectionForm(baseEvectionForm);
// 启动流程
String applyTitle = user.getUserName()+"发起了出差单提交审批-"+DateUtils.dateTimeNow();
String instanceType = "submit";
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,baseEvectionForm, user);
String processInstanceId = processInstance.getProcessInstanceId();
// 提交实例id
baseEvectionForm.setSubmitInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
// 审核状态-审核通过
baseEvectionForm.setAuditStatus("1");
}
baseEvectionFormMapper.updateBaseEvectionForm(baseEvectionForm);
return processInstance;
}
private ProcessInstance startProcessInstance(String applyTitle, String instanceType, BaseEvectionForm baseEvectionForm, SysUser user) {
Long evectionId = baseEvectionForm.getEvectionId();
String businessKey = evectionId.toString(); // 实体类 ID,作为流程的业务 key
String key = "evection";
Map<String,Object> variables = new HashMap<>();
// 构造authority传参
buildAuthority(user, variables);
baseEvectionForm.setApplyTitle(applyTitle);
// 启动流程
ProcessInstance processInstance = processService.submitApply(user.getLoginName(), businessKey, applyTitle,
baseEvectionForm.getEvectionCode(), key, variables);
String processInstanceId = processInstance.getId();
baseEvectionForm.setInstanceId(processInstanceId); // 建立双向关系
baseEvectionForm.setInstanceType(instanceType);
return processInstance;
}
private void buildAuthority(SysUser user, Map<String, Object> variables) {
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
variables.put("authority",1);
//判断请购人的角色,进入相应的逻辑,设置节点审批人变量
if(roleKeys.contains("ywyRole") || roleKeys.contains("ywjlRole") || roleKeys.contains("ywzgRole")){
// 业务经理
variables.put("ccjlRole","ywjlRole");
// 业务主管
variables.put("cczgRole","ywzgRole");
}else if(roleKeys.contains("cgyRole") || roleKeys.contains("cgjlRole") || roleKeys.contains("cgzgRole")){
// 采购经理
variables.put("ccjlRole","cgjlRole");
// 采购主管
variables.put("cczgRole","cgzgRole");
}else if (roleKeys.contains("gcwyRole") || roleKeys.contains("gcjlRole") || roleKeys.contains("gczgRole")){
// 工程经理
variables.put("ccjlRole","gcjlRole");
// 工程主管
variables.put("cczgRole","gczgRole");
} else if (roleKeys.contains("scyRole") || roleKeys.contains("scjlRole") || roleKeys.contains("sczgRole")){
// 生产经理
variables.put("ccjlRole","scjlRoe");
// 生产主管
variables.put("cczgRole","sczgRole");
}else if (roleKeys.contains("shgcsRole") || roleKeys.contains("shjlRole") || roleKeys.contains("shzgRole")){
// 售后经理
variables.put("ccjlRole","shjlRole");
// 售后主管
variables.put("cczgRole","shzgRole");
}else if(roleKeys.contains("cgyyRole") || roleKeys.contains("ckzgRole")){
variables.put("ccjlRole","shzgRole");
// 售后主管
variables.put("cczgRole","shzgRole");
}else if (roleKeys.contains("cwRole") || roleKeys.contains("cwjlRole")){
variables.put("ccjlRole","cwjlRole");
// 售后主管
variables.put("cczgRole","cwJlRole");
}else{
variables.put("authority",2);
}
if(roleKeys.contains("admin")){
// 角色包含业务经理、采购经理、工程经理、生产经理
variables.put("authority",2);
}
}
}

11
ruoyi-admin/src/main/resources/mapper/system/BaseEvectionFormMapper.xml

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.BaseEvectionFormMapper">
<resultMap type="BaseEvectionForm" id="BaseEvectionFormResult">
<resultMap type="BaseEvectionFormVo" id="BaseEvectionFormResult">
<result property="evectionId" column="evection_id" />
<result property="auditStatus" column="audit_status" />
<result property="useStatus" column="use_status" />
@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from base_evection_form
</sql>
<select id="selectBaseEvectionFormList" parameterType="BaseEvectionForm" resultMap="BaseEvectionFormResult">
<select id="selectBaseEvectionFormList" parameterType="BaseEvectionFormVo" resultMap="BaseEvectionFormResult">
<include refid="selectBaseEvectionFormVo" />
<where>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where evection_id = #{evectionId}
</select>
<insert id="insertBaseEvectionForm" parameterType="BaseEvectionForm" useGeneratedKeys="true" keyProperty="evectionId">
<insert id="insertBaseEvectionForm" parameterType="BaseEvectionFormVo" useGeneratedKeys="true" keyProperty="evectionId">
insert into base_evection_form
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditStatus != null">audit_status,</if>
@ -160,7 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateBaseEvectionForm" parameterType="BaseEvectionForm">
<update id="updateBaseEvectionForm" parameterType="BaseEvectionFormVo">
update base_evection_form
<trim prefix="SET" suffixOverrides=",">
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
@ -174,7 +174,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="evectionAddr != null">evection_addr = #{evectionAddr},</if>
<if test="evectionDetailAddr != null">evection_detail_addr = #{evectionDetailAddr},</if>
<if test="evectionCauses != null">evection_causes = #{evectionCauses},</if>
<if test="evectionTime != null">evection_time = #{evectionTime},</if>
<if test="dispatchlistCode != null">dispatchlist_code = #{dispatchlistCode},</if>
<if test="makeCode != null">make_code = #{makeCode},</if>
<if test="travelMode != null">travel_mode = #{travelMode},</if>
@ -182,7 +181,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="transportationCostBudget != null">transportation_cost_budget = #{transportationCostBudget},</if>
<if test="accommodationBudget != null">accommodation_budget = #{accommodationBudget},</if>
<if test="otherExpensesBudget != null">other_expenses_budget = #{otherExpensesBudget},</if>
<if test="realityEvenctionTime != null">reality_evenction_time = #{realityEvenctionTime},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
@ -196,7 +194,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="restoreInstanceId != null">restore_instance_id = #{restoreInstanceId},</if>
<if test="applyTitle != null">apply_title = #{applyTitle},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where evection_id = #{evectionId}
</update>

24
ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html

@ -110,18 +110,18 @@
<input name="otherExpensesBudget" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实际出差时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="realityEvenctionBeginTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<span class="input-group-addon">-</span>
<input name="realityEvectionEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">实际出差时间:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <div class="input-group date">-->
<!-- <input name="realityEvenctionBeginTime" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!-- <span class="input-group-addon">-</span>-->
<!-- <input name="realityEvectionEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">申请人:</label>
<div class="col-sm-8">

55
ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html

@ -58,6 +58,7 @@
</div>
</div>
<th:block th:include="include :: footer" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:baseEvectionForm:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:baseEvectionForm:remove')}]];
@ -65,6 +66,8 @@
var restoreFlag = [[${@permission.hasPermi('system:baseEvectionForm:restore')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "system/baseEvectionForm";
$(function() {
@ -89,6 +92,31 @@
columns: [
{checkbox: true},
{title: '出差单索引id',field: 'evectionId',visible: false},
{title: '流程实例ID',field: 'instanceId',visible: false},
{ title: '流程提交实例ID',field: 'submitInstanceId',visible: false},
{ title:'流程作废实例ID',field: 'cancelInstanceId',visible: false},
{title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false},
{ title: '流程实例类型', field: 'instanceTypeName',visible: false},
{title: '申请人ID',field: 'applyUser', visible: false},
{
field: 'applyUserName',
title: '<span style="color: red;">申请人</span>',
formatter: function(value, row, index) {
return '<span style="color: red;">' + (value ? value : "-") + '</span>';
}
},
{field: 'applyTime',title: '申请时间'
},
{title: '当前任务ID',field: 'taskId',visible: false},
{ title: '待办用户ID',field: 'todoUserId', visible: false},
{ title: '当前任务名称',field: 'taskName',
align: 'center',
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{title: '审核状态',field: 'auditStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
@ -118,13 +146,28 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.evectionId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.evectionId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
// 审核状态-审核通过
if(row.auditStatus=="1"){
// 编辑
// actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
}
// 有流程实例id
if (row.instanceId) {
// 有待办人展示审批按钮,
if (row.todoUserId) {
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName) || loginName == 'admin'){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
}
}
// 审批历史
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
// 进度查看
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
}
// 详情
// actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.aftersalesNoticeId + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
}

134
ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/taskFzjlVerify.html

@ -0,0 +1,134 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('副总经理审核')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseEvectionForm-fzjl" th:object="${formData}">
<input name="evectionId" th:field="*{evectionId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">出差单编号:</label>
<div class="col-sm-8">
<input name="evectionCode" th:field="*{evectionCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<select name="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差人:</label>
<div class="col-sm-8">
<select name="evectionBy" th:field="*{evectionBy}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">同行人:</label>
<div class="col-sm-8">
<input name="partnerBy" th:field="*{partnerBy}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差地:</label>
<div class="col-sm-8">
<input name="evectionAddr" th:field="*{evectionAddr}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差详细地址:</label>
<div class="col-sm-8">
<input name="evectionDetailAddr" th:field="*{evectionDetailAddr}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差事由:</label>
<div class="col-sm-8">
<input name="evectionCauses" th:field="*{evectionCauses}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="evectionBeginTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<span class="input-group-addon">-</span>
<input name="evectionEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">派工单号:</label>
<div class="col-sm-8">
<input name="dispatchlistCode" th:field="*{dispatchlistCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产单号:</label>
<div class="col-sm-8">
<input name="makeCode" th:field="*{makeCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="fzjlVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_fzjlVerifyApproved" id="fzjlVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var taskId = [[${taskId}]];
var prefix = ctx + "system/baseEvectionForm";
$("#form-baseEvectionForm-fzjl").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
$.operate.save(prefix + "/complete/"+taskId, $('#form-baseEvectionForm-fzjl').serialize());
}
}
$("input[name='evectionBeginTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='evectionEndTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='realityeEvenctionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

121
ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/taskModifyApply.html

@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改出差单')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseEvectionForm-modifyApply" th:object="${formData}">
<input name="evectionId" th:field="*{evectionId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">出差单编号:</label>
<div class="col-sm-8">
<input name="evectionCode" th:field="*{evectionCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<select name="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差人:</label>
<div class="col-sm-8">
<select name="evectionBy" th:field="*{evectionBy}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">同行人:</label>
<div class="col-sm-8">
<input name="partnerBy" th:field="*{partnerBy}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差地:</label>
<div class="col-sm-8">
<input name="evectionAddr" th:field="*{evectionAddr}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差详细地址:</label>
<div class="col-sm-8">
<input name="evectionDetailAddr" th:field="*{evectionDetailAddr}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差事由:</label>
<div class="col-sm-8">
<input name="evectionCauses" th:field="*{evectionCauses}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="evectionBeginTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<span class="input-group-addon">-</span>
<input name="evectionEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">派工单号:</label>
<div class="col-sm-8">
<input name="dispatchlistCode" th:field="*{dispatchlistCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产单号:</label>
<div class="col-sm-8">
<input name="makeCode" th:field="*{makeCode}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var taskId = [[${taskId}]];
var prefix = ctx + "system/baseEvectionForm";
$("#form-baseEvectionForm-modifyApply").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/complete/"+taskId, $('#form-baseEvectionForm-modifyApply').serialize());
}
}
$("input[name='evectionBeginTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='evectionEndTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='realityeEvenctionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

134
ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/taskZjlVerify.html

@ -0,0 +1,134 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('总经理审核')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseEvectionForm-zjl" th:object="${formData}">
<input name="evectionId" th:field="*{evectionId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">出差单编号:</label>
<div class="col-sm-8">
<input name="evectionCode" th:field="*{evectionCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<select name="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差人:</label>
<div class="col-sm-8">
<select name="evectionBy" th:field="*{evectionBy}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">同行人:</label>
<div class="col-sm-8">
<input name="partnerBy" th:field="*{partnerBy}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差地:</label>
<div class="col-sm-8">
<input name="evectionAddr" th:field="*{evectionAddr}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差详细地址:</label>
<div class="col-sm-8">
<input name="evectionDetailAddr" th:field="*{evectionDetailAddr}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差事由:</label>
<div class="col-sm-8">
<input name="evectionCauses" th:field="*{evectionCauses}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="evectionBeginTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<span class="input-group-addon">-</span>
<input name="evectionEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">派工单号:</label>
<div class="col-sm-8">
<input name="dispatchlistCode" th:field="*{dispatchlistCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产单号:</label>
<div class="col-sm-8">
<input name="makeCode" th:field="*{makeCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="zjlVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_zjlVerifyApproved" id="zjlVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var taskId = [[${taskId}]];
var prefix = ctx + "system/baseEvectionForm";
$("#form-baseEvectionForm-zjl").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
$.operate.save(prefix + "/complete/"+taskId, $('#form-baseEvectionForm-zjl').serialize());
}
}
$("input[name='evectionBeginTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='evectionEndTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='realityeEvenctionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

134
ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/taskccjlVerify.html

@ -0,0 +1,134 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('经理审核')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseEvectionForm-ccjl" th:object="${formData}">
<input name="evectionId" th:field="*{evectionId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">出差单编号:</label>
<div class="col-sm-8">
<input name="evectionCode" th:field="*{evectionCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<select name="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差人:</label>
<div class="col-sm-8">
<select name="evectionBy" th:field="*{evectionBy}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">同行人:</label>
<div class="col-sm-8">
<input name="partnerBy" th:field="*{partnerBy}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差地:</label>
<div class="col-sm-8">
<input name="evectionAddr" th:field="*{evectionAddr}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差详细地址:</label>
<div class="col-sm-8">
<input name="evectionDetailAddr" th:field="*{evectionDetailAddr}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差事由:</label>
<div class="col-sm-8">
<input name="evectionCauses" th:field="*{evectionCauses}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="evectionBeginTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<span class="input-group-addon">-</span>
<input name="evectionEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">派工单号:</label>
<div class="col-sm-8">
<input name="dispatchlistCode" th:field="*{dispatchlistCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产单号:</label>
<div class="col-sm-8">
<input name="makeCode" th:field="*{makeCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="ccjlVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_ccjlVerifyApproved" id="ccjlVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var taskId = [[${taskId}]];
var prefix = ctx + "system/baseEvectionForm";
$("#form-baseEvectionForm-ccjl").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
$.operate.save(prefix + "/complete/"+taskId, $('#form-baseEvectionForm-ccjl').serialize());
}
}
$("input[name='evectionBeginTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='evectionEndTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='realityeEvenctionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

134
ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/taskcczgVerify.html

@ -0,0 +1,134 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('主管审核')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseEvectionForm-cczg" th:object="${formData}">
<input name="evectionId" th:field="*{evectionId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">出差单编号:</label>
<div class="col-sm-8">
<input name="evectionCode" th:field="*{evectionCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<select name="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差人:</label>
<div class="col-sm-8">
<select name="evectionBy" th:field="*{evectionBy}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">同行人:</label>
<div class="col-sm-8">
<input name="partnerBy" th:field="*{partnerBy}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差地:</label>
<div class="col-sm-8">
<input name="evectionAddr" th:field="*{evectionAddr}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差详细地址:</label>
<div class="col-sm-8">
<input name="evectionDetailAddr" th:field="*{evectionDetailAddr}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差事由:</label>
<div class="col-sm-8">
<input name="evectionCauses" th:field="*{evectionCauses}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出差时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="evectionBeginTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<span class="input-group-addon">-</span>
<input name="evectionEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">派工单号:</label>
<div class="col-sm-8">
<input name="dispatchlistCode" th:field="*{dispatchlistCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产单号:</label>
<div class="col-sm-8">
<input name="makeCode" th:field="*{makeCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="cczgVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_cczgVerifyApproved" id="cczgVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var taskId = [[${taskId}]];
var prefix = ctx + "system/baseEvectionForm";
$("#form-baseEvectionForm-cczg").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
$.operate.save(prefix + "/complete/"+taskId, $('#form-baseEvectionForm-cczg').serialize());
}
}
$("input[name='evectionBeginTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='evectionEndTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='realityeEvenctionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>
Loading…
Cancel
Save