sugangqiang 2 ani în urmă
părinte
comite
e9e7bfbc11

+ 1 - 0
app/admin/controller/EnterpriseChangeRecord.php

@@ -469,6 +469,7 @@ class EnterpriseChangeRecord extends AdminController {
             $ep = EnterpriseApi::getOne($ecr['mainId']);
             $ep->name = $ecr['newName'];
             $ep->idCard = $ecr['newIdCard'];
+            $ep->agencyType = $ecr['newAgencyType'];
             $ep->enterpriseTag = $ecr['newEnterpriseTag'];
             $ep->street = $ecr['newStreet'];
             $ep->address = $ecr['newAddress'];

+ 21 - 8
app/common.php

@@ -318,20 +318,33 @@ function isImage($filename) {
 }
 
 function chkEnterpriseFull($ep) {
-    if ($ep["type"] == 1) {
-        $checkEnterpriseFullFields = ["industryFieldNew", "enterpriseType", "bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "domainImg", "beian"];
-        if (in_array($ep["enterpriseType"], ['guishang', 'gaoxinjishu', 'zhuanjingtexin'])) {
-            $checkEnterpriseFullFields[] = "typeImg";
-        }
-    } else {
-        $checkEnterpriseFullFields = ["bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+    switch ($ep->special) {
+        case 0:
+            if ($ep["type"] == 1) {
+                $checkEnterpriseFullFields = ["agencyType", "enterpriseTag", "enterpriseType", "bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+                if ($ep["agencyType"] == 1) {
+                    $checkEnterpriseFullFields[] = ["industryFieldNew", "industryFieldOld", "domainImg"];
+                }
+                if (in_array($ep["enterpriseType"], ['guishang', 'gaoxinjishu', 'zhuanjingtexin'])) {
+                    $checkEnterpriseFullFields[] = "typeImg";
+                }
+            } else {
+                $checkEnterpriseFullFields = ["bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+            }
+            break;
+        case 1:
+            $checkEnterpriseFullFields = ["institutionTag"];
+            break;
+        case 3:
+            $checkEnterpriseFullFields = ["organizationTag"];
+            break;
     }
     $errorCounts = 0;
     while ($chk = array_shift($checkEnterpriseFullFields)) {
         if ($ep[$chk] == null)
             $errorCounts++;
     }
-    if ($ep->special == 0 && $errorCounts > 0) {
+    if ($errorCounts > 0) {
         echo sprintf("<script>"
                 . "parent.layer.confirm('系统升级,您的资料需要同步更新,请移步机构用户中心进行修改【机构信息变更】。',"
                 . "function(){"

+ 21 - 8
app/enterprise/controller/Index.php

@@ -20,20 +20,33 @@ class Index extends EnterpriseController {
             "avatar" => $this->user["avatar"]
         ];
         $ep = \app\common\api\EnterpriseApi::getOne($this->user["uid"]);
-        if ($ep["type"] == 1) {
-            $checkEnterpriseFullFields = ["industryFieldNew", "enterpriseType", "bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "domainImg", "beian"];
-            if (in_array($ep["enterpriseType"], ['guishang', 'gaoxinjishu', 'zhuanjingtexin'])) {
-                $checkEnterpriseFullFields[] = "typeImg";
-            }
-        } else {
-            $checkEnterpriseFullFields = ["bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+        switch ($ep["special"]) {
+            case 0:
+                if ($ep["type"] == 1) {
+                    $checkEnterpriseFullFields = ["agencyType", "enterpriseTag", "enterpriseType", "bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+                    if ($ep["agencyType"] == 1) {
+                        $checkEnterpriseFullFields[] = ["industryFieldNew", "industryFieldOld", "domainImg"];
+                    }
+                    if (in_array($ep["enterpriseType"], ['guishang', 'gaoxinjishu', 'zhuanjingtexin'])) {
+                        $checkEnterpriseFullFields[] = "typeImg";
+                    }
+                } else {
+                    $checkEnterpriseFullFields = ["bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+                }
+                break;
+            case 1:
+                $checkEnterpriseFullFields = ["institutionTag"];
+                break;
+            case 3:
+                $checkEnterpriseFullFields = ["organizationTag"];
+                break;
         }
         $errorCounts = 0;
         while ($chk = array_shift($checkEnterpriseFullFields)) {
             if ($ep[$chk] == null)
                 $errorCounts++;
         }
-        $vars["isEnterpriseFull"] = $ep["special"] == 0 && $errorCounts > 0 ? 0 : 1;
+        $vars["isEnterpriseFull"] = $errorCounts > 0 ? 0 : 1;
         $menus = \app\common\api\MenuApi::getEnterpriseMenuByType($this->user["type"]);
         $vars["menus"] = $menus;
         return view("", $vars);