sugangqiang 2 年之前
父節點
當前提交
a632c3d516

+ 6 - 2
app/admin/controller/Talent.php

@@ -48,12 +48,12 @@ class Talent extends AdminController {
             $data["id"] = $id;
             if ($ti["checkState"] == TalentState::FST_SUBMIT) {
                 $data["checkState"] = TalentState::BASE_VERIFY_FAIL;
-                TalentLogApi::write(1, $id, [TalentState::BASE_VERIFY_FAIL], $msg, 1);
+                TalentLogApi::write(1, $id, TalentState::BASE_VERIFY_FAIL, $msg, 1);
                 TalentModel::update($data);
                 $counts++;
             } else if ($ti["checkState"] == TalentState::SCND_SAVE) {
                 $data["checkState"] = TalentState::FST_VERIFY_FAIL;
-                TalentLogApi::write(1, $id, [TalentState::FST_VERIFY_FAIL], $msg, 1);
+                TalentLogApi::write(1, $id, TalentState::FST_VERIFY_FAIL, $msg, 1);
                 TalentModel::update($data);
                 $counts++;
             } else {
@@ -599,6 +599,10 @@ class Talent extends AdminController {
         }
     }
 
+    public function findFieldsAndFiles() {
+        
+    }
+
     public function commonExport() {
         $params = $this->request->param();
         $fields = $params["export"];

+ 6 - 0
app/common/api/DictApi.php

@@ -227,6 +227,12 @@ class DictApi {
     public static function getTalentInfoStateName($state, $step = 0, $needDeptVerify = false) {
         $str = "";
         switch ($state) {
+            case -2:
+                $str = '<span class="label label-danger">初审审核失败</span>';
+                break;
+            case -1:
+                $str = '<span class="label label-danger">基础信息审核失败</span>';
+                break;
             case 1:
                 $str = '<span class="label">待提交基本资料</span>';
                 break;

+ 3 - 6
app/common/api/VerifyApi.php

@@ -118,11 +118,10 @@ class VerifyApi {
                         ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
                         ->where($where)
                         ->whereRaw("find_in_set(:companyId,companyIds)", ["companyId" => $companyId])
-                        ->field("ti.*,e.agentName,e.type as enterprise_type,enterpriseTag")
+                        ->field("ti.*,e.name as enterprise_name,e.type as enterprise_type,enterpriseTag")
                         ->limit($offset, $limit)->order("ti.createTime " . $order)
                         ->select()->toArray();
         foreach ($list as &$item) {
-            $item["enterprise_name"] = $item["agentName"];
             $item["talent_type"] = $item["enterprise_type"] == 1 ? "晋江优秀人才" : "集成电路优秀人才";
             $item["enterprise_tag"] = $enterprise_tag_kvs[$item["enterpriseTag"]];
         }unset($item);
@@ -160,9 +159,8 @@ class VerifyApi {
         $enterprise_tag_kvs = DictApi::selectByParentCode("enterprise_tag");
         $count = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")->where($where)->count();
         $list = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
-                        ->where($where)->limit($offset, $limit)->order("ti.createTime " . $order)->field("ti.*,e.agentName,e.type as enterprise_type,enterpriseTag")->select()->toArray();
+                        ->where($where)->limit($offset, $limit)->order("ti.createTime " . $order)->field("ti.*,e.name as enterprise_name,e.type as enterprise_type,enterpriseTag")->select()->toArray();
         foreach ($list as &$item) {
-            $item["enterprise_name"] = $item["agentName"];
             $item["talent_type"] = $item["enterprise_type"] == 1 ? "晋江优秀人才" : "集成电路优秀人才";
             $item["enterprise_tag"] = $enterprise_tag_kvs[$item["enterpriseTag"]];
         }unset($item);
@@ -200,9 +198,8 @@ class VerifyApi {
         $enterprise_tag_kvs = DictApi::selectByParentCode("enterprise_tag");
         $count = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")->where($where)->count();
         $list = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
-                        ->where($where)->limit($offset, $limit)->order("ti.createTime " . $order)->field("ti.*,e.agentName,e.type as enterprise_type,enterpriseTag")->select()->toArray();
+                        ->where($where)->limit($offset, $limit)->order("ti.createTime " . $order)->field("ti.*,e.name as enterprise_name,e.type as enterprise_type,enterpriseTag")->select()->toArray();
         foreach ($list as &$item) {
-            $item["enterprise_name"] = $item["agentName"];
             $item["talent_type"] = $item["enterprise_type"] == 1 ? "晋江优秀人才" : "集成电路优秀人才";
             $item["enterprise_tag"] = $enterprise_tag_kvs[$item["enterpriseTag"]];
             $item["talentArrangeName"] = $talent_arrange_kvs[$item["talent_arrange"]];

+ 4 - 2
app/enterprise/controller/Base.php

@@ -149,7 +149,8 @@ class Base extends EnterpriseController {
             if ($files) {
                 $whr[] = ["typeId", "in", $ft_ids];
                 $whr[] = ["id", "in", $files];
-                $upload_type_counts = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->count();
+                $distinct_filetypes = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->select();
+                $upload_type_counts = count($distinct_filetypes);
             }
             if ($upload_type_counts != count($ft_ids)) {
                 $res = ["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"];
@@ -239,7 +240,8 @@ class Base extends EnterpriseController {
             if ($ft_ids) {
                 $whr[] = ["typeId", "in", $ft_ids];
                 $whr[] = ["mainId", "=", $id];
-                $upload_type_counts = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->count();
+                $distinct_filetypes = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->select();
+                $upload_type_counts = count($distinct_filetypes);
             }
             if ($upload_type_counts != count($ft_ids)) {
                 return json(["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"]);

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

@@ -135,7 +135,8 @@ class Talent extends EnterpriseController {
             $whr = [];
             $whr[] = ["typeId", "in", $ft_ids];
             $whr[] = ["mainId", "=", $id];
-            $upload_type_counts = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->count();
+            $distinct_filetypes = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->select();
+            $upload_type_counts = count($distinct_filetypes);
 
             if ($upload_type_counts != count($ft_ids)) {
                 $res = ["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"];
@@ -203,7 +204,8 @@ class Talent extends EnterpriseController {
             $whr = [];
             $whr[] = ["typeId", "in", $ft_ids];
             $whr[] = ["mainId", "=", $id];
-            $upload_type_counts = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->count();
+            $distinct_filetypes = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->select();
+            $upload_type_counts = count($distinct_filetypes);
 
             if ($upload_type_counts != count($ft_ids)) {
                 return json(["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"]);

+ 2 - 2
public/static/modular/talentIdentify/talentInfo/talentInfo_base.js

@@ -162,7 +162,7 @@ TalentInfo.openTalentInfoDetail = function () {
  */
 TalentInfo.updateFieldsAndFiles = function () {
     if (this.check()) {
-        var ajax = new $ax(Feng.ctxPath + "/talentInfo/findFieldsAndFiles?id=" + TalentInfo.seItem.id, function (data) {
+        var ajax = new $ax("/admin/talent/findFieldsAndFiles?id=" + TalentInfo.seItem.id, function (data) {
             var obj = data.obj.obj;
             if (data.code == 200) {
                 layer.open({
@@ -238,7 +238,7 @@ TalentInfo.submitFieldsAndFiles = function (index, id) {
         Feng.info("请选择可修改的字段或附件!");
         return;
     }
-    var ajax = new $ax(Feng.ctxPath + "/talentInfo/updateFieldsAndFiles", function (data) {
+    var ajax = new $ax("/admin/talent/updateFieldsAndFiles", function (data) {
         if (data.code == 200) {
             layer.close(index);
             Feng.success(data.msg);