소스 검색

生活补贴++

sugangqiang 2 년 전
부모
커밋
88afac63f3

+ 2 - 2
app/common/api/LivingAllowanceApi.php

@@ -11,8 +11,8 @@ use app\common\model\LivingAllowance as laModel;
  */
 class LivingAllowanceApi {
 
-    public static function getList() {
-        
+    public static function getList($where = []) {
+        return laModel::where($where)->select()->toArray();
     }
 
     public static function getInfoById($id) {

+ 11 - 0
app/common/state/LivingAllowanceState.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace app\common\state;
+
+class LivingAllowanceState {
+
+    public const TALENT = 1; //人才认定
+    public const LIVINGALLOWANCE = 19; //生活补贴
+    public const INTEGRAL = 20; //积分申报
+
+}

+ 70 - 0
app/enterprise/api/LivingAllowanceApi.php

@@ -0,0 +1,70 @@
+<?php
+
+namespace app\enterprise\api;
+
+use app\common\model\LivingAllowance as laModel;
+use app\common\api\DictApi;
+use app\common\state\LivingAllowanceState;
+
+/**
+ * Description of LivingAllowanceApi
+ *
+ * @author sgq
+ */
+class LivingAllowanceApi {
+
+    /**
+     * 判断是否可以编辑
+     * @param type $id
+     * @return boolean
+     */
+    public static function checkIsEditable($id) {
+        $info = self::getOne($id);
+        if (!$info || !in_array($info["checkState"], [0, LivingAllowanceState::FST_SAVE, LivingAllowanceState::BASE_REVERIFY_PASS, LivingAllowanceState::SCND_SAVE]))
+            return false;
+        return true;
+    }
+
+    static public function chkIsOwner($id, $uid) {
+        $info = self::getOne($id);
+        if ($info["enterprise_id"] != $uid)
+            return null;
+        return $info;
+    }
+
+    public static function getOne($id) {
+        return laModel::where("id", $id)->find();
+    }
+
+    public static function getList($request) {
+        $order = trim($request->param("order")) ?: "desc";
+        $offset = trim($request->param("offset")) ?: 0;
+        $limit = trim($request->param("limit")) ?: 10;
+        $name = trim($request->param("name"));
+        $idCard = trim($request->param("idCard"));
+        $type = session("user")["type"];
+        $where = [];
+        if (session("user")["usertype"] == 2) {
+            $where[] = ["enterpriseId", "=", session("user")["uid"]];
+        }
+        //$where[] = ["isImport", "=", $request->param("import") ?: 0];
+        if ($name) {
+            $where[] = ["name", "like", "%" . $name . "%"];
+        }
+        if ($idCard) {
+            $where[] = ["idCard", "like", "%" . $idCard . "%"];
+        }
+        $count = laModel::where($where)->count();
+        $list = laModel::where($where)->limit($offset, $limit)->order("createTime " . $order)->select()->toArray();
+        $masterTypes = DictApi::selectByParentCode("un_master_education"); //申报对象类型
+        $degrees = DictApi::selectByParentCode("highest_degree"); //最高学历
+        $enterprise = \app\common\model\Enterprise::find(session("user")["uid"]);
+        foreach ($list as $key => $item) {
+            $list[$key]["declareTypeName"] = $masterTypes[$item["declareType"]];
+            $list[$key]["highEducation"] = $degrees[$item["highEducation"]];
+            $list[$key]["enterpriseName"] = $enterprise["name"];
+        }
+        return ["total" => $count, "rows" => $list];
+    }
+
+}

+ 10 - 723
app/enterprise/controller/LivingAllowance.php

@@ -12,10 +12,12 @@ use think\exception\ValidateException;
 use app\enterprise\validate\LivingAllowance as LivingAllowanceValidator;
 use app\common\state\ProjectState;
 use app\common\api\BatchApi;
+use app\enterprise\api\LivingAllowanceApi as EnterpriseLaApi;
+use app\common\api\LivingAllowanceApi;
 
 /**
  * Description of LivingAllowance
- *
+ * 硕博人才生活补贴申请
  * @author sgq
  */
 class LivingAllowance extends EnterpriseController {
@@ -25,7 +27,7 @@ class LivingAllowance extends EnterpriseController {
     }
 
     public function list() {
-        $res = LivingAllowanceApi::getList($this->request, $step);
+        $res = EnterpriseLaApi::getList($this->request);
         return json($res);
     }
 
@@ -36,19 +38,10 @@ class LivingAllowance extends EnterpriseController {
         $type = $this->user["type"];
         $param = $request->param();
         $id = isset($param["id"]) ? $param["id"] : 0;
-        $info = \app\common\api\LivingAllowanceApi::getInfoById($id);
+        $info = LivingAllowanceApi::getInfoById($id);
         $ep = EnterpriseApi::getOne($this->user["uid"]);
         if (!chkEnterpriseFull($ep))
             return;
-        $tagList = DictApi::selectByParentCode('enterprise_tag');
-        $streetList = DictApi::selectByParentCode('street');
-        $industryFieldNew = DictApi::selectByParentCode('industry_field');
-        $ep->enterpristTagName = $tagList[$ep->enterpriseTag];
-        $ep->streetName = $streetList[$ep->street];
-        $ep->industryFieldNewName = $industryFieldNew[$ep->industryFieldNew];
-        if ($info) {
-            $info["real_state"] = TalentLogApi::getLastLog($id, ProjectState::LIVINGALLOWANCE)["state"];
-        }
         if ($info && in_array($info["checkState"], [TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS, TalentState::REVERIFY_PASS, TalentState::REVERIFY_FAIL])) {
             return $this->view($request);
             exit();
@@ -56,58 +49,7 @@ class LivingAllowance extends EnterpriseController {
         if ($request->isPost()) {
             $checkState = $info["checkState"] ?: 0;
             if ($checkState == TalentState::SCND_SAVE || $checkState == 0) {
-                switch ($type) {
-                    case 1:
-                        $this->mixSave($info, $request, TalentState::SCND_SAVE);
-                        exit();
-                        break;
-                    case 2:
-                        $this->icSave($info, $request, TalentState::SCND_SAVE);
-                        exit();
-                        break;
-                }
-            } else if (in_array($checkState, [TalentState::BASE_VERIFY_FAIL, TalentState::BASE_REVERIFY_FAIL, TalentState::FST_VERIFY_FAIL, TalentState::REVERIFY_FAIL])) {
-                $res = ["msg" => "审核不通过,不能再保存"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-                exit;
-            }
-            $res = ["msg" => "已提交审核,请耐心等待"];
-            echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-            exit;
-        }
-        $checkState = $info["checkState"] ?: 0;
-
-        $batch = $info["apply_year"] ?: BatchApi::getValidBatch(ProjectState::TALENT, $this->user["type"])["batch"];
-        $info["enterprise"] = $ep;
-        $info["talent_type_list"] = DictApi::findChildDictByCode("talent_type");
-        if ($info["talent_condition"]) {
-            $info["isSalary"] = \app\common\api\TalentConditionApi::getOne($info["talent_condition"])["isSalary"] ?: 0;
-        }
-        return view("", ["year" => $batch, "checkState" => $checkState, "row" => $info]);
-    }
-
-    /**
-     * 旧第二步
-     * @param \think\Request $request
-     * @return type
-     */
-    public function second(\think\Request $request) {
-        if ($this->user["type"] != 1)
-            return "此入口仅供晋江市人才申报,晋江集成电路人才请使用新统一申报入口";
-        $params = $request->param();
-        $id = $params["id"];
-        $info = \app\common\api\VerifyApi::getTalentInfoById($id);
-        $info["real_state"] = TalentLogApi::getLastLog($id, 1)["state"];
-        if ($request->isPost()) {
-            if (!$info || $info["enterprise_id"] != $this->user["uid"]) {
-                $res = ["msg" => "没有对应的人才认定申报信息"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-                exit;
-            }
-            $checkState = $info["checkState"];
-            if ($checkState == TalentState::SCND_SAVE || $checkState == TalentState::BASE_REVERIFY_PASS) {
                 $this->save($info, $request, TalentState::SCND_SAVE);
-                exit();
             } else if (in_array($checkState, [TalentState::BASE_VERIFY_FAIL, TalentState::BASE_REVERIFY_FAIL, TalentState::FST_VERIFY_FAIL, TalentState::REVERIFY_FAIL])) {
                 $res = ["msg" => "审核不通过,不能再保存"];
                 echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
@@ -117,10 +59,9 @@ class LivingAllowance extends EnterpriseController {
             echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
             exit;
         }
-        $enterprise_info = \app\common\model\Enterprise::find($this->user["uid"]);
-        $info["enterprise"] = $enterprise_info;
-        $batch = $info["apply_year"] ?: BatchApi::getValidBatch(ProjectState::TALENT, $enterprise_info["type"])["batch"];
-        return view("second", ["year" => $batch, "row" => $info]);
+        $hand = $info ? "update" : "add";
+        $batch = $info["year"] ?: BatchApi::getValidBatch(ProjectState::LIVINGALLOWANCE, $this->user["type"])["batch"];
+        return view("", ["year" => $batch, "row" => $info, "enterprise" => $ep, "hand" => $hand]);
     }
 
     public function view(\think\Request $request) {
@@ -141,293 +82,9 @@ class LivingAllowance extends EnterpriseController {
     }
 
     /**
-     * 提交表单(旧第二步)
+     * 提交表单
      */
-    public function submit() {
-        $params = $this->request->param();
-        $id = $params["id"];
-        if (!$info = TalentApi::chkIsOwner($id, $this->user["uid"])) {
-            $res = ["msg" => "没有对应的人才认定申报信息"];
-            echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
-            exit;
-        }
-        if ($info) {
-            $info["real_state"] = TalentLogApi::getLastLog($id, 1)["state"];
-        }
-        $checkState = $info["checkState"];
-        if ($checkState == TalentState::SCND_SAVE || $checkState == TalentState::BASE_REVERIFY_PASS) {
-            $field_dict = \app\common\api\DictApi::getTalentFields(2);
-
-            $no_empty = ["talent_arrange", "talent_condition", "highest_degree", "graduate_school", "major", "bank", "bank_number", "bank_branch_name",
-                "bank_account", "study_abroad", "phone", "email", "import_way", "cur_entry_time", "cur_entry_time", "position", "source"];
-
-            $where = [];
-            $where[] = ["rel", "=", "study_abroad"];
-            $where[] = ["step", "=", 2];
-            $where[] = ["project", "=", 1];
-            $where[] = ["active", "=", 1];
-            $where[] = ["delete", "=", 0];
-            $where[] = ["type", "=", $this->user["type"]];
-            $where[] = ["isConditionFile", "<>", 1];
-            $abroad_files = Db::table("new_common_filetype")->where($where)->select()->toArray(); //留学的附件
-            $abroad_file_ids = null;
-            if ($abroad_files)
-                $abroad_file_ids = array_column($abroad_files, "id");
-
-            if ($params["study_abroad"] == 1) {
-                $no_empty[] = "abroad_school";
-                $no_empty[] = "abroad_major";
-            }
-            if (in_array($params["source"], [1, 3])) {
-                $no_empty[] = "source_batch";
-                $no_empty[] = "fujian_highcert_pubtime";
-                $no_empty[] = "fujian_highcert_exptime";
-                if ($params["source"] == 3) {
-                    $no_empty[] = "source_city";
-                }
-            }
-            if (in_array($params["source"], [2, 4])) {
-                $no_empty[] = "source_batch";
-                $no_empty[] = "quanzhou_highcert_pubtime";
-                $no_empty[] = "quanzhou_highcert_exptime";
-                if ($params["source"] == 4) {
-                    $no_empty[] = "source_county";
-                }
-            }
-
-            $condition_info = Db::table("new_talent_condition")->findOrEmpty($params["talent_condition"]);
-
-            if ($condition_info["isSalary"] == 1) {
-                $no_empty[] = "annual_salary";
-            }
-            $no_empty = array_filter($no_empty);
-            $return = [];
-            foreach ($no_empty as $key) {
-                if (!$params[$key]) {
-                    $return[] = sprintf("请填写“%s”", $field_dict[$key]);
-                }
-            }
-            if (count($return) > 0) {
-                $res = ["msg" => implode("<br>", $return)];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
-                exit;
-            }
-
-            if ($condition_info["bindFileTypes"] && in_array($info["source"], [3, 4, 5])) {
-                $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
-                $whr[] = ["must", "=", 1];
-            }
-            $where = [];
-            $where[] = ["step", "=", 2];
-            $where[] = ["project", "=", 1];
-            $where[] = ["type", "=", $this->user["type"]];
-            $where[] = ["must", "=", 1];
-            $where[] = ["active", "=", 1];
-            $where[] = ["delete", "=", 0];
-            $where[] = ["isConditionFile", "<>", 1];
-            if ($whr) {
-                $filetypes = Db::table("new_common_filetype")->whereOr([$where, $whr])->select()->toArray();
-            } else {
-                $filetypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
-            }
-            $ft_ids = array_column($filetypes, "id");
-            if ($params["study_abroad"] == 1) {
-                //选中留学,如果存在留学附件变成必传
-                $ft_ids = array_unique(array_merge($ft_ids, (array) $abroad_file_ids));
-            } else {
-                //没选中,留学附件就算设成必传也不用验证
-                $ft_ids = array_diff($ft_ids, (array) $abroad_file_ids);
-            }
-            $whr = [];
-            $whr[] = ["typeId", "in", $ft_ids];
-            $whr[] = ["mainId", "=", $id];
-            $distinct_filetypes = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->select();
-            $upload_type_counts = count($distinct_filetypes);
-            if ($upload_type_counts != count($ft_ids)) {
-                $res = ["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
-                exit;
-            }
-
-            $this->save($info, $this->request, TalentState::SCND_SUBMIT);
-        } else if (in_array($checkState, [TalentState::BASE_VERIFY_FAIL, TalentState::BASE_REVERIFY_FAIL, TalentState::FST_VERIFY_FAIL, TalentState::REVERIFY_FAIL])) {
-            $res = ["msg" => "审核不通过,不能再提交审核"];
-            echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
-            exit;
-        }
-        $res = ["msg" => "已提交审核,请耐心等待"];
-        echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
-        exit;
-    }
-
     public function submitToCheck() {
-        switch ($this->user["type"]) {
-            case 1:
-                return $this->submitToCheck_JJRC();
-            case 2:
-                return $this->submitToCheck_IC();
-        }
-    }
-
-    /**
-     * 提交表单(新:混合基础信息人才申报信息)晋江人才
-     */
-    private function submitToCheck_JJRC() {
-        $params = $this->request->param();
-        $id = $params["id"];
-        $info = TalentApi::chkIsOwner($id, $this->user["uid"]);
-        if ($info) {
-            $info["real_state"] = TalentLogApi::getLastLog($id, 1)["state"];
-        }
-        $checkState = $info["checkState"];
-        if ($checkState == TalentState::SCND_SAVE || !$id) {
-            $field_dict = \app\common\api\DictApi::getTalentFields(4, $info["isImport"]);
-
-            $no_empty = ["name", "nation", "card_type", "card_number", "sex", "birthday", "politics", "nationality", "province", "city", "talent_type", "experience", "education",
-                "talent_arrange", "talent_condition", "identifyGetTime", "bank", "bank_number", "bank_branch_name",
-                "bank_account", "study_abroad", "phone", "email", "import_way", "cur_entry_time", "cur_entry_time", "position", "source"]; //"highest_degree", "graduate_school", "major",
-
-            $where = [];
-            $where[] = ["rel", "=", "study_abroad"];
-            $where[] = ["project", "=", 1];
-            $where[] = ["active", "=", 1];
-            $where[] = ["delete", "=", 0];
-            $where[] = ["type", "=", $this->user["type"]];
-            $where[] = ["isConditionFile", "<>", 1];
-            $abroad_files = Db::table("new_common_filetype")->where($where)->select()->toArray(); //留学的附件
-            $abroad_file_ids = null;
-            if ($abroad_files)
-                $abroad_file_ids = array_column($abroad_files, "id");
-
-            if (in_array($params["talent_type"], [1, 2])) {
-                $no_empty[] = "tax_insurance_month";
-                $no_empty[] = "labor_contract_rangetime";
-            }
-            if ($params["talent_type"] == 3) {
-                $no_empty[] = "pre_import_type";
-            }
-            if ($params["study_abroad"] == 1) {
-                $no_empty[] = "abroad_school";
-                $no_empty[] = "abroad_major";
-            }
-            if (in_array($params["source"], [1, 3])) {
-                //$no_empty[] = "source_batch";
-                //$no_empty[] = "fujian_highcert_pubtime";
-                //$no_empty[] = "fujian_highcert_exptime";
-                if ($params["source"] == 3) {
-                    $no_empty[] = "source_city";
-                }
-            }
-            if (in_array($params["source"], [2, 4])) {
-                //$no_empty[] = "source_batch";
-                //$no_empty[] = "quanzhou_highcert_pubtime";
-                //$no_empty[] = "quanzhou_highcert_exptime";
-                if ($params["source"] == 4) {
-                    $no_empty[] = "source_county";
-                }
-            }
-
-            $condition_info = Db::table("new_talent_condition")->findOrEmpty($params["talent_condition"]);
-
-            if ($condition_info["isSalary"] == 1) {
-                $no_empty[] = "annual_salary";
-            }
-            $no_empty = array_filter($no_empty);
-            $return = [];
-            foreach ($no_empty as $key) {
-                if (!$params[$key]) {
-                    $return[] = sprintf("请填写“%s”", $field_dict[$key]);
-                }
-            }
-            if (count($return) > 0) {
-                $res = ["msg" => implode("<br>", $return)];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
-                exit;
-            }
-            $isMatchZhiren = $info["isImport"] && $params["isMatchZhiren"] == 1 ? true : false;
-            if ($condition_info["bindFileTypes"] && in_array($info["source"], [3, 4, 5]) && !$isMatchZhiren) {
-                $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
-                $whr[] = ["must", "=", 1];
-            }
-            $where = [];
-            $where[] = ["project", "=", 1];
-            $where[] = ["type", "=", $this->user["type"]];
-            $where[] = ["must", "=", 1];
-            $where[] = ["active", "=", 1];
-            $where[] = ["delete", "=", 0];
-            $where[] = ["isConditionFile", "<>", 1];
-            if ($whr) {
-                $filetypes = Db::table("new_common_filetype")->whereOr([$where, $whr])->select()->toArray();
-            } else {
-                $filetypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
-            }
-            $age = 0;
-            if ($params["birthday"]) {
-                $birthtime = strtotime($params["birthday"]);
-                $currentYear = date("Y");
-                $currentMonth = date("n");
-                $birthdayYear = date("Y", $birthtime);
-                $birthdayMonth = date("n", $birthtime);
-                $age = ($currentYear * 12 + $currentMonth - $birthdayYear * 12 - $birthdayMonth) / 12;
-            }
-            $ft_ids = [];
-            $deletes = [];
-            foreach ($filetypes as $ft) {
-                if ($ft["option"]) {
-                    if ($ft["rel"] == "birthday") {
-                        if ($age < $ft["option"]) {
-                            $deletes[] = $ft["id"];
-                            continue;
-                        }
-                    } else {
-                        $selectVal = $params[$ft["rel"]];
-                        $conditions = array_filter(explode(",", $ft["option"]));
-                        if (!in_array($selectVal, $conditions)) {
-                            $deletes[] = $ft["id"];
-                            continue;
-                        }
-                    }
-                }
-                $ft_ids[] = $ft["id"];
-            }
-            if ($params["study_abroad"] == 1) {
-                //选中留学,如果存在留学附件变成必传
-                $ft_ids = array_unique(array_merge($ft_ids, (array) $abroad_file_ids));
-            } else {
-                //没选中,留学附件就算设成必传也不用验证
-                $ft_ids = array_diff($ft_ids, (array) $abroad_file_ids);
-            }
-            $whr = [];
-            if ($id) {
-                $whr[] = ["mainId", "=", $id];
-            } else {
-                if ($params["uploadFiles"])
-                    $whr[] = ["id", "in", $params["uploadFiles"]];
-            }
-            $whr[] = ["typeId", "in", $ft_ids];
-            $distinct_filetypes = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->select();
-            $upload_type_counts = count($distinct_filetypes);
-            if ($upload_type_counts != count($ft_ids)) {
-                $res = ["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
-                exit;
-            }
-
-            return $this->mixSave($info, $this->request, TalentState::SCND_SUBMIT);
-        } else if (in_array($checkState, [TalentState::BASE_VERIFY_FAIL, TalentState::BASE_REVERIFY_FAIL, TalentState::FST_VERIFY_FAIL, TalentState::REVERIFY_FAIL, TalentState::ZX_FAIL, TalentState::ANNOUNCED_REVERIFY_FAIL, TalentState::PUBLISH_FAIL])) {
-            $res = ["msg" => "审核不通过,不能再提交审核"];
-            echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
-            exit;
-        }
-        $res = ["msg" => "已提交审核,请耐心等待"];
-        echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
-        exit;
-    }
-
-    /**
-     * 提交表单(新:混合基础信息人才申报信息)晋江电路
-     */
-    private function submitToCheck_IC() {
         $params = $this->request->param();
         $id = $params["id"];
         if (!$info = TalentApi::chkIsOwner($id, $this->user["uid"])) {
@@ -480,377 +137,7 @@ class LivingAllowance extends EnterpriseController {
         return json(["msg" => "已提交审核,请耐心等待", "code" => 500]);
     }
 
-    /**
-     * 保存表单(旧第二步)
-     * @param type $info talent_info
-     * @param type $param request->param();
-     */
-    private function save($info, \think\Request $request, $checkState) {
-        try {
-            $batch = BatchApi::checkBatchValid(["type" => ProjectState::TALENT, "year" => $info["apply_year"], "first_submit_time" => $info["first_submit_time"]], $this->user["type"]);
-            if ($batch["code"] != 200) {
-                throw new ValidateException($batch["msg"]);
-            }
-            $param = $request->param();
-            validate(TalentInfo::class)->check($param);
-            $data["apply_year"] = $batch["batch"];
-
-            $all_valid_keys = ["applay_year", "import_way", "cur_entry_time", "position",
-                "source", "source_batch", "fujian_highcert_pubtime", "fujian_highcert_exptime", "quanzhou_highcert_pubtime", "quanzhou_highcert_exptime", "source_city", "source_county",
-                "talent_arrange", "talent_condition", "highest_degree", "graduate_school", "major", "professional", "bank", "bank_number", "bank_branch_name", "bank_account",
-                "study_abroad", "abroad_school", "abroad_major", "phone", "email", "annual_salary", "pro_qua"];
-            foreach ($all_valid_keys as $key) {
-                $data[$key] = trim($param[$key]);
-            }
-
-            if ($data["study_abroad"] == 1) {
-                $data["abroad_school"] = $param["abroad_school"];
-                $data["abroad_major"] = $param["abroad_major"];
-            } else {
-                $data["abroad_school"] = null;
-                $data["abroad_major"] = null;
-            }
-            switch ($data["source"]) {
-                case 1:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["fujian_highcert_pubtime"] = $param["fujian_highcert_pubtime"];
-                    $data["fujian_highcert_exptime"] = $param["fujian_highcert_exptime"];
-                    $data["source_city"] = null;
-                    break;
-                case 2:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["quanzhou_highcert_pubtime"] = $param["quanzhou_highcert_pubtime"];
-                    $data["quanzhou_highcert_exptime"] = $param["quanzhou_highcert_exptime"];
-                    $data["source_county"] = null;
-                    break;
-                case 3:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["fujian_highcert_pubtime"] = $param["fujian_highcert_pubtime"];
-                    $data["fujian_highcert_exptime"] = $param["fujian_highcert_exptime"];
-                    $data["source_city"] = $param["source_city"];
-                    break;
-                case 4:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["quanzhou_highcert_pubtime"] = $param["quanzhou_highcert_pubtime"];
-                    $data["quanzhou_highcert_exptime"] = $param["quanzhou_highcert_exptime"];
-                    $data["source_county"] = $param["source_county"];
-                    break;
-            }
-
-            $condition_info = Db::table("new_talent_condition")->findOrEmpty($param["talent_condition"]);
-            if ($condition_info["isSalary"] == 1) {
-                $data["annual_salary"] = $param["annual_salary"];
-            } else {
-                $data["annual_salary"] = null;
-            }
-
-            if ($info["real_state"] == TalentState::FST_VERIFY_REJECT) {
-                //真实状态8是驳回,需要判断什么字段可以提交                
-                $modify_fields = array_filter(explode(",", $info["modify_fields"]));
-                $tmp_data = $data;
-                $data = [];
-                foreach ($modify_fields as $field) {
-                    $data[$field] = $tmp_data[$field];
-                }
-            }
-            $data["checkState"] = $checkState;
-            $data["id"] = $info["id"];
-            $success_msg = "提交成功";
-            $error_msg = "提交失败";
-            if ($checkState == TalentState::SCND_SAVE) {
-                $last_log = TalentLogApi::getLastLog($data["id"], 1);
-                if ($last_log["new_state"] != TalentState::SCND_SAVE) {
-                    TalentLogApi::write(1, $data["id"], $checkState, "保存认定材料未提交", 1);
-                }
-                TalentModel::update($data);
-            } else if ($checkState == TalentState::SCND_SUBMIT) {
-                $success_msg = "提交成功";
-                $error_msg = "提交失败";
-                $data["new_submit_time"] = date("Y-m-d H:i:s");
-                TalentModel::update($data);
-                TalentLogApi::write(1, $info["id"], $checkState, "确认提交审核", 1);
-            } else {
-                throw new ValidateException($error_msg);
-            }
-            $res = ["code" => 200, "msg" => $success_msg, "obj" => ["id" => $info["id"], "checkState" => $checkState]];
-            $callback = $checkState == TalentState::SCND_SAVE ? "infoCallback" : "submitCallback";
-            echo sprintf("<script>parent.TalentInfoInfoDlg.{$callback}(%s);</script>", json_encode($res));
-            exit();
-        } catch (ValidateException $e) {
-            $res = ["msg" => $e->getMessage()];
-            $callback = $checkState == TalentState::SCND_SAVE ? "infoCallback" : "submitCallback";
-            echo sprintf("<script>parent.TalentInfoInfoDlg.{$callback}(%s);</script>", json_encode($res));
-            exit();
-        }
-    }
-
-    /**
-     * 保存表单(新:混合基础信息人才申报信息)
-     * @param type $info talent_info
-     * @param type $param request->param();
-     */
-    private function mixSave($info, \think\Request $request, $checkState) {
-        try {
-            $batch = BatchApi::checkBatchValid(["type" => ProjectState::TALENT, "year" => $info["apply_year"], "first_submit_time" => $info["first_submit_time"]], $this->user["type"]);
-            if ($batch["code"] != 200) {
-                throw new ValidateException($batch["msg"]);
-            }
-            $param = $request->param();
-            validate(TalentInfo::class)->check($param);
-            $id = $param["id"];
-            if ($id) {
-                if (!$info || $info["id"] != $id || $info["enterprise_id"] != $this->user["uid"]) {
-                    throw new ValidateException("没有对应的人才认定申报信息");
-                }
-            }
-            $files = $param["uploadFiles"];
-            $data["headimgurl"] = $info["headimgurl"];
-            if ($request->file()) {
-                $headimg = $request->file("photo");
-                $upload = new \app\common\api\UploadApi();
-                $result = $upload->uploadOne($headimg, "image", "talent/photo");
-                if ($result->code != 200) {
-                    throw new ValidateException($result->msg);
-                }
-                $file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
-                $width = imagesx($file);
-                $height = imagesy($file);
-                //免冠二寸照长宽413:579
-                if ($width * 579 != $height * 413) {
-                    @unlink("storage/" . $result->filepath); //像素不符合,删除上传文件                    
-                    throw new ValidateException("近期免冠半身彩照(二寸)不符合二寸像素标准。*<span style='color:#ff0000;'>二寸像素标准[413*579]</span>");
-                }
-                if ($info && $info["headimgurl"]) {
-                    //如果新照片符合像素要求,则删除旧照片
-                    $old_head_url = "storage/" . $info["headimgurl"];
-                    if (file_exists($old_head_url))
-                        @unlink($old_head_url);
-                }
-                $data["headimgurl"] = $result->filepath;
-            }
-            if (!$data["headimgurl"] && $checkState == TalentState::SCND_SUBMIT)
-                throw new ValidateException("请上传头像。*<span style='color:#ff0000;'>二寸像素标准[413*579]</span>");
-
-            $where = [];
-            $where[] = ["project", "=", 1];
-            $where[] = ["type", "=", $this->user["type"]];
-            $where[] = ["must", "=", 1];
-            $where[] = ["active", "=", 1];
-            $where[] = ["delete", "=", 0];
-            $filetypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
-
-            $age = 0;
-            if ($param["birthday"]) {
-                $birthday = $param["birthday"];
-                $birthdayYear = substr($birthday, 0, 4);
-                $currentYear = date("Y");
-                $age = $currentYear - $birthdayYear;
-            }
-            $ft_ids = [];
-            $deletes = [];
-            foreach ($filetypes as $ft) {
-                if ($ft["option"]) {
-                    if ($ft["rel"] == "birthday") {
-                        if ($age < $ft["option"]) {
-                            $deletes[] = $ft["id"];
-                            continue;
-                        }
-                    } else {
-                        $selectVal = $param[$ft["rel"]];
-                        $conditions = array_filter(explode(",", $ft["option"]));
-                        if (!in_array($selectVal, $conditions)) {
-                            $deletes[] = $ft["id"];
-                            continue;
-                        }
-                    }
-                }
-                $ft_ids[] = $ft["id"];
-            }
-
-            $data["apply_year"] = $batch["batch"];
-            $data["isMatchZhiren"] = $param["isMatchZhiren"] ?: 0;
-            $all_valid_keys = ["talent_type", "name", "card_type", "card_number", "sex", "birthday", "nationality", "province", "city", "county", "nation", "politics", "experience", "education",
-                "import_way", "cur_entry_time", "position",
-                "source", "source_batch", "fujian_highcert_pubtime", "fujian_highcert_exptime", "quanzhou_highcert_pubtime", "quanzhou_highcert_exptime", "source_city", "source_county",
-                "talent_arrange", "talent_condition", "identifyGetTime", "highest_degree", "graduate_school", "major", "professional", "bank", "bank_number", "bank_branch_name", "bank_account",
-                "study_abroad", "abroad_school", "abroad_major", "phone", "email", "annual_salary", "pro_qua"];
-            foreach ($all_valid_keys as $key) {
-                $data[$key] = trim($param[$key]);
-            }
-            $data["return"] = 0; //流出晋江满3年后又返回晋江的,只有talent_type=2时可以填写且非必填
-            if (in_array($data["talent_type"], [1, 2])) {
-                $data["tax_insurance_month"] = $param["tax_insurance_month"];
-                $data["labor_contract_rangetime"] = $param["labor_contract_rangetime"];
-                $data["salary_pay_way"] = $param["salary_pay_way"];
-                $data["salary_pay_month"] = $param["salary_pay_month"];
-                $data["fst_work_time"] = $param["fst_work_time"];
-                $data['pre_import_type'] = null;
-                if ($data["talent_type"] == 2) {
-                    $data["return"] = $param["return"];
-                }
-            } else {
-                $data["tax_insurance_month"] = null;
-                $data["labor_contract_rangetime"] = null;
-                $data["salary_pay_way"] = null;
-                $data["salary_pay_month"] = null;
-                $data["fst_work_time"] = null;
-                $data['pre_import_type'] = $param["pre_import_type"];
-            }
-
-            if ($data["study_abroad"] == 1) {
-                $data["abroad_school"] = $param["abroad_school"];
-                $data["abroad_major"] = $param["abroad_major"];
-            } else {
-                $data["abroad_school"] = null;
-                $data["abroad_major"] = null;
-            }
-            switch ($data["source"]) {
-                case 1:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["fujian_highcert_pubtime"] = $param["fujian_highcert_pubtime"];
-                    $data["fujian_highcert_exptime"] = $param["fujian_highcert_exptime"];
-                    $data["source_city"] = null;
-                    break;
-                case 2:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["quanzhou_highcert_pubtime"] = $param["quanzhou_highcert_pubtime"];
-                    $data["quanzhou_highcert_exptime"] = $param["quanzhou_highcert_exptime"];
-                    $data["source_county"] = null;
-                    break;
-                case 3:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["fujian_highcert_pubtime"] = $param["fujian_highcert_pubtime"];
-                    $data["fujian_highcert_exptime"] = $param["fujian_highcert_exptime"];
-                    $data["source_city"] = $param["source_city"];
-                    break;
-                case 4:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["quanzhou_highcert_pubtime"] = $param["quanzhou_highcert_pubtime"];
-                    $data["quanzhou_highcert_exptime"] = $param["quanzhou_highcert_exptime"];
-                    $data["source_county"] = $param["source_county"];
-                    break;
-            }
-
-            $condition_info = Db::table("new_talent_condition")->findOrEmpty($param["talent_condition"]);
-            if ($condition_info["isSalary"] == 1) {
-                $data["annual_salary"] = $param["annual_salary"];
-            } else {
-                $data["annual_salary"] = null;
-            }
-            if ($info["real_state"] == TalentState::FST_VERIFY_REJECT) {
-                //真实状态11是驳回,需要判断什么字段可以提交                
-                $modify_fields = array_filter(explode(",", $info["modify_fields"]));
-                $tmp_data = $data;
-                $data = [];
-                foreach ($modify_fields as $field) {
-                    $data[$field] = $tmp_data[$field];
-                }
-            }
-            $data["checkState"] = $checkState;
-            $data["id"] = $id;
-            $success_msg = "提交成功";
-            $error_msg = "提交失败";
-            if ($checkState == TalentState::SCND_SAVE) {
-                $success_msg = "保存成功";
-                if ($data["id"]) {
-                    //编辑
-                    TalentModel::update($data);
-                    $last_log = TalentLogApi::getLastLog($data["id"], 1);
-                    if ($last_log["new_state"] != TalentState::SCND_SAVE) {
-                        TalentLogApi::write(1, $data["id"], $checkState, "保存未提交", 1);
-                    } else {
-                        if (!$last_log["companyId"]) {
-                            TalentLogApi::setActive($last_log["id"], 1); //更新修改时间
-                        }
-                    }
-                } else {
-                    //新增
-                    $data["enterprise_id"] = $this->user["uid"];
-                    $id = TalentModel::insertGetId($data);
-                    TalentLogApi::write(1, $id, $checkState, "保存未提交", 1);
-                    $whr = [];
-                    $whr[] = ["fileId", "in", $files];
-                    $upd_checklog["mainId"] = $id;
-                    Db::table("new_talent_checklog")->where($whr)->save($upd_checklog);
-                }
-            } else if ($checkState == TalentState::SCND_SUBMIT) {
-                if (!$info["first_submit_time"]) {
-                    $data["first_submit_time"] = date("Y-m-d H:i:s");
-                } else {
-                    $data["new_submit_time"] = date("Y-m-d H:i:s");
-                }
-                if ($data["id"]) {
-                    TalentModel::update($data);
-                } else {
-                    //新增
-                    $data["enterprise_id"] = $this->user["uid"];
-                    $id = TalentModel::insertGetId($data);
-                    $whr = [];
-                    $whr[] = ["fileId", "in", $files];
-                    $upd_checklog["mainId"] = $id;
-                    Db::table("new_talent_checklog")->where($whr)->save($upd_checklog);
-                }
-                TalentLogApi::write(1, $id, $checkState, "确认提交审核", 1);
-            } else {
-                throw new ValidateException($error_msg);
-            }
-
-            if ($id) {
-                if ($deletes) {
-                    //删除多余的附件,一般是选择人才类型留下来的
-                    $whr = [];
-                    $whr[] = ["typeId", "in", $deletes];
-                    $whr[] = ["id", "in", $files];
-                    $_wait_del_files = Db::table("new_talent_file")->where($whr)->select()->toArray();
-                    $_logfileIds[] = [];
-                    foreach ($_wait_del_files as $_del_file) {
-                        $_logfileIds[] = $_del_file["id"];
-                        @unlink("storage/" . $_del_file["url"]);
-                    }
-                    Db::table("new_talent_file")->where($whr)->delete();
-                    if ($_logfileIds) {
-                        $whr = [];
-                        $whr[] = ["fileId", "in", $_logfileIds];
-                        $_upd_checklog["description"] = "删除附件";
-                        $_upd_checklog["updateUser"] = sprintf("%s(%s)", $this->user["account"], $this->user["companyName"] ?: $this->user["rolename"]);
-                        $_upd_checklog["updateTime"] = date("Y-m-d H:i:s");
-                        Db::table("new_talent_checklog")->where($whr)->save($_upd_checklog);
-                    }
-                }
-
-                $whr = [];
-                $whr[] = ["id", "in", $files];
-                Db::table("new_talent_file")->where($whr)->save(["mainId" => $id]);
-                $res = ["code" => 200, "msg" => $success_msg, "obj" => ["id" => $id, "checkState" => $checkState]];
-                $callback = $checkState == TalentState::SCND_SAVE ? "infoCallback" : "submitCallback";
-                echo sprintf("<script>parent.TalentInfoInfoDlg.{$callback}(%s);</script>", json_encode($res));
-                exit();
-            } else {
-                throw new ValidateException($error_msg);
-            }
-        } catch (ValidateException $e) {
-            $res = ["msg" => $e->getMessage()];
-            $callback = $checkState == TalentState::SCND_SAVE ? "infoCallback" : "submitCallback";
-            echo sprintf("<script>parent.TalentInfoInfoDlg.{$callback}(%s);</script>", json_encode($res));
-            exit();
-        } catch (\think\Exception $e) {
-            $res = ["msg" => "发生预料外错误,请联系管理员处理,错误代码:" . $e->getCode()];
-            $logInfo = [
-                "enterprise_id" => $this->user["uid"],
-                "data" => $data,
-                "controller" => $this->request->controller(),
-                "action" => $this->request->action(),
-                "errCode" => $e->getCode(),
-                "errMsg" => $e->getMessage()
-            ];
-            Log::write($logInfo, "error");
-            $callback = $checkState == TalentState::SCND_SAVE ? "infoCallback" : "submitCallback";
-            echo sprintf("<script>parent.TalentInfoInfoDlg.{$callback}(%s);</script>", json_encode($res));
-            exit();
-        }
-    }
-
-    private function icSave($info, \think\Request $request, $checkState) {
+    public function save($info, \think\Request $request, $checkState) {
         try {
             $batch = BatchApi::checkBatchValid(["type" => ProjectState::TALENT, "year" => $info["apply_year"], "first_submit_time" => $info["first_submit_time"]], $this->user["type"]);
             if ($batch["code"] != 200) {

+ 21 - 15
app/enterprise/view/living_allowance/apply.html

@@ -73,7 +73,7 @@
                     <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="initFileTable(CONFIG.project_master_living_allowance,'fileTable')"  aria-expanded="false">2.附件上传</a></li>
+                            <li id="fileLi" class=""><a data-toggle="tab" href="#tab-2" onclick="initFileTable(CONFIG.project_master_living_allowance, 'fileTable')"  aria-expanded="false">2.附件上传</a></li>
                         </ul>
                     </div>
                     <div class="tab-content">
@@ -85,13 +85,14 @@
                                         <form id="talentInfoForm" class="form-horizontal"  target="hiddenIframe">
                                             <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="enterpriseId" id="enterpriseId" value="{$enterprise.id}">
+                                                <input type="hidden" name="type" id="type" value="{$enterprise.type}">
                                                 <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}">
                                                 <input type="file" name="photo" id="photo" style="display: none">
                                                 <input type="hidden" name="provinceName" id="provinceName" value="{$row.provinceName}">
                                                 <input type="hidden" name="cityName" id="cityName" value="{$row.cityName}">
                                                 <input type="hidden" name="countyName" id="countyName" value="{$row.countyName}">
+                                                <input type="hidden" name="industry_field_type" id="industry_field_type" value="{if condition='$row[industryFieldNew]'}{$row.industryFieldNew}_field{else/}{$enterprise.industryFieldNew}_field{/if}">
                                                 <input type="hidden" name="hand" id="hand" value="{$hand}">
                                                 <input type="hidden" name="fields" id="fields" value="{$row.fields}">
                                                 <input type="hidden" name="files" id="files" value="{$row.files}">
@@ -102,7 +103,7 @@
                                                                 <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" readonly="readonly" class="form-control" id="year" name="year" value="{$row.year}"/>
+                                                                        <input type="text" readonly="readonly" class="form-control" id="year" name="year" value="{if condition='$row'}{$row.year}{else/}{$year}{/if}"/>
                                                                     </div>
                                                                     <div class="rowGroup col-sm-3">
                                                                         <label class=" control-label spacing">申报补贴年次</label>
@@ -208,7 +209,7 @@
                                                                 <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" value="{$row.enterpriseName}" class="form-control" id="enterpriseName"  name="enterpriseName" readonly="readonly"  />
+                                                                        <input type="text" value="{if condition='$row'}{$row.enterpriseName}{else/}{$enterprise.name}{/if}" class="form-control" id="enterpriseName"  name="enterpriseName" readonly="readonly"  />
                                                                     </div>
                                                                     <div class="rowGroup col-sm-3">
                                                                         <label class="control-label spacing"><span style="color: red">*</span>本单位入职时间</label>
@@ -226,19 +227,24 @@
                                                                         <label class="control-label spacing"><span style="color: red">*</span>首次社保缴纳时间</label>
                                                                         <input type="text" value="{$row.firstSocialSecurityTime}" class="form-control date" id="firstSocialSecurityTime" name="firstSocialSecurityTime"/>
                                                                     </div>
+                                                                    <div class="rowGroup col-sm-3">
+                                                                        <label class=" control-label spacing"><span style="color: red">*</span>产业领域</label>
+                                                                        <select type="text" value="{if condition='$row'}{$row.industryFieldNew}{else/}{$enterprise.industryFieldNew}{/if}" class="form-control" id="industryFieldNew" name="industryFieldNew" disabled="disabled">
+                                                                        </select>
+                                                                    </div>
                                                                     <div class="rowGroup col-sm-3">
                                                                         <label class=" control-label spacing"><span style="color: red">*</span>行业领域</label>
-                                                                        <select type="text" value="{$row.industryField}" class="form-control" id="industryField"  name="industryField" disabled="disabled">
+                                                                        <select type="text" value="{if condition='$row'}{$row.industryField}{else/}{$enterprise.industryFieldOld}{/if}" class="form-control" id="industryField" name="industryField" disabled="disabled">
                                                                         </select>
                                                                     </div>
                                                                     <div class="rowGroup col-sm-3">
                                                                         <label class=" control-label spacing"><span style="color: red">*</span>所属镇街</label>
-                                                                        <select class="form-control" value="{$row.address}" id="address" name="address" disabled="disabled"></select>
+                                                                        <select class="form-control" value="{if condition='$row'}{$row.address}{else/}{$enterprise.street}{/if}" id="address" name="address" disabled="disabled"></select>
                                                                     </div>
-<!--                                                                    <div class="rowGroup col-sm-3" style="display: none">-->
-<!--                                                                        <label class=" control-label spacing"><span style="color: red">*</span>首次来晋行政介绍信时间</label>-->
-<!--                                                                        <input type="text" value="{$row.letterTime}" class="form-control date" id="letterTime" name="letterTime"/>-->
-<!--                                                                    </div>-->
+                                                                    <!--                                                                    <div class="rowGroup col-sm-3" style="display: none">-->
+                                                                    <!--                                                                        <label class=" control-label spacing"><span style="color: red">*</span>首次来晋行政介绍信时间</label>-->
+                                                                    <!--                                                                        <input type="text" value="{$row.letterTime}" class="form-control date" id="letterTime" name="letterTime"/>-->
+                                                                    <!--                                                                    </div>-->
                                                                     <div class="rowGroup col-sm-3">
                                                                         <label class="control-label spacing"><span style="color: red">*</span>职务</label>
                                                                         <input type="text" value="{$row.post}" class="form-control" id="post" name="post"/>
@@ -293,7 +299,7 @@
                                                                 <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" value="{$row.bank}" class="form-control" onchange="Feng.bankChange('bank','bankNumber')" id="bank" name="bank" placeholder="XX银行"/>
+                                                                        <input type="text" value="{$row.bank}" class="form-control" onchange="Feng.bankChange('bank', 'bankNumber')" id="bank" name="bank" placeholder="XX银行"/>
                                                                     </div>
                                                                     <div class="rowGroup col-sm-3">
                                                                         <label class="control-label spacing"><span style="color: red">*</span>银行行号</label>
@@ -383,8 +389,8 @@
 </div>
 <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
 <script type="text/javascript">
-    document.write('<script src="/static/js/plugins/xmSelect/xm-select.js?v='+(new Date()).getTime()+'"><\/script>');
-    document.write('<script src="/static/modular/gate/master/livingAllowanceInfo/livingAllowanceInfo_info.js?v='+(new Date()).getTime()+'"><\/script>');
-    document.write('<script src="/static/modular/common/upload.js?v='+(new Date()).getTime()+'"><\/script>');
+    document.write('<script src="/static/js/plugins/xmSelect/xm-select.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/gate/master/livingAllowanceInfo/livingAllowanceInfo_info.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/common/upload.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>
 {/block}

+ 50 - 49
public/static/modular/gate/master/livingAllowanceInfo/livingAllowanceInfo.js

@@ -2,8 +2,8 @@
  * 硕博人才生活补贴申报管理初始化
  */
 var LivingAllowanceInfo = {
-    id: "LivingAllowanceInfoTable",	//表格id
-    seItem: null,		//选中的条目
+    id: "LivingAllowanceInfoTable", //表格id
+    seItem: null, //选中的条目
     table: null,
     layerIndex: -1
 };
@@ -17,13 +17,13 @@ LivingAllowanceInfo.initColumn = function () {
         {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle', width: '80px'},
         {title: '申报补贴年次', field: 'applyCount', visible: true, align: 'center', valign: 'middle', width: '100px',
             formatter: function (value, row, index) {
-                if(value == 1){
+                if (value == 1) {
                     return "首年";
                 }
-                if(value == 2){
+                if (value == 2) {
                     return "第二年";
                 }
-                if(value == 3){
+                if (value == 3) {
                     return "第三年";
                 }
             }
@@ -111,17 +111,17 @@ LivingAllowanceInfo.initColumn = function () {
             valign: 'middle',
             'class': 'uitd_showTip',
             width: "80px",
-            formatter : function (value,row,index) {
-                if(value == -1){
+            formatter: function (value, row, index) {
+                if (value == -1) {
                     return "<span style='color: red'>不予兑现</span>"
                 }
-                if(value == 0){
+                if (value == 0) {
                     return "<span style='color: grey'>未知</span>"
                 }
-                if(value == 1){
+                if (value == 1) {
                     return "<span style='color: green'>待兑现</span>"
                 }
-                if(value == 2){
+                if (value == 2) {
                     return "<span style='color: darkred'>已兑现</span>"
                 }
             }
@@ -152,52 +152,52 @@ LivingAllowanceInfo.initColumn = function () {
             valign: 'middle',
             'class': 'uitd_showTip',
             width: "100px",
-            formatter : function (value,row,index) {
-                if(value==1){
+            formatter: function (value, row, index) {
+                if (value == 1) {
                     return "<span class='label'>待提交</span>"
-                }else if(value==10 || value==5){
+                } else if (value == 10 || value == 5) {
                     return "<span class='label label-danger'>已驳回</span>"
-                }else{
-                    if(row.isPublic>=4){
-                        if(value==-1){
+                } else {
+                    if (row.isPublic >= 4) {
+                        if (value == -1) {
                             return "<span class='label label-danger'>审核不通过</span>"
-                        }else if(value==35){
+                        } else if (value == 35) {
                             return "<span class='label label-primary'>审核通过</span>"
-                        }else{
+                        } else {
                             return "<span class='label label-success'>审核中</span>"
                         }
-                    }else{
+                    } else {
                         return "<span class='label label-success'>审核中</span>"
                     }
                 }
             }
         },
-        {title: '审核意见', field: 'checkMsg', visible: false, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px",
-            formatter : function (value,row,index) {
-                if(value==1){
+        {title: '审核意见', field: 'checkMsg', visible: false, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
+            formatter: function (value, row, index) {
+                if (value == 1) {
                     return ""
-                }else if(value==10 || value==5){
+                } else if (value == 10 || value == 5) {
                     return value;
-                }else{
-                    if(row.isPublic>=5){
-                        if(value==-1){
+                } else {
+                    if (row.isPublic >= 5) {
+                        if (value == -1) {
                             return value
-                        }else if(value==35){
+                        } else if (value == 35) {
                             return value;
-                        }else{
+                        } else {
                             return ""
                         }
-                    }else{
+                    } else {
                         return ""
                     }
                 }
             }
         },
-        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',width:"80px",
-            formatter : function (value,row,index){
-                return "<span class='label label-success' onclick=\"LivingAllowanceInfo.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=\"LivingAllowanceInfo.showLog('" + value + "')\" >" +
+                        "<i class=\"fa fa-book\"></i>日志" +
+                        "</span>";
             }
         }
     ];
@@ -221,14 +221,14 @@ LivingAllowanceInfo.check = function () {
  * 点击添加硕博人才生活补贴申报
  */
 LivingAllowanceInfo.openAddLivingAllowanceInfo = function () {
-    var ajax = new $ax(Feng.ctxPath + "/api/commonBatch/valiateIsAdd", function (data) {
+    var ajax = new $ax("/common/batch/checkBatchValid", function (data) {
         if (data.code == 200) {
             var index = layer.open({
                 type: 2,
                 title: '添加人才生活补贴申报',
                 fix: false, //不固定
                 maxmin: true,
-                content: Feng.ctxPath + '/api/livingAllowanceInfo/livingAllowanceInfo_add?year=' + data.obj,
+                content: '/enterprise/living_allowance/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) {
@@ -263,7 +263,7 @@ LivingAllowanceInfo.openAddLivingAllowanceInfo = function () {
  */
 LivingAllowanceInfo.openLivingAllowanceInfoDetail = function () {
     if (this.check()) {
-        var ajax = new $ax(Feng.ctxPath + "/api/commonBatch/valiateIsEditOrSubmit", function (data) {
+        var ajax = new $ax("/common/batch/checkBatchValid", function (data) {
             if (data.code == 200) {
                 var index = layer.open({
                     type: 2,
@@ -271,7 +271,7 @@ LivingAllowanceInfo.openLivingAllowanceInfoDetail = function () {
                     area: ['800px', '420px'], //宽高
                     fix: false, //不固定
                     maxmin: true,
-                    content: Feng.ctxPath + '/api/livingAllowanceInfo/livingAllowanceInfo_update/' + LivingAllowanceInfo.seItem.id + "/update",
+                    content: Feng.ctxPath + '/enterprise/living_allowance/apply/id/' + LivingAllowanceInfo.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) {
@@ -299,6 +299,7 @@ LivingAllowanceInfo.openLivingAllowanceInfoDetail = function () {
         });
         ajax.set("type", CONFIG.project_master_living_allowance);
         ajax.set("year", LivingAllowanceInfo.seItem.year);
+        ajax.set("first_submit_time", TalentInfo.seItem.firstSubmitTime);
         ajax.start();
     }
 };
@@ -314,7 +315,7 @@ LivingAllowanceInfo.openLivingAllowanceInfoSelect = function () {
             area: ['800px', '420px'], //宽高
             fix: false, //不固定
             maxmin: true,
-            content: Feng.ctxPath + '/api/livingAllowanceInfo/livingAllowanceInfo_update/' + LivingAllowanceInfo.seItem.id + "/select",
+            content: Feng.ctxPath + '/enterprise/living_allowance/view/id/' + LivingAllowanceInfo.seItem.id,
             btn: ['<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
             btnAlign: 'c',
         });
@@ -334,13 +335,13 @@ LivingAllowanceInfo.delete = function () {
             return;
         }
         var operation = function () {
-            var ajax = new $ax(Feng.ctxPath + "/api/livingAllowanceInfo/delete", function (data) {
+            var ajax = new $ax(Feng.ctxPath + "/enterprise/living_allowance/delete", function (data) {
                 Feng.success("删除成功!");
                 LivingAllowanceInfo.table.refresh();
             }, function (data) {
                 Feng.error("删除失败!" + data.responseJSON.message + "!");
             });
-            ajax.set("livingAllowanceInfoId", LivingAllowanceInfo.seItem.id);
+            ajax.set("id", LivingAllowanceInfo.seItem.id);
             ajax.start();
         }
         Feng.confirm("删除后无法恢复,确认删除吗?", operation);
@@ -357,28 +358,28 @@ LivingAllowanceInfo.search = function () {
     LivingAllowanceInfo.table.refresh({query: queryData});
 };
 
-LivingAllowanceInfo.reset = function (){
+LivingAllowanceInfo.reset = function () {
     $("#name").val("");
     $("#idCard").val("");
 }
 
-LivingAllowanceInfo.showLog = function (id){
+LivingAllowanceInfo.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_master_living_allowance,"mainId":id,"typeFileId":"","active":1})
+        success: function (layero, index) {
+            Feng.getCheckLog(id, {"type": CONFIG.project_master_living_allowance, "mainId": id, "typeFileId": "", "active": 1})
         }
     });
 }
 
 $(function () {
     var defaultColunms = LivingAllowanceInfo.initColumn();
-    var table = new BSTable(LivingAllowanceInfo.id, "/api/livingAllowanceInfo/list", defaultColunms);
+    var table = new BSTable(LivingAllowanceInfo.id, "/enterprise/living_allowance/list", defaultColunms);
     table.setOnDblClickRow(function () {
         LivingAllowanceInfo.openLivingAllowanceInfoSelect();
     });

+ 103 - 92
public/static/modular/gate/master/livingAllowanceInfo/livingAllowanceInfo_info.js

@@ -61,13 +61,13 @@ var LivingAllowanceInfoInfoDlg = {
         firstSocialSecurityTime: {validators: {notEmpty: {message: '首次社保缴纳时间不能为空'}}},
         politics: {validators: {notEmpty: {message: '政治面貌不能为空'}}},
         post: {validators: {
-            notEmpty: {message: '职务不能为空'},
-            regexp:{
-                regexp:/^[\u4e00-\u9fa5]{0,}$/,
-                message: "职务必须为汉字"
-            }
+                notEmpty: {message: '职务不能为空'},
+                regexp: {
+                    regexp: /^[\u4e00-\u9fa5]{0,}$/,
+                    message: "职务必须为汉字"
+                }
 
-        }},
+            }},
         email: {
 
             validators: {
@@ -165,56 +165,56 @@ LivingAllowanceInfoInfoDlg.close = function () {
  */
 LivingAllowanceInfoInfoDlg.collectData = function () {
     this
-        .set('id')
-        .set('year')
-        .set('enterpriseId')
-        .set('enterpriseName')
-        .set('type')
-        .set('declareType')
-        .set('cardType')
-        .set('idCard')
-        .set('name')
-        .set('photo')
-        .set('sex')
-        .set('nation')
-        .set('nationality')
-        .set('provinceCode')
-        .set('cityCode')
-        .set('countyCode')
-        .set('birthday')
-        .set('address')
-        .set('politics')
-        .set('highEducation')
-        .set('graduateSchool')
-        .set('major')
-        .set('post')
-        .set('phone')
-        .set('email')
-        .set('bank')
-        .set('bankNetwork')
-        .set('bankAccount')
-        .set('bankNumber')
-        .set('entryTime')
-        // .set('quitTime')
-        .set('startTime')
-        .set('endTime')
-        .set('educationAndResume')
-        .set('mainHonours')
-        .set('firstInJJTime')
-        // .set('isIntroduction')
-        .set('industryField')
-        .set('title')
-        .set('professionalQualifications')
-        .set('studyAbroad')
-        // .set('studyAbroadCountry')
-        .set('studyAbroadTime')
-        .set('backJJBusinessTime')
-        .set('introductionMethod')
-        .set('firstSocialSecurityTime')
-    // .set('introductionMode')
-    // .set('letterTime')
-    // .set('applyCount')
-    ;
+            .set('id')
+            .set('year')
+            .set('enterpriseId')
+            .set('enterpriseName')
+            .set('type')
+            .set('declareType')
+            .set('cardType')
+            .set('idCard')
+            .set('name')
+            .set('photo')
+            .set('sex')
+            .set('nation')
+            .set('nationality')
+            .set('provinceCode')
+            .set('cityCode')
+            .set('countyCode')
+            .set('birthday')
+            .set('address')
+            .set('politics')
+            .set('highEducation')
+            .set('graduateSchool')
+            .set('major')
+            .set('post')
+            .set('phone')
+            .set('email')
+            .set('bank')
+            .set('bankNetwork')
+            .set('bankAccount')
+            .set('bankNumber')
+            .set('entryTime')
+            // .set('quitTime')
+            .set('startTime')
+            .set('endTime')
+            .set('educationAndResume')
+            .set('mainHonours')
+            .set('firstInJJTime')
+            // .set('isIntroduction')
+            .set('industryField')
+            .set('title')
+            .set('professionalQualifications')
+            .set('studyAbroad')
+            // .set('studyAbroadCountry')
+            .set('studyAbroadTime')
+            .set('backJJBusinessTime')
+            .set('introductionMethod')
+            .set('firstSocialSecurityTime')
+            // .set('introductionMode')
+            // .set('letterTime')
+            // .set('applyCount')
+            ;
     if ($("#provinceCode").val() != null && $("#provinceCode").val() != '') {
         this.livingAllowanceInfoInfoData["provinceName"] = $("#provinceCode").find("option:selected").text();
     }
@@ -249,13 +249,13 @@ LivingAllowanceInfoInfoDlg.validate = function () {
     return $("#talentInfoForm").data('bootstrapValidator').isValid();
 }
 
-LivingAllowanceInfoInfoDlg.upsertValidate = function (){
+LivingAllowanceInfoInfoDlg.upsertValidate = function () {
     this.clearData();
     this.collectData();
     if (!LivingAllowanceInfoInfoDlg.validate()) {
         return;
     }
-    if(Feng.isEmptyStr(LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.socialSecurity)){
+    if (Feng.isEmptyStr(LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.socialSecurity)) {
         Feng.info("社保缴交情况不能为空!");
         return;
     }
@@ -265,13 +265,14 @@ LivingAllowanceInfoInfoDlg.upsertValidate = function (){
             return;
         }
         var dateArr = new Array(LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.firstSocialSecurityTime,
-            LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.entryTime,
-            LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.startTime);
+                LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.entryTime,
+                LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.startTime);
         dateArr.sort(function (a, b) {
             return a > b ? 1 : -1
         });
         if (new Date(dateArr[0]).getTime() < new Date("2021-11-16").getTime()) {
-            Feng.info("不符合2021年11月16日起新引进的人才条件,无法申报");return ;
+            Feng.info("不符合2021年11月16日起新引进的人才条件,无法申报");
+            return;
         }
     }
     if (LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.introductionMethod == 2) {
@@ -279,11 +280,13 @@ LivingAllowanceInfoInfoDlg.upsertValidate = function (){
             Feng.info("返晋创业时间不能为空!");
             return;
         }
-        if(new Date("2021-11-16").getTime() > new Date(LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.backJJBusinessTime).getTime()){
-            Feng.info("引进方式为其他的必须满足:返晋创业时间在2021-11-16至2022-11-15之间!");return ;
+        if (new Date("2021-11-16").getTime() > new Date(LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.backJJBusinessTime).getTime()) {
+            Feng.info("引进方式为其他的必须满足:返晋创业时间在2021-11-16至2022-11-15之间!");
+            return;
         }
-        if(new Date("2022-11-15").getTime() < new Date(LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.backJJBusinessTime).getTime()){
-            Feng.info("引进方式为其他的必须满足:返晋创业时间在2021-11-16至2022-11-15之间!");return ;
+        if (new Date("2022-11-15").getTime() < new Date(LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.backJJBusinessTime).getTime()) {
+            Feng.info("引进方式为其他的必须满足:返晋创业时间在2021-11-16至2022-11-15之间!");
+            return;
         }
     }
     if (Feng.isEmptyStr(LivingAllowanceInfoInfoDlg.livingAllowanceInfoInfoData.id) && Feng.isEmptyStr($("#photo").val())) {
@@ -304,7 +307,7 @@ LivingAllowanceInfoInfoDlg.upsertValidate = function (){
  */
 LivingAllowanceInfoInfoDlg.addSubmit = function () {
     var formData = LivingAllowanceInfoInfoDlg.upsertValidate();
-    if(formData == null){
+    if (formData == null) {
         return;
     }
     if (LivingAllowanceInfoInfoDlg.locked) {
@@ -312,7 +315,7 @@ LivingAllowanceInfoInfoDlg.addSubmit = function () {
     }
     LivingAllowanceInfoInfoDlg.locked = true;
     $.ajax({
-        url: Feng.ctxPath + "/api/livingAllowanceInfo/upsert",
+        url: Feng.ctxPath + "/enterprise/living_allowance/apply",
         type: "POST",
         processData: false,
         contentType: false,
@@ -345,18 +348,19 @@ LivingAllowanceInfoInfoDlg.submitToCheck = function () {
         Feng.info("请先填写基础信息并上传附件");
         return;
     }
-    if (!validateIsEdit()) return;
+    if (!validateIsEdit())
+        return;
     var formData = LivingAllowanceInfoInfoDlg.upsertValidate();
-    if(formData == null){
+    if (formData == null) {
         return;
     }
     $.ajax({
-        url: Feng.ctxPath + "/api/livingAllowanceInfo/upsert",
+        url: Feng.ctxPath + "/enterprise/living_allowance/apply",
         type: "POST",
         processData: false,
         contentType: false,
         data: formData,
-        async:true,
+        async: true,
         success: function (data) {
             if (data.code == 200) {
                 LivingAllowanceInfoInfoDlg.submitFun();
@@ -371,9 +375,9 @@ LivingAllowanceInfoInfoDlg.submitToCheck = function () {
 
 }
 
-LivingAllowanceInfoInfoDlg.submitFun = function (){
+LivingAllowanceInfoInfoDlg.submitFun = function () {
     var operation = function () {
-        var ajax = new $ax(Feng.ctxPath + "/api/livingAllowanceInfo/submitToCheck", function (data) {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/living_allowance/submitToCheck", function (data) {
             if (data.code == 200) {
                 Feng.success(data.msg);
                 // $("#checkState").val(data.obj);
@@ -447,7 +451,7 @@ LivingAllowanceInfoInfoDlg.afterSelectProvince = function () {
         "displayCode": "code",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/commonLocation/findCityByProvinceSelect/" + province
+        "url": Feng.ctxPath + "/common/tool/findCityByProvinceSelect/code/" + province
     });
 }
 
@@ -483,7 +487,7 @@ LivingAllowanceInfoInfoDlg.afterSelectCity = function () {
         "displayCode": "code",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/commonLocation/findCountyByCitySelect/" + city
+        "url": Feng.ctxPath + "/common/tool/findCountyByCitySelect/code/" + city
     });
 }
 
@@ -526,16 +530,16 @@ function validUploadButton(type, row, fileId) {
     var checkState = $("#checkState").val();
     if ((Feng.isEmptyStr(checkState) || checkState == 1 || (checkState == 10 && files.indexOf(row.id) != -1)) && $("#hand").val() != "select") {
         return type == 1 ?
-            "<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>"
-            :
-            // "<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_master_living_allowance + "')\" class=\"btn btn-xs btn-danger\">" +
-            "<i class=\"fa fa-times\"></i>删除" +
-            "</button>";
+                "<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>"
+                :
+                // "<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_master_living_allowance + "')\" class=\"btn btn-xs btn-danger\">" +
+                "<i class=\"fa fa-times\"></i>删除" +
+                "</button>";
     } else {
         return "";
     }
@@ -564,16 +568,21 @@ function validateIsEdit() {
 $(function () {
     Feng.initValidatorTip("talentInfoForm", LivingAllowanceInfoInfoDlg.validateFields);
     var id = $("#id").val();
+    var industry_field_type = $("#industry_field_type").val();
+    if ($("#industryFieldNew").attr("value") != "") {
+        industry_field_type = "un_industryField";//兼容查看旧申报时候,没有产业信息,就显示旧的行业领域信息
+    }
     //批量加载字典表数据
     var arr = [
-        {"name": "nation", "code": "un_nation"},
-        {"name": "nationality", "code": "un_nationality"},
-        {"name": "politics", "code": "un_political"},
+        {"name": "nation", "code": "nation"},
+        {"name": "nationality", "code": "nationality"},
+        {"name": "politics", "code": "politics"},
         {"name": "declareType", "code": "un_master_education"},
-        {"name": "highEducation", "code": "un_education"},
+        {"name": "highEducation", "code": "highest_degree"},
         {"name": "introductionMode", "code": "un_introduction_mode"},
-        {"name": "industryField", "code": "un_industryField"},
-        {"name": "address", "code": "un_street"}];
+        {"name": "industryFieldNew", "code": "industry_field"},
+        {"name": "industryField", "code": industry_field_type},
+        {"name": "address", "code": "street"}];
     Feng.findChildDictBatch(JSON.stringify(arr))
     //加载省份
     Feng.addAjaxSelect({
@@ -581,7 +590,7 @@ $(function () {
         "displayCode": "code",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/commonLocation/getProvinceSelect"
+        "url": Feng.ctxPath + "/common/tool/getProvinceSelect"
     });
     LivingAllowanceInfoInfoDlg.initTaxAndSocialSecurity();
     LivingAllowanceInfoInfoDlg.setNoChangeField();
@@ -612,7 +621,9 @@ $(function () {
         })
     }
     $("#address").val($("#address").attr("value"));
+    $("#industryFieldNew").val($("#industryFieldNew").attr("value"))
     $("#industryField").val($("#industryField").attr("value"));
+    ;
     $("#provinceCode").val($("#provinceCode").attr("value"));
     LivingAllowanceInfoInfoDlg.afterSelectProvince();
     $("#cityCode").val($("#cityCode").attr("value"));