浏览代码

Merge branch 'master' of http://59.57.98.130:3000/jjhc/report

sandm 2 年之前
父节点
当前提交
88908330cb

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

@@ -16,6 +16,11 @@ use app\common\api\TalentConditionApi;
  */
 class Talent extends AdminController {
 
+    public function selectNeedCheckData() {
+        $params = $this->request->param();
+        return json(VerifyApi::getPublicList($params));
+    }
+
     public function common_check() {
         $request = $this->request;
         $params = $request->param();

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

@@ -127,6 +127,46 @@ class VerifyApi {
         }unset($item);
         return ["total" => $count, "rows" => $list];
     }
+    
+    public static function getPublicList($params){
+        $type = $params["type"];
+        $where = [];
+        switch ($type) {
+            case 1:
+            case 2:
+                $where[] = ["isPublic",1];
+                $where[] = ["checkState",11];
+                break;
+            case 3:             //公示
+            case 7:             //公示预览
+                $where[] = ["isPublic",2];
+                $where[] = ["checkState",11];
+                break;
+            case 4:
+                $where[] = ["isPublic",3];
+                $where[] = ["checkState",11];
+                break;
+            case 5:
+            case 8:             //公布预览
+                $where[] = ["isPublic",4];
+                $where[] = ["checkState",11];
+                break;
+            case 6:
+                $where[] = ["isPublic",5];
+                $where[] = ["checkState",11];
+                break;
+        }
+        $enterprise_tag_kvs = DictApi::selectByParentCode("enterprise_tag");
+        $count = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")->where($where)->count();
+        $list = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                        ->where($where)->limit($offset, $limit)->order("ti.createTime " . $order)->field("ti.*,e.agentName,e.type as enterprise_type,enterpriseTag")->select()->toArray();
+        foreach ($list as &$item) {
+            $item["enterprise_name"] = $item["agentName"];
+            $item["talent_type"] = $item["enterprise_type"] == 1 ? "晋江优秀人才" : "集成电路优秀人才";
+            $item["enterprise_tag"] = $enterprise_tag_kvs[$item["enterpriseTag"]];
+        }unset($item);
+        return ["total" => $count, "rows" => $list];
+    }
 
     public static function getList($request) {
         $where = [];
@@ -151,6 +191,9 @@ class VerifyApi {
             case 4:
                 $where[] = ["ti.checkState", "=", 9];
                 break;
+            case 5:
+                $where[] = ["ti.checkState", "=", 11];
+                break;
         }
         $enterprise_tag_kvs = DictApi::selectByParentCode("enterprise_tag");
         $count = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")->where($where)->count();

+ 32 - 2
app/enterprise/controller/Base.php

@@ -81,10 +81,40 @@ class Base extends EnterpriseController {
             }
             $no_empty = ["talent_type", "name", "card_type", "card_number", "sex", "birthday", "nationality", "province", "city", "nation", "politics"];
 
-            if (in_array($param["talent_type"], [1, 2]))
+            if (in_array($param["talent_type"], [1, 2])) {
+                list($date1, $date2) = explode(" - ", $param["tax_insurance_month"]);
+                if (strtotime($date1) > strtotime($date2)) {
+                    $res = ["msg" => $filed_dict["tax_insurance_month"] . "起始时间不能大于结束时间"];
+                    echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
+                    exit;
+                }
+                $start = date_create($date1);
+                $end = date_create($date2);
+                $diff = date_diff($end, $start);
+                if ($diff->m < 6) {
+                    $res = ["msg" => $filed_dict["tax_insurance_month"] . "应大于或等于6个月"];
+                    echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
+                    exit;
+                }
                 $no_empty[] = "tax_insurance_month";
-            if ($param["talent_type"] == 3)
+            }
+            if ($param["talent_type"] == 3) {
+                list($date1, $date2) = explode(" - ", $param["labor_contract_rangetime"]);
+                if (strtotime($date1) > strtotime($date2)) {
+                    $res = ["msg" => $filed_dict["labor_contract_rangetime"] . "起始时间不能大于结束时间"];
+                    echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
+                    exit;
+                }
+                $start = date_create($date1);
+                $end = date_create($date2);
+                $diff = date_diff($end, $start);
+                if ($diff->m < 6) {
+                    $res = ["msg" => $filed_dict["labor_contract_rangetime"] . "应大于或等于6个月"];
+                    echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
+                    exit;
+                }
                 $no_empty[] = "labor_contract_rangetime";
+            }
             $return = [];
             foreach ($no_empty as $key) {
                 if (!$param[$key]) {

+ 2 - 2
app/enterprise/view/base/first.html

@@ -172,12 +172,12 @@
                                                 {if condition="in_array($row['talent_type'],[1,2])"}                                                        
                                                 <div class="rowGroup col-sm-3">
                                                     <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                                    <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}"/>
+                                                    <input type="text" class="form-control rangedate" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}"/>
                                                 </div>
                                                 {else/}
                                                 <div class="rowGroup col-sm-3" style="display:none;">
                                                     <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                                    <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value=""/>
+                                                    <input type="text" class="form-control rangedate" id="tax_insurance_month" name="tax_insurance_month" value=""/>
                                                 </div>
                                                 {/if}                                                        
                                                 {if condition="$row['talent_type'] eq 3"}  

+ 2 - 2
app/enterprise/view/talent/first.html

@@ -72,12 +72,12 @@
                                                         {if condition="in_array($row['talent_type'],[1,2])"}                                                        
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                                            <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}"/>
+                                                            <input type="text" class="form-control rangedate" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}"/>
                                                         </div>
                                                         {else/}
                                                         <div class="rowGroup col-sm-3" style="display:none;">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                                            <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}"/>
+                                                            <input type="text" class="form-control rangedate" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}"/>
                                                         </div>
                                                         {/if}                                                        
                                                         {if condition="$row['talent_type'] eq 3"}  

+ 8 - 1
public/.htaccess

@@ -1 +1,8 @@
- 
+ <IfModule mod_rewrite.c>
+  Options +FollowSymlinks -Multiviews
+  RewriteEngine On
+
+  RewriteCond %{REQUEST_FILENAME} !-d
+  RewriteCond %{REQUEST_FILENAME} !-f
+  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
+</IfModule>

+ 2 - 10
public/static/modular/gate/talentBase/talentInfo_info.js

@@ -380,11 +380,7 @@ TalentInfoInfoDlg.talentTypeChange = function () {
             $("#tax_insurance_month").removeAttr("disabled").parent().css("display", "block");
             $('#talentInfoForm').bootstrapValidator('addField', "tax_insurance_month", {
                 validators: {
-                    notEmpty: {message: '在我市缴交社会保险或个人所得税月份不能为空'},
-                    regexp: {
-                        regexp: /^\d+$/,
-                        message: "在我市缴交社会保险或个人所得税月份格式不正确"
-                    }
+                    notEmpty: {message: '在我市缴交社会保险或个人所得税月份不能为空'}
                 }
             });
             break;
@@ -395,11 +391,7 @@ TalentInfoInfoDlg.talentTypeChange = function () {
             $("#tax_insurance_month").removeAttr("disabled").parent().css("display", "block");
             $('#talentInfoForm').bootstrapValidator('addField', "tax_insurance_month", {
                 validators: {
-                    notEmpty: {message: '在我市缴交社会保险或个人所得税月份不能为空'},
-                    regexp: {
-                        regexp: /^\d+$/,
-                        message: "在我市缴交社会保险或个人所得税月份格式不正确"
-                    }
+                    notEmpty: {message: '在我市缴交社会保险或个人所得税月份不能为空'}
                 }
             });
             break;

+ 3 - 3
public/static/modular/talentIdentify/talentInfo/talentInfo_prepare.js

@@ -21,7 +21,7 @@ TalentInfo.initColumn = function () {
     ;
     return [
         {field: 'selectItem', checkbox: true},
-        {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle', width: '80px'},
+        {title: '申报年度', field: 'apply_year', visible: true, align: 'center', valign: 'middle', width: '80px'},
         {title: '离职状态', field: 'active', visible: true, align: 'center', valign: 'middle', width: '80px',
             formatter: function (value, row, index) {
                 if (value == 1) {
@@ -32,7 +32,7 @@ TalentInfo.initColumn = function () {
                 }
             }
         },
-        {title: '企业名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', width: '150px'},
+        {title: '企业名称', field: 'enterprise_name', visible: true, align: 'center', valign: 'middle', width: '150px'},
         {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: '120px',
             formatter: function (value, row, index) {
                 if (row.sex == 1) {
@@ -777,7 +777,7 @@ TalentInfo.callBack = function (data) {
 
 $(function () {
     var defaultColunms = TalentInfo.initColumn();
-    var table = new BSTable(TalentInfo.id, "/talentInfo/list/4", defaultColunms);
+    var table = new BSTable(TalentInfo.id, "/admin/talent/base_verify_list/process/5", defaultColunms);
     table.setPaginationType("server");
     table.setSingleSelect(false);
     table.setOnDblClickRow(function () {