Преглед изворни кода

集成电路人才层次变更(企业端)

sandm пре 1 година
родитељ
комит
423191f7a9

+ 67 - 6
app/admin/api/DataApi.php

@@ -6,20 +6,81 @@ use OneSm\Sm4;
 
 class DataApi{
 
-    public function __construct($userid,$password)
+    public $guid;
+
+    public function __construct()
     {
+        $this->getGuid();
+    }
+
+    protected function getGuid(){
+        $options = [
+            'cache_wsdl'     => WSDL_CACHE_NONE,
+            'trace'          => 1,
+            'stream_context' => stream_context_create(
+                [
+                    'ssl' => [
+                        'verify_peer'       => false,
+                        'verify_peer_name'  => false,
+                        'allow_self_signed' => true
+                    ]
+                ]
+            )
+        ];
         $redis = \app\common\Redis::instance(\think\facade\Config::get("cache.stores.redis.select"));
         $guid= $redis->get("jjdata_guid");
         if(!$guid || empty($guid)) {
-            $client = new \SoapClient("http://110.88.153.177:802/ConvergenceServiceBoot/webservice/Authentication?wsdl");
+            $client = new \SoapClient("http://110.88.153.177:802/ConvergenceServiceBoot/webservice/Authentication?wsdl", $options);
             $param = [
-                'userid' => $userid,
-                'password' => $password
+                'userid' => 'jjswzzb_sbxt',
+                'password' => 'sbxt@2022'
             ];
             $rst = $client->loginByAccount($param);
-            $rst = json_decode($rst, true);
 
-            return $rst;
+            $ret = json_decode($rst->return, true);
+            if($ret['code'] == '01'){
+                $this->guid = $ret['data'];
+                $redis->set("jjdata_guid",$this->guid,1700);
+            }else{
+                $this->guid = '';
+            }
+        }else{
+            $this->guid = $guid;
         }
     }
+
+    public function InsuranceRecordSearch($card,$start,$end){
+        $this->getGuid();
+        $options = [
+            'cache_wsdl'     => WSDL_CACHE_NONE,
+            'trace'          => 1,
+            'stream_context' => stream_context_create(
+                [
+                    'ssl' => [
+                        'verify_peer'       => false,
+                        'verify_peer_name'  => false,
+                        'allow_self_signed' => true
+                    ]
+                ]
+            )
+        ];
+
+        $client = new \SoapClient("http://110.88.153.177:802/ConvergenceServiceBoot/webservice/InsuranceRecordSearch?wsdl", $options);
+        $param = [
+            'guid' => $this->guid,
+            'requestid' => 'null_00001',
+            'id' => $card,
+            'startTime' => $start,
+            'endTime' => $end
+        ];
+
+        $rst = $client->queryUnemploymentInsuranceByIdAndTime($param);
+        $ret = json_decode($rst->return, true);
+        if($ret['code'] == '01'){
+            dd($ret);
+        }else{
+            $this->guid = '';
+        }
+
+    }
 }

+ 0 - 36
app/admin/controller/Talent.php

@@ -38,42 +38,6 @@ class Talent extends AdminController {
         $info = VerifyApi::getTalentInfoById($id, true);
         $force = intval($this->request['force'], 0);
         $api_data = ApiData::where('uid', '=', $info['card_number'])->where('action', '=', 'rending')->where('status', '=', 1)->find(); //
-//        $api_test = [
-//            'code' => 200,
-//            'data' => [
-//                'list' => [
-//                    [
-//                        "aae022" => 150.8,
-//                        "aae020" => 301.6,
-//                        "aae003" => 201911,
-//                        "aab034" => "晋江市社会劳动保险中心",
-//                        "aae002" => 201912,
-//                        "aab004" => "福建省晋江人力资本有限公司",
-//                        "aaa115" => "正常应缴",
-//                        "aae180" => 1885,
-//                    ],
-//                    [
-//                        "aae022" => 150.8,
-//                        "aae020" => 301.6,
-//                        "aae003" => 201912,
-//                        "aab034" => "晋江市社会劳动保险中心",
-//                        "aae002" => 201912,
-//                        "aab004" => "福建省晋江人力资本有限公司",
-//                        "aaa115" => "正常应缴",
-//                        "aae180" => 1885,
-//                    ]
-//                ],
-//                'totalCount' => 70
-//            ]
-//        ];
-//        $tmp_time = explode(' - ',$info['tax_insurance_month']);
-//        $formatDate = formatDateByMonth($tmp_time[0],$tmp_time[1],$api_test['data']['list']);
-//        $str = '';
-//        foreach ($formatDate as $item){
-//            $str .= $item . "<br />";
-//        }
-//        $info['shenbao'] =  "该人员社保填写日期为{$tmp_time[0]}至{$tmp_time[1]},共" . count($formatDate) . "个月,接口返回{$api_test['data']['totalCount']}个月数据,分别为:<br />$str";
-        //dd($tmp_time,diffDate($tmp_time[0],$tmp_time[1]));
         if ($force || !$api_data || !$api_data['status']) {
             ApiData::where('uid', '=', $info['card_number'])->where('action', '=', 'rending')->where('status', '=', 1)->update(['status' => 0, 'updateTime' => time()]);
             $rsapi = new RsApi();

+ 1 - 1
app/admin/view/talent/talentInfo_common_checkIC.html

@@ -45,7 +45,7 @@
                         <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="TalentInfoInfoDlg.initICFileTable()"  aria-expanded="false">申报附件</a></li>
-                            <li  class="" style="float: right;">                                
+                            <li  class="" style="float: right;">
                                 <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfoInfoDlg.download()" >
                                     <i class="fa fa-download"></i>&nbsp;打包下载
                                 </button>

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

@@ -229,7 +229,7 @@ class MenuApi {
         $menus[] = ["type" => [1, 2, 5, 6], "code" => "lzsb", "pcode" => "rcrd", "name" => "离职申报", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
         $menus[] = ["type" => [1, 2, 5, 6], "code" => "gzdwbg", "pcode" => "rcrd", "name" => "工作单位变更", "url" => "", "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" => "", "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" => "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];

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

@@ -45,6 +45,11 @@ class TalentState {
     public const RCRD_BASEIC_RESUBMIT = 9;
     public const RCRD_BASEIC_FROZEN = 10;
     public const RCRD_BASEIC_CANCLE = 11;
+    public const BASIC_SAVE = -1;
+    public const BASIC_NEED = 1;
+    public const BASIC_REJECT = 2;
+    public const BASIC_PASS = 3;
+    public const BASIC_RESUBMIT = 9;
 
     public static function getStateName($state) {
         switch ($state) {

+ 43 - 0
app/enterprise/api/TalentApi.php

@@ -7,6 +7,7 @@ use app\common\api\DictApi;
 use app\common\api\TalentConditionApi;
 use app\common\api\TalentLogApi;
 use app\common\api\TalentState;
+use app\enterprise\model\TalentTypeChange;
 
 /**
  * Description of TalentApi
@@ -144,4 +145,46 @@ class TalentApi {
         }
     }
 
+    public static function getTypeChangeList($request) {
+        $order = trim($request->param("order")) ?: "desc";
+        $offset = trim($request->param("offset")) ?: 0;
+        $limit = trim($request->param("limit")) ?: 10;
+        $talentName = trim($request->param("talentName"));
+        $oldTalentArrange = trim($request->param("oldTalentArrange"));
+        $newTalentArrange = trim($request->param("newTalentArrange"));
+        $checkState = trim($request->param("checkState"));
+        $oldIdentifyCondition = trim($request->param("oldIdentifyCondition"));
+        $newIdentifyCondition = trim($request->param("newIdentifyCondition"));
+        $where = [];
+        $where[] = ["enterpriseId", "=", session("user")["uid"]];
+        if ($talentName) {
+            $where[] = ["talentName", "like", "%" . $talentName . "%"];
+        }
+        if ($oldTalentArrange) {
+            $where[] = ["oldTalentArrange", "=", $oldTalentArrange];
+        }
+        if ($newTalentArrange) {
+            $where[] = ["newTalentArrange", "=", $newTalentArrange];
+        }
+        if ($checkState) {
+            $where[] = ["checkState", "=", $checkState];
+        }
+        if ($oldIdentifyCondition) {
+            $where[] = ["oldIdentifyCondition", "=", $oldIdentifyCondition];
+        }
+        if ($newIdentifyCondition) {
+            $where[] = ["newIdentifyCondition", "=", $newIdentifyCondition];
+        }
+        $count = TalentTypeChange::where($where)->count();
+        $list = TalentTypeChange::where($where)->limit($offset, $limit)->order("createTime " . $order)->select()->toArray();
+        $talentArangeList = DictApi::selectByParentCode("talent_arrange"); //人才层次
+
+        foreach ($list as $k => $v){
+            $list[$k]["oldTalentArrangeName"] = array_key_exists($v["oldTalentArrange"],$talentArangeList) ? $talentArangeList[$v["oldTalentArrange"]] : "";
+            $list[$k]["newTalentArrangeName"] = array_key_exists($v["newTalentArrange"],$talentArangeList) ? $talentArangeList[$v["newTalentArrange"]] : "";
+        }
+
+        return ["total" => $count, "rows" => $list];
+    }
+
 }

+ 10 - 1
app/enterprise/controller/Talent.php

@@ -2,6 +2,7 @@
 
 namespace app\enterprise\controller;
 
+use app\common\api\EducationApi;
 use app\enterprise\common\EnterpriseController;
 use app\enterprise\api\TalentApi;
 use app\enterprise\model\Talent as TalentModel;
@@ -1039,6 +1040,12 @@ class Talent extends EnterpriseController {
         return json(["msg" => "删除成功"]);
     }
 
+    public function detail(){
+        $id = $this->request->param("id");
+        $info = $this->getInfoById($id);
+        return json($info);
+    }
+
     public function getInfoById($id) {
         $info = \app\common\api\VerifyApi::getTalentInfoById($id);
         if ($info["enterprise_id"] != $this->user["uid"]) {
@@ -1047,9 +1054,10 @@ class Talent extends EnterpriseController {
         return $info;
     }
 
-    public function findTalentInfoInLibrary($type) {
+    public function findTalentInfoInLibrary() {
         $where = [];
         $sList = [];
+        $type = $this->request->param('type');
         if ($type == ProjectState::QUIT) {
             $_where = [];
             $_where[] = ["checkState", "not in", [3]];
@@ -1076,6 +1084,7 @@ class Talent extends EnterpriseController {
         if ($sList) {
             $where[] = ["id", "not in", $sList];
         }
+
         return TalentModel::where($where)->field("id,name")->select()->toArray();
     }
 

+ 71 - 16
app/enterprise/controller/TalentTypeChange.php

@@ -2,10 +2,19 @@
 
 namespace app\enterprise\controller;
 
+use app\common\api\EnterpriseApi;
+use app\common\api\TalentLogApi;
+use app\common\api\TalentState;
+use app\common\model\TalentChecklog;
+use app\common\state\MainState;
+use app\common\state\ProjectState;
 use app\enterprise\common\EnterpriseController;
 use app\enterprise\api\TalentApi;
 use app\common\api\DictApi;
 use app\common\api\VerifyApi;
+use app\Request;
+use app\enterprise\model\TalentTypeChange as TalentTypeChangeModel;
+use think\facade\Db;
 
 /**
  * Description of TalentTypeChange
@@ -19,29 +28,75 @@ class TalentTypeChange extends EnterpriseController {
     }
 
     public function list() {
-        $type = $this->user["type"];
-        $tpl = "";
-        switch ($type) {
-            case 1:
-                $tpl = "apply"; //晋江人才
-                break;
-            case 2:
-                $tpl = "ic_apply"; //集成电路
-                break;
-        }
-        $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"]];
+        $res = TalentApi::getTypeChangeList($this->request);
+        return json($res);
+
     }
 
     public function apply() {
-        return view();
+        $enterprise = EnterpriseApi::getOne($this->user["uid"]);
+        $year = $this->request->param('year');
+        return view("apply",['enterprise' => $enterprise,'year' => $year]);
     }
 
     public function view() {
         return view();
     }
 
+    public function add(){
+        $res = $this->dataCheck($this->request);
+        if(!$res){
+            return json(["msg" => "添加失败,该证件号码已申报", "code" => 500]);
+        }
+        $data = $this->request->param();
+        $data['checkState'] = TalentState::BASIC_SAVE;
+        $data['basicState'] = TalentState::BASIC_NEED;
+        $data['isPublic'] = 1;
+        $data['createUser'] = $this->user["uid"];
+        $data['createTime'] = date("Y-m-d H:i:s");
+        $condition_info = Db::table("new_talent_condition")->findOrEmpty($data["newIdentifyCondition"]);
+        if(!$condition_info){
+            return json(["msg" => "新认定条件不存在", "code" => 500]);
+        }
+
+        TalentTypeChangeModel::create($data);
+        $companyName = session('user')["companyName"] ?: session('user')["rolename"];
+
+        TalentChecklog::create([
+            'id' => getStringId(),
+            'mainId' => $data['id'],
+            'type' => intval(ProjectState::LEVELCHANGE),
+            'typeField' => null,
+            'active' => 1,
+            'state' => null,
+            'step' => 0,
+            'stateChange' => TalentState::stateEnum(-2),
+            'description' => '添加人才层次变更',
+            'createTime' => date("Y-m-d H:i:s", time()),
+            'createUser' => session('user')['name'] . "({$companyName})"
+        ]);
+
+        return json(["msg" => "添加成功", "code" => 200]);
+
+    }
+
+    private function dataCheck($data){
+        $type = $data->param('type');
+        if($type == 1){
+
+        }
+        if(\StrUtil::isEmpOrNull($data->param('newTalentArrange'))){
+            return json(["msg" => "新人才层次不能为空", "code" => 500]);
+        }
+        if (\StrUtil::isEmpOrNull($data->param('newIdentifyCondition'))) {
+            return json(["msg" => "新人才层次不能为空", "code" => 500]);
+        }
+        $res = TalentTypeChangeModel::where('idCard',$data->param('idCard'))->where('id','<>',$data->param('id'))->whereRaw('isPublic <> 6 and (isPublic <> 5 or checkState <> -1)')->findOrEmpty();
+        if ($res) {
+            return true;
+        }else{
+            return false;
+        }
+
+    }
 }

+ 16 - 0
app/enterprise/model/TalentTypeChange.php

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

+ 22 - 27
app/enterprise/view/talent_type_change/apply.html

@@ -31,7 +31,7 @@
                                 <form id="talentTypeForm">
                                     <div class="col-sm-12 form-group-sm">
                                         <input type="hidden" id="id" name="id" value="">
-                                        <input type="hidden" id="type" name="type" value="${enterprise.type}">
+                                        <input type="hidden" id="type" name="type" value="{$enterprise.type}">
                                         <input type="hidden" id="talentType" name="talentType" value="">
                                         <input type="hidden" id="checkState" name="checkState" value=""/>
                                         <input type="hidden" id="talentName" name="talentName"/>
@@ -39,7 +39,7 @@
                                         <input type="hidden" id="oldFromCityName" name="oldFromCityName"/>
                                         <input type="hidden" id="source" name="source">
                                         <input type="hidden" id="oldYear" name="oldYear">
-                                        <input type="hidden" id="newYear" name="newYear" value="${year}">
+                                        <input type="hidden" id="newYear" name="newYear" value="{$year}">
                                         <div class="rowGroup">
                                             <label class="col-sm-2 control-label spacing">变更对象</label>
                                             <div class="col-sm-4 spacing">
@@ -58,7 +58,8 @@
                                                 <input class="form-control" id="enterpriseName" readonly="readonly" name="enterpriseName" />
                                             </div>
                                         </div>
-                                        @if(enterprise.type==1){
+
+                                        {if condition="$enterprise['type'] == 1"}
                                         <div class="rowGroup">
                                             <label class="col-sm-2 control-label spacing">原申报来源</label>
                                             <div class="col-sm-4 spacing">
@@ -92,17 +93,11 @@
                                                 <select class="form-control" disabled="disabled" id="oldQzBath" name="oldQzBath"></select>
                                             </div>
                                         </div>
-                                        @}
+                                        {/if}
                                         <div class="rowGroup">
                                             <label class="col-sm-2 control-label spacing">原人才层次</label>
                                             <div class="col-sm-4 spacing">
-                                                <select class="form-control" disabled="disabled" id="oldTalentArrange" name="oldTalentArrange" onchange="TalentTypeChangeInfoDlg.talentArrangeChange('oldTalentArrange', 'oldIdentifyCondition', 'oldSource')"></select>
-                                            </div>
-                                        </div>
-                                        <div class="rowGroup">
-                                            <label class="col-sm-2 control-label spacing">原认定条件</label>
-                                            <div class="col-sm-4 spacing">
-                                                <select class="form-control" disabled="disabled" id="oldIdentifyCondition" name="oldIdentifyCondition" ></select>
+                                                <input class="form-control" id="talentArrangeName" readonly="readonly" name="talentArrangeName" />
                                             </div>
                                         </div>
                                         <div class="rowGroup">
@@ -129,7 +124,7 @@
                                                 <input class="form-control" id="oldCertificateNO" readonly="readonly" name="oldCertificateNO" />
                                             </div>
                                         </div>
-                                        @if(enterprise.type==1){
+                                        {if condition="$enterprise['type'] == 1"}
                                         <div class="rowGroup" style="display: none">
                                             <label class="col-sm-2 control-label spacing">原泉州高层次人才证书发证日期</label>
                                             <div class="col-sm-4 spacing">
@@ -182,7 +177,7 @@
                                                 <select class="form-control" id="newQzBath" name="newQzBath"></select>
                                             </div>
                                         </div>
-                                        @}
+                                        {/if}
                                         <div class="rowGroup">
                                             <label class="col-sm-2 control-label spacing">新人才层次</label>
                                             <div class="col-sm-4 spacing">
@@ -195,19 +190,19 @@
                                                 <select class="form-control" id="newIdentifyCondition" name="newIdentifyCondition" ></select>
                                             </div>
                                         </div>
-                                        <div class="rowGroup">
-                                            <label class="col-sm-2 control-label spacing">新认定条件名称</label>
-                                            <div class="col-sm-4 spacing">
-                                                <input class="form-control" id="newIdentifyConditionName" name="newIdentifyConditionName" placeholder="例:获得国家一级职业资格(汽车维修工)"/>
-                                            </div>
-                                        </div>
-                                        <div class="rowGroup">
-                                            <label class="col-sm-2 control-label spacing">新认定条件证书取得时间</label>
-                                            <div class="col-sm-4 spacing">
-                                                <input class="form-control date" id="newIdentifyGetTime" name="newIdentifyGetTime" />
-                                            </div>
-                                        </div>
-                                        @if(enterprise.type==1){
+<!--                                        <div class="rowGroup">-->
+<!--                                            <label class="col-sm-2 control-label spacing">新认定条件名称</label>-->
+<!--                                            <div class="col-sm-4 spacing">-->
+<!--                                                <input class="form-control" id="newIdentifyConditionName" name="newIdentifyConditionName" placeholder="例:获得国家一级职业资格(汽车维修工)"/>-->
+<!--                                            </div>-->
+<!--                                        </div>-->
+<!--                                        <div class="rowGroup">-->
+<!--                                            <label class="col-sm-2 control-label spacing">新认定条件证书取得时间</label>-->
+<!--                                            <div class="col-sm-4 spacing">-->
+<!--                                                <input class="form-control date" id="newIdentifyGetTime" name="newIdentifyGetTime" />-->
+<!--                                            </div>-->
+<!--                                        </div>-->
+                                        {if condition="$enterprise['type'] == 1"}
                                         <div class="rowGroup" style="display: none">
                                             <label class="col-sm-2 control-label spacing">新泉州高层次人才证书发证日期</label>
                                             <div class="col-sm-4 spacing">
@@ -227,7 +222,7 @@
                                                 </select>
                                             </div>
                                         </div>
-                                        @}
+                                        {/if}
                                     </div>
                                     <div class="row">
                                         <label class="col-sm-2 control-label spacing" style="text-align: left"></label>

+ 35 - 25
app/enterprise/view/talent_type_change/index.html

@@ -26,44 +26,54 @@
                                 </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="oldTalentArrange" class="form-control" onchange="TalentTypeChange.getIdentifyCondition('old')">
+                                    </select>
                                 </div>
-                                <select id="oldTalentArrange" class="form-control" onchange="TalentTypeChange.getIdentifyCondition('old')">
-                                </select>
                             </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="oldIdentifyCondition" class="form-control">
+                                    </select>
                                 </div>
-                                <select id="oldIdentifyCondition" class="form-control">
-                                </select>
                             </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="newTalentArrange" class="form-control" onchange="TalentTypeChange.getIdentifyCondition('new')">
+                                    </select>
                                 </div>
-                                <select id="newTalentArrange" class="form-control" onchange="TalentTypeChange.getIdentifyCondition('new')">
-                                </select>
                             </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="newIdentifyCondition" class="form-control">
+                                    </select>
                                 </div>
-                                <select id="newIdentifyCondition" class="form-control">
-                                </select>
                             </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="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="2">审核驳回</option>
-                                    <option value="3">审核通过</option>
-                                </select>
                             </div>
                             <div class="col-sm-3">
                                 <button type="button" class="btn btn-sm btn-primary" onclick="TalentTypeChange.search()">

+ 6 - 6
public/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange.js

@@ -17,7 +17,7 @@ TalentTypeChange.initColumn = function () {
         {title: '姓名', field: 'talentName', visible: true, align: 'center', valign: 'middle', width: "80px", 'class': 'uitd_showTip'},
         {title: '原公布入选月份', field: 'oldIdentifyMonth', visible: true, align: 'center', valign: 'middle', width: "90px", },
         {title: '原人才层次', field: 'oldTalentArrangeName', visible: true, align: 'center', valign: 'middle', width: "90px", 'class': 'uitd_showTip'},
-        {title: '原认定条件', field: 'oldIdentifyCondition', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
+        {title: '原认定条件', field: 'oldIdentifyConditionName', visible: true, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'},
         {title: '原认定条件证书取得时间', field: 'oldIdentifyGetTime', visible: true, align: 'center', valign: 'middle', width: "130px", 'class': 'uitd_showTip'},
         {title: '新公布入选月份', field: 'newIdentifyMonth', visible: true, align: 'center', valign: 'middle', width: "80px"},
         {title: '新人才层次', field: 'newTalentArrangeName', visible: true, align: 'center', valign: 'middle', width: "80px"},
@@ -72,7 +72,7 @@ TalentTypeChange.check = function () {
  * 点击添加人才类别变更
  */
 TalentTypeChange.openAddTalentTypeChange = 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,
@@ -80,7 +80,7 @@ TalentTypeChange.openAddTalentTypeChange = function () {
                 area: ['800px', '420px'], //宽高
                 fix: false, //不固定
                 maxmin: true,
-                content: Feng.ctxPath + '/enterprise/talent_type_change/apply?year=' + data.obj,
+                content: Feng.ctxPath + '/enterprise/talent_type_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) {
@@ -274,7 +274,7 @@ TalentTypeChange.getIdentifyCondition = function (type) {
         "displayCode": "id",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel?talentLevel=" + level
+        "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel?level=" + level
     });
     $("#" + type + "IdentifyCondition").trigger('chosen:updated');
 }
@@ -289,8 +289,8 @@ $(function () {
     TalentTypeChange.table = table.init();
     //批量加载字典表数据
     var arr = [
-        {"name": "oldTalentArrange", "code": "un_talentLevel"},
-        {"name": "newTalentArrange", "code": "un_talentLevel"}]
+        {"name": "oldTalentArrange", "code": "talent_arrange"},
+        {"name": "newTalentArrange", "code": "talent_arrange"}]
     Feng.findChildDictBatch(JSON.stringify(arr));
     $("#oldIdentifyCondition,#newIdentifyCondition").chosen({
         search_contains: true,       //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配

+ 26 - 23
public/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange_info.js

@@ -126,7 +126,7 @@ TalentTypeChangeInfoDlg.addSubmit = function() {
     if(this.talentTypeChangeInfoData.id!=null && this.talentTypeChangeInfoData.id!='') {
         TalentTypeChangeInfoDlg.editSubmit(1);
     }else{
-        var ajax = new $ax(Feng.ctxPath + "/api/talentTypeChange/add", function (data) {
+        var ajax = new $ax("/enterprise/talentTypeChange/add", function (data) {
             if(data.code=="200"){
                 Feng.success(data.msg);
                 $("#fileLi").removeAttr("style");
@@ -155,7 +155,7 @@ TalentTypeChangeInfoDlg.editSubmit = function(type) {
     if(!this.validate()){
         return;
     }
-    var ajax = new $ax(Feng.ctxPath + "/api/talentTypeChange/update", function(data){
+    var ajax = new $ax("/api/talentTypeChange/update", function(data){
         if(data.code=="200"){
             if(type == 1){
                 Feng.success(data.msg);
@@ -181,30 +181,31 @@ TalentTypeChangeInfoDlg.talentInfoDetail = function (){
     if(Feng.isEmptyStr(talentId)){
         talentId = $("#talentId").attr("value");
     }
-    var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/detail/"+talentId, function(data){
-        $("#type").val(data.type);
+    var ajax = new $ax("/enterprise/talent/detail/id/"+talentId, function(data){
+        console.log(data)
+        //$("#type").val(data.type);
         $("#enterpriseId").val(data.enterpriseId);
         $("#talentName").val(data.name);
-        $("#talentType").val(data.talentType);
-        $("#idCard").val(data.idCard);
+        //$("#talentType").val(data.talent_type);
+        $("#idCard").val(data.card_number);
         $("#enterpriseName").val(data.enterpriseName);
         $("#oldSource").val(data.source);
         $("#oldOurCitySource").val(data.ourCitySource);
         $("#oldFromCity").val(data.fromCity);
         $("#oldFromCityName").val(data.fromCityName);
         $("#oldQzBath").val(data.qzBatch);
-        $("#oldTalentArrange").val(data.talentArrange).trigger("change");
-        $("#oldTalentType").val(data.talentType);
+        $("#talentArrangeName").val(data.talentArrangeName);
+        $("#oldTalentType").val(data.talent_type);
         $("#oldIdentifyGetTime").val(data.identifyGetTime);
-        $("#oldIdentifyConditionName").val(data.identifyConditionName);
-        $("#oldCertificateNO").val(data.certificateNO);
+        $("#oldIdentifyConditionName").val(data.talentConditionName);
+        $("#oldCertificateNO").val(data.certificateNo);
         $("#oldIdentifyCondition").val(data.identifyCondition);
         $("#oldIdentifyOutTime").val(data.identifyOutTime);
         $("#oldIdentifyMonth").val(data.identifyMonth);
         $("#oldCertificateStartTime").val(data.certificateStartTime);
         $("#oldCertificateOutTime").val(data.qzgccrcActiveTime);
         $("#oldIntroductionMode").val(data.introductionMode);
-        $("#oldYear").val(data.year);
+        $("#oldYear").val(data.apply_year);
         if(data.type == 1){
             toastr.success("符合晋江市现代产业体系人才补充认定标准的无需填写‘新泉州高层次人才证书发证日期’及‘新泉州高层次人才证书的有效期’。");
         }
@@ -235,10 +236,12 @@ TalentTypeChangeInfoDlg.talentInfoDetail = function (){
 }
 
 TalentTypeChangeInfoDlg.talentArrangeChange = function(now,next,source){
+
     var level = $('#'+now).val();
     var type = $("#type").val();
     var source = $("#"+source).val();
     var talentType = $("#talentType").val();
+    console.log(now,next,source,level)
     if(level==null||level==''){
         $("#"+next).empty();
         $("#"+next).trigger('chosen:updated');
@@ -262,7 +265,7 @@ TalentTypeChangeInfoDlg.talentArrangeChange = function(now,next,source){
         "displayCode": "id",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/common/findIdentifyConditionByLevel?talentLevel="+level+"&type="+type+"&source="+source+"&talentType="+talentType
+        "url": "/common/api/findIdentifyConditionByLevel?level="+level+"&type="+type+"&source="+source+"&talentType="+talentType
     });
     $("#"+next).trigger('chosen:updated');
 }
@@ -307,7 +310,7 @@ TalentTypeChangeInfoDlg.initFileTable = function (){
     queryData['type'] = $("#type").val();
     queryData['project'] = CONFIG.project_levelchange;
     $("#fileTable").bootstrapTable({
-        url: Feng.ctxPath + "/api/talentInfo/findUnCommonFileType",
+        url: "/api/talentInfo/findUnCommonFileType",
         method: 'POST',
         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
         search: false,					// 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
@@ -340,7 +343,7 @@ TalentTypeChangeInfoDlg.initFileTable = function (){
             $("#fileTable").bootstrapTable('expandAllRows');
         },
         onExpandRow: function (index, row, $detail) {
-            var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/listTalentFile", function (data) {
+            var ajax = new $ax("/api/talentInfo/listTalentFile", function (data) {
                 if(data==null||data.length==0){
                     return;
                 }
@@ -438,7 +441,7 @@ TalentTypeChangeInfoDlg.deleteFile = function (id,state){
         return ;
     }
     var operation = function() {
-        var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/deleteFile", function (data) {
+        var ajax = new $ax("/api/talentInfo/deleteFile", function (data) {
             if(data.code=200){
                 Feng.success(data.msg);
                 $("#fileTable").bootstrapTable("refresh", {});
@@ -466,7 +469,7 @@ TalentTypeChangeInfoDlg.submitToCheck = function(){
     }
     if(!TalentTypeChangeInfoDlg.validateIsEdit())return;
     var operation = function() {
-        var ajax = new $ax(Feng.ctxPath + "/api/talentTypeChange/submitToCheck", function (data) {
+        var ajax = new $ax("/api/talentTypeChange/submitToCheck", function (data) {
             if(data.code==200){
                 Feng.success(data.msg);
                 window.parent.TalentTypeChange.table.refresh();
@@ -550,7 +553,7 @@ TalentTypeChangeInfoDlg.callBack = function (data){
     }
 }
 TalentTypeChangeInfoDlg.downloadFile = function (id,type){
-    window.location.href = Feng.ctxPath + "/api/common/downloadFile?id=" + id + "&type="+type;
+    window.location.href = "/api/common/downloadFile?id=" + id + "&type="+type;
 }
 
 //设置不可修改的字段
@@ -605,8 +608,8 @@ $(function() {
     });
     // Feng.initValidator("talentTypeForm", TalentTypeChangeInfoDlg.validateFields);
     var arr = [
-        {"name":"oldTalentArrange","code":"un_talentLevel"},
-        {"name":"newTalentArrange","code":"un_talentLevel"},
+        {"name":"oldTalentArrange","code":"talent_arrange"},
+        {"name":"newTalentArrange","code":"talent_arrange"},
         {"name":"oldIntroductionMode","code":"un_introduction_mode"},
         {"name":"newIntroductionMode","code":"un_introduction_mode"}];
     Feng.findChildDictBatch(JSON.stringify(arr));
@@ -617,7 +620,7 @@ $(function() {
         "displayCode": "code",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/commonLocation/findCountyByCitySelect/350500"
+        "url": "/common/tool/findCountyByCitySelect/code/350500"
     });
     //加载福建省泉州的县
     Feng.addAjaxSelect({
@@ -625,7 +628,7 @@ $(function() {
         "displayCode": "code",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/commonLocation/findCountyByCitySelect/350500"
+        "url": "/common/tool/findCountyByCitySelect/code/350500"
     });
     var batchHtml = "<option value=''>请选择</option>";
     for(var i=1;i<101;i++){
@@ -633,13 +636,13 @@ $(function() {
     }
     $("#oldQzBath").append(batchHtml);
     $("#newQzBath").append(batchHtml);
-    var url = (id==null||id=='')?"/api/talentInfo/findTalentInfoInLibrary/"+CONFIG.project_levelchange:"/api/talentInfo/findTalentInfoByChangeId/"+CONFIG.project_levelchange+"/"+id;
+    var url = (id==null||id=='')?"/enterprise/talent/findTalentInfoInLibrary/"+CONFIG.project_levelchange:"/api/talentInfo/findTalentInfoByChangeId/"+CONFIG.project_levelchange+"/"+id;
     Feng.addAjaxSelect({
         "id": 'talentId',
         "displayCode": "id",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + url
+        "url": url
     });
     //批量加载时间控件
     $(".date").each(function(){

+ 2 - 2
public/static/modular/talentLibrary/talentTypeChange/talentTypeChange_common.js

@@ -106,8 +106,8 @@ TalentTypeChange.getIdentifyCondition = function(type) {
 TalentTypeChange.init = function(){
     //批量加载字典表数据
     var arr = [
-        {"name":"oldTalentArrange","code":"un_talentLevel"},
-        {"name":"newTalentArrange","code":"un_talentLevel"}];
+        {"name":"oldTalentArrange","code":"talent_arrange"},
+        {"name":"newTalentArrange","code":"talent_arrange"}];
     Feng.findChildDictBatch(JSON.stringify(arr));
     TalentTypeChange.getIdentifyCondition();
     $("#oldIdentifyCondition,#newIdentifyCondition").on('chosen:ready', function(e, params) {