|
@@ -304,9 +304,7 @@ TalentInfoInfoDlg.initFileTable = function () {
|
|
|
}
|
|
|
} else {
|
|
|
if (data["rows"][k].isConditionFile) {
|
|
|
- var isMatchZhiren = $("input[name=isMatchZhiren]").length > 0 ? parseInt($("input[name=isMatchZhiren]:checked").val()) : false;
|
|
|
- var isImport = parseInt($("#import").val());
|
|
|
- if (isImport == 1 && isMatchZhiren)
|
|
|
+ if (TalentInfoInfoDlg.isImport() && TalentInfoInfoDlg.isZhiRen())
|
|
|
continue;
|
|
|
var tableIndex = 0;
|
|
|
if ($("#talent_condition").parents(".table").length > 0) {
|
|
@@ -471,9 +469,7 @@ TalentInfoInfoDlg.getIdentifyNeedsFileTypes = function () {
|
|
|
$("#annual_salary").parents("td").css("display", "none");
|
|
|
$('#talentInfoForm').bootstrapValidator('removeField', "annual_salary");
|
|
|
|
|
|
- var isMatchZhiren = $("input[name=isMatchZhiren]").length > 0 ? parseInt($("input[name=isMatchZhiren]:checked").val()) : false;
|
|
|
- var isImport = parseInt($("#import").val());
|
|
|
- if (isImport > 0 && isMatchZhiren === false) {
|
|
|
+ if (TalentInfoInfoDlg.isImport() && $("input[name=isMatchZhiren]:checked").length == 0) {
|
|
|
layer.alert("请先选择是否符合直认条件");
|
|
|
$("#talent_condition").val("");
|
|
|
$("#talent_condition").trigger('chosen:updated');
|
|
@@ -788,22 +784,12 @@ TalentInfoInfoDlg.sourceChange = function () {
|
|
|
//var columns = 3;
|
|
|
switch (source) {
|
|
|
case "1":
|
|
|
- case "3":
|
|
|
- //columns = source == 3 ? 3 : 4;
|
|
|
- //$("#source_batch").parents("td").css("display", "table-cell");
|
|
|
- //$(".fujian_highcert").parents("td").css("display", "table-cell");
|
|
|
- //$('#talentInfoForm').bootstrapValidator('addField', "source_batch", {validators: {notEmpty: {message: '申报来源批次不能为空'}}});
|
|
|
- //$('#talentInfoForm').bootstrapValidator('addField', "fujian_highcert_pubtime", {validators: {notEmpty: {message: '福建省高层次人才证书发证日期不能为空'}}});
|
|
|
- //$('#talentInfoForm').bootstrapValidator('addField', "fujian_highcert_exptime", {validators: {notEmpty: {message: '福建省高层次人才证书有效期不能为空'}}});
|
|
|
break;
|
|
|
case "2":
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ break;
|
|
|
case "4":
|
|
|
- //columns = source == 4 ? 3 : 4;
|
|
|
- //$("#source_batch").parents("td").css("display", "table-cell");
|
|
|
- //$(".quanzhou_highcert").parents("td").css("display", "table-cell");
|
|
|
- //$('#talentInfoForm').bootstrapValidator('addField', "source_batch", {validators: {notEmpty: {message: '申报来源批次不能为空'}}});
|
|
|
- //$('#talentInfoForm').bootstrapValidator('addField', "quanzhou_highcert_pubtime", {validators: {notEmpty: {message: '泉州高层次人才证书发证日期不能为空'}}});
|
|
|
- //$('#talentInfoForm').bootstrapValidator('addField', "quanzhou_highcert_exptime", {validators: {notEmpty: {message: '泉州高层次人才证书有效期不能为空'}}});
|
|
|
break;
|
|
|
}
|
|
|
if (source == 3) {
|
|
@@ -840,14 +826,23 @@ TalentInfoInfoDlg.sourceChange = function () {
|
|
|
//$("#talent_condition").parents("td").attr("colspan", columns - 1);
|
|
|
}
|
|
|
TalentInfoInfoDlg.isMatchZhirenChange = function () {
|
|
|
- var isMatchZhiren = $("input[name=isMatchZhiren]").length > 0 ? parseInt($("input[name=isMatchZhiren]:checked").val()) : false;
|
|
|
- var isImport = parseInt($("#import").val());
|
|
|
- if (isImport > 0 && isMatchZhiren == 1) {
|
|
|
+ $("#source option[value!='']").css("display", "none");
|
|
|
+ var show = [1, 2];
|
|
|
+ var curSource = parseInt($("#source").val());
|
|
|
+ if (TalentInfoInfoDlg.isImport() && TalentInfoInfoDlg.isZhiRen()) {
|
|
|
$("#talent_condition").parents(".table").find(".fileTable").find("tbody").html("");
|
|
|
} else {
|
|
|
+ show = [3, 4, 5];
|
|
|
var source = $("#source").val();
|
|
|
TalentInfoInfoDlg.ajaxGetConditionFile(source);
|
|
|
}
|
|
|
+ for (var i in show) {
|
|
|
+ $("#source option[value=" + show[i] + "]").css("display", "block");
|
|
|
+ }
|
|
|
+ if (show.indexOf(curSource) == -1) {
|
|
|
+ $("#source").val("");
|
|
|
+ TalentInfoInfoDlg.sourceChange();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//校验是否保存基础信息
|
|
@@ -1107,6 +1102,24 @@ TalentInfoInfoDlg.setNoChangeField = function () {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 是否导入
|
|
|
+ * @returns {Boolean}
|
|
|
+ */
|
|
|
+TalentInfoInfoDlg.isImport = function () {
|
|
|
+ var isImport = parseInt($("#import").val());
|
|
|
+ return isImport > 0 ? true : false;
|
|
|
+}
|
|
|
+/**
|
|
|
+ * 是否直认
|
|
|
+ * @returns {Boolean}
|
|
|
+ */
|
|
|
+TalentInfoInfoDlg.isZhiRen = function () {
|
|
|
+ var isMatchZhiren = $("input[name=isMatchZhiren]").length > 0 && $("input[name=isMatchZhiren]:checked").val() == 1 ? true : false;
|
|
|
+ return isMatchZhiren;
|
|
|
+}
|
|
|
+
|
|
|
$("#card_type").change(function () {
|
|
|
async_padding($("#card_number").val().trim(), $(this).val());
|
|
|
})
|
|
@@ -1143,7 +1156,17 @@ $(function () {
|
|
|
{"name": "highest_degree", "code": "highest_degree"},
|
|
|
{"name": "source", "code": "source"},
|
|
|
{"name": "import_way", "code": "import_way"}];
|
|
|
- Feng.findChildDictBatch(JSON.stringify(arr))
|
|
|
+ Feng.findChildDictBatch(JSON.stringify(arr));
|
|
|
+
|
|
|
+ if (!TalentInfoInfoDlg.isImport() || !TalentInfoInfoDlg.isZhiRen()) {
|
|
|
+ $("#source option[value=1]").css("display", "none");
|
|
|
+ $("#source option[value=2]").css("display", "none");
|
|
|
+ }
|
|
|
+ if (TalentInfoInfoDlg.isImport() && TalentInfoInfoDlg.isZhiRen()) {
|
|
|
+ $("#source option[value=3]").css("display", "none");
|
|
|
+ $("#source option[value=4]").css("display", "none");
|
|
|
+ $("#source option[value=5]").css("display", "none");
|
|
|
+ }
|
|
|
//加载省份
|
|
|
Feng.addAjaxSelect({
|
|
|
"id": "province",
|