ソースを参照

津补贴企业端增加状态搜索

sugangqiang 11 ヶ月 前
コミット
f2fb761046

+ 24 - 2
app/common/api/TalentAllowanceApi.php

@@ -29,8 +29,30 @@ class TalentAllowanceApi {
         if ($_where = self::setTalentAllowanceInfo($params)) {
         if ($_where = self::setTalentAllowanceInfo($params)) {
             $where = array_merge($where, $_where);
             $where = array_merge($where, $_where);
         }
         }
-        $count = TaModel::where($where)->alias("ta")->leftJoin("un_enterprise e", "e.id=ta.enterpriseId")->count();
-        $list = TaModel::where($where)->alias("ta")->leftJoin("un_enterprise e", "e.id=ta.enterpriseId")->field("ta.*")->limit($offset, $limit)->order("year {$order},ta.createTime {$order}")->select()->toArray();
+        $whereRaw = "ta.id>0";
+        if (\StrUtil::isNotEmpAndNull($params["checkState"])) {
+            switch ($params["checkState"]) {
+                case 1:
+                    $where[] = ["ta.checkState", "=", AllowanceStateEnum::SAVE];
+                    break;
+                case 5:
+                    $where[] = ["ta.publicState", "<>", 5];
+                    $whereRaw = "ta.checkState=5 or ta.checkState >= 13";
+                    break;
+                case 10:
+                    $where[] = ["ta.checkState", "=", AllowanceStateEnum::FIRST_REJECT];
+                    break;
+                case 30:
+                    $where[] = ["ta.checkState", "=", AllowanceStateEnum::REVIEW_PASS];
+                    $where[] = ["ta.publicState", "=", 5];
+                    break;
+                case -1:
+                    $where[] = ["ta.checkState", "=", AllowanceStateEnum::NOTPASS];
+                    break;
+            }
+        }
+        $count = TaModel::where($where)->whereRaw($whereRaw)->alias("ta")->leftJoin("un_enterprise e", "e.id=ta.enterpriseId")->count();
+        $list = TaModel::where($where)->whereRaw($whereRaw)->alias("ta")->leftJoin("un_enterprise e", "e.id=ta.enterpriseId")->field("ta.*")->limit($offset, $limit)->order("year {$order},ta.createTime {$order}")->select()->toArray();
         $levelList = DictApi::selectByParentCode("talent_arrange");
         $levelList = DictApi::selectByParentCode("talent_arrange");
         $talentTypeList = DictApi::selectByParentCode("enterprise_tag");
         $talentTypeList = DictApi::selectByParentCode("enterprise_tag");
         $streetList = DictApi::selectByParentCode("street");
         $streetList = DictApi::selectByParentCode("street");

+ 17 - 0
app/enterprise/view/talent_allowance/indexIC.html

@@ -84,6 +84,23 @@
                                     </select>
                                     </select>
                                 </div>
                                 </div>
                             </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="1">待提交</option>
+                                        <option value="5">待审核</option>
+                                        <option value="10">审核驳回</option>
+                                        <option value="30">已通过</option>
+                                        <option value="-1">审核不通过</option>
+                                    </select>
+                                </div>
+                            </div>
                             <div class="col-sm-3">
                             <div class="col-sm-3">
                                 <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.search()" id="">
                                 <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.search()" id="">
                                     <i class="fa fa-search"></i>&nbsp;搜索
                                     <i class="fa fa-search"></i>&nbsp;搜索

+ 1 - 0
public/static/modular/gate/talentAllowance/ic/talentAllowanceInfoIC.js

@@ -283,6 +283,7 @@ TalentAllowanceInfo.formParams = function () {
     queryData['identifyCondition'] = $("#identifyCondition").val();
     queryData['identifyCondition'] = $("#identifyCondition").val();
     queryData['allowanceType'] = $("#allowanceType").val();
     queryData['allowanceType'] = $("#allowanceType").val();
     queryData['address'] = $("#address").val();
     queryData['address'] = $("#address").val();
+    queryData['checkState'] = $("#checkState").val();
     return queryData;
     return queryData;
 }
 }