瀏覽代碼

Merge remote-tracking branch 'origin/master'

sandm 2 年之前
父節點
當前提交
6b0cb62cc3
共有 32 個文件被更改,包括 676 次插入462 次删除
  1. 118 55
      app/admin/controller/Enterprise.php
  2. 194 151
      app/admin/controller/EnterpriseChangeRecord.php
  3. 19 4
      app/admin/controller/IntegralMgr.php
  4. 3 3
      app/admin/view/enterprise_change_record/goto_enterprise_change_examine_page.html
  5. 1 1
      app/admin/view/integral_mgr/items.html
  6. 6 6
      app/admin/view/integral_mgr/save.html
  7. 21 0
      app/admin/view/integral_mgr/save_item.html
  8. 22 28
      app/admin/view/talent/talentInfo_common_check.html
  9. 1 1
      app/common.php
  10. 5 5
      app/common/api/DictApi.php
  11. 11 3
      app/common/api/IntegralItemApi.php
  12. 1 1
      app/common/api/IntegralProjectApi.php
  13. 43 1
      app/common/api/VerifyApi.php
  14. 30 30
      app/common/controller/Auth.php
  15. 1 0
      app/common/view/auth/enterprise_edit.html
  16. 5 33
      app/enterprise/controller/Api.php
  17. 2 2
      app/enterprise/controller/Integral.php
  18. 6 6
      app/enterprise/controller/Talent.php
  19. 19 25
      app/enterprise/view/talent/apply.html
  20. 27 33
      app/enterprise/view/talent/view.html
  21. 21 14
      public/static/modular/enterprise/enterprise_examine.js
  22. 12 1
      public/static/modular/enterprise/enterprise_list.js
  23. 9 1
      public/static/modular/enterprise/enterprisechangeRecord/ep_change_record_detail.js
  24. 13 4
      public/static/modular/enterprise/enterprisechangeRecord/ep_change_record_examine.js
  25. 2 2
      public/static/modular/gate/enterprise/enterprise_change_edit.js
  26. 1 1
      public/static/modular/gate/enterprise/enterprise_edit.js
  27. 20 20
      public/static/modular/gate/talentInfo/new_talentInfo_info.js
  28. 11 11
      public/static/modular/gate/talentInfo/talentInfo_select.js
  29. 19 0
      public/static/modular/talentIdentify/integralMgr/IntegralItemMgr_info.js
  30. 1 7
      public/static/modular/talentIdentify/integralMgr/IntegralMgr_info.js
  31. 19 0
      public/static/modular/talentIdentify/integralMgr/integralItemMgr.js
  32. 13 13
      public/static/modular/talentIdentify/talentInfo/talentInfo_common_check.js

+ 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()]);
         }

+ 194 - 151
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]);
         }
     }
 
@@ -678,7 +721,7 @@ class EnterpriseChangeRecord extends AdminController {
             $data["modify_files"] = $files ? implode(",", $files) : null;
             $data["updateTime"] = date("Y-m-d H:i:s");
             $data["updateUser"] = session("user")["uid"];
-            if (EnterpriseApi::updateById($data)) {
+            if (\app\enterprise\model\EnterpriseRecord::update($data)) {
                 return json(["code" => 200, "msg" => "修改成功!"]);
             }
         } catch (\think\Exception $e) {

+ 19 - 4
app/admin/controller/IntegralMgr.php

@@ -56,6 +56,9 @@ class IntegralMgr extends AdminController {
         if (!$params["projectType"]) {
             return json(["msg" => "请选择项目类别"]);
         }
+        if (!$params["active"]) {
+            return json(["msg" => "请设置启用状态"]);
+        }
         if (!$params["limit"]) {
             return json(["msg" => "请选择是否上限"]);
         }
@@ -70,9 +73,6 @@ class IntegralMgr extends AdminController {
                 return json(["msg" => "积分上限必需是大于0的整数"]);
             }
         }
-        if (!$params["active"]) {
-            return json(["msg" => "请设置启用状态"]);
-        }
         if (IntegralProjectApi::chkExist($params["name"], $params["type"], $params["projectType"], $params["id"]))
             return json(["msg" => "项目名称已经被使用"]);
         $resultStr = $params["id"] ? "编辑" : "添加";
@@ -136,7 +136,7 @@ class IntegralMgr extends AdminController {
             return json(["msg" => "请输入首次达成量"]);
         }
         if (!$params["fstGainPoints"]) {
-            return json(["msg" => "请输入首次获得积分"]);
+            //return json(["msg" => "请输入首次获得积分"]);
         }
         if ($params["plan"] == 2) {
             if (!$params["stepNeedAmount"]) {
@@ -146,6 +146,20 @@ class IntegralMgr extends AdminController {
                 return json(["msg" => "请输入每新增获得积分"]);
             }
         }
+        if (!$params["limit"]) {
+            return json(["msg" => "请选择是否上限"]);
+        }
+        if ($params["limit"] == 1) {
+            if (!$params["yearly"]) {
+                return json(["msg" => "请选择上限方案"]);
+            }
+            if (!$params["max"]) {
+                return json(["msg" => "请填写积分上限"]);
+            }
+            if (!is_numeric($params["max"]) || $params["max"] < 1 || $params["max"] != floor($params["max"])) {
+                return json(["msg" => "积分上限必需是大于0的整数"]);
+            }
+        }
         if (IntegralItemApi::chkExist($params["name"], $params["projectId"], $params["id"]))
             return json(["msg" => "名称已经被使用"]);
         $resultStr = $params["id"] ? "编辑" : "添加";
@@ -165,6 +179,7 @@ class IntegralMgr extends AdminController {
 
     public function getProjectsByType() {
         $type = $this->request->param("type") ?: 0;
+        $projectType = $this->request->param("projectType") ?: 0;
         $where[] = ["type", "=", $type];
         $where[] = ["active", "=", 1];
         $list = IntegralProjectApi::getAll($where);

+ 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;">

+ 1 - 1
app/admin/view/integral_mgr/items.html

@@ -74,7 +74,7 @@
 
                             </div>
                         </div>
-                        <div class="hidden-xs" id="IntegralMgrTableToolbar" role="group">
+                        <div class="hidden-xs" id="IntegralItemMgrTableToolbar" role="group">
                             {if condition="chkCommission('/admin/integral_mgr/addItem','')"}
                                 <button type="button" class="btn btn-sm btn-primary " onclick="IntegralItemMgr.openAddIntegralItem()">
                                     <i class="fa fa-plus"></i>&nbsp;添加

+ 6 - 6
app/admin/view/integral_mgr/save.html

@@ -25,12 +25,6 @@
                                     <option value="2">集成电路优秀人才</option>
                                 </select>
                             </div>
-                            <label class="col-sm-2 control-label spacing">项目名称</label>
-                            <div class="col-sm-4 spacing">
-                                <input class="form-control" id="name" name="name" value="{$row.name}">
-                            </div>
-                        </div>
-                        <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">项目类别</label>
                             <div class="col-sm-4 spacing">
                                 <select class="form-control" id="projectType" name="projectType" selectVal="{$row.projectType}">
@@ -40,6 +34,12 @@
                                     <option value="3">资历分</option>
                                 </select>
                             </div>
+                        </div>
+                        <div class="rowGroup">
+                            <label class="col-sm-2 control-label spacing">项目名称</label>
+                            <div class="col-sm-4 spacing">
+                                <input class="form-control" id="name" name="name" value="{$row.name}">
+                            </div>
                             <label class="col-sm-2 control-label spacing">是否上限</label>
                             <div class="col-sm-4 spacing">
                                 <select class="form-control" id="limit" name="limit" selectVal="{$row.limit}" onchange="IntegralMgrInfo.onLimitChange();">

+ 21 - 0
app/admin/view/integral_mgr/save_item.html

@@ -89,6 +89,27 @@
                                     {/volist}
                                 </select>
                             </div>
+                            <label class="col-sm-2 control-label spacing">是否上限</label>
+                            <div class="col-sm-4 spacing">
+                                <select class="form-control" id="limit" name="limit" selectVal="{$row.limit}" onchange="IntegralItemMgrInfo.onLimitChange();">
+                                    <option value="1">开启</option>
+                                    <option value="2">关闭</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="rowGroup limit-setting" style="display:none;">
+                            <label class="col-sm-2 control-label spacing">上限方案</label>
+                            <div class="col-sm-4 spacing">
+                                <select class="form-control" id="yearly" name="yearly" selectVal="{$row.yearly}">
+                                    <option value="">请选择</option>
+                                    <option value="1">年度重置</option>
+                                    <option value="2">不重置</option>
+                                </select>
+                            </div>
+                            <label class="col-sm-2 control-label spacing">积分上限</label>
+                            <div class="col-sm-4 spacing">
+                                <input class="form-control" id="max" name="max" value="{$row.max}">
+                            </div>
                         </div>
                     </div>
                 </form>

+ 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">

+ 1 - 1
app/common.php

@@ -208,7 +208,7 @@ function export($columns, $rows, $filename = "jjrcw", $settings = [], $sheetname
     }
 
     header('Content-Type: application/vnd.ms-excel');
-    header('Content-Disposition: attachment;filename="' . $filename . '"');
+    header('Content-Disposition: attachment;filename="' . $filename . '.xls"');
     $writer = new \PhpOffice\PhpSpreadsheet\Writer\Xls($spreadsheet);
     $writer->save($saveurl);
     //删除临时的sheet

+ 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) {

+ 11 - 3
app/common/api/IntegralItemApi.php

@@ -29,14 +29,14 @@ class IntegralItemApi {
         }
         $count = IntegralItem::alias("i")->leftJoin("new_integral_project p", "p.id=i.projectId")->where($where)->count();
         $list = IntegralItem::alias("i")->leftJoin("new_integral_project p", "p.id=i.projectId")->where($where)
-                        ->field("i.*,p.type,p.name as projectName,p.projectType")
-                        ->limit($offset, $limit)->order("i.updateTime desc,i.createTime desc")->select()->toArray();
+                        ->field("i.*,p.type,p.name as projectName,p.projectType,if(i.updateTime is null,i.createTime,i.updateTime) as orderTime")
+                        ->limit($offset, $limit)->order("orderTime desc")->select()->toArray();
         return ["total" => $count, "rows" => $list];
     }
 
     public static function getAll($where = []) {
         $where[] = ["delete", "=", 0];
-        $list = IntegralItem::where($where)->order("updateTime desc,createTime desc")->select()->toArray();
+        $list = IntegralItem::where($where)->field("*,if(updateTime is null,createTime,updateTime) as orderTime")->order("orderTime desc")->select()->toArray();
         return $list;
     }
 
@@ -56,6 +56,14 @@ class IntegralItemApi {
             $data["stepNeedAmount"] = 0;
             $data["stepGainPoints"] = 0;
         }
+        $data["limit"] = $params["limit"];
+        if ($data["limit"] == 1) {
+            $data["yearly"] = $params["yearly"];
+            $data["max"] = $params["max"];
+        } else {
+            $data["yearly"] = 0;
+            $data["max"] = 0;
+        }
         if ($params["id"]) {
             $item = $model->find($params["id"]);
             $data["updateTime"] = date("Y-m-d H:i:s");

+ 1 - 1
app/common/api/IntegralProjectApi.php

@@ -34,7 +34,7 @@ class IntegralProjectApi {
 
     public static function getAll($where = []) {
         $where[] = ["delete", "=", 0];
-        $list = IntegralProject::where($where)->order("updateTime desc,createTime desc")->select()->toArray();
+        $list = IntegralProject::where($where)->field("*,if(updateTime is null,createTime,updateTime) as orderTime")->order("orderTime desc")->select()->toArray();
         return $list;
     }
 

+ 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:

+ 30 - 30
app/common/controller/Auth.php

@@ -317,36 +317,36 @@ class Auth extends BaseController {
         $ep = EnterpriseApi::getOne(session('temp')['uid']);
         if ($this->request->isPost()) {
             $response_object = new \StdClass();
-            //注释注册驳回$data = $ep->toArray();
-            $data = [
-                'name' => \StrUtil::getRequestDecodeParam($this->request, 'name'), //单位名称
-                'idCard' => \StrUtil::getRequestDecodeParam($this->request, 'idCard'), //统一社会信用代码
-                'agentName' => \StrUtil::getRequestDecodeParam($this->request, 'agentName'), //人才联络员
-                'legal' => \StrUtil::getRequestDecodeParam($this->request, 'legal'), //法人
-                'street' => \StrUtil::getRequestDecodeParam($this->request, 'street'), //镇街
-                'address' => \StrUtil::getRequestDecodeParam($this->request, 'address'), //地址
-                'type' => intval($this->request['type']),
-                'agencyType' => intval($this->request['agencyType']),
-                'enterpriseTag' => \StrUtil::getRequestDecodeParam($this->request, 'enterpriseTag'), //单位标签
-                'organizationTag' => \StrUtil::getRequestDecodeParam($this->request, 'organizationTag'), //机构标签
-                'institutionTag' => \StrUtil::getRequestDecodeParam($this->request, 'institutionTag'), //事业单位标签
-                'enterpriseType' => \StrUtil::getRequestDecodeParam($this->request, 'enterpriseType'), //单位类型
-                'agentPhone' => \StrUtil::getRequestDecodeParam($this->request, 'agentPhone'), //手机
-                'agentEmail' => \StrUtil::getRequestDecodeParam($this->request, 'agentEmail'), //邮箱
-                'ephone' => \StrUtil::getRequestDecodeParam($this->request, 'ephone'), //单位电话
-                'industryFieldNew' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldNew'), //产业领域
-                'industryFieldOld' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldOld'), //行业领域
-                'bankCard' => \StrUtil::getRequestDecodeParam($this->request, 'bankCard'), //银行
-                'bank' => \StrUtil::getRequestDecodeParam($this->request, 'bank'), //开户行
-                'bankNetwork' => \StrUtil::getRequestDecodeParam($this->request, 'bankNetwork')//网点
-            ];
-            /* 注释注册驳回字段if ($ep->modify_fields) {
-              $modify_fields = explode(",", $ep->modify_fields);
-              foreach ($modify_fields as $field) {
-              $data[$field] = \StrUtil::getRequestDecodeParam($this->request, $field);
-              }
-              } */
-            $modify_files = ["imgurl", "bankImg", "domainImg", "typeImg", "beian"]; //注释注册驳回附件explode(",", $ep->modify_files);
+            $data = $ep->toArray();
+            /* $data = [
+              'name' => \StrUtil::getRequestDecodeParam($this->request, 'name'), //单位名称
+              'idCard' => \StrUtil::getRequestDecodeParam($this->request, 'idCard'), //统一社会信用代码
+              'agentName' => \StrUtil::getRequestDecodeParam($this->request, 'agentName'), //人才联络员
+              'legal' => \StrUtil::getRequestDecodeParam($this->request, 'legal'), //法人
+              'street' => \StrUtil::getRequestDecodeParam($this->request, 'street'), //镇街
+              'address' => \StrUtil::getRequestDecodeParam($this->request, 'address'), //地址
+              'type' => intval($this->request['type']),
+              'agencyType' => intval($this->request['agencyType']),
+              'enterpriseTag' => \StrUtil::getRequestDecodeParam($this->request, 'enterpriseTag'), //单位标签
+              'organizationTag' => \StrUtil::getRequestDecodeParam($this->request, 'organizationTag'), //机构标签
+              'institutionTag' => \StrUtil::getRequestDecodeParam($this->request, 'institutionTag'), //事业单位标签
+              'enterpriseType' => \StrUtil::getRequestDecodeParam($this->request, 'enterpriseType'), //单位类型
+              'agentPhone' => \StrUtil::getRequestDecodeParam($this->request, 'agentPhone'), //手机
+              'agentEmail' => \StrUtil::getRequestDecodeParam($this->request, 'agentEmail'), //邮箱
+              'ephone' => \StrUtil::getRequestDecodeParam($this->request, 'ephone'), //单位电话
+              'industryFieldNew' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldNew'), //产业领域
+              'industryFieldOld' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldOld'), //行业领域
+              'bankCard' => \StrUtil::getRequestDecodeParam($this->request, 'bankCard'), //银行
+              'bank' => \StrUtil::getRequestDecodeParam($this->request, 'bank'), //开户行
+              'bankNetwork' => \StrUtil::getRequestDecodeParam($this->request, 'bankNetwork')//网点
+              ]; */
+            if ($ep->modify_fields) {
+                $modify_fields = explode(",", $ep->modify_fields);
+                foreach ($modify_fields as $field) {
+                    $data[$field] = \StrUtil::getRequestDecodeParam($this->request, $field);
+                }
+            }
+            $modify_files = explode(",", $ep->modify_files); //["imgurl", "bankImg", "domainImg", "typeImg", "beian"];
             $files = $this->request->file();
             if ($files) {
                 $uploadapi = new UploadApi();

+ 1 - 0
app/common/view/auth/enterprise_edit.html

@@ -15,6 +15,7 @@
                 <div class="col-sm-12">
                     <form id="ep_form" action="/common/auth/enterprise_edit" method="post" class="form-horizontal" enctype="multipart/form-data" target="hiddenIframe">
                         <input type="hidden" id="id" name="id" value="{$ep.id}">
+                        <input type="hidden" id="type" name="type" value="{$ep.type}">
                         <input type="hidden" id="special" name="special" value="{$ep.special}">
                         <input type="hidden" id="files" name="files" value="{$ep.modify_files}">
                         <input type="hidden" id="fields" name="fields" value="{$ep.modify_fields}">

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

@@ -391,38 +391,11 @@ class Api extends EnterpriseController {
                     $record->newBank = $data['bank'];
                     $record->newBankNetwork = $data['bankNetwork'];
                 } else {
-                    /* 注释变更驳回如果恢复,这段要去掉 */
-                    $record->newAgencyType = $data['agencyType'];
-                    $record->newName = htmlspecialchars($data['name']);
-                    $record->newIdCard = htmlspecialchars($data['idCard']);
-                    if ($data["agencyType"] == 1) {
-                        $record->newIndustryFieldNew = $data['industryFieldNew'];
-                        $record->newIndustryFieldOld = $data['industryFieldOld'];
-                    } else {
-                        $record->newIndustryFieldNew = null;
-                        $record->newIndustryFieldOld = null;
+                    $fields = array_filter(explode(",", $record->modify_fields));
+                    for ($i = 0; $i < count($fields); $i++) {
+                        $key = lcfirst(substr($fields[$i], 3));
+                        $record[$fields[$i]] = $data[$key]; //仅可修改选择的字段
                     }
-                    $record->newStreet = $data['street'];
-                    $record->newAddress = $data['address'];
-                    $record->newLegal = $data['legal'];
-                    $record->newEphone = $data['ephone'];
-                    $record->newAgentName = $data['agentName'];
-                    $record->newAgentEmail = $data['agentEmail'];
-                    $record->newAgentPhone = $data['agentPhone'];
-                    $record->newEnterpriseTag = $data['enterpriseTag'];
-                    $record->newOrganizationTag = $data['organizationTag'];
-                    $record->newInstitutionTag = $data['institutionTag'];
-                    $record->newEnterpriseType = $data['enterpriseType'];
-                    $record->newBankCard = $data['bankCard'];
-                    $record->newBank = $data['bank'];
-                    $record->newBankNetwork = $data['bankNetwork'];
-                    /* 注释变更驳回如果恢复,这段要去掉 */
-
-                    /* 注释变更驳回$fields = array_filter(explode(",", $record->modify_fields));
-                      for ($i = 0; $i < count($fields); $i++) {
-                      $key = lcfirst(substr($fields[$i], 3));
-                      $record[$fields[$i]] = $data[$key]; //仅可修改选择的字段
-                      } */
                 }
                 if (!$record["newImgurl"]) {
                     if (strtotime($record["createTime"]) < strtotime($this->compatible_time)) {
@@ -483,8 +456,7 @@ class Api extends EnterpriseController {
                 $files = $this->request->file();
                 if ($files) {
                     $uploadapi = new UploadApi();
-                    //注释变更驳回$modify_files = array_filter(explode(",", $record->modify_files));
-                    $modify_files = ["newImgurl", "newBankImg", "newDomainImg", "newTypeImg", "newBeian"];
+                    $modify_files = array_filter(explode(",", $record->modify_files)); //["newImgurl", "newBankImg", "newDomainImg", "newTypeImg", "newBeian"];
                     if (strtotime($record->createTime) < strtotime($this->compatible_time)) {
                         //旧typeid需要转换成新的禁用文件格式
                         $oldtypes = ["1161965644164075522" => "newImgurl", "1518753449987148467" => "newImgurl", "1518328155588131269" => "newBankImg", "1518926324960220206" => "newBankImg",

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

@@ -78,9 +78,9 @@ class Integral extends EnterpriseController {
     }
 
     /**
-     * 提交表单(新:混合基础信息人才申报信息)晋江人才
+     * 提交申请
      */
-    private function submitToCheck() {
+    public function submitToCheck() {
         $params = $this->request->param();
         $id = $params["id"];
         $info = IntegralRecordApi::chkIsOwner($id, $this->user["uid"]);

+ 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 () {

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

@@ -466,8 +466,8 @@ EpChangeEdit.submitToCheck = function () {
 EpChangeEdit.setFieldDisabled = function () {
     var checkState = $("#checkState").length > 0 ? $("#checkState").val() : 1;
     if (checkState != 1) {
-        //注释变更驳回$("#ecr_form :input").prop("disabled", true);
-        //注释变更驳回$("#ecr_form :button").css("display", "none");
+        $("#ecr_form :input").prop("disabled", true);
+        $("#ecr_form :button").css("display", "none");
         var fields = $("#fields").val().split(",");
         for (var i in fields) {
             $("#" + fields[i]).removeAttr("disabled");

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

@@ -229,7 +229,7 @@ $("#imgurl,#bankImg,#beian,#domainImg,#typeImg").change(function (e) {
     };
 });
 Register.setFieldDisabled = function () {
-    //注释驳回限制$("#ep_form :input").not("button").prop("disabled", true);
+    $("#ep_form :input").not("button").prop("disabled", true);
     var fields = $("#fields").val().split(",");
     for (var i in fields) {
         $("#" + fields[i]).removeAttr("disabled");

+ 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);*/
 });
 
 

+ 19 - 0
public/static/modular/talentIdentify/integralMgr/IntegralItemMgr_info.js

@@ -121,6 +121,9 @@ IntegralItemMgrInfo.collectData = function () {
             .set('stepNeedAmount')
             .set('stepGainPoints')
             .set('fileTypeId')
+            .set('limit')
+            .set('yearly')
+            .set('max')
             .set('active');
 }
 
@@ -162,6 +165,21 @@ IntegralItemMgrInfo.onIntegralPlanChange = function () {
     }
 }
 
+IntegralItemMgrInfo.onLimitChange = function () {
+    var limit = $("#limit").val();
+    switch (limit) {
+        case "1":
+            $('#integraMgrInfoForm').bootstrapValidator('addField', "yearly", {validators: {notEmpty: {message: '请选择上限方案'}}});
+            $('#integraMgrInfoForm').bootstrapValidator('addField', "max", {validators: {notEmpty: {message: '请填写积分上限'}}});
+            $(".limit-setting").css("display", "block");
+            break;
+        default:
+            $('#integraMgrInfoForm').bootstrapValidator('removeField', "yearly");
+            $('#integraMgrInfoForm').bootstrapValidator('removeField', "max");
+            $(".limit-setting").css("display", "none");
+    }
+}
+
 /**
  * 提交添加
  */
@@ -228,6 +246,7 @@ $(function () {
     });
     IntegralItemMgrInfo.onTypeChange();
     IntegralItemMgrInfo.onIntegralPlanChange();
+    IntegralItemMgrInfo.onLimitChange();
 
     $("#fileTypeId").chosen({
         no_results_text: "没有找到结果!",

+ 1 - 7
public/static/modular/talentIdentify/integralMgr/IntegralMgr_info.js

@@ -25,13 +25,6 @@ var IntegralMgrInfo = {
                 }
             }
         },
-        limit: {
-            validators: {
-                notEmpty: {
-                    message: '请选择是否上限'
-                }
-            }
-        },
         active: {
             validators: {
                 notEmpty: {
@@ -171,4 +164,5 @@ $(function () {
     $("select").each(function () {
         $(this).val($(this).attr("selectVal"));
     });
+    IntegralMgrInfo.onLimitChange();
 });

+ 19 - 0
public/static/modular/talentIdentify/integralMgr/integralItemMgr.js

@@ -52,6 +52,25 @@ IntegralItemMgr.initColumn = function () {
                 }
             }
         },
+        {title: '上限设置', field: 'limit', visible: true, align: 'center', valign: 'middle',
+            formatter: function (value, row, index) {
+                switch (value) {
+                    case 1:
+                        var limitStr = "上限" + row.max;
+                        switch (row.yearly) {
+                            case 1:
+                                limitStr += "(年度重置)";
+                                break;
+                            case 2:
+                                limitStr += "(不重置)";
+                                break;
+                        }
+                        return "<button type=\"button\" style=\"line-height: 1.3\" class=\"btn btn-primary btn-xs\">" + limitStr + "</button>";
+                    default:
+                        return "<button type=\"button\" style=\"line-height: 1.3\" class=\"btn btn-warning btn-xs\">关闭</button>";
+                }
+            }
+        },
         {title: '是否启用', field: 'active', visible: true, align: 'center', valign: 'middle',
             formatter: function (value, row, index) {
                 if (value == 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})
 });