sugangqiang 1 жил өмнө
parent
commit
f25bdeac45

+ 11 - 4
app/admin/controller/Talent.php

@@ -183,10 +183,17 @@ class Talent extends AdminController {
         $card_number = $this->request->param("idCard");
         $card_type = $this->request->param("cardType");
         $where = [];
-        $where[] = ["card_type", "=", $card_type];
-        $where[] = ["card_number", "=", $card_number];
-        $list = Db::table("new_talent_info")->where($where)->select()->toArray();
-        return json($list);
+        $where[] = ["ti.card_type", "=", $card_type];
+        $where[] = ["ti.card_number", "=", $card_number];
+        $where[] = ["ti.delete", "=", 0];
+        $list = TalentModel::alias("ti")
+                        ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
+                        ->leftJoin("(select mainId,last_state,new_state,state,createTime from new_talent_checklog where md5(concat(createTime,mainId,`type`)) in (select md5(concat(max(createTime),mainId,`type`)) from `new_talent_checklog` where `type`=1 and `step` is null and active=1 and typeFileId is null group by mainId,`type`)) tl", "`tl`.`mainId`=ti.id")
+                        ->where($where)->order("ti.createTime desc")->field("ti.*,tl.last_state as 'lastState',tl.state as 'realState',e.name as enterpriseName")->select()->toArray();
+        foreach ($list as $key => $item) {
+            $list[$key]["checkStateName"] = TalentState::getStateName($item["realState"]);
+        }
+        return json(["rows" => $list]);
     }
 
     public function cancel_verify() {

+ 1 - 1
app/admin/view/living_allowance/detail.html

@@ -155,7 +155,7 @@
                                                                     </div>
                                                                     <div class="rowGroup col-sm-3">
                                                                         <label class=" control-label spacing"><span style="color: red">*</span>证件号码</label>
-                                                                        <input class="form-control" readonly="readonly" value="{$row.idCard}" id="idCard" name="idCard" >
+                                                                        <input class="form-control" readonly="readonly" value="{$row.idCard}" id="idCard" name="idCard" data-type="{$row.cardType}">
                                                                     </div>
                                                                     <div class="rowGroup col-sm-3">
                                                                         <label class=" control-label spacing"><span style="color: red">*</span>性别</label>

+ 32 - 37
public/static/modular/master/livingAllowanceInfo/livingAllowanceInfo_info.js

@@ -234,14 +234,14 @@ $(function () {
         sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
         showColumns: false,
         queryParams: function (params) {
-            return {"idCard": $("#idCard").val(), "cardType": $("#cardType").val()};
+            return {"idCard": $("#idCard").val(), "cardType": $("#idCard").data("type")};
         },
         rowStyle: function (row, index) {
             return {css: {"word-break": "break-word", "white-space": "inherit"}}
         },
         columns:
                 [
-                    {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: 'enterpriseName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
                     {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px",
                         formatter: function (value, row, index) {
@@ -253,50 +253,45 @@ $(function () {
                             }
                         }
                     },
-                    {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', width: "100px"},
-                    {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "150px"},
-                    {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
-                    {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
-                    {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "100px",
+                    {title: '人才层次', field: 'talent_arrange', visible: true, align: 'center', valign: 'middle', width: "100px",
                         formatter: function (value, row, index) {
-                            if (value == -1) {
-                                return "<span class='label label-danger'>审核不通过</span>"
-                            } else if (value == 1) {
-                                return "<span class='label'>待提交</span>"
-                            } else if (value == 10) {
-                                return "<span class='label label-danger'>已驳回</span>"
-                            } else if (value == 35) {
-                                return "<span class='label label-primary'>已通过</span>"
-                            } else {
-                                return "<span class='label label-success'>审核中</span>"
+                            switch (value) {
+                                case 1:
+                                    return "第一层次";
+                                case 2:
+                                    return "第二层次";
+                                case 3:
+                                    return "第三层次";
+                                case 4:
+                                    return "第四层次";
+                                case 5:
+                                    return "第五层次";
+                                case 6:
+                                    return "第六层次";
+                                case 7:
+                                    return "第七层次";
+
                             }
                         }
                     },
-                    {title: '公示状态', field: 'isPublic', visible: true, align: 'center', valign: 'middle', width: '120px',
+                    {title: '证件号码', field: 'card_number', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "150px"},
+                    {title: '首次提交时间', field: 'first_submit_time', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+                    {title: '最新提交时间', field: 'new_submit_time', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+                    {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "100px",
                         formatter: function (value, row, index) {
-                            if (value == 1) {
-                                return "<span class='label label-info'>待核查征信</span>"
-                            }
-                            if (value == 2) {
-                                return "<span class='label label-success'>待公示</span>"
+                            if ([-2, 11, 13, 15, 16, 22, 25, 27].indexOf(value) > -1) {
+                                return "<span class='label label-danger'>" + row.checkStateName + "</span>"
                             }
-                            if (value == 3) {
-                                return "<span class='label label-danger'>公示中</span>"
+                            if ([9, 10, 12, 14, 21, 23, 24, 26].indexOf(value) > -1) {
+                                return "<span class='label label-success'>" + row.checkStateName + "</span>"
                             }
-                            if (value == 4) {
-                                return "<span class='label label-warning'>待公布</span>"
-                            }
-                            if (value == 5) {
-                                if (row.checkState == -1) {
-                                    return "<span class='label label-danger'>审核不通过</span>"
-                                }
-                                return "<span class='label label-primary'>待发证</span>"
-                            }
-                            if (value == 6) {
-                                return "<span class='label label-primary'>已发证</span>"
+                            if ([28].indexOf(value) > -1) {
+                                return "<span class='label label-primary'>" + row.checkStateName + "</span>"
+                            } else {
+                                return "<span class='label'>" + row.checkStateName + "</span>"
                             }
                         }
-                    },
+                    }
                 ]
         ,
         onPostBody: function () {