sugangqiang 2 年之前
父節點
當前提交
00af50b7fc

+ 118 - 55
app/admin/controller/Enterprise.php

@@ -151,9 +151,13 @@ class Enterprise extends AdminController {
     }
 
     public function gotoExaminePage() {
-
         $id = trim($this->request['id']);
         $ep = EnterpriseApi::getOne($id);
+        $lastLog = \app\common\api\TalentLogApi::getLastLog($id, 10);
+        if ($lastLog["active"] == 0) {
+            $ep["checkState"] = $lastLog["state"];
+            $ep["checkMsg"] = $lastLog["description"];
+        }
         if (!$ep) {
             return "无此企业";
         }
@@ -201,6 +205,7 @@ class Enterprise extends AdminController {
 
     public function doExamine() {
         $id = trim($this->request['id']);
+        $doSubmit = $this->request["submit"] == 1 ? true : false;
         if (!$id) {
             return json(["msg" => 'ID不能为空!']);
         }
@@ -208,6 +213,8 @@ class Enterprise extends AdminController {
         if (!$ep) {
             return json(["msg" => '无此企业!']);
         }
+        if (!in_array($ep["checkState"], [1]))
+            return json(["msg" => "不在审核范围内"]);
         $checkState = $this->request['checkState'];
         if ($checkState == null || ($checkState != 2 && $checkState != 3)) {
             return json(["msg" => '请选择审核状态!']);
@@ -227,63 +234,119 @@ class Enterprise extends AdminController {
             }
         }
         try {
-            $checkData = [
-                'id' => $id,
-                'checkState' => $checkState,
-                'checkMsg' => $checkMsg,
-                'modify_fields' => $fields ? implode(",", $fields) : null,
-                'modify_files' => $files ? implode(",", $files) : null,
-                'checkUser' => session('user')['name'],
-                'updateUser' => session('user')['uid'],
-                'updateTime' => date("Y-m-d H:i:s")
-            ];
-            $res = EnterpriseApi::updateById($checkData);
-
-            //短信入库数据
-            $record_data = [
-                'id' => getStringId(),
-                'bizId' => getStringId(),
-                'userId' => $id,
-                'type' => 2,
-                'smsType' => 2,
-                'name' => $ep['name'],
-                'phone' => $ep['agentPhone'],
-                'params' => '机构注册信息',
-                'state' => 1,
-                'sendingDate' => date("Y-m-d H:i:s", time()),
-                'createTime' => date("Y-m-d H:i:s", time())
-            ];
-
-            if ($checkState == 2) {
-                $record_data['templateCode'] = "【晋江市人才服务平台】您好!您提交的晋江市现代产业体系人才机构注册信息因信息填写错误或上传不完整已被退回,请及时登录“晋江市人才综合服务申报平台”根据审核意见修改并重新提交。退订回复TD。";
-            }
+            $lastLog = \app\common\api\TalentLogApi::getLastLog($id, 10);
+            $companyName = session('user')["companyName"] ?: session('user')["rolename"];
             if ($checkState == 3) {
-                $record_data['templateCode'] = "【晋江市人才服务平台】您好!您提交的晋江市现代产业体系人才机构注册信息已审核通过,可登录“晋江市人才综合服务申报平台”做相关事宜申报。退订回复TD。";
+                $fields = null;
+                $files = null;
             }
+            if ($doSubmit) {
+                $checkData = [
+                    'id' => $id,
+                    'checkState' => $checkState,
+                    'checkMsg' => $checkMsg,
+                    'modify_fields' => $fields ? implode(",", $fields) : null,
+                    'modify_files' => $files ? implode(",", $files) : null,
+                    'checkUser' => session('user')['name'],
+                    'updateUser' => session('user')['uid'],
+                    'updateTime' => date("Y-m-d H:i:s")
+                ];
+                $res = EnterpriseApi::updateById($checkData);
+
+                //短信入库数据
+                $record_data = [
+                    'id' => getStringId(),
+                    'bizId' => getStringId(),
+                    'userId' => $id,
+                    'type' => 2,
+                    'smsType' => 2,
+                    'name' => $ep['name'],
+                    'phone' => $ep['agentPhone'],
+                    '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($ep['agentPhone'], $record_data['templateCode']);
-
-            MessageRecord::create($record_data);
-
-            $company = CompanyApi::getOne(session('user')['companyId']);
-
-            TalentChecklog::create([
-                'id' => getStringId(),
-                'mainId' => $id,
-                'type' => 10,
-                'typeField' => null,
-                'active' => 1,
-                'state' => $checkState,
-                'step' => 101,
-                'stateChange' => TalentState::stateEnum($checkState),
-                'description' => $checkMsg,
-                'createTime' => date("Y-m-d H:i:s", time()),
-                'createUser' => session('user')['name'] . "({$company['name']})"
-            ]);
-
-            return json(["msg" => '操作成功!', "code" => 200]);
+                if ($checkState == 2) {
+                    $record_data['templateCode'] = "【晋江市人才服务平台】您好!您提交的晋江市现代产业体系人才机构注册信息因信息填写错误或上传不完整已被退回,请及时登录“晋江市人才综合服务申报平台”根据审核意见修改并重新提交。退订回复TD。";
+                }
+                if ($checkState == 3) {
+                    $record_data['templateCode'] = "【晋江市人才服务平台】您好!您提交的晋江市现代产业体系人才机构注册信息已审核通过,可登录“晋江市人才综合服务申报平台”做相关事宜申报。退订回复TD。";
+                }
+
+                $smsapi = new ChuanglanSmsApi();
+
+                $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,
+                        'step' => 101,
+                        'stateChange' => TalentState::stateEnum($checkState),
+                        'description' => $checkMsg,
+                        'updateTime' => date("Y-m-d H:i:s", time()),
+                        'updateUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                } else {
+                    TalentChecklog::create([
+                        'id' => getStringId(),
+                        'mainId' => $id,
+                        'type' => 10,
+                        'typeField' => null,
+                        'active' => 1,
+                        'state' => $checkState,
+                        'step' => 101,
+                        'stateChange' => TalentState::stateEnum($checkState),
+                        'description' => $checkMsg,
+                        'createTime' => date("Y-m-d H:i:s", time()),
+                        'createUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                }
+
+                return json(["msg" => '操作成功!', "code" => 200]);
+            } else {
+                $checkData = [
+                    'id' => $id,
+                    'modify_fields' => $fields ? implode(",", $fields) : null,
+                    'modify_files' => $files ? implode(",", $files) : null,
+                    'checkUser' => session('user')['name'],
+                    'updateUser' => session('user')['uid'],
+                    'updateTime' => date("Y-m-d H:i:s")
+                ];
+                $res = EnterpriseApi::updateById($checkData);
+
+                if ($lastLog["active"] === 0) {
+                    TalentChecklog::update([
+                        'id' => $lastLog["id"],
+                        'state' => $checkState,
+                        'step' => 101,
+                        'stateChange' => TalentState::stateEnum($checkState),
+                        'description' => $checkMsg,
+                        'updateTime' => date("Y-m-d H:i:s", time()),
+                        'updateUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                } else {
+                    TalentChecklog::create([
+                        'id' => getStringId(),
+                        'mainId' => $id,
+                        'type' => 10,
+                        'typeField' => null,
+                        'active' => 0,
+                        'state' => $checkState,
+                        'step' => 101,
+                        'stateChange' => TalentState::stateEnum($checkState),
+                        'description' => $checkMsg,
+                        'createTime' => date("Y-m-d H:i:s", time()),
+                        'createUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                }
+                return json(["msg" => '保存成功!', "code" => 200]);
+            }
         } catch (\Exception $e) {
             return json(["msg" => $e->getMessage()]);
         }

+ 193 - 150
app/admin/controller/EnterpriseChangeRecord.php

@@ -306,6 +306,12 @@ class EnterpriseChangeRecord extends AdminController {
         }
         $ecr = EnterpriseApi::getOneRecord($id);
         $ep = EnterpriseApi::getOne($ecr['mainId']);
+        $lastLog = \app\common\api\TalentLogApi::getLastLog($id, 10);
+
+        if ($lastLog["active"] == 0 && $lastLog["category"] == "enterprise_change") {
+            $ecr["checkState"] = $lastLog["state"];
+            $ecr["checkMsg"] = $lastLog["description"];
+        }
         if ($ep->special == 0) {
             if ($ep->type == 1) {
                 $fields = ["Name" => "企业名称", "IdCard" => "统一社会信用代码", "Legal" => "法人代表", "Address" => "企业地址", "Street" => "所属街道", "Ephone" => "企业电话", "BankCard" => "企业银行账号", "Bank" => "企业开户银行", "BankNetwork" => "企业开户银行网点",
@@ -382,6 +388,7 @@ class EnterpriseChangeRecord extends AdminController {
 
     public function doExamine() {
         $id = trim($this->request['id']);
+        $doSubmit = $this->request["submit"] == 1 ? true : false;
         if (!$id) {
             return json(["msg" => 'ID不能为空!', 'code' => 500]);
         }
@@ -409,157 +416,193 @@ class EnterpriseChangeRecord extends AdminController {
         if ($ecr['checkState'] != 2 && $ecr['checkState'] != 3 && $ecr['checkState'] != 5) {
             return json(["msg" => '不在审核范围内!', 'code' => 500]);
         }
-        //如果为审核驳回,更新表中的审核状态 和 审核意见, 直接返回结果
-        if ($checkState == 3) {
-            $ecr->checkState = 3;
-            $ecr->checkMsg = $checkMsg;
-            $ecr->updateUser = session('user')['uid'];
-            $ecr->updateTime = date("Y-m-d H:i:s");
-            $ecr->modify_fields = $fields ? implode(",", $fields) : null;
-            $ecr->modify_files = $files ? implode(",", $files) : null;
-            $ecr->save();
-            //发送短信
-            $record_data = [
-                'id' => getStringId(),
-                'bizId' => getStringId(),
-                'userId' => $ecr['mainId'],
-                'type' => 2,
-                'smsType' => 2,
-                'name' => $ecr['newName'],
-                'phone' => $ecr['newAgentPhone'],
-                'templateCode' => "【晋江市人才服务平台】您好!您提交申请的晋江市现代产业体系人才机构用户/机构信息变更因信息填写错误或材料不完整已被退回,请及时登录“晋江市人才综合服务申报平台”根据审核意见修改并重新提交。。",
-                '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);
-
-            $company = CompanyApi::getOne(session('user')['companyId']);
-
-            TalentChecklog::create([
-                'id' => getStringId(),
-                'category' => 'enterprise_change',
-                'mainId' => $ecr['id'],
-                'type' => 10,
-                'typeField' => null,
-                'active' => 1,
-                'state' => 3,
-                'step' => 101,
-                'stateChange' => "<span class='label label-info'>审核驳回</span>",
-                'description' => $checkMsg,
-                'createTime' => date("Y-m-d H:i:s", time()),
-                'createUser' => session('user')['name'] . "({$company['name']})"
-            ]);
-            return json(["msg" => '操作成功!', "code" => 200]);
+        $lastLog = \app\common\api\TalentLogApi::getLastLog($id, 10);
+        $companyName = session('user')["companyName"] ?: session('user')["rolename"];
+        if ($checkState == 4) {
+            $fields = null;
+            $files = null;
+        }
+        $stateChangeStr = $checkState == 4 ? "<span class='label label-info'>审核通过</span>" : "<span class='label label-info'>审核驳回</span>";
+        if ($doSubmit) {
+            //如果为审核驳回,更新表中的审核状态 和 审核意见, 直接返回结果
+            if ($checkState == 3) {
+                $ecr->checkState = 3;
+                $ecr->checkMsg = $checkMsg;
+                $ecr->updateUser = session('user')['uid'];
+                $ecr->updateTime = date("Y-m-d H:i:s");
+                $ecr->modify_fields = $fields ? implode(",", $fields) : null;
+                $ecr->modify_files = $files ? implode(",", $files) : null;
+                $ecr->save();
+                //发送短信
+                $record_data = [
+                    'id' => getStringId(),
+                    'bizId' => getStringId(),
+                    'userId' => $ecr['mainId'],
+                    'type' => 2,
+                    'smsType' => 2,
+                    'name' => $ecr['newName'],
+                    'phone' => $ecr['newAgentPhone'],
+                    'templateCode' => "【晋江市人才服务平台】您好!您提交申请的晋江市现代产业体系人才机构用户/机构信息变更因信息填写错误或材料不完整已被退回,请及时登录“晋江市人才综合服务申报平台”根据审核意见修改并重新提交。。",
+                    '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' => 3,
+                        'stateChange' => $stateChangeStr,
+                        'description' => $checkMsg,
+                        'updateTime' => date("Y-m-d H:i:s", time()),
+                        'updateUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                } else {
+                    TalentChecklog::create([
+                        'id' => getStringId(),
+                        'category' => 'enterprise_change',
+                        'mainId' => $ecr['id'],
+                        'type' => 10,
+                        'typeField' => null,
+                        'active' => 1,
+                        'state' => 3,
+                        'step' => 101,
+                        'stateChange' => $stateChangeStr,
+                        'description' => $checkMsg,
+                        'createTime' => date("Y-m-d H:i:s", time()),
+                        'createUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                }
+                return json(["msg" => '操作成功!', "code" => 200]);
+            } else {
+                $ecr->checkState = 4;
+                $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 ($lastLog["active"] === 0 && $lastLog["category"] == "enterprise_change") {
+                    TalentChecklog::update([
+                        'id' => $lastLog["id"],
+                        'active' => 1,
+                        'state' => 4,
+                        'stateChange' => $stateChangeStr,
+                        'description' => $checkMsg,
+                        'updateTime' => date("Y-m-d H:i:s", time()),
+                        'updateUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                } else {
+                    TalentChecklog::create([
+                        'id' => getStringId(),
+                        'category' => 'enterprise_change',
+                        'mainId' => $ecr['id'],
+                        'type' => 10,
+                        'typeField' => null,
+                        'active' => 1,
+                        'state' => 4,
+                        'step' => 101,
+                        'stateChange' => $stateChangeStr,
+                        'description' => $checkMsg,
+                        'createTime' => date("Y-m-d H:i:s", time()),
+                        'createUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                }
+                return json(["msg" => '操作成功!', "code" => 200]);
+            }
         } else {
-            $ecr->checkState = 4;
-            $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;
-            //查询此次上传的文件
-            /* $list = TalentCommonFile::where('mainId', $ecr['id'])->select()->toArray();
-              if (count($list) > 0) {
-              foreach ($list as $k => $v) {
-              $fileInfo = CurrentcyFileType::where('id', $v['typeId'])->select()->toArray();
-              if (count($fileInfo) > 0) {
-              foreach ($fileInfo as $item) {
-              switch ($item['api']) {
-              case 'businessLicense':
-              $ep->imgurl = $v['url'];
-              break;
-              case 'businessBank':
-              $ep->bankImg = $v['url'];
-              break;
-              case 'businessDomain':
-              $ep->domainImg = $v['url'];
-              break;
-              case 'businessBeian':
-              $ep->beian = $v['url'];
-              break;
-              }
-              }
-              }
-              }
-              } */
-            //同步人才库与津贴库  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);
-
-            $company = CompanyApi::getOne(session('user')['companyId']);
-
-            TalentChecklog::create([
-                'id' => getStringId(),
-                'category' => 'enterprise_change',
-                'mainId' => $ecr['id'],
-                'type' => 10,
-                'typeField' => null,
-                'active' => 1,
-                'state' => 4,
-                'step' => 101,
-                'stateChange' => "<span class='label label-info'>审核通过</span>",
-                'description' => $checkMsg,
-                'createTime' => date("Y-m-d H:i:s", time()),
-                'createUser' => session('user')['name'] . "({$company['name']})"
-            ]);
-
-            return json(["msg" => '操作成功!', "code" => 200]);
+            $ecrUpdData["id"] = $ecr['id'];
+            $ecrUpdData["updateUser"] = session('user')['uid'];
+            $ecrUpdData["updateTime"] = date("Y-m-d H:i:s");
+            $ecrUpdData["modify_fields"] = $fields ? implode(",", $fields) : null;
+            $ecrUpdData["modify_files"] = $files ? implode(",", $files) : null;
+            \app\enterprise\model\EnterpriseRecord::update($ecrUpdData);
+
+            if ($lastLog["active"] === 0 && $lastLog["category"] == "enterprise_change") {
+                TalentChecklog::update([
+                    'id' => $lastLog["id"],
+                    'state' => $checkState,
+                    'stateChange' => $stateChangeStr,
+                    'description' => $checkMsg,
+                    'updateTime' => date("Y-m-d H:i:s", time()),
+                    'updateUser' => session('user')['name'] . "({$companyName})"
+                ]);
+            } else {
+                TalentChecklog::create([
+                    'id' => getStringId(),
+                    'category' => 'enterprise_change',
+                    'mainId' => $ecr['id'],
+                    'type' => 10,
+                    'typeField' => null,
+                    'active' => 0,
+                    'state' => $checkState,
+                    'step' => 101,
+                    'stateChange' => $stateChangeStr,
+                    'description' => $checkMsg,
+                    'createTime' => date("Y-m-d H:i:s", time()),
+                    'createUser' => session('user')['name'] . "({$companyName})"
+                ]);
+            }
+            return json(["msg" => '保存成功!', "code" => 200]);
         }
     }
 

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

@@ -12,8 +12,8 @@
                             <div class="col-sm-10">
                                 <select class="form-control" id="checkState" name="checkState" onchange="examine.toggleField()" >
                                     <option value="">--- 请选择 ---</option>
-                                    <option value="3" {eq name="ep.checkState" value="3"}selected{/eq}>审核驳回</option>
-                                    <option value="4" {eq name="ep.checkState" value="4"}selected{/eq}>审核通过</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>
                                 </select>
                             </div>
                         </div>
@@ -30,7 +30,7 @@
                         </div>
                     </div>
                 </div>
-                <div id="field" {neq name="ep.checkState" value="3"}style="padding-top:5px;display:none"{/neq}>
+                <div id="field" {neq name="ecr.checkState" value="3"}style="padding-top:5px;display:none"{/neq}>
                     <label for="checkMsg" class="control-label">可修改字段</label>
                     <div id="field_info">
                         <ul style="overflow:hidden;list-style:none;">

+ 22 - 28
app/admin/view/talent/talentInfo_common_check.html

@@ -361,13 +361,13 @@
                                             </td>
                                             <td>
                                                 <div class="rowGroup abroad_need_this" {if condition='!$info["study_abroad"] or $info["study_abroad"] eq 2'}style="display:none;"{/if}>
-                                                     <label class="control-label spacing td-label"><span style="color: red">*</span>留学毕业院校</label>
+                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>留学毕业院校</label>
                                                     <input type="text" class="form-control" id="abroad_school" name="abroad_school" value="{$info.abroad_school}"/>
                                                 </div>
                                             </td>
                                             <td>
                                                 <div class="rowGroup abroad_need_this" {if condition='!$info["study_abroad"] or $info["study_abroad"] eq 2'}style="display:none;"{/if}>
-                                                     <label class="control-label spacing td-label"><span style="color: red">*</span>留学专业</label>
+                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>留学专业</label>
                                                     <input type="text" class="form-control" id="abroad_major" name="abroad_major" value="{$info.abroad_major}"/>
                                                 </div>
                                             </td>
@@ -466,14 +466,14 @@
                                     {/if}
                                     <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
                                         <tr>
-                                            {if condition="$info['isImport']"}
                                             <td colspan="4">
+                                                {if condition="$info['isImport']"}
                                                 <div class="rowGroup col-sm-3">
                                                     <label class=" control-label spacing td-label"><span style="color: red">*</span>是否符合直认条件</label>                                                        
                                                     <input type="radio" name="isMatchZhiren" value="1" {eq name="info.isMatchZhiren" value="1"}checked{/eq}/>是&nbsp;&nbsp;
-                                                           <input type="radio" name="isMatchZhiren" value="0" {if condition="!$info['isMatchZhiren']"}checked{/if}/>否
+                                                    <input type="radio" name="isMatchZhiren" value="0" {if condition="!$info['isMatchZhiren']"}checked{/if}/>否
                                                 </div>
-                                                <div class="rowGroup col-sm-9">
+                                                <div class="rowGroup col-sm-6">
                                                     <div class="rowGroup">
                                                         <label class=" control-label spacing td-label"><span style="color: red">*</span>申报来源</label>
                                                         <select class="form-control" id="source">
@@ -482,23 +482,31 @@
                                                         </select>
                                                     </div>
                                                 </div>
-                                            </td>
-                                            {else/}
-                                            <td colspan="4">
-                                                <div class="rowGroup">
+                                                {else/}
+                                                <div class="rowGroup col-sm-9">
                                                     <label class=" control-label spacing td-label"><span style="color: red">*</span>申报来源</label>
                                                     <select class="form-control" id="source">
                                                         <option value="{$info.source}">{$info.sourceName}</option>
                                                     </select>
                                                     </select>
                                                 </div>
+                                                {/if}
+                                                {if condition="$info['source_city'] || $info['source_county']"}
+                                                <div class="rowGroup col-sm-3" {if condition="!$info['source_city']"}style="display:none;"{/if}>
+                                                    <label class="control-label spacing"><span style="color: red">*</span>入选来源地级市</label>
+                                                    <input type="text" class="form-control" id="source_city" name="source_city" value="{$info.sourceCityName}"/>
+                                                </div>
+                                                <div class="rowGroup col-sm-3" {if condition="!$info['source_county']"}style="display:none;"{/if}>
+                                                    <label class="control-label spacing"><span style="color: red">*</span>入选来源县市区</label>
+                                                    <input type="text" class="form-control" id="source_county" name="source_county" value="{$info.sourceCountyName}"/>
+                                                </div>
+                                                {/if}
                                             </td>
-                                            {/if}
                                             <td rowspan="4" style="width: 100%">
                                                 <table class="fileTable"></table>
                                             </td>
                                         </tr>
-                                        <tr>
+                                        <!--<tr>
                                             {if condition="$info['source_batch']"}
                                             <td>
                                                 <div class="rowGroup">
@@ -507,20 +515,6 @@
                                                 </div>
                                             </td>
                                             {/if}
-                                            {if condition="$info['source_city'] || $info['source_county']"}
-                                            <td>
-                                                <div class="rowGroup" {if condition="!$info['source_city']"}style="display:none;"{/if}>
-                                                     <label class="control-label spacing"><span style="color: red">*</span>入选来源地级市</label>
-                                                    <input type="text" class="form-control" id="source_city" name="source_city" value="{$info.sourceCityName}"/>
-                                                </div>
-                                            </td>
-                                            <td>
-                                                <div class="rowGroup" {if condition="!$info['source_county']"}style="display:none;"{/if}>
-                                                     <label class="control-label spacing"><span style="color: red">*</span>入选来源县市区</label>
-                                                    <input type="text" class="form-control" id="source_county" name="source_county" value="{$info.sourceCountyName}"/>
-                                                </div>
-                                            </td>
-                                            {/if}
                                             {if condition="in_array($info['source'],[1,3])"}
                                             <td>
                                                 <div class="rowGroup fujian_highcert">
@@ -549,9 +543,9 @@
                                                 </div>
                                             </td>
                                             {/if}
-                                        </tr>
+                                        </tr>-->
                                         <tr>
-                                            <td colspan="3">
+                                            <td colspan="4">
                                                 <div class="rowGroup col-sm-6">
                                                     <label class="control-label spacing"><span style="color: red">*</span>人才层次</label>
                                                     <select class="form-control" id="talent_arrange" name="talent_arrange">
@@ -567,7 +561,7 @@
                                             </td>
                                         </tr>
                                         <tr>
-                                            <td colspan="2" style="overflow: inherit">
+                                            <td colspan="3" style="overflow: inherit">
                                                 <div class="rowGroup col-sm-9">
                                                     <label class="control-label spacing"><span style="color: red">*</span>认定条件</label>
                                                     <select class="form-control" id="talent_condition">

+ 5 - 5
app/common/api/DictApi.php

@@ -186,11 +186,11 @@ class DictApi {
             "source" => "申报来源",
             "source_city" => "入选来源地级市",
             "source_county" => "入选来源县市区",
-            "source_batch" => "入选名单的文件号及批次",
-            "fujian_highcert_pubtime" => "福建省高层次人才证书发证日期",
-            "fujian_highcert_exptime" => "福建省高层次人才证书有效期",
-            "quanzhou_highcert_pubtime" => "泉州高层次人才证书发证日期",
-            "quanzhou_highcert_exptime" => "泉州高层次人才证书有效期",
+            //"source_batch" => "入选名单的文件号及批次",
+            //"fujian_highcert_pubtime" => "福建省高层次人才证书发证日期",
+            //"fujian_highcert_exptime" => "福建省高层次人才证书有效期",
+            //"quanzhou_highcert_pubtime" => "泉州高层次人才证书发证日期",
+            //"quanzhou_highcert_exptime" => "泉州高层次人才证书有效期",
             "annual_salary" => "上一年度年薪(元)"
         ];
         if ($isImport) {

+ 43 - 1
app/common/api/VerifyApi.php

@@ -74,6 +74,48 @@ class VerifyApi {
             if ($info["highest_degree"]) {
                 $info["highestDegreeName"] = DictApi::selectByParentCode("highest_degree")[$info["highest_degree"]];
             }
+            if ($info["qz_talent_info"]) {
+                $qz_talent_info = explode(";", $info["qz_talent_info"]);
+                list($tmp1, $timeStart) = explode(":", $qz_talent_info[1]);
+                list($tmp2, $timeEnd) = explode(":", $qz_talent_info[2]);
+                if (strtotime($timeStart)) {
+                    $qz_talent_info[1] = implode(":", [$tmp1, date("Y-m-d", strtotime($timeStart))]);
+                }
+                if (strtotime($timeEnd)) {
+                    $qz_talent_info[2] = implode(":", [$tmp2, date("Y-m-d", strtotime($timeEnd))]);
+                }
+                $info["qz_talent_info"] = implode(";", $qz_talent_info);
+            }
+            if ($info["fj_talent_info"]) {
+                $fj_talent_info = explode(";", $info["fj_talent_info"]);
+                list($tmp1, $timeStart) = explode(":", $fj_talent_info[0]);
+                list($tmp2, $validYear) = explode(":", $fj_talent_info[2]);
+                $timeStart = str_replace(["."], "-", $timeStart);
+                if (strtotime($timeStart)) {
+                    $fj_talent_info[0] = implode(":", [$tmp1, date("Y-m-d", strtotime($timeStart))]);
+                    if (strtotime($validYear)) {
+                        $fj_talent_info[2] = implode(":", [$tmp2, date("Y-m-d", strtotime($validYear))]);
+                    } else {
+                        $validval = intval($validYear);
+                        if ($validYear > 0) {
+                            $timestr = str_replace($validval, "", $validYear);
+                            switch ($timestr) {
+                                case "月":
+                                    $timetype = "months";
+                                    break;
+                                case "日":
+                                    $timetype = "days";
+                                    break;
+                                default:
+                                    $timetype = "years";
+                                    break;
+                            }
+                            $fj_talent_info[2] = implode(":", [$tmp2, date("Y-m-d", strtotime("+{$validval} {$timetype}", strtotime($timeStart)))]);
+                        }
+                    }
+                }
+                $info["fj_talent_info"] = implode(";", $fj_talent_info);
+            }
             if ($info["talent_condition"]) {
                 $talent_condition = \app\common\model\TalentCondition::findOrEmpty($info["talent_condition"]);
                 $info["talentConditionName"] = $talent_condition["name"];
@@ -309,7 +351,7 @@ class VerifyApi {
                         default:
                             //$where[] = ["ti.checkState", "in", [TalentState::SCND_SUBMIT, TalentState::FST_VERIFY_FAIL]];
                             $where[] = ["tl.new_state", "in", [TalentState::SCND_SAVE, TalentState::SCND_SUBMIT]];
-                            $where[] = ["tl.state", "in", [TalentState::SCND_SUBMIT,TalentState::DEPT_VERIFY_REJECT, TalentState::REVERIFY_REJECT, TalentState::FST_VERIFY_REJECT]];
+                            $where[] = ["tl.state", "in", [TalentState::SCND_SUBMIT, TalentState::DEPT_VERIFY_REJECT, TalentState::REVERIFY_REJECT, TalentState::FST_VERIFY_REJECT]];
                     }
                     break;
                 case 6:

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

@@ -331,17 +331,17 @@ class Talent extends EnterpriseController {
                 $no_empty[] = "abroad_major";
             }
             if (in_array($params["source"], [1, 3])) {
-                $no_empty[] = "source_batch";
-                $no_empty[] = "fujian_highcert_pubtime";
-                $no_empty[] = "fujian_highcert_exptime";
+                //$no_empty[] = "source_batch";
+                //$no_empty[] = "fujian_highcert_pubtime";
+                //$no_empty[] = "fujian_highcert_exptime";
                 if ($params["source"] == 3) {
                     $no_empty[] = "source_city";
                 }
             }
             if (in_array($params["source"], [2, 4])) {
-                $no_empty[] = "source_batch";
-                $no_empty[] = "quanzhou_highcert_pubtime";
-                $no_empty[] = "quanzhou_highcert_exptime";
+                //$no_empty[] = "source_batch";
+                //$no_empty[] = "quanzhou_highcert_pubtime";
+                //$no_empty[] = "quanzhou_highcert_exptime";
                 if ($params["source"] == 4) {
                     $no_empty[] = "source_county";
                 }

+ 19 - 25
app/enterprise/view/talent/apply.html

@@ -491,55 +491,49 @@
                                         {/if}
                                         <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
                                             <tr>
-                                                {if condition="$row['isImport']"}
                                                 <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>                                                        
                                                         <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>
-                                                    <div class="rowGroup col-sm-9">
+                                                    <div class="rowGroup col-sm-6">
                                                         <label class=" control-label spacing td-label"><span style="color: red">*</span>申报来源</label>
                                                         <select class="form-control" id="source" name="source" onchange="TalentInfoInfoDlg.sourceChange()" value="{$row.source}">
                                                         </select>
                                                     </div>
-                                                </td>
-                                                {else/}
-                                                <td colspan="4">
-                                                    <div class="rowGroup">
+                                                    {else/}
+                                                    <div class="rowGroup col-sm-9">
                                                         <label class=" control-label spacing td-label"><span style="color: red">*</span>申报来源</label>
                                                         <select class="form-control" id="source" name="source" onchange="TalentInfoInfoDlg.sourceChange()" value="{$row.source}">
                                                         </select>
                                                     </div>
-                                                </td>
-                                                {/if}
-                                                <td rowspan="4" style="width: 100%">
-                                                    <table class="fileTable"></table>
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td {if condition="!$row['source_batch']"}style="display:none;"{/if}>
-                                                    <div class="rowGroup">
-                                                        <label class=" control-label spacing" ><span style="color: red">*</span>入选名单的文件号及批次</label>
-                                                        <input type="text" class="form-control" id="source_batch" name="source_batch" value="{$row.source_batch}"/>
-                                                    </div>
-                                                </td>
-                                                <td {if condition="!$row['source_city']"}style="display:none;"{/if}>
-                                                    <div class="rowGroup">
+                                                    {/if}
+                                                    <div class="rowGroup col-sm-3" {if condition="!$row['source_city']"}style="display:none;"{/if}>
                                                         <label class="control-label spacing"><span style="color: red">*</span>入选来源地级市</label>
                                                         <select class="form-control" id="source_city" name="source_city" value="{$row['source_city']}">
                                                             <option value="">{$row.sourceCityName}</option>
                                                         </select>
                                                     </div>
-                                                </td>
-                                                <td {if condition="!$row['source_county']"}style="display:none;"{/if}>
-                                                    <div class="rowGroup">
+                                                    <div class="rowGroup col-sm-3" {if condition="!$row['source_county']"}style="display:none;"{/if}>
                                                         <label class="control-label spacing"><span style="color: red">*</span>入选来源县市区</label>
                                                         <select class="form-control" id="source_county" name="source_county" value="{$row['source_county']}">
                                                             <option value="">{$row.sourceCountyName}</option>
                                                         </select>
                                                     </div>
                                                 </td>
+                                                <td rowspan="4" style="width: 100%">
+                                                    <table class="fileTable"></table>
+                                                </td>
+                                            </tr>
+                                            <!--<tr>
+                                                <td {if condition="!$row['source_batch']"}style="display:none;"{/if}>
+                                                    <div class="rowGroup">
+                                                        <label class=" control-label spacing" ><span style="color: red">*</span>入选名单的文件号及批次</label>
+                                                        <input type="text" class="form-control" id="source_batch" name="source_batch" value="{$row.source_batch}"/>
+                                                    </div>
+                                                </td>
                                                 <td style="display: none">
                                                     <div class="rowGroup fujian_highcert">
                                                         <label class=" control-label spacing" ><span style="color: red">*</span>福建省高层次人才证书发证日期</label>
@@ -564,7 +558,7 @@
                                                         <input type="text" class="form-control date" id="quanzhou_highcert_exptime" name="quanzhou_highcert_exptime" value="{$row.quanzhou_highcert_exptime}"/>
                                                     </div>
                                                 </td>
-                                            </tr>
+                                            </tr>-->
                                             <tr>
                                                 <td colspan="4">
                                                     <div class="rowGroup col-sm-6">

+ 27 - 33
app/enterprise/view/talent/view.html

@@ -235,7 +235,7 @@
                                                     <div class="rowGroup word-wrap">
                                                         <label class=" control-label spacing td-label"><span style="color: red">*</span>工资发放渠道</label>
                                                         <input type="radio" name="salary_pay_way" value="1" {eq name="row.salary_pay_way" value="1"}checked{/eq} readonly disabled/>本单位&nbsp;&nbsp;
-                                                               <input type="radio" name="salary_pay_way" value="2" {eq name="row.salary_pay_way" value="2"}checked{/eq} readonly disabled/>本单位所属集团公司及权属公司
+                                                        <input type="radio" name="salary_pay_way" value="2" {eq name="row.salary_pay_way" value="2"}checked{/eq} readonly disabled/>本单位所属集团公司及权属公司
                                                     </div>
                                                 </td>
                                                 <td>
@@ -360,13 +360,13 @@
                                                 </td>
                                                 <td>
                                                     <div class="rowGroup abroad_need_this" {if condition='!$row["study_abroad"] or $row["study_abroad"] eq 2'}style="display:none;"{/if}>
-                                                         <label class="control-label spacing td-label"><span style="color: red">*</span>留学毕业院校</label>
+                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>留学毕业院校</label>
                                                         <input type="text" class="form-control" id="abroad_school" name="abroad_school" value="{$row.abroad_school}"/>
                                                     </div>
                                                 </td>
                                                 <td>
                                                     <div class="rowGroup abroad_need_this" {if condition='!$row["study_abroad"] or $row["study_abroad"] eq 2'}style="display:none;"{/if}>
-                                                         <label class="control-label spacing td-label"><span style="color: red">*</span>留学专业</label>
+                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>留学专业</label>
                                                         <input type="text" class="form-control" id="abroad_major" name="abroad_major" value="{$row.abroad_major}"/>
                                                     </div>
                                                 </td>
@@ -466,33 +466,45 @@
                                         {/if}
                                         <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
                                             <tr>
-                                                {if condition="$row['isImport']"}
                                                 <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>                                                        
                                                         <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();"/>否
+                                                        <input type="radio" name="isMatchZhiren" value="0" {if condition="!$row['isMatchZhiren']"}checked{/if} onchange="TalentInfoInfoDlg.isMatchZhirenChange();"/>否
                                                     </div>
-                                                    <div class="rowGroup col-sm-9">
+                                                    <div class="rowGroup col-sm-6">
                                                         <label class=" control-label spacing td-label"><span style="color: red">*</span>申报来源</label>
                                                         <div class="form-control" style="border: none;background:#eee;">{$row.sourceName}</div>
                                                         <input type="hidden" id="source" value="{$row.source}">
                                                     </div>
-                                                </td>
-                                                {else/}
-                                                <td colspan="4">
-                                                    <div class="rowGroup">
+                                                    {else/}
+                                                    <div class="rowGroup col-sm-9">
                                                         <label class=" control-label spacing td-label"><span style="color: red">*</span>申报来源</label>
                                                         <div class="form-control" style="border: none;background:#eee;">{$row.sourceName}</div>
                                                         <input type="hidden" id="source" value="{$row.source}">
                                                     </div>
+                                                    {/if}
+                                                    {if condition="$row['source_city'] || $row['source_county']"}
+                                                    <div class="rowGroup col-sm-3" {if condition="!$row['source_city']"}style="display:none;"{/if}>
+                                                        <label class="control-label spacing"><span style="color: red">*</span>入选来源地级市</label>
+                                                        <select class="form-control" id="source_city" name="source_city">
+                                                            <option value="">{$row.sourceCityName}</option>
+                                                        </select>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3" {if condition="!$row['source_county']"}style="display:none;"{/if}>
+                                                        <label class="control-label spacing"><span style="color: red">*</span>入选来源县市区</label>
+                                                        <select class="form-control" id="source_county" name="source_county">
+                                                            <option value="">{$row.sourceCountyName}</option>
+                                                        </select>
+                                                    </div>
+                                                    {/if}
                                                 </td>
-                                                {/if}
                                                 <td rowspan="4" style="width: 100%">
                                                     <table class="fileTable"></table>
                                                 </td>
                                             </tr> 
-                                            <tr>
+                                            <!--<tr>
                                                 {if condition="$row['source_batch']"}
                                                 <td>
                                                     <div class="rowGroup">
@@ -501,24 +513,6 @@
                                                     </div>
                                                 </td>
                                                 {/if}
-                                                {if condition="$row['source_city'] || $row['source_county']"}
-                                                <td>
-                                                    <div class="rowGroup" {if condition="!$row['source_city']"}style="display:none;"{/if}>
-                                                         <label class="control-label spacing"><span style="color: red">*</span>入选来源地级市</label>
-                                                        <select class="form-control" id="source_city" name="source_city">
-                                                            <option value="">{$row.sourceCityName}</option>
-                                                        </select>
-                                                    </div>
-                                                </td>
-                                                <td>
-                                                    <div class="rowGroup" {if condition="!$row['source_county']"}style="display:none;"{/if}>
-                                                         <label class="control-label spacing"><span style="color: red">*</span>入选来源县市区</label>
-                                                        <select class="form-control" id="source_county" name="source_county">
-                                                            <option value="">{$row.sourceCountyName}</option>
-                                                        </select>
-                                                    </div>
-                                                </td>
-                                                {/if}
                                                 {if condition="in_array($row['source'],[1,3])"}
                                                 <td>
                                                     <div class="rowGroup fujian_highcert">
@@ -547,9 +541,9 @@
                                                     </div>
                                                 </td>
                                                 {/if}
-                                            </tr>
+                                            </tr>-->
                                             <tr>
-                                                <td colspan="3">
+                                                <td colspan="4">
                                                     <div class="rowGroup col-sm-6">
                                                         <label class="control-label spacing"><span style="color: red">*</span>人才层次</label>
                                                         <select class="form-control" id="talent_arrange" name="talent_arrange">
@@ -565,7 +559,7 @@
                                                 </td>
                                             </tr>
                                             <tr>
-                                                <td colspan="2">
+                                                <td colspan="3">
                                                     <div class="rowGroup col-sm-9">
                                                         <label class="control-label spacing"><span style="color: red">*</span>认定条件</label>
                                                         <input type='hidden' name='talent_condition' id='talent_condition' value='{$row.talent_condition}'>

+ 21 - 14
public/static/modular/enterprise/enterprise_examine.js

@@ -1,7 +1,6 @@
 var EpExam = {};
 var locked = false;
-
-EpExam.addSubmit = function () {
+EpExam.save = function (submit) {
     var id = $("#id").val();
     var checkState = $("#checkState").val();
     var checkMsg = $("#checkMsg").val();
@@ -27,21 +26,29 @@ EpExam.addSubmit = function () {
     for (var i = 0; i < fileCount; i++) {
         files.push($("#field_file input[type=checkbox]:checked").eq(i).val());
     }
-    var da = {"id": id, "checkState": checkState, "checkMsg": checkMsg, fields: fields, files: files};
-    var operation = function () {
-        var ajax = new $ax(Feng.ctxPath + "/admin/enterprise/doExamine", function (data) {
-            if (data.code == 200) {
+    var da = {"id": id, "checkState": checkState, "checkMsg": checkMsg, fields: fields, files: files, submit: submit};
+    //var operation = function () {
+    var ajax = new $ax(Feng.ctxPath + "/admin/enterprise/doExamine", function (data) {
+        if (data.code == 200) {
+            if (submit) {
                 window.parent.Enterprise.table.refresh();
                 parent.layer.closeAll();
             }
-            Feng.info(data.msg);
-        }, function (data) {
-            Feng.error("操作失败!" + data.responseJSON.message + "!");
-        });
-        ajax.set(da);
-        ajax.start();
-    };
-    Feng.confirm("确定提交吗?", operation);
+        }
+        Feng.info(data.msg);
+    }, function (data) {
+        Feng.error("操作失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set(da);
+    ajax.start();
+    //};
+    //Feng.confirm("确定提交吗?", operation);
+}
+EpExam.addSubmit = function () {
+    EpExam.save(0);
+};
+EpExam.submitToCheck = function () {
+    EpExam.save(1);
 };
 
 EpExam.checkAll = function () {

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

@@ -185,6 +185,10 @@ Enterprise.doExamine = function () {
     if (!Enterprise.check()) {
         return;
     }
+    if (Enterprise.seItem.checkState == null || (Enterprise.seItem.checkState != 1)) {
+        Feng.info("不在审核范围内!");
+        return;
+    }
     var index = layer.open({
         type: 2,
         title: '审核',
@@ -193,12 +197,19 @@ Enterprise.doExamine = function () {
         maxmin: true,
         shade: 0,
         content: Feng.ctxPath + '/admin/enterprise/gotoExaminePage?id=' + Enterprise.seItem.id,
-        btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
+        btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;提交', '<i class="fa fa-save"></i>&nbsp;&nbsp;保存', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
         btnAlign: 'c',
         yes: function (index, layero) {
             //按钮【按钮一】的回调
+            layer.confirm("确认提交审核结果?", function () {
+                var iframeWin = window[layero.find('iframe')[0]['name']];
+                iframeWin.EpExam.submitToCheck();
+            })
+        },
+        btn2: function (index, layero) {
             var iframeWin = window[layero.find('iframe')[0]['name']];
             iframeWin.EpExam.addSubmit();
+            return false;
         }
     });
 //    layer.full(index);

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

@@ -14,11 +14,19 @@ ecre.doExamine = function () {
         maxmin: true,
         shade: 0,
         content: Feng.ctxPath + '/admin/enterpriseChangeRecord/gotoEnterpriseChangeExaminePage?id=' + $("#id").val(),
-        btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;确定', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
+        btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;提交', '<i class="fa fa-save"></i>&nbsp;&nbsp;保存', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
+        btnAlign: 'c',
         yes: function (index, layero) {
             //按钮【按钮一】的回调
+            layer.confirm("确认提交审核结果?", function () {
+                var iframeWin = window[layero.find('iframe')[0]['name']];
+                iframeWin.examine.submitToCheck();
+            })
+        },
+        btn2: function (index, layero) {
             var iframeWin = window[layero.find('iframe')[0]['name']];
             iframeWin.examine.addSubmit();
+            return false;
         }
     });
 //    layer.full(index);

+ 13 - 4
public/static/modular/enterprise/enterprisechangeRecord/ep_change_record_examine.js

@@ -1,7 +1,7 @@
 var examine = {};
 var locked = false;
 
-examine.addSubmit = function () {
+examine.save = function (submit) {
     var id = $("#id").val();
     var checkState = $("#checkState").val();
     var checkMsg = $("#checkMsg").val();
@@ -27,14 +27,16 @@ examine.addSubmit = function () {
     for (var i = 0; i < fileCount; i++) {
         files.push($("#field_file input[type=checkbox]:checked").eq(i).val());
     }
-    var da = {"id": id, "checkState": checkState, "checkMsg": checkMsg, fields: fields, files: files};
+    var da = {"id": id, "checkState": checkState, "checkMsg": checkMsg, fields: fields, files: files, submit: submit};
     if (locked)
         return;
     locked = true;
     var ajax = new $ax(Feng.ctxPath + "/admin/enterpriseChangeRecord/doExamine", function (data) {
         if (data.code == 200) {
-            window.parent.parent.EpChange.table.refresh();
-            parent.layer.closeAll();
+            if (submit) {
+                window.parent.parent.EpChange.table.refresh();
+                parent.layer.closeAll();
+            }
         }
         Feng.info(data.msg);
         locked = false;
@@ -44,6 +46,13 @@ examine.addSubmit = function () {
     });
     ajax.set(da);
     ajax.start();
+}
+examine.addSubmit = function () {
+    examine.save(0);
+};
+
+examine.submitToCheck = function () {
+    examine.save(1);
 };
 
 examine.checkAll = function () {

+ 20 - 20
public/static/modular/gate/talentInfo/new_talentInfo_info.js

@@ -776,8 +776,8 @@ TalentInfoInfoDlg.sourceChange = function () {
     $("#source_batch").val("").parents("td").css("display", "none");
     $(".fujian_highcert").parents("td").css("display", "none");
     $(".quanzhou_highcert").parents("td").css("display", "none");
-    $("#source_city").val("").parents("td").css("display", "none");
-    $("#source_county").val("").parents("td").css("display", "none");
+    $("#source_city").val("").parents("div.rowGroup").css("display", "none");
+    $("#source_county").val("").parents("div.rowGroup").css("display", "none");
     $('#talentInfoForm').bootstrapValidator('removeField', "source_batch");
     $('#talentInfoForm').bootstrapValidator('removeField', "fujian_highcert_pubtime");
     $('#talentInfoForm').bootstrapValidator('removeField', "fujian_highcert_exptime");
@@ -785,30 +785,30 @@ TalentInfoInfoDlg.sourceChange = function () {
     $('#talentInfoForm').bootstrapValidator('removeField', "quanzhou_highcert_exptime");
     $('#talentInfoForm').bootstrapValidator('removeField', "source_city");
     $('#talentInfoForm').bootstrapValidator('removeField', "source_county");
-    var columns = 3;
+    //var columns = 3;
     switch (source) {
         case "1":
         case "3":
-            columns = source == 1 ? 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: '福建省高层次人才证书有效期不能为空'}}});
+            //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":
         case "4":
-            columns = source == 2 ? 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: '泉州高层次人才证书有效期不能为空'}}});
+            //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) {
         //显示入选来源地级市除泉
-        $("#source_city").parents("td").css("display", "table-cell");
+        $("#source_city").parents("div.rowGroup").css("display", "table-cell");
         Feng.addAjaxSelect({
             "id": "source_city",
             "displayCode": "code",
@@ -820,7 +820,7 @@ TalentInfoInfoDlg.sourceChange = function () {
     }
     if (source == 4) {
         //显示入选来源县市区除晋
-        $("#source_county").parents("td").css("display", "table-cell");
+        $("#source_county").parents("div.rowGroup").css("display", "table-cell");
         Feng.addAjaxSelect({
             "id": "source_county",
             "displayCode": "code",
@@ -835,9 +835,9 @@ TalentInfoInfoDlg.sourceChange = function () {
     } else {
         TalentInfoInfoDlg.ajaxGetConditionFile(source);
     }
-    $("#source").parents("td").attr("colspan", columns);
-    $("#talent_arrange").parents("td").attr("colspan", columns);
-    $("#talent_condition").parents("td").attr("colspan", columns - 1);
+    //$("#source").parents("td").attr("colspan", columns);
+    //$("#talent_arrange").parents("td").attr("colspan", columns);
+    //$("#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;

+ 11 - 11
public/static/modular/gate/talentInfo/talentInfo_select.js

@@ -184,17 +184,17 @@ $(function () {
         });
         Feng.getCheckLog("logTable", {"type": CONFIG.project_rcrd, "mainId": id, "typeFileId": "", "active": 1})
     }
-    var source = $("#source").val();
-    var columns = 3;
-    if (source == 1 || source == 2) {
-        columns = 3;
-    } else if (source == 3 || source == 4) {
-        columns = 4;
-    }
-
-    $("#source").parents("td").attr("colspan", columns);
-    $("#talent_arrange").parents("td").attr("colspan", columns);
-    $("#talent_condition").parents("td").attr("colspan", columns - 1);
+    /*var source = $("#source").val();
+     var columns = 3;
+     if (source == 1 || source == 2) {
+     columns = 3;
+     } else if (source == 3 || source == 4) {
+     columns = 4;
+     }
+     
+     $("#source").parents("td").attr("colspan", columns);
+     $("#talent_arrange").parents("td").attr("colspan", columns);
+     $("#talent_condition").parents("td").attr("colspan", columns - 1);*/
 });
 
 

+ 13 - 13
public/static/modular/talentIdentify/talentInfo/talentInfo_common_check.js

@@ -579,7 +579,7 @@ TalentInfoInfoDlg.firstCheck = function (i) {
         Feng.info("请选择可修改的字段或附件!");
         return;
     }
-    if(checkState == 5 && companys == ""){
+    if (checkState == 5 && companys == "") {
         Feng.info("请选择需要再次审核的部门!");
         return;
     }
@@ -827,19 +827,19 @@ $(function () {
     if (type == 1) {
         TalentInfoInfoDlg.initFileTable();
     }
-    
-    var source = $("#source").val();
-    var columns = 3;
-    if (source == 1 || source == 2) {
-        columns = 3;
-    } else if (source == 3 || source == 4) {
-        columns = 4;
-    }
 
-    $("#source").parents("td").attr("colspan", columns);
-    $("#talent_arrange").parents("td").attr("colspan", columns);
-    $("#talent_condition").parents("td").attr("colspan", columns - 1);
-    
+    /*var source = $("#source").val();
+     var columns = 3;
+     if (source == 1 || source == 2) {
+     columns = 3;
+     } else if (source == 3 || source == 4) {
+     columns = 4;
+     }
+     
+     $("#source").parents("td").attr("colspan", columns);
+     $("#talent_arrange").parents("td").attr("colspan", columns);
+     $("#talent_condition").parents("td").attr("colspan", columns - 1);*/
+
     //$(".ibox-content").viewer({fullscreen: false});
     Feng.getCheckLog("logTable", {"type": CONFIG.project_rcrd, "mainId": $("#id").val(), "typeFileId": "", "active": 1})
 });