|
@@ -6,14 +6,14 @@ var TalentInfoInfoDlg = {
|
|
|
talentInfoInfoData: {},
|
|
|
validateFields: {
|
|
|
enterpriseId: {validators: {notEmpty: {message: '所属企业不能为空'}}},
|
|
|
- companyName: {validators: {notEmpty: {message: '所属企业不能为空'}}},
|
|
|
type: {validators: {notEmpty: {message: '人才类别不能为空'}}},
|
|
|
name: {validators: {notEmpty: {message: '姓名不能为空'}}},
|
|
|
nation: {validators: {notEmpty: {message: '民族不能为空'}}},
|
|
|
- provinceCode: {validators: {notEmpty: {message: '户籍省份不能为空'}}},
|
|
|
- cityCode: {validators: {notEmpty: {message: '户籍市不能为空'}}},
|
|
|
+ province: {validators: {notEmpty: {message: '户籍省份不能为空'}}},
|
|
|
+ city: {validators: {notEmpty: {message: '户籍市不能为空'}}},
|
|
|
+ county: {validators: {notEmpty: {message: '户籍县不能为空'}}},
|
|
|
address: {validators: {notEmpty: {message: '现居地址不能为空'}}},
|
|
|
- highEducation: {validators: {notEmpty: {message: '最高学历不能为空'}}},
|
|
|
+ highest_degree: {validators: {notEmpty: {message: '最高学历不能为空'}}},
|
|
|
major: {validators: {notEmpty: {message: '专业不能为空'}}},
|
|
|
phone: {
|
|
|
validators: {
|
|
@@ -37,12 +37,11 @@ var TalentInfoInfoDlg = {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- bank_number: {validators: {notEmpty: {message: '银行账号不能为空'}}},
|
|
|
+ bank_account: {validators: {notEmpty: {message: '银行账号不能为空'}}},
|
|
|
cur_entry_time: {validators: {notEmpty: {message: '入职时间不能为空'}}},
|
|
|
labor_contract_rangetime: {validators: {notEmpty: {message: '工作合同时间不能为空'}}},
|
|
|
- identifyCondition: {validators: {notEmpty: {message: '认定条件不能为空'}}},
|
|
|
+ talent_condition: {validators: {notEmpty: {message: '认定条件不能为空'}}},
|
|
|
identifyConditionName: {validators: {notEmpty: {message: '认定条件名称不能为空'}}},
|
|
|
- type: {validators: {notEmpty: {message: '人才类别不能为空'}}},
|
|
|
card_type: {validators: {notEmpty: {message: '证件类型不能为空'}}},
|
|
|
card_number: {validators: {notEmpty: {message: '证件号码不能为空'}}},
|
|
|
sex: {validators: {notEmpty: {message: '性别不能为空'}}},
|
|
@@ -80,12 +79,11 @@ var TalentInfoInfoDlg = {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- startTime: {validators: {notEmpty: {message: '工作合同开始时间不能为空'}}},
|
|
|
- talentArrange: {validators: {notEmpty: {message: '人才层次不能为空'}}},
|
|
|
+ talent_arrange: {validators: {notEmpty: {message: '人才层次不能为空'}}},
|
|
|
identifyGetTime: {validators: {notEmpty: {message: '认定条件证书取得时间不能为空'}}},
|
|
|
breakFaith: {validators: {notEmpty: {message: '是否曾被相关主管部门列为失信个人不能为空'}}},
|
|
|
- mainHonours: {validators: {notEmpty: {message: '主要业绩及取得的荣誉不能为空'}}},
|
|
|
- educationAndResume: {validators: {notEmpty: {message: '教育背景及工作简历不能为空'}}}
|
|
|
+ experience: {validators: {notEmpty: {message: '主要业绩及取得的荣誉不能为空'}}},
|
|
|
+ education: {validators: {notEmpty: {message: '教育背景及工作简历不能为空'}}}
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -144,36 +142,35 @@ TalentInfoInfoDlg.collectData = function () {
|
|
|
.set('birthday')
|
|
|
.set('address')
|
|
|
.set('politics')
|
|
|
- .set('highEducation')
|
|
|
- .set('graduateSchool')
|
|
|
+ .set('highest_degree')
|
|
|
+ .set('graduate_school')
|
|
|
.set('major')
|
|
|
- .set('post')
|
|
|
+ .set('position')
|
|
|
.set('phone')
|
|
|
.set('email')
|
|
|
.set('bank')
|
|
|
- .set('bankNetwork')
|
|
|
- .set('bankAccount')
|
|
|
- .set('bankNumber')
|
|
|
- .set('entryTime')
|
|
|
- .set('startTime')
|
|
|
- .set('endTime')
|
|
|
- .set('talentArrange')
|
|
|
- .set('identifyCondition')
|
|
|
+ .set('bank_branch_name')
|
|
|
+ .set('bank_account')
|
|
|
+ .set('bank_number')
|
|
|
+ .set('cur_entry_time')
|
|
|
+ .set('labor_contract_rangetime')
|
|
|
+ .set('talent_arrange')
|
|
|
+ .set('talent_condition')
|
|
|
.set('identifyGetTime')
|
|
|
.set('identifyConditionName')
|
|
|
.set('breakFaith')
|
|
|
- .set('educationAndResume')
|
|
|
- .set('mainHonours')
|
|
|
+ .set('education')
|
|
|
+ .set('experience')
|
|
|
.set('industryField')
|
|
|
.set('title')
|
|
|
- .set('professionalQualifications')
|
|
|
- .set('studyAbroad')
|
|
|
+ .set('pro_qua')
|
|
|
+ .set('study_abroad')
|
|
|
.set('studyAbroadCountry')
|
|
|
.set('studyAbroadTime')
|
|
|
.set('description');
|
|
|
- this.talentInfoInfoData["provinceName"] = $("#provinceCode").find("option:selected").text();
|
|
|
- this.talentInfoInfoData["cityName"] = $("#cityCode").find("option:selected").text();
|
|
|
- this.talentInfoInfoData["countyName"] = $("#countyCode").find("option:selected").text();
|
|
|
+ this.talentInfoInfoData["provinceName"] = $("#province").find("option:selected").text();
|
|
|
+ this.talentInfoInfoData["cityName"] = $("#city").find("option:selected").text();
|
|
|
+ this.talentInfoInfoData["countyName"] = $("#county").find("option:selected").text();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -196,11 +193,6 @@ TalentInfoInfoDlg.addSubmit = function () {
|
|
|
return;
|
|
|
}
|
|
|
var id = $('#id').val();
|
|
|
- $("#provinceName").val($("#provinceCode").find("option:selected").text());
|
|
|
- $("#cityName").val($("#cityCode").find("option:selected").text());
|
|
|
- if ($("#countyCode").val() != null && $("#countyCode").val() != '') {
|
|
|
- $("#countyName").val($("#countyCode").find("option:selected").text());
|
|
|
- }
|
|
|
if (id != null && id != '') {
|
|
|
if (!TalentInfoInfoDlg.validateIsEdit())
|
|
|
return;
|
|
@@ -237,8 +229,8 @@ TalentInfoInfoDlg.getIdentifyCondition = function () {
|
|
|
var level = $("#talent_arrange").val();
|
|
|
var type = $("#type").val();
|
|
|
if (level == null || level == '') {
|
|
|
- $("#identifyCondition").empty();
|
|
|
- $("#identifyCondition").trigger('chosen:updated');
|
|
|
+ $("#talent_condition").empty();
|
|
|
+ $("#talent_condition").trigger('chosen:updated');
|
|
|
return;
|
|
|
}
|
|
|
if (type == null || type == '') {
|
|
@@ -246,21 +238,21 @@ TalentInfoInfoDlg.getIdentifyCondition = function () {
|
|
|
return;
|
|
|
}
|
|
|
Feng.addAjaxSelect({
|
|
|
- "id": "identifyCondition",
|
|
|
+ "id": "talent_condition",
|
|
|
"displayCode": "id",
|
|
|
"displayName": "name",
|
|
|
"type": "GET",
|
|
|
- "url": Feng.ctxPath + "/api/common/findIdentifyConditionByLevel?talentLevel=" + level + "&type=" + type
|
|
|
+ "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel?level=" + level + "&type=" + type
|
|
|
});
|
|
|
- $("#identifyCondition").trigger('chosen:updated');
|
|
|
+ $("#talent_condition").trigger('chosen:updated');
|
|
|
}
|
|
|
|
|
|
TalentInfoInfoDlg.bankChange = function () {
|
|
|
var bank = $("#bank").val();
|
|
|
if ($.trim(bank) == '中国工商银行') {
|
|
|
- $("#bankNumber").val('102391050013');
|
|
|
+ $("#bank_number").val('102391050013');
|
|
|
} else {
|
|
|
- $("#bankNumber").val('');
|
|
|
+ $("#bank_number").val('');
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -305,8 +297,10 @@ TalentInfoInfoDlg.initFileTable = function () {
|
|
|
var queryData = {};
|
|
|
queryData['project'] = CONFIG.project_rcrd;
|
|
|
queryData['type'] = $("#type").val();
|
|
|
+ queryData['checkState'] = $("#checkState").val();
|
|
|
+ queryData['isMix'] = 1;
|
|
|
$("#fileTable").bootstrapTable({
|
|
|
- url: Feng.ctxPath + "/api/talentInfo/findUnCommonFileType",
|
|
|
+ url: Feng.ctxPath + "/common/api/findCommonFileType",
|
|
|
method: 'POST',
|
|
|
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
|
|
search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
|
|
@@ -339,7 +333,7 @@ TalentInfoInfoDlg.initFileTable = function () {
|
|
|
$("#fileTable").bootstrapTable('expandAllRows');
|
|
|
},
|
|
|
onExpandRow: function (index, row, $detail) {
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/listTalentFile", function (data) {
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/common/api/listTalentFile", function (data) {
|
|
|
if (data == null || data.length == 0) {
|
|
|
return;
|
|
|
}
|
|
@@ -434,7 +428,7 @@ TalentInfoInfoDlg.deleteFile = function (id, state) {
|
|
|
if (!TalentInfoInfoDlg.validateIsEdit())
|
|
|
return;
|
|
|
var operation = function () {
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/deleteFile", function (data) {
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
|
|
|
if (data.code = 200) {
|
|
|
Feng.success(data.msg);
|
|
|
$("#fileTable").bootstrapTable("refresh", {});
|
|
@@ -463,7 +457,7 @@ TalentInfoInfoDlg.submitToCheck = function () {
|
|
|
if (!TalentInfoInfoDlg.validateIsEdit())
|
|
|
return;
|
|
|
var operation = function () {
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/submitToCheck", function (data) {
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/enterprise/talent/submitToCheck", function (data) {
|
|
|
if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
// $("#checkState").val(data.obj);
|
|
@@ -486,13 +480,19 @@ TalentInfoInfoDlg.submitToCheck = function () {
|
|
|
*/
|
|
|
TalentInfoInfoDlg.validateIsEdit = function () {
|
|
|
var checkState = $("#checkState").val();
|
|
|
- if (checkState != 1 && checkState != 5 && checkState != 10) {
|
|
|
- if (checkState == -1) {
|
|
|
+ if (checkState != 0 && checkState != 8) {
|
|
|
+ if (checkState == 16 || checkState == -1 || checkState == -2 || checkState == 7) {
|
|
|
Feng.error("您的申报审核不通过,无法再修改");
|
|
|
return false;
|
|
|
- } else if (checkState >= 35) {
|
|
|
+ } else if (checkState == 28) {
|
|
|
+ Feng.error("申报已完成");
|
|
|
+ return false;
|
|
|
+ } else if (checkState == 14) {
|
|
|
Feng.error("您的申报已审核通过,无法再修改");
|
|
|
return false;
|
|
|
+ } else if (checkState == 22 || checkState == 25 || checkState == 27) {
|
|
|
+ Feng.error("该申报已终止");
|
|
|
+ return false;
|
|
|
} else {
|
|
|
Feng.error("您的申报正在审核中,请耐心等待");
|
|
|
return false;
|
|
@@ -532,7 +532,8 @@ TalentInfoInfoDlg.initFileTypeColumn = function () {
|
|
|
formatter: function (value, row, index) {
|
|
|
var files = $("#files").val();
|
|
|
var checkState = $("#checkState").val();
|
|
|
- if (checkState != 10 || files.indexOf(value) != -1) {
|
|
|
+ var realState = $("#realState").val();
|
|
|
+ if (checkState == 8 || (checkState == 11 && realState != 14) || (realState == 11 && files.indexOf(value) != -1)) {
|
|
|
return "<button type='button' onclick=\"TalentInfoInfoDlg.checkFile(this,'" + row.fState + "','" + value + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
|
|
|
"<i class=\"fa fa-upload\"></i>上传" +
|
|
|
"</button>";
|
|
@@ -581,6 +582,29 @@ TalentInfoInfoDlg.setNoChangeField = function () {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+$("#card_type").change(function () {
|
|
|
+ async_padding($("#card_number").val().trim(), $(this).val());
|
|
|
+})
|
|
|
+$("#card_number").blur(function () {
|
|
|
+ async_padding($(this).val().trim(), $("#card_type").val());
|
|
|
+})
|
|
|
+function async_padding(card_number, card_type) {
|
|
|
+ if (card_number != "" && card_number.length == 18 && card_type == "1") {
|
|
|
+ var year = card_number.substring(6, 10);
|
|
|
+ var month = card_number.substring(10, 12);
|
|
|
+ var day = card_number.substring(12, 14);
|
|
|
+ var birthday = year + "-" + month + "-" + day;
|
|
|
+ var rule = /\d{4}-\d{2}-\d{2}/;
|
|
|
+ if (rule.test(birthday))
|
|
|
+ $("#birthday").val(birthday);
|
|
|
+ var num = card_number.substring(17, 1);
|
|
|
+ if (num % 2 == 0) {
|
|
|
+ $("#sex").val(2);
|
|
|
+ } else {
|
|
|
+ $("#sex").val(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
$(function () {
|
|
|
$('#talentInfoForm').bootstrapValidator({
|
|
@@ -611,11 +635,8 @@ $(function () {
|
|
|
{"name": "nation", "code": "nation"},
|
|
|
{"name": "talent_arrange", "code": "talent_arrange"},
|
|
|
{"name": "nationality", "code": "nationality"},
|
|
|
- {"name": "talentType", "code": "un_jbt_talentType"},
|
|
|
{"name": "politics", "code": "politics"},
|
|
|
- {"name": "highest_degree", "code": "highest_degree"},
|
|
|
- {"name": "introductionMode", "code": "un_introduction_mode"},
|
|
|
- {"name": "industryField", "code": "un_industryField"}];
|
|
|
+ {"name": "highest_degree", "code": "highest_degree"}];
|
|
|
Feng.findChildDictBatch(JSON.stringify(arr));
|
|
|
//加载省份
|
|
|
Feng.addAjaxSelect({
|
|
@@ -662,10 +683,10 @@ $(function () {
|
|
|
$("#city").val($("#city").attr("value"));
|
|
|
TalentInfoInfoDlg.afterSelectCity();
|
|
|
$("#county").val($("#county").attr("value"));
|
|
|
- $("#talentArrange").val($("#talentArrange").attr("value"));
|
|
|
+ $("#talent_arrange").val($("#talent_arrange").attr("value"));
|
|
|
TalentInfoInfoDlg.getIdentifyCondition();
|
|
|
- $("#talentArrange").val($("#talentArrange").attr("value"));
|
|
|
- $("#identifyCondition").val($("#identifyCondition").attr("value"));
|
|
|
+ $("#talent_arrange").val($("#talent_arrange").attr("value"));
|
|
|
+ $("#talent_condition").val($("#talent_condition").attr("value"));
|
|
|
TalentInfoInfoDlg.validId();
|
|
|
$("#photo").change(function (e) {
|
|
|
var tag = e.target;
|
|
@@ -679,10 +700,10 @@ $(function () {
|
|
|
};
|
|
|
});
|
|
|
TalentInfoInfoDlg.setNoChangeField();
|
|
|
- $("#identifyCondition").on('chosen:ready', function (e, params) {
|
|
|
+ $("#talent_condition").on('chosen:ready', function (e, params) {
|
|
|
$(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 4px");
|
|
|
});
|
|
|
- $("#identifyCondition").chosen({
|
|
|
+ $("#talent_condition").chosen({
|
|
|
no_results_text: "没有找到结果!",
|
|
|
width: '100%',
|
|
|
search_contains: true, //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
|