瀏覽代碼

默认新增和批量增加的津补贴申请,项目全选

sugangqiang 1 年之前
父節點
當前提交
a0f65539bd

+ 7 - 1
app/enterprise/controller/TalentAllowance.php

@@ -405,7 +405,9 @@ class TalentAllowance extends EnterpriseController {
     }
 
     private function createAllowanceProject($info, $contractList) {
+        $count = 0;
         foreach ($contractList as $detail) {
+            $count++;
             $projects = [
                 //AllowanceProjectEnum::PROJECT_CONTRACT,
                 AllowanceProjectEnum::PROJECT_TAX,
@@ -418,11 +420,15 @@ class TalentAllowance extends EnterpriseController {
             ];
             $list = [];
             foreach ($projects as $project) {
+                $months = "";
+                if ($count == count($contractList) && $info["allowanceType"] == AllowanceTypeEnum::JBT_TALENT)
+                    $months = "01,02,03,04,05,06,07,08,09,10,11,12";
                 $list[] = [
                     "mainId" => $info["id"],
                     "baseId" => $detail["id"],
                     "enterpriseId" => $detail["enterpriseId"],
                     "project" => $project,
+                    "months" => $months,
                     "isLock" => 1,
                     "createTime" => date("Y-m-d H:i:s")
                 ];
@@ -832,7 +838,7 @@ class TalentAllowance extends EnterpriseController {
             $whr[] = ["ti.enterprise_id", "=", $this->user["uid"]];
             $whr[] = ["e.type", "=", $this->user["type"]];
             $whr[] = ["ti.id", "not in", $ids];
-            $list = \app\enterprise\model\Talent::alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")->field("ti.id,ti.name,ti.card_number as idCard")->where($whr)->select()->toArray();
+            $list = \app\enterprise\model\Talent::alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")->field("ti.id,ti.name,ti.card_number as idCard,ti.cur_entry_time")->where($whr)->select()->toArray();
             foreach ($list as $info) {
                 if (strtotime($year . "-12-31") >= strtotime($info["identifyMonth"])) {
                     $res[] = $info;

+ 7 - 0
app/job/TalentAllowance.php

@@ -13,6 +13,7 @@ use app\common\state\MainState;
 use app\common\api\LocationApi;
 use app\enterprise\model\TalentTypeChange;
 use app\common\state\AllowanceProjectEnum;
+use app\common\state\AllowanceTypeEnum;
 
 /**
  * Description of TalentAllowance
@@ -272,7 +273,9 @@ class TalentAllowance {
     }
 
     private function createAllowanceProject($info, $contractList) {
+        $count = 0;
         foreach ($contractList as $detail) {
+            $count++;
             $projects = [
                 //AllowanceProjectEnum::PROJECT_CONTRACT,
                 AllowanceProjectEnum::PROJECT_TAX,
@@ -285,11 +288,15 @@ class TalentAllowance {
             ];
             $list = [];
             foreach ($projects as $project) {
+                $months = "";
+                if ($count == count($contractList) && $info["allowanceType"] == AllowanceTypeEnum::JBT_TALENT)
+                    $months = "01,02,03,04,05,06,07,08,09,10,11,12";
                 $list[] = [
                     "mainId" => $info["id"],
                     "baseId" => $detail["id"],
                     "enterpriseId" => $detail["enterpriseId"],
                     "project" => $project,
+                    "months" => $months,
                     "isLock" => 1,
                     "createTime" => date("Y-m-d H:i:s")
                 ];

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

@@ -364,7 +364,8 @@ TalentAllowanceInfo.commonColumns = function () {
     return [
         {field: "selectItem", checkbox: true},
         {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "30%"},
-        {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: "70%"}
+        {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: "40%"},
+        {title: '入职时间', field: 'cur_entry_time', visible: true, align: 'center', valign: 'middle', width: "30%"}
     ];
 }