|
@@ -4,103 +4,6 @@
|
|
|
var locked = false;
|
|
|
var TalentInfoInfoDlg = {
|
|
|
talentInfoInfoData: {},
|
|
|
- validateFields: {
|
|
|
- enterprise_id: {validators: {notEmpty: {message: '所属企业不能为空'}}},
|
|
|
- talent_type: {validators: {notEmpty: {message: '人才类型不能为空'}}},
|
|
|
- enterprise_tag: {validators: {notEmpty: {message: '单位标签不能为空'}}},
|
|
|
- enterprise_name: {validators: {notEmpty: {message: '单位名称不能为空'}}},
|
|
|
- address: {validators: {notEmpty: {message: '所属街道不能为空'}}},
|
|
|
- industry_field: {validators: {notEmpty: {message: '产业领域不能为空'}}},
|
|
|
- name: {validators: {notEmpty: {message: '姓名不能为空'}}},
|
|
|
- card_type: {validators: {notEmpty: {message: '证件类型不能为空'}}},
|
|
|
- card_number: {validators: {notEmpty: {message: '证件号码不能为空'}}},
|
|
|
- sex: {validators: {notEmpty: {message: '性别不能为空'}}},
|
|
|
- birthday: {validators: {notEmpty: {message: '出生日期不能为空'}}},
|
|
|
- nationality: {validators: {notEmpty: {message: '国籍/地区不能为空'}}},
|
|
|
- province: {validators: {notEmpty: {message: '户籍省份不能为空'}}},
|
|
|
- city: {validators: {notEmpty: {message: '户籍市不能为空'}}},
|
|
|
- nation: {validators: {notEmpty: {message: '民族不能为空'}}},
|
|
|
- politics: {validators: {notEmpty: {message: '政治面貌不能为空'}}},
|
|
|
- apply_year: {validators: {notEmpty: {message: '申报年度不能为空'}}},
|
|
|
- fst_work_time: {validators: {notEmpty: {message: '首次来晋工作时间不能为空'}}},
|
|
|
- import_way: {validators: {notEmpty: {message: '引进方式不能为空'}}},
|
|
|
- cur_entry_time: {validators: {notEmpty: {message: '本单位入职时间不能为空'}}},
|
|
|
- position: {validators: {notEmpty: {message: '本单位现任职务不能为空'}}},
|
|
|
- source: {validators: {notEmpty: {message: '申报来源不能为空'}}},
|
|
|
- talent_arrange: {validators: {notEmpty: {message: '人才层次不能为空'}}},
|
|
|
- talent_condition: {validators: {notEmpty: {message: '认定条件不能为空'}}},
|
|
|
- highest_degree: {validators: {notEmpty: {message: '最高学历不能为空'}}},
|
|
|
- graduate_school: {validators: {notEmpty: {message: '毕业院校不能为空'}}},
|
|
|
- major: {validators: {notEmpty: {message: '专业不能为空'}}},
|
|
|
- bank: {
|
|
|
- validators: {
|
|
|
- notEmpty: {
|
|
|
- message: '开户银行不能为空'
|
|
|
- },
|
|
|
- regexp: {
|
|
|
- regexp: /^[\u4e00-\u9fa5]*银行$/,
|
|
|
- message: "开户银行格式不正确"
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- bank_number: {
|
|
|
- validators: {
|
|
|
- notEmpty: {
|
|
|
- message: '银行行号不能为空'
|
|
|
- },
|
|
|
- regexp: {
|
|
|
- regexp: /^\d+$/,
|
|
|
- message: "银行行号格式不正确"
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- bank_branch_house: {
|
|
|
- validators: {
|
|
|
- notEmpty: {
|
|
|
- message: '开户银行网点不能为空'
|
|
|
- },
|
|
|
- regexp: {
|
|
|
- regexp: /^[\u4e00-\u9fa5]*银行[\u4e00-\u9fa5]*省?[\u4e00-\u9fa5]+市[\u4e00-\u9fa5]*$/,
|
|
|
- message: "开户银行格式不正确"
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- bank_account: {
|
|
|
- validators: {
|
|
|
- notEmpty: {
|
|
|
- message: '银行账号不能为空'
|
|
|
- },
|
|
|
- regexp: {
|
|
|
- regexp: /^\d+$/,
|
|
|
- message: "银行账号格式不正确"
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- phone: {
|
|
|
- validators: {
|
|
|
- notEmpty: {
|
|
|
- message: '手机号码不能为空'
|
|
|
- },
|
|
|
- regexp: {
|
|
|
- regexp: /0?(13|14|15|17|18|19)[0-9]{9}/,
|
|
|
- message: "手机号码格式不正确"
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- email: {
|
|
|
-
|
|
|
- validators: {
|
|
|
- notEmpty: {
|
|
|
- message: '电子邮箱不能为空'
|
|
|
- },
|
|
|
- emailAddress: {
|
|
|
- message: "电子邮箱格式不正确"
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- mainHonours: {validators: {notEmpty: {message: '主要业绩及取得的荣誉不能为空'}}},
|
|
|
- educationAndResume: {validators: {notEmpty: {message: '教育背景及工作简历不能为空'}}},
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
/**
|
|
@@ -469,6 +372,7 @@ TalentInfoInfoDlg.initFileTable = function () {
|
|
|
var queryData = {};
|
|
|
queryData['project'] = CONFIG.project_rcrd;
|
|
|
queryData['type'] = $("#type").val();
|
|
|
+ queryData['checkState'] = $("#checkState").val();
|
|
|
$("#fileTable").bootstrapTable({
|
|
|
url: "/common/api/findCommonFileType",
|
|
|
method: 'POST',
|
|
@@ -566,7 +470,7 @@ TalentInfoInfoDlg.validId = function () {
|
|
|
//选择附件并显示附件名
|
|
|
TalentInfoInfoDlg.checkFile = function (content, state, fileTypeId, fileId) {
|
|
|
//if (!TalentInfoInfoDlg.validateIsEdit())
|
|
|
- //return;
|
|
|
+ //return;
|
|
|
$("#upload_file ").unbind("change");
|
|
|
$("#upload_file ").change(function () {
|
|
|
TalentInfoInfoDlg.upload(fileTypeId, fileId);
|
|
@@ -577,12 +481,12 @@ TalentInfoInfoDlg.checkFile = function (content, state, fileTypeId, fileId) {
|
|
|
//上传附件
|
|
|
TalentInfoInfoDlg.upload = function (fileTypeId, fileId) {
|
|
|
var id = $("#id").val();
|
|
|
- /*if (id == null || id == '') {
|
|
|
+ if (id == null || id == '') {
|
|
|
Feng.info("请先添加基本信息并保存后再试");
|
|
|
return;
|
|
|
}
|
|
|
- if (!TalentInfoInfoDlg.validateIsEdit())
|
|
|
- return;*/
|
|
|
+ /*if (!TalentInfoInfoDlg.validateIsEdit())
|
|
|
+ return;*/
|
|
|
if (fileId != null && fileId != 'null') {
|
|
|
$("#fileId").val(fileId)
|
|
|
} else {
|
|
@@ -596,10 +500,10 @@ TalentInfoInfoDlg.upload = function (fileTypeId, fileId) {
|
|
|
}
|
|
|
//删除附件
|
|
|
TalentInfoInfoDlg.deleteFile = function (id, state) {
|
|
|
- if (!TalentInfoInfoDlg.validateIsEdit())
|
|
|
- return;
|
|
|
+ //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", {});
|
|
@@ -628,7 +532,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/submit", function (data) {
|
|
|
if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
// $("#checkState").val(data.obj);
|
|
@@ -651,7 +555,7 @@ TalentInfoInfoDlg.submitToCheck = function () {
|
|
|
*/
|
|
|
TalentInfoInfoDlg.validateIsEdit = function () {
|
|
|
var checkState = $("#checkState").val();
|
|
|
- if (checkState != 1 && checkState != 5 && checkState != 10) {
|
|
|
+ if (checkState != 0 && checkState != 5 && checkState != 10) {
|
|
|
if (checkState == -1) {
|
|
|
Feng.error("您的申报审核不通过,无法再修改");
|
|
|
return false;
|
|
@@ -710,7 +614,7 @@ TalentInfoInfoDlg.initFileTypeColumn = function () {
|
|
|
TalentInfoInfoDlg.validUploadButton = function (type, row, fileTypeId, fileId) {
|
|
|
var files = $("#files").val();
|
|
|
var checkState = $("#checkState").val();
|
|
|
- if (Feng.isEmptyStr(checkState) || checkState == 1 || (checkState == 10 && files.indexOf(fileTypeId) != -1)) {
|
|
|
+ if (Feng.isEmptyStr(checkState) || checkState == 0 || (checkState == 10 && files.indexOf(fileTypeId) != -1)) {
|
|
|
if (type == 1) { //上传
|
|
|
return "<button type='button' onclick=\"TalentInfoInfoDlg.checkFile(this,'" + row.fState + "','" + fileTypeId + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
|
|
|
"<i class=\"fa fa-upload\"></i>上传" +
|
|
@@ -768,6 +672,108 @@ TalentInfoInfoDlg.setNoChangeField = function () {
|
|
|
}
|
|
|
|
|
|
$(function () {
|
|
|
+ var step = $("#step").val();
|
|
|
+ if (step == 1) {
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "source_county", {validators: {notEmpty: {message: '入选来源县市区不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "enterprise_id", {validators: {notEmpty: {message: '所属企业不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "talent_type", {validators: {notEmpty: {message: '人才类型不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "enterprise_tag", {validators: {notEmpty: {message: '单位标签不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "enterprise_name", {validators: {notEmpty: {message: '单位名称不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "address", {validators: {notEmpty: {message: '所属街道不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "industry_field", {validators: {notEmpty: {message: '产业领域不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "name", {validators: {notEmpty: {message: '姓名不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "card_type", {validators: {notEmpty: {message: '证件类型不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "card_number", {validators: {notEmpty: {message: '证件号码不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "sex", {validators: {notEmpty: {message: '性别不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "birthday", {validators: {notEmpty: {message: '出生日期不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "nationality", {validators: {notEmpty: {message: '国籍/地区不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "province", {validators: {notEmpty: {message: '户籍省份不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "city", {validators: {notEmpty: {message: '户籍市不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "nation", {validators: {notEmpty: {message: '民族不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "politics", {validators: {notEmpty: {message: '政治面貌不能为空'}}});
|
|
|
+ } else {
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "apply_year", {validators: {notEmpty: {message: '申报年度不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "fst_work_time", {validators: {notEmpty: {message: '首次来晋工作时间不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "import_way", {validators: {notEmpty: {message: '引进方式不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "cur_entry_time", {validators: {notEmpty: {message: '本单位入职时间不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "position", {validators: {notEmpty: {message: '本单位现任职务不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "source", {validators: {notEmpty: {message: '申报来源不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "talent_arrange", {validators: {notEmpty: {message: '人才层次不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "talent_condition", {validators: {notEmpty: {message: '认定条件不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "highest_degree", {validators: {notEmpty: {message: '最高学历不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "graduate_school", {validators: {notEmpty: {message: '毕业院校不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "major", {validators: {notEmpty: {message: '专业不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "bank", {
|
|
|
+ validators: {
|
|
|
+ notEmpty: {
|
|
|
+ message: '开户银行不能为空'
|
|
|
+ },
|
|
|
+ regexp: {
|
|
|
+ regexp: /^[\u4e00-\u9fa5]*银行$/,
|
|
|
+ message: "开户银行格式不正确"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "bank_number", {
|
|
|
+ validators: {
|
|
|
+ notEmpty: {
|
|
|
+ message: '银行行号不能为空'
|
|
|
+ },
|
|
|
+ regexp: {
|
|
|
+ regexp: /^\d+$/,
|
|
|
+ message: "银行行号格式不正确"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "bank_branch_house", {
|
|
|
+ validators: {
|
|
|
+ notEmpty: {
|
|
|
+ message: '开户银行网点不能为空'
|
|
|
+ },
|
|
|
+ regexp: {
|
|
|
+ regexp: /^[\u4e00-\u9fa5]*银行[\u4e00-\u9fa5]*省?[\u4e00-\u9fa5]+市[\u4e00-\u9fa5]*$/,
|
|
|
+ message: "开户银行格式不正确"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "bank_account", {
|
|
|
+ validators: {
|
|
|
+ notEmpty: {
|
|
|
+ message: '银行账号不能为空'
|
|
|
+ },
|
|
|
+ regexp: {
|
|
|
+ regexp: /^\d+$/,
|
|
|
+ message: "银行账号格式不正确"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "phone", {
|
|
|
+ validators: {
|
|
|
+ notEmpty: {
|
|
|
+ message: '手机号码不能为空'
|
|
|
+ },
|
|
|
+ regexp: {
|
|
|
+ regexp: /0?(13|14|15|17|18|19)[0-9]{9}/,
|
|
|
+ message: "手机号码格式不正确"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "email", {
|
|
|
+
|
|
|
+ validators: {
|
|
|
+ notEmpty: {
|
|
|
+ message: '电子邮箱不能为空'
|
|
|
+ },
|
|
|
+ emailAddress: {
|
|
|
+ message: "电子邮箱格式不正确"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "mainHonours", {validators: {notEmpty: {message: '主要业绩及取得的荣誉不能为空'}}});
|
|
|
+ $('#talentInfoForm').bootstrapValidator('addField', "educationAndResume", {validators: {notEmpty: {message: '教育背景及工作简历不能为空'}}});
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
Feng.initValidatorTip("talentInfoForm", TalentInfoInfoDlg.validateFields);
|
|
|
var hand = $("#hand").val();
|
|
|
var id = $("#id").val();
|
|
@@ -815,18 +821,23 @@ $(function () {
|
|
|
$("select").each(function () {
|
|
|
$(this).val($(this).attr("value")).trigger("change");
|
|
|
});
|
|
|
- Feng.getCheckLog("logTable", {"type": CONFIG.project_rcrd, "mainId": id, "typeFileId": "", "active": 1})
|
|
|
+ //Feng.getCheckLog("logTable", {"type": CONFIG.project_rcrd, "mainId": id, "typeFileId": "", "active": 1})
|
|
|
}
|
|
|
+ $("#talent_type").val($("#talent_type").attr("value"));
|
|
|
+ $("#card_type").val($("#card_type").attr("value"));
|
|
|
+ $("#sex").val($("#sex").attr("value"));
|
|
|
$("#enterprise_tag").val($("#enterprise_tag").attr("value"));
|
|
|
$("#address").val($("#address").attr("value"));
|
|
|
+ $("#nation").val($("#nation").attr("value"));
|
|
|
+ $("#nationality").val($("#nationality").attr("value"));
|
|
|
$("#industry_field").val($("#industry_field").attr("value"));
|
|
|
$("#province").val($("#province").attr("value"));
|
|
|
TalentInfoInfoDlg.afterSelectProvince();
|
|
|
$("#city").val($("#city").attr("value"));
|
|
|
TalentInfoInfoDlg.afterSelectCity();
|
|
|
- $("#countyCode").val($("#county").attr("value"));
|
|
|
- $("#talent_arrange").val($("#talent_arrange").attr("value"));
|
|
|
+ $("#county").val($("#county").attr("value"));
|
|
|
TalentInfoInfoDlg.getIdentifyCondition();
|
|
|
+ $("#politics").val($("#politics").attr("value"));
|
|
|
$("#talent_arrange").val($("#talent_arrange").attr("value"));
|
|
|
$("#talent_condition").val($("#talent_condition").attr("value"));
|
|
|
TalentInfoInfoDlg.validId();
|