提交 8e721bef 编写于 作者: Skyeye云's avatar Skyeye云

职位管理整改完成

上级 ea68f466
......@@ -225,6 +225,7 @@ layui.config({
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyList").val()},
pagination: false,
method: 'POST',
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
......
......@@ -23,7 +23,7 @@ layui.config({
name: $("#name").val(),
remark: encodeURIComponent(ue.getContent()),
companyId: isNull($("#companyId").val()) ? '0' : $("#companyId").val(),
pId: '0',
parentId: '0',
overtimeSettlementType: $("#overtimeSettlementType").val()
};
......
......@@ -41,7 +41,7 @@ layui.config({
name: $("#name").val(),
remark: encodeURIComponent(ue.getContent()),
companyId: isNull($("#companyId").val()) ? '0' : $("#companyId").val(),
pId: '0',
parentId: '0',
overtimeSettlementType: $("#overtimeSettlementType").val(),
id: parent.rowId
};
......
......@@ -5,181 +5,123 @@ layui.config({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
winui.renderColor();
layui.use(['form', 'layedit'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
layedit = layui.layedit;
var selTemplate = getFileContent('tpl/template/select-option.tpl')
//所属父职位id
var parentId = "0";
layedit.set({
uploadImage: {
url: reqBasePath + "common003", //接口url
type: 'post', //默认post
data: {
type: '13'
}
}
});
var layContent = layedit.build('content', {
tool: [
'html'
,'strong' //加粗
,'italic' //斜体
,'underline' //下划线
,'del' //删除线
,'addhr'
,'|'
,'removeformat'
,'fontFomatt'
,'fontfamily'
,'fontSize'
,'colorpicker'
,'fontBackColor'
,'face' //表情
,'|' //分割线
,'left' //左对齐
,'center' //居中对齐
,'right' //右对齐
,'link' //超链接
,'unlink' //清除链接
,'code'
,'image' //插入图片
,'attachment'
,'table'
,'|'
,'fullScreen'
,'preview'
,'|'
,'help'
],
uploadFiles: {
url: reqBasePath + "common003",
accept: 'file',
acceptMime: 'file/*',
size: '20480',
data: {
type: '13'
},
autoInsert: true, //自动插入编辑器设置
done: function(data) {
}
}
});
systemCommonUtil.getSysCompanyList(function (json) {
// 加载企业数据
$("#companyId").html(getDataUseHandlebars(selTemplate, json));
});
// 公司监听事件
form.on('select(companyId)', function(data) {
if(isNull(data.value) || data.value === '请选择'){
$("#departmentId").html("");
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var ue = ueEditorUtil.initEditor('remark');
var selTemplate = getFileContent('tpl/template/select-option.tpl');
//所属父职位id
var parentId = "0";
// 加载企业数据
systemCommonUtil.getSysCompanyList(function (json) {
$("#companyId").html(getDataUseHandlebars(selTemplate, json));
});
// 公司监听事件
form.on('select(companyId)', function(data) {
if(isNull(data.value) || data.value === '请选择'){
$("#departmentId").html("");
form.render('select');
} else {
initDepartment();
}
});
// 初始化部门
function initDepartment(){
showGrid({
id: "departmentId",
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyId").val()},
pagination: false,
method: 'POST',
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
form.render('select');
} else {
initDepartment();
}
});
// 初始化部门
function initDepartment(){
showGrid({
id: "departmentId",
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyId").val()},
pagination: false,
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
form.render('select');
}
});
}
//部门监听事件
form.on('select(departmentId)', function(data) {
if(isNull(data.value) || data.value === '请选择'){
$("#pIdBox").html("");
form.render('select');
} else {
parentId = "0";
$("#pIdBox").html('');
loadChildJob();
}
//部门监听事件
form.on('select(departmentId)', function(data) {
if(isNull(data.value) || data.value === '请选择'){
$("#pIdBox").html("");
form.render('select');
});
form.on('select(selectParent)', function(data) {
if (data.value != parentId){
if(isNull(data.value) || data.value == '请选择'){
layui.$(data.elem).parent('dd').nextAll().remove();
if(layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]').length > 0){
parentId = layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]')[0].value;
} else {
parentId = "0";
}
} else {
parentId = "0";
$("#pIdBox").html('');
layui.$(data.elem).parent('dd').nextAll().remove();
parentId = data.value;
loadChildJob();
}
});
form.on('select(selectParent)', function(data) {
if (data.value != parentId){
if(isNull(data.value) || data.value == '请选择'){
layui.$(data.elem).parent('dd').nextAll().remove();
if(layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]').length > 0){
parentId = layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]')[0].value;
} else {
parentId = "0";
}
} else {
layui.$(data.elem).parent('dd').nextAll().remove();
parentId = data.value;
loadChildJob();
}
}
});
//距离左边的左边距基数
var leftMargin = 20;
//加载同级菜单
function loadChildJob(){
var params = {pId: parentId, departmentId: $("#departmentId").val(), rowId: ""};
AjaxPostUtil.request({url: reqBasePath + "companyjob008", params: params, method: "POST", type: 'json', callback: function (json) {
var str = '<dd style="margin-left: ' + (leftMargin * $("#pIdBox").children("dd").length) + 'px"><select class="menuParent" lay-filter="selectParent" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
}
});
//距离左边的左边距基数
var leftMargin = 20;
//加载同级菜单
function loadChildJob(){
var params = {pId: parentId, departmentId: $("#departmentId").val(), rowId: ""};
AjaxPostUtil.request({url: reqBasePath + "companyjob008", params: params, method: "POST", type: 'json', callback: function (json) {
var str = '<dd style="margin-left: ' + (leftMargin * $("#pIdBox").children("dd").length) + 'px"><select class="menuParent" lay-filter="selectParent" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
str += '</select></dd>';
$("#pIdBox").append(str);
form.render('select');
}});
}
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var $menu = layui.$('.menuParent');
var str = "";
for(var i = 0; i < $menu.length; i++){
if (!isNull($menu[i].value) && $menu[i].value != '请选择'){
str += $menu[i].value + ",";
}
str += '</select></dd>';
$("#pIdBox").append(str);
form.render('select');
}});
}
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var $menu = layui.$('.menuParent');
var str = "";
for(var i = 0; i < $menu.length; i++){
if (!isNull($menu[i].value) && $menu[i].value != '请选择'){
str += $menu[i].value + ",";
}
}
if(isNull(str)){
str = "0";
}
var params = {
companyId: $("#companyId").val(),
departmentId: $("#departmentId").val(),
jobName: $("#jobName").val(),
jobDesc: encodeURIComponent(layedit.getContent(layContent)),
pId: str
};
AjaxPostUtil.request({url: reqBasePath + "companyjob002", params: params, type: 'json', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
}
if(isNull(str)){
str = "0";
}
var params = {
companyId: $("#companyId").val(),
departmentId: $("#departmentId").val(),
name: $("#name").val(),
remark: encodeURIComponent(ue.getContent()),
parentId: str
};
AjaxPostUtil.request({url: reqBasePath + "writeCompanyJobMation", params: params, type: 'json', method: 'POST', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
......@@ -5,247 +5,191 @@ layui.config({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
winui.renderColor();
layui.use(['form', 'layedit'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
layedit = layui.layedit;
var selTemplate = getFileContent('tpl/template/select-option.tpl')
//所属父职位id
var parentId = "0";
var layContent;
showGrid({
id: "showForm",
url: reqBasePath + "companyjob004",
params: {rowId: parent.rowId},
pagination: false,
template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb) {
},
ajaxSendAfter:function (json) {
layedit.set({
uploadImage: {
url: reqBasePath + "common003", //接口url
type: 'post', //默认post
data: {
type: '13'
}
}
});
layContent = layedit.build('content', {
tool: [
'html'
,'strong' //加粗
,'italic' //斜体
,'underline' //下划线
,'del' //删除线
,'addhr'
,'|'
,'removeformat'
,'fontFomatt'
,'fontfamily'
,'fontSize'
,'colorpicker'
,'fontBackColor'
,'face' //表情
,'|' //分割线
,'left' //左对齐
,'center' //居中对齐
,'right' //右对齐
,'link' //超链接
,'unlink' //清除链接
,'code'
,'image' //插入图片
,'attachment'
,'table'
,'|'
,'fullScreen'
,'preview'
,'|'
,'help'
],
uploadFiles: {
url: reqBasePath + "common003",
accept: 'file',
acceptMime: 'file/*',
size: '20480',
data: {
type: '13'
},
autoInsert: true, //自动插入编辑器设置
done: function(data) {
}
}
});
// 加载公司和部门
systemCommonUtil.getSysCompanyList(function(data) {
// 加载企业数据
$("#companyId").html(getDataUseHandlebars(selTemplate, data));
$("#companyId").val(json.bean.companyId);
showGrid({
id: "departmentId",
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyId").val()},
pagination: false,
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function(j){
$("#departmentId").val(json.bean.departmentId);
form.render('select');
// 初始化父职位
loadChildJobAll(json.bean.pId.split(','));
}
});
});
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var ue = null;
var selTemplate = getFileContent('tpl/template/select-option.tpl');
//所属父职位id
var parentId = "0";
//公司监听事件
form.on('select(companyId)', function(data) {
if(isNull(data.value) || data.value === '请选择'){
$("#departmentId").html("");
showGrid({
id: "showForm",
url: reqBasePath + "companyjob004",
params: {id: parent.rowId},
pagination: false,
method: 'GET',
template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb) {
},
ajaxSendAfter:function (json) {
ue = ueEditorUtil.initEditor('remark');
ue.addListener("ready", function () {
ue.setContent(json.bean.remark);
});
// 加载公司和部门
systemCommonUtil.getSysCompanyList(function(data) {
// 加载企业数据
$("#companyId").html(getDataUseHandlebars(selTemplate, data));
$("#companyId").val(json.bean.companyId);
showGrid({
id: "departmentId",
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyId").val()},
pagination: false,
method: 'POST',
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function(j){
$("#departmentId").val(json.bean.departmentId);
form.render('select');
} else {
initDepartment();
// 初始化父职位
loadChildJobAll(json.bean.parentId.split(','));
}
});
//部门监听事件
form.on('select(departmentId)', function(data) {
if(isNull(data.value) || data.value === '请选择'){
$("#pIdBox").html("");
form.render('select');
});
//公司监听事件
form.on('select(companyId)', function(data) {
if(isNull(data.value) || data.value === '请选择'){
$("#departmentId").html("");
form.render('select');
} else {
initDepartment();
}
});
//部门监听事件
form.on('select(departmentId)', function(data) {
if(isNull(data.value) || data.value === '请选择'){
$("#pIdBox").html("");
form.render('select');
} else {
parentId = "0";
$("#pIdBox").html('');
loadChildJob();
}
});
form.on('select(selectParent)', function(data) {
if (data.value != parentId){
if(isNull(data.value) || data.value == '请选择'){
layui.$(data.elem).parent('dd').nextAll().remove();
if(layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]').length > 0){
parentId = layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]')[0].value;
} else {
parentId = "0";
}
} else {
parentId = "0";
$("#pIdBox").html('');
layui.$(data.elem).parent('dd').nextAll().remove();
parentId = data.value;
loadChildJob();
}
});
form.on('select(selectParent)', function(data) {
if (data.value != parentId){
if(isNull(data.value) || data.value == '请选择'){
layui.$(data.elem).parent('dd').nextAll().remove();
if(layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]').length > 0){
parentId = layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]')[0].value;
} else {
parentId = "0";
}
} else {
layui.$(data.elem).parent('dd').nextAll().remove();
parentId = data.value;
loadChildJob();
}
});
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var $menu = layui.$('.menuParent');
var str = "";
for(var i = 0; i < $menu.length; i++){
if (!isNull($menu[i].value) && $menu[i].value != '请选择'){
str += $menu[i].value + ",";
}
}
});
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var $menu = layui.$('.menuParent');
var str = "";
for(var i = 0; i < $menu.length; i++){
if (!isNull($menu[i].value) && $menu[i].value != '请选择'){
str += $menu[i].value + ",";
}
}
if(isNull(str)){
str = "0";
}
var params = {
jobName: $("#jobName").val(),
jobDesc: encodeURIComponent(layedit.getContent(layContent)),
companyId: $("#companyId").val(),
departmentId: $("#departmentId").val(),
rowId: parent.rowId,
pId: str
};
AjaxPostUtil.request({url: reqBasePath + "companyjob005", params: params, type: 'json', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}
});
//距离左边的左边距基数
var leftMargin = 20;
//初始化当前职位的父职位
function loadChildJobAll(pid){
if(pid.length > 0 && pid[0] != '0'){
if (!isNull(pid[0])){
var params = {pId: parentId, departmentId: $("#departmentId").val(), rowId: parent.rowId};
AjaxPostUtil.request({url: reqBasePath + "companyjob008", params: params, method: "POST", type: 'json', callback: function (json) {
var str = '<dd style="margin-left: ' + (leftMargin * $("#pIdBox").children("dd").length) + 'px"><select class="menuParent" lay-filter="selectParent" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
if(json.rows[i].id != parent.rowId){
if(json.rows[i].id != pid[0]){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
} else {
str += '<option value="' + json.rows[i].id + '" selected>' + json.rows[i].name + '</option>';
}
}
}
str += '</select></dd>';
$("#pIdBox").append(str);
form.render('select');
parentId = pid[0];
pid.splice(0, 1);
loadChildJobAll(pid);
}});
} else {
pid.splice(0, 1);
loadChildJobAll(pid);
}
} else {
loadChildJob();
}
}
//加载同级菜单
function loadChildJob(){
var params = {pId: parentId, departmentId: $("#departmentId").val(), rowId: parent.rowId};
AjaxPostUtil.request({url: reqBasePath + "companyjob008", params: params, method: "POST", type: 'json', callback: function (json) {
var str = '<dd style="margin-left: ' + (leftMargin * $("#pIdBox").children("dd").length) + 'px"><select class="menuParent" lay-filter="selectParent" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
}
str += '</select></dd>';
$("#pIdBox").append(str);
form.render('select');
}});
}
if(isNull(str)){
str = "0";
}
var params = {
name: $("#name").val(),
remark: encodeURIComponent(ue.getContent()),
companyId: $("#companyId").val(),
departmentId: $("#departmentId").val(),
id: parent.rowId,
parentId: str
};
// 初始化部门
function initDepartment(){
showGrid({
id: "departmentId",
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyId").val()},
pagination: false,
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
form.render('select');
AjaxPostUtil.request({url: reqBasePath + "writeCompanyJobMation", params: params, type: 'json', method: 'POST', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
//距离左边的左边距基数
var leftMargin = 20;
//初始化当前职位的父职位
function loadChildJobAll(pid){
if(pid.length > 0 && pid[0] != '0'){
if (!isNull(pid[0])){
var params = {pId: parentId, departmentId: $("#departmentId").val(), rowId: parent.rowId};
AjaxPostUtil.request({url: reqBasePath + "companyjob008", params: params, method: "POST", type: 'json', callback: function (json) {
var str = '<dd style="margin-left: ' + (leftMargin * $("#pIdBox").children("dd").length) + 'px"><select class="menuParent" lay-filter="selectParent" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
if(json.rows[i].id != parent.rowId){
if(json.rows[i].id != pid[0]){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
} else {
str += '<option value="' + json.rows[i].id + '" selected>' + json.rows[i].name + '</option>';
}
}
}
str += '</select></dd>';
$("#pIdBox").append(str);
form.render('select');
parentId = pid[0];
pid.splice(0, 1);
loadChildJobAll(pid);
}});
} else {
pid.splice(0, 1);
loadChildJobAll(pid);
}
} else {
loadChildJob();
}
}
function loadChildJob(){
var params = {pId: parentId, departmentId: $("#departmentId").val(), rowId: parent.rowId};
AjaxPostUtil.request({url: reqBasePath + "companyjob008", params: params, method: "POST", type: 'json', callback: function (json) {
var str = '<dd style="margin-left: ' + (leftMargin * $("#pIdBox").children("dd").length) + 'px"><select class="menuParent" lay-filter="selectParent" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
}
str += '</select></dd>';
$("#pIdBox").append(str);
form.render('select');
}});
}
// 初始化部门
function initDepartment(){
showGrid({
id: "departmentId",
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyId").val()},
pagination: false,
method: 'POST',
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
form.render('select');
}
});
}
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
......@@ -11,68 +11,42 @@ layui.config({
var $ = layui.$,
form = layui.form,
tableTree = layui.tableTreeDj;
var selTemplate = getFileContent('tpl/template/select-option.tpl')
authBtn('1552962689111');
systemCommonUtil.getSysCompanyList(function (json) {
// 加载企业数据
$("#companyId").html(getDataUseHandlebars(selTemplate, json));
initLoadTable();
});
authBtn('1552962689111');
//公司监听事件
form.on('select(companyId)', function(data) {
if(isNull(data.value) || data.value === '请选择'){
$("#departmentId").html("");
form.render('select');
} else {
initDepartment();
tableTree.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'companyjob001',
where: getTableParams(),
cols: [[
{ field: 'name', title: '职位名称', width: 180 },
{ field: 'id', title: '职位简介', width: 80, align: 'center', templet: function (d) {
return '<i class="fa fa-fw fa-html5 cursor" lay-event="jobDesc"></i>';
}},
{ field: 'userNum', title: '员工数', width: 100 },
{ field: 'companyName', title: '所属公司', width: 150 },
{ field: 'departmentName', title: '所属部门', width: 100 },
{ 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' }
]],
isPage: false,
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch($("#messageTable")[0], json.searchFilter, form, "请输入名称", function () {
tableTree.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
}, {
keyId: 'id',
keyPid: 'parentId',
title: 'name',
defaultShow: true,
});
//初始化部门
function initDepartment(){
showGrid({
id: "departmentId",
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyId").val()},
pagination: false,
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
form.render('select');
}
});
}
function initLoadTable() {
tableTree.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'companyjob001',
where: getTableParams(),
cols: [[
{ field: 'jobName', title: '职位名称', width: 180 },
{ field: 'id', title: '职位简介', width: 80, align: 'center', templet: function (d) {
return '<i class="fa fa-fw fa-html5 cursor" lay-event="jobDesc"></i>';
}},
{ field: 'userNum', title: '员工数', width: 100 },
{ field: 'companyName', title: '所属公司', width: 150 },
{ field: 'departmentName', title: '所属部门', width: 100 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar' }
]],
done: function(json) {
matchingLanguage();
}
}, {
keyId: 'id',
keyPid: 'pId',
title: 'jobName',
});
}
tableTree.getTable().on('tool(messageTable)', function (obj) {
var data = obj.data;
......@@ -95,19 +69,11 @@ layui.config({
}
});
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
loadTable();
}
return false;
});
// 删除
function del(data, obj) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "companyjob003", params: {rowId: data.id}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "deleteCompanyJobMationById", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
......@@ -128,6 +94,19 @@ layui.config({
}});
}
// 新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/companyJob/companyJobAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "companyJobAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 岗位定级
function jobScore(data) {
rowId = data.id;
......@@ -139,36 +118,19 @@ layui.config({
callBack: function (refreshCode) {
}});
}
// 刷新数据
$("body").on("click", "#reloadTable", function() {
loadTable();
});
// 新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/companyJob/companyJobAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "companyJobAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
function loadTable() {
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
tableTree.reload("messageTable", {where: getTableParams()});
}
function getTableParams() {
return {
companyId: $("#companyId").val(),
departmentId: $("#departmentId").val(),
jobName: $("#jobName").val()
};
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('companyJobList', {});
});
......@@ -34,13 +34,13 @@
<div class="layui-form-item">
<label class="layui-form-label">职位名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="jobName" name="jobName" win-verify="required" placeholder="请输入职位名称" class="layui-input" maxlength="50"/>
<input type="text" id="name" name="name" win-verify="required" placeholder="请输入职位名称" class="layui-input" maxlength="50"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">职位简介</label>
<div class="layui-input-block">
<textarea id="content" name="content" style="display: none;"></textarea>
<div id="remark" name="remark" type="text/plain"></div>
</div>
</div>
<div class="layui-form-item">
......@@ -51,11 +51,13 @@
</div>
</form>
</div>
<script src="../../assets/lib/layui/lay/modules/ace/ace.js"></script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/companyJob/'}).use('companyJobEdd');
layui.config({base: '../../js/companyJob/'}).use('companyJobAdd');
</script>
</body>
</html>
\ No newline at end of file
......@@ -40,13 +40,13 @@
<div class="layui-form-item">
<label class="layui-form-label">职位名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="jobName" name="jobName" win-verify="required" placeholder="请输入职位名称" class="layui-input" maxlength="50" value="{{jobName}}"/>
<input type="text" id="name" name="name" win-verify="required" placeholder="请输入职位名称" class="layui-input" maxlength="50" value="{{name}}"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">职位简介</label>
<div class="layui-input-block">
<textarea id="content" name="content" style="display: none;">{{jobDesc}}</textarea>
<div id="remark" name="remark" type="text/plain"></div>
</div>
</div>
<div class="layui-form-item">
......@@ -58,9 +58,11 @@
{{/bean}}
</script>
<script src="../../assets/lib/layui/lay/modules/ace/ace.js"></script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/companyJob/'}).use('companyJobEdit');
</script>
......
......@@ -7,42 +7,16 @@
<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">
<select lay-filter="companyId" lay-search="" id="companyId">
</select>
</div>
<label class="layui-form-label">部门</label>
<div class="layui-input-inline">
<select lay-filter="departmentId" lay-search="" id="departmentId">
</select>
</div>
<label class="layui-form-label">职位名称</label>
<div class="layui-input-inline">
<input id="jobName" name="jobName" class="layui-input" placeholder="请输入职位名称"/>
</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>
<button id="addBean" class="winui-toolbtn" auth="1552962689111"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></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>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1552962689111"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1552962719430')){ }}
{{# if(auth('1552962689111')){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1552962700195') && d.userNum == 0){ }}
......
......@@ -159,6 +159,7 @@ layui.config({
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyList").val()},
pagination: false,
method: 'POST',
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
......
......@@ -114,6 +114,7 @@ layui.config({
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyList").val()},
pagination: false,
method: 'POST',
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
......
......@@ -113,6 +113,7 @@ layui.config({
url: reqBasePath + "companydepartment007",
params: {companyId: $("#companyList").val()},
pagination: false,
method: 'POST',
template: selTemplate,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册