Browse Source

申报来源只有前两种不需要上传材料,后三种需要上传材料

sugangqiang 2 years ago
parent
commit
df9c7bf1a4

+ 1 - 1
app/common/controller/Api.php

@@ -317,7 +317,7 @@ class Api extends BaseController {
                 } else {
                 } else {
                     $where[] = ["isConditionFile", "<>", 1]; //排除人才条件上传文件
                     $where[] = ["isConditionFile", "<>", 1]; //排除人才条件上传文件
                 }
                 }
-                if ($talent_condition && $source == 5) {
+                if ($talent_condition && in_array($source, [3, 4, 5])) {
                     $condition_info = Db::table("new_talent_condition")->findOrEmpty($talent_condition);
                     $condition_info = Db::table("new_talent_condition")->findOrEmpty($talent_condition);
                     if ($condition_info["bindFileTypes"]) {
                     if ($condition_info["bindFileTypes"]) {
                         $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
                         $whr[] = ["id", "in", $condition_info["bindFileTypes"]];

+ 2 - 2
app/enterprise/controller/Talent.php

@@ -240,7 +240,7 @@ class Talent extends EnterpriseController {
                 exit;
                 exit;
             }
             }
 
 
-            if ($condition_info["bindFileTypes"] && $info["source"] == 5) {
+            if ($condition_info["bindFileTypes"] && in_array($info["source"], [3, 4, 5])) {
                 $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
                 $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
                 $whr[] = ["must", "=", 1];
                 $whr[] = ["must", "=", 1];
             }
             }
@@ -372,7 +372,7 @@ class Talent extends EnterpriseController {
                 exit;
                 exit;
             }
             }
             $isMatchZhiren = $info["isImport"] && $params["isMatchZhiren"] == 1 ? true : false;
             $isMatchZhiren = $info["isImport"] && $params["isMatchZhiren"] == 1 ? true : false;
-            if ($condition_info["bindFileTypes"] && $info["source"] == 5 && !$isMatchZhiren) {
+            if ($condition_info["bindFileTypes"] && in_array($info["source"], [3, 4, 5]) && !$isMatchZhiren) {
                 $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
                 $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
                 $whr[] = ["must", "=", 1];
                 $whr[] = ["must", "=", 1];
             }
             }

+ 2 - 1
public/static/modular/gate/talentInfo/new_talentInfo_info.js

@@ -576,8 +576,9 @@ TalentInfoInfoDlg.ajaxGetConditionFile = function (source) {
             } else {
             } else {
                 TalentInfoInfoDlg.isSalary = false;
                 TalentInfoInfoDlg.isSalary = false;
             }
             }
+            var needFileSourceType = ["3", "4", "5"];
             var isMatchZhiren = $("input[name=isMatchZhiren]").length > 0 ? parseInt($("input[name=isMatchZhiren]:checked").val()) : false;
             var isMatchZhiren = $("input[name=isMatchZhiren]").length > 0 ? parseInt($("input[name=isMatchZhiren]:checked").val()) : false;
-            if (source != "5" || isMatchZhiren == 1) {
+            if (needFileSourceType.indexOf(source) == -1 || isMatchZhiren == 1) {
                 return;
                 return;
             }
             }
             var conditionFileTable = $("#talent_condition").parents(".table").find(".fileTable");
             var conditionFileTable = $("#talent_condition").parents(".table").find(".fileTable");