Browse Source

Merge remote-tracking branch 'origin/master'

sandm 2 years ago
parent
commit
6bf2586d79

+ 0 - 61
app/admin/view/integral_verify/library.html

@@ -28,15 +28,6 @@
                         <input type="hidden" id="process" value="4">
                         <input type="hidden" id="title" value="人才积分库">
                         <div class="row">
-                            <div class="col-sm-3">
-                                <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>
-                                    <input type="text" class="form-control" id="apply_year" placeholder="">
-                                </div>                            
-                            </div>
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">
                                     <div class="input-group-btn">
@@ -57,24 +48,6 @@
                                     <input type="text" class="form-control" id="card_number" placeholder="" />
                                 </div>
                             </div>
-                            <div class="col-sm-3">
-                                <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>
-                                    <input type="text" class="form-control" id="phone" placeholder="">
-                                </div>                            
-                            </div>
-                            <div class="col-sm-3">
-                                <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>
-                                    <input type="text" class="form-control" id="email" placeholder="">
-                                </div>                            
-                            </div>
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">
                                     <div class="input-group-btn">
@@ -89,40 +62,6 @@
                                     </select>
                                 </div>
                             </div>
-                            <div class="col-sm-3">
-                                <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 class="form-control" id="shareholder">
-                                        <option value="">---请选择---</option>
-                                        <option value="1">是</option>
-                                        <option value="2">否</option>
-                                    </select>
-                                </div>
-                            </div>
-                            <div class="col-sm-3">
-                                <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 class="form-control" id="checkState">
-                                        <option value="">---请选择---</option>
-                                        <option value="6">待核查征信</option>
-                                        <option value="21">待公示</option>
-                                        <option value="23">公示中</option>
-                                        <option value="24">待公布</option>
-                                        <option value="26">待发放积分</option>
-                                        <option value="28">积分已入账</option>
-                                        <option value="22">征信不通过</option>
-                                        <option value="25">公示审核不通过</option>
-                                        <option value="27">公布不通过</option>
-                                    </select>
-                                </div>                            
-                            </div>
                         </div>
                         <div class="row">
                             <div class="col-sm-12" style="text-align: center">

+ 32 - 2
app/common/api/IntegralRecordApi.php

@@ -200,8 +200,7 @@ class IntegralRecordApi {
                 }
                 break;
             case 4:
-                $where[] = ["ir.checkState", "=", IntegralState::SUCCESS];
-                break;
+                return self::getLibraryList($params);
         }
         $where[] = ["ir.delete", "=", 0];
         if ($params["apply_year"]) {
@@ -250,6 +249,37 @@ class IntegralRecordApi {
         return ["total" => $count, "rows" => $list];
     }
 
+    public static function getLibraryList($params) {
+        $order = $params["order"] ?: "desc";
+        $offset = $params["offset"] ?: 0;
+        $limit = $params["limit"] ?: 10;
+
+        $where = [];
+        $where[] = ["e.type", "=", session("user")["type"]];
+        $where[] = ["ir.checkState", "=", IntegralState::SUCCESS];
+        $where[] = ["ir.delete", "=", 0];
+        if ($params["name"]) {
+            $where[] = ["ir.name", "like", "%{$params['name']}%"];
+        }
+        if ($params["card_number"]) {
+            $where[] = ["ir.card_number", "like", "%{$params['card_number']}%"];
+        }
+        if ($params["enterprise_id"]) {
+            $where[] = ["ir.enterprise_id", "=", $params['enterprise_id']];
+        }
+        $count = IntegralRecord::alias("ir")->where($where)
+                ->leftJoin("sys_batch b", "b.id=ir.batch_id")
+                ->leftJoin("un_enterprise e", "e.id=ir.enterprise_id")
+                ->group("concat(card_type,card_number)")
+                ->count();
+        $list = IntegralRecord::alias("ir")->where($where)
+                        ->leftJoin("sys_batch b", "b.id=ir.batch_id")
+                        ->leftJoin("un_enterprise e", "e.id=ir.enterprise_id")
+                        ->group("concat(card_type,card_number)")
+                        ->field("ir.name,ir.card_type,ir.card_number,ir.enterprise_id,sum(ir.totalPoints) as totalPoints,e.name as enterpriseName")->limit($offset, $limit)->order("b.batch " . $order)->select();
+        return ["total" => $count, "rows" => $list];
+    }
+
     public static function checkIsEditable($id) {
         $info = self::getOne($id);
         if (!$info || !in_array($info["checkState"], [0, IntegralState::SAVE]))

+ 1 - 0
app/enterprise/controller/Integral.php

@@ -127,6 +127,7 @@ class Integral extends EnterpriseController {
                 }
                 $ft_ids = array_filter(array_merge($ft_ids, (array) explode(",", $integralItemInfo["fileTypeId"])));
             }
+            $ft_ids = array_unique($ft_ids);
             if (count($tmp_item_ids) != $detailCounts) {
                 throw new ValidateException("同一个申报中,同一个积分标准不能申报多次");
             }

+ 83 - 57
public/static/modular/talentIdentify/integralMgr/IntegralVerify_library.js

@@ -21,7 +21,6 @@ IntegralInfo.initColumn = function () {
     ;
     return [
         {field: 'selectItem', radio: true},
-        {title: '申报年度', field: 'apply_year', visible: true, align: 'center', valign: 'middle', width: '80px'},
         {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "100px",
             formatter: function (value, row, index) {
                 if (row.sex == 1) {
@@ -33,75 +32,102 @@ IntegralInfo.initColumn = function () {
                 }
             }
         },
-        {title: '人才类别', field: 'type', visible: true, align: 'center', valign: 'middle', width: "100px",
-            formatter: function (value, row, index) {
-                if (value == 1) {
-                    return '晋江市现代产业体系人才';
-                }
-                if (value == 2) {
-                    return '集成电路优秀人才';
-                }
-            }
-        },
-        {title: '是否股东', field: 'shareholder', visible: true, align: 'center', valign: 'middle', width: "100px",
-            formatter: function (value, row, index) {
-                if (value == 1) {
-                    return '是';
-                }
-                if (value == 2) {
-                    return '否';
-                }
-            }
-        },
-        {title: '证件号码', field: 'card_number', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
-        {title: '申报标准', field: 'details', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
-        {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",
+        {title: '所属单位', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', width: "100px"},
+        {title: '证件类型', field: 'card_type', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
             formatter: function (value, row, index) {
                 switch (value) {
-                    case 6:
-                        return "<span class='label label-success'>待核查征信</span>";
-                        break;
-                    case 21:
-                        return "<span class='label label-success'>待公示</span>";
-                        break;
-                    case 23:
-                        return "<span class='label label-success'>待公示审核</span>";
-                        break;
-                    case 24:
-                        return "<span class='label label-success'>待公布</span>";
-                        break;
-                    case 26:
-                        return "<span class='label label-success'>待发放积分</span>";
-                        break;
-                    case 28:
-                        return "<span class='label label-primary'>积分已入账</span>";
-                        break;
-                    case 13:
-                        return "<span class='label label-danger'>复核失败</span>";
-                        break;
-                    case 22:
-                        return "<span class='label label-danger'>征信不通过</span>";
-                        break;
-                    case 25:
-                        return "<span class='label label-danger'>公示审核不通过</span>";
-                        break;
-                    case 27:
-                        return "<span class='label label-danger'>公布不通过</span>";
-                        break;
+                    case 1:
+                        return "身份证";
+                    case 2:
+                        return "港澳通行证";
+                    case 3:
+                        return "护照";
                 }
             }
         },
+        {title: '证件号码', field: 'card_number', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
+        {title: '总积分', field: 'totalPoints', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
         {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: '80px',
             formatter: function (value, row, index) {
-                return "<span class='label label-success' onclick=\"IntegralInfo.showLog('" + value + "')\" >" +
+                return "<span class='label label-success' onclick=\"IntegralInfo.showIntegralLog('" + row.card_type + "','" + row.card_number + "')\" >" +
                         "<i class=\"fa fa-book\"></i>日志" +
                         "</span>";
             }
         }
     ];
 };
+
+/**
+ * 显示积分记录
+ */
+IntegralInfo.showIntegralLog = function (card_type, card_number) {
+    layer.open({
+        type: 1,
+        title: "日志",
+        fixed: false,
+        content: '<table id="' + card_type + "_" + card_number + '"></table>',
+        area: ['80%', '80%'],
+        maxmin: true,
+        success: function (layero, index) {
+            IntegralInfo.getIntegralLog(card_type + "_" + card_number, {"card_type": card_type, "card_number": card_number})
+        }
+    });
+}
+
+IntegralInfo.getIntegralLog = function (id, data) {
+    //初始化日志
+    $('#' + id).bootstrapTable({
+        url: Feng.ctxPath + "/admin/integralVerify/getIntegralLog",
+        method: 'POST',
+        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: false, // 设置为 true 会在表格底部显示分页条
+        paginationHAlign: "left",
+        paginationDetailHAlign: "right",
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        showColumns: false,
+        queryParams: function (params) {
+            return data;
+        },
+        rowStyle: function (row, index) {
+            return {
+                css: {
+                    "word-break": "break-word",
+                    "white-space": "inherit"
+                }
+            }
+        },
+        columns:
+                [
+                    {title: '步骤', field: 'stepName', visible: true, align: 'center', valign: 'middle', width: "10%", 'class': 'uitd_showTip',
+                        formatter: function (value, row, index) {
+                            return "" + value;
+                        }
+                    },
+                    {title: '审核状态', field: 'stateName', visible: true, align: 'center', valign: 'middle', width: "10%", 'class': 'uitd_showTip'},
+                    {title: '状态变更', field: 'stateChange', visible: true, align: 'center', valign: 'middle', width: "20%", 'class': 'uitd_showTip'},
+                    {title: '审核意见/备注', field: 'description', visible: true, align: 'center', valign: 'middle', width: "30%", 'class': 'uitd_showTip',
+                        formatter: function (value, row, index) {
+                            return '<span data-toggle="tooltip" title="' + value + '">"' + value + '"</span>';
+                        }
+                    },
+                    {title: '操作人', field: 'createUser', visible: true, align: 'center', valign: 'middle', width: "15%", 'class': 'uitd_showTip'},
+                    {title: '操作时间', field: 'createTime', visible: true, align: 'center', valign: 'middle', width: "15%", 'class': 'uitd_showTip'},
+                ]
+        ,
+        onPostBody: function () {
+            $('#' + id + "td.uitd_showTip").bind("mouseover", function () {
+                var htm = $(this).html();
+                $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+            });
+        }
+    });
+
+};
 /**
  * 检查是否选中
  */