Эх сурвалжийг харах

津补贴列表和导出增加津贴类型的筛选

sugangqiang 1 жил өмнө
parent
commit
6016d08849

+ 13 - 7
app/admin/controller/TalentAllowance.php

@@ -950,6 +950,8 @@ class TalentAllowance extends AdminController {
         $obj["checkState"] = \StrUtil::getRequestDecodeParam($this->request, "checkState");
         $obj["publicState"] = \StrUtil::getRequestDecodeParam($this->request, "publicState");
         $obj["companyName"] = \StrUtil::getRequestDecodeParam($this->request, "companyName");
+        $obj["allowanceType"] = \StrUtil::getRequestDecodeParam($this->request, "allowanceType");
+        $obj["recommendAllowanceType"] = \StrUtil::getRequestDecodeParam($this->request, "recommendAllowanceType");
         $obj["introductionMode"] = \StrUtil::getRequestDecodeParam($this->request, "introductionMode");
         $obj["firstJJStartTime"] = \StrUtil::getRequestDecodeParam($this->request, "firstJJStartTime");
         $obj["firstJJEndTime"] = \StrUtil::getRequestDecodeParam($this->request, "firstJJEndTime");
@@ -1080,7 +1082,6 @@ class TalentAllowance extends AdminController {
         }
         $settings["background-color"][] = [sprintf("%s2:%s2", getExcelColumnByIndex($infoCols), getExcelColumnByIndex($cols)), "E1F1DE"];
         export($columns, $rows, "津补贴申报名单", $settings);
-        
     }
 
     private function validateAllowanceType(&$info) {
@@ -1673,6 +1674,9 @@ class TalentAllowance extends AdminController {
         if (\StrUtil::isNotEmpAndNull($query["address"])) {
             $where[] = ["address", "=", $query["address"]];
         }
+        if ($query["allowanceType"]) {
+            $where[] = ["allowanceType", "=", $query["allowanceType"]];
+        }
         if ($query["recommendAllowanceType"]) {
             $where[] = ["recommendAllowanceType", "=", $query["recommendAllowanceType"]];
         }
@@ -1785,8 +1789,8 @@ class TalentAllowance extends AdminController {
         }
         return $where;
     }
-    
-    private function setTalentAllowanceInfoForExport($where, $query, $process) {
+
+    private function setTalentAllowanceInfoForExport(&$where, $query, $process) {
         if (\StrUtil::isNotEmpAndNull($query["year"])) {
             $where[] = ["ta.year", "=", $query["year"]];
         }
@@ -1808,10 +1812,13 @@ class TalentAllowance extends AdminController {
         if (\StrUtil::isNotEmpAndNull($query["address"])) {
             $where[] = ["ta.address", "=", $query["address"]];
         }
-        if ($query["recommendAllowanceType"]) {
+        if (\StrUtil::isNotEmpAndNull($query["allowanceType"])) {
+            $where[] = ["ta.allowanceType", "=", $query["allowanceType"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($query["recommendAllowanceType"])) {
             $where[] = ["ta.recommendAllowanceType", "=", $query["recommendAllowanceType"]];
         }
-        if ($query["publicState"]) {
+        if (\StrUtil::isNotEmpAndNull($query["publicState"])) {
             $where[] = ["ta.publicState", "=", $query["publicState"]];
         }
         if (\StrUtil::isNotEmpAndNull($query["introductionMode"])) {
@@ -1918,7 +1925,6 @@ class TalentAllowance extends AdminController {
                 }
             }
         }
-        return $where;
     }
 
     private function translateToChinese(&$obj) {
@@ -1972,7 +1978,7 @@ class TalentAllowance extends AdminController {
         }unset($info);
         return $list;
     }
-    
+
     private function getCheckStateName($checkState, $publicState, $allowanceType) {
         switch ($checkState) {
             case 1:

+ 17 - 0
app/admin/view/talent_allowance/index.html

@@ -190,6 +190,23 @@
                                     </select>
                                 </div>
                             </div>
+                            {if condition="in_array($process,[1,2])"}
+                            <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="allowanceType">
+                                        <option value="">请选择</option>
+                                        <option value="1">工作津贴</option>
+                                        <option value="2">一次性交通补贴</option>
+                                        <option value="3">不予兑现</option>
+                                    </select>
+                                </div>
+                            </div>
+                            {/if}
                             {if condition="in_array($process,[3,4])"}
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">

+ 3 - 0
app/common/api/TalentAllowanceApi.php

@@ -62,6 +62,9 @@ class TalentAllowanceApi {
         if (\StrUtil::isNotEmpAndNull($params["identiryCondition"])) {
             $where[] = ["identifyCondition", "=", $params["identifyCondition"]];
         }
+        if (\StrUtil::isNotEmpAndNull($params["allowanceType"])) {
+            $where[] = ["allowanceType", "=", $params["allowanceType"]];
+        }
         if (\StrUtil::isNotEmpAndNull($params["address"])) {
             $where[] = ["address", "=", $params["address"]];
         }

+ 4 - 0
app/enterprise/controller/TalentAllowance.php

@@ -864,6 +864,7 @@ class TalentAllowance extends EnterpriseController {
         $obj["year"] = \StrUtil::getRequestDecodeParam($this->request, "year");
         $obj["name"] = \StrUtil::getRequestDecodeParam($this->request, "name");
         $obj["talentArrange"] = \StrUtil::getRequestDecodeParam($this->request, "talentArrange");
+        $obj["allowanceType"] = \StrUtil::getRequestDecodeParam($this->request, "allowanceType");
         $obj["address"] = \StrUtil::getRequestDecodeParam($this->request, "address");
         $obj["identifyCondition"] = \StrUtil::getRequestDecodeParam($this->request, "identifyCondition");
         $where = [];
@@ -877,6 +878,9 @@ class TalentAllowance extends EnterpriseController {
         if (\StrUtil::isNotEmpAndNull($obj["talentArrange"])) {
             $where[] = ["ta.talentArrange", "=", $obj["talentArrange"]];
         }
+        if (\StrUtil::isNotEmpAndNull($obj["allowanceType"])) {
+            $where[] = ["ta.allowanceType", "=", $obj["allowanceType"]];
+        }
         if (\StrUtil::isNotEmpAndNull($obj["address"])) {
             $where[] = ["ta.address", "=", $obj["address"]];
         }

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

@@ -58,6 +58,21 @@
                                     </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="allowanceType">
+                                        <option value="">请选择</option>
+                                        <option value="1">工作津贴</option>
+                                        <option value="2">一次性交通补贴</option>
+                                        <option value="3">不予兑现</option>
+                                    </select>
+                                </div>
+                            </div>
                             <div class="col-sm-3">           
                                 <div class="input-group input-group-sm">
                                     <div class="input-group-btn">

+ 4 - 2
public/static/modular/gate/talentAllowance/ic/talentAllowanceInfoIC.js

@@ -254,8 +254,9 @@ TalentAllowanceInfo.formParams = function () {
     queryData['idCard'] = $("#idCard").val();
     queryData['talentType'] = $("#talentType").val();
     queryData['talentArrange'] = $("#talentArrange").val();
-    queryData['address'] = $("#address").val();
     queryData['identifyCondition'] = $("#identifyCondition").val();
+    queryData['allowanceType'] = $("#allowanceType").val();
+    queryData['address'] = $("#address").val();
     return queryData;
 }
 
@@ -276,8 +277,9 @@ TalentAllowanceInfo.reset = function () {
     $("#idCard").val("");
     $("#talentType").val("");
     $("#talentArrange").val("");
-    $("#address").val("");
     $("#identifyCondition").val("");
+    $("#allowance").val("");
+    $("#address").val("");
 }
 
 /**

+ 1 - 0
public/static/modular/talentAllowance/talentAllowanceInfo.js

@@ -782,6 +782,7 @@ TalentAllowanceInfo.formParams = function () {
     queryData['checkState'] = $("#checkState").val();
     queryData['isPublicCheck'] = $("#isPublicCheck").val();
     queryData['publicState'] = $("#publicState").val();
+    queryData['allowanceType'] = $("#allowanceType").val();
     queryData['recommendAllowanceType'] = $("#recommendAllowanceType").val();
     queryData['companyName'] = $("#companyName").val();
     queryData['introductionMode'] = $("#introductionMode").val();