标准化流程
This commit is contained in:
parent
e0e90d5475
commit
8f3763f0cb
|
@ -69,11 +69,11 @@ public class FlowController extends BaseController {
|
|||
@RequiresPermissions("system:flow:finishTask")
|
||||
@ResponseBody
|
||||
@RepeatSubmit
|
||||
public AjaxResult finishTask(CompleteTaskDTO completeTaskDTO)
|
||||
public AjaxResult finishTask(FinishTaskDTO finishTaskDTO)
|
||||
{
|
||||
SysUser sysUser = ShiroUtils.getSysUser();
|
||||
completeTaskDTO.setUserId(String.valueOf(sysUser.getUserId()));
|
||||
flowableService.completeTask(completeTaskDTO);
|
||||
finishTaskDTO.setUserId(String.valueOf(sysUser.getUserId()));
|
||||
flowableTaskService.submitTask(finishTaskDTO);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.snow.common.annotation.RepeatSubmit;
|
|||
import com.snow.common.constant.SequenceContants;
|
||||
import com.snow.common.utils.poi.EasyExcelUtil;
|
||||
import com.snow.flowable.domain.CompleteTaskDTO;
|
||||
import com.snow.flowable.domain.FinishTaskDTO;
|
||||
import com.snow.flowable.domain.leave.SysOaLeaveForm;
|
||||
import com.snow.flowable.domain.purchaseOrder.PurchaseOrderForm;
|
||||
import com.snow.flowable.domain.purchaseOrder.PurchaseOrderMainTask;
|
||||
|
@ -219,8 +220,6 @@ public class PurchaseOrderController extends BaseController
|
|||
BeanUtils.copyProperties(newPurchaseOrderMain,purchaseOrderForm);
|
||||
purchaseOrderForm.setBusinessKey(purchaseOrderMain.getOrderNo());
|
||||
purchaseOrderForm.setStartUserId(String.valueOf(sysUser.getUserId()));
|
||||
// purchaseOrderForm.setBusVarJson(JSON.toJSONString(purchaseOrderForm));
|
||||
// purchaseOrderForm.setClassPackName(PurchaseOrderForm.class.getCanonicalName());
|
||||
purchaseOrderForm.setBusVarUrl("/system/purchaseOrder/detail");
|
||||
ProcessInstance processInstance = flowableService.startProcessInstanceByAppForm(purchaseOrderForm);
|
||||
//推进任务节点
|
||||
|
@ -262,18 +261,17 @@ public class PurchaseOrderController extends BaseController
|
|||
@RepeatSubmit
|
||||
public AjaxResult restart(PurchaseOrderMainTask purchaseOrderMainTask)
|
||||
{
|
||||
SysUser sysUser = ShiroUtils.getSysUser();
|
||||
purchaseOrderMainTask.setUpdateBy(String.valueOf(sysUser.getUserId()));
|
||||
PurchaseOrderMain purchaseOrderMain=new PurchaseOrderMain();
|
||||
SysUser sysUser = ShiroUtils.getSysUser();
|
||||
BeanUtils.copyProperties(purchaseOrderMainTask,purchaseOrderMain);
|
||||
purchaseOrderMain.setUpdateBy(String.valueOf(sysUser.getUserId()));
|
||||
int i = purchaseOrderMainService.updatePurchaseOrderMain(purchaseOrderMain);
|
||||
CompleteTaskDTO completeTaskDTO=new CompleteTaskDTO();
|
||||
completeTaskDTO.setUserId(String.valueOf(sysUser.getUserId()));
|
||||
completeTaskDTO.setComment(purchaseOrderMainTask.getComment());
|
||||
completeTaskDTO.setIsStart(purchaseOrderMainTask.getIsStart());
|
||||
completeTaskDTO.setFiles(purchaseOrderMainTask.getFiles());
|
||||
completeTaskDTO.setTaskId(purchaseOrderMainTask.getTaskId());
|
||||
flowableService.completeTask(completeTaskDTO);
|
||||
|
||||
//完成任务
|
||||
purchaseOrderMainTask.setUserId(String.valueOf(sysUser.getUserId()));
|
||||
purchaseOrderMainTask.setIsUpdateBus(true);
|
||||
purchaseOrderMainTask.setIsStart(purchaseOrderMainTask.getIsPass());
|
||||
flowableTaskService.submitTask(purchaseOrderMainTask);
|
||||
return toAjax(i);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import cn.hutool.core.date.DateUtil;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.snow.common.annotation.RepeatSubmit;
|
||||
import com.snow.common.constant.SequenceContants;
|
||||
import com.snow.common.enums.WorkRecordStatus;
|
||||
import com.snow.common.utils.StringUtils;
|
||||
|
@ -225,34 +226,7 @@ public class SysOaLeaveController extends BaseController
|
|||
return toAjax(sysOaLeaveService.deleteSysOaLeaveByIds(ids));
|
||||
}
|
||||
|
||||
@Log(title = "主管完成审批", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/managerFinishTask")
|
||||
@ResponseBody
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult managerFinishTask(LeaveFinishTaskDTO finishTaskDTO)
|
||||
|
||||
{
|
||||
SysUser sysUser = ShiroUtils.getSysUser();
|
||||
finishTaskDTO.setUserId(String.valueOf(sysUser.getUserId()));
|
||||
finishTaskDTO.setHr("2");
|
||||
flowableTaskService.submitTask(finishTaskDTO);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* hr完成审批
|
||||
*/
|
||||
@Log(title = "hr完成审批", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/hrFinishTask")
|
||||
@ResponseBody
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult hrFinishTask(LeaveFinishTaskDTO finishTaskDTO)
|
||||
{
|
||||
SysUser sysUser = ShiroUtils.getSysUser();
|
||||
finishTaskDTO.setUserId(String.valueOf(sysUser.getUserId()));
|
||||
flowableTaskService.submitTask(finishTaskDTO);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新发起申请
|
||||
|
@ -261,6 +235,7 @@ public class SysOaLeaveController extends BaseController
|
|||
@PostMapping("/reStartTask")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@RepeatSubmit
|
||||
public AjaxResult reStartTask(LeaveRestartTaskDTO finishTaskDTO)
|
||||
{
|
||||
SysUser sysUser = ShiroUtils.getSysUser();
|
||||
|
@ -269,6 +244,7 @@ public class SysOaLeaveController extends BaseController
|
|||
sysOaLeave.setUpdateBy(sysUser.getUserName());
|
||||
int i = sysOaLeaveService.updateSysOaLeave(sysOaLeave);
|
||||
finishTaskDTO.setUserId(String.valueOf(sysUser.getUserId()));
|
||||
finishTaskDTO.setIsUpdateBus(true);
|
||||
flowableTaskService.submitTask(finishTaskDTO);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
@ -1,37 +1,33 @@
|
|||
package com.snow.web.controller.system;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.snow.common.annotation.Log;
|
||||
import com.snow.common.annotation.RepeatSubmit;
|
||||
import com.snow.common.constant.SequenceContants;
|
||||
import com.snow.flowable.domain.CompleteTaskDTO;
|
||||
import com.snow.flowable.domain.resign.SysOaResignTask;
|
||||
import com.snow.common.core.controller.BaseController;
|
||||
import com.snow.common.core.domain.AjaxResult;
|
||||
import com.snow.common.core.page.TableDataInfo;
|
||||
import com.snow.common.enums.BusinessType;
|
||||
import com.snow.common.utils.poi.ExcelUtil;
|
||||
import com.snow.flowable.domain.resign.SysOaResignForm;
|
||||
import com.snow.flowable.domain.resign.SysOaResignTask;
|
||||
import com.snow.flowable.service.FlowableService;
|
||||
import com.snow.flowable.service.FlowableTaskService;
|
||||
import com.snow.framework.util.ShiroUtils;
|
||||
import com.snow.system.domain.SysOaResign;
|
||||
import com.snow.system.domain.SysUser;
|
||||
import com.snow.system.service.ISysOaResignService;
|
||||
import com.snow.system.service.ISysSequenceService;
|
||||
import com.snow.system.service.impl.SysUserServiceImpl;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.flowable.engine.runtime.ProcessInstance;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
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 com.snow.common.annotation.Log;
|
||||
import com.snow.common.enums.BusinessType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import com.snow.system.domain.SysOaResign;
|
||||
import com.snow.system.service.ISysOaResignService;
|
||||
import com.snow.common.core.controller.BaseController;
|
||||
import com.snow.common.core.domain.AjaxResult;
|
||||
import com.snow.common.utils.poi.ExcelUtil;
|
||||
import com.snow.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 离职申请单Controller
|
||||
|
@ -57,6 +53,9 @@ public class SysOaResignController extends BaseController
|
|||
@Autowired
|
||||
private FlowableTaskService flowableTaskService;
|
||||
|
||||
@Autowired
|
||||
private SysUserServiceImpl sysUserService;
|
||||
|
||||
@RequiresPermissions("system:resign:view")
|
||||
@GetMapping()
|
||||
public String resign()
|
||||
|
@ -186,6 +185,10 @@ public class SysOaResignController extends BaseController
|
|||
public String detail(@PathVariable("id") Integer id, ModelMap mmap)
|
||||
{
|
||||
SysOaResign sysOaResign = sysOaResignService.selectSysOaResignById(id);
|
||||
SysUser sysUser = sysUserService.selectUserById(Long.parseLong(sysOaResign.getApplyPerson()));
|
||||
sysOaResign.setApplyPerson(sysUser.getUserName());
|
||||
SysUser transitionPerson = sysUserService.selectUserById(Long.parseLong(sysOaResign.getTransitionPerson()));
|
||||
sysOaResign.setTransitionPerson(transitionPerson.getUserName());
|
||||
mmap.put("sysOaResign", sysOaResign);
|
||||
return prefix + "/detail";
|
||||
}
|
||||
|
@ -205,6 +208,9 @@ public class SysOaResignController extends BaseController
|
|||
sysOaResign.setUpdateBy(String.valueOf(sysUser.getUserId()));
|
||||
BeanUtils.copyProperties(sysOaResignTask,sysOaResign);
|
||||
int i = sysOaResignService.updateSysOaResign(sysOaResign);
|
||||
sysOaResignTask.setUserId(String.valueOf(sysUser.getUserId()));
|
||||
sysOaResignTask.setIsUpdateBus(true);
|
||||
sysOaResignTask.setIsStart(sysOaResignTask.getIsPass());
|
||||
flowableTaskService.submitTask(sysOaResignTask);
|
||||
return toAjax(i);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ spring:
|
|||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/snow?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://localhost:3306/snow?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: root
|
||||
# 从库数据源
|
||||
|
|
|
@ -69,11 +69,14 @@ spring:
|
|||
restart:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
#邮件配置
|
||||
mail:
|
||||
#mail主机
|
||||
host: smtp.126.com
|
||||
username:
|
||||
#用户名
|
||||
username: qimingjin@126.com
|
||||
#开启POP3之后设置的客户端授权码
|
||||
password:
|
||||
password: JSHBRRRDBNHPXPFB
|
||||
default-encoding: UTF-8
|
||||
|
||||
|
||||
|
@ -152,13 +155,14 @@ flowable:
|
|||
common:
|
||||
app:
|
||||
idm-url: http://localhost:80
|
||||
#flowable admin默认用户配置
|
||||
idm-admin:
|
||||
user: admin
|
||||
password: test
|
||||
#上传文件的方式
|
||||
sys:
|
||||
file:
|
||||
active: local
|
||||
active: aliyun
|
||||
|
||||
log4j:
|
||||
logger:
|
||||
|
|
|
@ -214,3 +214,40 @@
|
|||
<div th:fragment="jquery.jqprint-0.3.js">
|
||||
<script th:src="@{/js/jquery.jqprint-0.3.js}"></script>
|
||||
</div>
|
||||
|
||||
<!--审批页-->
|
||||
<div th:fragment="approvalpage">
|
||||
<h4 class="form-header h4">流程图</h4>
|
||||
<div class="vertical-timeline-block" style="margin-left: 10%" >
|
||||
<img class="imgcode" width="85%"/>
|
||||
</div>
|
||||
<h4 class="form-header h4">填写信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批结果:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('process_check_status')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="isPass" th:value="${dict.dictValue}" required>
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批意见:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="comment" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批附件:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="files" name="file" type="file" multiple>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-6 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-success" onclick="submitCheckHandler()"><i class="fa fa-check"></i>提 交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -9,13 +9,6 @@
|
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-0 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="submitCheckHandler(true)"><i class="fa fa-check"></i>通 过</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="submitCheckHandler(false)"><i class="fa fa-remove"></i>驳 回</button>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<input class="form-control" type="hidden" name="taskId" th:value="*{taskId}"/>
|
||||
<input class="form-control" type="hidden" id="processInstanceId" name="processInstanceId" th:value="*{processInstanceId}"/>
|
||||
|
||||
|
@ -50,26 +43,7 @@
|
|||
<div class="form-control-static" th:text="${appFrom.applyPerson}">
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">流程图</h4>
|
||||
<div class="vertical-timeline-block" >
|
||||
<img class="imgcode" width="85%"/>
|
||||
</div>
|
||||
<h4 class="form-header h4">填写信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">人事审批意见:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="comment" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批附件:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="suggestionFileUrl" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<th:block th:include="include :: approvalpage" />
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
|
@ -129,9 +103,9 @@
|
|||
data.push({"name": "files["+i+"].url", "value":files[i].url});
|
||||
}
|
||||
}
|
||||
data.push({"name": "isPass", "value": status});
|
||||
console.log(data);
|
||||
$.operate.saveTab("/system/leave/hrFinishTask", data);
|
||||
$.operate.saveTab("/flow/finishTask", data);
|
||||
$.operate.saveTab("/flow/finishTask", data);
|
||||
}
|
||||
}
|
||||
|
|
@ -9,16 +9,12 @@
|
|||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="signupForm" th:object="${appFrom}">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-0 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="submitCheckHandler(true)"><i class="fa fa-check"></i>重新申请</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="submitCheckHandler(false)"><i class="fa fa-remove"></i>删除</button>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<h4 class="form-header h4">请假信息</h4>
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<input class="form-control" type="hidden" id="processInstanceId" name="processInstanceId" th:value="${processInstanceId}"/>
|
||||
<input class="form-control" type="hidden" name="taskId" th:value="${taskId}"/>
|
||||
<div class="form-control" type="hidden" name="applyPerson" th:field="*{applyPerson}">
|
||||
<div class="form-control" type="hidden" name="fileUrl" th:field="*{fileUrl}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请假单号:</label>
|
||||
<div class="col-sm-8">
|
||||
|
@ -56,31 +52,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">附件:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" name="fileUrl" th:field="*{fileUrl}">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="fileUrl" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">填写信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">重新申请说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="comment" class="form-control" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批附件:</label>
|
||||
<div class="col-sm-8">
|
||||
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="suggestionFileUrl" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: approvalpage" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
@ -90,6 +62,12 @@
|
|||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
<script th:inline="javascript">
|
||||
var files=new Array();
|
||||
$(function () {
|
||||
var processInstanceId= $("#processInstanceId").val();
|
||||
console.log(processInstanceId);
|
||||
var url ="/modeler/getProcessDiagram?processInstanceId="+processInstanceId;
|
||||
$(".imgcode").attr("src", url);
|
||||
});
|
||||
|
||||
$(".file-upload").each(function (i) {
|
||||
var val = $("input[name='" + this.id + "']").val();
|
||||
|
@ -137,7 +115,6 @@
|
|||
data.push({"name": "files["+i+"].url", "value":files[i].url});
|
||||
}
|
||||
}
|
||||
data.push({"name": "isPass", "value": status});
|
||||
console.log(data);
|
||||
$.operate.saveTab("/system/leave/reStartTask", data);
|
||||
}
|
|
@ -1,134 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('主管审批')" />
|
||||
<th:block th:include="include :: jsonview-css" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-0 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="submitCheckHandler(true)"><i class="fa fa-check"></i>通 过</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="submitCheckHandler(false)"><i class="fa fa-remove"></i>驳 回</button>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<input class="form-control" type="hidden" name="taskId" th:value="*{taskId}"/>
|
||||
<input class="form-control" type="hidden" id="processInstanceId" name="processInstanceId" th:value="*{processInstanceId}"/>
|
||||
<h4 class="form-header h4">请假信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">单号:</label>
|
||||
<div class="form-control-static" th:text="${appFrom.leaveNo}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">标题:</label>
|
||||
<div class="form-control-static" th:text="${appFrom.name}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请假理由:</label>
|
||||
<div class="form-control-static"><pre id="reason"></pre></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">开始时间:</label>
|
||||
<div class="form-control-static" th:text="${#dates.format(appFrom.startTime, 'yyyy-MM-dd hh:mm:ss')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">结束时间:</label>
|
||||
<div class="form-control-static" th:text="${#dates.format(appFrom.endTime, 'yyyy-MM-dd HH:mm:ss')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">申请人:</label>
|
||||
<div class="form-control-static" th:text="${appFrom.applyPerson}">
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">流程图</h4>
|
||||
<div class="vertical-timeline-block" >
|
||||
<img class="imgcode" width="85%"/>
|
||||
</div>
|
||||
<h4 class="form-header h4">填写信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">主管审批意见:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="comment" class="form-control" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批附件:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="suggestionFileUrl" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: jsonview-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
<script th:inline="javascript">
|
||||
var files=new Array();
|
||||
$(function() {
|
||||
var reason = [[${appFrom.reason}]];
|
||||
console.log(reason);
|
||||
if ($.common.isNotEmpty(reason) && reason.length < 2000) {
|
||||
$("#reason").text(reason);
|
||||
} else {
|
||||
$("#reason").text(reason);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(".file-upload").each(function (i) {
|
||||
var val = $("input[name='" + this.id + "']").val();
|
||||
$(this).fileinput({
|
||||
'uploadUrl': '/common/upload',
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: [val],
|
||||
maxFileCount: 1,
|
||||
autoReplace: true
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
|
||||
files.push({"key": data.response.fileKey,"name": data.response.fileName, "url":data.response.url});
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
})
|
||||
$(this).fileinput('_initFileActions');
|
||||
});
|
||||
|
||||
|
||||
function submitCheckHandler(status) {
|
||||
if ($.validate.form()) {
|
||||
var data = $("#signupForm").serializeArray();
|
||||
for(var i=0;i<data.length;i++){
|
||||
if(data[i].name=='comment'&&(data[i].value==''||data[i].value==null)){
|
||||
$.modal.alertError("请填写审批意见");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(files!=null||files!=''){
|
||||
for(var i=0;i<files.length;i++){
|
||||
data.push({"name": "files["+i+"].key", "value":files[i].key});
|
||||
data.push({"name": "files["+i+"].name", "value":files[i].name});
|
||||
data.push({"name": "files["+i+"].url", "value":files[i].url});
|
||||
}
|
||||
}
|
||||
data.push({"name": "isPass", "value": status});
|
||||
console.log(data);
|
||||
$.operate.saveTab("/system/leave/managerFinishTask", data);
|
||||
}
|
||||
}
|
||||
$(function () {
|
||||
var processInstanceId= $("#processInstanceId").val();
|
||||
var url ="/modeler/getProcessDiagram?processInstanceId="+processInstanceId;
|
||||
$(".imgcode").attr("src", url);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -71,40 +71,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<h4 class="form-header h4">流程图</h4>
|
||||
<div class="vertical-timeline-block" >
|
||||
<img class="imgcode" width="85%"/>
|
||||
</div>
|
||||
<h4 class="form-header h4">填写信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批结果:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('process_check_status')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="isPass" th:value="${dict.dictValue}" required>
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批意见:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="comment" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批附件:</label>
|
||||
<div class="col-sm-8">
|
||||
<!--<input type="hidden" name="files" >-->
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="files" name="file" type="file" multiple>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-6 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-success" onclick="submitCheckHandler()"><i class="fa fa-check"></i>提 交</button>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: approvalpage" />
|
||||
</form>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
|
|
|
@ -67,40 +67,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">流程图</h4>
|
||||
<div class="col-sm-offset-1">
|
||||
<img class="imgcode" width="85%"/>
|
||||
</div>
|
||||
<h4 class="form-header h4">填写信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批结果:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('process_check_status')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="isStart" th:value="${dict.dictValue}" required>
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批意见:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="comment" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批附件:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" name="suggestionFileUrl" >
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="suggestionFileUrl" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-6 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-success" onclick="submitCheckHandler()"><i class="fa fa-check"></i>提 交</button>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: approvalpage" />
|
||||
</form>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">订单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderNo" th:field="*{orderNo}" class="form-control" type="text">
|
||||
<input name="orderNo" th:field="*{orderNo}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<label class="col-sm-3 control-label">离职类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="resignType" class="form-control m-b" th:with="type=${@dict.getType('sys_resign_type')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{resignType}"></option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -55,14 +55,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">离职类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="resignType" class="form-control m-b" th:with="type=${@dict.getType('sys_resign_type')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">附件:</label>
|
||||
<div class="col-sm-8">
|
||||
|
|
|
@ -37,10 +37,6 @@
|
|||
<label >离职日期:</label>
|
||||
<span th:text="${#dates.format(appFrom.resignTime, 'yyyy-MM-dd')}"/>
|
||||
</div>
|
||||
<!--<div class="col-xs-3 col-sm-3">
|
||||
<label>提交日期:</label>
|
||||
<span th:text="${#dates.format(appFrom.createTime, 'yyyy-MM-dd')}"/>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-3 col-sm-4 col-md-offset-1">
|
||||
|
@ -55,40 +51,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<h4 class="form-header h4">流程图</h4>
|
||||
<div class="vertical-timeline-block" >
|
||||
<img class="imgcode" width="85%"/>
|
||||
</div>
|
||||
<h4 class="form-header h4">填写信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批结果:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('process_check_status')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="isPass" th:value="${dict.dictValue}" required>
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批意见:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="comment" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批附件:</label>
|
||||
<div class="col-sm-8">
|
||||
<!--<input type="hidden" name="files" >-->
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="files" name="file" type="file" multiple>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-6 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-success" onclick="submitCheckHandler()"><i class="fa fa-check"></i>提 交</button>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: approvalpage" />
|
||||
</form>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
|
@ -0,0 +1,131 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet" />
|
||||
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet" />
|
||||
<!-- bootstrap-table 表格插件样式 -->
|
||||
<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.css}" rel="stylesheet" />
|
||||
<link th:href="@{/css/style.css}" rel="stylesheet" />
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css}" rel="stylesheet" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||
</head>
|
||||
<body class="white-bg" >
|
||||
<form class="form-horizontal m-t" id="signupForm" th:object="${appFrom}">
|
||||
<input class="form-control" type="hidden" name="taskId" th:value="${taskId}"/>
|
||||
<input class="form-control" type="hidden" id="processInstanceId" th:value="${processInstanceId}"/>
|
||||
<input class="form-control" type="hidden" name="businessKey" th:value="${appFrom.resignNo}"/>
|
||||
<input name="id" th:value="${appFrom.id}" type="hidden">
|
||||
<br/>
|
||||
<h2 class="form-header h2" >离职申请信息</h2>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">离职单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="resignNo" th:field="*{resignNo}" 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="resignType" class="form-control m-b" th:with="type=${@dict.getType('sys_resign_type')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{resignType}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">离职标题:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="name" th:field="*{name}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">离职理由:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="reason" class="form-control">[[*{reason}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">离职去向:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="resignPlaceGo" th:field="*{resignPlaceGo}" 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="transitionPerson" th:field="*{transitionPerson}" 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="resignTime" th:value="${#dates.format(appFrom.resignTime, 'yyyy-MM-dd')}" 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 type="hidden" name="fileUrl" th:field="*{fileUrl}">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="fileUrl" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<th:block th:include="include :: approvalpage" />
|
||||
</form>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
<script th:inline="javascript">
|
||||
$(function () {
|
||||
var processInstanceId= $("#processInstanceId").val();
|
||||
var url ="/modeler/getProcessDiagram?processInstanceId="+processInstanceId;
|
||||
$(".imgcode").attr("src", url);
|
||||
});
|
||||
var files=new Array();
|
||||
$(".file-upload").each(function (i) {
|
||||
var val = $("input[name='" + this.id + "']").val();
|
||||
$(this).fileinput({
|
||||
'uploadUrl': '/common/upload',
|
||||
initialPreviewAsData: true,
|
||||
allowedFileExtensions: ['jpg', 'gif', 'png',".docx","doc","ppt","pptx","xls","xlsx","vsd","rtf","wps","pdf","txt"],//接收的文件后缀
|
||||
initialPreview: [val],
|
||||
maxFileCount: 1,
|
||||
autoReplace: true
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
files.push({"key": data.response.fileKey,"name": data.response.fileName, "url":data.response.url});
|
||||
// $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
})
|
||||
$(this).fileinput('_initFileActions');
|
||||
});
|
||||
|
||||
<!--提交审核结果-->
|
||||
function submitCheckHandler() {
|
||||
if ($.validate.form()) {
|
||||
var data = $("#signupForm").serializeArray();
|
||||
for(var i=0;i<data.length;i++){
|
||||
if(data[i].name=='comment'&&(data[i].value==''||data[i].value==null)){
|
||||
$.modal.alertError("请填写审批意见");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(files!=null||files!=''){
|
||||
for(var i=0;i<files.length;i++){
|
||||
data.push({"name": "files["+i+"].key", "value":files[i].key});
|
||||
data.push({"name": "files["+i+"].name", "value":files[i].name});
|
||||
data.push({"name": "files["+i+"].url", "value":files[i].url});
|
||||
}
|
||||
}
|
||||
console.log(data);
|
||||
$.operate.saveTab("/system/resign/restart", data);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -13,69 +13,62 @@
|
|||
</head>
|
||||
<body class="white-bg" >
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<input name="id" th:value="${purchaseOrder.id}" type="hidden">
|
||||
<h2 class="form-header h2" align="center" >采购单信息</h2>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-sm-5 col-md-offset-1">
|
||||
<label>单号:</label>
|
||||
<span th:text="${purchaseOrder.orderNo}"/>
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-6">
|
||||
<label>采购标题:</label>
|
||||
<span th:text="${purchaseOrder.title}"/>
|
||||
<input name="id" th:value="${sysOaResign.id}" type="hidden">
|
||||
<h2 class="form-header h2" align="center" >离职单信息</h2>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">单号:</label>
|
||||
<div class="form-control-static" th:text="${sysOaResign.resignNo}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-3 col-sm-4 col-md-offset-1">
|
||||
<label>供应商:</label>
|
||||
<span th:text="${purchaseOrder.supplierName}"/>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-3">
|
||||
<label >订货日期:</label>
|
||||
<span th:text="${#dates.format(purchaseOrder.orderTime, 'yyyy-MM-dd')}"/>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-3">
|
||||
<label>交货日期:</label>
|
||||
<span th:text="${#dates.format(purchaseOrder.deliveryDate, 'yyyy-MM-dd')}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">离职类型:</label>
|
||||
<div class="form-control-static" th:text="${@dict.getLabel('sys_resign_type',sysOaResign.resignType)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-3 col-sm-4 col-md-offset-1">
|
||||
<label >采购人:</label>
|
||||
<span th:text="${purchaseOrder.belongUser}"/>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-3">
|
||||
<label >总数量:</label>
|
||||
<span th:text="${purchaseOrder.totalQuantity}"/>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-3">
|
||||
<label >总金额:</label>
|
||||
<span th:text="${purchaseOrder.totalPrice}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标题:</label>
|
||||
<div class="form-control-static" th:text="${sysOaResign.name}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-10 col-sm-10 col-md-offset-1">
|
||||
<label>备注:</label>
|
||||
<span th:text="${purchaseOrder.remark}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">申请人:</label>
|
||||
<div class="form-control-static" th:text="${sysOaResign.applyPerson}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">交接人:</label>
|
||||
<div class="form-control-static" th:text="${sysOaResign.transitionPerson}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">流程状态:</label>
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('process_status')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="processStatus" th:value="${dict.dictValue}" th:field="${sysOaResign.processStatus}" disabled>
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">离职去向:</label>
|
||||
<div class="form-control-static" th:text="${sysOaResign.resignPlaceGo}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">离职时间:</label>
|
||||
<div class="form-control-static" th:text="${#dates.format(sysOaResign.resignTime, 'yyyy-MM-dd')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">离职理由:</label>
|
||||
<div class="form-control-static" th:text="${sysOaResign.reason}">
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">采购单明细</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<!-- <th:block th:include="include :: jsonview-js" />-->
|
||||
<script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js"></script>
|
||||
<script th:src="@{/js/jquery.jqprint-0.3.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
|
||||
function printData(){
|
||||
$("#signupForm").jqprint({
|
||||
debug: false,
|
||||
|
@ -85,74 +78,7 @@
|
|||
});
|
||||
};
|
||||
|
||||
$(function() {
|
||||
var reason = [[${purchaseOrder.remark}]];
|
||||
console.log(reason);
|
||||
if ($.common.isNotEmpty(reason) && reason.length < 2000) {
|
||||
$("#reason").text(reason);
|
||||
} else {
|
||||
$("#reason").text(reason);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
data: [[${purchaseOrder.purchaseOrderItemList}]],
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'goodsNo',
|
||||
align: 'center',
|
||||
title: '货物编号'
|
||||
},
|
||||
{
|
||||
field: 'goodsName',
|
||||
align: 'center',
|
||||
title: '名称'
|
||||
},
|
||||
{
|
||||
field: 'goodsSize',
|
||||
align: 'center',
|
||||
title: '规格'
|
||||
},
|
||||
{
|
||||
field: 'goodsQuantity',
|
||||
align: 'center',
|
||||
title: '数量'
|
||||
},
|
||||
{
|
||||
field: 'goodsPrice',
|
||||
align: 'center',
|
||||
title: '单价'
|
||||
},
|
||||
{
|
||||
field: 'totalPrice',
|
||||
align: 'center',
|
||||
title: '总价'
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
align: 'center',
|
||||
title: '备注'
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -12,7 +12,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">离职单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="resignNo" th:field="*{resignNo}" class="form-control" type="text">
|
||||
<input name="resignNo" th:field="*{resignNo}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:resign:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:resign:remove')}]];
|
||||
var detailFlag = [[${@permission.hasPermi('system:resign:detail')}]];
|
||||
var resignTypeDatas = [[${@dict.getType('sys_resign_type')}]];
|
||||
var processStatusDatas = [[${@dict.getType('process_status')}]];
|
||||
var prefix = ctx + "system/resign";
|
||||
|
@ -81,6 +82,7 @@
|
|||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
detailUrl: prefix+"/detail/{id}",
|
||||
modalName: "离职申请单",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
|
@ -129,10 +131,11 @@
|
|||
/*if(row.processStatus!=0) {
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="printPur(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
|
||||
}*/
|
||||
actions.push('<a class="btn btn-info btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i>详情</a> ');
|
||||
|
||||
if(row.processStatus==0) {
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>发起审批</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -114,4 +114,5 @@ public class BeanUtils extends org.springframework.beans.BeanUtils
|
|||
return JSON.parseArray(JSON.toJSONString(sourceList), resultClass);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
package com.snow.common.utils.bean;
|
||||
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.FatalBeanException;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* @program: snow
|
||||
* @description 最近在解决问题时候发现,BeanUtils copyProperties 方法会将值为null的字段也进行复制,
|
||||
* 这有时候会不能满足我们的需求,所以为了解决复制null问题,对该方法就行了重写。
|
||||
* @author: 没用的阿吉
|
||||
* @create: 2021-03-11 22:35
|
||||
**/
|
||||
public class MyBeanUtils extends BeanUtils {
|
||||
|
||||
public static void copyProperties(Object source, Object target) throws BeansException {
|
||||
Assert.notNull(source, "Source must not be null");
|
||||
Assert.notNull(target, "Target must not be null");
|
||||
Class<?> actualEditable = target.getClass();
|
||||
PropertyDescriptor[] targetPds = getPropertyDescriptors(actualEditable);
|
||||
for (PropertyDescriptor targetPd : targetPds) {
|
||||
if (targetPd.getWriteMethod() != null) {
|
||||
PropertyDescriptor sourcePd = getPropertyDescriptor(source.getClass(), targetPd.getName());
|
||||
if (sourcePd != null && sourcePd.getReadMethod() != null) {
|
||||
try {
|
||||
Method readMethod = sourcePd.getReadMethod();
|
||||
if (!Modifier.isPublic(readMethod.getDeclaringClass().getModifiers())) {
|
||||
readMethod.setAccessible(true);
|
||||
}
|
||||
Object value = readMethod.invoke(source);
|
||||
// 这里判断以下value是否为空 当然这里也能进行一些特殊要求的处理
|
||||
if (value != null) {
|
||||
Method writeMethod = targetPd.getWriteMethod();
|
||||
if (!Modifier.isPublic(writeMethod.getDeclaringClass().getModifiers())) {
|
||||
writeMethod.setAccessible(true);
|
||||
}
|
||||
writeMethod.invoke(target, value);
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
throw new FatalBeanException("Could not copy properties from source to target", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -42,6 +42,11 @@ public class FinishTaskDTO implements Serializable {
|
|||
*/
|
||||
private List<FileEntry> files;
|
||||
|
||||
/**
|
||||
* 是否修改业务参数
|
||||
*/
|
||||
private Boolean isUpdateBus=false;
|
||||
|
||||
|
||||
|
||||
public final static String IS_PASS="isPass";
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package com.snow.flowable.domain.purchaseOrder;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.snow.common.core.domain.BaseEntity;
|
||||
import com.snow.flowable.domain.FileEntry;
|
||||
import com.snow.flowable.domain.FinishTaskDTO;
|
||||
import com.snow.system.domain.PurchaseOrderItem;
|
||||
import lombok.Data;
|
||||
|
||||
|
@ -18,7 +17,7 @@ import java.util.List;
|
|||
* @date 2021/1/13 13:47
|
||||
*/
|
||||
@Data
|
||||
public class PurchaseOrderMainTask extends BaseEntity implements Serializable {
|
||||
public class PurchaseOrderMainTask extends FinishTaskDTO implements Serializable {
|
||||
/** id */
|
||||
private Integer id;
|
||||
|
||||
|
@ -54,31 +53,10 @@ public class PurchaseOrderMainTask extends BaseEntity implements Serializable {
|
|||
|
||||
private Long isDelete;
|
||||
|
||||
/**
|
||||
* 采购单子表
|
||||
*/
|
||||
private List<PurchaseOrderItem> purchaseOrderItemList;
|
||||
|
||||
/**
|
||||
* 任务ID
|
||||
*/
|
||||
private String taskId;
|
||||
/**
|
||||
* 完成任务人
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
|
||||
/**
|
||||
* 是否通过
|
||||
*/
|
||||
private Boolean isStart;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
private String comment;
|
||||
/**
|
||||
* 审批节点的相关文件(只在审批节点展示)
|
||||
*/
|
||||
|
||||
private List<FileEntry> files;
|
||||
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ public class LeaveStartListener extends AbstractExecutionListener<SysOaLeaveForm
|
|||
|
||||
protected void process() {
|
||||
|
||||
SysOaLeaveForm appForm = getVariable("appForm");
|
||||
String processInstanceId = getProcessInstanceId();
|
||||
String businessKey= getBusinessKey();
|
||||
SysOaLeave sysOaLeave=new SysOaLeave();
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package com.snow.flowable.listener.resign;
|
||||
|
||||
import com.snow.common.enums.ProcessStatus;
|
||||
import com.snow.flowable.domain.resign.SysOaResignForm;
|
||||
import com.snow.flowable.listener.AbstractExecutionListener;
|
||||
import com.snow.system.domain.SysOaResign;
|
||||
import com.snow.system.service.impl.SysOaResignServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @program: snow
|
||||
* @description 离职申请结束监听器
|
||||
* @author: 没用的阿吉
|
||||
* @create: 2021-03-11 14:05
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SignatureEndListener extends AbstractExecutionListener<SysOaResignForm> {
|
||||
|
||||
@Autowired
|
||||
private SysOaResignServiceImpl sysOaResignService;
|
||||
|
||||
@Override
|
||||
protected void process() {
|
||||
String businessKey= getBusinessKey();
|
||||
SysOaResign sysOaResign=new SysOaResign();
|
||||
sysOaResign.setProcessStatus(ProcessStatus.PASS.ordinal());
|
||||
sysOaResign.setResignNo(businessKey);
|
||||
sysOaResignService.updateSysOaResignByResignNo(sysOaResign);
|
||||
}
|
||||
}
|
|
@ -5,18 +5,30 @@ import com.snow.flowable.listener.AbstractExecutionListener;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @program: snow
|
||||
* @description
|
||||
* @description 交接人同意执行监听器
|
||||
* @author: 没用的阿吉
|
||||
* @create: 2021-03-10 23:00
|
||||
**/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ManagerSignatureFlowListener extends AbstractExecutionListener<SysOaResignForm> {
|
||||
public class TransitionPersonSignatureFlowListener extends AbstractExecutionListener<SysOaResignForm> {
|
||||
|
||||
|
||||
@Override
|
||||
protected void process() {
|
||||
SysOaResignForm appForms = getAppForms();
|
||||
//设置会签参数
|
||||
//设置三个人作为多实例的人员
|
||||
List<String> userList = new ArrayList<>();
|
||||
userList.add("1");
|
||||
userList.add("2");
|
||||
userList.add("102");
|
||||
setVariable("hrSignatureList", userList);
|
||||
|
||||
}
|
||||
}
|
|
@ -17,4 +17,21 @@ public interface AppFormService {
|
|||
* @return
|
||||
*/
|
||||
<A extends AppForm> A getAppFrom(String processInstanceId);
|
||||
|
||||
/**
|
||||
* 根据执行id获取表单数据
|
||||
* @param executionId
|
||||
* @param <A>
|
||||
* @return
|
||||
*/
|
||||
<A extends AppForm> A getAppFromByExecutionId(String executionId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据任务id获取表单数据
|
||||
* @param taskId
|
||||
* @param <A>
|
||||
* @return
|
||||
*/
|
||||
<A extends AppForm> A getAppFromByTaskId(String taskId);
|
||||
}
|
||||
|
|
|
@ -47,9 +47,9 @@ public interface FlowableTaskService {
|
|||
/**
|
||||
* 完成任务
|
||||
* @param finishTaskDTO
|
||||
* @param <T>
|
||||
* @param
|
||||
*/
|
||||
<T extends FinishTaskDTO> void submitTask(T finishTaskDTO);
|
||||
void submitTask(FinishTaskDTO finishTaskDTO);
|
||||
|
||||
/**
|
||||
* 自动完成任务
|
||||
|
|
|
@ -1,20 +1,16 @@
|
|||
package com.snow.flowable.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
import com.snow.flowable.common.constants.FlowConstants;
|
||||
import com.snow.flowable.domain.AppForm;
|
||||
import com.snow.flowable.service.AppFormService;
|
||||
import com.snow.flowable.service.FlowableService;
|
||||
import com.snow.system.domain.SysOaLeave;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.flowable.engine.HistoryService;
|
||||
import org.flowable.engine.RuntimeService;
|
||||
import org.flowable.engine.TaskService;
|
||||
import org.flowable.engine.history.HistoricProcessInstance;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author qimingjin
|
||||
* @Title:
|
||||
|
@ -28,6 +24,13 @@ public class AppFormServiceImpl implements AppFormService {
|
|||
@Autowired
|
||||
private FlowableService flowableService;
|
||||
|
||||
@Autowired
|
||||
private RuntimeService runtimeService;
|
||||
|
||||
@Autowired
|
||||
private TaskService taskService;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public <A extends AppForm> A getAppFrom(String processInstanceId) {
|
||||
|
@ -44,7 +47,52 @@ public class AppFormServiceImpl implements AppFormService {
|
|||
* @return
|
||||
*/
|
||||
protected <V> V getVariable(HistoricProcessInstance historicProcessInstance,String key){
|
||||
|
||||
return (V)historicProcessInstance.getProcessVariables().get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据执行id获取表单数据
|
||||
* @param executionId
|
||||
* @param <A>
|
||||
* @return
|
||||
*/
|
||||
public <A extends AppForm> A getAppFromByExecutionId(String executionId) {
|
||||
return getVariableByExecutionId(executionId);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据任务id获取表单数据
|
||||
* @param taskId
|
||||
* @param <A>
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public <A extends AppForm> A getAppFromByTaskId(String taskId) {
|
||||
return getVariableByTaskId(taskId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取流程变量
|
||||
* @param executionId
|
||||
* @param <V>
|
||||
* @return
|
||||
*/
|
||||
protected <V> V getVariableByExecutionId(String executionId){
|
||||
// boolean b1 = runtimeService.hasVariable(executionId, FlowConstants.APP_FORM);
|
||||
return (V)runtimeService.getVariable(executionId, FlowConstants.APP_FORM);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取流程变量
|
||||
* @param taskId
|
||||
* @param <V>
|
||||
* @return
|
||||
*/
|
||||
protected <V> V getVariableByTaskId(String taskId){
|
||||
return (V)taskService.getVariable(taskId,FlowConstants.APP_FORM);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil;
|
|||
import com.google.common.collect.Maps;
|
||||
import com.snow.common.core.page.PageModel;
|
||||
import com.snow.common.exception.BusinessException;
|
||||
import com.snow.common.utils.bean.MyBeanUtils;
|
||||
import com.snow.flowable.common.constants.FlowConstants;
|
||||
import com.snow.flowable.common.enums.FlowDefEnum;
|
||||
import com.snow.flowable.common.enums.FlowInstanceEnum;
|
||||
|
@ -24,6 +25,7 @@ import org.flowable.engine.history.HistoricProcessInstanceQuery;
|
|||
import org.flowable.engine.runtime.ProcessInstance;
|
||||
import org.flowable.identitylink.api.IdentityLink;
|
||||
import org.flowable.identitylink.api.history.HistoricIdentityLink;
|
||||
import org.flowable.task.api.DelegationState;
|
||||
import org.flowable.task.api.Task;
|
||||
import org.flowable.task.api.TaskQuery;
|
||||
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
|
||||
|
@ -64,6 +66,9 @@ public class FlowableTaskServiceImpl implements FlowableTaskService {
|
|||
@Autowired
|
||||
private SysUserServiceImpl sysUserService;
|
||||
|
||||
@Autowired
|
||||
private AppFormServiceImpl appFormService;
|
||||
|
||||
@Override
|
||||
public PageModel<TaskVO> findTasksByUserId(String userId, TaskBaseDTO taskBaseDTO) {
|
||||
//根据用户ID获取角色
|
||||
|
@ -202,12 +207,13 @@ public class FlowableTaskServiceImpl implements FlowableTaskService {
|
|||
|
||||
|
||||
@Override
|
||||
public <T extends FinishTaskDTO> void submitTask(T finishTaskDTO) {
|
||||
public void submitTask(FinishTaskDTO finishTaskDTO) {
|
||||
Task task = this.getTask(finishTaskDTO.getTaskId());
|
||||
if(StringUtils.isEmpty(task)){
|
||||
log.info("完成任务时,该任务ID:%不存在",finishTaskDTO.getTaskId());
|
||||
throw new BusinessException(String.format("该任务ID:%不存在",finishTaskDTO.getTaskId()));
|
||||
}
|
||||
AppForm appFrom = appFormService.getAppFrom(task.getProcessInstanceId());
|
||||
////设置审批人,若不设置则数据表userid字段为null
|
||||
Authentication.setAuthenticatedUserId(finishTaskDTO.getUserId());
|
||||
if(!StringUtils.isEmpty(finishTaskDTO.getComment())){
|
||||
|
@ -231,18 +237,30 @@ public class FlowableTaskServiceImpl implements FlowableTaskService {
|
|||
runtimeService.setVariable(task.getExecutionId(),t.getKey(),t.getValue())
|
||||
);
|
||||
}
|
||||
if(!StringUtils.isEmpty(finishTaskDTO.getIsPass())){
|
||||
runtimeService.setVariable(task.getExecutionId(),CompleteTaskDTO.IS_PASS,finishTaskDTO.getIsPass());
|
||||
paramMap.put(CompleteTaskDTO.IS_PASS,finishTaskDTO.getIsPass());
|
||||
//修改业务数据的时候流程业务数据重新赋值
|
||||
if(finishTaskDTO.getIsUpdateBus()&&appFrom!=null){
|
||||
MyBeanUtils.copyProperties(finishTaskDTO,appFrom);
|
||||
runtimeService.setVariable(task.getExecutionId(),FlowConstants.APP_FORM,appFrom);
|
||||
}
|
||||
if(!StringUtils.isEmpty(finishTaskDTO.getIsStart())){
|
||||
runtimeService.setVariable(task.getExecutionId(),CompleteTaskDTO.IS_START,finishTaskDTO.getIsStart());
|
||||
paramMap.put(CompleteTaskDTO.IS_START,finishTaskDTO.getIsStart());
|
||||
// owner不为空说明可能存在委托任务
|
||||
if (!StringUtils.isEmpty(task.getOwner())) {
|
||||
DelegationState delegationState = task.getDelegationState();
|
||||
switch (delegationState) {
|
||||
//委派中
|
||||
case PENDING:
|
||||
// 被委派人处理完成任务
|
||||
taskService.resolveTask(task.getId(),paramMap);
|
||||
break;
|
||||
default:
|
||||
taskService.claim(task.getId(),finishTaskDTO.getUserId());
|
||||
taskService.complete(task.getId(),paramMap,true);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
//claim the task,当任务分配给了某一组人员时,需要该组人员进行抢占。抢到了就将该任务给谁处理,其他人不能处理。认领任务
|
||||
taskService.claim(task.getId(),finishTaskDTO.getUserId());
|
||||
taskService.complete(task.getId(),paramMap,true);
|
||||
}
|
||||
|
||||
//claim the task,当任务分配给了某一组人员时,需要该组人员进行抢占。抢到了就将该任务给谁处理,其他人不能处理。认领任务
|
||||
taskService.claim(task.getId(),finishTaskDTO.getUserId());
|
||||
taskService.complete(task.getId(),paramMap,true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package com.snow.framework.web.service;
|
||||
|
||||
import com.snow.system.domain.SysUser;
|
||||
import com.snow.system.service.impl.SysUserServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @program: snow
|
||||
* @description
|
||||
* @author: 没用的阿吉
|
||||
* @create: 2021-03-11 14:50
|
||||
**/
|
||||
@Service("user")
|
||||
public class UserService {
|
||||
|
||||
@Autowired
|
||||
private SysUserServiceImpl sysUserService;
|
||||
|
||||
/**
|
||||
* 根据id获取name
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public String getName(String id)
|
||||
{
|
||||
SysUser sysUser = sysUserService.selectUserById(Long.parseLong(id));
|
||||
return sysUser.getUserName();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue