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

岗位调动申请完成

上级 f6051ff8
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'textool', 'laydate', 'dtree'], function(exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
laydate = layui.laydate,
textool = layui.textool,
form = layui.form,
dtree = layui.dtree;
var selOption = getFileContent('tpl/template/select-option.tpl');
// 调岗类型
$("#transferType").html(getDataUseHandlebars(selOption, {rows: bossUtil.getTransferTypeList()}));
textool.init({
eleId: 'remark',
maxlength: 200,
tools: ['count', 'copy', 'reset']
});
// 加载组织结构
organizationUtil.initAddOrganization(dtree);
skyeyeEnclosure.init('enclosureUpload');
matchingLanguage();
form.render();
// 保存为草稿
form.on('submit(formAddBean)', function(data) {
if(winui.verifyForm(data.elem)) {
saveData("1", "");
}
return false;
});
// 提交审批
form.on('submit(formSubBean)', function(data) {
if(winui.verifyForm(data.elem)) {
activitiUtil.startProcess(sysActivitiModel["bossInterviewJobTransfer"]["key"], function (approvalId) {
saveData("2", approvalId);
});
}
return false;
});
function saveData(subType, approvalId) {
if(isNull(organizationUtil.getCompanyMation(dtree)['nodeId'])){
winui.window.msg('请选择企业', {icon: 2,time: 2000});
return false;
}
if(isNull(organizationUtil.getDepartmentMation(dtree)['nodeId'])){
winui.window.msg('请选择部门', {icon: 2,time: 2000});
return false;
}
if(isNull(organizationUtil.getJobMation(dtree)['nodeId'])){
winui.window.msg('请选择岗位', {icon: 2,time: 2000});
return false;
}
var params = {
transferType: $("#transferType").val(),
transferStaffId: $("#transferStaffId").attr("staffId"),
primaryCompanyId: $("#primaryCompanyId").attr("companyId"),
primaryCompanyName: $("#primaryCompanyId").html(),
primaryDepartmentId: $("#primaryDepartmentId").attr("departmentId"),
primaryDepartmentName: $("#primaryDepartmentId").html(),
primaryJobId: $("#primaryJobId").attr("jobId"),
primaryJobName: $("#primaryJobId").html(),
primaryJobScoreId: $("#primaryJobScoreId").attr("jobScoreId"),
primaryJobScoreName: $("#primaryJobScoreId").html(),
currentCompanyId: organizationUtil.getCompanyMation(dtree)['nodeId'],
currentCompanyName: organizationUtil.getCompanyMation(dtree)['context'],
currentDepartmentId: organizationUtil.getDepartmentMation(dtree)['nodeId'],
currentDepartmentName: organizationUtil.getDepartmentMation(dtree)['context'],
currentJobId: organizationUtil.getJobMation(dtree)['nodeId'],
currentJobName: organizationUtil.getJobMation(dtree)['context'],
currentJobScoreId: organizationUtil.getJobScoreMation(dtree)['nodeId'],
currentJobScoreName: organizationUtil.getJobScoreMation(dtree)['context'],
remark: $("#remark").val(),
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload'),
subType: subType, // 表单类型 1.保存草稿 2.提交审批
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "insertBossInterviewJobTransfer", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
// 人员选择
$("body").on("click", ".transferStaffIdBtn", function(){
systemCommonUtil.userStaffCheckType = false; // 选择类型,默认单选,true:多选,false:单选
systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
$("#transferStaffId").attr("staffId", checkStaffMation.id);
$("#transferStaffId").val(checkStaffMation.jobNumber + '_' + checkStaffMation.userName);
$("#primaryCompanyId").attr("companyId", checkStaffMation.companyId);
$("#primaryCompanyId").html(checkStaffMation.companyName);
$("#primaryDepartmentId").attr("departmentId", checkStaffMation.departmentId);
$("#primaryDepartmentId").html(checkStaffMation.departmentName);
$("#primaryJobId").attr("jobId", checkStaffMation.jobId);
$("#primaryJobId").html(checkStaffMation.jobName);
$("#primaryJobScoreId").attr("jobScoreId", checkStaffMation.jobScoreId);
$("#primaryJobScoreId").html(checkStaffMation.jobScoreName);
});
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var $ = layui.$;
showGrid({
id: "showForm",
url: flowableBasePath + "queryBossInterviewJobTransferDetailsById",
params: {id: parent.rowId},
pagination: false,
method: "GET",
template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb, json){
json.bean.remark = stringManipulation.textAreaShow(json.bean.remark);
json.bean.transferTypeName = bossUtil.getTransferTypeNameById(json.bean.transferType);
},
ajaxSendAfter: function(json){
// 附件回显
skyeyeEnclosure.showDetails({'enclosureUpload': json.bean.enclosureInfo});
matchingLanguage();
}
});
$("body").on("click", ".enclosureItem", function(){
download(fileBasePath + $(this).attr("rowpath"), $(this).html());
});
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'textool', 'laydate', 'dtree'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
laydate = layui.laydate,
textool = layui.textool,
form = layui.form,
dtree = layui.dtree;
var selOption = getFileContent('tpl/template/select-option.tpl');
showGrid({
id: "showForm",
url: flowableBasePath + "queryBossInterviewJobTransferToEditById",
params: {id: parent.rowId},
pagination: false,
method: "GET",
template: $("#beanTemplate").html(),
ajaxSendAfter: function(json){
// 调岗类型
$("#transferType").html(getDataUseHandlebars(selOption, {rows: bossUtil.getTransferTypeList()}));
$("#transferType").val(json.bean.transferType);
textool.init({
eleId: 'remark',
maxlength: 200,
tools: ['count', 'copy', 'reset']
});
var organization = {
companyId: json.bean.currentCompanyId,
departmentId: json.bean.currentDepartmentId,
jobId: json.bean.currentJobId,
jobScoreId: json.bean.currentJobScoreId
};
// 加载组织结构
organizationUtil.initEditOrganization(dtree, organization);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
}else{
$(".typeOne").removeClass("layui-hide");
}
matchingLanguage();
form.render();
}
});
// 保存为草稿
form.on('submit(formEditBean)', function(data) {
if(winui.verifyForm(data.elem)) {
saveData('1', "");
}
return false;
});
// 提交审批
form.on('submit(formSubBean)', function(data) {
if(winui.verifyForm(data.elem)) {
activitiUtil.startProcess(sysActivitiModel["bossInterviewJobTransfer"]["key"], function (approvalId) {
saveData("2", approvalId);
});
}
return false;
});
// 工作流中保存
form.on('submit(subBean)', function(data) {
if(winui.verifyForm(data.elem)) {
saveData('3', "");
}
return false;
});
function saveData(subType, approvalId){
if(isNull(organizationUtil.getCompanyMation(dtree)['nodeId'])){
winui.window.msg('请选择企业', {icon: 2,time: 2000});
return false;
}
if(isNull(organizationUtil.getDepartmentMation(dtree)['nodeId'])){
winui.window.msg('请选择部门', {icon: 2,time: 2000});
return false;
}
if(isNull(organizationUtil.getJobMation(dtree)['nodeId'])){
winui.window.msg('请选择岗位', {icon: 2,time: 2000});
return false;
}
var params = {
transferType: $("#transferType").val(),
transferStaffId: $("#transferStaffId").attr("staffId"),
primaryCompanyId: $("#primaryCompanyId").attr("companyId"),
primaryCompanyName: $("#primaryCompanyId").html(),
primaryDepartmentId: $("#primaryDepartmentId").attr("departmentId"),
primaryDepartmentName: $("#primaryDepartmentId").html(),
primaryJobId: $("#primaryJobId").attr("jobId"),
primaryJobName: $("#primaryJobId").html(),
primaryJobScoreId: $("#primaryJobScoreId").attr("jobScoreId"),
primaryJobScoreName: $("#primaryJobScoreId").html(),
currentCompanyId: organizationUtil.getCompanyMation(dtree)['nodeId'],
currentCompanyName: organizationUtil.getCompanyMation(dtree)['context'],
currentDepartmentId: organizationUtil.getDepartmentMation(dtree)['nodeId'],
currentDepartmentName: organizationUtil.getDepartmentMation(dtree)['context'],
currentJobId: organizationUtil.getJobMation(dtree)['nodeId'],
currentJobName: organizationUtil.getJobMation(dtree)['context'],
currentJobScoreId: organizationUtil.getJobScoreMation(dtree)['nodeId'],
currentJobScoreName: organizationUtil.getJobScoreMation(dtree)['context'],
remark: $("#remark").val(),
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload'),
subType: subType, // 表单类型 1.保存草稿 2.提交审批
approvalId: approvalId,
id: parent.rowId
};
AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewJobTransfer", 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});
}
}});
}
// 人员选择
$("body").on("click", ".transferStaffIdBtn", function(){
systemCommonUtil.userStaffCheckType = false; // 选择类型,默认单选,true:多选,false:单选
systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
$("#transferStaffId").attr("staffId", checkStaffMation.id);
$("#transferStaffId").val(checkStaffMation.jobNumber + '_' + checkStaffMation.userName);
$("#primaryCompanyId").attr("companyId", checkStaffMation.companyId);
$("#primaryCompanyId").html(checkStaffMation.companyName);
$("#primaryDepartmentId").attr("departmentId", checkStaffMation.departmentId);
$("#primaryDepartmentId").html(checkStaffMation.departmentName);
$("#primaryJobId").attr("jobId", checkStaffMation.jobId);
$("#primaryJobId").html(checkStaffMation.jobName);
$("#primaryJobScoreId").attr("jobScoreId", checkStaffMation.jobScoreId);
$("#primaryJobScoreId").html(checkStaffMation.jobScoreName);
});
});
$("body").on("click", "#cancle", function(){
parent.layer.close(index);
});
});
\ No newline at end of file
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;
// 新增
authBtn('1651308552871');
laydate.render({
elem: '#createTime',
range: '~'
});
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'queryBossInterviewJobTransferList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers'},
{ field: 'transferStaffName', title: '申请人', rowspan: '2', width: 140},
{ title: '原岗位信息', align: 'center', colspan: '4'},
{ title: '申请岗位信息', align: 'center', colspan: '4'},
{ field: 'transferType', title: '调岗类型', rowspan: '2', width: 90, templet: function(d) {
return bossUtil.getTransferTypeNameById(d.transferType);
}},
{ field: 'processInstanceId', title: '流程ID', rowspan: '2', width: 100, templet: function(d){
return '<a lay-event="processDetails" class="notice-title-click">' + d.processInstanceId + '</a>';
}},
{ field: 'stateName', title: '状态', rowspan: '2', width: 90, templet: function(d) {
return activitiUtil.showStateName2(d.state, 1);
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2', width: 140 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], rowspan: '2', align: 'left', width: 140 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], rowspan: '2', align: 'center', width: 150},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', rowspan: '2', align: 'center', width: 257, toolbar: '#messageTableBar'}
],
[
{ field: 'primaryCompanyName', title: '企业', align: 'left', width: 150},
{ field: 'primaryDepartmentName', title: '部门', align: 'left', width: 150},
{ field: 'primaryJobName', title: '岗位', align: 'left', width: 150},
{ field: 'primaryJobScoreName', title: '岗位定级', align: 'left', width: 150},
{ field: 'currentCompanyName', title: '企业', align: 'left', width: 150},
{ field: 'currentDepartmentName', title: '部门', align: 'left', width: 150},
{ field: 'currentJobName', title: '岗位', align: 'left', width: 150},
{ field: 'currentJobScoreName', title: '岗位定级', align: 'left', width: 150}
]
],
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 === 'edit') { // 编辑
edit(data);
}else if (layEvent === 'subApproval') { // 提交审批
subApproval(data);
}else if(layEvent === 'cancellation') { // 作废
cancellation(data);
}else if(layEvent === 'processDetails') { // 流程详情
activitiUtil.activitiDetails(data);
}else if(layEvent === 'revoke') { // 撤销申请
revoke(data);
}
});
// 添加
$("body").on("click", "#addBean", function(){
_openNewWindows({
url: "../../tpl/bossInterviewJobTransfer/bossInterviewJobTransferAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "bossInterviewJobTransferAdd",
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 revoke(data){
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "revokeBossInterviewJobTransfer", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function(json){
if(json.returnCode == 0){
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}else{
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
}
// 编辑申请
function edit(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/bossInterviewJobTransfer/bossInterviewJobTransferEdit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "bossInterviewJobTransferEdit",
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 subApproval(data){
layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) {
layer.close(index);
activitiUtil.startProcess(sysActivitiModel["bossInterviewJobTransfer"]["key"], function (approvalId) {
var params = {
id: data.id,
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "editBossInterviewJobTransferToSubApproval", params: params, type: 'json', method: "POST", callback: function(json){
if(json.returnCode == 0){
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}else{
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
});
}
// 作废
function cancellation(data){
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewJobTransferToCancellation", params: {id: data.id}, type: 'json', method: "PUT", callback: function(json){
if(json.returnCode == 0){
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}else{
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
}
// 详情
function details(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/bossInterviewJobTransfer/bossInterviewJobTransferDetails.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "bossInterviewJobTransferDetails",
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('bossInterviewJobTransferList', {});
});
<!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">
<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="transferStaffId" name="transferStaffId" win-verify="required" placeholder="请选择申请人" class="layui-input" readonly="readonly"/>
<i class="fa fa-plus-circle input-icon transferStaffIdBtn" style="top: 8px;"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">原职位信息<i class="red">*</i></label>
<div class="layui-input-block ver-center">
<div class="layui-form-item layui-col-xs3" id="primaryCompanyId">
</div>
<div class="layui-form-item layui-col-xs3" id="primaryDepartmentId">
</div>
<div class="layui-form-item layui-col-xs3" id="primaryJobId">
</div>
<div class="layui-form-item layui-col-xs3" id="primaryJobScoreId">
</div>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">现职位信息<i class="red">*</i></label>
<div class="layui-input-block">
<div class="layui-form-item layui-col-xs3">
<ul id="demoTree1" class="dtree" data-id="0" style="overflow-y: auto;height: 250px;"></ul>
</div>
<div class="layui-form-item layui-col-xs3">
<ul id="demoTree2" class="dtree" data-id="0" style="overflow-y: auto;height: 250px;"></ul>
</div>
<div class="layui-form-item layui-col-xs3">
<ul id="demoTree3" class="dtree" data-id="0" style="overflow-y: auto;height: 250px;"></ul>
</div>
<div class="layui-form-item layui-col-xs3">
<ul id="demoTree4" class="dtree" data-id="0" style="overflow-y: auto;height: 250px;"></ul>
</div>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">调岗类型<i class="red">*</i></label>
<div class="layui-input-block">
<select id="transferType" name="transferType" lay-search="" win-verify="required" lay-filter="transferType">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">调岗原因<i class="red">*</i></label>
<div class="layui-input-block">
<textarea id="remark" name="remark" win-verify="required" placeholder="请输入调岗原因" class="layui-textarea" style="height: 100px;"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">附件</label>
<div class="layui-input-block" id="enclosureUpload">
</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="formAddBean">保存为草稿</button>
<button class="winui-btn" lay-submit lay-filter="formSubBean">提交审批</button>
</div>
</div>
</form>
</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/bossInterviewJobTransfer/'}).use('bossInterviewJobTransferAdd');
</script>
</body>
</html>
\ No newline at end of file
<!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">
</form>
</div>
<!-- beanTemplate -->
<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">
{{transferStaffName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">原职位信息</label>
<div class="layui-input-block ver-center">
<div class="layui-form-item layui-col-xs3">
{{primaryCompanyName}}
</div>
<div class="layui-form-item layui-col-xs3">
{{primaryDepartmentName}}
</div>
<div class="layui-form-item layui-col-xs3">
{{primaryJobName}}
</div>
<div class="layui-form-item layui-col-xs3">
{{primaryJobScoreName}}
</div>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">现职位信息</label>
<div class="layui-input-block ver-center">
<div class="layui-form-item layui-col-xs3">
{{currentCompanyName}}
</div>
<div class="layui-form-item layui-col-xs3">
{{currentDepartmentName}}
</div>
<div class="layui-form-item layui-col-xs3">
{{currentJobName}}
</div>
<div class="layui-form-item layui-col-xs3">
{{currentJobScoreName}}
</div>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">调岗类型</label>
<div class="layui-input-block ver-center">
{{transferTypeName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">调岗原因</label>
<div class="layui-input-block ver-center">
{{{remark}}}
</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>
{{/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/bossInterviewJobTransfer/'}).use('bossInterviewJobTransferDetails');
</script>
</body>
</html>
\ No newline at end of file
<!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">
</form>
</div>
<!-- beanTemplate -->
<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">申请人<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="transferStaffId" name="transferStaffId" win-verify="required" placeholder="请选择申请人" class="layui-input" readonly="readonly"
value="{{transferStaffName}}" staffId="{{transferStaffId}}"/>
<i class="fa fa-plus-circle input-icon transferStaffIdBtn" style="top: 8px;"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">原职位信息<i class="red">*</i></label>
<div class="layui-input-block ver-center">
<div class="layui-form-item layui-col-xs3" id="primaryCompanyId" companyId="{{primaryCompanyId}}">
{{primaryCompanyName}}
</div>
<div class="layui-form-item layui-col-xs3" id="primaryDepartmentId" departmentId="{{primaryDepartmentId}}">
{{primaryDepartmentName}}
</div>
<div class="layui-form-item layui-col-xs3" id="primaryJobId" jobId="{{primaryJobId}}">
{{primaryJobName}}
</div>
<div class="layui-form-item layui-col-xs3" id="primaryJobScoreId" jobScoreId="{{primaryJobScoreId}}">
{{primaryJobScoreName}}
</div>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">现职位信息<i class="red">*</i></label>
<div class="layui-input-block">
<div class="layui-form-item layui-col-xs3">
<ul id="demoTree1" class="dtree" data-id="0" style="overflow-y: auto;height: 250px;"></ul>
</div>
<div class="layui-form-item layui-col-xs3">
<ul id="demoTree2" class="dtree" data-id="0" style="overflow-y: auto;height: 250px;"></ul>
</div>
<div class="layui-form-item layui-col-xs3">
<ul id="demoTree3" class="dtree" data-id="0" style="overflow-y: auto;height: 250px;"></ul>
</div>
<div class="layui-form-item layui-col-xs3">
<ul id="demoTree4" class="dtree" data-id="0" style="overflow-y: auto;height: 250px;"></ul>
</div>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">调岗类型<i class="red">*</i></label>
<div class="layui-input-block">
<select id="transferType" name="transferType" lay-search="" win-verify="required" lay-filter="transferType">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">调岗原因<i class="red">*</i></label>
<div class="layui-input-block">
<textarea id="remark" name="remark" win-verify="required" placeholder="请输入调岗原因" class="layui-textarea" style="height: 100px;">{{remark}}</textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">附件</label>
<div class="layui-input-block" id="enclosureUpload">
</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 typeOne layui-hide" lay-submit lay-filter="formEditBean">保存为草稿</button>
<button class="winui-btn typeOne layui-hide" lay-submit lay-filter="formSubBean">提交审批</button>
<button class="winui-btn typeTwo layui-hide" lay-submit lay-filter="subBean"><language showName="com.skyeye.save"></language></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/bossInterviewJobTransfer/'}).use('bossInterviewJobTransferEdit');
</script>
</body>
</html>
\ No newline at end of file
<!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="0">草稿</option>
<option value="1">审核中</option>
<option value="2">审核通过</option>
<option value="3">审核不通过</option>
<option value="4">作废</option>
<option value="5">撤销</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>
<button id="addBean" class="winui-toolbtn" auth="1651308552871"><i class="fa fa-plus" aria-hidden="true"></i>录入申请</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="messageTableBar">
{{# if(d.editRow == '1'){ }}
{{# if(auth('1651308562351')){ }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }}
{{# if(auth('1651308571857')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="cancellation">作废</a>
{{# } }}
{{# } }}
{{# if(d.editRow == '1' || d.editRow == '2'){ }}
{{# if(auth('1651308582626')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# } }}
{{# if(d.editRow == '2'){ }}
{{# if(auth('1651308591882')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</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/bossInterviewJobTransfer/'}).use('bossInterviewJobTransferList');
</script>
</body>
</html>
\ No newline at end of file
// 员工信息
var staffMation = {};
// 员工奖惩信息 // 员工奖惩信息
layui.config({ layui.config({
base: basePath, base: basePath,
...@@ -61,7 +58,7 @@ layui.config({ ...@@ -61,7 +58,7 @@ layui.config({
awardUnit: $("#awardUnit").val(), awardUnit: $("#awardUnit").val(),
content: $("#content").val(), content: $("#content").val(),
desc: $("#desc").val(), desc: $("#desc").val(),
staffId: staffMation.id, staffId: systemCommonUtil.checkStaffMation.id,
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
}; };
AjaxPostUtil.request({url:reqBasePath + "sysstaffrewardpunish002", params: params, type: 'json', callback: function(json){ AjaxPostUtil.request({url:reqBasePath + "sysstaffrewardpunish002", params: params, type: 'json', callback: function(json){
...@@ -78,16 +75,10 @@ layui.config({ ...@@ -78,16 +75,10 @@ layui.config({
// 选择员工 // 选择员工
$("body").on("click", "#staffNameSel", function(){ $("body").on("click", "#staffNameSel", function(){
_openNewWindows({ systemCommonUtil.userStaffCheckType = false; // 选择类型,默认单选,true:多选,false:单选
url: "../../tpl/syseveuserstaff/sysEveUserStaffChoose.html", systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
title: "选择员工", $("#staffName").val(checkStaffMation.jobNumber + "_" + checkStaffMation.userName);
pageId: "sysEveUserStaffChoose", });
area: ['90vw', '90vh'],
callBack: function(refreshCode){
if (refreshCode == '0') {
$("#staffName").val(staffMation.jobNumber + "_" + staffMation.userName);
}
}});
}); });
$("body").on("click", "#cancle", function(){ $("body").on("click", "#cancle", function(){
......
// 员工信息
var staffMation = {};
// 员工奖惩信息 // 员工奖惩信息
layui.config({ layui.config({
base: basePath, base: basePath,
...@@ -27,7 +24,7 @@ layui.config({ ...@@ -27,7 +24,7 @@ layui.config({
template: $("#beanTemplate").html(), template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb){}, ajaxSendLoadBefore: function(hdb){},
ajaxSendAfter:function(json){ ajaxSendAfter:function(json){
staffMation = { systemCommonUtil.checkStaffMation = {
id: json.bean.staffId, id: json.bean.staffId,
userName: json.bean.userName userName: json.bean.userName
}; };
...@@ -77,7 +74,7 @@ layui.config({ ...@@ -77,7 +74,7 @@ layui.config({
awardUnit: $("#awardUnit").val(), awardUnit: $("#awardUnit").val(),
content: $("#content").val(), content: $("#content").val(),
desc: $("#desc").val(), desc: $("#desc").val(),
staffId: staffMation.id, staffId: systemCommonUtil.checkStaffMation.id,
rowId: parent.rowId, rowId: parent.rowId,
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
}; };
...@@ -98,16 +95,10 @@ layui.config({ ...@@ -98,16 +95,10 @@ layui.config({
// 选择员工 // 选择员工
$("body").on("click", "#staffNameSel", function(){ $("body").on("click", "#staffNameSel", function(){
_openNewWindows({ systemCommonUtil.userStaffCheckType = false; // 选择类型,默认单选,true:多选,false:单选
url: "../../tpl/syseveuserstaff/sysEveUserStaffChoose.html", systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
title: "选择员工", $("#staffName").val(checkStaffMation.jobNumber + "_" + checkStaffMation.userName);
pageId: "sysEveUserStaffChoose", });
area: ['90vw', '90vh'],
callBack: function(refreshCode){
if (refreshCode == '0') {
$("#staffName").val(staffMation.jobNumber + "_" + staffMation.userName);
}
}});
}); });
$("body").on("click", "#cancle", function(){ $("body").on("click", "#cancle", function(){
......
var rowId = ""; var rowId = "";
// 已选择的员工信息
var checkStaffList = [];
// 多选
var userStaffCheckType = true;
layui.config({ layui.config({
base: basePath, base: basePath,
version: skyeyeVersion version: skyeyeVersion
...@@ -121,31 +116,25 @@ layui.config({ ...@@ -121,31 +116,25 @@ layui.config({
winui.window.msg('请先选择门店信息.', {icon: 2, time: 2000}); winui.window.msg('请先选择门店信息.', {icon: 2, time: 2000});
return false; return false;
} }
checkStaffList = []; systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选
_openNewWindows({ systemCommonUtil.checkStaffMation = []; // 选择时返回的对象
url: "../../tpl/syseveuserstaff/sysEveUserStaffChoose.html", systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
title: "选择员工", var list = new Array();
pageId: "sysEveUserStaffChoose", $.each(checkStaffMation, function (i, item){
area: ['90vw', '90vh'], list.push(item.id);
callBack: function(refreshCode){ });
if (refreshCode == '0') { var params = {
var list = new Array(); storeId: chooseStoreId,
$.each(checkStaffList, function (i, item){ staffId: JSON.stringify(list)
list.push(item.id); };
}); AjaxPostUtil.request({url: shopBasePath + "storeStaff003", params: params, type: 'json', method: "POST", callback: function(json){
var params = { if(json.returnCode == 0){
storeId: chooseStoreId, loadStaff(chooseStoreId);
staffId: JSON.stringify(list) }else{
}; winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
AjaxPostUtil.request({url: shopBasePath + "storeStaff003", params: params, type: 'json', method: "POST", callback: function(json){
if(json.returnCode == 0){
loadStaff(chooseStoreId);
}else{
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
} }
}}); }});
});
}); });
exports('storeStaffDistribute', {}); exports('storeStaffDistribute', {});
......
...@@ -16,17 +16,17 @@ layui.config({ ...@@ -16,17 +16,17 @@ layui.config({
var selTemplate = getFileContent('tpl/template/select-option.tpl') var selTemplate = getFileContent('tpl/template/select-option.tpl')
// 选择类型,默认单选,true:多选,false:单选 // 选择类型,默认单选,true:多选,false:单选
var userStaffCheckType = isNull(parent.userStaffCheckType) ? false : parent.userStaffCheckType; var userStaffCheckType = isNull(parent.systemCommonUtil.userStaffCheckType) ? false : parent.systemCommonUtil.userStaffCheckType;
// 设置提示信息 // 设置提示信息
var s = '员工选择规则:'; var s = '员工选择规则:';
if(userStaffCheckType){ if(userStaffCheckType){
s += '1.多选;如没有查到要选择的员工,请检查员工信息是否满足当前规则。'; s += '1.多选;如没有查到要选择的员工,请检查员工信息是否满足当前规则。';
// 多选保存的员工对象信息 // 多选保存的员工对象信息
var checkStaffList = [].concat(parent.checkStaffList); var checkStaffMation = [].concat(parent.systemCommonUtil.checkStaffMation);
// 初始化值 // 初始化值
var ids = []; var ids = [];
$.each(checkStaffList, function(i, item){ $.each(checkStaffMation, function(i, item){
ids.push(item.id); ids.push(item.id);
}); });
tableCheckBoxUtil.setIds({ tableCheckBoxUtil.setIds({
...@@ -121,7 +121,7 @@ layui.config({ ...@@ -121,7 +121,7 @@ layui.config({
form.render(); form.render();
var chooseIndex = JSON.stringify(dubClick.data('index')); var chooseIndex = JSON.stringify(dubClick.data('index'));
var obj = res.rows[chooseIndex]; var obj = res.rows[chooseIndex];
parent.staffMation = obj; parent.systemCommonUtil.checkStaffMation = obj;
parent.refreshCode = '0'; parent.refreshCode = '0';
parent.layer.close(index); parent.layer.close(index);
...@@ -197,7 +197,7 @@ layui.config({ ...@@ -197,7 +197,7 @@ layui.config({
} }
AjaxPostUtil.request({url: reqBasePath + "staff009", params: {ids: selectedData.toString()}, type: 'json', method: "POST", callback: function(json){ AjaxPostUtil.request({url: reqBasePath + "staff009", params: {ids: selectedData.toString()}, type: 'json', method: "POST", callback: function(json){
if(json.returnCode == 0){ if(json.returnCode == 0){
parent.checkStaffList = [].concat(json.rows); parent.systemCommonUtil.checkStaffMation = [].concat(json.rows);
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}else{ }else{
......
...@@ -6,7 +6,6 @@ var companyList = []; ...@@ -6,7 +6,6 @@ var companyList = [];
var departmentList = []; var departmentList = [];
// 选择员工,多选 // 选择员工,多选
var userStaffCheckType = true;
var checkStaffList = []; var checkStaffList = [];
// 当前选中的薪资字段 // 当前选中的薪资字段
...@@ -211,26 +210,18 @@ layui.config({ ...@@ -211,26 +210,18 @@ layui.config({
} }
}); });
$("body").on("click", "#userStaffSel", function(){ $("body").on("click", "#userStaffSel", function(){
_openNewWindows({ systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选
url: "../../tpl/syseveuserstaff/sysEveUserStaffChoose.html", systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象
title: "选择员工", systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
pageId: "sysEveUserStaffChoose", var tags = $('#userStaff').tagEditor('getTags')[0].tags;
area: ['90vw', '90vh'], for (i = 0; i < tags.length; i++) {
callBack: function(refreshCode){ $('#userStaff').tagEditor('removeTag', tags[i]);
if (refreshCode == '0') { }
var templateArray = [].concat(checkStaffList); checkStaffList = [].concat(checkStaffMation);
var tags = $('#userStaff').tagEditor('getTags')[0].tags; $.each(checkStaffList, function(i, item){
for (i = 0; i < tags.length; i++) { $('#userStaff').tagEditor('addTag', item.name);
$('#userStaff').tagEditor('removeTag', tags[i]); });
} });
checkStaffList = [].concat(templateArray);
$.each(checkStaffList, function(i, item){
$('#userStaff').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}});
}); });
// 新增行 // 新增行
......
...@@ -258,26 +258,18 @@ layui.config({ ...@@ -258,26 +258,18 @@ layui.config({
// 选择员工 // 选择员工
$("body").on("click", "#userStaffSel", function(){ $("body").on("click", "#userStaffSel", function(){
_openNewWindows({ systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选
url: "../../tpl/syseveuserstaff/sysEveUserStaffChoose.html", systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象
title: "选择员工", systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
pageId: "sysEveUserStaffChoose", var tags = $('#userStaff').tagEditor('getTags')[0].tags;
area: ['90vw', '90vh'], for (i = 0; i < tags.length; i++) {
callBack: function(refreshCode){ $('#userStaff').tagEditor('removeTag', tags[i]);
if (refreshCode == '0') { }
var templateArray = [].concat(checkStaffList); checkStaffList = [].concat(checkStaffMation);
var tags = $('#userStaff').tagEditor('getTags')[0].tags; $.each(checkStaffList, function(i, item){
for (i = 0; i < tags.length; i++) { $('#userStaff').tagEditor('addTag', item.name);
$('#userStaff').tagEditor('removeTag', tags[i]); });
} });
checkStaffList = [].concat(templateArray);
$.each(checkStaffList, function(i, item){
$('#userStaff').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}});
}); });
// 新增行 // 新增行
......
...@@ -6,7 +6,6 @@ var companyList = []; ...@@ -6,7 +6,6 @@ var companyList = [];
var departmentList = []; var departmentList = [];
// 选择员工,多选 // 选择员工,多选
var userStaffCheckType = true;
var checkStaffList = []; var checkStaffList = [];
// 五险一金设置 // 五险一金设置
...@@ -196,26 +195,18 @@ layui.config({ ...@@ -196,26 +195,18 @@ layui.config({
} }
}); });
$("body").on("click", "#userStaffSel", function(){ $("body").on("click", "#userStaffSel", function(){
_openNewWindows({ systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选
url: "../../tpl/syseveuserstaff/sysEveUserStaffChoose.html", systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象
title: "选择员工", systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
pageId: "sysEveUserStaffChoose", var tags = $('#userStaff').tagEditor('getTags')[0].tags;
area: ['90vw', '90vh'], for (i = 0; i < tags.length; i++) {
callBack: function(refreshCode){ $('#userStaff').tagEditor('removeTag', tags[i]);
if (refreshCode == '0') { }
var templateArray = [].concat(checkStaffList); checkStaffList = [].concat(checkStaffMation);
var tags = $('#userStaff').tagEditor('getTags')[0].tags; $.each(checkStaffList, function(i, item){
for (i = 0; i < tags.length; i++) { $('#userStaff').tagEditor('addTag', item.name);
$('#userStaff').tagEditor('removeTag', tags[i]); });
} });
checkStaffList = [].concat(templateArray);
$.each(checkStaffList, function(i, item){
$('#userStaff').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}});
}); });
// 五险金额变化 // 五险金额变化
......
...@@ -6,7 +6,6 @@ var companyList = []; ...@@ -6,7 +6,6 @@ var companyList = [];
var departmentList = []; var departmentList = [];
// 选择员工,多选 // 选择员工,多选
var userStaffCheckType = true;
var checkStaffList = []; var checkStaffList = [];
// 五险一金设置 // 五险一金设置
...@@ -233,26 +232,18 @@ layui.config({ ...@@ -233,26 +232,18 @@ layui.config({
// 选择员工 // 选择员工
$("body").on("click", "#userStaffSel", function(){ $("body").on("click", "#userStaffSel", function(){
_openNewWindows({ systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选
url: "../../tpl/syseveuserstaff/sysEveUserStaffChoose.html", systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象
title: "选择员工", systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
pageId: "sysEveUserStaffChoose", var tags = $('#userStaff').tagEditor('getTags')[0].tags;
area: ['90vw', '90vh'], for (i = 0; i < tags.length; i++) {
callBack: function(refreshCode){ $('#userStaff').tagEditor('removeTag', tags[i]);
if (refreshCode == '0') { }
var templateArray = [].concat(checkStaffList); checkStaffList = [].concat(checkStaffMation);
var tags = $('#userStaff').tagEditor('getTags')[0].tags; $.each(checkStaffList, function(i, item){
for (i = 0; i < tags.length; i++) { $('#userStaff').tagEditor('addTag', item.name);
$('#userStaff').tagEditor('removeTag', tags[i]); });
} });
checkStaffList = [].concat(templateArray);
$.each(checkStaffList, function(i, item){
$('#userStaff').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}});
}); });
// 五险金额变化 // 五险金额变化
......
...@@ -29,6 +29,7 @@ var customerJS = { ...@@ -29,6 +29,7 @@ var customerJS = {
"proUtil": "../../assets/lib/layui/customer/proUtil.js", // 项目管理模块相关工具 "proUtil": "../../assets/lib/layui/customer/proUtil.js", // 项目管理模块相关工具
"adminAssistantUtil": "../../assets/lib/layui/customer/adminAssistantUtil.js", // 行政管理模块相关工具 "adminAssistantUtil": "../../assets/lib/layui/customer/adminAssistantUtil.js", // 行政管理模块相关工具
"codeDocUtil": "../../assets/lib/layui/customer/codeDocUtil.js", // 代码生成器相关工具类 "codeDocUtil": "../../assets/lib/layui/customer/codeDocUtil.js", // 代码生成器相关工具类
"organizationUtil": "../../assets/lib/layui/customer/organizationUtil.js", // 组织机构相关工具类
}; };
//系统基础信息 //系统基础信息
......
...@@ -148,6 +148,24 @@ var bossUtil = { ...@@ -148,6 +148,24 @@ var bossUtil = {
getLeaveTypeNameById: function (id){ getLeaveTypeNameById: function (id){
var list = bossUtil.getLeaveTypeList(); var list = bossUtil.getLeaveTypeList();
return getInPoingArr(list, "id", id, "name"); return getInPoingArr(list, "id", id, "name");
},
// 调岗类型
transferTypeList: {
"flatTone": {"id": 1, "name": "平调"},
"promotion": {"id": 2, "name": "晋升"},
"demotion": {"id": 3, "name": "降职"},
},
getTransferTypeList: function () {
var list = [];
$.each(bossUtil.transferTypeList, function (key, value) {
list.push(value);
});
return list;
},
getTransferTypeNameById: function (id){
var list = bossUtil.getTransferTypeList();
return getInPoingArr(list, "id", id, "name");
} }
}; };
\ No newline at end of file
// 组织机构工具类
var organizationUtil = {
// 企业树
companyTree: null,
// 部门树
departmentTree: null,
// 岗位树
jobTree: null,
// 岗位定级树
jobScoreTree: null,
// 初始化新增页面的组织机构
initAddOrganization: function (dtree) {
// 初始化公司
organizationUtil.companyTree = dtree.render({
elem: "#demoTree1",
url: reqBasePath + 'queryCompanyMationListTree',
dataStyle: 'layuiStyle',
done: function(){
if($("#demoTree1 li").length > 0){
$("#demoTree1 li").eq(0).children('div').click();
}
}
});
dtree.on("node('demoTree1')" ,function(param) {
var choose = dtree.getNowParam(organizationUtil.companyTree);
// 初始化部门
organizationUtil.departmentTree = dtree.render({
elem: "#demoTree2",
url: reqBasePath + 'companydepartment006?companyId=' + choose.nodeId,
dataStyle: 'layuiStyle',
done: function(){
if($("#demoTree2 li").length > 0){
$("#demoTree2 li").eq(0).children('div').click();
}
}
});
});
dtree.on("node('demoTree2')" ,function(param){
var choose = dtree.getNowParam(organizationUtil.departmentTree);
// 初始化职位
organizationUtil.jobTree = dtree.render({
elem: "#demoTree3",
url: reqBasePath + 'companyjob006?departmentId=' + choose.nodeId,
dataStyle: 'layuiStyle',
done: function(){
if($("#demoTree3 li").length > 0){
$("#demoTree3 li").eq(0).children('div').click();
}
}
});
});
dtree.on("node('demoTree3')" ,function(param){
var choose = dtree.getNowParam(organizationUtil.jobTree);
// 初始化职位定级
organizationUtil.jobScoreTree = dtree.render({
elem: "#demoTree4",
url: reqBasePath + 'companyjobscore008?jobId=' + choose.nodeId,
dataStyle: 'layuiStyle',
method: 'GET',
done: function(){
if($("#demoTree4 li").length > 0){
$("#demoTree4 li").eq(0).children('div').click();
}
}
});
});
},
// 初始化编辑页面的组织机构
initEditOrganization: function (dtree, mation) {
// 初始化公司
organizationUtil.companyTree = dtree.render({
elem: "#demoTree1",
url: reqBasePath + 'queryCompanyMationListTree',
dataStyle: 'layuiStyle',
done: function(){
if($("#demoTree1 li").length > 0){
for(var i = 0; i < $("#demoTree1 li").length; i++){
if($("#demoTree1 li").eq(i).attr("data-id") == mation.companyId){
$("#demoTree1 li").eq(i).children('div').click();
return;
}
}
}
}
});
dtree.on("node('demoTree1')" ,function(param) {
var choose = dtree.getNowParam(organizationUtil.companyTree);
// 初始化部门
organizationUtil.departmentTree = dtree.render({
elem: "#demoTree2",
url: reqBasePath + 'companydepartment006?companyId=' + choose.nodeId,
dataStyle: 'layuiStyle',
done: function(){
if($("#demoTree2 li").length > 0){
for(var i = 0; i < $("#demoTree2 li").length; i++){
if($("#demoTree2 li").eq(i).attr("data-id") == mation.departmentId){
$("#demoTree2 li").eq(i).children('div').click();
return;
}
}
}
}
});
});
dtree.on("node('demoTree2')" ,function(param){
var choose = dtree.getNowParam(organizationUtil.departmentTree);
// 初始化职位
organizationUtil.jobTree = dtree.render({
elem: "#demoTree3",
url: reqBasePath + 'companyjob006?departmentId=' + choose.nodeId,
dataStyle: 'layuiStyle',
done: function(){
if($("#demoTree3 li").length > 0){
for(var i = 0; i < $("#demoTree3 li").length; i++){
if($("#demoTree3 li").eq(i).attr("data-id") == mation.jobId){
$("#demoTree3 li").eq(i).children('div').click();
return;
}
}
}
}
});
});
dtree.on("node('demoTree3')" ,function(param){
var choose = dtree.getNowParam(organizationUtil.jobTree);
// 初始化职位定级
organizationUtil.jobScoreTree = dtree.render({
elem: "#demoTree4",
url: reqBasePath + 'companyjobscore008?jobId=' + choose.nodeId,
dataStyle: 'layuiStyle',
method: 'GET',
done: function(){
if($("#demoTree4 li").length > 0){
for(var i = 0; i < $("#demoTree4 li").length; i++){
if($("#demoTree4 li").eq(i).attr("data-id") == mation.jobScoreId){
$("#demoTree4 li").eq(i).children('div').click();
return;
}
}
}
}
});
});
},
/**
* 获取企业信息
*/
getCompanyMation: function (dtree) {
return organizationUtil.judgeNullRetuenObject(dtree.getNowParam(organizationUtil.companyTree));
},
/**
* 获取部门信息
*/
getDepartmentMation: function (dtree) {
return organizationUtil.judgeNullRetuenObject(dtree.getNowParam(organizationUtil.departmentTree));
},
/**
* 获取岗位信息
*/
getJobMation: function (dtree) {
return organizationUtil.judgeNullRetuenObject(dtree.getNowParam(organizationUtil.jobTree));
},
/**
* 获取岗位定级信息
*/
getJobScoreMation: function (dtree) {
return organizationUtil.judgeNullRetuenObject(dtree.getNowParam(organizationUtil.jobScoreTree));
},
judgeNullRetuenObject: function (object) {
return isNull(object) ? {} : object;
}
}
...@@ -232,6 +232,30 @@ var systemCommonUtil = { ...@@ -232,6 +232,30 @@ var systemCommonUtil = {
}}); }});
}, },
/**
* 员工选择页面(所有员工)
*
* @param callback 回调函数
*/
userStaffCheckType: false, // 选择类型,默认单选,true:多选,false:单选
checkStaffMation: [], // 选择时返回的对象
openSysAllUserStaffChoosePage: function (callback){
_openNewWindows({
url: "../../tpl/syseveuserstaff/sysEveUserStaffChoose.html",
title: "员工选择",
pageId: "sysuserselpage",
area: ['90vw', '90vh'],
callBack: function(refreshCode){
if (refreshCode == '0') {
if(typeof(callback) == "function") {
callback(systemCommonUtil.checkStaffMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}});
},
/** /**
* 系统资源图标选择页面 * 系统资源图标选择页面
* *
......
...@@ -36,5 +36,6 @@ ...@@ -36,5 +36,6 @@
"bossPersonRequire": {"name": "人员需求申请", "key": "../../tpl/bossPersonRequire/bossPersonRequireAdd.html", "complate": true}, "bossPersonRequire": {"name": "人员需求申请", "key": "../../tpl/bossPersonRequire/bossPersonRequireAdd.html", "complate": true},
"bossInterviewRegularWorker": {"name": "转正申请", "key": "../../tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.html", "complate": true}, "bossInterviewRegularWorker": {"name": "转正申请", "key": "../../tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.html", "complate": true},
"bossInterviewQuit": {"name": "离职申请", "key": "../../tpl/bossInterviewQuit/bossInterviewQuitAdd.html", "complate": true} "bossInterviewQuit": {"name": "离职申请", "key": "../../tpl/bossInterviewQuit/bossInterviewQuitAdd.html", "complate": true},
"bossInterviewJobTransfer": {"name": "岗位调动申请", "key": "../../tpl/bossInterviewJobTransfer/bossInterviewJobTransferAdd.html", "complate": true}
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册