Browse Source

Merge remote-tracking branch 'origin/master'

sandm 2 năm trước cách đây
mục cha
commit
06ffccfff8

+ 42 - 20
app/admin/controller/Enterprise.php

@@ -12,12 +12,13 @@ use app\common\api\TalentState;
 use app\common\api\CompanyApi;
 use think\facade\Db;
 
+/**
+ * 企业审核
+ * checkState 1:用户提交 [2:审核驳回 3:审核通过] 4:重新提交 [5:初审驳回 6:初审通过]
+ */
 class Enterprise extends AdminController {
 
     public function gotoEnterprisePage() {
-
-
-
         return view("", []);
     }
 
@@ -47,6 +48,12 @@ class Enterprise extends AdminController {
             case 4:
                 $ep['checkStateName'] = "重新提交";
                 break;
+            case 5:
+                $ep['checkStateName'] = "初审驳回";
+                break;
+            case 6:
+                $ep['checkStateName'] = "初审通过";
+                break;
         }
         //-------设置账号状态----------------------------------------------------
         switch ($ep['active']) {
@@ -213,7 +220,13 @@ class Enterprise extends AdminController {
         if (!$ep) {
             return json(["msg" => '无此企业!']);
         }
-        if (!in_array($ep["checkState"], [1, 4]))
+
+        $oriCheckState = $ep["checkState"];
+        if ($oriCheckState == 6 && !EnterpriseApi::chkUserInSuperusers()) {
+            return json(["msg" => "已经流转到审核,不在审核范围内"]);
+        }
+
+        if (!in_array($ep["checkState"], [1, 4, 6]))
             return json(["msg" => "不在审核范围内"]);
         $checkState = $this->request['checkState'];
         if ($checkState == null || ($checkState != 2 && $checkState != 3)) {
@@ -240,10 +253,15 @@ class Enterprise extends AdminController {
                 $fields = null;
                 $files = null;
             }
+            if ($oriCheckState == 6 || $ep["type"] == 2) {
+                $newCheckState = $checkState;
+            } else {
+                $newCheckState = $checkState == 3 ? 6 : 5;
+            }
             if ($doSubmit) {
                 $checkData = [
                     'id' => $id,
-                    'checkState' => $checkState,
+                    'checkState' => $newCheckState,
                     'checkMsg' => $checkMsg,
                     'modify_fields' => $fields ? implode(",", $fields) : null,
                     'modify_files' => $files ? implode(",", $files) : null,
@@ -271,23 +289,24 @@ class Enterprise extends AdminController {
                 if ($checkState == 2) {
                     $record_data['templateCode'] = "【晋江市人才服务平台】您好!您提交的晋江市现代产业体系人才机构注册信息因信息填写错误或上传不完整已被退回,请及时登录“晋江市人才综合服务申报平台”根据审核意见修改并重新提交。退订回复TD。";
                 }
-                if ($checkState == 3) {
+                if ($newCheckState == 3) {
                     $record_data['templateCode'] = "【晋江市人才服务平台】您好!您提交的晋江市现代产业体系人才机构注册信息已审核通过,可登录“晋江市人才综合服务申报平台”做相关事宜申报。退订回复TD。";
                 }
 
-                $smsapi = new ChuanglanSmsApi();
+                if ($newCheckState == 3 || $checkState == 2) {
+                    $smsapi = new ChuanglanSmsApi();
 
-                $result = $smsapi->sendSMS($ep['agentPhone'], $record_data['templateCode']);
-
-                MessageRecord::create($record_data);
+                    $result = $smsapi->sendSMS($ep['agentPhone'], $record_data['templateCode']);
 
+                    MessageRecord::create($record_data);
+                }
                 if ($lastLog["active"] === 0) {
                     TalentChecklog::update([
                         'id' => $lastLog["id"],
                         'active' => 1,
-                        'state' => $checkState,
+                        'state' => $newCheckState,
                         'step' => 101,
-                        'stateChange' => TalentState::stateEnum($checkState),
+                        'stateChange' => TalentState::stateEnum($newCheckState),
                         'description' => $checkMsg,
                         'updateTime' => date("Y-m-d H:i:s", time()),
                         'updateUser' => session('user')['name'] . "({$companyName})"
@@ -299,9 +318,9 @@ class Enterprise extends AdminController {
                         'type' => 10,
                         'typeField' => null,
                         'active' => 1,
-                        'state' => $checkState,
+                        'state' => $newCheckState,
                         'step' => 101,
-                        'stateChange' => TalentState::stateEnum($checkState),
+                        'stateChange' => TalentState::stateEnum($newCheckState),
                         'description' => $checkMsg,
                         'createTime' => date("Y-m-d H:i:s", time()),
                         'createUser' => session('user')['name'] . "({$companyName})"
@@ -323,9 +342,9 @@ class Enterprise extends AdminController {
                 if ($lastLog["active"] === 0) {
                     TalentChecklog::update([
                         'id' => $lastLog["id"],
-                        'state' => $checkState,
+                        'state' => $newCheckState,
                         'step' => 101,
-                        'stateChange' => TalentState::stateEnum($checkState),
+                        'stateChange' => TalentState::stateEnum($newCheckState),
                         'description' => $checkMsg,
                         'updateTime' => date("Y-m-d H:i:s", time()),
                         'updateUser' => session('user')['name'] . "({$companyName})"
@@ -337,7 +356,7 @@ class Enterprise extends AdminController {
                         'type' => 10,
                         'typeField' => null,
                         'active' => 0,
-                        'state' => $checkState,
+                        'state' => $newCheckState,
                         'step' => 101,
                         'stateChange' => TalentState::stateEnum($checkState),
                         'description' => $checkMsg,
@@ -444,7 +463,7 @@ class Enterprise extends AdminController {
 
         $exportDatas = [];
         if ($res["rows"]) {
-            $stateMaps = [1 => "未审核", 2 => "审核驳回", 3 => "审核通过", 4 => "重新提交"];
+            $stateMaps = [1 => "未审核", 2 => "审核驳回", 3 => "审核通过", 4 => "重新提交", 5 => "初审驳回", 6 => "初审通过"];
             $activeMaps = [1 => "账号有效", 2 => "拉黑/冻结"];
             foreach ($rows as $row) {
                 $exportDatas[] = [
@@ -515,12 +534,15 @@ class Enterprise extends AdminController {
             if (!$ep) {
                 throw new \think\Exception("没有对应的企业信息");
             }
-            if ($ep["checkState"] != 2) {
+            if (!in_array($ep["checkState"], [2, 5])) {
                 throw new \think\Exception("不是驳回状态,不能修改驳回字段!");
             }
+            if ($ep["checkState"] == 2 && !EnterpriseApi::chkUserInSuperusers()) {
+                throw new \think\Exception("已经流转到审核,不在审核范围内");
+            }
             $fields = array_filter(explode(",", $params["fields"]));
             $files = array_filter(explode(",", $params["files"]));
-            if (!$fields || !$files)
+            if (!$fields && !$files)
                 throw new \think\Exception("请选择要驳回的字段或附件!");
             $data["id"] = $id;
             $data["modify_fields"] = $fields ? implode(",", $fields) : null;

+ 89 - 63
app/admin/controller/EnterpriseChangeRecord.php

@@ -13,6 +13,10 @@ use app\common\model\MessageRecord;
 use app\common\model\TalentChecklog;
 use app\common\model\TalentCommonFile;
 
+/**
+ * 企业变更审核
+ * checkState 1:用户保存 2:用户提交 [3:审核驳回 4:审核通过] 5:重新提交 [6:初审驳回 7:初审通过]
+ */
 class EnterpriseChangeRecord extends AdminController {
 
     private $compatible_time = "2022-10-15 23:59:59";
@@ -64,6 +68,12 @@ class EnterpriseChangeRecord extends AdminController {
             case 5:
                 $ecr['checkStateName'] = '重新提交';
                 break;
+            case 6:
+                $ecr['checkStateName'] = '初审驳回';
+                break;
+            case 7:
+                $ecr['checkStateName'] = '初审通过';
+                break;
             default:
                 $ecr['checkStateName'] = '';
                 break;
@@ -396,6 +406,12 @@ class EnterpriseChangeRecord extends AdminController {
         if (!$ecr) {
             return json(["msg" => '原始数据不存在!', 'code' => 500]);
         }
+
+        $oriCheckState = $ecr["checkState"];
+        if ($oriCheckState == 7 && !EnterpriseApi::chkUserInSuperusers()) {
+            return json(["msg" => "已经流转到审核,不在审核范围内"]);
+        }
+
         $checkState = trim($this->request['checkState']);
         $files = $this->request["files"];
         $fields = $this->request["fields"];
@@ -413,7 +429,7 @@ class EnterpriseChangeRecord extends AdminController {
         if (\StrUtil::isNotEmpAndNull($checkMsg) && strlen($checkMsg) > 1000) {
             return json(["msg" => '审核意见最多1000个字符!', 'code' => 500]);
         }
-        if ($ecr['checkState'] != 2 && $ecr['checkState'] != 3 && $ecr['checkState'] != 5) {
+        if ($ecr['checkState'] != 2 && $ecr['checkState'] != 5 && $ecr['checkState'] != 7) {
             return json(["msg" => '不在审核范围内!', 'code' => 500]);
         }
         $lastLog = \app\common\api\TalentLogApi::getLastLog($id, 10);
@@ -422,11 +438,17 @@ class EnterpriseChangeRecord extends AdminController {
             $fields = null;
             $files = null;
         }
-        $stateChangeStr = $checkState == 4 ? "<span class='label label-info'>审核通过</span>" : "<span class='label label-info'>审核驳回</span>";
+        if ($oriCheckState == 7 || $ecr["type"] == 2) {
+            $stateChangeStr = $checkState == 4 ? "<span class='label label-info'>审核通过</span>" : "<span class='label label-danger'>审核驳回</span>";
+            $newCheckState = $checkState;
+        } else {
+            $stateChangeStr = $checkState == 4 ? "<span class='label label-info'>初审通过</span>" : "<span class='label label-danger'>初审驳回</span>";
+            $newCheckState = $checkState == 4 ? 7 : 6;
+        }
         if ($doSubmit) {
             //如果为审核驳回,更新表中的审核状态 和 审核意见, 直接返回结果
             if ($checkState == 3) {
-                $ecr->checkState = 3;
+                $ecr->checkState = $newCheckState;
                 $ecr->checkMsg = $checkMsg;
                 $ecr->updateUser = session('user')['uid'];
                 $ecr->updateTime = date("Y-m-d H:i:s");
@@ -459,7 +481,7 @@ class EnterpriseChangeRecord extends AdminController {
                     TalentChecklog::update([
                         'id' => $lastLog["id"],
                         'active' => 1,
-                        'state' => 3,
+                        'state' => $newCheckState,
                         'stateChange' => $stateChangeStr,
                         'description' => $checkMsg,
                         'updateTime' => date("Y-m-d H:i:s", time()),
@@ -473,7 +495,7 @@ class EnterpriseChangeRecord extends AdminController {
                         'type' => 10,
                         'typeField' => null,
                         'active' => 1,
-                        'state' => 3,
+                        'state' => $newCheckState,
                         'step' => 101,
                         'stateChange' => $stateChangeStr,
                         'description' => $checkMsg,
@@ -483,69 +505,70 @@ class EnterpriseChangeRecord extends AdminController {
                 }
                 return json(["msg" => '操作成功!', "code" => 200]);
             } else {
-                $ecr->checkState = 4;
+                $ecr->checkState = $newCheckState;
                 $ecr->checkMsg = $checkMsg;
                 $ecr->updateUser = session('user')['uid'];
                 $ecr->updateTime = date("Y-m-d H:i:s");
                 $ecr->modify_fields = null;
                 $ecr->modify_files = null;
                 $ecr->save();
-
-                $ep = EnterpriseApi::getOne($ecr['mainId']);
-                $ep->name = $ecr['newName'];
-                $ep->idCard = $ecr['newIdCard'];
-                $ep->agencyType = $ecr['newAgencyType'];
-                $ep->enterpriseTag = $ecr['newEnterpriseTag'];
-                $ep->organizationTag = $ecr['newOrganizationTag'];
-                $ep->institutionTag = $ecr['newInstitutionTag'];
-                $ep->street = $ecr['newStreet'];
-                $ep->address = $ecr['newAddress'];
-                $ep->legal = $ecr['newLegal'];
-                $ep->ephone = $ecr['newEphone'];
-                $ep->agentName = $ecr['newAgentName'];
-                $ep->agentEmail = $ecr['newAgentEmail'];
-                $ep->agentPhone = $ecr['newAgentPhone'];
-                $ep->industryFieldNew = $ecr['newIndustryFieldNew'];
-                $ep->industryFieldOld = $ecr['newIndustryFieldOld'];
-                $ep->enterpriseType = $ecr['newEnterpriseType'];
-                $ep->bankCard = $ecr['newBankCard'];
-                $ep->bankNetwork = $ecr['newBankNetwork'];
-                $ep->bank = $ecr['newBank'];
-                $ep->updateUser = session('user')['uid'];
-                $ep->updateTime = date("Y-m-d H:i:s");
-                $ep->imgurl = $ecr['newImgurl'] ?: $ep->imgurl;
-                $ep->bankImg = $ecr['newBankImg'] ?: $ep->bankImg;
-                $ep->domainImg = $ecr['newDomainImg'] ?: $ep->domainImg;
-                $ep->typeImg = $ecr['newTypeImg'];
-                $ep->beian = $ecr['newBeian'] ?: $ep->beian;
-                //同步人才库与津贴库  TODO
-                $ep->save();
-                //发送短信
-                $record_data = [
-                    'id' => getStringId(),
-                    'bizId' => getStringId(),
-                    'userId' => $ecr['mainId'],
-                    'type' => 2,
-                    'smsType' => 2,
-                    'name' => $ecr['newName'],
-                    'phone' => $ecr['newAgentPhone'],
-                    'templateCode' => "【晋江市人才服务平台】您好!您提交申请的现代产业体系人才{$checkMsg}已审核通过,可登录申报系统做相关事宜申报。",
-                    'params' => '机构信息变更',
-                    'state' => 1,
-                    'sendingDate' => date("Y-m-d H:i:s", time()),
-                    'createTime' => date("Y-m-d H:i:s", time())
-                ];
-
-                $smsapi = new ChuanglanSmsApi();
-
-                $result = $smsapi->sendSMS($ecr['newAgentPhone'], $record_data['templateCode']);
-
-                MessageRecord::create($record_data);
+                if ($newCheckState == 4) {
+                    $ep = EnterpriseApi::getOne($ecr['mainId']);
+                    $ep->name = $ecr['newName'];
+                    $ep->idCard = $ecr['newIdCard'];
+                    $ep->agencyType = $ecr['newAgencyType'];
+                    $ep->enterpriseTag = $ecr['newEnterpriseTag'];
+                    $ep->organizationTag = $ecr['newOrganizationTag'];
+                    $ep->institutionTag = $ecr['newInstitutionTag'];
+                    $ep->street = $ecr['newStreet'];
+                    $ep->address = $ecr['newAddress'];
+                    $ep->legal = $ecr['newLegal'];
+                    $ep->ephone = $ecr['newEphone'];
+                    $ep->agentName = $ecr['newAgentName'];
+                    $ep->agentEmail = $ecr['newAgentEmail'];
+                    $ep->agentPhone = $ecr['newAgentPhone'];
+                    $ep->industryFieldNew = $ecr['newIndustryFieldNew'];
+                    $ep->industryFieldOld = $ecr['newIndustryFieldOld'];
+                    $ep->enterpriseType = $ecr['newEnterpriseType'];
+                    $ep->bankCard = $ecr['newBankCard'];
+                    $ep->bankNetwork = $ecr['newBankNetwork'];
+                    $ep->bank = $ecr['newBank'];
+                    $ep->updateUser = session('user')['uid'];
+                    $ep->updateTime = date("Y-m-d H:i:s");
+                    $ep->imgurl = $ecr['newImgurl'] ?: $ep->imgurl;
+                    $ep->bankImg = $ecr['newBankImg'] ?: $ep->bankImg;
+                    $ep->domainImg = $ecr['newDomainImg'] ?: $ep->domainImg;
+                    $ep->typeImg = $ecr['newTypeImg'];
+                    $ep->beian = $ecr['newBeian'] ?: $ep->beian;
+                    //同步人才库与津贴库  TODO
+                    $ep->save();
+                    //发送短信
+                    $record_data = [
+                        'id' => getStringId(),
+                        'bizId' => getStringId(),
+                        'userId' => $ecr['mainId'],
+                        'type' => 2,
+                        'smsType' => 2,
+                        'name' => $ecr['newName'],
+                        'phone' => $ecr['newAgentPhone'],
+                        'templateCode' => "【晋江市人才服务平台】您好!您提交申请的现代产业体系人才{$checkMsg}已审核通过,可登录申报系统做相关事宜申报。",
+                        'params' => '机构信息变更',
+                        'state' => 1,
+                        'sendingDate' => date("Y-m-d H:i:s", time()),
+                        'createTime' => date("Y-m-d H:i:s", time())
+                    ];
+
+                    $smsapi = new ChuanglanSmsApi();
+
+                    $result = $smsapi->sendSMS($ecr['newAgentPhone'], $record_data['templateCode']);
+
+                    MessageRecord::create($record_data);
+                }
                 if ($lastLog["active"] === 0 && $lastLog["category"] == "enterprise_change") {
                     TalentChecklog::update([
                         'id' => $lastLog["id"],
                         'active' => 1,
-                        'state' => 4,
+                        'state' => $newCheckState,
                         'stateChange' => $stateChangeStr,
                         'description' => $checkMsg,
                         'updateTime' => date("Y-m-d H:i:s", time()),
@@ -559,7 +582,7 @@ class EnterpriseChangeRecord extends AdminController {
                         'type' => 10,
                         'typeField' => null,
                         'active' => 1,
-                        'state' => 4,
+                        'state' => $newCheckState,
                         'step' => 101,
                         'stateChange' => $stateChangeStr,
                         'description' => $checkMsg,
@@ -580,7 +603,7 @@ class EnterpriseChangeRecord extends AdminController {
             if ($lastLog["active"] === 0 && $lastLog["category"] == "enterprise_change") {
                 TalentChecklog::update([
                     'id' => $lastLog["id"],
-                    'state' => $checkState,
+                    'state' => $newCheckState,
                     'stateChange' => $stateChangeStr,
                     'description' => $checkMsg,
                     'updateTime' => date("Y-m-d H:i:s", time()),
@@ -594,7 +617,7 @@ class EnterpriseChangeRecord extends AdminController {
                     'type' => 10,
                     'typeField' => null,
                     'active' => 0,
-                    'state' => $checkState,
+                    'state' => $newCheckState,
                     'step' => 101,
                     'stateChange' => $stateChangeStr,
                     'description' => $checkMsg,
@@ -709,12 +732,15 @@ class EnterpriseChangeRecord extends AdminController {
             if (!$ecr) {
                 throw new \think\Exception("没有对应的企业变更信息");
             }
-            if ($ecr["checkState"] != 3) {
+            if (!in_array($ecr["checkState"], [3, 6])) {
                 throw new \think\Exception("不是驳回状态,不能修改驳回字段!");
             }
+            if ($ecr["checkState"] == 3 && !EnterpriseApi::chkUserInSuperusers()) {
+                throw new \think\Exception("已经流转到审核,不在审核范围内");
+            }
             $fields = array_filter(explode(",", $params["fields"]));
             $files = array_filter(explode(",", $params["files"]));
-            if (!$fields || !$files)
+            if (!$fields && !$files)
                 throw new \think\Exception("请选择要驳回的字段或附件!");
             $data["id"] = $id;
             $data["modify_fields"] = $fields ? implode(",", $fields) : null;

+ 4 - 4
app/admin/view/enterprise/goto_examine_page.html

@@ -53,10 +53,10 @@
                     <div class="rowGroup"  style="margin-bottom: 0px;">
                         <label class="col-sm-2 control-label"><span class="text-danger">*</span>审核状态</label>
                         <div class="col-sm-10">
-                            <select class="form-control" id="checkState" name="checkState" onchange="EpExam.toggleField()">
+                            <select class="form-control" id="checkState" name="checkState" onchange="EpExam.toggleField()" data-val='{$ep.checkState}'>
                                 <option value="">--- 请选择 ---</option>
-                                <option value="2" {eq name="ep.checkState" value="2"}selected{/eq}>审核驳回</option>
-                                <option value="3" {eq name="ep.checkState" value="3"}selected{/eq}>审核通过</option>
+                                <option value="2" {in name="ep.checkState" value="2,5"}selected{/in}>审核驳回</option>
+                                <option value="3" {in name="ep.checkState" value="3,6"}selected{/in}>审核通过</option>
                             </select>
                         </div>
                     </div>
@@ -73,7 +73,7 @@
                     </div>
                 </div>
             </div>
-            <div id="field" {neq name="ep.checkState" value="2"}style="padding-top:5px;display:none"{/neq}>
+            <div id="field" {if condition="!in_array($ep['checkState'],[2,5])"}style="padding-top:5px;display:none"{/if}>
                 <label for="checkMsg" class="control-label">可修改字段</label>
                 <div id="field_info">
                     <ul style="overflow:hidden;list-style:none;">

+ 4 - 4
app/admin/view/enterprise_change_record/goto_enterprise_change_examine_page.html

@@ -10,10 +10,10 @@
                         <div class="rowGroup"  style="margin-bottom: 0px;">
                             <label class="col-sm-2 control-label"><span class="text-danger">*</span>审核状态</label>
                             <div class="col-sm-10">
-                                <select class="form-control" id="checkState" name="checkState" onchange="examine.toggleField()" >
+                                <select class="form-control" id="checkState" name="checkState" onchange="examine.toggleField()">
                                     <option value="">--- 请选择 ---</option>
-                                    <option value="3" {eq name="ecr.checkState" value="3"}selected{/eq}>审核驳回</option>
-                                    <option value="4" {eq name="ecr.checkState" value="4"}selected{/eq}>审核通过</option>
+                                    <option value="3" {in name="ecr.checkState" value="3,6"}selected{/in}>审核驳回</option>
+                                    <option value="4" {in name="ecr.checkState" value="4,7"}selected{/in}>审核通过</option>
                                 </select>
                             </div>
                         </div>
@@ -30,7 +30,7 @@
                         </div>
                     </div>
                 </div>
-                <div id="field" {neq name="ecr.checkState" value="3"}style="padding-top:5px;display:none"{/neq}>
+                <div id="field" {if condition="!in_array($ecr['checkState'],[3,6])"}style="padding-top:5px;display:none"{/if}>
                     <label for="checkMsg" class="control-label">可修改字段</label>
                     <div id="field_info">
                         <ul style="overflow:hidden;list-style:none;">

+ 9 - 3
app/common/api/EnterpriseApi.php

@@ -510,14 +510,20 @@ class EnterpriseApi {
                         $v['checkStateName'] = '待审核';
                         break;
                     case 3:
-                        $v['checkStateName'] = '审核驳回';
+                        $v['checkStateName'] = "审核驳回";
                         break;
                     case 4:
-                        $v['checkStateName'] = '审核通过';
+                        $v['checkStateName'] = "审核通过";
                         break;
                     case 5:
                         $v['checkStateName'] = '重新提交';
                         break;
+                    case 6:
+                        $v['checkStateName'] = '初审驳回';
+                        break;
+                    case 7:
+                        $v['checkStateName'] = '初审通过';
+                        break;
                 }
             }
         } else {
@@ -539,7 +545,7 @@ class EnterpriseApi {
         return $superusers;
     }
 
-    private static function chkUserInSuperusers() {
+    public static function chkUserInSuperusers() {
         $superusers = self::getSuperusersForEnterprise();
         $account = session("user")["account"];
         return in_array($account, $superusers);

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

@@ -123,6 +123,12 @@ class TalentState {
             case 4:
                 return "<span class='label label-warm'>上级驳回</span>";
                 break;
+            case 5:
+                return "<span class='label label-danger'>初审驳回</span>";
+                break;
+            case 6:
+                return "<span class='label label-primary'>初审通过</span>";
+                break;
             case 8:
                 return "<span class='label label-primary'>提交审核</span>";
                 break;

+ 9 - 4
app/common/api/UserApi.php

@@ -117,17 +117,22 @@ class UserApi {
                 if ($this->info['active'] != 1) {
                     return "账号被冻结, 冻结原因为: {$this->info['activeMsg']}";
                 }
-                if ($this->info['checkState'] == 1 || $this->info['checkState'] == 4) {
+                if ($this->info["checkState"] == 3) {
+                    return false;
+                } else if ($this->info["checkState"] == 6) {
+                    //6是初审状态,待复审
+                    return "您的账号正在审核中,请耐心等待!";
+                } else if (in_array($this->info['checkState'], [1, 4])) {
                     return "账号需要后台管理人员审核通过后才能登陆,请耐心等待!";
-                }
-                if ($this->info['checkState'] == 2) {
+                } else if (in_array($this->info['checkState'], [2, 5])) {
                     $temp = [];
                     $temp['uid'] = $this->info['id'];
                     $temp['msg'] = "账号审核不通过,原因是:{$this->info['checkMsg']}";
                     session('temp', $temp);
                     return "账号审核不通过,原因是:{$this->info['checkMsg']}";
+                } else {
+                    return "账户状态未知,登录失败";
                 }
-                return false;
                 break;
             case 3:
                 return false;

+ 12 - 0
app/common/controller/Api.php

@@ -152,6 +152,12 @@ class Api extends BaseController {
                             case 5:
                                 $new_item["stateName"] = "<span class='label label-warm'>重新提交</span>";
                                 break;
+                            case 6:
+                                $new_item["stateName"] = "<span class='label label-danger'>初审驳回</span>";
+                                break;
+                            case 7:
+                                $new_item["stateName"] = "<span class='label label-primary'>初审通过</span>";
+                                break;
                         }
                         $new_item["stateChange"] = $item['stateChange'];
                     } else {
@@ -182,6 +188,12 @@ class Api extends BaseController {
                             case 4:
                                 $new_item["stateName"] = "<span class='label label-primary'>重新提交</span>";
                                 break;
+                            case 5:
+                                $new_item["stateName"] = "<span class='label label-danger'>初审驳回</span>";
+                                break;
+                            case 6:
+                                $new_item["stateName"] = "<span class='label label-primary'>初审通过</span>";
+                                break;
                             default:
                                 break;
                         }

+ 5 - 3
app/enterprise/controller/Api.php

@@ -175,6 +175,9 @@ class Api extends EnterpriseController {
                 $data['name'] = str_replace(')', ')', $data['name']);
             }
             $ep = Enterprise::where('id', session("user")["uid"])->find();
+            if (!in_array($ep["checkState"], [1, 3, 6])) {
+                throw new ValidateException("审核中,请耐心等待");
+            }
             switch ($ep->special) {
                 case 0:
                     if ($ep->type == 2) {
@@ -542,7 +545,6 @@ class Api extends EnterpriseController {
 
                 $record->updateTime = date("Y-m-d H:i:s");
                 $record->updateUser = session("user")["uid"];
-
                 $record->save();
 
                 $log = [
@@ -731,7 +733,7 @@ class Api extends EnterpriseController {
             return json(['msg' => '提交审核失败,请先填写基础信息', 'code' => 500]);
         }
 
-        if ($obj['checkState'] != 1 && $obj['checkState'] != 3) {
+        if (!in_array($obj["checkState"], [1, 3, 6])) {
             return json(['msg' => '不能重复提交审核', 'code' => 500]);
         }
 
@@ -769,7 +771,7 @@ class Api extends EnterpriseController {
           if (strlen($error_msg) > 0) {
           return json(['msg' => $error_msg, 'code' => 500]);
           } */
-        if ($obj['checkState'] == 3) {
+        if ($obj['checkState'] == 3 || $obj['checkState'] == 6) {
             $obj['checkState'] = 5;
             $state = 5;
         } else {

+ 9 - 2
app/enterprise/view/talent/apply.html

@@ -46,6 +46,11 @@
         word-wrap:break-word;
         word-break:break-all;
     }
+    .word-wrap-no-width{
+        white-space:normal;
+        word-wrap:break-word;
+        word-break:break-all;
+    }
     ul{
         padding: 0;
     }
@@ -63,6 +68,7 @@
         border-left:1px solid #ddd;
     }
     #annual_salary{padding-right:32px;}
+    .zhiren{background-image:linear-gradient(#1f0077,#af68ea);color:#fff;}
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
@@ -493,8 +499,9 @@
                                             <tr>
                                                 <td colspan="4">
                                                     {if condition="$row['isImport']"}
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>是否符合直认条件</label>                                                        
+                                                    <div class="rowGroup col-sm-3 zhiren word-wrap-no-width">
+                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>是否符合直认条件</label>
+                                                        人才直认选项
                                                         <input type="radio" name="isMatchZhiren" value="1" {eq name="row.isMatchZhiren" value="1"}checked{/eq} onchange="TalentInfoInfoDlg.isMatchZhirenChange();"/>是&nbsp;&nbsp;
                                                         <input type="radio" name="isMatchZhiren" value="0" {if condition="!$row['isMatchZhiren']"}checked{/if} onchange="TalentInfoInfoDlg.isMatchZhirenChange();"/>否
                                                     </div>

+ 1 - 2
app/index/controller/Auth.php

@@ -51,7 +51,7 @@ class Auth extends BaseController {
             } else if (session("isCaptcha") == 1 && !captcha_check($captcha)) {
                 $msg = "验证码错误";
             } else if ($res_msg = $user->checkState()) {
-                if ($user->info['checkState'] == 2) {
+                if (in_array($user->info['checkState'], [2, 5])) {
                     return redirect("/common/auth/enterprise_edit");
                 }
                 $msg = $res_msg;
@@ -223,5 +223,4 @@ class Auth extends BaseController {
         }
     }
 
-
 }

+ 1 - 8
public/static/modular/enterprise/enterprise_examine.js

@@ -72,11 +72,4 @@ EpExam.toggleField = function () {
     } else {
         $("#field").css("display", "none");
     }
-}
-
-$(function () {
-    var checkStateTemp = $("#checkStateTemp").val();
-    if (checkStateTemp != null && checkStateTemp != '' && checkStateTemp != 1) {
-        $("#checkState").val(checkStateTemp);
-    }
-});
+}

+ 11 - 1
public/static/modular/enterprise/enterprise_list.js

@@ -46,6 +46,10 @@ Enterprise.initColumn = function () {
                     return "审核通过";
                 } else if (value == 4) {
                     return "重新提交";
+                } else if (value == 5) {
+                    return "初审驳回";
+                } else if (value == 6) {
+                    return "初审通过";
                 }
             },
             cellStyle: function (value, row, index) {
@@ -57,6 +61,12 @@ Enterprise.initColumn = function () {
                     return {css: {'background-color': 'LightGreen'}};
                 } else if (value === 2) {
                     return {css: {"background-color": "Orange"}};
+                } else if (value === 4) {
+                    return {css: {'background-color': 'LightGrey'}};
+                } else if (value === 5) {
+                    return {css: {'background-color': 'Orange'}};
+                } else if (value === 6) {
+                    return {css: {"background-color": "LightBlue"}};
                 } else {
                     return {css: {}};
                 }
@@ -185,7 +195,7 @@ Enterprise.doExamine = function () {
     if (!Enterprise.check()) {
         return;
     }
-    var inCheckList = [1, 4];
+    var inCheckList = [1, 4, 6];
     if (Enterprise.seItem.checkState == null || inCheckList.indexOf(Enterprise.seItem.checkState) == -1) {
         Feng.info("不在审核范围内!");
         return;

+ 1 - 1
public/static/modular/enterprise/enterprisechangeRecord/ep_change_record_detail.js

@@ -2,7 +2,7 @@ var ecre = {};
 
 ecre.doExamine = function () {
     var checkState = $("#checkState").val();
-    if (checkState == null || (checkState != 2 && checkState != 5)) {
+    if (checkState == null || (checkState != 2 && checkState != 5 && checkState != 7)) {
         Feng.info("不在审核范围内!");
         return;
     }

+ 74 - 65
public/static/modular/enterprise/enterprisechangeRecord/ep_change_record_list.js

@@ -1,102 +1,111 @@
 var EpChange = {
-    id: "table",	                                                                //表格id
-    seItem: null,		                                                            //选中的条目
+    id: "table", //表格id
+    seItem: null, //选中的条目
     table: null,
     layerIndex: -1
 };
 
-EpChange.initColumn = function(){
+EpChange.initColumn = function () {
     var type = $("#type").val();
     var isShow = true;
-    if(type==2){
+    if (type == 2) {
         isShow = false;
-    };
-	return [
-		{field: 'selectItem', radio: true},
+    }
+    ;
+    return [
+        {field: 'selectItem', radio: true},
         {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
-        {title: '<span style="color: red">原单位名称</span>', field: 'oldName', align: 'center', width:200, valign: 'middle', 'class': 'uitd_showTip',
+        {title: '<span style="color: red">原单位名称</span>', field: 'oldName', align: 'center', width: 200, valign: 'middle', 'class': 'uitd_showTip',
 
         },
         // {title: '原统一社会信用代码', field: 'oldIdCard', align: 'center', width:160, valign: 'middle', 'class': 'uitd_showTip'},
         // {title: '原法人代表', field: 'oldLegal', align: 'center', width:120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '原所属街道', field: 'oldStreetName', align: 'center', width:120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '原单位标签', field: 'oldEnterpriseTagName',visible: isShow, align: 'center', width:170, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '原产业领域', field: 'oldIndustryFieldNewName',visible: isShow, align: 'center', width:170, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '原所属街道', field: 'oldStreetName', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '原单位标签', field: 'oldEnterpriseTagName', visible: isShow, align: 'center', width: 170, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '原产业领域', field: 'oldIndustryFieldNewName', visible: isShow, align: 'center', width: 170, valign: 'middle', 'class': 'uitd_showTip'},
         // {title: '原单位地址', field: 'oldAddress', align: 'center', width:200, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '<span style="color: red">新单位名称</span>', field: 'newName', align: 'center', width:200, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '<span style="color: red">新单位名称</span>', field: 'newName', align: 'center', width: 200, valign: 'middle', 'class': 'uitd_showTip'},
         // {title: '新统一社会信用代码', field: 'newIdCard', align: 'center', width:160, valign: 'middle', 'class': 'uitd_showTip'},
         // {title: '新法人代表', field: 'newLegal', align: 'center', width:120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '新所属街道', field: 'newStreetName', align: 'center', width:120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '新单位标签', field: 'newEnterpriseTagName',visible: isShow, align: 'center', width:170, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '新产业领域', field: 'newIndustryFieldNewName',visible: isShow, align: 'center', width:170, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '新所属街道', field: 'newStreetName', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '新单位标签', field: 'newEnterpriseTagName', visible: isShow, align: 'center', width: 170, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '新产业领域', field: 'newIndustryFieldNewName', visible: isShow, align: 'center', width: 170, valign: 'middle', 'class': 'uitd_showTip'},
         // {title: '新单位地址', field: 'newAddress', align: 'center', width:200, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '申请时间', field: 'createTime', align: 'center', width:150, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',width:100,
-            formatter : function (value,row,index){
-                return "<span class='label label-success' onclick=\"EpChange.showLog('"+value+"')\" >" +
-                    "<i class=\"fa fa-book\"></i>日志" +
-                    "</span>";
+        {title: '申请时间', field: 'createTime', align: 'center', width: 150, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: 100,
+            formatter: function (value, row, index) {
+                return "<span class='label label-success' onclick=\"EpChange.showLog('" + value + "')\" >" +
+                        "<i class=\"fa fa-book\"></i>日志" +
+                        "</span>";
             }
         },
-        {title: '审核状态', field: 'checkState', align: 'center', width:120, valign: 'middle', 'class': 'uitd_showTip',
-            formatter: function (value, row, index){
-                if (value==null || value==''){
+        {title: '审核状态', field: 'checkState', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip',
+            formatter: function (value, row, index) {
+                if (value == null || value == '') {
                     return "";
-                } else if (value == 1){
+                } else if (value == 1) {
                     return "保存未提交";
-                } else if (value == 2){
+                } else if (value == 2) {
                     return "待审核";
-                } else if (value == 3){
+                } else if (value == 3) {
                     return "审核驳回";
                 } else if (value == 4) {
                     return "审核通过";
                 } else if (value == 5) {
                     return "重新提交";
+                } else if (value == 6) {
+                    return "初审驳回";
+                } else if (value == 7) {
+                    return "初审通过";
                 } else {
                     return "";
                 }
             },
-            cellStyle: function(value, row, index) {
-                if (value==null || value==''){
-                    return {css:{}};
-                } else if (value == 1){
-                    return {css:{}};
-                } else if (value == 2){
-                    return {css:{"background-color":"LightGrey"}};
-                } else if (value == 3){
-                    return {css:{"background-color":"Orange"}};
+            cellStyle: function (value, row, index) {
+                if (value == null || value == '') {
+                    return {css: {}};
+                } else if (value == 1) {
+                    return {css: {}};
+                } else if (value == 2) {
+                    return {css: {"background-color": "LightGrey"}};
+                } else if (value == 3) {
+                    return {css: {"background-color": "Orange"}};
                 } else if (value == 4) {
-                    return {css:{'background-color':'LightGreen'}};
+                    return {css: {'background-color': 'LightGreen'}};
                 } else if (value == 5) {
-                    return {css:{'background-color':'LightGrey'}};
+                    return {css: {'background-color': 'LightGrey'}};
+                } else if (value == 6) {
+                    return {css: {'background-color': 'Orange'}};
+                } else if (value == 7) {
+                    return {css: {'background-color': 'LightBlue'}};
                 } else {
-                    return {css:{}};
+                    return {css: {}};
                 }
             }
         },
-	];
+    ];
 };
 
-EpChange.search = function() {
-	var queryData = {};
-	queryData['oldName'] = $("#oldName").val();
-	queryData['oldIdCard'] = $("#oldIdCard").val();
-	queryData['oldLegal'] = $("#oldLegal").val();
+EpChange.search = function () {
+    var queryData = {};
+    queryData['oldName'] = $("#oldName").val();
+    queryData['oldIdCard'] = $("#oldIdCard").val();
+    queryData['oldLegal'] = $("#oldLegal").val();
     queryData['oldStreet'] = $("#oldStreet").val();
     queryData['oldEnterpriseTag'] = $("#oldEnterpriseTag").val();
     queryData['oldIndustryFieldNew'] = $("#oldIndustryFieldNew").val();
-	queryData['newName'] = $("#newName").val();
-	queryData['newIdCard'] = $("#newIdCard").val();
+    queryData['newName'] = $("#newName").val();
+    queryData['newIdCard'] = $("#newIdCard").val();
     queryData['newAgentName'] = $("#newAgentName").val();
     queryData['newStreet'] = $("#newStreet").val();
     queryData['newEnterpriseTag'] = $("#newEnterpriseTag").val();
     queryData['newIndustryFieldNew'] = $("#newIndustryFieldNew").val();
     queryData['checkState'] = $("#checkState").val();
 
-	EpChange.table.refresh({"query": queryData});	
+    EpChange.table.refresh({"query": queryData});
 };
 
-EpChange.reset = function() {
+EpChange.reset = function () {
     $("#oldName").val("");
     $("#oldIdCard").val("");
     $("#oldLegal").val("");
@@ -114,26 +123,26 @@ EpChange.reset = function() {
 
 EpChange.check = function () {
     var selected = $('#' + EpChange.id).bootstrapTable('getSelections');
-    if(selected.length == 0){
+    if (selected.length == 0) {
         Feng.info("请先选中表格中的某一记录!");
         return false;
-    }else{
-    	EpChange.seItem = selected[0];
+    } else {
+        EpChange.seItem = selected[0];
         return true;
     }
 };
 
-EpChange.gotoEnterpriseChangeDetailPage = function() {
-	if (!EpChange.check()) {
-		return;
-	}
+EpChange.gotoEnterpriseChangeDetailPage = function () {
+    if (!EpChange.check()) {
+        return;
+    }
     var index = layer.open({
         type: 2,
         title: '查看详情',
         area: ['830px', '450px'], //宽高
         fix: false, //不固定
         maxmin: true,
-        content: Feng.ctxPath + '/admin/enterpriseChangeRecord/gotoEnterpriseChangeDetailPage?id='+EpChange.seItem.id,
+        content: Feng.ctxPath + '/admin/enterpriseChangeRecord/gotoEnterpriseChangeDetailPage?id=' + EpChange.seItem.id,
         btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
         btnAlign: 'c',
         yes: function (index, layero) {
@@ -254,7 +263,7 @@ EpChange.unCheckAll = function () {
     $("#fieldCheckModalForm input[type=checkbox]").removeAttr("checked");
 };
 
-EpChange.export = function(){
+EpChange.export = function () {
     var queryData = {};
     queryData['oldName'] = $("#oldName").val();
     queryData['oldIdCard'] = $("#oldIdCard").val();
@@ -272,23 +281,23 @@ EpChange.export = function(){
     window.location.href = Feng.setUrlParam(Feng.ctxPath + "/admin/enterpriseChangeRecord/export", queryData);
 }
 
-EpChange.showLog = function(id){
+EpChange.showLog = function (id) {
     layer.open({
         type: 1,
-        title:"日志",
-        fixed:false,
-        content: '<table id="'+id+'"></table>',
+        title: "日志",
+        fixed: false,
+        content: '<table id="' + id + '"></table>',
         area: ['80%', '80%'],
         maxmin: true,
-        success :function (layero, index) {
-            Feng.getCheckLog(id,{"type":10,"mainId":id,"typeFileId":"","active":1})
+        success: function (layero, index) {
+            Feng.getCheckLog(id, {"type": 10, "mainId": id, "typeFileId": "", "active": 1})
         }
     });
 }
 
 
 
-$(function () {	
+$(function () {
     var defaultColunms = EpChange.initColumn();
     var table = new BSTable(EpChange.id, "/admin/enterpriseChangeRecord/findEnterpriseChangeRecordByPage", defaultColunms);
     table.setPaginationType("server");

+ 218 - 205
public/static/modular/gate/enterprise/enterprise_center.js

@@ -1,295 +1,308 @@
 var EnterpriseCenter = {
-    id: "table",	                                                                //表格id
-    seItem: null,		                                                            //选中的条目
+    id: "table", //表格id
+    seItem: null, //选中的条目
     table: null,
     layerIndex: -1
 };
 
-EnterpriseCenter.changePwd = function() {
-	var password = $("#tab-3").find("input[name='password']").val();
-	var newPassword = $("#tab-3").find("input[name='newPassword']").val();
-	var newRePassword = $("#tab-3").find("input[name='newRePassword']").val();
-	if (password==null || password=='') {
-		Feng.info("请填写原密码!");
-		return;
-	}
-	if (newPassword==null || newPassword=='') {
-		Feng.info("请填写新密码!");
-		return;
-	}
-	if (newRePassword==null || newRePassword=='') {
-		Feng.info("请填写重复新密码!");
-		return;
-	}
-	if (newPassword != newRePassword) {
-		console.log(newPassword,newRePassword)
-		Feng.info("两次新密码填写不一致!");
-		return;
-	}
-	var da = {"password":password, "newPassword":newPassword};
-	var ajax = new $ax(Feng.ctxPath + "/common/api/changePwd", function(data){
+EnterpriseCenter.changePwd = function () {
+    var password = $("#tab-3").find("input[name='password']").val();
+    var newPassword = $("#tab-3").find("input[name='newPassword']").val();
+    var newRePassword = $("#tab-3").find("input[name='newRePassword']").val();
+    if (password == null || password == '') {
+        Feng.info("请填写原密码!");
+        return;
+    }
+    if (newPassword == null || newPassword == '') {
+        Feng.info("请填写新密码!");
+        return;
+    }
+    if (newRePassword == null || newRePassword == '') {
+        Feng.info("请填写重复新密码!");
+        return;
+    }
+    if (newPassword != newRePassword) {
+        console.log(newPassword, newRePassword)
+        Feng.info("两次新密码填写不一致!");
+        return;
+    }
+    var da = {"password": password, "newPassword": newPassword};
+    var ajax = new $ax(Feng.ctxPath + "/common/api/changePwd", function (data) {
         Feng.info(data.msg);
         if (data.code == 200) {
-        	$("#tab-3").find("input[name='password']").val('');
-        	$("#tab-3").find("input[name='newPassword']").val('');
-        	$("#tab-3").find("input[name='newRePassword']").val('');
-		}
-    },function(data){
+            $("#tab-3").find("input[name='password']").val('');
+            $("#tab-3").find("input[name='newPassword']").val('');
+            $("#tab-3").find("input[name='newRePassword']").val('');
+        }
+    }, function (data) {
         Feng.error("操作失败!" + data.responseJSON.message + "!");
     });
     ajax.set(da);
     ajax.start();
 };
 
-EnterpriseCenter.initColumn = function(){
-	return [
-		{field: 'selectItem', radio: true},
+EnterpriseCenter.initColumn = function () {
+    return [
+        {field: 'selectItem', radio: true},
         {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
-        {title: '更新单位名称', field: 'newName', align: 'left', width:120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '更新统一社会信用代码', field: 'newIdCard', align: 'center', width:160, valign: 'middle', 'class': 'uitd_showTip'},
-		{title: '更新产业领域', field: 'newIndustryFieldNewName', align: 'center', width:160, valign: 'middle', 'class': 'uitd_showTip'},
-		{title: '更新单位标签', field: 'newEnterpriseType', align: 'left', width:120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '更新法人代表', field: 'newLegal', align: 'left', width:100, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '更新所属街道', field: 'newStreetName', align: 'left', width:100, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '更新单位地址', field: 'newAddress', align: 'left', width:200, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '审核状态', field: 'checkState', align: 'center', width:120, valign: 'middle', 'class': 'uitd_showTip',
-        	formatter: function (value, row, index){
-                if (value==null || value==''){
+        {title: '更新单位名称', field: 'newName', align: 'left', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '更新统一社会信用代码', field: 'newIdCard', align: 'center', width: 160, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '更新产业领域', field: 'newIndustryFieldNewName', align: 'center', width: 160, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '更新单位标签', field: 'newEnterpriseType', align: 'left', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '更新法人代表', field: 'newLegal', align: 'left', width: 100, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '更新所属街道', field: 'newStreetName', align: 'left', width: 100, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '更新单位地址', field: 'newAddress', align: 'left', width: 200, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '审核状态', field: 'checkState', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip',
+            formatter: function (value, row, index) {
+                if (value == null || value == '') {
                     return "";
-                } else if (value == 1){
+                } else if (value == 1) {
                     return "保存未提交";
-                } else if (value == 2){
+                } else if (value == 2) {
                     return "待审核";
-                } else if (value == 3){
+                } else if (value == 3) {
                     return "审核驳回";
                 } else if (value == 4) {
-                	return "审核通过";
-				} else if (value == 5) {
-					return "重新提交";
-				} else {
-					return "";
-				}
+                    return "审核通过";
+                } else if (value == 5) {
+                    return "重新提交";
+                } else if (value == 6) {
+                    return "初审驳回";
+                } else if (value == 7) {
+                    return "初审通过";
+                } else {
+                    return "";
+                }
             },
-            cellStyle: function(value, row, index) {
-            	if (value==null || value==''){
-            		return {css:{}};
-                } else if (value == 1){
-                	return {css:{}};
-                } else if (value == 2){
-                	return {css:{"background-color":"LightGrey"}};
-                } else if (value == 3){
-                	return {css:{"background-color":"Orange"}};
+            cellStyle: function (value, row, index) {
+                if (value == null || value == '') {
+                    return {css: {}};
+                } else if (value == 1) {
+                    return {css: {}};
+                } else if (value == 2) {
+                    return {css: {"background-color": "LightGrey"}};
+                } else if (value == 3) {
+                    return {css: {"background-color": "Orange"}};
                 } else if (value == 4) {
-                	return {css:{'background-color':'LightGreen'}};
-				} else {
-					return {css:{}};
-				}
+                    return {css: {'background-color': 'LightGreen'}};
+                } else if (value == 5) {
+                    return {css: {'background-color': 'LightGrey'}};
+                } else if (value == 6) {
+                    return {css: {"background-color": "Orange"}};
+                } else if (value == 7) {
+                    return {css: {'background-color': 'LightBlue'}};
+                } else {
+                    return {css: {}};
+                }
             }
         },
-        {title: '申请时间', field: 'createTime', align: 'center', width:170, valign: 'middle', 'class': 'uitd_showTip'},
-		{title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',width:"80px",
-			formatter : function (value,row,index){
-				return "<span class='label label-success' onclick=\"EnterpriseCenter.showLog('"+value+"')\" >" +
-					"<i class=\"fa fa-book\"></i>日志" +
-					"</span>";
-			}
-		}
-	];
+        {title: '申请时间', field: 'createTime', align: 'center', width: 170, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
+            formatter: function (value, row, index) {
+                return "<span class='label label-success' onclick=\"EnterpriseCenter.showLog('" + value + "')\" >" +
+                        "<i class=\"fa fa-book\"></i>日志" +
+                        "</span>";
+            }
+        }
+    ];
 };
 
-EnterpriseCenter.addEnterprisechangeRecord = function() {
-	//查询是否存在  未处理完的 变更申请
-	var ajax = new $ax(Feng.ctxPath + "/enterprise/api/findUnfinishedChangeRecord", function(data){
-		if (data==null || data.length==0) {
-		    var index = layer.open({
-		        type: 2,
-		        title: '申请机构信息变更',
-		        area: ['930px', '600px'], //宽高
-		        fix: false, //不固定
-		        maxmin: true,
-		        content: Feng.ctxPath + '/enterprise/api/toAdd',
-		        btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-check"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
-				btnAlign: 'c',
-		        btn1: function (index, layero) {
-		        	//按钮【按钮一】的回调
-		        	var iframeWin = window[layero.find('iframe')[0]['name']];
-		        	iframeWin.EpChangeEdit.addSubmit();
-		        },
-		        btn2: function(index, layero) {
-					//按钮二的回调
-		        	var iframeWin = window[layero.find('iframe')[0]['name']];
-		        	iframeWin.EpChangeEdit.submitToCheck();
-		        	return false;
-				}
-		    });
-		    layer.full(index);
-			EnterpriseCenter.layerIndex = index;
-		} else {
-			Feng.info("您还有 "+data.length+" 条企业变更申请没有处理完毕, 不能重新提交变更申请!");
-		}
-    },function(data){
+EnterpriseCenter.addEnterprisechangeRecord = function () {
+    //查询是否存在  未处理完的 变更申请
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/api/findUnfinishedChangeRecord", function (data) {
+        if (data == null || data.length == 0) {
+            var index = layer.open({
+                type: 2,
+                title: '申请机构信息变更',
+                area: ['930px', '600px'], //宽高
+                fix: false, //不固定
+                maxmin: true,
+                content: Feng.ctxPath + '/enterprise/api/toAdd',
+                btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-check"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
+                btnAlign: 'c',
+                btn1: function (index, layero) {
+                    //按钮【按钮一】的回调
+                    var iframeWin = window[layero.find('iframe')[0]['name']];
+                    iframeWin.EpChangeEdit.addSubmit();
+                },
+                btn2: function (index, layero) {
+                    //按钮二的回调
+                    var iframeWin = window[layero.find('iframe')[0]['name']];
+                    iframeWin.EpChangeEdit.submitToCheck();
+                    return false;
+                }
+            });
+            layer.full(index);
+            EnterpriseCenter.layerIndex = index;
+        } else {
+            Feng.info("您还有 " + data.length + " 条企业变更申请没有处理完毕, 不能重新提交变更申请!");
+        }
+    }, function (data) {
         Feng.error("操作失败!" + data.responseJSON.message + "!");
     });
     ajax.set(null);
     ajax.start();
 };
 
-EnterpriseCenter.updateEnterprisechangeRecord = function() {
-	if (!EnterpriseCenter.check()) {
-		return;
-	}
-	var item = EnterpriseCenter.seItem;
-	if (item.checkState!=null && item.checkState==4) {                              //如果已经审核通过了
-		Feng.info("该申请已经审核通过,不能再修改!");
-		return;
-	}
+EnterpriseCenter.updateEnterprisechangeRecord = function () {
+    if (!EnterpriseCenter.check()) {
+        return;
+    }
+    var item = EnterpriseCenter.seItem;
+    if (item.checkState != null && item.checkState == 4) {                              //如果已经审核通过了
+        Feng.info("该申请已经审核通过,不能再修改!");
+        return;
+    }
     var index = layer.open({
         type: 2,
         title: '申请机构信息变更',
         area: ['930px', '600px'], //宽高
         fix: false, //不固定
         maxmin: true,
-        content: Feng.ctxPath + '/enterprise/api/toUpdate?id='+item.id,
+        content: Feng.ctxPath + '/enterprise/api/toUpdate?id=' + item.id,
         btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-check"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
-		btnAlign: 'c',
+        btnAlign: 'c',
         btn1: function (index, layero) {
-        	//按钮【按钮一】的回调
-        	var iframeWin = window[layero.find('iframe')[0]['name']];
-        	iframeWin.EpChangeEdit.addSubmit();
+            //按钮【按钮一】的回调
+            var iframeWin = window[layero.find('iframe')[0]['name']];
+            iframeWin.EpChangeEdit.addSubmit();
         },
-        btn2: function(index, layero) {
-			//按钮二的回调
-        	var iframeWin = window[layero.find('iframe')[0]['name']];
-        	iframeWin.EpChangeEdit.submitToCheck();
-        	return false;
-		}
+        btn2: function (index, layero) {
+            //按钮二的回调
+            var iframeWin = window[layero.find('iframe')[0]['name']];
+            iframeWin.EpChangeEdit.submitToCheck();
+            return false;
+        }
     });
-   	layer.full(index);
-	EnterpriseCenter.layerIndex = index;
+    layer.full(index);
+    EnterpriseCenter.layerIndex = index;
 };
 
 EnterpriseCenter.check = function () {
     var selected = $('#' + EnterpriseCenter.id).bootstrapTable('getSelections');
-    if(selected.length == 0){
+    if (selected.length == 0) {
         Feng.info("请先选中表格中的一条变更记录!");
         return false;
-    }else{
-    	EnterpriseCenter.seItem = selected[0];
+    } else {
+        EnterpriseCenter.seItem = selected[0];
         return true;
     }
 };
 
-EnterpriseCenter.showEnterprisechangeRecordDetail = function() {
-	if (!EnterpriseCenter.check()) {
-		return;
-	}
+EnterpriseCenter.showEnterprisechangeRecordDetail = function () {
+    if (!EnterpriseCenter.check()) {
+        return;
+    }
     var index = layer.open({
         type: 2,
         title: '机构信息变更详情',
         area: ['930px', '600px'], //宽高
         fix: false, //不固定
         maxmin: true,
-        content: Feng.ctxPath + '/enterprise/api/toDetail?id='+EnterpriseCenter.seItem.id,
+        content: Feng.ctxPath + '/enterprise/api/toDetail?id=' + EnterpriseCenter.seItem.id,
         btn: ['<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
         btn1: function (index, layero) {
-        	layer.close(index);
+            layer.close(index);
         },
     });
     layer.full(index);
-	EnterpriseCenter.layerIndex = index;
+    EnterpriseCenter.layerIndex = index;
 };
 
 /**
  * 显示日志
  * @param id
  */
-EnterpriseCenter.showLog = function(id){
-	layer.open({
-		type: 1,
-		title:"日志",
-		fixed:false,
-		content: '<table id="'+id+'"></table>',
-		area: ['80%', '80%'],
-		maxmin: true,
-		success :function (layero, index) {
-			Feng.getCheckLog(id,{"type":10,"mainId":id,"typeFileId":"","active":1})
-		}
-	});
+EnterpriseCenter.showLog = function (id) {
+    layer.open({
+        type: 1,
+        title: "日志",
+        fixed: false,
+        content: '<table id="' + id + '"></table>',
+        area: ['80%', '80%'],
+        maxmin: true,
+        success: function (layero, index) {
+            Feng.getCheckLog(id, {"type": 10, "mainId": id, "typeFileId": "", "active": 1})
+        }
+    });
 }
 
 /**
  * 发送验证码
  */
-EnterpriseCenter.getEnterpriseSms = function(){
-	var agentPhone = $("#tab-1").find("input[name='agentPhone']").val();
-	if (agentPhone==null || agentPhone=="") {
-		Feng.info("人才联络员手机号码为空!");
-		return;
-	}
-	agentPhone = $.trim(agentPhone);
-	if (!Feng.checkMobilePhoneNum(agentPhone)) {
-		Feng.info("手机号格式有误,请填写正确的手机号码!");
-		return;
-	}
-	EnterpriseCenter.enterpriseBtnCountDown();
-	var ajax = new $ax(Feng.ctxPath + "/api/common/verificationCode?phone="+agentPhone+"&type=1", function(data){
-		Feng.info(data.msg);
-	},function(data){
-		Feng.error("操作失败!" + data.responseJSON.message + "!");
-	});
-	ajax.set(null);
-	ajax.start();
+EnterpriseCenter.getEnterpriseSms = function () {
+    var agentPhone = $("#tab-1").find("input[name='agentPhone']").val();
+    if (agentPhone == null || agentPhone == "") {
+        Feng.info("人才联络员手机号码为空!");
+        return;
+    }
+    agentPhone = $.trim(agentPhone);
+    if (!Feng.checkMobilePhoneNum(agentPhone)) {
+        Feng.info("手机号格式有误,请填写正确的手机号码!");
+        return;
+    }
+    EnterpriseCenter.enterpriseBtnCountDown();
+    var ajax = new $ax(Feng.ctxPath + "/api/common/verificationCode?phone=" + agentPhone + "&type=1", function (data) {
+        Feng.info(data.msg);
+    }, function (data) {
+        Feng.error("操作失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set(null);
+    ajax.start();
 }
 
 var enterpriseCountDown = 0;
-EnterpriseCenter.enterpriseBtnCountDown = function(){
-	if (enterpriseCountDown == 0) {
-		enterpriseCountDown = 60;
-	} else if (enterpriseCountDown == 1) {
-		$("#enterprise_sms_btn").removeAttr("disabled");
-		$("#enterprise_sms_btn").html("获取验证码");
-		enterpriseCountDown = 0;
-		return;
-	}
-	$("#enterprise_sms_btn").attr("disabled", true);
-	$("#enterprise_sms_btn").html(enterpriseCountDown + "秒");
-	enterpriseCountDown--;
-	setTimeout("EnterpriseCenter.enterpriseBtnCountDown()", 1000);
+EnterpriseCenter.enterpriseBtnCountDown = function () {
+    if (enterpriseCountDown == 0) {
+        enterpriseCountDown = 60;
+    } else if (enterpriseCountDown == 1) {
+        $("#enterprise_sms_btn").removeAttr("disabled");
+        $("#enterprise_sms_btn").html("获取验证码");
+        enterpriseCountDown = 0;
+        return;
+    }
+    $("#enterprise_sms_btn").attr("disabled", true);
+    $("#enterprise_sms_btn").html(enterpriseCountDown + "秒");
+    enterpriseCountDown--;
+    setTimeout("EnterpriseCenter.enterpriseBtnCountDown()", 1000);
 }
 
 /**
  * 绑定聚才网账号
  */
-EnterpriseCenter.bindJcAccount = function(){
-	var username = $("#username").val();
-	var password = $("#password").val();
-	var verificationCode = $("#verificationCode").val();
-	if(username == null || username == ''){
-		Feng.info("聚才网账号不能为空");return ;
-	}
-	if(password == null || password == ''){
-		Feng.info("聚才网账号密码不能为空");return ;
-	}
-	if(verificationCode == null || verificationCode == ''){
-		Feng.info("验证码不能为空");return ;
-	}
-	var ajax = new $ax(Feng.ctxPath + "/api/jucaiInterface/bindAccount", function(data){
-		Feng.info(data.msg);
-	},function(data){
-		Feng.error("操作失败!" + data.responseJSON.message + "!");
-	});
-	ajax.setData({"userType":1,"username":username,"password":password,"verificationCode":verificationCode})
-	ajax.start();
+EnterpriseCenter.bindJcAccount = function () {
+    var username = $("#username").val();
+    var password = $("#password").val();
+    var verificationCode = $("#verificationCode").val();
+    if (username == null || username == '') {
+        Feng.info("聚才网账号不能为空");
+        return;
+    }
+    if (password == null || password == '') {
+        Feng.info("聚才网账号密码不能为空");
+        return;
+    }
+    if (verificationCode == null || verificationCode == '') {
+        Feng.info("验证码不能为空");
+        return;
+    }
+    var ajax = new $ax(Feng.ctxPath + "/api/jucaiInterface/bindAccount", function (data) {
+        Feng.info(data.msg);
+    }, function (data) {
+        Feng.error("操作失败!" + data.responseJSON.message + "!");
+    });
+    ajax.setData({"userType": 1, "username": username, "password": password, "verificationCode": verificationCode})
+    ajax.start();
 }
 
-$(function () {	
+$(function () {
     var defaultColunms = EnterpriseCenter.initColumn();
     var table = new BSTable(EnterpriseCenter.id, "/enterprise/api/findEnterpriseChangeByPage", defaultColunms);
     table.setPaginationType("server");
     EnterpriseCenter.table = table.init();
     var type = $("#type").val();
-    if(type==1){
-    	$("#talentType,#industryFieldNewName,#industryFieldOldName").parent().parent().attr("style","display:block");
-	}
+    if (type == 1) {
+        $("#talentType,#industryFieldNewName,#industryFieldOldName").parent().parent().attr("style", "display:block");
+    }
 
 });

+ 1 - 1
public/static/modular/gate/enterprise/enterprise_change_edit.js

@@ -380,7 +380,7 @@ EpChangeEdit.addSubmit = function () {
         return;
     }
     var checkState = $("#checkState").val();
-    if (checkState == 2 || checkState == 5) {
+    if (checkState == 2 || checkState == 5 || checkState == 7) {
         Feng.info("正在审核中,无法修改")
         return;
     }

+ 46 - 23
public/static/modular/gate/talentInfo/new_talentInfo_info.js

@@ -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",