Browse Source

Signed-off-by: sgq <sgq@sugangqiang>

sgq 2 years ago
parent
commit
aef2ef0125

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

@@ -133,4 +133,9 @@ class DictApi {
         return $dictList;
     }
 
+    public static function findDictByCode($code) {
+        $dict = Dict::where("code", $code)->findOrEmpty();
+        return $dict;
+    }
+
 }

+ 1 - 1
app/common/controller/Tool.php

@@ -21,7 +21,7 @@ class Tool extends BaseController {
         for ($i = 0; $i < count($this->request->param()); $i++) {
             if ($obj = $this->request->param($i)) {
                 $code = $obj["code"];
-                $dict = \app\common\model\Dict::where("code", $code)->findOrEmpty()->toArray();
+                $dict = \app\common\model\Dict::where("code", $code)->findOrEmpty();
                 $childs = \app\common\model\Dict::where("pid", $dict["id"])->order("num")->select();
                 $result[$obj["name"]] = $childs;
             }

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

@@ -22,7 +22,8 @@ class Talent extends EnterpriseController {
     }
     
     public function add(){
-        return view();
+        $enterprise_info = \app\admin\model\Enterprise::find($this->user["uid"]);
+        return view("",["enterprise"=>$enterprise_info]);
     }
 
 }

+ 11 - 26
app/enterprise/view/talent/add.html

@@ -37,12 +37,12 @@
                                 <div class="panel panel-default">
                                     <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
                                     <div class="panel-body">
-                                        <form id="talentInfoForm" class="form-horizontal" action="/api/talentInfo/upsert" method="post" enctype="multipart/form-data" target="hiddenIframe">
+                                        <form id="talentInfoForm" class="form-horizontal" action="/enterprise/talent/add" method="post" enctype="multipart/form-data" target="hiddenIframe">
                                             <div class="col-sm-12 form-group-sm">
                                                 <input type="hidden" name="id" id="id" value="">
-                                                <input type="hidden" name="year" id="year" value="${year}">
-                                                <input type="hidden" name="enterpriseId" id="enterpriseId" value="${enterprise.id}">
-                                                <input type="hidden" name="type" id="type" value="${enterprise.type}">
+                                                <input type="hidden" name="year" id="year" value="">
+                                                <input type="hidden" name="enterpriseId" id="enterpriseId" value="{$enterprise.id}">
+                                                <input type="hidden" name="type" id="type" value="{$enterprise.type}">
                                                 <input type="hidden" name="checkState" id="checkState" value="">
                                                 <input type="file" name="photo" id="photo" style="display: none">
                                                 <input type="hidden" name="provinceName" id="provinceName" value="">
@@ -54,45 +54,30 @@
                                                     <div class="col-sm-11">
                                                         <div class="rowGroup col-sm-3">
                                                             <label class="control-label spacing"><span style="color: red">*</span>人才类型</label>
-                                                            <select class="form-control" id="source" name="source" onchange="TalentInfoInfoDlg.sourceChange()">
-                                                                <option value="">请选择</option>
-                                                                <option value="1">现有人才。含经晋江市认定且还在晋江市就业创业的人才,或在晋江市就业创业但未曾申报过晋江市优秀人才的人才。</option>
-                                                                <option value="2">新引进人才。含本办法出台后首次从晋江市以外引进认定的人才,或者流出晋江市满3年后又返回晋江市就业创业<不含企业集团内部人员调动>的人才。</option>
-                                                                <option value="3">预引进人才。含已经与晋江市用人单位达成就业意向且签订预引进意向合作协议(合同)的人才,或拟来我市创业且提交企业名称预先核准的人才。</option>                                                                
+                                                            <select class="form-control" id="talent_type" name="talent_type" onchange="TalentInfoInfoDlg.sourceChange()">
+                                                                <option value="">请选择</option>                                                               
                                                             </select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                                            <input type="text" class="form-control" id="name" name="name" />
+                                                            <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" />
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>劳动合同起止时间</label>
-                                                            <input type="text" class="form-control" id="name" name="name" />
+                                                            <input type="text" class="form-control rangedate" id="labor_contract_rangetime" name="labor_contract_rangetime" />
                                                         </div>                                                        
                                                         <div class="rowGroup col-sm-3">
                                                             <label class="control-label spacing"><span style="color: red">*</span>单位标签</label>
-                                                            <select class="form-control" id="talentType" name="talentType" onchange="TalentInfoInfoDlg.typeChange(this)" >
-                                                                <option value="">请选择</option>
-                                                                <option value="1">国字号平台</option>
-                                                                <option value="2">民营企业</option>
-                                                                <option value="3">媒体单位</option>
-                                                                <option value="4">民办非企业</option>
-                                                                <option value="5">国有企业(我市本级国有股比超过50%)</option>
-                                                                <option value="6">国有企业(我市本级国有股比未超过50%)</option>
-                                                                <option value="7">金融机构(银行保险)</option>
-                                                                <option value="8">金融机构(银行保险除外)</option>
-                                                                <option value="9">在站博士后”</option>
-                                                                <option value="10">事业单位(医疗教育除外)</option>
-                                                                <option value="11">其他</option>
+                                                            <select class="form-control" id="enterprise_tag"  value="{$enterprise.talentType}" disabled="disabled">
                                                             </select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
-                                                            <input type="text" class="form-control" id="companyName"  name="companyName" readonly="readonly" value="${enterprise.name}" />
+                                                            <input type="text" class="form-control" id="enterprise_name"  name="enterprise_name" readonly="readonly" value="{$enterprise.name}" />
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>所属镇街</label>
-                                                            <select class="form-control" id="address" name="address" value="${enterprise.street}" disabled="disabled"></select>
+                                                            <select class="form-control" id="address" name="address" value="{$enterprise.street}" disabled="disabled"></select>
                                                         </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>产业领域</label>

+ 4 - 4
config/database.php

@@ -24,13 +24,13 @@ return [
             // 数据库类型
             'type'            => env('database.type', 'mysql'),
             // 服务器地址
-            'hostname'        => env('database.hostname', '127.0.0.1'),
+            'hostname'        => env('database.hostname', '106.54.81.227'),
             // 数据库名
-            'database'        => env('database.database', 'jjrc'),
+            'database'        => env('database.database', 'jjrcw'),
             // 用户名
-            'username'        => env('database.username', 'root'),
+            'username'        => env('database.username', 'jjrcw'),
             // 密码
-            'password'        => env('database.password', ''),
+            'password'        => env('database.password', 'shjHcS6zbffiW65t'),
             // 端口
             'hostport'        => env('database.hostport', '3306'),
             // 数据库连接参数

+ 12 - 1
public/static/modular/gate/talentInfo/talentInfo_info.js

@@ -737,11 +737,13 @@ $(function() {
     var checkState = $("#checkState").val();
     //批量加载字典表数据
     var arr = [
+        {"name":"talent_type","code":"talent_type"},
+        {"name":"enterprise_tag","code":"enterprise_tag"},
         {"name":"nation","code":"nation"},
         {"name":"talentArrange","code":"talent_arrange"},
         {"name":"nationality","code":"nationality"},
         {"name":"politics","code":"politics"},
-        {"name":"highEducation","code":"high_education"},
+        {"name":"highEducation","code":"highest_degress"},
         {"name":"introductionMode","code":"introduction_mode"},
         {"name":"industryField","code":"industry_field"},
         {"name":"address","code":"street"}];
@@ -787,6 +789,14 @@ $(function() {
             ,trigger: 'click'
         });
     });
+    $(".rangedate").each(function(){
+        laydate.render({
+            elem:this,
+            type:"date",
+            range:true,
+            trigger:"click"
+        })
+    })
     if(id!=null && id!=''){
         //select初始化
         $("select").each(function () {
@@ -794,6 +804,7 @@ $(function() {
         });
         Feng.getCheckLog("logTable",{"type":CONFIG.project_rcrd,"mainId":id,"typeFileId":"","active":1})
     }
+    $("#enterprise_tag").val($("#enterprise_tag").attr("value"));
     $("#address").val($("#address").attr("value"));
     $("#industryField").val($("#industryField").attr("value"));
     $("#provinceCode").val($("#provinceCode").attr("value"));