提交 5b1b68b4 编写于 作者: doc_wei's avatar doc_wei

新增HR人员需求申请单

上级 b500011b
var rowId = "";
// 获取所有审批通过状态之后的人员需求申请列表
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
laydate = layui.laydate,
table = layui.table;
laydate.render({
elem: '#createTime',
range: '~'
});
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'queryAllBossPersonRequireList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'},
{ field: 'createName', title: '申请人', width: 140},
{ field: 'applyDepartmentName', title: '申请人部门', width: 140},
{ field: 'recruitJobName', title: '需求岗位', width: 150 },
{ field: 'recruitDepartmentName', title: '需求部门', width: 140 },
{ field: 'wages', title: '薪资', width: 120 },
{ field: 'recruitNum', title: '需求人数', width: 100 },
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function(d){
return '<a lay-event="processDetails" class="notice-title-click">' + d.processInstanceId + '</a>';
}},
{ field: 'stateName', title: '状态', width: 90, templet: function(d){
if(d.state == 6){
return '<span class="state-new">招聘中</span>';
} else if(d.state == 7){
return '<span class="state-new">招聘结束</span>';
} else{
return activitiUtil.showStateName2(d.state, 1);
}
}},
{ field: 'createTime', title: systemLanguage["com.skyeye.entryTime"][languageType], width: 150},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 257, toolbar: '#messageTableBar'}
]],
done: function(){
matchingLanguage();
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'details') { // 详情
details(data);
}else if(layEvent === 'processDetails') { // 流程详情
activitiUtil.activitiDetails(data);
}else if(layEvent === 'setPersonLiable') { // 设置责任人
setPersonLiable(data);
}
});
// 设置责任人
function setPersonLiable(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/bossPersonRequire/bossPersonRequirePersonLiable.html",
title: '设置责任人',
pageId: "bossPersonRequirePersonLiable",
area: ['90vw', '90vh'],
callBack: function(refreshCode){
if (refreshCode == '0') {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1,time: 2000});
loadTable();
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}
});
}
// 详情
function details(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/bossPersonRequire/bossPersonRequireDetails.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "bossPersonRequireDetails",
area: ['90vw', '90vh'],
callBack: function(refreshCode){
}
});
}
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
}
return false;
});
// 刷新
$("body").on("click", "#reloadTable", function(){
loadTable();
});
function loadTable(){
table.reload("messageTable", {where: getTableParams()});
}
function getTableParams(){
var startTime = "", endTime = "";
if(!isNull($("#createTime").val())){
startTime = $("#createTime").val().split('~')[0].trim() + ' 00:00:00';
endTime = $("#createTime").val().split('~')[1].trim() + ' 23:59:59';
}
return {
state: $("#state").val(),
startTime: startTime,
endTime: endTime
};
}
exports('bossPersonRequireAllList', {});
});
......@@ -74,8 +74,6 @@ layui.config({
activitiUtil.activitiDetails(data);
}else if(layEvent === 'revoke') { // 撤销申请
revoke(data);
}else if(layEvent === 'setPersonLiable') { // 设置责任人
setPersonLiable(data);
}
});
......@@ -130,25 +128,6 @@ layui.config({
});
}
// 设置责任人
function setPersonLiable(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/bossPersonRequire/bossPersonRequirePersonLiable.html",
title: '设置责任人',
pageId: "bossPersonRequirePersonLiable",
area: ['90vw', '90vh'],
callBack: function(refreshCode){
if (refreshCode == '0') {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1,time: 2000});
loadTable();
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}
});
}
// 提交审批
function subApproval(data){
layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) {
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin:0 auto; height: 100%;">
<div class="txtcenter" style="margin:0 auto; padding-top: 10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">状态</label>
<div class="layui-input-inline">
<select id="state">
<option value="">全部</option>
<option value="2">审核通过</option>
<option value="6">招聘中</option>
<option value="7">招聘结束</option>
</select>
</div>
<label class="layui-form-label">申请时间</label>
<div class="layui-input-inline">
<input type="text" id="createTime" name="createTime" placeholder="请选择申请时间" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="messageTableBar">
{{# if((d.state == 2 || d.state == 6) && auth('1649989287428')){ }}
<a class="layui-btn layui-btn-xs" lay-event="setPersonLiable">责任人</a>
{{# } }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="details">详情</a>
</script>
</div>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/bossPersonRequire/'}).use('bossPersonRequireAllList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -63,9 +63,6 @@
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
{{# if((d.state == 2 || d.state == 6) && auth('1649855857921')){ }}
<a class="layui-btn layui-btn-xs" lay-event="setPersonLiable">责任人</a>
{{# } }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="details">详情</a>
</script>
</div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册