提交 15ea9663 编写于 作者: doc_wei's avatar doc_wei

新增面试官安排功能

上级 5b1b68b4
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'tagEditor'], function(exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var interviewer = [];
showGrid({
id: "showForm",
url: flowableBasePath + "queryBossInterviewArrangementById",
params: {id: parent.rowId},
pagination: false,
method: "GET",
template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb, json){
json.bean.basicResume = stringManipulation.textAreaShow(json.bean.basicResume);
json.bean.stateName = bossUtil.showStateName(json.bean.state);
},
ajaxSendAfter: function (json) {
skyeyeEnclosure.showDetails({'enclosureUpload': json.bean.enclosureInfo});
var userNames = [];
interviewer = [].concat(json.bean.interviewer);
$.each(interviewer, function(i, item){
userNames.push(item.name);
});
$('#interviewer').tagEditor({
initialTags: userNames,
placeholder: '请选择面试官',
editorTag: false,
beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1;
$.each(interviewer, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) {
interviewer.splice(inArray, 1);
}
}
});
matchingLanguage();
form.render();
// 提交
form.on('submit(formSubBean)', function(data) {
if(winui.verifyForm(data.elem)) {
var params = {
id: parent.rowId,
interviewer: interviewer[0].id
};
AjaxPostUtil.request({url: flowableBasePath + "setBossInterviewer", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
return false;
});
}
});
// 面试官选择
$("body").on("click", ".interviewerBtn", function(){
systemCommonUtil.userReturnList = [].concat(interviewer);
systemCommonUtil.chooseOrNotMy = "1"; // 人员列表中是否包含自己--1.包含;其他参数不包含
systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (staffChooseList){
// 移除所有tag
var tags = $('#interviewer').tagEditor('getTags')[0].tags;
for (i = 0; i < tags.length; i++) {
$('#interviewer').tagEditor('removeTag', tags[i]);
}
interviewer = [].concat(staffChooseList);
// 添加新的tag
$.each(interviewer, function(i, item){
$('#interviewer').tagEditor('addTag', item.name);
});
});
});
});
\ No newline at end of file
......@@ -6,7 +6,7 @@ layui.config({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form'], function(exports) {
winui.renderColor();
var $ = layui.$
var $ = layui.$,
form = layui.form;
showGrid({
......
......@@ -37,7 +37,7 @@ layui.config({
{ field: 'departmentName', title: '面试部门', width: 140},
{ field: 'jobName', title: '面试岗位', width: 150 },
{ field: 'interviewTime', title: '面试时间', width: 140, align: 'center' },
{ field: 'interviewer', title: '面试官', width: 100 },
{ field: 'interviewer', title: '面试官', width: 140 },
{ field: 'state', title: '面试状态', width: 160, templet: function(d){
return bossUtil.showStateName(d.state);
}},
......
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 + 'queryMyEntryBossPersonRequireAboutArrangementList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'},
{ field: 'interviewName', title: '面试者', width: 100},
{ field: 'departmentName', title: '面试部门', width: 140},
{ field: 'jobName', title: '面试岗位', width: 150 },
{ field: 'interviewTime', title: '面试时间', width: 140, align: 'center' },
{ field: 'interviewer', title: '面试官', width: 140 },
{ field: 'state', title: '面试状态', width: 160, templet: function(d){
return bossUtil.showStateName(d.state);
}},
{ field: 'createTime', title: systemLanguage["com.skyeye.entryTime"][languageType], align: 'center', 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 === 'arrangeInterviewer') { // 安排面试官
arrangeInterviewer(data);
}
});
// 安排面试官
function arrangeInterviewer(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/bossInterviewArrangement/arrangeInterviewer.html",
title: '安排面试官',
pageId: "arrangeInterviewer",
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/bossInterviewArrangement/bossInterviewArrangementDetails.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "bossInterviewArrangementDetails",
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('bossInterviewerList', {});
});
<!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;padding:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
</form>
</div>
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">面试者信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">面试者</label>
<div class="layui-input-block ver-center">
{{interviewName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">面试时间</label>
<div class="layui-input-block ver-center">
{{interviewTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">联系方式</label>
<div class="layui-input-block ver-center">
{{phone}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">工作年限</label>
<div class="layui-input-block ver-center">
{{workYears}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">心仪岗位</label>
<div class="layui-input-block ver-center">
{{favoriteJob}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">基本简历</label>
<div class="layui-input-block ver-center">
{{{basicResume}}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">附件资料</label>
<div class="layui-input-block ver-center" id="enclosureUpload">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">人员需求信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">需求部门</label>
<div class="layui-input-block ver-center">
{{departmentName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">需求岗位</label>
<div class="layui-input-block ver-center">
{{jobName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">面试信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">面试官<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="interviewer" name="interviewer" win-verify="required" placeholder="请选择面试官" class="layui-input" readonly="readonly"/>
<i class="fa fa-plus-circle input-icon interviewerBtn" style="top: 8px;"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formSubBean">提交</button>
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/bossInterviewArrangement/'}).use('arrangeInterviewer');
</script>
</body>
</html>
\ No newline at end of file
......@@ -80,7 +80,7 @@
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">面试官</label>
<div class="layui-input-block ver-center">
{{interviewer}}
{{interviewerName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
......
<!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="3">已提交(待面试)</option>
<option value="4">面试通过</option>
<option value="5">面试不通过</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 == '3') && auth('1649993901134')){ }}
<a class="layui-btn layui-btn-xs" lay-event="arrangeInterviewer">安排面试官</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/bossInterviewArrangement/'}).use('bossInterviewerList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -21,9 +21,9 @@
<option value="7">招聘结束</option>
</select>
</div>
<label class="layui-form-label">申请时间</label>
<label class="layui-form-label">录入时间</label>
<div class="layui-input-inline">
<input type="text" id="createTime" name="createTime" placeholder="请选择申请时间" class="layui-input" />
<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>
......
......@@ -26,9 +26,9 @@
<option value="7">招聘结束</option>
</select>
</div>
<label class="layui-form-label">申请时间</label>
<label class="layui-form-label">录入时间</label>
<div class="layui-input-inline">
<input type="text" id="createTime" name="createTime" placeholder="请选择申请时间" class="layui-input" />
<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>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册