提交 50a553b5 编写于 作者: doc_wei's avatar doc_wei

feat: 员工相关的表格修改

上级 88714d5c
......@@ -138,7 +138,6 @@ layui.config({
});
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
......
......@@ -17,9 +17,7 @@
</div>
</div>
<div style="margin:auto 10px;">
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
......
......@@ -162,7 +162,7 @@ layui.config({
function cancellation(data) {
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.bossBasePath + "invalidJobTransfer", params: {id: data.id}, type: 'json', method: "PUT", callback: function (json) {
AjaxPostUtil.request({url: sysMainMation.bossBasePath + "invalidJobTransfer", params: {id: data.id}, type: 'json', method: "POST", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
......
......@@ -13,8 +13,6 @@ layui.config({
form = layui.form,
table = layui.table,
tableCheckBoxUtil = layui.tableCheckBoxUtil;
var selTemplate = getFileContent('tpl/template/select-option.tpl')
// 选择类型,默认单选,true:多选,false:单选
var userStaffCheckType = isNull(parent.systemCommonUtil.userStaffCheckType) ? false : parent.systemCommonUtil.userStaffCheckType;
......@@ -49,7 +47,7 @@ layui.config({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'staff008',
url: reqBasePath + 'staff001',
where: getTableParams(),
even: true,
page: true,
......@@ -62,14 +60,8 @@ layui.config({
return d.jobNumber + ' ' + d.userName;
}},
{ field: 'staffType', title: '类型', rowspan: '3', align: 'left', width: 90, templet: function (d) {
if(d.staffType == 1){
return '普通员工';
} else if (d.staffType == 2){
return '教职工';
} else {
return '参数错误';
}
}},
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("userStaffType", 'id', d.staffType, 'name');
}},
{ field: 'email', title: '邮箱', rowspan: '3', align: 'left', width: 170 },
{ field: 'userPhoto', title: '头像', rowspan: '3', align: 'center', width: 60, templet: function (d) {
if(isNull(d.userPhoto)){
......@@ -97,10 +89,11 @@ layui.config({
],
done: function(res, curr, count){
matchingLanguage();
if(!loadCompany){
initCompany();
}
if(userStaffCheckType){
initTableSearchUtil.initAdvancedSearch(this, res.searchFilter, form, "请输入姓名,工号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
if (userStaffCheckType) {
// 设置选中
tableCheckBoxUtil.checkedDefault({
gridId: 'messageTable',
......@@ -128,102 +121,31 @@ layui.config({
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
});
var loadCompany = false;
// 初始化公司
function initCompany(){
loadCompany = true;
systemCommonUtil.getSysCompanyList(function (json) {
// 加载企业数据
$("#companyList").html(getDataUseHandlebars(selTemplate, json));
form.render('select');
});
}
// 初始化部门
function initDepartment(){
showGrid({
id: "departmentList",
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyList").val()},
pagination: false,
method: 'POST',
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
form.render('select');
}
});
}
function initJob() {
// 根据部门id获取岗位集合
systemCommonUtil.queryJobListByDepartmentId($("#departmentList").val(), function(data) {
$("#jobList").html(getDataUseHandlebars(selTemplate, data));
form.render('select');
});
}
// 公司监听事件
form.on('select(companyList)', function(data) {
initDepartment();
initJob();
});
// 部门监听事件
form.on('select(departmentList)', function(data) {
initJob();
});
// 保存
$("body").on("click", "#saveCheckBox", function() {
var selectedData = tableCheckBoxUtil.getValue({
gridId: 'messageTable'
});
if(selectedData.length == 0){
if (selectedData.length == 0) {
winui.window.msg("请选择员工", {icon: 2, time: 2000});
return false;
}
AjaxPostUtil.request({url: reqBasePath + "staff009", params: {ids: selectedData.toString()}, type: 'json', method: "POST", callback: function (json) {
parent.systemCommonUtil.checkStaffMation = [].concat(json.rows);
parent.layer.close(index);
parent.refreshCode = '0';
}});
parent.systemCommonUtil.checkStaffMation = [].concat(selectedData);
parent.layer.close(index);
parent.refreshCode = '0';
});
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
refreshTable();
}
return false;
});
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function refreshTable(){
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return {
userName: $("#userName").val(),
userSex: $("#userSex").val(),
userIdCard: $("#userIdCard").val(),
companyName: $("#companyList").val(),
departmentName: $("#departmentList").val(),
jobName: $("#jobList").val()
};
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('sysEveUserStaffChoose', {});
......
......@@ -62,14 +62,8 @@ layui.config({
}},
{ field: 'jobNumber', title: '工号', rowspan: '3', align: 'left', width: 100, fixed: 'left'},
{ field: 'staffType', title: '类型', rowspan: '3', align: 'left', width: 90, templet: function (d) {
if (d.staffType == 1) {
return '普通员工';
} else if (d.staffType == 2) {
return '教职工';
} else {
return '参数错误';
}
}},
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("userStaffType", 'id', d.staffType, 'name');
}},
{ field: 'email', title: '邮箱', rowspan: '3', align: 'left', width: 170 },
{ field: 'userPhoto', title: '头像', rowspan: '3', align: 'center', width: 60, templet: function (d) {
if (isNull(d.userPhoto)) {
......
......@@ -5,71 +5,22 @@
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
<link href="../../assets/lib/layui/lay/modules/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
<link href="../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.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="userName" name="userName" placeholder="请输入员工姓名" class="layui-input" />
</div>
<label class="layui-form-label">身份证</label>
<div class="layui-input-inline">
<input type="text" id="userIdCard" name="userIdCard" placeholder="请输入员工身份证" class="layui-input" />
</div>
<label class="layui-form-label">性别</label>
<div class="layui-input-inline">
<select id="userSex" name="userSex">
<option value="">全部</option>
<option value="0">保密</option>
<option value="1"></option>
<option value="2"></option>
</select>
</div>
<label class="layui-form-label">公司</label>
<div class="layui-input-inline">
<select lay-filter="companyList" lay-search="" id="companyList">
</select>
</div>
<label class="layui-form-label">部门</label>
<div class="layui-input-inline">
<select lay-filter="departmentList" lay-search="" id="departmentList">
</select>
</div>
<label class="layui-form-label">职位</label>
<div class="layui-input-inline">
<select lay-filter="jobList" lay-search="" id="jobList">
</select>
</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 class="winui-tip alert-info" id="showInfo">
</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>
<button class="layui-btn layui-btn-sm layui-btn-normal" type="button" id="saveCheckBox" style="float: right;">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button class="layui-btn layui-btn-sm layui-btn-normal search-table-btn-right" type="button" id="saveCheckBox">
<i class="fa fa-save" aria-hidden="true" style="margin-right: 5px"></i>
<language showName="com.skyeye.save"></language>
</button>
</div>
</div>
<div style="margin:auto 10px;">
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
......
......@@ -12,7 +12,6 @@ layui.config({
form = layui.form,
table = layui.table,
soulTable = layui.soulTable;
var selTemplate = getFileContent('tpl/template/select-option.tpl')
// 已设定员工薪资档案
table.render({
......@@ -36,14 +35,8 @@ layui.config({
return d.jobNumber + '_' + d.userName;
}},
{ field: 'staffType', title: '类型', rowspan: '3', align: 'left', width: 90, templet: function (d) {
if(d.staffType == 1){
return '普通员工';
} else if (d.staffType == 2){
return '教职工';
} else {
return '参数错误';
}
}},
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("userStaffType", 'id', d.staffType, 'name');
}},
{ field: 'email', title: '邮箱', rowspan: '3', align: 'left', width: 170 },
{ field: 'userPhoto', title: '头像', rowspan: '3', align: 'center', width: 60, templet: function (d) {
if(isNull(d.userPhoto)){
......@@ -70,10 +63,10 @@ layui.config({
{ field: 'jobName', title: '职位', align: 'left', width: 120}
]
],
done: function(json) {
if(!loadCompany){
initCompany();
}
done: function(res) {
initTableSearchUtil.initAdvancedSearch(this, res.searchFilter, form, "请输入姓名,工号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
soulTable.render(this);
matchingLanguage();
}
......@@ -89,57 +82,6 @@ layui.config({
}
});
var loadCompany = false;
// 初始化公司
function initCompany(){
loadCompany = true;
systemCommonUtil.getSysCompanyList(function (json) {
// 加载企业数据
$("#companyList").html(getDataUseHandlebars(selTemplate, json));
form.render('select');
});
}
// 初始化部门
function initDepartment(){
if (isNull($("#companyList").val())) {
$("#companyList").val('')
form.render('select');
} else {
showGrid({
id: "departmentList",
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyList").val()},
pagination: false,
method: 'POST',
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
form.render('select');
}
});
}
}
function initJob(){
// 根据部门id获取岗位集合
systemCommonUtil.queryJobListByDepartmentId($("#departmentList").val(), function(data) {
$("#jobList").html(getDataUseHandlebars(selTemplate, data));
form.render('select');
});
}
// 公司监听事件
form.on('select(companyList)', function(data) {
initDepartment();
initJob();
});
// 部门监听事件
form.on('select(departmentList)', function(data) {
initJob();
});
// 薪资变更
function wagesDesign(data) {
rowId = data.id;
......@@ -153,37 +95,19 @@ layui.config({
loadTable();
}});
}
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
refreshTable();
}
return false;
$("body").on("click", "#reloadTable", function() {
loadTable();
});
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function refreshTable(){
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams() {
return {
companyId: $("#companyList").val(),
departmentId: $("#departmentList").val(),
jobId: $("#jobList").val(),
userName: $("#userName").val(),
jobNumber: $("#jobNumber").val(),
userSex: $("#userSex").val()
};
}
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('wagesStaffDesignMationList', {});
});
......@@ -12,7 +12,6 @@ layui.config({
form = layui.form,
table = layui.table,
soulTable = layui.soulTable;
var selTemplate = getFileContent('tpl/template/select-option.tpl')
// 待设定薪资员工列表
table.render({
......@@ -36,13 +35,7 @@ layui.config({
return d.jobNumber + '_' + d.userName;
}},
{ field: 'staffType', title: '类型', rowspan: '3', align: 'left', width: 90, templet: function (d) {
if(d.staffType == 1){
return '普通员工';
} else if (d.staffType == 2){
return '教职工';
} else {
return '参数错误';
}
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("userStaffType", 'id', d.staffType, 'name');
}},
{ field: 'email', title: '邮箱', rowspan: '3', align: 'left', width: 170 },
{ field: 'userPhoto', title: '头像', rowspan: '3', align: 'center', width: 60, templet: function (d) {
......@@ -69,12 +62,13 @@ layui.config({
{ field: 'jobName', title: '职位', align: 'left', width: 120}
]
],
done: function(json) {
if(!loadCompany){
initCompany();
}
done: function(res) {
soulTable.render(this);
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, res.searchFilter, form, "请输入姓名,工号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
......@@ -88,57 +82,6 @@ layui.config({
}
});
var loadCompany = false;
// 初始化公司
function initCompany(){
loadCompany = true;
systemCommonUtil.getSysCompanyList(function (json) {
// 加载企业数据
$("#companyList").html(getDataUseHandlebars(selTemplate, json));
form.render('select');
});
}
// 初始化部门
function initDepartment(){
if (isNull($("#companyList").val())) {
$("#companyList").val('')
form.render('select');
} else {
showGrid({
id: "departmentList",
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyList").val()},
pagination: false,
method: 'POST',
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
form.render('select');
}
});
}
}
function initJob(){
// 根据部门id获取岗位集合
systemCommonUtil.queryJobListByDepartmentId($("#departmentList").val(), function(data) {
$("#jobList").html(getDataUseHandlebars(selTemplate, data));
form.render('select');
});
}
// 公司监听事件
form.on('select(companyList)', function(data) {
initDepartment();
initJob();
});
// 部门监听事件
form.on('select(departmentList)', function(data) {
initJob();
});
// 薪资设定
function wagesDesign(data) {
rowId = data.id;
......@@ -152,37 +95,19 @@ layui.config({
loadTable();
}});
}
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
refreshTable();
}
return false;
$("body").on("click", "#reloadTable", function() {
loadTable();
});
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function refreshTable(){
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams() {
return {
companyId: $("#companyList").val(),
departmentId: $("#departmentList").val(),
jobId: $("#jobList").val(),
userName: $("#userName").val(),
jobNumber: $("#jobNumber").val(),
userSex: $("#userSex").val()
};
}
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('wagesStaffWaitDesignMationList', {});
});
......@@ -7,55 +7,10 @@
<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">
<select lay-filter="companyList" lay-search="" id="companyList">
</select>
</div>
<label class="layui-form-label">部门</label>
<div class="layui-input-inline">
<select lay-filter="departmentList" lay-search="" id="departmentList">
</select>
</div>
<label class="layui-form-label">职位</label>
<div class="layui-input-inline">
<select lay-filter="jobList" lay-search="" id="jobList">
</select>
</div>
<label class="layui-form-label">员工姓名</label>
<div class="layui-input-inline">
<input type="text" id="userName" name="userName" placeholder="请输入员工姓名" class="layui-input" />
</div>
<label class="layui-form-label">员工工号</label>
<div class="layui-input-inline">
<input type="text" id="jobNumber" name="jobNumber" placeholder="请输入员工工号" class="layui-input" />
</div>
<label class="layui-form-label">性别</label>
<div class="layui-input-inline">
<select id="userSex" name="userSex">
<option value="">全部</option>
<option value="0">保密</option>
<option value="1"></option>
<option value="2"></option>
</select>
</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-tip alert-info" id="showInfo">该列表仅展示待设定的未离职的员工的薪资。</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>
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
......
......@@ -7,58 +7,13 @@
<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">
<select lay-filter="companyList" lay-search="" id="companyList">
</select>
</div>
<label class="layui-form-label">部门</label>
<div class="layui-input-inline">
<select lay-filter="departmentList" lay-search="" id="departmentList">
</select>
</div>
<label class="layui-form-label">职位</label>
<div class="layui-input-inline">
<select lay-filter="jobList" lay-search="" id="jobList">
</select>
</div>
<label class="layui-form-label">员工姓名</label>
<div class="layui-input-inline">
<input type="text" id="userName" name="userName" placeholder="请输入员工姓名" class="layui-input" />
</div>
<label class="layui-form-label">员工工号</label>
<div class="layui-input-inline">
<input type="text" id="jobNumber" name="jobNumber" placeholder="请输入员工工号" class="layui-input" />
</div>
<label class="layui-form-label">性别</label>
<div class="layui-input-inline">
<select id="userSex" name="userSex">
<option value="">全部</option>
<option value="0">保密</option>
<option value="1"></option>
<option value="2"></option>
</select>
</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-tip alert-info" id="showInfo">该列表仅展示待设定的未离职的员工的薪资。</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>
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<div style="margin: auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1612085020661')){ }}
......
......@@ -242,7 +242,8 @@ function getLimit(){
- (isNull(winuiTip) ? 0 : winuiTip)
- (isNull(tabTtileHeight) ? 0 : tabTtileHeight);
// 计算limit
return decimerFiveOrZero(Math.floor(realHeight / 35));
var limit = decimerFiveOrZero(Math.floor(realHeight / 35));
return limit == 0 ? 5 : limit;
}
function decimerFiveOrZero(number){
......
......@@ -16,6 +16,7 @@
"registrationType": {"name": "户口类型", "className": "skyeye-pro#com.skyeye.common.enumeration.RegistrationType"},
"applicableObjectsType": {"name": "适用对象类型", "className": "skyeye-pro#com.skyeye.common.enumeration.ApplicableObjectsType"},
"checkDayType": {"name": "日程插件上的类型(包含日程的)", "className": "skyeye-pro#com.skyeye.common.enumeration.CheckDayType"},
"userStaffType": {"name": "员工类型", "className": "skyeye-pro#com.skyeye.personnel.classenum.UserStaffType"},
"menuType": {"name": "APP菜单类型", "className": "skyeye-pro#com.skyeye.menu.classenum.MenuType"},
"urlType": {"name": "APP菜单URL类型", "className": "skyeye-pro#com.skyeye.menu.classenum.UrlType"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册