瀏覽代碼

人才库 工作单位变更、离职、基础信息变更

sugangqiang 1 年之前
父節點
當前提交
c628446b3a
共有 36 個文件被更改,包括 2590 次插入713 次删除
  1. 138 0
      app/admin/controller/TalentBankChange.php
  2. 175 0
      app/admin/controller/TalentBasicChange.php
  3. 1 1
      app/admin/controller/TalentQuit.php
  4. 170 0
      app/admin/controller/TalentWorkUnitChange.php
  5. 162 0
      app/admin/view/talent_basic_change/check.html
  6. 135 0
      app/admin/view/talent_basic_change/index.html
  7. 0 1
      app/admin/view/talent_quit/index.html
  8. 178 0
      app/admin/view/talent_work_unit_change/check.html
  9. 116 0
      app/admin/view/talent_work_unit_change/index.html
  10. 1 1
      app/common/api/MenuApi.php
  11. 1 0
      app/common/api/VerifyApi.php
  12. 28 8
      app/common/controller/Api.php
  13. 16 0
      app/common/model/TalentBankChange.php
  14. 16 0
      app/common/model/TalentBasicChange.php
  15. 16 0
      app/common/model/TalentWorkUnitChange.php
  16. 17 0
      app/enterprise/controller/Talent.php
  17. 211 10
      app/enterprise/controller/TalentBankChange.php
  18. 276 10
      app/enterprise/controller/TalentBasicChange.php
  19. 46 4
      app/enterprise/controller/TalentQuit.php
  20. 211 10
      app/enterprise/controller/TalentWorkUnitChange.php
  21. 19 18
      app/enterprise/view/talent_bank_change/apply.html
  22. 28 22
      app/enterprise/view/talent_basic_change/apply.html
  23. 24 18
      app/enterprise/view/talent_basic_change/index.html
  24. 2 2
      app/enterprise/view/talent_quit/view.html
  25. 0 8
      app/enterprise/view/talent_work_unit_change/index.html
  26. 3 3
      app/enterprise/view/talent_work_unit_change/view.html
  27. 1 1
      public/static/js/common/Feng.js
  28. 4 4
      public/static/modular/gate/talentLibrary/talentBasicChange/talentBasicChange.js
  29. 47 46
      public/static/modular/gate/talentLibrary/talentBasicChange/talentBasicChange_info.js
  30. 3 3
      public/static/modular/gate/talentLibrary/talentWorkunitChange/talentWorkunitChange.js
  31. 201 199
      public/static/modular/gate/talentLibrary/talentWorkunitChange/talentWorkunitChange_info.js
  32. 110 112
      public/static/modular/gate/talentLibrary/talentWorkunitChange/talentWorkunitChange_select.js
  33. 41 37
      public/static/modular/talentLibrary/talentBasicChange/talentBasicChange.js
  34. 38 38
      public/static/modular/talentLibrary/talentBasicChange/talentBasicChange_info.js
  35. 61 64
      public/static/modular/talentLibrary/talentWorkunitChange/talentWorkunitChange.js
  36. 94 93
      public/static/modular/talentLibrary/talentWorkunitChange/talentWorkunitChange_info.js

+ 138 - 0
app/admin/controller/TalentBankChange.php

@@ -0,0 +1,138 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\admin\common\AdminController;
+use app\common\model\TalentBankChange as TbcModel;
+use app\common\api\DictApi;
+use app\common\state\MainState;
+use app\common\model\TalentLog;
+use app\common\state\ProjectState;
+use think\facade\Db;
+
+/**
+ * Description of TalentBankChange
+ *
+ * @author sgq
+ */
+class TalentBankChange extends AdminController {
+
+    public function index() {
+        return view("", ["type" => $this->user["type"]]);
+    }
+
+    public function list() {
+        $params = $this->request->param();
+        $offset = $params["offset"] ?: 0;
+        $order = $params["order"] ?: "desc";
+        $limit = $params["limit"] ?: 10;
+        $where = $this->setTalentQuit($params);
+        $where[] = ["type", "=", $this->user["type"]];
+        //获取字典表人才层次
+        $levelMap = DictApi::selectByParentCode("talent_arrange");
+        $typeMap = DictApi::selectByParentCode("enterprise_tag");
+        $count = TqModel::where($where)->count();
+        $list = TqModel::where($where)->limit($offset, $limit)->order("createTime {$order}")->select()->toArray();
+        foreach ($list as $key => $item) {
+            $list[$key]["talentArrangeName"] = $levelMap[$item["talentArrange"]];
+            $list[$key]["talentTypeName"] = $typeMap[$item["talentType"]];
+        }
+
+        return json(["rows" => $list, "total" => $count]);
+    }
+
+    public function check() {
+        $id = $this->request["id"];
+        $info = TqModel::where("id", $id)->find();
+        $info["talentArrangeName"] = DictApi::selectByParentCode("talent_arrange")[$info["talentArrange"]];
+        if (\StrUtil::isNotEmpAndNull($info["talentType"])) {
+            $info["talentTypeName"] = DictApi::selectByParentCode("enterprise_tag")[$info["talentType"]];
+        }
+        return view("check", ["type" => $this->user["type"], "row" => $info]);
+    }
+
+    public function submitToCheck() {
+        $responseObj = new \stdClass();
+        $responseObj->code = 500;
+        $id = $this->request["id"];
+        $checkState = $this->request["checkState"];
+        $checkMsg = $this->request["checkMsg"];
+        $info = TqModel::where("id", $id)->find();
+        if (!$info) {
+            $responseObj->msg = "系统错误,请联系管理员";
+            return $responseObj;
+        }
+        if (!$checkState) {
+            $responseObj->msg = "请选择审核状态";
+            return $responseObj;
+        }
+        Db::startTrans();
+        try {
+            //添加日志
+            $user = $this->user;
+            $log["id"] = getStringId();
+            $log["active"] = 1;
+            $log["state"] = $checkState;
+            $log["step"] = 11;
+            $log["stateChange"] = MainState::getStateName($info["checkState"]) . "->" . MainState::getStateName($checkState);
+            $log["type"] = ProjectState::QUIT;
+            $log["mainId"] = $id;
+            $log["description"] = $checkMsg;
+            $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+            $log["createTime"] = date("Y-m-d H:i:s");
+            $updTalentQuit["id"] = $id;
+            $updTalentQuit["checkState"] = $checkState;
+            $updTalentQuit["checkMsg"] = $checkMsg;
+            if ($checkState == 3) {
+                //修改人才库信息
+                $upd["id"] = $info["talentId"];
+                $upd["active"] = 2;
+                $upd["cur_quit_time"] = $info["quitTime"];
+                Db::table("new_talent_info")->save($upd);
+
+                $talentLog["id"] = getStringId();
+                $talentLog["active"] = 1;
+                $talentLog["step"] = 22;
+                $talentLog["type"] = ProjectState::TALENT;
+                $talentLog["mainId"] = $info["talentId"];
+                $talentLog["description"] = "离职变更通过,同步到人才库";
+                $talentLog["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+                $talentLog["createTime"] = date("Y-m-d H:i:s");
+                Db::table("new_talent_checklog")->insert($talentLog);
+                $updTalentQuit["passTime"] = date("Y-m-d H:i:s");
+            }
+            Db::table("new_talent_checklog")->insert($log);
+            Db::table("un_talent_quit")->save($updTalentQuit);
+            $responseObj->code = 200;
+            $responseObj->msg = "审核成功";
+
+            Db::commit();
+            return $responseObj;
+        } catch (\think\db\exception\DbException $e) {
+            $responseObj->msg = $e->getMessage();
+            Db::rollback();
+            return $responseObj;
+        }
+    }
+
+    private function setTalentQuit($talentQuitInfo) {
+        $where = [];
+        if (\StrUtil::isNotEmpAndNull($talentQuitInfo["talentName"])) {
+            $where[] = ["talentName", "=", $talentQuitInfo["talentName"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentQuitInfo["idCard"])) {
+            $where[] = ["idCard", "=", $talentQuitInfo["IdCard"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentQuitInfo["enterpriseName"])) {
+            $where[] = ["enterpriseName", "=", $talentQuitInfo["enterpriseName"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentQuitInfo["talentArrange"])) {
+            $where[] = ["talentArrange", "=", $talentQuitInfo["talentArrange"]];
+        }
+        if ($talentQuitInfo["checkState"] != null) {
+            $where[] = ["checkState", "=", $talentQuitInfo["checkState"]];
+        }
+        return $where;
+    }
+
+}

+ 175 - 0
app/admin/controller/TalentBasicChange.php

@@ -0,0 +1,175 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\admin\common\AdminController;
+use app\common\model\TalentBasicChange as TbcModel;
+use app\common\api\DictApi;
+use app\common\state\MainState;
+use app\common\model\TalentLog;
+use app\common\state\ProjectState;
+use think\facade\Db;
+
+/**
+ * Description of TalentBasicChange
+ *
+ * @author sgq
+ */
+class TalentBasicChange extends AdminController {
+
+    public function index() {
+        return view("", ["type" => $this->user["type"]]);
+    }
+
+    public function list() {
+        $params = $this->request->param();
+        $offset = $params["offset"] ?: 0;
+        $order = $params["order"] ?: "desc";
+        $limit = $params["limit"] ?: 10;
+        $where = $this->setTalentBasic($params);
+        $where[] = ["type", "=", $this->user["type"]];
+        $count = TbcModel::where($where)->count();
+        $list = TbcModel::where($where)->limit($offset, $limit)->order("createTime {$order}")->select()->toArray();
+        $nationalityMap = DictApi::selectByParentCode("nationality");
+        $nationMap = DictApi::selectByParentCode("nation");
+        $politicalMap = DictApi::selectByParentCode("politics");
+        $cardTypeMap = DictApi::selectByParentCode("card_type");
+        $epMaps = \app\common\model\Enterprise::column("name", "id");
+        foreach ($list as $key => $item) {
+            $list[$key]["oldNationalityName"] = $nationalityMap[$item["oldNationality"]];
+            $list[$key]["oldNationName"] = $nationMap[$item["oldNation"]];
+            $list[$key]["oldPoliticsName"] = $politicalMap[$item["oldPolitics"]];
+            $list[$key]["oldCardTypeName"] = $cardTypeMap[$item["oldCardType"]];
+            $list[$key]["newNationalityName"] = $nationalityMap[$item["newNationality"]];
+            $list[$key]["newNationName"] = $nationMap[$item["newNation"]];
+            $list[$key]["newPoliticsName"] = $politicalMap[$item["newPolitics"]];
+            $list[$key]["newCardTypeName"] = $cardTypeMap[$item["newCardType"]];
+            $list[$key]["enterpriseName"] = $epMaps[$item["enterpriseId"]];
+            if ($item["checkState"] == -1) {
+                $list[$key]["checkStateName"] = "待提交";
+            }
+            if ($item["checkState"] == 1) {
+                $list[$key]["checkStateName"] = "待审核";
+            }
+            if ($item["checkState"] == 2) {
+                $list[$key]["checkStateName"] = "审核驳回";
+            }
+            if ($item["checkState"] == 3) {
+                $list[$key]["checkStateName"] = "已通过";
+            }
+            if ($item["checkState"] == 9) {
+                $list[$key]["checkStateName"] = "重新提交";
+            }
+        }
+
+        return json(["rows" => $list, "total" => $count]);
+    }
+
+    public function check() {
+        $id = $this->request["id"];
+        $info = TbcModel::where("id", $id)->find();
+        return view("check", ["type" => $this->user["type"], "row" => $info]);
+    }
+
+    public function submitToCheck() {
+        $responseObj = new \stdClass();
+        $responseObj->code = 500;
+        $id = $this->request["id"];
+        $checkState = $this->request["checkState"];
+        $checkMsg = $this->request["checkMsg"];
+        $info = TbcModel::where("id", $id)->find();
+        if (!$info) {
+            $responseObj->msg = "系统错误,请联系管理员";
+            return $responseObj;
+        }
+        if (!$checkState) {
+            $responseObj->msg = "请选择审核状态";
+            return $responseObj;
+        }
+        Db::startTrans();
+        try {
+            //添加日志
+            $user = $this->user;
+            $log["id"] = getStringId();
+            $log["active"] = 1;
+            $log["state"] = $checkState;
+            $log["step"] = 11;
+            $log["stateChange"] = MainState::getStateName($info["checkState"]) . "->" . MainState::getStateName($checkState);
+            $log["type"] = ProjectState::BASICCHANGE;
+            $log["mainId"] = $id;
+            $log["description"] = $checkMsg;
+            $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+            $log["createTime"] = date("Y-m-d H:i:s");
+            $updTalentBasic["id"] = $id;
+            $updTalentBasic["checkState"] = $checkState;
+            $updTalentBasic["checkMsg"] = $checkMsg;
+            if ($checkState == 3) {
+                //修改人才库信息
+                $upd["id"] = $info["talentId"];
+                $upd["name"] = $info["newName"];
+                $upd["birthday"] = $info["newBirthday"];
+                $upd["nationality"] = $info["newNationality"];
+                $upd["nation"] = $info["newNation"];
+                $upd["politics"] = $info["newPolitics"];
+                $upd["card_type"] = $info["newCardType"];
+                $upd["card_number"] = $info["newIdCard"];
+                $upd["email"] = $info["newEmail"];
+                Db::table("new_talent_info")->save($upd);
+
+                $talentLog["id"] = getStringId();
+                $talentLog["active"] = 1;
+                $talentLog["step"] = 24;
+                $talentLog["type"] = ProjectState::TALENT;
+                $talentLog["mainId"] = $info["talentId"];
+                $talentLog["description"] = "基础信息变更通过,同步到人才库";
+                $talentLog["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+                $talentLog["createTime"] = date("Y-m-d H:i:s");
+                Db::table("new_talent_checklog")->insert($talentLog);
+            }
+            Db::table("new_talent_checklog")->insert($log);
+            Db::table("un_talent_basic_change")->save($updTalentBasic);
+            $responseObj->code = 200;
+            $responseObj->msg = "审核成功";
+
+            Db::commit();
+            return $responseObj;
+        } catch (\think\db\exception\DbException $e) {
+            $responseObj->msg = $e->getMessage();
+            Db::rollback();
+            return $responseObj;
+        }
+    }
+
+    private function setTalentBasic($talentBasicInfo) {
+        $where = [];
+        if (\StrUtil::isNotEmpAndNull($talentBasicInfo["enterpriseName"])) {
+            $whr = [];
+            $whr[] = ["name", "like", "%{$talentBasicInfo["enterpriseName"]}%"];
+            $ids = \app\common\model\Enterprise::where($whr)->column("id");
+            $where[] = ["enterpriseName", "in", $ids];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentBasicInfo["oldName"])) {
+            $where[] = ["oldName", "like", "%" . $talentBasicInfo["oldName"] . "%"];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentBasicInfo["oldCardType"])) {
+            $where[] = ["oldCardType", "=", $talentBasicInfo["oldCardType"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentBasicInfo["oldIdCard"])) {
+            $where[] = ["oldIdCard", "like", "%" . $talentBasicInfo["oldIdCard"] . "%"];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentBasicInfo["newName"])) {
+            $where[] = ["newName", "like", "%" . $talentBasicInfo["newName"] . "%"];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentBasicInfo["newCardType"])) {
+            $where[] = ["newCardType", "=", $talentBasicInfo["newCardType"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentBasicInfo["newIdCard"])) {
+            $where[] = ["newIdCard", "like", "%" . $talentBasicInfo["newIdCard"] . "%"];
+        }
+        if ($talentBasicInfo["checkState"] != null) {
+            $where[] = ["checkState", "=", $talentBasicInfo["checkState"]];
+        }
+        return $where;
+    }
+
+}

+ 1 - 1
app/admin/controller/TalentQuit.php

@@ -74,7 +74,7 @@ class TalentQuit extends AdminController {
             $log["active"] = 1;
             $log["state"] = $checkState;
             $log["step"] = 11;
-            $log["stateChange"] = MainState::getStateDesc($info["checkState"]) . "->" . MainState::getStateDesc($checkState);
+            $log["stateChange"] = MainState::getStateName($info["checkState"]) . "->" . MainState::getStateName($checkState);
             $log["type"] = ProjectState::QUIT;
             $log["mainId"] = $id;
             $log["description"] = $checkMsg;

+ 170 - 0
app/admin/controller/TalentWorkUnitChange.php

@@ -0,0 +1,170 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\admin\common\AdminController;
+use app\common\model\TalentWorkUnitChange as TwcModel;
+use app\common\api\DictApi;
+use app\common\state\MainState;
+use app\common\model\TalentLog;
+use app\common\state\ProjectState;
+use think\facade\Db;
+use app\common\api\EnterpriseApi;
+
+/**
+ * Description of TalentWorkUnitChange
+ *
+ * @author sgq
+ */
+class TalentWorkUnitChange extends AdminController {
+
+    public function index() {
+        return view("", ["type" => $this->user["type"]]);
+    }
+
+    public function list() {
+        $params = $this->request->param();
+        $offset = $params["offset"] ?: 0;
+        $order = $params["order"] ?: "desc";
+        $limit = $params["limit"] ?: 10;
+        $where = $this->setTalentWorkunitChange($params);
+        $where[] = ["type", "=", $this->user["type"]];
+        //获取字典表人才层次
+        $levelMap = DictApi::selectByParentCode("talent_arrange");
+        $epMaps = \app\common\model\Enterprise::column("name", "id");
+        $count = TwcModel::where($where)->count();
+        $list = TwcModel::where($where)->limit($offset, $limit)->order("createTime {$order}")->select()->toArray();
+        foreach ($list as $key => $item) {
+            $list[$key]["talentArrangeName"] = $levelMap[$item["talentArrange"]];
+            $list[$key]["oldEnterpriseName"] = $epMaps[$item["oldEnterpriseId"]];
+            $list[$key]["newEnterpriseName"] = $epMaps[$item["newEnterpriseId"]];
+            if ($item["checkState"] == -2) {
+                $list[$key]["checkStateName"] = "审核不通过";
+            }
+            if ($item["checkState"] == -1) {
+                $list[$key]["checkStateName"] = "待提交";
+            }
+            if ($item["checkState"] == 1) {
+                $list[$key]["checkStateName"] = "待审核";
+            }
+            if ($item["checkState"] == 2) {
+                $list[$key]["checkStateName"] = "审核驳回";
+            }
+            if ($item["checkState"] == 3) {
+                $list[$key]["checkStateName"] = "已通过";
+            }
+            if ($item["checkState"] == 9) {
+                $list[$key]["checkStateName"] = "重新提交";
+            }
+        }
+
+        return json(["rows" => $list, "total" => $count]);
+    }
+
+    public function check() {
+        $id = $this->request["id"];
+        $info = TwcModel::where("id", $id)->find();
+        $info["talentArrangeName"] = DictApi::selectByParentCode("talent_arrange")[$info["talentArrange"]];
+        $epOld = EnterpriseApi::getOne($info["oldEnterpriseId"]);
+        $epNew = EnterpriseApi::getOne($info["newEnterpriseId"]);
+        $info["oldEnterpriseName"] = $epOld["name"];
+        $info["newEnterpriseName"] = $epNew["name"];
+        return view("check", ["type" => $this->user["type"], "row" => $info]);
+    }
+
+    public function submitToCheck() {
+        $responseObj = new \stdClass();
+        $responseObj->code = 500;
+        $id = $this->request["id"];
+        $checkState = $this->request["checkState"];
+        $checkMsg = $this->request["checkMsg"];
+        $info = TwcModel::where("id", $id)->find();
+        if (!$info) {
+            $responseObj->msg = "系统错误,请联系管理员";
+            return $responseObj;
+        }
+        if (!$checkState) {
+            $responseObj->msg = "请选择审核状态";
+            return $responseObj;
+        }
+        $tmpState = $checkState == -2 ? -1 : $checkState;
+        Db::startTrans();
+        try {
+            //添加日志
+            $user = $this->user;
+            $log["id"] = getStringId();
+            $log["active"] = 1;
+            $log["state"] = $tmpState;
+            $log["step"] = 11;
+            $log["stateChange"] = MainState::getStateName($info["checkState"]) . "->" . MainState::getStateName($tmpState);
+            $log["type"] = ProjectState::WORKCHANGE;
+            $log["mainId"] = $id;
+            $log["description"] = $checkMsg;
+            $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+            $log["createTime"] = date("Y-m-d H:i:s");
+            $updWorkChange["id"] = $id;
+            $updWorkChange["checkState"] = $checkState;
+            $updWorkChange["checkMsg"] = $checkMsg;
+            if ($checkState == 3) {
+                //修改人才库信息
+                $upd["id"] = $info["talentId"];
+                $upd["enterprise_id"] = $info["newEnterpriseId"];
+                $upd["labor_contract_rangetime"] = $info["starttime"] . " - " . $info["endtime"];
+                $upd["cur_entry_time"] = $info["anyTime"];
+                $upd["active"] = 1;
+                $upd["cur_quit_time"] = null;
+                $upd["position"] = $info["newPost"];
+                Db::table("new_talent_info")->save($upd);
+
+                $talentLog["id"] = getStringId();
+                $talentLog["active"] = 1;
+                $talentLog["step"] = 21;
+                $talentLog["type"] = ProjectState::TALENT;
+                $talentLog["mainId"] = $info["talentId"];
+                $talentLog["description"] = "工作单位变更通过,同步到人才库";
+                $talentLog["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+                $talentLog["createTime"] = date("Y-m-d H:i:s");
+                Db::table("new_talent_checklog")->insert($talentLog);
+                $updWorkChange["passTime"] = date("Y-m-d H:i:s");
+            }
+            Db::table("new_talent_checklog")->insert($log);
+            Db::table("un_talent_workunit_change")->save($updWorkChange);
+            $responseObj->code = 200;
+            $responseObj->msg = "审核成功";
+
+            Db::commit();
+            return $responseObj;
+        } catch (\think\db\exception\DbException $e) {
+            $responseObj->msg = $e->getMessage();
+            Db::rollback();
+            return $responseObj;
+        }
+    }
+
+    private function setTalentWorkunitChange($twcInfo) {
+        $where = [];
+        if (\StrUtil::isNotEmpAndNull($twcInfo["talentName"])) {
+            $where[] = ["talentName", "=", $twcInfo["talentName"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($twcInfo["idCard"])) {
+            $where[] = ["idCard", "=", $twcInfo["IdCard"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($twcInfo["oldEnterpriseName"])) {
+            $whr = [];
+            $whr[] = ["name", "like", "%{$params["oldEnterpriseName"]}%"];
+            $ids = \app\common\model\Enterprise::where($whr)->column("id");
+            $where[] = ["oldEnterpriseId", "in", $ids];
+        }
+        if (\StrUtil::isNotEmpAndNull($twcInfo["newEnterpriseName"])) {
+            $whr = [];
+            $whr[] = ["name", "like", "%{$params["newEnterpriseName"]}%"];
+            $ids = \app\common\model\Enterprise::where($whr)->column("id");
+            $where[] = ["newEnterpriseId", "in", $ids];
+        }
+        if ($twcInfo["checkState"] != null) {
+            $where[] = ["checkState", "=", $talentQuitInfo["checkState"]];
+        }
+        return $where;
+    }
+
+}

+ 162 - 0
app/admin/view/talent_basic_change/check.html

@@ -0,0 +1,162 @@
+{extend name="layout/content"}
+{block name="content"}
+<style type="text/css">
+    .spacing {
+        margin-bottom: 10px;
+        padding-right:4px;
+        padding-left: 4px;
+    }
+    #talentInfoForm label {
+        font-size: xx-small;
+    }
+    .has-feedback .form-control {
+        padding-right: 5px;
+    }
+    .control-label{
+        color: #337ab7;
+    }
+    .rowGroup{
+        padding-bottom: 5px;
+    }
+    .imgs li{
+        list-style: none;
+        float: left;
+        border: 1px solid #d8d1d1;
+        text-align: center;
+        height: 30px;
+    }
+</style>
+<div class="ibox float-e-margins">
+    <div class="ibox-content">
+        <div class="form-horizontal">
+            <div class="row">
+                <div class="col-sm-12" >
+                    <div class="tabs-container" >
+                        <ul class="nav nav-tabs">
+                            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">1.基础信息</a></li>
+                            <li id="fileLi" class=""><a data-toggle="tab" href="#tab-2" onclick="initNoBtnFileTable(CONFIG.project_basicchange,'fileTable',)"  aria-expanded="false">2.附件上传</a></li>
+                        </ul>
+                    </div>
+                    <div class="tab-content">
+                        <div id="tab-1" class="tab-pane active">
+                            <div class="panel-body" >
+                                <div class="panel panel-default">
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
+                                    <div class="panel-body">
+                                        <form id="basicChangeForm" class="form-horizontal">
+                                            <div class="col-sm-12 form-group-sm">
+                                                <input type="hidden" name="id" id="id" value="{$row.id}">
+                                                <input type="hidden" name="enterpriseId" id="enterpriseId" value="{$row.enterpriseId}">
+                                                <input type="hidden" name="type" id="type" value="{$row.type}">
+                                                <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}">
+                                                <input type="hidden" name="talentId" id="talentId" value="{$row.talentId}">
+                                                <div class="row">
+                                                    <div class="col-sm-12">
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>原姓名</label>
+                                                            <input type="text" class="form-control date" id="oldName" name="oldName" value="{$row.oldName}" style="pointer-events: none;background-color: #eee;"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>原出生日期</label>
+                                                            <input type="text" class="form-control date" id="oldBirthday" name="oldBirthday" value="{$row.oldBirthday}" style="pointer-events: none;background-color: #eee;"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>原国家/地区</label>
+                                                            <select class="form-control" id="oldNationality" name="oldNationality" value="{$row.oldNationality}" style="pointer-events: none;background-color: #eee;">
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class="control-label spacing"><span style="color: red">*</span>原民族</label>
+                                                            <select class="form-control" id="oldNation" name="oldNation" value="{$row.oldNation}" style="pointer-events: none;background-color: #eee;">
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>原政治面貌</label>
+                                                            <select class="form-control" id="oldPolitics" name="oldPolitics" value="{$row.oldPolitics}" style="pointer-events: none;background-color: #eee;">
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>原证件类型</label>
+                                                            <select class="form-control" id="oldCardType" name="oldCardType" value="{$row.oldCardType}" style="pointer-events: none;background-color: #eee;">
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>原证件号码</label>
+                                                            <input class="form-control" id="oldIdCard" name="oldIdCard" value="{$row.oldIdCard}" style="pointer-events: none;background-color: #eee;">
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class="control-label spacing"><span style="color: red">*</span>原电子邮箱</label>
+                                                            <input type="text" class="form-control" id="oldEmail" name="oldEmail" value="{$row.oldEmail}" style="pointer-events: none;background-color: #eee;"/>
+                                                        </div>
+
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>现姓名</label>
+                                                            <input type="text" class="form-control date" id="newName" name="newName" value="{$row.newName}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>现出生日期</label>
+                                                            <input type="text" class="form-control date" id="newBirthday" name="newBirthday" value="{$row.newBirthday}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>现国家/地区</label>
+                                                            <select class="form-control" id="newNationality" name="newNationality" value="{$row.newNationality}">
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class="control-label spacing"><span style="color: red">*</span>现民族</label>
+                                                            <select class="form-control" id="newNation" name="newNation" value="{$row.newNation}">
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>现政治面貌</label>
+                                                            <select class="form-control" id="newPolitics" name="newPolitics" value="{$row.newPolitics}">
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>现证件类型</label>
+                                                            <select class="form-control" id="newCardType" name="newCardType" value="{$row.newCardType}">
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>现证件号码</label>
+                                                            <input class="form-control" id="newIdCard" name="newIdCard" value="{$row.newIdCard}">
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class="control-label spacing"><span style="color: red">*</span>现电子邮箱</label>
+                                                            <input type="text" class="form-control" id="newEmail" name="newEmail" value="{$row.newEmail}"/>
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                                <div class="row">
+                                                    <label class="col-sm-12 control-label spacing" style="text-align: left"><span style="color: red">声明:本人对输入材料的真实性负全部责任</span></label>
+                                                </div>
+                                            </div>
+                                        </form>
+                                    </div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">日志</div>
+                                    <table id="logTable">
+                                    </table>
+                                </div>
+                            </div>
+                        </div>
+                        <div id="tab-2" class="tab-pane ">               
+                            <table id="fileTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true" data-click-to-select="true">
+                                <thead>
+                                    <tr>
+                                        <th data-field="selectItem" data-checkbox="true"></th>
+                                    </tr>
+                                </thead>
+                            </table>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
+<script type="text/javascript">
+    document.write('<script src="/static/modular/talentLibrary/talentBasicChange/talentBasicChange_info.js?v='+(new Date()).getTime()+'"><\/script>');
+    document.write('<script src="/static/modular/common/upload.js?v='+(new Date()).getTime()+'"><\/script>');
+</script>
+{/block}

+ 135 - 0
app/admin/view/talent_basic_change/index.html

@@ -0,0 +1,135 @@
+{extend name="layout/content"}
+{block name="content"}
+<div class="row">
+    <div class="col-sm-12">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <h5>人才基础信息变更管理</h5>
+            </div>
+            <div class="ibox-content">
+                <div class="row row-lg">
+                    <div class="col-sm-12">
+                        <div class="row">
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">申报单位
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="enterpriseName" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">原姓名
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="oldName" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            原证件类型
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="oldCardType">
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">原证件号码
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="oldIdCard" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">现姓名
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="newName" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            现证件类型
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="newCardType">
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">现证件号码
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="newIdCard" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            审核状态
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="checkState">
+                                        <option value="">请选择</option>
+                                        <option value="-1">待提交</option>
+                                        <option value="1">待审核</option>
+                                        <option value="9">重新提交</option>
+                                        <option value="2">已驳回</option>
+                                        <option value="3">已通过</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentBasicChange.search()">
+                                    <i class="fa fa-search"></i>&nbsp;搜索
+                                </button>
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentBasicChange.reset()">
+                                    <i class="fa fa-trash"></i>&nbsp;重置
+                                </button>
+                            </div>
+                        </div>
+                        <div class="hidden-xs" id="TalentBasicChangeTableToolbar" role="group">
+                            {if condition="chkCommission('/admin/talentBasicChange/check','/talentBasicChange/check')"}
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentBasicChange.openTalentBasicChangeDetail()">
+                                <i class="fa fa-check"></i>&nbsp;审核
+                            </button>
+                            {/if}
+                            {if condition="chkCommission('/admin/talentBasicChange/export','/talentBasicChange/export')"}
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentBasicChange.export()">
+                                <i class="fa fa-file-excel-o"></i>&nbsp;导出
+                            </button>
+                            {/if}
+                        </div>
+                        <table id="TalentBasicChangeTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true" data-click-to-select="true">
+                            <thead>
+                                <tr>
+                                    <th data-field="selectItem" data-checkbox="true"></th>
+                                </tr>
+                            </thead>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script type="text/javascript">
+    document.write('<script src="/static/modular/talentLibrary/talentBasicChange/talentBasicChange.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 0 - 1
app/admin/view/talent_quit/index.html

@@ -63,7 +63,6 @@
                                         <option value="9">重新提交</option>
                                         <option value="2">已驳回</option>
                                         <option value="3">已通过</option>
-
                                     </select>
                                 </div>
                             </div>

+ 178 - 0
app/admin/view/talent_work_unit_change/check.html

@@ -0,0 +1,178 @@
+{extend name="layout/content"}
+{block name="content"}
+<style type="text/css">
+    .spacing {
+        margin-bottom: 10px;
+        padding-right:4px;
+        padding-left: 4px;
+    }
+    .imgs li{
+        list-style: none;
+        float: left;
+        border: 1px solid #d8d1d1;
+        text-align: center;
+        height: 30px;
+    }
+</style>
+<div class="ibox float-e-margins">
+    <div class="ibox-content">
+        <div class="form-horizontal">
+            <div class="row">
+                <div class="col-sm-12" >
+                    <div class="tabs-container" >
+                        <ul class="nav nav-tabs">
+                            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">基本信息</a></li>
+                            <li id="fileLi" class=""><a data-toggle="tab" href="#tab-2" onclick="TalentWorkunitChangeInfoDlg.initFileTable()"  aria-expanded="false">单位变更申报附件</a></li>
+                            <li  class="" style="float: right;">                                
+                                <button type="button" class="btn btn-sm btn-primary " onclick="TalentWorkunitChangeInfoDlg.download()" >
+                                    <i class="fa fa-download"></i>&nbsp;打包下载
+                                </button>
+                            </li>
+                        </ul>
+                    </div>
+                    <div class="tab-content">
+                        <div id="tab-1" class="tab-pane active">
+                            <div class="panel-body" >
+                                <div class="panel panel-default">
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
+                                    <div class="panel-body">
+                                        <form id="talentWorkUnitForm">
+                                            <div class="col-sm-12 form-group-sm">
+                                                <input id="id" name="id" type="hidden" value="{$row.id}"/>
+                                                <input type="hidden" id="type" name="type" value="{$row.type}"/>
+                                                <input id="talentId" name="talentId" type="hidden" value="{$row.talentId}"/>
+                                                <input id="oldEnterpriseId" name="oldEnterpriseId" type="hidden" value="{$row.oldEnterpriseId}"/>
+                                                <input id="newEnterpriseId" name="newEnterpriseId" type="hidden" value="{$row.newEnterpriseId}"/>
+                                                <input id="checkState" name="checkState" type="hidden" value="{$row.checkState}"/>
+                                                <input id="oldTalentType" name="oldTalentType" type="hidden" value="{$row.oldTalentType}"/>
+                                                <input id="newTalentType" name="newTalentType" type="hidden" value="{$row.newTalentType}"/>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">证件号码</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="idCard" name="idCard" value="{$row.idCard}"/>
+                                                    </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="talentName" readonly="readonly" name="talentName" value="{$row.talentName}"/>
+                                                    </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="talentArrange" disabled="disabled" name="talentArrange" value="{$row.talentArrangeName}">
+                                                    </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="identifyTime" readonly="readonly" name="identifyTime" value="{$row.identifyTime}"/>
+                                                    </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="oldEnterpriseName" readonly="readonly" name="oldEnterpriseName" value="{$row.oldEnterpriseName}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原入职时间</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="oldAnyTime" name="oldAnyTime" value="{$row.oldAnyTime}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原职务</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="oldPost" name="oldPost" value="{$row.oldPost}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">离职时间</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="quitTime" name="quitTime" value="{$row.quitTime}"/>
+                                                    </div>
+                                                </div>
+                                                {if condition="$row['type'] eq 1"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">离职申报原因</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="quitReason" name="quitReason" value="{$row.quitReason}"/>
+                                                    </div>
+                                                </div>
+                                                {/if}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新单位名称</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newEnterpriseName" name="newEnterpriseName" value="{$row.newEnterpriseName}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">合同开始时间</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="starttime" name="starttime" value="{$row.starttime}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新职务</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newPost" name="newPost" value="{$row.newPost}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">合同结束时间</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="endtime" name="endtime" value="{$row.endtime}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">入职/变更时间</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="anyTime" name="anyTime" value="{$row.anyTime}"/>
+                                                    </div>
+                                                </div>
+                                                {if condition="$row['type'] eq 1"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">单位变更申报</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="anyReason" id="anyReason" name="anyTime" value="{$row.anyReason}"/>
+                                                    </div>
+                                                </div>
+                                                {/if}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">手机号码</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="phone" name="phone" value="{$row.phone}"/>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </form>
+                                    </div>
+                                </div>
+                                <div class="panel panel-default">
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">日志</div>
+                                    <table id="logTable">
+                                    </table>
+                                </div>
+                            </div>
+                        </div>
+                        <div id="tab-2" class="tab-pane ">               
+                            <table id="fileTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true" data-click-to-select="true">
+                                <thead>
+                                    <tr>
+                                        <th data-field="selectItem" data-checkbox="true"></th>
+                                    </tr>
+                                </thead>
+                            </table>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script type="text/javascript">
+    document.write('<script src="/static/modular/talentLibrary/talentWorkunitChange/talentWorkunitChange_info.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 116 - 0
app/admin/view/talent_work_unit_change/index.html

@@ -0,0 +1,116 @@
+{extend name="layout/content"}
+{block name="content"}
+<div class="row">
+    <div class="col-sm-12">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <h5>工作单位变更管理</h5>
+            </div>
+            <div class="ibox-content">
+                <div class="row row-lg">
+                    <div class="col-sm-12">
+                        <div class="row">
+                            <input type="hidden" id="type" value="{$type}">
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">姓名
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="talentName" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">证件号码
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="idCard" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">原工作单位
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="oldEnterpriseName" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">新工作单位
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="newEnterpriseName" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            审核状态
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="checkState">
+                                        <option value="">请选择</option>
+                                        <option value="-2">审核不通过</option>
+                                        <option value="-1">待提交</option>
+                                        <option value="1">待审核</option>
+                                        <option value="9">重新提交</option>
+                                        <option value="2">审核驳回</option>
+                                        <option value="3">审核通过</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentWorkunitChange.search()">
+                                    <i class="fa fa-search"></i>&nbsp;搜索
+                                </button>
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentWorkunitChange.reset()">
+                                    <i class="fa fa-trash"></i>&nbsp;重置
+                                </button>
+                            </div>
+                        </div>
+                        <div class="hidden-xs" id="TalentWorkunitChangeTableToolbar" role="group">
+                            {if condition="chkCommission('/admin/talentWorkUnitChange/workunitCheck','/talentWorkunitChange/workunitCheck')"}
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentWorkunitChange.openTalentWorkunitChangeCheck()">
+                                <i class="fa fa-check"></i>&nbsp;审核
+                            </button>
+                            {/if}
+                            {if condition="chkCommission('/admin/talentWorkUnitChange/workunitExport','/talentWorkunitChange/workunitExport')"}
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentWorkunitChange.export()">
+                                <i class="fa fa-file-excel-o"></i>&nbsp;导出
+                            </button>
+                            {/if}
+                            {if condition="chkCommission('/admin/talentWorkUnitChange/workunitDownload','/talentWorkunitChange/workunitDownload')"}
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentWorkunitChange.download()">
+                                <i class="fa fa-download"></i>&nbsp;下载
+                            </button>
+                            {/if}
+                            {if condition="chkCommission('/admin/talentWorkUnitChange/workunitDetail','/talentWorkunitChange/workunitDetail')"}
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentWorkunitChange.openTalentWorkunitChangeDetail()">
+                                <i class="fa fa-eye"></i>&nbsp;查看
+                            </button>
+                            {/if}
+                        </div>
+                        <table id="TalentWorkunitChangeTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true" data-click-to-select="true">
+                            <thead>
+                                <tr>
+                                    <th data-field="selectItem" data-checkbox="true"></th>
+                                </tr>
+                            </thead>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script type="text/javascript">
+    document.write('<script src="/static/modular/talentLibrary/talentWorkunitChange/talentWorkunitChange.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

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

@@ -231,7 +231,7 @@ class MenuApi {
         $menus[] = ["type" => [1, 2, 5, 6], "code" => "gzdwbg", "pcode" => "rcrd", "name" => "工作单位变更", "url" => "/enterprise/talent_work_unit_change/index", "icon" => "fa-thumbs-up", "status" => 1];
         $menus[] = ["type" => [1, 2, 5, 6], "code" => "yhzhbg", "pcode" => "rcrd", "name" => "银行账号变更", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
         $menus[] = ["type" => [1, 2, 5, 6], "code" => "rcccbg", "pcode" => "rcrd", "name" => "人才层次变更", "url" => "/enterprise/talent_type_change/index", "icon" => "fa-thumbs-up", "status" => 1];
-        $menus[] = ["type" => [1, 2, 5, 6], "code" => "jcxxbg", "pcode" => "rcrd", "name" => "基础信息变更", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [1, 2, 5, 6], "code" => "jcxxbg", "pcode" => "rcrd", "name" => "基础信息变更", "url" => "/enterprise/talent_basic_change/index", "icon" => "fa-thumbs-up", "status" => 1];
         $menus[] = ["type" => [1, 2, 5, 6], "code" => "jbtmanage", "pcode" => "0", "name" => "津补贴申报", "url" => "", "icon" => "fa-money", "status" => 0];
         $menus[] = ["type" => [1, 2, 5, 6], "code" => "jbtsb", "pcode" => "jbtmanage", "name" => "津补贴申报", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
         $menus[] = ["type" => [1, 2, 5, 6], "code" => "gfbt", "pcode" => "0", "name" => "购房补贴", "url" => "", "icon" => "fa-university", "status" => 0];

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

@@ -42,6 +42,7 @@ class VerifyApi {
             }
             $enterprise = Enterprise::findOrEmpty($info["enterprise_id"])->toArray();
             $info["enterpriseName"] = $enterprise["name"];
+            $info["enterpriseAddress"] = $enterprise["address"];
             $info["enterpriseId"] = $enterprise["id"];
             $info["enterpriseType"] = $enterprise["type"];
             $info["enterpriseEphone"] = $enterprise["ephone"];

+ 28 - 8
app/common/controller/Api.php

@@ -97,6 +97,7 @@ class Api extends BaseController {
             case 3:
             case 4:
             case 6:
+            case 9:
             case 19:
             case 20:
                 $list = TalentLogApi::getList($type, $mainId);
@@ -125,8 +126,9 @@ class Api extends BaseController {
                 case 3:
                 case 4:
                 case 6:
+                case 9:
                 case 19:
-                    $new_item["stateName"] = \app\common\state\LivingAllowanceState::getStepName($item["state"]);
+                    $new_item["stateName"] = \app\common\state\LivingAllowanceState::getStateName($item["state"]);
                     $new_item["stepName"] = \app\common\state\LivingAllowanceState::getStepName($item["step"]);
                     $new_item["stateChange"] = $item["stateChange"];
                     break;
@@ -224,7 +226,11 @@ class Api extends BaseController {
                     }
                     break;
                 case 1:
-                    $new_item["stepName"] = DictApi::getCheckLogStepName($item["state"], $item["step"]);
+                    if ($item["step"] && $item["step"] != 3) {
+                        $new_item["stepName"] = \app\common\state\LivingAllowanceState::getStepName($item["step"]);
+                    } else {
+                        $new_item["stepName"] = DictApi::getCheckLogStepName($item["state"], $item["step"]);
+                    }
                     if (in_array($item["state"], [TalentState::REVERIFY_FAIL, TalentState::ZX_FAIL, TalentState::ANNOUNCED_REVERIFY_FAIL, TalentState::PUBLISH_FAIL])) {
                         $new_item["stateName"] = '<span class="label label-danger">审核不通过</span>';
                     } else if (in_array($item["state"], [TalentState::BASE_VERIFY_PASS, TalentState::BASE_REVERIFY_PASS, TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS, TalentState::REVERIFY_PASS])) {
@@ -646,27 +652,41 @@ class Api extends BaseController {
      * 打包下载人才申请附件
      */
     public function downloadZip() {
+        $table = "new_talent_file";
         $param = $this->request->param();
         $type = $param["type"];
         $id = $param["id"];
-        $where = [];
-        $where[] = ["mainId", "=", $id];
-        $where[] = ["type", "=", $type];
-        $files = Db::table("new_talent_file")->where($where)->select()->toArray();
-        if (!$files)
-            die("没有附件不能打包下载");
 
         switch ($type) {
             case ProjectState::TALENT:
+                $where[] = ["type", "=", $type];
                 $talent_info = \app\enterprise\model\Talent::findOrEmpty($id);
                 $enterprise_info = \app\common\model\Enterprise::findOrEmpty($talent_info["enterprise_id"]);
                 $zip_filename = sprintf("%s(%s)人才申报材料.zip", $talent_info["name"], $enterprise_info["name"]);
                 break;
+            case ProjectState::QUIT:
+                $table = "new_talent_common_file";
+                $info = \app\common\model\TalentQuit::findOrEmpty($id);
+                $enterprise_info = \app\common\model\Enterprise::findOrEmpty($info["enterpriseId"]);
+                $zip_filename = sprintf("%s(%s)离职材料.zip", $info["talentName"], $enterprise_info["name"]);
+                break;
+            case ProjectState::WORKCHANGE:
+                $table = "new_talent_common_file";
+                $info = \app\common\model\TalentWorkUnitChange::findOrEmpty($id);
+                $enterprise_info = \app\common\model\Enterprise::findOrEmpty($info["enterpriseId"]);
+                $zip_filename = sprintf("%s(%s)工作单位变更材料.zip", $info["talentName"], $enterprise_info["name"]);
+                break;
             case ProjectState::INTEGRAL:
+                $where[] = ["type", "=", $type];
                 $record = \app\common\api\IntegralRecordApi::getOne($id);
                 $zip_filename = sprintf("%s(%s)积分申报材料.zip", $record["name"], $record["enterprise"]["name"]);
                 break;
         }
+        $where = [];
+        $where[] = ["mainId", "=", $id];
+        $files = Db::table($table)->where($where)->select()->toArray();
+        if (!$files)
+            die("没有附件不能打包下载");
 
         $tmp_path = "storage/temp/";
         $tmp_file_path = $tmp_path . $zip_filename;

+ 16 - 0
app/common/model/TalentBankChange.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\common\model;
+
+use think\model;
+
+/**
+ * Description of TalentBankChange
+ *
+ * @author sgq
+ */
+class TalentBankChange extends model {
+
+    protected $table = "un_talent_bank_change";
+
+}

+ 16 - 0
app/common/model/TalentBasicChange.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\common\model;
+
+use think\model;
+
+/**
+ * Description of TalentBasicChange
+ *
+ * @author sgq
+ */
+class TalentBasicChange extends model {
+
+    protected $table = "un_talent_basic_change";
+
+}

+ 16 - 0
app/common/model/TalentWorkUnitChange.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\common\model;
+
+use think\model;
+
+/**
+ * Description of TalentWorkUnitChange
+ *
+ * @author sgq
+ */
+class TalentWorkUnitChange extends model {
+
+    protected $table = "un_talent_workunit_change";
+
+}

+ 17 - 0
app/enterprise/controller/Talent.php

@@ -1574,6 +1574,23 @@ class Talent extends EnterpriseController {
         $result = TalentModel::where($where)->field("id,name")->select()->toArray();
         return json($result);
     }
+    
+    public function getTalentBasicById(){        
+        $id = $this->request["id"];
+        $ti = \app\common\api\VerifyApi::getTalentInfoById($id);
+        /*if(FengStringUtil.isNotEmpAndNull(year)){
+            StringBuilder sb = new StringBuilder();
+            List<TalentAllowancecontractDetail> contractDetailList = new ArrayList<>();     //保存上一年度的工作单位
+            TalentAllowanceInfo info = new TalentAllowanceInfo();
+            info.setType(ti.getType());
+            info.setYear(year);
+            info.setFirstInJJTime(ti.getFirstInJJTime());
+            ApiTalentAllowanceController.getConcatList(ti,info,year,sb,contractDetailList);
+            int active = AllowanceSelectUtil.validMyqy(contractDetailList,ti,info);
+            ti.setActive(active);
+        }*/
+        return $ti;
+    }
 
     /**
      * 审核列表页

+ 211 - 10
app/enterprise/controller/TalentBankChange.php

@@ -3,9 +3,12 @@
 namespace app\enterprise\controller;
 
 use app\enterprise\common\EnterpriseController;
-use app\enterprise\api\TalentApi;
-use app\common\api\DictApi;
-use app\common\api\VerifyApi;
+use app\common\model\TalentBankChange as TbcModel;
+use app\common\api\TalentLogApi;
+use app\common\state\ProjectState;
+use app\common\model\TalentLog;
+use think\facade\Db;
+use app\common\api\EnterpriseApi;
 
 /**
  * Description of TalentBankChange
@@ -20,19 +23,217 @@ class TalentBankChange extends EnterpriseController {
 
     public function list() {
         $type = $this->user["type"];
-        $param = $this->request->param();
-        $order = trim($param["order"]) ?: "desc";
-        $offset = trim($param["offset"]) ?: 0;
-        $limit = trim($param["limit"]) ?: 10;
-        $where[] = ["enterprise_id", "=", session("user")["uid"]];
+        $params = \StrUtil::batchGetRequestDecodeParam($this->request);
+        $order = $params["order"] ?: "desc";
+        $offset = $params["offset"] ?: 0;
+        $limit = $params["limit"] ?: 10;
+        $where = [];
+        $where[] = ["newEnterpriseId", "=", $this->user["uid"]];
+        $where[] = ["delete", "=", 0];
+        if ($params["talentName"]) {
+            $where[] = ["talentName", "like", "%" . $params["talentName"] . "%"];
+        }
+        if ($params["idCard"]) {
+            $where[] = ["idCard", "like", "%" . $params["idCard"] . "%"];
+        }
+        if ($params["oldEnterpriseId"]) {
+            $whr = [];
+            $whr[] = ["name", "like", "%{$params["oldEnterpriseId"]}%"];
+            $ids = \app\common\model\Enterprise::where($whr)->column("id");
+            $where[] = ["oldEnterpriseId", "in", $ids];
+        }
+        if ($params["checkState"]) {
+            $where[] = ["checkState", "=", $params["checkState"]];
+        }
+        $count = TwcModel::where($where)->count();
+        $list = TwcModel::where($where)->limit($offset, $limit)->order("createTime " . $order)->select()->toArray();
+        $talentArrangeMap = \app\common\api\DictApi::selectByParentCode("talent_arrange");
+        $epMaps = \app\common\model\Enterprise::column("name", "id");
+        foreach ($list as &$item) {
+            $item["talentArrangeName"] = $talentArrangeMap[$item["talentArrange"]];
+            $item["oldEnterpriseName"] = $epMaps[$item["oldEnterpriseId"]];
+            $item["newEnterpriseName"] = $epMaps[$item["newEnterpriseId"]];
+        }unset($item);
+
+        return json(["total" => $count, "rows" => $list]);
     }
 
     public function apply() {
-        return view();
+        $request = $this->request;
+        $id = isset($request["id"]) ? $request["id"] : 0;
+        $info = TwcModel::where("id", $id)->find();
+        if ($info) {
+            $epOld = EnterpriseApi::getOne($info["oldEnterpriseId"]);
+            $epNew = EnterpriseApi::getOne($info["newEnterpriseId"]);
+            $info["oldEnterpriseName"] = $epOld["name"];
+            $info["newEnterpriseName"] = $epNew["name"];
+        }
+        if ($this->request->isPost()) {
+            $response = new \stdClass();
+            $response->code = 500;
+            $data = $request->param();
+            $check = $this->dataCheck($data);
+            if ($check->code == 500) {
+                return $check;
+            }
+            $talentInfo = \app\common\api\VerifyApi::getTalentInfoById($request["talentId"]);
+            if ($data["id"]) {
+                unset($data["year"]);
+                $data["updateUser"] = $this->user["uid"];
+                $data["updateTime"] = date("Y-m-d H:i:s");
+                TwcModel::update($data);
+                $response->code = 200;
+                $response->msg = "修改成功";
+                return $response;
+            } else {
+                $data["id"] = getStringId();
+                $data["oldStartTime"] = $talentInfo["startTime"];
+                $data["oldEndTime"] = $talentInfo["endTime"];
+                $data["checkState"] = -1;
+                $data["createUser"] = $this->user["uid"];
+                $data["createTime"] = date("Y-m-d H:i:s");
+                TwcModel::create($data);
+
+                $user = $this->user;
+                $log["id"] = getStringId();
+                $log["active"] = 1;
+                $log["state"] = 1;
+                $log["step"] = 0;
+                $log["stateChange"] = "";
+                $log["type"] = ProjectState::WORKCHANGE;
+                $log["mainId"] = $data["id"];
+                $log["description"] = "添加工作单位变更申报";
+                $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+                $log["createTime"] = date("Y-m-d H:i:s");
+                TalentLog::create($log);
+                $response->code = 200;
+                $response->msg = "添加成功";
+                $response->obj = $data;
+                return $response;
+            }
+        }
+        $year = $info["year"] ?: $request["year"];
+        return view("", ["type" => $this->user["type"], "year" => $year, "row" => $info]);
     }
 
     public function view() {
-        return view();
+        $id = $this->request["id"];
+        $info = TwcModel::where("id", $id)->find();
+        $epOld = EnterpriseApi::getOne($info["oldEnterpriseId"]);
+        $epNew = EnterpriseApi::getOne($info["newEnterpriseId"]);
+        $info["oldEnterpriseName"] = $epOld["name"];
+        $info["newEnterpriseName"] = $epNew["name"];
+        return view("", ["row" => $info]);
+    }
+
+    public function submitToCheck() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $id = $this->request["id"];
+        $info = TwcModel::where("id", $id)->find();
+        if (!$info) {
+            $response->msg = "提交审核失败,请先填写基础信息";
+            return $response;
+        }
+        if ($info["checkState"] != -1 && $info["checkState"] != 2) {
+            $response->msg = "不能重复提交审核";
+            return $response;
+        }
+        $where = [];
+        $where[] = ["type", "=", $info["type"]];
+        $where[] = ["project", "=", ProjectState::WORKCHANGE];
+        $where[] = ["active", "=", 1];
+        $filetypes = Db::table("new_common_filetype")->where($where)->order("sn asc")->select()->toArray();
+        foreach ($filetypes as $filetype) {
+            $sb = [];
+            $sb[] = "以下为必传附件:";
+            if ($filetype["must"] == 1) {
+                $where = [];
+                $where[] = ["mainId", "=", $id];
+                $where[] = ["typeId", "=", $filetype["id"]];
+                $count = Db::table("new_talent_common_file")->where($where)->count();
+                if ($count == 0) {
+                    $sb[] = $filetype["name"] . ";";
+                }
+            }
+        }
+        if (count($sb) > 1) {
+            $response->msg = implode("<br>", $sb);
+            return $response;
+        }
+        $data["id"] = $id;
+        $data["checkState"] = $info["checkState"] == 2 ? 9 : 1;
+        TwcModel::update($data);
+        $user = $this->user;
+        $log["id"] = getStringId();
+        $log["active"] = 1;
+        $log["state"] = 1;
+        $log["step"] = 0;
+        $log["stateChange"] = "<span class='label'>待提交</span>-><span class='label label-success'>待审核</span>";
+        $log["type"] = ProjectState::WORKCHANGE;
+        $log["mainId"] = $id;
+        $log["description"] = "确认提交审核";
+        $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+        $log["createTime"] = date("Y-m-d H:i:s");
+        TalentLog::create($log);
+        $response->code = 200;
+        $response->msg = "提交审核成功";
+        $response->obj = 1;
+        return $response;
+    }
+
+    public function delete() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $info = TwcModel::where("id", $this->request["id"])->find();
+        if ($info["checkState"] != -1) {
+            $response->msg = "已提交审核,无法删除";
+            return $response;
+        }
+        $data["id"] = $info["id"];
+        $data["delete"] = 1;
+        $data["deleteTime"] = date("Y-m-d H:i:s");
+        TwcModel::update($data);
+        $response->code = 200;
+        $response->msg = "删除成功";
+        return $response;
+    }
+
+    private function dataCheck($data) {
+        $response = new \stdClass();
+        $response->code = 500;
+        if (\StrUtil::isEmpOrNull($data["starttime"])) {
+            $response->msg = "合同开始时间不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["endtime"])) {
+            $response->msg = "合同结束时间不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["phone"])) {
+            $response->msg = "手机号码不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["newEnterpriseId"])) {
+            $response->msg = "新单位名称不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["phone"])) {
+            $response->msg = "手机号码不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["anyTime"])) {
+            $response->msg = "入职/变更时间不能为空";
+            return $response;
+        }
+        if ($data["type"] == 1) {
+            if (\StrUtil::isEmpOrNull($data["anyReason"])) {
+                $response->msg = "单位变更申报原因不能为空";
+                return $response;
+            }
+        }
+        $response->code = 200;
+        return $response;
     }
 
 }

+ 276 - 10
app/enterprise/controller/TalentBasicChange.php

@@ -3,9 +3,12 @@
 namespace app\enterprise\controller;
 
 use app\enterprise\common\EnterpriseController;
-use app\enterprise\api\TalentApi;
-use app\common\api\DictApi;
-use app\common\api\VerifyApi;
+use app\common\model\TalentBasicChange as TbcModel;
+use app\common\api\TalentLogApi;
+use app\common\state\ProjectState;
+use app\common\model\TalentLog;
+use think\facade\Db;
+use app\common\api\EnterpriseApi;
 
 /**
  * Description of TalentBasicChange
@@ -20,19 +23,282 @@ class TalentBasicChange extends EnterpriseController {
 
     public function list() {
         $type = $this->user["type"];
-        $param = $this->request->param();
-        $order = trim($param["order"]) ?: "desc";
-        $offset = trim($param["offset"]) ?: 0;
-        $limit = trim($param["limit"]) ?: 10;
-        $where[] = ["enterprise_id", "=", session("user")["uid"]];
+        $params = \StrUtil::batchGetRequestDecodeParam($this->request);
+        $order = $params["order"] ?: "desc";
+        $offset = $params["offset"] ?: 0;
+        $limit = $params["limit"] ?: 10;
+        $where = [];
+        $where[] = ["enterpriseId", "=", $this->user["uid"]];
+        $where[] = ["delete", "=", 0];
+        if ($params["oldName"]) {
+            $where[] = ["oldName", "like", "%" . $params["oldName"] . "%"];
+        }
+        if ($params["oldCardType"]) {
+            $where[] = ["oldCardType", "=", $params["oldCardType"]];
+        }
+        if ($params["oldIdCard"]) {
+            $where[] = ["oldIdCard", "like", "%" . $params["oldIdCard"] . "%"];
+        }
+        if ($params["newName"]) {
+            $where[] = ["newName", "like", "%" . $params["newName"] . "%"];
+        }
+        if ($params["newCardType"]) {
+            $where[] = ["newCardType", "=", $params["newCardType"]];
+        }
+        if ($params["newIdCard"]) {
+            $where[] = ["newIdCard", "like", "%" . $params["newIdCard"] . "%"];
+        }
+        if ($params["checkState"]) {
+            $where[] = ["checkState", "=", $params["checkState"]];
+        }
+        $count = TbcModel::where($where)->count();
+        $list = TbcModel::where($where)->limit($offset, $limit)->order("createTime " . $order)->select()->toArray();
+        $nationalityMap = \app\common\api\DictApi::selectByParentCode("nationality");
+        $nationMap = \app\common\api\DictApi::selectByParentCode("nation");
+        $politicalMap = \app\common\api\DictApi::selectByParentCode("politics");
+        $cardTypeMap = \app\common\api\DictApi::selectByParentCode("card_type");
+        foreach ($list as &$item) {
+            $item["oldNationalityName"] = $nationalityMap[$item["oldNationality"]];
+            $item["oldNationName"] = $nationMap[$item["oldNation"]];
+            $item["oldPoliticsName"] = $politicalMap[$item["oldPolitics"]];
+            $item["oldCardTypName"] = $cardTypeMap[$item["oldCardType"]];
+            $item["newNationalityName"] = $nationalityMap[$item["newNationality"]];
+            $item["newNationName"] = $nationMap[$item["newNation"]];
+            $item["newPoliticsName"] = $politicalMap[$item["newPolitics"]];
+            $item["newCardTypName"] = $cardTypeMap[$item["newCardType"]];
+        }unset($item);
+
+        return json(["total" => $count, "rows" => $list]);
     }
 
     public function apply() {
-        return view();
+        $request = $this->request;
+        $id = isset($request["id"]) ? $request["id"] : 0;
+        $info = TbcModel::where("id", $id)->find();
+        if ($this->request->isPost()) {
+            $response = new \stdClass();
+            $response->code = 500;
+            $data = $request->param();
+            $check = $this->dataCheck($data);
+            if ($check->code == 500) {
+                return $check;
+            }
+            $talentInfo = \app\common\api\VerifyApi::getTalentInfoById($request["talentId"]);
+            if ($data["id"]) {
+                unset($data["year"]);
+                $data["updateUser"] = $this->user["uid"];
+                $data["updateTime"] = date("Y-m-d H:i:s");
+                TbcModel::update($data);
+                $response->code = 200;
+                $response->msg = "修改成功";
+                return $response;
+            } else {
+                $data["id"] = getStringId();
+                $data["oldName"] = $talentInfo["name"];
+                $data["oldNationality"] = $talentInfo["nationality"];
+                $data["oldNation"] = $talentInfo["nation"];
+                $data["oldPolitics"] = $talentInfo["politics"];
+                $data["oldCardType"] = $talentInfo["card_type"];
+                $data["oldIdCard"] = $talentInfo["card_number"];
+                $data["oldBirthday"] = $talentInfo["birthday"];
+                $data["oldEmail"] = $talentInfo["email"];
+                $data["checkState"] = -1;
+                $data["createUser"] = $this->user["uid"];
+                $data["createTime"] = date("Y-m-d H:i:s");
+                TbcModel::create($data);
+
+                $user = $this->user;
+                $log["id"] = getStringId();
+                $log["active"] = 1;
+                $log["state"] = 1;
+                $log["step"] = 0;
+                $log["stateChange"] = "";
+                $log["type"] = ProjectState::BASICCHANGE;
+                $log["mainId"] = $data["id"];
+                $log["description"] = "添加人才基础信息变更申请";
+                $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+                $log["createTime"] = date("Y-m-d H:i:s");
+                TalentLog::create($log);
+                $response->code = 200;
+                $response->msg = "添加成功";
+                $response->obj = $data;
+                return $response;
+            }
+        }
+        $assigns = [];
+        if (!$info) {
+            $info["enterpriseId"] = $this->user["uid"];
+            $info["type"] = $this->user["type"];
+            $where = [];
+            $where[] = ["checkState", "<>", 3];
+            $changes = TbcModel::where($where)->select()->column("talentId");
+            unset($where);
+            $where[] = ["enterprise_id", "=", $this->user["uid"]];
+            $where[] = ["id", "not in", $changes];
+            $where[] = ["checkState", "=", \app\common\api\TalentState::CERTIFICATED];
+            $list = \app\enterprise\model\Talent::where($where)->field("id,name")->select()->toArray();
+            $assigns["list"] = $list;
+        }
+        $assigns["type"] = $this->user["type"];
+        $assigns["row"] = $info;
+        return view("", $assigns);
     }
 
     public function view() {
-        return view();
+        $request = $this->request;
+        $id = isset($request["id"]) ? $request["id"] : 0;
+        $info = TbcModel::where("id", $id)->find();
+        return view("apply", ["row" => $info]);
+    }
+
+    public function submitToCheck() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $id = $this->request["id"];
+        $info = TbcModel::where("id", $id)->find();
+        if (!$info) {
+            $response->msg = "提交审核失败,请先填写基础信息";
+            return $response;
+        }
+        if ($info["checkState"] != -1 && $info["checkState"] != 2) {
+            $response->msg = "不能重复提交审核";
+            return $response;
+        }
+        $check = $this->dataCheck($info);
+        if ($check->code == 500) {
+            return $check;
+        }
+        $where = [];
+        $where[] = ["type", "=", $info["type"]];
+        $where[] = ["project", "=", ProjectState::BASICCHANGE];
+        $where[] = ["active", "=", 1];
+        $filetypes = Db::table("new_common_filetype")->where($where)->order("sn asc")->select()->toArray();
+        foreach ($filetypes as $filetype) {
+            $sb = [];
+            $sb[] = "以下为必传附件:";
+            if ($filetype["must"] == 1) {
+                $where = [];
+                $where[] = ["mainId", "=", $id];
+                $where[] = ["typeId", "=", $filetype["id"]];
+                $count = Db::table("new_talent_file")->where($where)->count();
+                if ($count == 0) {
+                    $sb[] = $filetype["name"] . ";";
+                }
+            }
+        }
+        if (count($sb) > 1) {
+            $response->msg = implode("<br>", $sb);
+            return $response;
+        }
+        $data["id"] = $id;
+
+        if (\StrUtil::isEmpOrNull($info["firstSubmitTime"])) {
+            $data["firstSubmitTime"] = date("Y-m-d H:i:s");
+        }
+        $data["newSubmitTime"] = date("Y-m-d H:i:s");
+        $data["checkMsg"] = "";
+        $data["checkState"] = $info["checkState"] == 2 ? 9 : 1;
+        TbcModel::update($data);
+        $sb = [];
+        if ($info["checkState"] == -1) {
+            $sb[] = \app\common\state\MainState::getStateName(-2);
+        } else {
+            $sb[] = \app\common\state\MainState::getStateName(2);
+        }
+        if ($data["checkState"] == 1) {
+            $sb[] = \app\common\state\MainState::getStateName(1);
+        } else {
+            $sb[] = \app\common\state\MainState::getStateName(9);
+        }
+
+        $user = $this->user;
+        $log["id"] = getStringId();
+        $log["active"] = 1;
+        $log["state"] = 1;
+        $log["step"] = 0;
+        $log["stateChange"] = implode("->", $sb);
+        $log["type"] = ProjectState::BASICCHANGE;
+        $log["mainId"] = $id;
+        $log["description"] = "确认提交审核";
+        $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+        $log["createTime"] = date("Y-m-d H:i:s");
+        TalentLog::create($log);
+        $response->code = 200;
+        $response->msg = "提交审核成功";
+        $response->obj = 1;
+        return $response;
+    }
+
+    public function delete() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $info = TbcModel::where("id", $this->request["id"])->find();
+        if ($info["checkState"] != -1) {
+            $response->msg = "已提交审核,无法删除";
+            return $response;
+        }
+        $data["id"] = $info["id"];
+        $data["delete"] = 1;
+        $data["deleteTime"] = date("Y-m-d H:i:s");
+        TbcModel::update($data);
+        $response->code = 200;
+        $response->msg = "删除成功";
+        return $response;
+    }
+
+    private function dataCheck($data) {
+        $response = new \stdClass();
+        $response->code = 500;
+        if (\StrUtil::isEmpOrNull($data["newName"])) {
+            $response->msg = "现姓名不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["newNationality"])) {
+            $response->msg = "现国籍不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["newNation"])) {
+            $response->msg = "现民族不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["newBirthday"])) {
+            $response->msg = "现出生日期不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["newPolitics"])) {
+            $response->msg = "现政治面貌不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["newCardType"])) {
+            $response->msg = "现证件类型不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["newIdCard"])) {
+            $response->msg = "现证件号码不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["newEmail"])) {
+            $response->msg = "现电子邮箱不能为空";
+            return $response;
+        }        
+        if (!preg_match("/[\\w!#$%&'*+\/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+\/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[\\w](?:[\\w-]*[\\w])?/", $data["newEmail"])) {
+            $response->msg = "电子邮箱格式不正确";
+            return $response;
+        }
+        if ($data["newCardType"] == 1 && !\app\common\api\IdCardApi::isValid($data["newIdCard"])) {
+            $response->msg = "身份证号码不合法";
+            return $response;
+        }
+        if ($data["newCardType"] == 2 && !preg_match("/^[a-zA-Z0-9]{6,10}$/", $data["newIdCard"]) && !preg_match("/^([0-9]{8}|[0-9]{10})$/", $data["newIdCard"])) {
+            $response->msg = "通行证号码不合法";
+            return $response;
+        }
+        if ($data["newCardType"] == 3 && !preg_match("/^([a-zA-z]|[0-9]){5,17}$/", $data["newIdCard"])) {
+            $response->msg = "护照格式不合法";
+            return $response;
+        }
+        $response->code = 200;
+        return $response;
     }
 
 }

+ 46 - 4
app/enterprise/controller/TalentQuit.php

@@ -41,6 +41,9 @@ class TalentQuit extends EnterpriseController {
         if ($params["talentArrange"]) {
             $where[] = ["talentArrange", "=", $params["talentArrange"]];
         }
+        if ($params["checkState"]) {
+            $where[] = ["checkState", "=", $params["checkState"]];
+        }
         $count = TqModel::where($where)->count();
         $list = TqModel::where($where)->limit($offset, $limit)->order("createTime " . $order)->select()->toArray();
         $talentArrangeMap = \app\common\api\DictApi::selectByParentCode("talent_arrange");
@@ -65,6 +68,7 @@ class TalentQuit extends EnterpriseController {
             }
             $talentInfo = \app\common\api\VerifyApi::getTalentInfoById($request["talentId"]);
             if ($data["id"]) {
+                unset($data["year"]);
                 $data["updateUser"] = $this->user["uid"];
                 $data["updateTime"] = date("Y-m-d H:i:s");
                 TqModel::update($data);
@@ -75,7 +79,7 @@ class TalentQuit extends EnterpriseController {
                 $data["id"] = getStringId();
                 $data["identifyGetTime"] = $talentInfo["identifyGetTime"];
                 $data["talentType"] = $talentInfo["enterpriseTag"];
-                $data["checkState"] = 1;
+                $data["checkState"] = -1;
                 $data["createUser"] = $this->user["uid"];
                 $data["createTime"] = date("Y-m-d H:i:s");
                 $data["post"] = $talentInfo["position"];
@@ -86,9 +90,9 @@ class TalentQuit extends EnterpriseController {
                 $log["active"] = 1;
                 $log["state"] = 1;
                 $log["step"] = 0;
-                $log["stateChange"] = "<span class='label label-success'>待审核</span>";
+                $log["stateChange"] = "";
                 $log["type"] = ProjectState::QUIT;
-                $log["mainId"] = $id;
+                $log["mainId"] = $data["id"];
                 $log["description"] = "添加离职申报";
                 $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
                 $log["createTime"] = date("Y-m-d H:i:s");
@@ -100,7 +104,7 @@ class TalentQuit extends EnterpriseController {
             }
         }
         $year = $info["year"] ?: $request["year"];
-        return view("", ["type" => $this->user["type"], "year" => $request["year"], "row" => $info]);
+        return view("", ["type" => $this->user["type"], "year" => $year, "row" => $info]);
     }
 
     public function view() {
@@ -176,11 +180,49 @@ class TalentQuit extends EnterpriseController {
         $data["id"] = $info["id"];
         $data["delete"] = 1;
         $data["deleteTime"] = date("Y-m-d H:i:s");
+        TqModel::update($data);
         $response->code = 200;
         $response->msg = "删除成功";
         return $response;
     }
 
+    public function findByIdCard() {
+        $responseObj = new \stdClass();
+        $responseObj->code = 500;
+        $idCard = $this->request["idCard"];
+        $where = [];
+        $where[] = ["idCard", "=", $idCard];
+        $where[] = ["checkState", "not in", [3, -2]];
+        $count = TqModel::where($where)->count();
+        if ($count > 0) {
+            $responseObj->msg = "你输入的身份证正在变更申请";
+            return $responseObj;
+        }
+        unset($where);
+        $where[] = ["idCard", "=", $idCard];
+        $where[] = ["checkState", "=", 3];
+        $talentQuit = TqModel::where($where)->order("createTime desc")->find();
+        if (!$talentQuit) {
+            $responseObj->msg = "你输入的身份证未在离职名单";
+            return $responseObj;
+        }
+        $ti = \app\common\api\VerifyApi::getTalentInfoById($talentQuit["talentId"]);
+        if ($ti["active"] == 1) {
+            $responseObj->msg = "您所申报的优秀人才处于在职状态,请先办理离职后再做申请!";
+            return $responseObj;
+        }
+        if ($ti["isEffect"] == 4) {
+            $responseObj->msg = "您所申报的优秀人才已失效,无法申请变更!";
+            return $responseObj;
+        }
+        $talentQuit["talentType"] = $ti["enterpriseTag"];
+        $talentQuit["phone"] = $ti["phone"];
+        $return = ["info" => $talentQuit, "user" => $this->user];
+        $responseObj->obj = $return;
+        $responseObj->code = 200;
+        return $responseObj;
+    }
+
     private function dataCheck($data) {
         $response = new \stdClass();
         $response->code = 500;

+ 211 - 10
app/enterprise/controller/TalentWorkUnitChange.php

@@ -3,9 +3,12 @@
 namespace app\enterprise\controller;
 
 use app\enterprise\common\EnterpriseController;
-use app\enterprise\api\TalentApi;
-use app\common\api\DictApi;
-use app\common\api\VerifyApi;
+use app\common\model\TalentWorkUnitChange as TwcModel;
+use app\common\api\TalentLogApi;
+use app\common\state\ProjectState;
+use app\common\model\TalentLog;
+use think\facade\Db;
+use app\common\api\EnterpriseApi;
 
 /**
  * Description of TalentWorkUnitChange
@@ -20,19 +23,217 @@ class TalentWorkUnitChange extends EnterpriseController {
 
     public function list() {
         $type = $this->user["type"];
-        $param = $this->request->param();
-        $order = trim($param["order"]) ?: "desc";
-        $offset = trim($param["offset"]) ?: 0;
-        $limit = trim($param["limit"]) ?: 10;
-        $where[] = ["enterprise_id", "=", session("user")["uid"]];
+        $params = \StrUtil::batchGetRequestDecodeParam($this->request);
+        $order = $params["order"] ?: "desc";
+        $offset = $params["offset"] ?: 0;
+        $limit = $params["limit"] ?: 10;
+        $where = [];
+        $where[] = ["newEnterpriseId", "=", $this->user["uid"]];
+        $where[] = ["delete", "=", 0];
+        if ($params["talentName"]) {
+            $where[] = ["talentName", "like", "%" . $params["talentName"] . "%"];
+        }
+        if ($params["idCard"]) {
+            $where[] = ["idCard", "like", "%" . $params["idCard"] . "%"];
+        }
+        if ($params["oldEnterpriseId"]) {
+            $whr = [];
+            $whr[] = ["name", "like", "%{$params["oldEnterpriseId"]}%"];
+            $ids = \app\common\model\Enterprise::where($whr)->column("id");
+            $where[] = ["oldEnterpriseId", "in", $ids];
+        }
+        if ($params["checkState"]) {
+            $where[] = ["checkState", "=", $params["checkState"]];
+        }
+        $count = TwcModel::where($where)->count();
+        $list = TwcModel::where($where)->limit($offset, $limit)->order("createTime " . $order)->select()->toArray();
+        $talentArrangeMap = \app\common\api\DictApi::selectByParentCode("talent_arrange");
+        $epMaps = \app\common\model\Enterprise::column("name", "id");
+        foreach ($list as &$item) {
+            $item["talentArrangeName"] = $talentArrangeMap[$item["talentArrange"]];
+            $item["oldEnterpriseName"] = $epMaps[$item["oldEnterpriseId"]];
+            $item["newEnterpriseName"] = $epMaps[$item["newEnterpriseId"]];
+        }unset($item);
+
+        return json(["total" => $count, "rows" => $list]);
     }
 
     public function apply() {
-        return view();
+        $request = $this->request;
+        $id = isset($request["id"]) ? $request["id"] : 0;
+        $info = TwcModel::where("id", $id)->find();
+        if ($info) {
+            $epOld = EnterpriseApi::getOne($info["oldEnterpriseId"]);
+            $epNew = EnterpriseApi::getOne($info["newEnterpriseId"]);
+            $info["oldEnterpriseName"] = $epOld["name"];
+            $info["newEnterpriseName"] = $epNew["name"];
+        }
+        if ($this->request->isPost()) {
+            $response = new \stdClass();
+            $response->code = 500;
+            $data = $request->param();
+            $check = $this->dataCheck($data);
+            if ($check->code == 500) {
+                return $check;
+            }
+            $talentInfo = \app\common\api\VerifyApi::getTalentInfoById($request["talentId"]);
+            if ($data["id"]) {
+                unset($data["year"]);
+                $data["updateUser"] = $this->user["uid"];
+                $data["updateTime"] = date("Y-m-d H:i:s");
+                TwcModel::update($data);
+                $response->code = 200;
+                $response->msg = "修改成功";
+                return $response;
+            } else {
+                $data["id"] = getStringId();
+                $data["oldStartTime"] = $talentInfo["startTime"];
+                $data["oldEndTime"] = $talentInfo["endTime"];
+                $data["checkState"] = -1;
+                $data["createUser"] = $this->user["uid"];
+                $data["createTime"] = date("Y-m-d H:i:s");
+                TwcModel::create($data);
+
+                $user = $this->user;
+                $log["id"] = getStringId();
+                $log["active"] = 1;
+                $log["state"] = 1;
+                $log["step"] = 0;
+                $log["stateChange"] = "";
+                $log["type"] = ProjectState::WORKCHANGE;
+                $log["mainId"] = $data["id"];
+                $log["description"] = "添加工作单位变更申报";
+                $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+                $log["createTime"] = date("Y-m-d H:i:s");
+                TalentLog::create($log);
+                $response->code = 200;
+                $response->msg = "添加成功";
+                $response->obj = $data;
+                return $response;
+            }
+        }
+        $year = $info["year"] ?: $request["year"];
+        return view("", ["type" => $this->user["type"], "year" => $year, "row" => $info]);
     }
 
     public function view() {
-        return view();
+        $id = $this->request["id"];
+        $info = TwcModel::where("id", $id)->find();
+        $epOld = EnterpriseApi::getOne($info["oldEnterpriseId"]);
+        $epNew = EnterpriseApi::getOne($info["newEnterpriseId"]);
+        $info["oldEnterpriseName"] = $epOld["name"];
+        $info["newEnterpriseName"] = $epNew["name"];
+        return view("", ["row" => $info]);
+    }
+
+    public function submitToCheck() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $id = $this->request["id"];
+        $info = TwcModel::where("id", $id)->find();
+        if (!$info) {
+            $response->msg = "提交审核失败,请先填写基础信息";
+            return $response;
+        }
+        if ($info["checkState"] != -1 && $info["checkState"] != 2) {
+            $response->msg = "不能重复提交审核";
+            return $response;
+        }
+        $where = [];
+        $where[] = ["type", "=", $info["type"]];
+        $where[] = ["project", "=", ProjectState::WORKCHANGE];
+        $where[] = ["active", "=", 1];
+        $filetypes = Db::table("new_common_filetype")->where($where)->order("sn asc")->select()->toArray();
+        foreach ($filetypes as $filetype) {
+            $sb = [];
+            $sb[] = "以下为必传附件:";
+            if ($filetype["must"] == 1) {
+                $where = [];
+                $where[] = ["mainId", "=", $id];
+                $where[] = ["typeId", "=", $filetype["id"]];
+                $count = Db::table("new_talent_common_file")->where($where)->count();
+                if ($count == 0) {
+                    $sb[] = $filetype["name"] . ";";
+                }
+            }
+        }
+        if (count($sb) > 1) {
+            $response->msg = implode("<br>", $sb);
+            return $response;
+        }
+        $data["id"] = $id;
+        $data["checkState"] = $info["checkState"] == 2 ? 9 : 1;
+        TwcModel::update($data);
+        $user = $this->user;
+        $log["id"] = getStringId();
+        $log["active"] = 1;
+        $log["state"] = 1;
+        $log["step"] = 0;
+        $log["stateChange"] = "<span class='label'>待提交</span>-><span class='label label-success'>待审核</span>";
+        $log["type"] = ProjectState::WORKCHANGE;
+        $log["mainId"] = $id;
+        $log["description"] = "确认提交审核";
+        $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+        $log["createTime"] = date("Y-m-d H:i:s");
+        TalentLog::create($log);
+        $response->code = 200;
+        $response->msg = "提交审核成功";
+        $response->obj = 1;
+        return $response;
+    }
+
+    public function delete() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $info = TwcModel::where("id", $this->request["id"])->find();
+        if ($info["checkState"] != -1) {
+            $response->msg = "已提交审核,无法删除";
+            return $response;
+        }
+        $data["id"] = $info["id"];
+        $data["delete"] = 1;
+        $data["deleteTime"] = date("Y-m-d H:i:s");
+        TwcModel::update($data);
+        $response->code = 200;
+        $response->msg = "删除成功";
+        return $response;
+    }
+
+    private function dataCheck($data) {
+        $response = new \stdClass();
+        $response->code = 500;
+        if (\StrUtil::isEmpOrNull($data["starttime"])) {
+            $response->msg = "合同开始时间不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["endtime"])) {
+            $response->msg = "合同结束时间不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["phone"])) {
+            $response->msg = "手机号码不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["newEnterpriseId"])) {
+            $response->msg = "新单位名称不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["phone"])) {
+            $response->msg = "手机号码不能为空";
+            return $response;
+        }
+        if (\StrUtil::isEmpOrNull($data["anyTime"])) {
+            $response->msg = "入职/变更时间不能为空";
+            return $response;
+        }
+        if ($data["type"] == 1) {
+            if (\StrUtil::isEmpOrNull($data["anyReason"])) {
+                $response->msg = "单位变更申报原因不能为空";
+                return $response;
+            }
+        }
+        $response->code = 200;
+        return $response;
     }
 
 }

+ 19 - 18
app/enterprise/view/talent_bank_change/apply.html

@@ -25,83 +25,83 @@
             <div class="row">
                 <form id="talentBankChangeForm">
                     <div class="col-sm-12 ">
-                        <input type="hidden" id="id" name="id" value=""/>
-                        <input type="hidden" id="type" name="type" value=""/>
-                        <input type="hidden" id="checkState" name="checkState" value=""/>
-                        <input id="enterpriseId" name="enterpriseId" type="hidden"/>
-                        <input id="talentName" name="talentName" type="hidden"/>
-                        <input id="talentArrange" name="talentArrange" type="hidden"/>
+                        <input type="hidden" id="id" name="id" value="{$row.id}"/>
+                        <input type="hidden" id="type" name="type" value="{$row.type}"/>
+                        <input type="hidden" id="talentId" name="talentId" value="{$row.talentId}"/>
+                        <input type="hidden" id="checkState" name="checkState" value="{$row.checkState}"/>
+                        <input id="enterpriseId" name="enterpriseId" type="hidden" value="{$row.enterpriseId}"/>
+                        <input id="talentArrange" name="talentArrange" type="hidden" value="{$row.talentArrange}"/>
                         <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">申报对象</label>
                             <div class="col-sm-4 spacing">
-                                <select class="form-control" id="talentId" name="talentId" onchange="TalentBankChangeInfoDlg.talentInfoDetail()"></select>
+                                <input class="form-control" id="talentName" name="talentName" value="{$row.talentName}" >
                             </div>
                         </div>
                         <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">企业名称</label>
                             <div class="col-sm-4 spacing">
-                                <input class="form-control" readonly="readonly" id="enterpriseName" name="enterpriseName" >
+                                <input class="form-control" readonly="readonly" id="enterpriseName" name="enterpriseName" value="{$row.enterpriseName}">
                             </div>
                         </div>
                         <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">证件号码</label>
                             <div class="col-sm-4 spacing">
-                                <input class="form-control" readonly="readonly" id="idCard" name="idCard" >
+                                <input class="form-control" readonly="readonly" id="idCard" name="idCard" value="{$row.idCard}">
                             </div>
                         </div>
                         <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">人才层次</label>
                             <div class="col-sm-4 spacing">
-                                <input class="form-control" readonly="readonly" id="talentArrangeName" name="talentArrangeName" >
+                                <input class="form-control" readonly="readonly" id="talentArrangeName" name="talentArrangeName" value="{$row.talentArrangeName}">
                             </div>
                         </div>
                         <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">原开户银行</label>
                             <div class="col-sm-4 spacing">
-                                <input class="form-control" readonly="readonly" id="oldBankName" name="oldBankName" >
+                                <input class="form-control" readonly="readonly" id="oldBankName" name="oldBankName" value="{$row.oldBankName}">
                             </div>
                         </div>
                         <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">原开户银行网点</label>
                             <div class="col-sm-4 spacing">
-                                <input class="form-control" readonly="readonly" id="oldBankNerPoint" name="oldBankNerPoint" >
+                                <input class="form-control" readonly="readonly" id="oldBankNerPoint" name="oldBankNerPoint" value="{$row.oldBankNerPoint}">
                             </div>
                         </div>
                         <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">原银行账号</label>
                             <div class="col-sm-4 spacing">
-                                <input class="form-control" readonly="readonly" id="oldBankAccount" name="oldBankAccount" >
+                                <input class="form-control" readonly="readonly" id="oldBankAccount" name="oldBankAccount" value="{$row.oldBankAccount}">
                             </div>
                         </div>
                         <div class="rowGroup" id="oldBankNumberDiv" style="display: none">
                             <label class="col-sm-2 control-label spacing">原银行行号</label>
                             <div class="col-sm-4 spacing">
-                                <input class="form-control" readonly="readonly" id="oldBankNumber" name="oldBankNumber" >
+                                <input class="form-control" readonly="readonly" id="oldBankNumber" name="oldBankNumber" value="{$row.oldBankNumber}">
                             </div>
                         </div>
                         <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">现开户银行</label>
                             <div class="col-sm-4 spacing">
-                                <input type="text" class="form-control" id="newBankName" name="newBankName" placeholder="XX银行" onchange="TalentBankChangeInfoDlg.bankChange()">
+                                <input type="text" class="form-control" id="newBankName" name="newBankName" placeholder="XX银行" onchange="TalentBankChangeInfoDlg.bankChange()" value="{$row.newBankName}">
                             </div>
                         </div>
 
                         <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">现开户银行网点</label>
                             <div class="col-sm-4 spacing">
-                                <input type="text" class="form-control" id="newBankNerPoint" name="newBankNerPoint" placeholder="XX银行XX省XX市XX支行/分行/分理处">
+                                <input type="text" class="form-control" id="newBankNerPoint" name="newBankNerPoint" placeholder="XX银行XX省XX市XX支行/分行/分理处" value="{$row.newBankNerPoint}">
                             </div>
                         </div>
                         <div class="rowGroup">
                             <label class="col-sm-2 control-label spacing">现银行账号</label>
                             <div class="col-sm-4 spacing">
-                                <input type="text" class="form-control" id="newBankAccount" name="newBankAccount" >
+                                <input type="text" class="form-control" id="newBankAccount" name="newBankAccount" value="{$row.newBankAccount}">
                             </div>
                         </div>
                         <div class="rowGroup" id="newBankNumberDiv" style="display: none">
                             <label class="col-sm-2 control-label spacing">现银行行号</label>
                             <div class="col-sm-4 spacing">
-                                <input type="text" class="form-control" id="newBankNumber" name="newBankNumber" >
+                                <input type="text" class="form-control" id="newBankNumber" name="newBankNumber" value="{$row.newBankNumber}">
                             </div>
                         </div>
                     </div>
@@ -110,6 +110,7 @@
         </div>
     </div>
 </div>
+<!--<script src="${ctxPath}/static/modular/gate/talentLibrary/talentBankChange/talentBankChange_info.js"></script>-->
 <script type="text/javascript">
     document.write('<script src="/static/modular/gate/talentLibrary/talentBankChange/talentBankChange_info.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>

+ 28 - 22
app/enterprise/view/talent_basic_change/apply.html

@@ -45,89 +45,95 @@
                                     <div class="panel-body">
                                         <form id="basicChangeForm" class="form-horizontal">
                                             <div class="col-sm-12 form-group-sm">
-                                                <input type="hidden" name="id" id="id" value="">
-                                                <input type="hidden" name="enterpriseId" id="enterpriseId" value="${enterprise.id}">
-                                                <input type="hidden" name="type" id="type" value="${enterprise.type}">
-                                                <input type="hidden" name="checkState" id="checkState" value="">
+                                                <input type="hidden" name="id" id="id" value="{$row.id}">
+                                                <input type="hidden" name="enterpriseId" id="enterpriseId" value="{$row.enterpriseId}">
+                                                <input type="hidden" name="type" id="type" value="{$row.type}">
+                                                <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}">
+                                                {if condition="$row['id']"}<input type="hidden" name="talentId" id="talentId" value="{$row.talentId}">{/if}
                                                 <div class="row">
                                                     <div class="col-sm-12">
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>原姓名</label>
+                                                            {if condition="!$row['id']"}
                                                             <select class="form-control" id="talentId" name="talentId" onchange="TalentBasicChangeInfoDlg.nameChange()">
                                                                 <option value="">请选择</option>
-                                                                @for(item in list){
-                                                                <option value="${item.id}">${item.name}</option>
-                                                                @}
+                                                                {volist name="list" id="item"}
+                                                                <option value="{$item.id}">{$item.name}</option>
+                                                                {/volist}
                                                             </select>
+                                                            {else/}
+                                                            <input type="text" class="form-control date" id="oldName" name="oldName" value="{$row.oldName}" style="pointer-events: none;background-color: #eee;"/>
+                                                            {/if}
+
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>原出生日期</label>
-                                                            <input type="text" class="form-control date" id="oldBirthday" name="oldBirthday" style="pointer-events: none;background-color: #eee;"/>
+                                                            <input type="text" class="form-control date" id="oldBirthday" name="oldBirthday" value="{$row.oldBirthday}" style="pointer-events: none;background-color: #eee;"/>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>原国家/地区</label>
-                                                            <select class="form-control" id="oldNationality" name="oldNationality" style="pointer-events: none;background-color: #eee;">
+                                                            <select class="form-control" id="oldNationality" name="oldNationality" value="{$row.oldNationality}" style="pointer-events: none;background-color: #eee;">
                                                             </select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class="control-label spacing"><span style="color: red">*</span>原民族</label>
-                                                            <select class="form-control" id="oldNation" name="oldNation" style="pointer-events: none;background-color: #eee;">
+                                                            <select class="form-control" id="oldNation" name="oldNation" value="{$row.oldNation}" style="pointer-events: none;background-color: #eee;">
                                                             </select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>原政治面貌</label>
-                                                            <select class="form-control" id="oldPolitics" name="oldPolitics" style="pointer-events: none;background-color: #eee;">
+                                                            <select class="form-control" id="oldPolitics" name="oldPolitics" value="{$row.oldPolitics}" style="pointer-events: none;background-color: #eee;">
                                                             </select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>原证件类型</label>
-                                                            <select class="form-control" id="oldCardType" name="oldCardType" style="pointer-events: none;background-color: #eee;">
+                                                            <select class="form-control" id="oldCardType" name="oldCardType" value="{$row.oldCardType}" style="pointer-events: none;background-color: #eee;">
                                                             </select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>原证件号码</label>
-                                                            <input class="form-control" id="oldIdCard" name="oldIdCard" style="pointer-events: none;background-color: #eee;">
+                                                            <input class="form-control" id="oldIdCard" name="oldIdCard" value="{$row.oldIdCard}" style="pointer-events: none;background-color: #eee;">
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class="control-label spacing"><span style="color: red">*</span>原电子邮箱</label>
-                                                            <input type="text" class="form-control" id="oldEmail" name="oldEmail" style="pointer-events: none;background-color: #eee;"/>
+                                                            <input type="text" class="form-control" id="oldEmail" name="oldEmail" value="{$row.oldEmail}" style="pointer-events: none;background-color: #eee;"/>
                                                         </div>
 
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>现姓名</label>
-                                                            <input type="text" class="form-control date" id="newName" name="newName" />
+                                                            <input type="text" class="form-control date" id="newName" name="newName" value="{$row.newName}"/>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>现出生日期</label>
-                                                            <input type="text" class="form-control date" id="newBirthday" name="newBirthday" />
+                                                            <input type="text" class="form-control date" id="newBirthday" name="newBirthday" value="{$row.newBirthday}"/>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>现国家/地区</label>
-                                                            <select class="form-control" id="newNationality" name="newNationality" >
+                                                            <select class="form-control" id="newNationality" name="newNationality" value="{$row.newNationality}">
                                                             </select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class="control-label spacing"><span style="color: red">*</span>现民族</label>
-                                                            <select class="form-control" id="newNation" name="newNation">
+                                                            <select class="form-control" id="newNation" name="newNation" value="{$row.newNation}">
                                                             </select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>现政治面貌</label>
-                                                            <select class="form-control" id="newPolitics" name="newPolitics" >
+                                                            <select class="form-control" id="newPolitics" name="newPolitics" value="{$row.newPolitics}">
                                                             </select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>现证件类型</label>
-                                                            <select class="form-control" id="newCardType" name="newCardType" >
+                                                            <select class="form-control" id="newCardType" name="newCardType" value="{$row.newCardType}">
                                                             </select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>现证件号码</label>
-                                                            <input class="form-control" id="newIdCard" name="newIdCard" >
+                                                            <input class="form-control" id="newIdCard" name="newIdCard" value="{$row.newIdCard}">
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class="control-label spacing"><span style="color: red">*</span>现电子邮箱</label>
-                                                            <input type="text" class="form-control" id="newEmail" name="newEmail" />
+                                                            <input type="text" class="form-control" id="newEmail" name="newEmail" value="{$row.newEmail}"/>
                                                         </div>
                                                     </div>
                                                 </div>

+ 24 - 18
app/enterprise/view/talent_basic_change/index.html

@@ -19,11 +19,13 @@
                                 </div>
                             </div>
                             <div class="col-sm-3">
-                                <div class="input-group-btn">
-                                    <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">原证件类型</button>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">原证件类型</button>
+                                    </div>
+                                    <select id="oldCardType" class="form-control">
+                                    </select>
                                 </div>
-                                <select id="oldCardType" class="form-control">
-                                </select>
                             </div>
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">
@@ -42,11 +44,13 @@
                                 </div>
                             </div>
                             <div class="col-sm-3">
-                                <div class="input-group-btn">
-                                    <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">现证件类型</button>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">现证件类型</button>
+                                    </div>
+                                    <select id="newCardType" class="form-control">
+                                    </select>
                                 </div>
-                                <select id="newCardType" class="form-control">
-                                </select>
                             </div>
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">
@@ -57,17 +61,19 @@
                                 </div>
                             </div>
                             <div class="col-sm-3">
-                                <div class="input-group-btn">
-                                    <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">审核状态</button>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">审核状态</button>
+                                    </div>
+                                    <select id="checkState" class="form-control">
+                                        <option value="">请选择</option>
+                                        <option value="-1">待提交</option>
+                                        <option value="1">待审核</option>
+                                        <option value="9">重新提交</option>
+                                        <option value="2">已驳回</option>
+                                        <option value="3">已通过</option>
+                                    </select>
                                 </div>
-                                <select id="checkState" class="form-control">
-                                    <option value="">请选择</option>
-                                    <option value="-1">待提交</option>
-                                    <option value="1">待审核</option>
-                                    <option value="9">重新提交</option>
-                                    <option value="2">已驳回</option>
-                                    <option value="3">已通过</option>
-                                </select>
                             </div>
                             <div class="col-sm-3">
                                 <button type="button" class="btn btn-sm btn-primary" onclick="TalentBasicChange.search()">

+ 2 - 2
app/enterprise/view/talent_quit/view.html

@@ -98,7 +98,7 @@
                                                 <input class="form-control" id="phone" readonly="readonly" name="phone" value="{$row.phone}"/>
                                             </div>
                                         </div>
-                                        {if condition="$type eq 1"}
+                                        {if condition="$row['type'] eq 1"}
                                         <div class="rowGroup">
                                             <label class="col-sm-2 control-label spacing">人才标签</label>
                                             <div class="col-sm-4 spacing">
@@ -112,7 +112,7 @@
                                                 <input class="form-control date time" id="quitTime" name="quitTime" value="{$row.quitTime}" />
                                             </div>
                                         </div>
-                                        {if condition="$type eq 1"}
+                                        {if condition="$row['type'] eq 1"}
                                         <div class="rowGroup">
                                             <label class="col-sm-2 control-label spacing">离职原因</label>
                                             <div class="col-sm-4 spacing">

+ 0 - 8
app/enterprise/view/talent_work_unit_change/index.html

@@ -42,14 +42,6 @@
                                     <input type="text" class="form-control" id="oldEnterpriseId" placeholder="" />
                                 </div>
                             </div>
-                            <div class="col-sm-3">
-                                <div class="input-group input-group-sm">
-                                    <div class="input-group-btn">
-                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">新工作单位</button>
-                                    </div>
-                                    <input type="text" class="form-control" id="newEnterpriseId" placeholder="" />
-                                </div>
-                            </div>
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">
                                     <div class="input-group-btn">

+ 3 - 3
app/enterprise/view/talent_work_unit_change/view.html

@@ -102,7 +102,7 @@
                                                 <input class="form-control" id="quitTime" readonly="readonly" name="quitTime" value="{$row.quitTime}"/>
                                             </div>
                                         </div>                                        
-                                        {if condition="$type eq 1"}
+                                        {if condition="$row['type'] eq 1"}
                                         <div class="rowGroup">
                                             <label class="col-sm-2 control-label spacing">离职申报原因</label>
                                             <div class="col-sm-4 spacing">
@@ -157,7 +157,7 @@
                                                 <input class="form-control date" id="anyTime" name="anyTime" value="{$row.anyTime}"/>
                                             </div>
                                         </div>
-                                        {if condition="$type eq 1"}
+                                        {if condition="$row['type'] eq 1"}
                                         <div class="rowGroup">
                                             <label class="col-sm-2 control-label spacing">单位变更申报原因</label>
                                             <div class="col-sm-4 spacing">
@@ -193,6 +193,6 @@
 <iframe id="hiddenIframe" name="hiddenIframe" style="display: none"></iframe>
 <!--<script src="${ctxPath}/static/modular/gate/talentLibrary/talentWorkunitChange/talentWorkunitChange_select.js"></script>-->
 <script type="text/javascript">
-    document.write('<script src="${ctxPath}/static/modular/gate/talentLibrary/talentWorkunitChange/talentWorkunitChange_select.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/gate/talentLibrary/talentWorkunitChange/talentWorkunitChange_select.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>
 {/block}

+ 1 - 1
public/static/js/common/Feng.js

@@ -464,7 +464,7 @@ var Feng = {
             success :function (layero, index) {
                 //初始化日志
                 $('#'+id).bootstrapTable({
-                    url: Feng.ctxPath + "/api/talentInfo/getCheckLog",
+                    url: Feng.ctxPath + "/common/api/getCheckLog",
                     method: 'POST',
                     contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                     search: false,					// 是否显示表格搜索,此搜索是客户端搜索,不会进服务端

+ 4 - 4
public/static/modular/gate/talentLibrary/talentBasicChange/talentBasicChange.js

@@ -118,7 +118,7 @@ TalentBasicChange.openTalentBasicChangeDetail = function () {
             area: ['800px', '420px'], //宽高
             fix: false, //不固定
             maxmin: true,
-            content: Feng.ctxPath + '/enterprise/talent_basic_change/apply/id/' + TalentBasicChange.seItem.id + "?hand=1",
+            content: Feng.ctxPath + '/enterprise/talent_basic_change/apply/id/' + TalentBasicChange.seItem.id,
             btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-check layui-bg-green"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
             btnAlign: 'c',
             btn1: function (index, layero) {
@@ -149,7 +149,7 @@ TalentBasicChange.openTalentBasicChangeSelect = function () {
             area: ['800px', '420px'], //宽高
             fix: false, //不固定
             maxmin: true,
-            content: Feng.ctxPath + '/enterprise/talent_basic_change/view/id/' + TalentBasicChange.seItem.id + "?hand=2"
+            content: Feng.ctxPath + '/enterprise/talent_basic_change/view/id/' + TalentBasicChange.seItem.id
         });
         TalentBasicChange.layerIndex = index;
         layer.full(index);
@@ -207,8 +207,8 @@ $(function () {
     table.setPaginationType("server");
     TalentBasicChange.table = table.init();
     var arr = [
-        {"name": "oldCardType", "code": "un_cardType"},
-        {"name": "newCardType", "code": "un_cardType"}
+        {"name": "oldCardType", "code": "card_type"},
+        {"name": "newCardType", "code": "card_type"}
     ];
     Feng.findChildDictBatch(JSON.stringify(arr));
 });

+ 47 - 46
public/static/modular/gate/talentLibrary/talentBasicChange/talentBasicChange_info.js

@@ -66,40 +66,40 @@ TalentBasicChangeInfoDlg.validate = function () {
  */
 TalentBasicChangeInfoDlg.collectData = function () {
     this
-        .set('id')
-        .set('type')
-        .set('enterpriseId')
-        .set('talentId')
-        .set('newName')
-        .set('newBirthday')
-        .set('newNationality')
-        .set('newNation')
-        .set('newPolitics')
-        .set('newCardType')
-        .set('newIdCard')
-        .set('newEmail');
+            .set('id')
+            .set('type')
+            .set('enterpriseId')
+            .set('talentId')
+            .set('newName')
+            .set('newBirthday')
+            .set('newNationality')
+            .set('newNation')
+            .set('newPolitics')
+            .set('newCardType')
+            .set('newIdCard')
+            .set('newEmail');
 }
 
 
 TalentBasicChangeInfoDlg.nameChange = function () {
     var talentId = $("#talentId").val();
     if (Feng.isNotEmptyStr(talentId)) {
-        var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/detail/" + talentId, function (data) {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talent/getTalentBasicById/id/" + talentId, function (data) {
             var talentInfo = data;
             $("#oldBirthday").val(talentInfo.birthday);
             $("#oldNationality").val(talentInfo.nationality);
             $("#oldNation").val(talentInfo.nation);
             $("#oldPolitics").val(talentInfo.politics);
-            $("#oldCardType").val(talentInfo.cardType);
-            $("#oldIdCard").val(talentInfo.idCard);
+            $("#oldCardType").val(talentInfo.card_type);
+            $("#oldIdCard").val(talentInfo.card_number);
             $("#oldEmail").val(talentInfo.email);
             $("#newName").val(talentInfo.name);
             $("#newBirthday").val(talentInfo.birthday);
             $("#newNationality").val(talentInfo.nationality);
             $("#newNation").val(talentInfo.nation);
             $("#newPolitics").val(talentInfo.politics);
-            $("#newCardType").val(talentInfo.cardType);
-            $("#newIdCard").val(talentInfo.idCard);
+            $("#newCardType").val(talentInfo.card_type);
+            $("#newIdCard").val(talentInfo.card_number);
             $("#newEmail").val(talentInfo.email);
         }, function (data) {
             Feng.error("查询失败!" + data.responseJSON.message + "!");
@@ -123,7 +123,7 @@ TalentBasicChangeInfoDlg.addSubmit = function () {
         return;
     }
     //提交信息
-    var ajax = new $ax(Feng.ctxPath + "/api/talentBasicChange/add", function (data) {
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/talentBasicChange/apply", function (data) {
         if (data.code == 200) {
             Feng.success(data.msg);
             $("#id").val(data.obj.id);
@@ -144,9 +144,10 @@ TalentBasicChangeInfoDlg.addSubmit = function () {
  * 提交修改
  */
 TalentBasicChangeInfoDlg.editSubmit = function () {
-    if (!validateIsEdit()) return;
+    if (!validateIsEdit())
+        return;
     //提交信息
-    var ajax = new $ax(Feng.ctxPath + "/api/talentBasicChange/update", function (data) {
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/talentBasicChange/apply", function (data) {
         if (data.code == 200) {
             Feng.success(data.msg);
         } else {
@@ -159,7 +160,7 @@ TalentBasicChangeInfoDlg.editSubmit = function () {
     ajax.start();
 }
 
-function validateIsEdit () {
+function validateIsEdit() {
     var id = $("#id").val();
     if (id == null || id == '') {
         Feng.info("请先添加基本信息并保存后再试");
@@ -180,23 +181,23 @@ function validateIsEdit () {
  * @param row
  * @returns {string}
  */
-function validUploadButton(type,row,fileId){
+function validUploadButton(type, row, fileId) {
     var checkState = $("#checkState").val();
-    if(Feng.isEmptyStr(checkState)|| checkState ==-1 ||checkState==2){
-        if(type == 1){          //上传
-            return "<button type='button' onclick=\"checkFile(this,'"+row.id+"','"+null+"')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
-                "<i class=\"fa fa-upload\"></i>上传" +
-                "</button>" ;
-        }else{
-            return "<button type=\'button\' onclick=\"checkFile(this,'"+row.id+"','"+fileId+"')\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\">" +
-                "<i class=\"fa fa-paste\"></i>修改" +
-                "</button>" +
-                "<button type='button' onclick=\"deleteFile('"+fileId+"','"+CONFIG.project_basicchange+"')\" class=\"btn btn-xs btn-danger\">" +
-                "<i class=\"fa fa-times\"></i>删除" +
-                "</button>";
+    if (Feng.isEmptyStr(checkState) || checkState == -1 || checkState == 2) {
+        if (type == 1) {          //上传
+            return "<button type='button' onclick=\"checkFile(this,'" + row.id + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
+                    "<i class=\"fa fa-upload\"></i>上传" +
+                    "</button>";
+        } else {
+            return "<button type=\'button\' onclick=\"checkFile(this,'" + row.id + "','" + fileId + "')\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\">" +
+                    "<i class=\"fa fa-paste\"></i>修改" +
+                    "</button>" +
+                    "<button type='button' onclick=\"deleteFile('" + fileId + "','" + CONFIG.project_basicchange + "')\" class=\"btn btn-xs btn-danger\">" +
+                    "<i class=\"fa fa-times\"></i>删除" +
+                    "</button>";
         }
-    }else{
-        return type == 1?"":"";
+    } else {
+        return type == 1 ? "" : "";
     }
 }
 
@@ -221,7 +222,7 @@ TalentBasicChangeInfoDlg.submitToCheck = function () {
         return;
     }
     var operation = function () {
-        var ajax = new $ax(Feng.ctxPath + "/api/talentBasicChange/submitToCheck", function (data) {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talentBasicChange/submitToCheck", function (data) {
             if (data.code == 200) {
                 Feng.success(data.msg);
                 // $("#checkState").val(data.obj);
@@ -247,14 +248,14 @@ $(function () {
     var checkState = $("#checkState").val();
     //批量加载字典表数据
     var arr = [
-        {"name": "oldNationality", "code": "un_nationality"},
-        {"name": "oldNation", "code": "un_nation"},
-        {"name": "oldPolitics", "code": "un_political"},
-        {"name": "oldCardType", "code": "un_cardType"},
-        {"name": "newNationality", "code": "un_nationality"},
-        {"name": "newNation", "code": "un_nation"},
-        {"name": "newPolitics", "code": "un_political"},
-        {"name": "newCardType", "code": "un_cardType"}
+        {"name": "oldNationality", "code": "nationality"},
+        {"name": "oldNation", "code": "nation"},
+        {"name": "oldPolitics", "code": "politics"},
+        {"name": "oldCardType", "code": "card_type"},
+        {"name": "newNationality", "code": "nationality"},
+        {"name": "newNation", "code": "nation"},
+        {"name": "newPolitics", "code": "politics"},
+        {"name": "newCardType", "code": "card_type"}
     ];
     Feng.findChildDictBatch(JSON.stringify(arr));
     if (Feng.isNotEmptyStr(id)) {
@@ -265,7 +266,7 @@ $(function () {
         $("#fileLi").removeAttr("style");
         Feng.getCheckLog("logTable", {"type": CONFIG.project_basicchange, "mainId": id, "typeFileId": "", "active": 1})
     } else {
-        $("#fileLi").attr("style","pointer-events: none");
+        $("#fileLi").attr("style", "pointer-events: none");
         $("#talentId").on('chosen:ready', function (e, params) {
             $(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 8px");
         });

+ 3 - 3
public/static/modular/gate/talentLibrary/talentWorkunitChange/talentWorkunitChange.js

@@ -90,7 +90,7 @@ TalentWorkunitChange.check = function () {
  * 点击添加工作单位变更
  */
 TalentWorkunitChange.openAddTalentWorkunitChange = function () {
-    var ajax = new $ax(Feng.ctxPath + "/api/commonBatch/valiateIsAdd", function (data) {
+    var ajax = new $ax(Feng.ctxPath + "/common/batch/checkBatchValid", function (data) {
         if (data.code == 200) {
             var index = layer.open({
                 type: 2,
@@ -98,7 +98,7 @@ TalentWorkunitChange.openAddTalentWorkunitChange = function () {
                 area: ['800px', '420px'], //宽高
                 fix: false, //不固定
                 maxmin: true,
-                content: Feng.ctxPath + '/enterprise/talent_work_unit_change/apply?year=' + data.obj,
+                content: Feng.ctxPath + '/enterprise/talent_work_unit_change/apply?year=' + data.batch,
                 btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-check layui-bg-green"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
                 btnAlign: 'c',
                 btn1: function (index, layero) {
@@ -133,7 +133,7 @@ TalentWorkunitChange.openAddTalentWorkunitChange = function () {
  */
 TalentWorkunitChange.openTalentWorkunitChangeDetail = function () {
     if (this.check()) {
-        var ajax = new $ax(Feng.ctxPath + "/api/commonBatch/valiateIsEditOrSubmit", function (data) {
+        var ajax = new $ax(Feng.ctxPath + "/common/batch/checkBatchValid", function (data) {
             if (data.code == 200) {
                 if (TalentWorkunitChange.seItem.checkState == 1) {
                     Feng.error("申报正在审核中");

+ 201 - 199
public/static/modular/gate/talentLibrary/talentWorkunitChange/talentWorkunitChange_info.js

@@ -3,27 +3,27 @@
  */
 var locked = false;
 var TalentWorkunitChangeInfoDlg = {
-    talentWorkunitChangeInfoData : {},
+    talentWorkunitChangeInfoData: {},
     validateFields: {
-        talentId:{validators: {notEmpty: {message: '优秀人才不能为空' }}},
-        idCard: {validators: {notEmpty: {message: '身份证号不能为空' }}},
-        talentArrange:{validators: {notEmpty: {message: '人才层次不能为空' }}},
-        oldEnterpriseId: {validators: {notEmpty: {message: '原工作单位不能为空' }}},
-        quitTime:{validators: {notEmpty: {message: '离职时间不能为空' }}},
-        newTalentType: {validators: {notEmpty: {message: '新人才标签不能为空' }}},
-        identifyTime:{validators: {notEmpty: {message: '认定时间不能为空' }}},
-        oldTalentType: {validators: {notEmpty: {message: '原人才标签不能为空' }}},
-        starttime:{validators: {notEmpty: {message: '合同开始时间不能为空' }}},
-        anyTime: {validators: {notEmpty: {message: '入职/变更时间不能为空' }}},
-        newPost: {validators: {notEmpty: {message: '新职务不能为空' }}},
+        talentId: {validators: {notEmpty: {message: '优秀人才不能为空'}}},
+        idCard: {validators: {notEmpty: {message: '身份证号不能为空'}}},
+        talentArrange: {validators: {notEmpty: {message: '人才层次不能为空'}}},
+        oldEnterpriseId: {validators: {notEmpty: {message: '原工作单位不能为空'}}},
+        quitTime: {validators: {notEmpty: {message: '离职时间不能为空'}}},
+        newTalentType: {validators: {notEmpty: {message: '新人才标签不能为空'}}},
+        identifyTime: {validators: {notEmpty: {message: '认定时间不能为空'}}},
+        oldTalentType: {validators: {notEmpty: {message: '原人才标签不能为空'}}},
+        starttime: {validators: {notEmpty: {message: '合同开始时间不能为空'}}},
+        anyTime: {validators: {notEmpty: {message: '入职/变更时间不能为空'}}},
+        newPost: {validators: {notEmpty: {message: '新职务不能为空'}}},
         phone: {
             validators: {
                 notEmpty: {
                     message: '手机号码不能为空'
                 },
-                regexp :{
+                regexp: {
                     regexp: /0?(13|14|15|17|18|19)[0-9]{9}/,
-                    message:"手机号码格式不正确"
+                    message: "手机号码格式不正确"
                 }
             }
         }
@@ -33,7 +33,7 @@ var TalentWorkunitChangeInfoDlg = {
 /**
  * 清除数据
  */
-TalentWorkunitChangeInfoDlg.clearData = function() {
+TalentWorkunitChangeInfoDlg.clearData = function () {
     this.talentWorkunitChangeInfoData = {};
 }
 
@@ -43,7 +43,7 @@ TalentWorkunitChangeInfoDlg.clearData = function() {
  * @param key 数据的名称
  * @param val 数据的具体值
  */
-TalentWorkunitChangeInfoDlg.set = function(key, val) {
+TalentWorkunitChangeInfoDlg.set = function (key, val) {
     this.talentWorkunitChangeInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
     return this;
 }
@@ -54,49 +54,49 @@ TalentWorkunitChangeInfoDlg.set = function(key, val) {
  * @param key 数据的名称
  * @param val 数据的具体值
  */
-TalentWorkunitChangeInfoDlg.get = function(key) {
+TalentWorkunitChangeInfoDlg.get = function (key) {
     return $("#" + key).val();
 }
 
 /**
  * 关闭此对话框
  */
-TalentWorkunitChangeInfoDlg.close = function() {
+TalentWorkunitChangeInfoDlg.close = function () {
     parent.layer.close(window.parent.TalentWorkunitChange.layerIndex);
 }
 
 /**
  * 收集数据
  */
-TalentWorkunitChangeInfoDlg.collectData = function() {
+TalentWorkunitChangeInfoDlg.collectData = function () {
     this
-    .set('id')
-    .set('year')
-    .set('type')
-    .set('talentId')
-    .set('idCard')
-    .set('talentName')
-    .set('talentArrange')
-    .set('identifyTime')
-    .set('oldEnterpriseId')
-    .set('oldTalentType')
-    .set('oldLetterTime')
-    .set('oldGygb')
-    .set('newLetterTime')
-    .set('newGygb')
-    .set('oldAnyTime')
-    .set('quitTime')
-    .set('quitReason')
-    .set('newEnterpriseId')
-    .set('newTalentType')
-    .set('starttime')
-    .set('endtime')
-    .set('phone')
-    .set('anyTime')
-    .set('anyReason')
-    .set('description')
-        .set('oldPost')
-        .set('newPost');
+            .set('id')
+            .set('year')
+            .set('type')
+            .set('talentId')
+            .set('idCard')
+            .set('talentName')
+            .set('talentArrange')
+            .set('identifyTime')
+            .set('oldEnterpriseId')
+            .set('oldTalentType')
+            .set('oldLetterTime')
+            .set('oldGygb')
+            .set('newLetterTime')
+            .set('newGygb')
+            .set('oldAnyTime')
+            .set('quitTime')
+            .set('quitReason')
+            .set('newEnterpriseId')
+            .set('newTalentType')
+            .set('starttime')
+            .set('endtime')
+            .set('phone')
+            .set('anyTime')
+            .set('anyReason')
+            .set('description')
+            .set('oldPost')
+            .set('newPost');
 }
 
 /**
@@ -111,44 +111,45 @@ TalentWorkunitChangeInfoDlg.validate = function () {
 /**
  * 提交添加
  */
-TalentWorkunitChangeInfoDlg.addSubmit = function() {
+TalentWorkunitChangeInfoDlg.addSubmit = function () {
     this.clearData();
     this.collectData();
-    if(!this.validate()){
+    if (!this.validate()) {
         return;
     }
     var id = $("#id").val();
     //提交信息
     //提交信息
-    if(locked) return ;
+    if (locked)
+        return;
     locked = true;
-    if(id!=null && id!=''){
-        var ajax = new $ax(Feng.ctxPath + "/api/talentWorkunitChange/update", function(data){
-            if(data.code=="200"){
+    if (id != null && id != '') {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talentWorkUnitChange/apply", function (data) {
+            if (data.code == "200") {
                 Feng.success(data.msg);
                 window.parent.TalentWorkunitChange.table.refresh();
                 // TalentWorkunitChangeInfoDlg.close();
-            }else{
+            } else {
                 Feng.info(data.msg);
             }
             locked = false;
-        },function(data){
+        }, function (data) {
             Feng.error("修改失败!" + data.responseJSON.message + "!");
             locked = false;
         });
-    }else{
-        var ajax = new $ax(Feng.ctxPath + "/api/talentWorkunitChange/add", function(data){
-            if(data.code=="200"){
+    } else {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talentWorkUnitChange/apply", function (data) {
+            if (data.code == "200") {
                 Feng.success(data.msg);
                 $("#fileLi").removeAttr("style");
                 $("#id").val(data.obj.id);
                 $("#checkState").val(data.obj.checkState);
                 window.parent.TalentWorkunitChange.table.refresh();
-            }else{
+            } else {
                 Feng.info(data.msg);
             }
             locked = false;
-        },function(data){
+        }, function (data) {
             Feng.error("添加失败!" + data.responseJSON.message + "!");
             locked = false;
         });
@@ -160,26 +161,26 @@ TalentWorkunitChangeInfoDlg.addSubmit = function() {
 /**
  * 提交修改
  */
-TalentWorkunitChangeInfoDlg.editSubmit = function(type) {
+TalentWorkunitChangeInfoDlg.editSubmit = function (type) {
     this.clearData();
     this.collectData();
-    if(!this.validate()){
+    if (!this.validate()) {
         return;
     }
     //提交信息
-    var ajax = new $ax(Feng.ctxPath + "/api/talentWorkunitChange/update", function(data){
-        if(data.code=="200"){
-            if(type == 1){
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/talentWorkUnitChange/apply", function (data) {
+        if (data.code == "200") {
+            if (type == 1) {
                 Feng.success(data.msg);
                 window.parent.TalentWorkunitChange.table.refresh();
-            }else{
+            } else {
                 TalentWorkunitChangeInfoDlg.submitToCheck();
             }
-        }else{
+        } else {
             Feng.info(data.msg);
         }
         locked = false;
-    },function(data){
+    }, function (data) {
         Feng.error("修改失败!" + data.responseJSON.message + "!");
         locked = false;
     });
@@ -188,13 +189,13 @@ TalentWorkunitChangeInfoDlg.editSubmit = function(type) {
 }
 
 //点击按钮初始化
-TalentWorkunitChangeInfoDlg.talentInfoDetail = function (){
+TalentWorkunitChangeInfoDlg.talentInfoDetail = function () {
     var idCard = $("#idCard").val();
-    var ajax = new $ax(Feng.ctxPath + "/api/talentQuit/findByIdCard/"+idCard, function(data){
-        if(data.code==200){
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/talentQuit/findByIdCard/idCard/" + idCard, function (data) {
+        if (data.code == 200) {
             $("#talentWorkUnitForm")[0].reset();
             $("#idCard").val(idCard)
-            $("#newEnterpriseId").val(data.obj.user.id);
+            $("#newEnterpriseId").val(data.obj.user.uid);
             $("#newEnterpriseName").val(data.obj.user.name);
             $("#type").val(data.obj.info.type);
             $("#oldEnterpriseId").val(data.obj.info.enterpriseId);
@@ -211,105 +212,106 @@ TalentWorkunitChangeInfoDlg.talentInfoDetail = function (){
             $("#oldEnterpriseName").val(data.obj.info.enterpriseName);
             $("#phone").val(data.obj.info.phone);
             $("#oldPost").val(data.obj.info.post);
-            if(data.obj.info.type == 1){
+            if (data.obj.info.type == 1) {
                 toastr.success("属离晋后又重新返晋的,需重新认定为我市优秀人才。咨询热线:0595-85633128/0595-85662310。");
             }
             TalentWorkunitChangeInfoDlg.initField();
-        }else{
+        } else {
             Feng.error(data.msg);
         }
-    },function(data){
+    }, function (data) {
         Feng.error("查询失败!" + data.responseJSON.message + "!");
     });
     ajax.set();
     ajax.start();
 }
 //根据条件隐藏字段
-TalentWorkunitChangeInfoDlg.initField = function(){
+TalentWorkunitChangeInfoDlg.initField = function () {
     var type = $("#type").val();
-    if(type==2){
+    if (type == 2) {
         $("#oldTalentType,#newTalentType,#oldLetterTime,#newLetterTime,#oldGygb,#newGygb").each(function () {
-            $(this).parent().parent().attr("style","display:none");
+            $(this).parent().parent().attr("style", "display:none");
         });
     }
-    if(type==1){
+    if (type == 1) {
         $("#oldTalentType,#newTalentType").each(function () {
-            $(this).parent().parent().attr("style","display:block");
+            $(this).parent().parent().attr("style", "display:block");
         });
         TalentWorkunitChangeInfoDlg.typeChange("old");
     }
 }
 
-TalentWorkunitChangeInfoDlg.typeChange = function(id){
-    var talentType = $("#"+id+"TalentType").val();
-    if(talentType=='gbwszb' || talentType=='zzbsh'){
-        $("#"+id+"LetterTime").parent().parent().attr("style","display:block");
-    }else if(talentType=='gyqyl' || talentType=="gyqyh"){
-        $("#"+id+"LetterTime").parent().parent().attr("style","display:none");
-    }else{
-        $("#"+id+"LetterTime").parent().parent().attr("style","display:none");
+TalentWorkunitChangeInfoDlg.typeChange = function (id) {
+    var talentType = $("#" + id + "TalentType").val();
+    if (talentType == 'gbwszb' || talentType == 'zzbsh') {
+        $("#" + id + "LetterTime").parent().parent().attr("style", "display:block");
+    } else if (talentType == 'gyqyl' || talentType == "gyqyh") {
+        $("#" + id + "LetterTime").parent().parent().attr("style", "display:none");
+    } else {
+        $("#" + id + "LetterTime").parent().parent().attr("style", "display:none");
     }
 }
 
 //附件初始化
-TalentWorkunitChangeInfoDlg.initFileTable = function(){
+TalentWorkunitChangeInfoDlg.initFileTable = function () {
     var queryData = {};
     queryData['project'] = CONFIG.project_workchange;
     queryData['type'] = $("#type").val();
     $("#fileTable").bootstrapTable({
-        url: Feng.ctxPath + "/api/talentInfo/findUnCommonFileType",
+        url: Feng.ctxPath + "/common/api/findCommonFileType",
         method: 'POST',
         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
-        search: false,					// 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
-        showRefresh: false,				// 是否显示刷新按钮
-        clickToSelect: true,			// 是否启用点击选中行
-        singleSelect: true,				// 设置True 将禁止多选
-        striped: true,  				// 是否显示行间隔色
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
         escape: true,
-        pagination: false,   			// 设置为 true 会在表格底部显示分页条
+        pagination: false, // 设置为 true 会在表格底部显示分页条
         paginationHAlign: "left",
         paginationDetailHAlign: "right",
-        sidePagination: "server",   	// 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
         showColumns: false,
-        detailView: true,               //是否显示父子表
+        detailView: true, //是否显示父子表
         pageList: [10, 30, 50],
         queryParams: function (params) {
-            return $.extend(queryData,params)
+            return $.extend(queryData, params)
         },
         rowStyle: function (row, index) {
-            return {classes:"info"};
+            return {classes: "info"};
         },
         columns:
-            [
-                {field: 'selectItem', checkbox:false,visible:false},
-                {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:"40%",'class': 'uitd_showTip',
-                    formatter : function(value,row,index){
-                        if(row.must==1){
-                            return '<i class="fa fa-paste"></i><span style="font-weight:bold;color:red;font-size:14px;font-family:宋体"> * </span> '+ value;
-                        }if(row.must==2){
-                            return '<i class="fa fa-paste"></i>'+value;
+                [
+                    {field: 'selectItem', checkbox: false, visible: false},
+                    {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle', width: "40%", 'class': 'uitd_showTip',
+                        formatter: function (value, row, index) {
+                            if (row.must == 1) {
+                                return '<i class="fa fa-paste"></i><span style="font-weight:bold;color:red;font-size:14px;font-family:宋体"> * </span> ' + value;
+                            }
+                            if (row.must == 2) {
+                                return '<i class="fa fa-paste"></i>' + value;
+                            }
                         }
-                    }
-                },
-                {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle',width:"10%",
-                    formatter : function(value,row,index){
-                        if(value==null||value==''||value=='null'){
-                            return '无';
+                    },
+                    {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle', width: "10%",
+                        formatter: function (value, row, index) {
+                            if (value == null || value == '' || value == 'null') {
+                                return '无';
+                            }
+                            return "<button type='button' onclick=\"TalentWorkunitChangeInfoDlg.downloadFile('" + row.id + "',3)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
+                                    "<i class=\"fa fa-download\"></i>下载" +
+                                    "</button>";
+                        }
+                    },
+                    {title: "说明", field: 'description', visible: true, align: 'center', valign: 'middle', width: "40%", 'class': 'uitd_showTip'},
+                    {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "10%",
+                        formatter: function (value, row, index) {
+                            return "<button type='button' onclick=\"TalentWorkunitChangeInfoDlg.checkFile('" + value + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
+                                    "<i class=\"fa fa-upload\"></i>上传" +
+                                    "</button>";
                         }
-                        return "<button type='button' onclick=\"TalentWorkunitChangeInfoDlg.downloadFile('"+row.id+"',3)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
-                            "<i class=\"fa fa-download\"></i>下载" +
-                            "</button>";
-                    }
-                },
-                {title:"说明",field:'description',visible: true, align: 'center', valign: 'middle',width:"40%",'class': 'uitd_showTip'},
-                {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',width:"10%",
-                    formatter : function(value,row,index){
-                        return "<button type='button' onclick=\"TalentWorkunitChangeInfoDlg.checkFile('"+value+"','"+null+"')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
-                            "<i class=\"fa fa-upload\"></i>上传" +
-                            "</button>" ;
                     }
-                }
-            ]
+                ]
         ,
         onPostBody: function () {
             $("td.uitd_showTip").bind("mouseover", function () {
@@ -321,35 +323,35 @@ TalentWorkunitChangeInfoDlg.initFileTable = function(){
             $("#fileTable").bootstrapTable('expandAllRows');
         },
         onExpandRow: function (index, row, $detail) {
-            var ajax = new $ax(Feng.ctxPath + "/api/talentCommonFile/listTalentCommonFile", function (data) {
-                if(data==null||data.length==0){
+            var ajax = new $ax(Feng.ctxPath + "/common/api/listTalentCommonFile", function (data) {
+                if (data == null || data.length == 0) {
                     return;
                 }
                 var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
-                for(var key in data){
+                for (var key in data) {
                     var sn = data[key].url.lastIndexOf(".");
-                    var suffix = data[key].url.substring(sn+1,data[key].url.length);
+                    var suffix = data[key].url.substring(sn + 1, data[key].url.length);
                     var imgStr = "";
-                    if(suffix=="pdf"||suffix=="PDF"){
-                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('"+data[key].url+"','"+data[key].id+"','"+data[key].orignName+"')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
-                    }else if(suffix == "xlsx" || suffix=="XLSX" || suffix == 'xls' || suffix == 'XLS'){
-                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('"+data[key].url+"','"+data[key].id+"','"+data[key].orignName+"')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
-                    }else{
-                        imgStr = '<img class=\"imgUrl\"  src=\"'+data[key].url+'\" style=\"width:25px;height:25px;\">';
+                    if (suffix == "pdf" || suffix == "PDF") {
+                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
+                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
+                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
+                    } else {
+                        imgStr = '<img class=\"imgUrl\"  src=\"' + data[key].url + '\" style=\"width:25px;height:25px;\">';
                     }
-                    var btn = "<button type=\'button\' onclick=\"TalentWorkunitChangeInfoDlg.checkFile('"+row.id+"','"+data[key].id+"')\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\"><i class=\"fa fa-paste\"></i>修改</button>" +
-                            "<button type='button' onclick=\"TalentWorkunitChangeInfoDlg.deleteFile('"+data[key].id+"')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-times\"></i>删除</button>";
-                    html = html + '<li style="display: none">'+data[key].id+'</li>\n'+
-                        '<li style="width: 80%;padding-top: 5px;">'+data[key].orignName+'</li>\n'+
-                        '<li style="width: 10%;">'+imgStr+'</li>\n'+
-                        '<li style="width: 10%;padding-top: 2px;">'+btn+'</li>';
+                    var btn = "<button type=\'button\' onclick=\"TalentWorkunitChangeInfoDlg.checkFile('" + row.id + "','" + data[key].id + "')\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\"><i class=\"fa fa-paste\"></i>修改</button>" +
+                            "<button type='button' onclick=\"TalentWorkunitChangeInfoDlg.deleteFile('" + data[key].id + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-times\"></i>删除</button>";
+                    html = html + '<li style="display: none">' + data[key].id + '</li>\n' +
+                            '<li style="width: 80%;padding-top: 5px;">' + data[key].orignName + '</li>\n' +
+                            '<li style="width: 10%;">' + imgStr + '</li>\n' +
+                            '<li style="width: 10%;padding-top: 2px;">' + btn + '</li>';
 
                 }
                 html = html + '</ul>';
                 $detail.html(html);
                 $(".imgs").viewer({
                     // toolbar:false,
-                    fullscreen:false
+                    fullscreen: false
                 });
             }, function (data) {
                 Feng.error("查询失败!" + data.responseJSON.message + "!");
@@ -364,67 +366,67 @@ TalentWorkunitChangeInfoDlg.initFileTable = function(){
 }
 
 
-TalentWorkunitChangeInfoDlg.downloadFile = function (id,type){
-    window.location.href = Feng.ctxPath + "/api/common/downloadFile?id=" + id + "&type="+type;
+TalentWorkunitChangeInfoDlg.downloadFile = function (id, type) {
+    window.location.href = Feng.ctxPath + "/common/api/downloadFile?id=" + id + "&type=" + type;
 }
 
 //选择附件并显示附件名
-TalentWorkunitChangeInfoDlg.checkFile = function (fileTypeId,fileId){
+TalentWorkunitChangeInfoDlg.checkFile = function (fileTypeId, fileId) {
     var checkState = $("#checkState").val();
-    if(checkState==1){
+    if (checkState == 1) {
         Feng.error("正在审核中,无法修改");
-        return ;
+        return;
     }
-    if(checkState==3){
+    if (checkState == 3) {
         Feng.error("审核通过,无法修改");
-        return ;
+        return;
     }
-    if(checkState==-2){
+    if (checkState == -2) {
         Feng.error("审核不通过,无法修改");
-        return ;
+        return;
     }
     $("#upload_file ").unbind("change");
     $("#upload_file ").change(function () {
-        TalentWorkunitChangeInfoDlg.upload(fileTypeId,fileId);
+        TalentWorkunitChangeInfoDlg.upload(fileTypeId, fileId);
     });
     $('#upload_file').val("");
     $('#upload_file').click()
 }
 //上传附件
-TalentWorkunitChangeInfoDlg.upload = function (fileTypeId,fileId){
-    if(fileId!=null&&fileId!='null'){
+TalentWorkunitChangeInfoDlg.upload = function (fileTypeId, fileId) {
+    if (fileId != null && fileId != 'null') {
         $("#fileId").val(fileId)
-    }else{
+    } else {
         $("#fileId").val("");
     }
 
     $("#mainId").val($("#id").val());
     $("#typeId").val(fileTypeId);
-    var index = layer.load(0, {shade: false,time:0});
+    var index = layer.load(0, {shade: false, time: 0});
     $("#index").val(index);
     $("#uploadForm").submit();
 }
 //删除附件
-TalentWorkunitChangeInfoDlg.deleteFile = function (id){
+TalentWorkunitChangeInfoDlg.deleteFile = function (id) {
     var checkState = $("#checkState").val();
-    if(checkState==1){
+    if (checkState == 1) {
         Feng.error("正在审核中,无法修改");
-        return ;
+        return;
     }
-    if(checkState==3){
+    if (checkState == 3) {
         Feng.error("审核通过,无法修改");
-        return ;
+        return;
     }
-    if(checkState==-2){
+    if (checkState == -2) {
         Feng.error("审核不通过,无法修改");
-        return ;
+        return;
     }
-    var operation = function() {
-        var ajax = new $ax(Feng.ctxPath + "/api/talentCommonFile/deleteTalentCommonFile", function (data) {
-            if(data.code=200){
+    var operation = function () {
+        var ajax = new $ax(Feng.ctxPath + "/common/api/deleteTalentCommonFile", function (data) {
+            if (data.code = 200) {
                 Feng.success(data.msg);
                 $("#fileTable").bootstrapTable("refresh", {});
-            }else{
+            } else {
                 Feng.error(data.msg);
             }
         }, function (data) {
@@ -436,7 +438,7 @@ TalentWorkunitChangeInfoDlg.deleteFile = function (id){
     Feng.confirm("删除后无法恢复,确认删除吗?", operation);
 }
 //回调
-TalentWorkunitChangeInfoDlg.callBack = function (data){
+TalentWorkunitChangeInfoDlg.callBack = function (data) {
     layer.close(data.obj);
     Feng.info(data.msg);
     if (data.code == 200) {
@@ -447,33 +449,33 @@ TalentWorkunitChangeInfoDlg.callBack = function (data){
 /**
  * 提交审核
  */
-TalentWorkunitChangeInfoDlg.submitToCheck = function(){
+TalentWorkunitChangeInfoDlg.submitToCheck = function () {
     var id = $("#id").val();
-    if(id==null || id==""){
+    if (id == null || id == "") {
         Feng.info("请先填写基础信息并上传附件");
-        return ;
+        return;
     }
     var checkState = $("#checkState").val();
-    if(checkState==1){
+    if (checkState == 1) {
         Feng.error("正在审核中,无法提交");
-        return ;
+        return;
     }
-    if(checkState==3){
+    if (checkState == 3) {
         Feng.error("审核通过,无法提交");
-        return ;
+        return;
     }
-    if(checkState==-2){
+    if (checkState == -2) {
         Feng.error("审核不通过,无法提交");
-        return ;
+        return;
     }
-    var operation = function() {
-        var ajax = new $ax(Feng.ctxPath + "/api/talentWorkunitChange/submitToCheck", function (data) {
-            if(data.code==200){
+    var operation = function () {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talentWorkUnitChange/submitToCheck", function (data) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 // $("#checkState").val(data.obj);
                 window.parent.TalentWorkunitChange.table.refresh();
                 TalentWorkunitChangeInfoDlg.close();
-            }else{
+            } else {
                 Feng.error(data.msg);
             }
         }, function (data) {
@@ -485,40 +487,40 @@ TalentWorkunitChangeInfoDlg.submitToCheck = function(){
     Feng.confirm("请确认基础信息已核对无误,相应附件已上传,一旦提交,无法修改", operation);
 }
 
-$(function() {
+$(function () {
     Feng.initValidatorTip("talentWorkUnitForm", TalentWorkunitChangeInfoDlg.validateFields);
     //批量加载字典表数据
     var arr = [
-        {"name":"talentArrange","code":"un_talentLevel"},
-        {"name":"oldTalentType","code":"un_jbt_talentType"}];
+        {"name": "talentArrange", "code": "talent_arrange"},
+        {"name": "oldTalentType", "code": "enterprise_tag"}];
     Feng.findChildDictBatch(JSON.stringify(arr))
     //加载人才标签
-    Feng.addAjaxSelect({
-        "id": "newTalentType",
-        "displayCode": "code",
-        "displayName": "name",
-        "type": "GET",
-        "url": Feng.ctxPath + "/api/talentInfo/findTalentTypeByEnterprise"
-    });
+    /*Feng.addAjaxSelect({
+     "id": "newTalentType",
+     "displayCode": "code",
+     "displayName": "name",
+     "type": "GET",
+     "url": Feng.ctxPath + "/enterprise/talent/findTalentTypeByEnterprise"
+     });*/
     //批量加载时间控件
-    $(".date").each(function(){
+    $(".date").each(function () {
         laydate.render({
             elem: this
-            ,type: 'date'
-            ,trigger: 'click'
+            , type: 'date'
+            , trigger: 'click'
         });
     });
     var id = $("#id").val();
-    if(id!=null && id!=''){
+    if (id != null && id != '') {
         $("#fileLi").removeAttr("style");
         $("select").each(function () {
             $(this).val($(this).attr("value"));
             $(this).trigger("change");
         });
         TalentWorkunitChangeInfoDlg.initField();
-        Feng.getCheckLog("logTable",{"type":CONFIG.project_workchange,"mainId":id,"typeFileId":"","active":1})
-    }else{
-        $("#fileLi").attr("style","pointer-events: none");
+        Feng.getCheckLog("logTable", {"type": CONFIG.project_workchange, "mainId": id, "typeFileId": "", "active": 1})
+    } else {
+        $("#fileLi").attr("style", "pointer-events: none");
     }
     toastr.options = {
         "closeButton": true,

+ 110 - 112
public/static/modular/gate/talentLibrary/talentWorkunitChange/talentWorkunitChange_select.js

@@ -2,26 +2,26 @@
  * 初始化工作单位变更详情对话框
  */
 var TalentWorkunitChangeInfoDlg = {
-    talentWorkunitChangeInfoData : {},
+    talentWorkunitChangeInfoData: {},
     validateFields: {
-        talentId:{validators: {notEmpty: {message: '优秀人才不能为空' }}},
-        idCard: {validators: {notEmpty: {message: '身份证号不能为空' }}},
-        talentArrange:{validators: {notEmpty: {message: '人才层次不能为空' }}},
-        oldEnterpriseId: {validators: {notEmpty: {message: '原工作单位不能为空' }}},
-        quitTime:{validators: {notEmpty: {message: '离职时间不能为空' }}},
-        newTalentType: {validators: {notEmpty: {message: '新人才标签不能为空' }}},
-        identifyTime:{validators: {notEmpty: {message: '认定时间不能为空' }}},
-        oldTalentType: {validators: {notEmpty: {message: '原人才标签不能为空' }}},
-        starttime:{validators: {notEmpty: {message: '合同开始时间不能为空' }}},
-        anyTime: {validators: {notEmpty: {message: '入职/变更时间不能为空' }}},
+        talentId: {validators: {notEmpty: {message: '优秀人才不能为空'}}},
+        idCard: {validators: {notEmpty: {message: '身份证号不能为空'}}},
+        talentArrange: {validators: {notEmpty: {message: '人才层次不能为空'}}},
+        oldEnterpriseId: {validators: {notEmpty: {message: '原工作单位不能为空'}}},
+        quitTime: {validators: {notEmpty: {message: '离职时间不能为空'}}},
+        newTalentType: {validators: {notEmpty: {message: '新人才标签不能为空'}}},
+        identifyTime: {validators: {notEmpty: {message: '认定时间不能为空'}}},
+        oldTalentType: {validators: {notEmpty: {message: '原人才标签不能为空'}}},
+        starttime: {validators: {notEmpty: {message: '合同开始时间不能为空'}}},
+        anyTime: {validators: {notEmpty: {message: '入职/变更时间不能为空'}}},
         phone: {
             validators: {
                 notEmpty: {
                     message: '手机号码不能为空'
                 },
-                regexp :{
+                regexp: {
                     regexp: /0?(13|14|15|17|18|19)[0-9]{9}/,
-                    message:"手机号码格式不正确"
+                    message: "手机号码格式不正确"
                 }
             }
         }
@@ -31,7 +31,7 @@ var TalentWorkunitChangeInfoDlg = {
 /**
  * 清除数据
  */
-TalentWorkunitChangeInfoDlg.clearData = function() {
+TalentWorkunitChangeInfoDlg.clearData = function () {
     this.talentWorkunitChangeInfoData = {};
 }
 
@@ -41,7 +41,7 @@ TalentWorkunitChangeInfoDlg.clearData = function() {
  * @param key 数据的名称
  * @param val 数据的具体值
  */
-TalentWorkunitChangeInfoDlg.set = function(key, val) {
+TalentWorkunitChangeInfoDlg.set = function (key, val) {
     this.talentWorkunitChangeInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
     return this;
 }
@@ -52,43 +52,42 @@ TalentWorkunitChangeInfoDlg.set = function(key, val) {
  * @param key 数据的名称
  * @param val 数据的具体值
  */
-TalentWorkunitChangeInfoDlg.get = function(key) {
+TalentWorkunitChangeInfoDlg.get = function (key) {
     return $("#" + key).val();
 }
 
 /**
  * 关闭此对话框
  */
-TalentWorkunitChangeInfoDlg.close = function() {
+TalentWorkunitChangeInfoDlg.close = function () {
     parent.layer.close(window.parent.TalentWorkunitChange.layerIndex);
 }
 
 /**
  * 收集数据
  */
-TalentWorkunitChangeInfoDlg.collectData = function() {
-    this
-        .set('id')
-        .set('type')
-        .set('talentId')
-        .set('idCard')
-        .set('talentName')
-        .set('talentArrange')
-        .set('identifyTime')
-        .set('oldEnterpriseId')
-        .set('oldTalentType')
-        .set('oldLetterTime')
-        .set('oldGygb')
-        .set('newLetterTime')
-        .set('newGygb')
-        .set('quitTime')
-        .set('newEnterpriseId')
-        .set('newTalentType')
-        .set('starttime')
-        .set('endtime')
-        .set('phone')
-        .set('anyTime')
-        .set('description');
+TalentWorkunitChangeInfoDlg.collectData = function () {
+    this.set('id')
+            .set('type')
+            .set('talentId')
+            .set('idCard')
+            .set('talentName')
+            .set('talentArrange')
+            .set('identifyTime')
+            .set('oldEnterpriseId')
+            .set('oldTalentType')
+            .set('oldLetterTime')
+            .set('oldGygb')
+            .set('newLetterTime')
+            .set('newGygb')
+            .set('quitTime')
+            .set('newEnterpriseId')
+            .set('newTalentType')
+            .set('starttime')
+            .set('endtime')
+            .set('phone')
+            .set('anyTime')
+            .set('description');
 }
 
 /**
@@ -102,84 +101,85 @@ TalentWorkunitChangeInfoDlg.validate = function () {
 
 
 //根据条件隐藏字段
-TalentWorkunitChangeInfoDlg.initField = function(){
+TalentWorkunitChangeInfoDlg.initField = function () {
     var type = $("#type").val();
-    if(type==2){
+    if (type == 2) {
         $("#oldTalentType,#newTalentType,#oldLetterTime,#newLetterTime,#oldGygb,#newGygb").each(function () {
-            $(this).parent().parent().attr("style","display:none");
+            $(this).parent().parent().attr("style", "display:none");
         });
     }
-    if(type==1){
+    if (type == 1) {
         $("#oldTalentType,#newTalentType").each(function () {
-            $(this).parent().parent().attr("style","display:block");
+            $(this).parent().parent().attr("style", "display:block");
         });
         TalentWorkunitChangeInfoDlg.typeChange("old");
     }
 }
 
-TalentWorkunitChangeInfoDlg.typeChange = function(id){
-    var talentType = $("#"+id+"TalentType").val();
-    if(talentType=='gbwszb' || talentType=='zzbsh'){
-        $("#"+id+"LetterTime").parent().parent().attr("style","display:block");
-    }else if(talentType=='gyqyl' || talentType=="gyqyh"){
-        $("#"+id+"LetterTime").parent().parent().attr("style","display:none");
-    }else{
-        $("#"+id+"LetterTime").parent().parent().attr("style","display:none");
+TalentWorkunitChangeInfoDlg.typeChange = function (id) {
+    var talentType = $("#" + id + "TalentType").val();
+    if (talentType == 'gbwszb' || talentType == 'zzbsh') {
+        $("#" + id + "LetterTime").parent().parent().attr("style", "display:block");
+    } else if (talentType == 'gyqyl' || talentType == "gyqyh") {
+        $("#" + id + "LetterTime").parent().parent().attr("style", "display:none");
+    } else {
+        $("#" + id + "LetterTime").parent().parent().attr("style", "display:none");
     }
 }
 
 //附件初始化
-TalentWorkunitChangeInfoDlg.initFileTable = function(){
+TalentWorkunitChangeInfoDlg.initFileTable = function () {
     var queryData = {};
     queryData['project'] = CONFIG.project_workchange;
     queryData['type'] = $("#type").val();
     $("#fileTable").bootstrapTable({
-        url: Feng.ctxPath + "/api/talentInfo/findUnCommonFileType",
+        url: Feng.ctxPath + "/common/api/findCommonFileType",
         method: 'POST',
         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
-        search: false,					// 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
-        showRefresh: false,				// 是否显示刷新按钮
-        clickToSelect: true,			// 是否启用点击选中行
-        singleSelect: true,				// 设置True 将禁止多选
-        striped: true,  				// 是否显示行间隔色
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
         escape: true,
-        pagination: false,   			// 设置为 true 会在表格底部显示分页条
+        pagination: false, // 设置为 true 会在表格底部显示分页条
         paginationHAlign: "left",
         paginationDetailHAlign: "right",
-        sidePagination: "server",   	// 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
         showColumns: false,
-        detailView: true,               //是否显示父子表
+        detailView: true, //是否显示父子表
         pageList: [10, 30, 50],
         queryParams: function (params) {
-            return $.extend(queryData,params)
+            return $.extend(queryData, params)
         },
         rowStyle: function (row, index) {
-            return {classes:"info"};
+            return {classes: "info"};
         },
         columns:
-            [
-                {field: 'selectItem', checkbox:false,visible:false},
-                {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:"40%",'class': 'uitd_showTip',
-                    formatter : function(value,row,index){
-                        if(row.must==1){
-                            return '<i class="fa fa-paste"></i><span style="font-weight:bold;color:red;font-size:14px;font-family:宋体"> * </span> '+ value;
-                        }if(row.must==2){
-                            return '<i class="fa fa-paste"></i>'+value;
+                [
+                    {field: 'selectItem', checkbox: false, visible: false},
+                    {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle', width: "40%", 'class': 'uitd_showTip',
+                        formatter: function (value, row, index) {
+                            if (row.must == 1) {
+                                return '<i class="fa fa-paste"></i><span style="font-weight:bold;color:red;font-size:14px;font-family:宋体"> * </span> ' + value;
+                            }
+                            if (row.must == 2) {
+                                return '<i class="fa fa-paste"></i>' + value;
+                            }
                         }
-                    }
-                },
-                {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle',width:"20%",
-                    formatter : function(value,row,index){
-                        if(value==null||value==''||value=='null'){
-                            return '无';
+                    },
+                    {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle', width: "20%",
+                        formatter: function (value, row, index) {
+                            if (value == null || value == '' || value == 'null') {
+                                return '无';
+                            }
+                            return "<button type='button' onclick=\"TalentWorkunitChangeInfoDlg.downloadFile('" + row.id + "',3)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
+                                    "<i class=\"fa fa-download\"></i>下载" +
+                                    "</button>";
                         }
-                        return "<button type='button' onclick=\"TalentWorkunitChangeInfoDlg.downloadFile('"+row.id+"',3)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
-                            "<i class=\"fa fa-download\"></i>下载" +
-                            "</button>";
-                    }
-                },
-                {title:"说明",field:'description',visible: true, align: 'center', valign: 'middle',width:"40%",'class': 'uitd_showTip'},
-            ]
+                    },
+                    {title: "说明", field: 'description', visible: true, align: 'center', valign: 'middle', width: "40%", 'class': 'uitd_showTip'},
+                ]
         ,
         onPostBody: function () {
             $("td.uitd_showTip").bind("mouseover", function () {
@@ -191,31 +191,31 @@ TalentWorkunitChangeInfoDlg.initFileTable = function(){
             $("#fileTable").bootstrapTable('expandAllRows');
         },
         onExpandRow: function (index, row, $detail) {
-            var ajax = new $ax(Feng.ctxPath + "/api/talentCommonFile/listTalentCommonFile", function (data) {
-                if(data==null||data.length==0){
+            var ajax = new $ax(Feng.ctxPath + "/common/api/listTalentCommonFile", function (data) {
+                if (data == null || data.length == 0) {
                     return;
                 }
                 var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 20%;font-weight: bold;padding-top: 5px;">预览</li>';
-                for(var key in data){
+                for (var key in data) {
                     var sn = data[key].url.lastIndexOf(".");
-                    var suffix = data[key].url.substring(sn+1,data[key].url.length);
+                    var suffix = data[key].url.substring(sn + 1, data[key].url.length);
                     var imgStr = "";
-                    if(suffix=="pdf"||suffix=="PDF"){
-                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('"+data[key].url+"','"+data[key].id+"','"+data[key].orignName+"')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
-                    }else if(suffix == "xlsx" || suffix=="XLSX" || suffix == 'xls' || suffix == 'XLS'){
-                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('"+data[key].url+"','"+data[key].id+"','"+data[key].orignName+"')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
-                    }else{
-                        imgStr = '<img class=\"imgUrl\"  src=\"'+data[key].url+'\" style=\"width:25px;height:25px;\">';
+                    if (suffix == "pdf" || suffix == "PDF") {
+                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
+                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
+                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
+                    } else {
+                        imgStr = '<img class=\"imgUrl\"  src=\"' + data[key].url + '\" style=\"width:25px;height:25px;\">';
                     }
-                    html = html + '<li style="display: none">'+data[key].id+'</li>\n'+
-                        '<li style="width: 80%;padding-top: 5px;">'+data[key].orignName+'</li>\n'+
-                        '<li style="width: 20%;">'+imgStr+'</li>\n';
+                    html = html + '<li style="display: none">' + data[key].id + '</li>\n' +
+                            '<li style="width: 80%;padding-top: 5px;">' + data[key].orignName + '</li>\n' +
+                            '<li style="width: 20%;">' + imgStr + '</li>\n';
                 }
                 html = html + '</ul>';
                 $detail.html(html);
                 $(".imgs").viewer({
                     // toolbar:false,
-                    fullscreen:false
+                    fullscreen: false
                 });
             }, function (data) {
                 Feng.error("查询失败!" + data.responseJSON.message + "!");
@@ -230,38 +230,36 @@ TalentWorkunitChangeInfoDlg.initFileTable = function(){
 }
 
 
-TalentWorkunitChangeInfoDlg.downloadFile = function (id,type){
-    window.location.href = Feng.ctxPath + "/api/common/downloadFile?id=" + id + "&type="+type;
+TalentWorkunitChangeInfoDlg.downloadFile = function (id, type) {
+    window.location.href = Feng.ctxPath + "/common/api/downloadFile?id=" + id + "&type=" + type;
 }
 
 
 
-$(function() {
+$(function () {
     Feng.initValidator("talentWorkUnitForm", TalentWorkunitChangeInfoDlg.validateFields);
     //批量加载字典表数据
     var arr = [
-        {"name":"talentArrange","code":"un_talentLevel"},
-        {"name":"oldTalentType","code":"un_jbt_talentType"},
-        {"name":"newTalentType","code":"un_jbt_talentType"}];
+        {"name": "talentArrange", "code": "talent_arrange"}];
     Feng.findChildDictBatch(JSON.stringify(arr))
     //批量加载时间控件
-    $(".date").each(function(){
+    $(".date").each(function () {
         laydate.render({
             elem: this
-            ,type: 'date'
-            ,trigger: 'click'
+            , type: 'date'
+            , trigger: 'click'
         });
     });
     var id = $("#id").val();
-    if(id!=null && id!=''){
+    if (id != null && id != '') {
         $("#fileLi").removeAttr("style");
         $("select").each(function () {
             $(this).val($(this).attr("value"));
             $(this).trigger("change");
         });
         TalentWorkunitChangeInfoDlg.initField();
-    }else{
-        $("#fileLi").attr("style","pointer-events: none");
+    } else {
+        $("#fileLi").attr("style", "pointer-events: none");
     }
 
 });

+ 41 - 37
public/static/modular/talentLibrary/talentBasicChange/talentBasicChange.js

@@ -2,8 +2,8 @@
  * 人才基础信息变更管理初始化
  */
 var TalentBasicChange = {
-    id: "TalentBasicChangeTable",	//表格id
-    seItem: null,		//选中的条目
+    id: "TalentBasicChangeTable", //表格id
+    seItem: null, //选中的条目
     table: null,
     layerIndex: -1
 };
@@ -14,45 +14,49 @@ var TalentBasicChange = {
 TalentBasicChange.initColumn = function () {
     return [
         {field: 'selectItem', radio: true},
-        {title: '申报单位', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '原姓名', field: 'oldName', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
+        {title: '申报单位', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
+        {title: '原姓名', field: 'oldName', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
         // {title: '原出生日期', field: 'oldBirthday', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '原国籍', field: 'oldNationalityName', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '原民族', field: 'oldNationName', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '原政治面貌', field: 'oldPoliticsName', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '原证件类型', field: 'oldCardTypName', visible: true, align: 'center', valign: 'middle',width:"80px",'class': 'uitd_showTip'},
-        {title: '原证件号码', field: 'oldIdCard', visible: true, align: 'center', valign: 'middle',width:"150px",'class': 'uitd_showTip'},
+        {title: '原国籍', field: 'oldNationalityName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '原民族', field: 'oldNationName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '原政治面貌', field: 'oldPoliticsName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '原证件类型', field: 'oldCardTypName', visible: true, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
+        {title: '原证件号码', field: 'oldIdCard', visible: true, align: 'center', valign: 'middle', width: "150px", 'class': 'uitd_showTip'},
         // {title: '原电子邮箱', field: 'oldEmail', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '现姓名', field: 'newName', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
+        {title: '现姓名', field: 'newName', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
         // {title: '现出生日期', field: 'newBirthday', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '现国籍', field: 'newNationalityName', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '现民族', field: 'newNationName', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '现政治面貌', field: 'newPoliticsName', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '现证件类型', field: 'newCardTypName', visible: true, align: 'center', valign: 'middle',width:"80px",'class': 'uitd_showTip'},
-        {title: '现证件号码', field: 'newIdCard', visible: true, align: 'center', valign: 'middle',width:"150px",'class': 'uitd_showTip'},
+        {title: '现国籍', field: 'newNationalityName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '现民族', field: 'newNationName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '现政治面貌', field: 'newPoliticsName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '现证件类型', field: 'newCardTypName', visible: true, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
+        {title: '现证件号码', field: 'newIdCard', visible: true, align: 'center', valign: 'middle', width: "150px", 'class': 'uitd_showTip'},
         // {title: '现邮箱', field: 'newEmail', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle',width:"80px",
-            formatter : function (value,row,index) {
-                if(value==-1){
+        {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "80px",
+            formatter: function (value, row, index) {
+                if (value == -1) {
                     return '<span class=\'label\'>待提交</span>';
-                }if(value==1){
+                }
+                if (value == 1) {
                     return '<span class=\'label label-success\'>待审核</span>';
-                }if(value==2){
+                }
+                if (value == 2) {
                     return '<span class=\'label label-danger\'>已驳回</span>';
-                }if(value==3){
+                }
+                if (value == 3) {
                     return '<span class=\'label label-primary\'>已通过</span>';
-                }if(value==9){
+                }
+                if (value == 9) {
                     return '<span class=\'label label-success\'>重新提交</span>';
                 }
             }
         },
-        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',width:"80px",
-            formatter: function (value,row,index) {
-                return "<span class='label label-success' onclick=\"Feng.getCheckLogModel('"+value+"','"+CONFIG.project_basicchange+"')\" >" +
-                    "<i class=\"fa fa-book\"></i>日志" +
-                    "</span>";
+        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
+            formatter: function (value, row, index) {
+                return "<span class='label label-success' onclick=\"Feng.getCheckLogModel('" + value + "','" + CONFIG.project_basicchange + "')\" >" +
+                        "<i class=\"fa fa-book\"></i>日志" +
+                        "</span>";
             }
         }
     ];
@@ -63,10 +67,10 @@ TalentBasicChange.initColumn = function () {
  */
 TalentBasicChange.check = function () {
     var selected = $('#' + this.id).bootstrapTable('getSelections');
-    if(selected.length == 0){
+    if (selected.length == 0) {
         Feng.info("请先选中表格中的某一记录!");
         return false;
-    }else{
+    } else {
         TalentBasicChange.seItem = selected[0];
         return true;
     }
@@ -83,7 +87,7 @@ TalentBasicChange.openTalentBasicChangeDetail = function () {
             area: ['800px', '420px'], //宽高
             fix: false, //不固定
             maxmin: true,
-            content: Feng.ctxPath + '/talentBasicChange/check/' + TalentBasicChange.seItem.id,
+            content: Feng.ctxPath + '/admin/talentBasicChange/check/id/' + TalentBasicChange.seItem.id,
             btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
             btnAlign: 'c',
             yes: function (index, layero) {
@@ -96,14 +100,14 @@ TalentBasicChange.openTalentBasicChangeDetail = function () {
     }
 };
 
-TalentBasicChange.export = function(){
+TalentBasicChange.export = function () {
     var queryData = TalentBasicChange.formParams();
-    var url = Feng.setUrlParam(Feng.ctxPath + "/talentBasicChange/export",queryData);
+    var url = Feng.setUrlParam(Feng.ctxPath + "/admin/talentBasicChange/export", queryData);
     window.location.href = url;
 }
 
 
-TalentBasicChange.formParams = function() {
+TalentBasicChange.formParams = function () {
     var queryData = {};
     queryData['enterpriseName'] = $("#enterpriseName").val();
     queryData['oldName'] = $("#oldName").val();
@@ -123,7 +127,7 @@ TalentBasicChange.search = function () {
     TalentBasicChange.table.refresh({query: TalentBasicChange.formParams()});
 };
 
-TalentBasicChange.reset = function(){
+TalentBasicChange.reset = function () {
     $("#enterpriseName").val("");
     $("#oldName").val("");
     $("#oldCardType").val("");
@@ -136,7 +140,7 @@ TalentBasicChange.reset = function(){
 
 $(function () {
     var defaultColunms = TalentBasicChange.initColumn();
-    var table = new BSTable(TalentBasicChange.id, "/talentBasicChange/list", defaultColunms);
+    var table = new BSTable(TalentBasicChange.id, "/admin/talentBasicChange/list", defaultColunms);
     table.setPaginationType("server");
     TalentBasicChange.table = table.init();
     var arr = [

+ 38 - 38
public/static/modular/talentLibrary/talentBasicChange/talentBasicChange_info.js

@@ -17,7 +17,7 @@ TalentBasicChangeInfoDlg.close = function () {
  */
 TalentBasicChangeInfoDlg.showCheckModal = function () {
     var checkState = $("#checkState").val();
-    if(checkState != 1 && checkState != 9){
+    if (checkState != 1 && checkState != 9) {
         Feng.info("不在审核范围内");
         return;
     }
@@ -30,51 +30,51 @@ TalentBasicChangeInfoDlg.showCheckModal = function () {
         shade: 0,
         maxmin: true,
         content: " <form id=\"checkForm\" style='margin: 5px'>\n" +
-            "                    <div class=\"form-group\">\n" +
-            "                        <label for=\"checkState\" class=\"control-label\">审核状态</label>\n" +
-            "                        <select class=\"form-control\" id=\"checkStateNow\" onchange=\"TalentBasicChangeInfoDlg.toggleField()\">\n" +
-            "                            <option value=\"\"></option>\n" +
-            "                            <option value=\"3\">审核通过</option>\n" +
-            "                            <option value=\"2\">审核驳回</option>\n" +
-            "                        </select>\n" +
-            "                    </div>\n" +
-            "                    <div class=\"form-group\">\n" +
-            "                        <label for=\"msg\" class=\"control-label\">审核意见</label>\n" +
-            "                        <textarea class=\"form-control\" id=\"msg\" rows='6'></textarea>\n" +
-            "                    </div>\n" +
-            "                </form>",
+                "                    <div class=\"form-group\">\n" +
+                "                        <label for=\"checkState\" class=\"control-label\">审核状态</label>\n" +
+                "                        <select class=\"form-control\" id=\"checkStateNow\" onchange=\"TalentBasicChangeInfoDlg.toggleField()\">\n" +
+                "                            <option value=\"\"></option>\n" +
+                "                            <option value=\"3\">审核通过</option>\n" +
+                "                            <option value=\"2\">审核驳回</option>\n" +
+                "                        </select>\n" +
+                "                    </div>\n" +
+                "                    <div class=\"form-group\">\n" +
+                "                        <label for=\"msg\" class=\"control-label\">审核意见</label>\n" +
+                "                        <textarea class=\"form-control\" id=\"msg\" rows='6'></textarea>\n" +
+                "                    </div>\n" +
+                "                </form>",
         btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
         btnAlign: 'c',
         zIndex: layer.zIndex,
-        success:function(){
+        success: function () {
             $("#checkForm")[0].reset();
         },
         yes: function (index, layero) {
             var id = $("#id").val();
             var checkState = $("#checkStateNow").val();
             var msg = $("#msg").val();
-            if(checkState==null || checkState==''){
+            if (checkState == null || checkState == '') {
                 Feng.error("请选择审核状态");
-                return ;
+                return;
             }
-            if(msg==null || msg==''){
+            if (msg == null || msg == '') {
                 Feng.error("请填写审核意见");
-                return ;
+                return;
             }
-            var operation = function(){
-                var ajax = new $ax(Feng.ctxPath + "/talentBasicChange/submitCheck", function(data){
-                    if(data.code=="200"){
+            var operation = function () {
+                var ajax = new $ax(Feng.ctxPath + "/admin/talentBasicChange/submitToCheck", function (data) {
+                    if (data.code == "200") {
                         Feng.success(data.msg);
                         window.parent.TalentBasicChange.table.refresh();
                         layer.close(index);
                         TalentBasicChangeInfoDlg.close();
-                    }else{
+                    } else {
                         Feng.error(data.msg);
                     }
-                },function(data){
+                }, function (data) {
                     Feng.error("提交失败!" + data.responseJSON.message + "!");
                 });
-                ajax.setData({"id":id,"checkState":checkState,"checkMsg":msg});
+                ajax.setData({"id": id, "checkState": checkState, "checkMsg": msg});
                 ajax.start();
             }
             Feng.confirm("一旦提交,无法修改,确认提交审核吗?", operation);
@@ -82,11 +82,11 @@ TalentBasicChangeInfoDlg.showCheckModal = function () {
     });
 }
 
-TalentBasicChangeInfoDlg.toggleField = function(){
+TalentBasicChangeInfoDlg.toggleField = function () {
     var checkState = $("#checkStateNow").val();
-    if(checkState==3){
+    if (checkState == 3) {
         $("#msg").val("审核通过。");
-    }else if(checkState==2){
+    } else if (checkState == 2) {
         $("#msg").val("");
     }
 }
@@ -95,20 +95,20 @@ $(function () {
     var id = $("#id").val();
     //批量加载字典表数据
     var arr = [
-        {"name": "oldNationality", "code": "un_nationality"},
-        {"name": "oldNation", "code": "un_nation"},
-        {"name": "oldPolitics", "code": "un_political"},
-        {"name": "oldCardType", "code": "un_cardType"},
-        {"name": "newNationality", "code": "un_nationality"},
-        {"name": "newNation", "code": "un_nation"},
-        {"name": "newPolitics", "code": "un_political"},
-        {"name": "newCardType", "code": "un_cardType"}
+        {"name": "oldNationality", "code": "nationality"},
+        {"name": "oldNation", "code": "nation"},
+        {"name": "oldPolitics", "code": "politics"},
+        {"name": "oldCardType", "code": "card_type"},
+        {"name": "newNationality", "code": "nationality"},
+        {"name": "newNation", "code": "nation"},
+        {"name": "newPolitics", "code": "politics"},
+        {"name": "newCardType", "code": "card_type"}
     ];
     Feng.findChildDictBatch(JSON.stringify(arr));
-        //select初始化
+    //select初始化
     $("select").each(function () {
         $(this).val($(this).attr("value")).trigger("change");
     });
     Feng.getCheckLog("logTable", {"type": CONFIG.project_basicchange, "mainId": id, "typeFileId": "", "active": 1})
-    $("input,select").attr("style","pointer-events: none;background-color: #eee;");
+    $("input,select").attr("style", "pointer-events: none;background-color: #eee;");
 });

+ 61 - 64
public/static/modular/talentLibrary/talentWorkunitChange/talentWorkunitChange.js

@@ -2,8 +2,8 @@
  * 工作单位变更管理初始化
  */
 var TalentWorkunitChange = {
-    id: "TalentWorkunitChangeTable",	//表格id
-    seItem: null,		//选中的条目
+    id: "TalentWorkunitChangeTable", //表格id
+    seItem: null, //选中的条目
     table: null,
     layerIndex: -1
 };
@@ -14,49 +14,51 @@ var TalentWorkunitChange = {
 TalentWorkunitChange.initColumn = function () {
     var type = $("#type").val();
     var isShow = true;
-    if(type==2){
+    if (type == 2) {
         isShow = false;
     }
     return [
         {field: 'selectItem', radio: true},
-        {title: '年度', field: 'year', visible: true, align: 'center', valign: 'middle',width:"80px",'class': 'uitd_showTip'},
-        {title: '姓名', field: 'talentName', visible: true, align: 'center', valign: 'middle',width:"80px",'class': 'uitd_showTip'},
-        {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '原工作单位', field: 'oldEnterpriseName', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '原人才标签', field: 'oldTalentTypeName', visible: isShow, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '离职时间', field: 'quitTime', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '离职申报原因', field: 'quitReason', visible: isShow, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '新单位', field: 'newEnterpriseName', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '新人才标签', field: 'newTalentTypeName', visible: isShow, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '合同开始时间', field: 'starttime', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '合同结束时间', field: 'endtime', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '手机号码', field: 'phone', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '入职/变更时间', field: 'anyTime', visible: true, align: 'center', valign: 'middle',width:"100px",'class': 'uitd_showTip'},
-        {title: '单位变更申报原因', field: 'anyReason', visible: isShow, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
-        {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip',
-            formatter : function (value,row,index) {
-                if(value==-2){
+        {title: '年度', field: 'year', visible: true, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
+        {title: '姓名', field: 'talentName', visible: true, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
+        {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
+        {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
+        {title: '原工作单位', field: 'oldEnterpriseName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '离职时间', field: 'quitTime', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
+        {title: '离职申报原因', field: 'quitReason', visible: isShow, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '新单位', field: 'newEnterpriseName', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
+        {title: '合同开始时间', field: 'starttime', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
+        {title: '合同结束时间', field: 'endtime', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
+        {title: '手机号码', field: 'phone', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
+        {title: '入职/变更时间', field: 'anyTime', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip'},
+        {title: '单位变更申报原因', field: 'anyReason', visible: isShow, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip',
+            formatter: function (value, row, index) {
+                if (value == -2) {
                     return '<span class=\'label label-danger\'>审核不通过</span>';
                 }
-                if(value==-1){
+                if (value == -1) {
                     return '<span class=\'label\'>待提交</span>';
-                }if(value==1){
+                }
+                if (value == 1) {
                     return '<span class=\'label label-success\'>待审核</span>';
-                }if(value==2){
+                }
+                if (value == 2) {
                     return '<span class=\'label label-danger\'>审核驳回</span>';
-                }if(value==3){
+                }
+                if (value == 3) {
                     return '<span class=\'label label-primary\'>已通过</span>';
-                }if(value==9){
+                }
+                if (value == 9) {
                     return '<span class=\'label label-success\'>重新提交</span>';
                 }
             }
         },
-        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',width:"80px",
-            formatter: function (value,row,index) {
-                return "<span class='label label-success' onclick=\"TalentWorkunitChange.showLog('"+value+"')\" >" +
-                    "<i class=\"fa fa-book\"></i>日志" +
-                    "</span>";
+        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
+            formatter: function (value, row, index) {
+                return "<span class='label label-success' onclick=\"TalentWorkunitChange.showLog('" + value + "')\" >" +
+                        "<i class=\"fa fa-book\"></i>日志" +
+                        "</span>";
             }
         },
     ];
@@ -67,10 +69,10 @@ TalentWorkunitChange.initColumn = function () {
  */
 TalentWorkunitChange.check = function () {
     var selected = $('#' + this.id).bootstrapTable('getSelections');
-    if(selected.length == 0){
+    if (selected.length == 0) {
         Feng.info("请先选中表格中的某一记录!");
         return false;
-    }else{
+    } else {
         TalentWorkunitChange.seItem = selected[0];
         return true;
     }
@@ -81,8 +83,9 @@ TalentWorkunitChange.check = function () {
  */
 TalentWorkunitChange.openTalentWorkunitChangeCheck = function () {
     if (this.check()) {
-        if(TalentWorkunitChange.seItem.checkState!=1 && TalentWorkunitChange.seItem.checkState!=9){
-            Feng.error("不在审核范围内 ");return;
+        if (TalentWorkunitChange.seItem.checkState != 1 && TalentWorkunitChange.seItem.checkState != 9) {
+            Feng.error("不在审核范围内 ");
+            return;
         }
         var index = layer.open({
             type: 2,
@@ -90,13 +93,13 @@ TalentWorkunitChange.openTalentWorkunitChangeCheck = function () {
             area: ['800px', '420px'], //宽高
             fix: false, //不固定
             maxmin: true,
-            content: Feng.ctxPath + '/talentWorkunitChange/talentWorkunitChange_detail/' + TalentWorkunitChange.seItem.id,
+            content: Feng.ctxPath + '/admin/talentWorkUnitChange/check/id/' + TalentWorkunitChange.seItem.id,
             btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
             btnAlign: 'c',
             yes: function (index, layero) {
                 var obj = layero.find("iframe")[0].contentWindow;
                 obj.TalentWorkunitChangeInfoDlg.submitCheck();
-            }, end:function () {
+            }, end: function () {
                 TalentWorkunitChange.table.refresh();
             }
         });
@@ -116,7 +119,7 @@ TalentWorkunitChange.openTalentWorkunitChangeDetail = function () {
             area: ['800px', '420px'], //宽高
             fix: false, //不固定
             maxmin: true,
-            content: Feng.ctxPath + '/talentWorkunitChange/talentWorkunitChange_detail/' + TalentWorkunitChange.seItem.id,
+            content: Feng.ctxPath + '/admin/talentWorkUnitChange/check/id/' + TalentWorkunitChange.seItem.id,
         });
         TalentWorkunitChange.layerIndex = index;
         layer.full(index);
@@ -128,14 +131,14 @@ TalentWorkunitChange.openTalentWorkunitChangeDetail = function () {
  * 查询表单提交参数对象
  * @returns {{}}
  */
-TalentWorkunitChange.formParams = function() {
+TalentWorkunitChange.formParams = function () {
     var queryData = {};
     queryData['talentName'] = $("#talentName").val();
     queryData['idCard'] = $("#idCard").val();
     queryData['oldEnterpriseName'] = $("#oldEnterpriseName").val();
-    queryData['oldTalentType'] = $("#oldTalentType").val();
+    //queryData['oldTalentType'] = $("#oldTalentType").val();
     queryData['newEnterpriseName'] = $("#newEnterpriseName").val();
-    queryData['newTalentType'] = $("#newTalentType").val();
+    //queryData['newTalentType'] = $("#newTalentType").val();
     queryData['checkState'] = $("#checkState").val();
     return queryData;
 }
@@ -143,13 +146,13 @@ TalentWorkunitChange.formParams = function() {
 /**
  * 重置
  */
-TalentWorkunitChange.reset = function (){
+TalentWorkunitChange.reset = function () {
     $("#talentName").val("");
     $("#idCard").val("");
     $("#oldEnterpriseName").val("");
-    $("#oldTalentType").val("");
+    //$("#oldTalentType").val("");
     $("#newEnterpriseName").val("");
-    $("#newTalentType").val("");
+    //$("#newTalentType").val("");
     $("#checkState").val("");
 }
 
@@ -164,16 +167,14 @@ TalentWorkunitChange.search = function () {
 /**
  * 导出
  */
-TalentWorkunitChange.export = function (){
+TalentWorkunitChange.export = function () {
     var queryData = TalentWorkunitChange.formParams();
     var url = Feng.ctxPath + "/talentWorkunitChange/export?" +
-        "&talentName=" + queryData.talentName +
-        "&idCard=" + queryData.idCard +
-        "&oldEnterpriseName=" + queryData.oldEnterpriseName +
-        "&oldTalentType=" + queryData.oldTalentType +
-        "&newEnterpriseName=" + queryData.newEnterpriseName +
-        "&newTalentType=" + queryData.newTalentType +
-        "&checkState=" + queryData.checkState ;
+            "&talentName=" + queryData.talentName +
+            "&idCard=" + queryData.idCard +
+            "&oldEnterpriseName=" + queryData.oldEnterpriseName +
+            "&newEnterpriseName=" + queryData.newEnterpriseName +
+            "&checkState=" + queryData.checkState;
     window.location.href = encodeURI(encodeURI(url));
 }
 
@@ -183,23 +184,23 @@ TalentWorkunitChange.export = function (){
  */
 TalentWorkunitChange.download = function () {
     if (this.check()) {
-        window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/api/commonDownload/downloadZip?type=4&id="+TalentWorkunitChange.seItem.id));
+        window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=4&id=" + TalentWorkunitChange.seItem.id));
     }
 }
 
 /**
  * 显示审核日志
  */
-TalentWorkunitChange.showLog = function (id){
+TalentWorkunitChange.showLog = function (id) {
     layer.open({
         type: 1,
-        title:"日志",
-        fixed:false,
-        content: '<table id="'+id+'"></table>',
+        title: "日志",
+        fixed: false,
+        content: '<table id="' + id + '"></table>',
         area: ['80%', '80%'],
         maxmin: true,
-        success :function (layero, index) {
-            Feng.getCheckLog(id,{"type":CONFIG.project_workchange,"mainId":id,"typeFileId":"","active":1});
+        success: function (layero, index) {
+            Feng.getCheckLog(id, {"type": CONFIG.project_workchange, "mainId": id, "typeFileId": "", "active": 1});
         }
     });
 
@@ -207,11 +208,7 @@ TalentWorkunitChange.showLog = function (id){
 
 $(function () {
     var defaultColunms = TalentWorkunitChange.initColumn();
-    var table = new BSTable(TalentWorkunitChange.id, "/talentWorkunitChange/list", defaultColunms);
+    var table = new BSTable(TalentWorkunitChange.id, "/admin/talentWorkUnitChange/list", defaultColunms);
     table.setPaginationType("server");
     TalentWorkunitChange.table = table.init();
-    var arr = [
-        {"name":"oldTalentType","code":"un_jbt_talentType"},
-        {"name":"newTalentType","code":"un_jbt_talentType"}];
-    Feng.findChildDictBatch(JSON.stringify(arr));
 });

+ 94 - 93
public/static/modular/talentLibrary/talentWorkunitChange/talentWorkunitChange_info.js

@@ -2,13 +2,13 @@
  * 初始化工作单位变更详情对话框
  */
 var TalentWorkunitChangeInfoDlg = {
-    talentWorkunitChangeInfoData : {}
+    talentWorkunitChangeInfoData: {}
 };
 
 /**
  * 关闭此对话框
  */
-TalentWorkunitChangeInfoDlg.close = function() {
+TalentWorkunitChangeInfoDlg.close = function () {
     parent.layer.close(window.parent.TalentWorkunitChange.layerIndex);
 }
 
@@ -16,56 +16,57 @@ TalentWorkunitChangeInfoDlg.close = function() {
 /**
  * 初始化附加
  */
-TalentWorkunitChangeInfoDlg.initFileTable = function(){
+TalentWorkunitChangeInfoDlg.initFileTable = function () {
     var queryData = {};
     queryData['type'] = $("#type").val();
     queryData['project'] = CONFIG.project_workchange;
     $("#fileTable").bootstrapTable({
-        url: Feng.ctxPath + "/api/talentInfo/findUnCommonFileType",
+        url: Feng.ctxPath + "/common/api/findCommonFileType",
         method: 'POST',
         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
-        search: false,					// 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
-        showRefresh: false,				// 是否显示刷新按钮
-        clickToSelect: true,			// 是否启用点击选中行
-        singleSelect: true,				// 设置True 将禁止多选
-        striped: true,  				// 是否显示行间隔色
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
         escape: true,
-        pagination: false,   			// 设置为 true 会在表格底部显示分页条
+        pagination: false, // 设置为 true 会在表格底部显示分页条
         paginationHAlign: "left",
         paginationDetailHAlign: "right",
-        sidePagination: "server",   	// 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
         showColumns: false,
-        detailView: true,               //是否显示父子表
+        detailView: true, //是否显示父子表
         pageList: [10, 30, 50],
         queryParams: function (params) {
-            return $.extend(queryData,params)
+            return $.extend(queryData, params)
         },
         rowStyle: function (row, index) {
-            return {classes:"info"};
+            return {classes: "info"};
         },
         columns:
-            [
-                {field: 'selectItem', checkbox:false,visible:false},
-                {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:"30%",'class': 'uitd_showTip',width:"92%",
-                    formatter : function(value,row,index){
-                        if(row.must==1){
-                            return '<i class="fa fa-paste"></i><span style="font-weight:bold;color:red;font-size:14px;font-family:宋体"> * </span> '+ value;
-                        }if(row.must==2){
-                            return '<i class="fa fa-paste"></i>'+value;
+                [
+                    {field: 'selectItem', checkbox: false, visible: false},
+                    {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle', width: "30%", 'class': 'uitd_showTip', width: "92%",
+                        formatter: function (value, row, index) {
+                            if (row.must == 1) {
+                                return '<i class="fa fa-paste"></i><span style="font-weight:bold;color:red;font-size:14px;font-family:宋体"> * </span> ' + value;
+                            }
+                            if (row.must == 2) {
+                                return '<i class="fa fa-paste"></i>' + value;
+                            }
                         }
-                    }
-                },
-                {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle',width:"8%",
-                    formatter : function(value,row,index){
-                        if(value==null||value==''||value=='null'){
-                            return '无';
+                    },
+                    {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle', width: "8%",
+                        formatter: function (value, row, index) {
+                            if (value == null || value == '' || value == 'null') {
+                                return '无';
+                            }
+                            return "<button type='button' onclick=\"TalentWorkunitChangeInfoDlg.downloadFile('" + row.id + "',3)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
+                                    "<i class=\"fa fa-download\"></i>下载" +
+                                    "</button>";
                         }
-                        return "<button type='button' onclick=\"TalentWorkunitChangeInfoDlg.downloadFile('"+row.id+"',3)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
-                            "<i class=\"fa fa-download\"></i>下载" +
-                            "</button>";
                     }
-                }
-            ]
+                ]
         ,
         onPostBody: function () {
             $("td.uitd_showTip").bind("mouseover", function () {
@@ -77,25 +78,25 @@ TalentWorkunitChangeInfoDlg.initFileTable = function(){
             $("#fileTable").bootstrapTable('expandAllRows');
         },
         onExpandRow: function (index, row, $detail) {
-            var ajax = new $ax(Feng.ctxPath + "/api/talentCommonFile/listTalentCommonFile", function (data) {
-                if(data==null||data.length==0){
+            var ajax = new $ax(Feng.ctxPath + "/common/api/listTalentCommonFile", function (data) {
+                if (data == null || data.length == 0) {
                     return;
                 }
                 var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
-                for(var key in data){
+                for (var key in data) {
                     var sn = data[key].url.lastIndexOf(".");
-                    var suffix = data[key].url.substring(sn+1,data[key].url.length);
+                    var suffix = data[key].url.substring(sn + 1, data[key].url.length);
                     var imgStr = "";
-                    if(suffix=="pdf"||suffix=="PDF"){
-                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('"+data[key].url+"','"+data[key].id+"','"+data[key].orignName+"')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
-                    }else{
-                        imgStr = '<img class=\"imgUrl\"  src=\"'+data[key].url+'\" style=\"width:25px;height:25px;\">';
+                    if (suffix == "pdf" || suffix == "PDF") {
+                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
+                    } else {
+                        imgStr = '<img class=\"imgUrl\"  src=\"' + data[key].url + '\" style=\"width:25px;height:25px;\">';
                     }
 
-                    html = html + '<li style="display: none">'+data[key].id+'</li>\n'+
-                        '<li style="width: 80%;padding-top: 5px;">'+data[key].orignName+'</li>\n'+
-                        '<li style="width: 10%;">'+imgStr+'</li>\n'+
-                        "<li style='width: 10%;padding-top: 2px;'><button type='button' onclick=\"TalentWorkunitChangeInfoDlg.downloadFile('"+data[key].id+"',2)\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button></li>";
+                    html = html + '<li style="display: none">' + data[key].id + '</li>\n' +
+                            '<li style="width: 80%;padding-top: 5px;">' + data[key].orignName + '</li>\n' +
+                            '<li style="width: 10%;">' + imgStr + '</li>\n' +
+                            "<li style='width: 10%;padding-top: 2px;'><button type='button' onclick=\"TalentWorkunitChangeInfoDlg.downloadFile('" + data[key].id + "',2)\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button></li>";
                 }
                 html = html + '</ul>';
                 $detail.html(html);
@@ -114,15 +115,15 @@ TalentWorkunitChangeInfoDlg.initFileTable = function(){
 
 
 //下载
-TalentWorkunitChangeInfoDlg.downloadFile = function (id,type){
-    window.location.href = Feng.ctxPath + "/api/common/downloadFile?id=" + id+ "&type="+type;
+TalentWorkunitChangeInfoDlg.downloadFile = function (id, type) {
+    window.location.href = Feng.ctxPath + "/common/api/downloadFile?id=" + id + "&type=" + type;
 }
 
 
 /**
  * 显示审核模态框
  */
-TalentWorkunitChangeInfoDlg.showCheckModal = function(){
+TalentWorkunitChangeInfoDlg.showCheckModal = function () {
     $("#checkForm")[0].reset();
     $("#checkModal").modal("show");
 
@@ -131,7 +132,7 @@ TalentWorkunitChangeInfoDlg.showCheckModal = function(){
 /**
  * 审核
  */
-TalentWorkunitChangeInfoDlg.submitCheck = function(){
+TalentWorkunitChangeInfoDlg.submitCheck = function () {
     layer.open({
         type: 1,
         id: "checkModel",
@@ -141,51 +142,51 @@ TalentWorkunitChangeInfoDlg.submitCheck = function(){
         shade: 0,
         maxmin: true,
         content: "<form id=\"checkForm\" style='margin: 5px'>\n" +
-            "                    <div class=\"form-group\">\n" +
-            "                        <label for=\"checkState\" class=\"control-label\">审核状态</label>\n" +
-            "                        <select class=\"form-control\" id=\"checkStateNow\" onchange=\"TalentWorkunitChangeInfoDlg.toggleField()\">\n" +
-            "                            <option value=\"\"></option>\n" +
-            "                            <option value=\"-2\">审核不通过</option>\n" +
-            "                            <option value=\"3\">审核通过</option>\n" +
-            "                            <option value=\"2\">审核驳回</option>\n" +
-            "                        </select>\n" +
-            "                    </div>\n" +
-            "                    <div class=\"form-group\">\n" +
-            "                        <label for=\"msg\" class=\"control-label\">审核意见</label>\n" +
-            "                        <textarea class=\"form-control\" id=\"msg\" rows='6'></textarea>\n" +
-            "                    </div>\n" +
-            "                </form>",
+                "                    <div class=\"form-group\">\n" +
+                "                        <label for=\"checkState\" class=\"control-label\">审核状态</label>\n" +
+                "                        <select class=\"form-control\" id=\"checkStateNow\" onchange=\"TalentWorkunitChangeInfoDlg.toggleField()\">\n" +
+                "                            <option value=\"\"></option>\n" +
+                "                            <option value=\"-2\">审核不通过</option>\n" +
+                "                            <option value=\"3\">审核通过</option>\n" +
+                "                            <option value=\"2\">审核驳回</option>\n" +
+                "                        </select>\n" +
+                "                    </div>\n" +
+                "                    <div class=\"form-group\">\n" +
+                "                        <label for=\"msg\" class=\"control-label\">审核意见</label>\n" +
+                "                        <textarea class=\"form-control\" id=\"msg\" rows='6'></textarea>\n" +
+                "                    </div>\n" +
+                "                </form>",
         btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
         btnAlign: 'c',
         zIndex: layer.zIndex,
-        success:function(){
+        success: function () {
             $("#checkForm")[0].reset();
         },
         yes: function (index, layero) {
             var id = $("#id").val();
             var checkState = $("#checkStateNow").val();
             var msg = $("#msg").val();
-            if(checkState==null || checkState==''){
+            if (checkState == null || checkState == '') {
                 Feng.error("请选择审核状态");
-                return ;
+                return;
             }
-            if(msg==null || msg==''){
+            if (msg == null || msg == '') {
                 Feng.error("请填写审核意见");
-                return ;
+                return;
             }
-            var operation = function(){
-                var ajax = new $ax(Feng.ctxPath + "/talentWorkunitChange/submitCheck", function(data){
-                    if(data.code=="200"){
+            var operation = function () {
+                var ajax = new $ax(Feng.ctxPath + "/admin/talentWorkUnitChange/submitToCheck", function (data) {
+                    if (data.code == "200") {
                         Feng.success(data.msg);
                         window.parent.TalentWorkunitChange.table.refresh();
                         TalentWorkunitChangeInfoDlg.close();
-                    }else{
+                    } else {
                         Feng.error(data.msg);
                     }
-                },function(data){
+                }, function (data) {
                     Feng.error("提交失败!" + data.responseJSON.message + "!");
                 });
-                ajax.setData({"id":id,"checkState":checkState,"checkMsg":msg});
+                ajax.setData({"id": id, "checkState": checkState, "checkMsg": msg});
                 ajax.start();
             }
             Feng.confirm("一旦提交,无法修改,确认提交审核吗?", operation);
@@ -193,23 +194,23 @@ TalentWorkunitChangeInfoDlg.submitCheck = function(){
     });
 }
 
-TalentWorkunitChangeInfoDlg.typeChange = function(id){
-    var talentType = $("#"+id+"TalentType").val();
-    if(talentType=='gbwszb' || talentType=='zzbsh'){
-        $("#"+id+"LetterTime").parent().parent().attr("style","display:block");
-    }else if(talentType=='gyqyl' || talentType=="gyqyh"){
-        $("#"+id+"LetterTime").parent().parent().attr("style","display:none");
-    }else{
-        $("#"+id+"LetterTime").parent().parent().attr("style","display:none");
+TalentWorkunitChangeInfoDlg.typeChange = function (id) {
+    var talentType = $("#" + id + "TalentType").val();
+    if (talentType == 'gbwszb' || talentType == 'zzbsh') {
+        $("#" + id + "LetterTime").parent().parent().attr("style", "display:block");
+    } else if (talentType == 'gyqyl' || talentType == "gyqyh") {
+        $("#" + id + "LetterTime").parent().parent().attr("style", "display:none");
+    } else {
+        $("#" + id + "LetterTime").parent().parent().attr("style", "display:none");
     }
 }
 
 
-TalentWorkunitChangeInfoDlg.toggleField = function(){
+TalentWorkunitChangeInfoDlg.toggleField = function () {
     var checkState = $("#checkStateNow").val();
-    if(checkState==3){
+    if (checkState == 3) {
         $("#msg").val("工作单位变更审核通过。");
-    }else if(checkState==2){
+    } else if (checkState == 2) {
         $("#msg").val("");
     }
 }
@@ -217,18 +218,18 @@ TalentWorkunitChangeInfoDlg.toggleField = function(){
 /**
  * 打包下载
  */
-TalentWorkunitChangeInfoDlg.download = function(){
-    window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/api/commonDownload/downloadZip?type=4&id="+$("#id").val()));
+TalentWorkunitChangeInfoDlg.download = function () {
+    window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=4&id=" + $("#id").val()));
 }
 
-$(function() {
+$(function () {
     var type = $("#type").val();
-    if(type==1){
-        $("#oldTalentTypeName,#newTalentTypeName").parent().parent().attr("style","display:block");
-    }else{
-        $("#oldTalentTypeName,#newTalentTypeName").parent().parent().attr("style","display:none");
+    if (type == 1) {
+        $("#oldTalentTypeName,#newTalentTypeName").parent().parent().attr("style", "display:block");
+    } else {
+        $("#oldTalentTypeName,#newTalentTypeName").parent().parent().attr("style", "display:none");
     }
     TalentWorkunitChangeInfoDlg.typeChange("old");
     TalentWorkunitChangeInfoDlg.typeChange("new");
-    Feng.getCheckLog("logTable",{"type":CONFIG.project_workchange,"mainId":$("#id").val(),"typeFileId":"","active":1})
+    Feng.getCheckLog("logTable", {"type": CONFIG.project_workchange, "mainId": $("#id").val(), "typeFileId": "", "active": 1})
 });