提交 14c4c6c4 编写于 作者: doc_wei's avatar doc_wei

新增面试者来源选择工具函数

上级 08847cfc
......@@ -13,8 +13,9 @@
# 开源版请下载`master`分支
- erp+生产演示视频:https://mp.weixin.qq.com/s/CrFM_VZShi-FIJ8zD0_Nqg
- 需要进微信群(加我拉你进群,wzq_598748873),请提供自己的邮箱,默认订阅每周更新内容推送。
- 不需要进群的,请直接加微信:ZhiJinShuLi
- 企业版请加微信:wzq_598748873
- 加微信后需提供所在企业、姓名、邮箱、联系方式,默认订阅每周更新内容推送。
- 非企业版请进QQ群:1016439713,进群后请自行修改备注:职业-地域-昵称,群内只回答开源版问题
- `本项目分为开源版和企业版,不喜勿喷,谢谢。`
- 企业版信息:https://docs.qq.com/doc/DQlRxcVRMWWVjbU1i?_from=1&disableReturnList=1
- 参加企业版改进计划,享受最优惠价格,[点我查看](https://mp.weixin.qq.com/s/YIms04X-bbGJwMs1gree1g)
......
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
table = layui.table;
$("#showInfo").html("面试者来源选择规则:双击指定行即可选中。");
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'bossIntervieweeFrom001',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ type: 'radio'},
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'},
{ field: 'title', title: '来源', align: 'left', width: 150 },
{ field: 'fromUrl', title: '来源地址', align: 'left', width: 300 }
]],
done: function(res){
matchingLanguage();
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('dblclick',function(){
var dubClick = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover");
dubClick.find("input[type='radio']").prop("checked", true);
form.render();
var chooseIndex = JSON.stringify(dubClick.data('index'));
var obj = res.rows[chooseIndex];
parent.bossUtil.bossIntervieweeFromChooseMation = obj;
parent.refreshCode = '0';
parent.layer.close(index);
});
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('click',function(){
var click = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover");
click.find("input[type='radio']").prop("checked", true);
form.render();
})
}
});
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 {
title: $("#title").val()
};
}
exports('bossIntervieweeFromListChoose', {});
});
<!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;">
<div class="winui-tip alert-info" id="showInfo">
</div>
<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="title" name="title" 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>
</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/bossIntervieweeFrom/'}).use('bossIntervieweeFromListChoose');
</script>
</body>
</html>
\ No newline at end of file
......@@ -22,6 +22,7 @@ var customerJS = {
"sysFileUtil": "../../assets/lib/layui/customer/sysFileUtil.js", // 系统文件相关处理工具
"publicKeyCode": "../../assets/lib/layui/customer/publicKeyCode.js", // 快捷键
"sysSupplierUtil": "../../assets/lib/layui/customer/sysSupplierUtil.js", // 供应商相关工具
"bossUtil": "../../assets/lib/layui/customer/bossUtil.js", // 招聘模块相关工具
};
// 编辑加载自定义的js文件
......
// 招聘模块工具函数
var bossUtil = {
/**
* 打开面试者来源选择页面
*
* @param callback 回调函数
*/
bossIntervieweeFromChooseMation: {}, // 已经选择的面试者来源信息
openBossIntervieweeFromChoosePage: function (callback){
_openNewWindows({
url: "../../tpl/",
title: "面试者来源",
pageId: "dsFormObjectRelationChooseByFirstTypeCodePage",
area: ['480px', '500px'],
callBack: function(refreshCode){
if (refreshCode == '0') {
if(typeof(callback) == "function") {
callback(bossUtil.bossIntervieweeFromChooseMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}});
}
};
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册