提交 0309c5f7 编写于 作者: doc_wei's avatar doc_wei

新增面试者管理【我负责的人员】

上级 1c90a2c2
var rowId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'bossInterviewee001',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'},
{ field: 'name', title: '姓名', align: 'left', width: 100, templet: function(d){
return '<a lay-event="details" class="notice-title-click">' + d.name + '</a>';
}},
{ field: 'phone', title: '联系方式', align: 'left', width: 120 },
{ field: 'fromName', title: '来源', align: 'left', width: 120 },
{ field: 'workYears', title: '工作年限', align: 'left', width: 100 },
{ field: 'favoriteJob', title: '心仪岗位', align: 'left', width: 130 },
{ field: 'stateName', title: '状态', align: 'left', width: 80 },
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'}
]],
done: function(){
matchingLanguage();
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'edit') { //编辑
edit(data);
}else if (layEvent === 'delet') { //删除
delet(data);
}else if (layEvent === 'details') { //详情
details(data);
}
});
// 删除
function delet(data){
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index);
AjaxPostUtil.request({url:reqBasePath + "bossInterviewee003", params:{id: data.id}, type:'json', method: "DELETE", callback:function(json){
if(json.returnCode == 0){
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1,time: 2000});
loadTable();
}else{
winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
}
}});
});
}
// 编辑
function edit(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/bossInterviewee/bossIntervieweeEdit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "bossIntervieweeEdit",
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/bossInterviewee/bossIntervieweeDetails.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "bossIntervieweeDetails",
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(){
return {
name: $("#name").val(),
phone: $("#phone").val(),
type: 2
};
}
exports('myChargeBossIntervieweeList', {});
});
<!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 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">
<input type="text" id="name" name="name" placeholder="请输入姓名" class="layui-input" />
</div>
<label class="layui-form-label">联系方式</label>
<div class="layui-input-inline">
<input type="text" id="phone" name="phone" 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">
<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="tableBar">
{{# if(auth('1642838177779')){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1642838160216')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delet"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
</script>
</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/bossInterviewee/'}).use('myChargeBossIntervieweeList');
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册