|
@@ -2,8 +2,8 @@
|
|
|
* 工作单位变更管理初始化
|
|
|
*/
|
|
|
var TalentWorkunitChange = {
|
|
|
- id: "TalentWorkunitChangeTable", //表格id
|
|
|
- seItem: null, //选中的条目
|
|
|
+ id: "TalentWorkunitChangeTable", //表格id
|
|
|
+ seItem: null, //选中的条目
|
|
|
table: null,
|
|
|
layerIndex: -1
|
|
|
};
|
|
@@ -14,55 +14,59 @@ var TalentWorkunitChange = {
|
|
|
TalentWorkunitChange.initColumn = function () {
|
|
|
var type = $("#type").val();
|
|
|
var isShow = true;
|
|
|
- if(type==2){
|
|
|
+ if (type == 2) {
|
|
|
isShow = false;
|
|
|
}
|
|
|
return [
|
|
|
{field: 'selectItem', radio: true},
|
|
|
- {title: '姓名', field: 'talentName', visible: true, align: 'center', valign: 'middle',width:"80px",'class': 'uitd_showTip'},
|
|
|
- {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle',width:"150px",'class': 'uitd_showTip'},
|
|
|
- {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle',width:"80px",},
|
|
|
- {title: '原工作单位', field: 'oldEnterpriseName', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
|
|
|
- {title: '原人才标签', field: 'oldTalentTypeName', visible: isShow, align: 'center', valign: 'middle',width:"90px",'class': 'uitd_showTip'},
|
|
|
- {title: '原入职时间', field: 'oldAnyTime', visible: false, align: 'center', valign: 'middle',width:"80px",'class': 'uitd_showTip'},
|
|
|
- {title: '离职时间', field: 'quitTime', visible: false, align: 'center', valign: 'middle',width:"80px",'class': 'uitd_showTip'},
|
|
|
- {title: '离职申报原因', field: 'quitReason', visible: isShow, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
|
|
|
- {title: '新单位', field: 'newEnterpriseName', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
|
|
|
- {title: '新人才标签', field: 'newTalentTypeName', visible: isShow, align: 'center', valign: 'middle',width:"80px",'class': 'uitd_showTip'},
|
|
|
- {title: '入职/变更时间', field: 'anyTime', visible: true, align: 'center', valign: 'middle',width:"80px",'class': 'uitd_showTip'},
|
|
|
- {title: '单位变更申报原因', field: 'anyReason', visible: isShow, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
|
|
|
- {title: '合同起止时间', field: 'starttime', visible: true, align: 'center', valign: 'middle',width:"140px",'class': 'uitd_showTip',
|
|
|
- formatter :function (value,row,index) {
|
|
|
- if(row.starttime!=null && row.endtime!=''){
|
|
|
- return row.starttime+"至"+row.endtime;
|
|
|
- }else{
|
|
|
- return row.starttime+"至长期"
|
|
|
+ {title: '姓名', field: 'talentName', visible: true, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: "150px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', width: "80px", },
|
|
|
+ {title: '原工作单位', field: 'oldEnterpriseName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '原人才标签', field: 'oldTalentTypeName', visible: isShow, align: 'center', valign: 'middle', width: "90px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '原入职时间', field: 'oldAnyTime', visible: false, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '离职时间', field: 'quitTime', visible: false, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '离职申报原因', field: 'quitReason', visible: isShow, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '新单位', field: 'newEnterpriseName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '新人才标签', field: 'newTalentTypeName', visible: isShow, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '入职/变更时间', field: 'anyTime', visible: true, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '单位变更申报原因', field: 'anyReason', visible: isShow, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
|
|
|
+ {title: '合同起止时间', field: 'starttime', visible: true, align: 'center', valign: 'middle', width: "140px", 'class': 'uitd_showTip',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ if (row.starttime != null && row.endtime != '') {
|
|
|
+ return row.starttime + "至" + row.endtime;
|
|
|
+ } else {
|
|
|
+ return row.starttime + "至长期"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle',width:"80px",
|
|
|
- formatter : function (value,row,index) {
|
|
|
- if(value==-2){
|
|
|
+ {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "80px",
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ if (value == -2) {
|
|
|
return '<span class=\'label label-danger\'>审核不通过</span>';
|
|
|
}
|
|
|
- if(value==-1){
|
|
|
+ if (value == -1) {
|
|
|
return '<span class=\'label\'>待提交</span>';
|
|
|
- }if(value==1){
|
|
|
+ }
|
|
|
+ if (value == 1) {
|
|
|
return '<span class=\'label label-success\'>待审核</span>';
|
|
|
- }if(value==2){
|
|
|
+ }
|
|
|
+ if (value == 2) {
|
|
|
return '<span class=\'label label-danger\'>审核驳回</span>';
|
|
|
- }if(value==3){
|
|
|
+ }
|
|
|
+ if (value == 3) {
|
|
|
return '<span class=\'label label-primary\'>已通过</span>';
|
|
|
- }if(value==9){
|
|
|
+ }
|
|
|
+ if (value == 9) {
|
|
|
return '<span class=\'label label-success\'>重新提交</span>';
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',width:"80px",
|
|
|
- formatter: function (value,row,index) {
|
|
|
- return "<span class='label label-success' onclick=\"TalentWorkunitChange.showLog('"+value+"')\" >" +
|
|
|
- "<i class=\"fa fa-book\"></i>日志" +
|
|
|
- "</span>";
|
|
|
+ {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ return "<span class='label label-success' onclick=\"TalentWorkunitChange.showLog('" + value + "')\" >" +
|
|
|
+ "<i class=\"fa fa-book\"></i>日志" +
|
|
|
+ "</span>";
|
|
|
}
|
|
|
},
|
|
|
];
|
|
@@ -73,10 +77,10 @@ TalentWorkunitChange.initColumn = function () {
|
|
|
*/
|
|
|
TalentWorkunitChange.check = function () {
|
|
|
var selected = $('#' + this.id).bootstrapTable('getSelections');
|
|
|
- if(selected.length == 0){
|
|
|
+ if (selected.length == 0) {
|
|
|
Feng.info("请先选中表格中的某一记录!");
|
|
|
return false;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
TalentWorkunitChange.seItem = selected[0];
|
|
|
return true;
|
|
|
}
|
|
@@ -87,40 +91,40 @@ TalentWorkunitChange.check = function () {
|
|
|
*/
|
|
|
TalentWorkunitChange.openAddTalentWorkunitChange = function () {
|
|
|
var ajax = new $ax(Feng.ctxPath + "/api/commonBatch/valiateIsAdd", function (data) {
|
|
|
- if(data.code == 200){
|
|
|
+ if (data.code == 200) {
|
|
|
var index = layer.open({
|
|
|
type: 2,
|
|
|
title: '添加工作单位变更',
|
|
|
area: ['800px', '420px'], //宽高
|
|
|
fix: false, //不固定
|
|
|
maxmin: true,
|
|
|
- content: Feng.ctxPath + '/api/talentWorkunitChange/talentWorkunitChange_add?year='+data.obj,
|
|
|
- btn: ['<i class="fa fa-eye"></i> 保存未提交','<i class="fa fa-check layui-bg-green"></i> 提交审核', '<i class="fa fa-eraser"></i> 取消'],
|
|
|
+ content: Feng.ctxPath + '/enterprise/talent_work_unit_change/apply?year=' + data.obj,
|
|
|
+ btn: ['<i class="fa fa-eye"></i> 保存未提交', '<i class="fa fa-check layui-bg-green"></i> 提交审核', '<i class="fa fa-eraser"></i> 取消'],
|
|
|
btnAlign: 'c',
|
|
|
btn1: function (index, layero) {
|
|
|
var obj = layero.find("iframe")[0].contentWindow;
|
|
|
obj.TalentWorkunitChangeInfoDlg.addSubmit();
|
|
|
- },btn2: function(index, layero){
|
|
|
+ }, btn2: function (index, layero) {
|
|
|
var obj = layero.find("iframe")[0].contentWindow;
|
|
|
obj.TalentWorkunitChangeInfoDlg.editSubmit(2);
|
|
|
return false;
|
|
|
},
|
|
|
- success :function (layero, index) {
|
|
|
- layer.tips('添加基本信息并上传附件后点击','.layui-layer-btn1',{tips:[1,"#78BA32"],time:0,closeBtn :2});
|
|
|
+ success: function (layero, index) {
|
|
|
+ layer.tips('添加基本信息并上传附件后点击', '.layui-layer-btn1', {tips: [1, "#78BA32"], time: 0, closeBtn: 2});
|
|
|
},
|
|
|
- end :function () {
|
|
|
+ end: function () {
|
|
|
layer.closeAll('tips');
|
|
|
}
|
|
|
});
|
|
|
TalentWorkunitChange.layerIndex = index;
|
|
|
layer.full(index);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
}, function (data) {
|
|
|
Feng.error("校验失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("type",CONFIG.project_workchange);
|
|
|
+ ajax.set("type", CONFIG.project_workchange);
|
|
|
ajax.start();
|
|
|
};
|
|
|
|
|
@@ -131,10 +135,13 @@ TalentWorkunitChange.openTalentWorkunitChangeDetail = function () {
|
|
|
if (this.check()) {
|
|
|
var ajax = new $ax(Feng.ctxPath + "/api/commonBatch/valiateIsEditOrSubmit", function (data) {
|
|
|
if (data.code == 200) {
|
|
|
- if(TalentWorkunitChange.seItem.checkState==1){
|
|
|
- Feng.error("申报正在审核中");return;
|
|
|
- }if(TalentWorkunitChange.seItem.checkState==3){
|
|
|
- Feng.error("审核通过,无法修改");return;
|
|
|
+ if (TalentWorkunitChange.seItem.checkState == 1) {
|
|
|
+ Feng.error("申报正在审核中");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (TalentWorkunitChange.seItem.checkState == 3) {
|
|
|
+ Feng.error("审核通过,无法修改");
|
|
|
+ return;
|
|
|
}
|
|
|
var index = layer.open({
|
|
|
type: 2,
|
|
@@ -142,34 +149,34 @@ TalentWorkunitChange.openTalentWorkunitChangeDetail = function () {
|
|
|
area: ['800px', '420px'], //宽高
|
|
|
fix: false, //不固定
|
|
|
maxmin: true,
|
|
|
- content: Feng.ctxPath + '/api/talentWorkunitChange/talentWorkunitChange_update/' + TalentWorkunitChange.seItem.id,
|
|
|
- btn: ['<i class="fa fa-eye"></i> 保存未提交','<i class="fa fa-check layui-bg-green"></i> 提交审核', '<i class="fa fa-eraser"></i> 取消'],
|
|
|
+ content: Feng.ctxPath + '/enterprise/talent_work_unit_change/apply/id/' + TalentWorkunitChange.seItem.id,
|
|
|
+ btn: ['<i class="fa fa-eye"></i> 保存未提交', '<i class="fa fa-check layui-bg-green"></i> 提交审核', '<i class="fa fa-eraser"></i> 取消'],
|
|
|
btnAlign: 'c',
|
|
|
btn1: function (index, layero) {
|
|
|
var obj = layero.find("iframe")[0].contentWindow;
|
|
|
obj.TalentWorkunitChangeInfoDlg.addSubmit();
|
|
|
- },btn2: function(index, layero){
|
|
|
+ }, btn2: function (index, layero) {
|
|
|
var obj = layero.find("iframe")[0].contentWindow;
|
|
|
obj.TalentWorkunitChangeInfoDlg.editSubmit(2);
|
|
|
return false;
|
|
|
},
|
|
|
- success :function (layero, index) {
|
|
|
- layer.tips('添加基本信息并上传附件后点击','.layui-layer-btn1',{tips:[1,"#78BA32"],time:0,closeBtn :2});
|
|
|
+ success: function (layero, index) {
|
|
|
+ layer.tips('添加基本信息并上传附件后点击', '.layui-layer-btn1', {tips: [1, "#78BA32"], time: 0, closeBtn: 2});
|
|
|
},
|
|
|
- end :function () {
|
|
|
+ end: function () {
|
|
|
layer.closeAll('tips');
|
|
|
}
|
|
|
});
|
|
|
TalentWorkunitChange.layerIndex = index;
|
|
|
layer.full(index);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Feng.info(data.msg);
|
|
|
}
|
|
|
}, function (data) {
|
|
|
Feng.error("校验失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("type",CONFIG.project_workchange);
|
|
|
- ajax.set("year",TalentWorkunitChange.seItem.year);
|
|
|
+ ajax.set("type", CONFIG.project_workchange);
|
|
|
+ ajax.set("year", TalentWorkunitChange.seItem.year);
|
|
|
ajax.start();
|
|
|
}
|
|
|
};
|
|
@@ -185,7 +192,7 @@ TalentWorkunitChange.openTalentWorkunitChangeSelect = function () {
|
|
|
area: ['800px', '420px'], //宽高
|
|
|
fix: false, //不固定
|
|
|
maxmin: true,
|
|
|
- content: Feng.ctxPath + '/api/talentWorkunitChange/talentWorkunitChange_select/' + TalentWorkunitChange.seItem.id,
|
|
|
+ content: Feng.ctxPath + '/enterprise/talent_work_unit_change/view/id/' + TalentWorkunitChange.seItem.id,
|
|
|
});
|
|
|
TalentWorkunitChange.layerIndex = index;
|
|
|
layer.full(index);
|
|
@@ -198,17 +205,18 @@ TalentWorkunitChange.openTalentWorkunitChangeSelect = function () {
|
|
|
*/
|
|
|
TalentWorkunitChange.delete = function () {
|
|
|
if (this.check()) {
|
|
|
- if(TalentWorkunitChange.seItem.checkState!=-1){
|
|
|
- Feng.error("已提交审核,无法删除");return;
|
|
|
+ if (TalentWorkunitChange.seItem.checkState != -1) {
|
|
|
+ Feng.error("已提交审核,无法删除");
|
|
|
+ return;
|
|
|
}
|
|
|
- var operation = function() {
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/api/talentWorkunitChange/delete", function (data) {
|
|
|
+ var operation = function () {
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/enterprise/talent_work_unit_change/delete", function (data) {
|
|
|
Feng.success("删除成功!");
|
|
|
TalentWorkunitChange.table.refresh();
|
|
|
}, function (data) {
|
|
|
Feng.error("删除失败!" + data.responseJSON.message + "!");
|
|
|
});
|
|
|
- ajax.set("talentWorkunitChangeId", TalentWorkunitChange.seItem.id);
|
|
|
+ ajax.set("id", TalentWorkunitChange.seItem.id);
|
|
|
ajax.start();
|
|
|
}
|
|
|
Feng.confirm("删除后无法恢复,确认删除吗?", operation);
|
|
@@ -220,7 +228,7 @@ TalentWorkunitChange.delete = function () {
|
|
|
* 查询表单提交参数对象
|
|
|
* @returns {{}}
|
|
|
*/
|
|
|
-TalentWorkunitChange.formParams = function() {
|
|
|
+TalentWorkunitChange.formParams = function () {
|
|
|
var queryData = {};
|
|
|
queryData['talentName'] = $("#talentName").val();
|
|
|
queryData['idCard'] = $("#idCard").val();
|
|
@@ -233,7 +241,7 @@ TalentWorkunitChange.formParams = function() {
|
|
|
/**
|
|
|
* 重置
|
|
|
*/
|
|
|
-TalentWorkunitChange.reset = function (){
|
|
|
+TalentWorkunitChange.reset = function () {
|
|
|
$("#talentName").val("");
|
|
|
$("#idCard").val("");
|
|
|
$("#oldEnterpriseId").val("");
|
|
@@ -252,16 +260,16 @@ TalentWorkunitChange.search = function () {
|
|
|
/**
|
|
|
* 显示审核日志
|
|
|
*/
|
|
|
-TalentWorkunitChange.showLog = function (id){
|
|
|
+TalentWorkunitChange.showLog = function (id) {
|
|
|
layer.open({
|
|
|
type: 1,
|
|
|
- title:"日志",
|
|
|
- fixed:false,
|
|
|
- content: '<table id="'+id+'"></table>',
|
|
|
+ title: "日志",
|
|
|
+ fixed: false,
|
|
|
+ content: '<table id="' + id + '"></table>',
|
|
|
area: ['80%', '80%'],
|
|
|
maxmin: true,
|
|
|
- success :function (layero, index) {
|
|
|
- Feng.getCheckLog(id,{"type":CONFIG.project_workchange,"mainId":id,"typeFileId":"","active":1})
|
|
|
+ success: function (layero, index) {
|
|
|
+ Feng.getCheckLog(id, {"type": CONFIG.project_workchange, "mainId": id, "typeFileId": "", "active": 1})
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -269,7 +277,7 @@ TalentWorkunitChange.showLog = function (id){
|
|
|
|
|
|
$(function () {
|
|
|
var defaultColunms = TalentWorkunitChange.initColumn();
|
|
|
- var table = new BSTable(TalentWorkunitChange.id, "/api/talentWorkunitChange/list", defaultColunms);
|
|
|
+ var table = new BSTable(TalentWorkunitChange.id, "/enterprise/talent_work_unit_change/list", defaultColunms);
|
|
|
table.setPaginationType("server");
|
|
|
TalentWorkunitChange.table = table.init();
|
|
|
});
|