소스 검색

津补贴++

sugangqiang 1 년 전
부모
커밋
00883e526f

+ 114 - 18
app/admin/controller/TalentAllowance.php

@@ -1038,7 +1038,7 @@ class TalentAllowance extends AdminController {
         if ($info["recommendAllowanceType"] == 1) {
             if (count($set) < 6) {
                 //如果全部满足6个月,但是重叠时间不满足6个月,开始检测是否符合交通补贴要求
-                $info["recommendAllowanceType"] == 2;
+                $info["recommendAllowanceType"] = 2;
                 $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "\n社会保险、个税、上年度工作月份交集月份不满足6个月(" . implode(",", $set) . "),无法享受工作津贴(×)";
             } else {
                 //检查连续缴纳月份是否满足6个月
@@ -1057,21 +1057,31 @@ class TalentAllowance extends AdminController {
                     }
                 }
                 if ($count < 6) {
-                    $info["recommendAllowanceType"] == 2;
+                    $info["recommendAllowanceType"] = 2;
                     $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "\n社会保险、个税、上年度工作月份交集月份不满足连续缴纳6个月(" . implode(",", $set) . "),无法享受工作津贴(×)";
                 }
             }
         }
         if ($info["recommendAllowanceType"] == 2) {
             //判断境内工作时间是否大于30天
-            $totalDays = 0;
-            $workmonths = $monthAndDayMap[AllowanceProjectEnum::PROJECT_ATTENDANCE];
-            foreach ($workmonths as $days) {
-                $totalDays += $days;
-            }
-            if ($totalDays < 30) {
-                $info["recommendAllowanceType"] == 3;
-                $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "\n全年在我市工作仅{$totalDays}天,未达到30天,无法享受一次性交通津贴(×)";
+            if ($info["allowanceType"] == 2) {
+                $totalDays = 0;
+                $workmonths = $monthAndDayMap[AllowanceProjectEnum::PROJECT_ATTENDANCE];
+                foreach ($workmonths as $days) {
+                    $totalDays += $days;
+                }
+                if ($totalDays < 30) {
+                    $info["recommendAllowanceType"] = 3;
+                    $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "\n全年在我市工作仅{$totalDays}天,未达到30天,无法享受一次性交通津贴(×)";
+                }
+            } else {
+                if (count($workdaySet) == 0) {
+                    $info["recommendAllowanceType"] = 3;
+                    $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "\n全年在我市工作未达到30天,无法享受一次性交通津贴(×)";
+                } else {
+                    $info["recommendAllowanceType"] = 2;
+                    $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "\n*首选为工作津贴,未录入实际工作天数,需要进一步核实提交的相关附件是否满足全年在我市工作30天";
+                }
             }
         }
         return $set;
@@ -1165,16 +1175,18 @@ class TalentAllowance extends AdminController {
      */
     private function chkMonths($set, &$info, $name, $sort) {
         if ($name == "上年度工作月份") {
-            $tmp = [];
-            foreach ($set as $s) {
-                $_s = explode("=", $s);
-                $month = $_s[0];
-                $days = $_s[1];
-                if ($days > 0) {
-                    $tmp[] = $month;
+            if ($info["allowanceType"] == 2) {
+                $tmp = [];
+                foreach ($set as $s) {
+                    $_s = explode("=", $s);
+                    $month = $_s[0];
+                    $days = $_s[1];
+                    if ($days > 0) {
+                        $tmp[] = $month;
+                    }
                 }
+                $set = $tmp;
             }
-            $set = $tmp;
         }
         if ($info["recommendAllowanceType"] == 1 && (!$set || count($set) < 6)) {
             $info["recommendAllowanceType"] = 2;
@@ -1362,6 +1374,90 @@ class TalentAllowance extends AdminController {
         return new Response(Response::SUCCESS, "不在审核范围内", $res);
     }
 
+    /**
+     *  初始化可修改的项目/附件/合同
+     * */
+    public function findFieldsAndFiles() {
+        $id = $this->request["id"];
+        if (\StrUtil::isEmpOrNull($id)) {
+            return new Response(Response::ERROR, "请选择需要修改的对象");
+        }
+        $info = TalentAllowanceApi::getInfoById($id);
+        if (!$info) {
+            return new Response(Response::ERROR, "系统错误,请联系管理员");
+        }
+        if ($info["checkState"] != AllowanceStateEnum::FIRST_REJECT) {
+            return new Response(Response::ERROR, "只能修改初审驳回的数据");
+        }
+        $res = [];
+        $enterpriseMap = \app\common\model\Enterprise::where("type", $this->user["type"])->column("name", "id");
+        $where = [];
+        $where[] = ["mainId", "=", $id];
+        $where[] = ["isLock", "=", 1];
+        $projectList = \app\common\model\TalentAllowanceProject::where($where)->select()->toArray();
+        $detailList = \app\common\model\TalentAllowancecontractDetail::where("mainId", $id)->select()->toArray();
+
+        foreach ($detailList as &$detail) {
+            $detail["enterpriseName"] = $enterpriseMap[$detail["enterpriseId"]];
+        }unset($detail);
+        foreach ($projectList as &$project) {
+            $detail = $detailMap[$project["baseId"]];
+            $project["projectName"] = sprintf("%s(%s)", AllowanceProjectEnum::getProjectName($project["project"]), $enterpriseMap[$project["enterpriseId"]]);
+        }unset($project);
+
+        $where = [];
+        $where[] = ["type", "=", $info["type"]];
+        $where[] = ["project", "=", \app\common\state\ProjectState::JBT];
+        $where[] = ["active", "=", 1];
+        $where[] = ["delete", "=", 0];
+        $filetypes = Db::table("new_common_filetype")->where($where)->order("sn asc")->select()->toArray();
+        $res["files"] = $filetypes;
+        $res["projects"] = $projectList;
+        $res["concats"] = $detailList;
+        $res["info"] = $info;
+        return new Response(Response::SUCCESS, "", $res);
+    }
+
+    /**
+     * 修改驳回项目/附件/合同
+     * */
+    public function updateFieldsAndFiles() {
+        $data = $this->request->param();
+        if (!$data["id"]) {
+            return new Response(Response::ERROR, "系统错误,请联系管理员");
+        }
+        TaModel::update($data);
+        return new Response(Response::SUCCESS, "修改成功");
+    }
+
+    /**
+     * 修改项目
+     */
+    public function editProject() {
+        $param = $this->request->param();
+        if (!$param["id"]) {
+            return new Response(Response::ERROR, "系统错误,请联系管理员");
+        }
+        $detail = \app\common\model\TalentAllowanceProject::find($param["id"]);
+        $info = TalentAllowanceApi::getInfoById($detail["mainId"]);
+        \app\common\model\TalentAllowanceProject::update($param);
+        //添加日志
+        TalentChecklog::create([
+            'id' => getStringId(),
+            'mainId' => $info['id'],
+            'type' => intval(ProjectState::JBT),
+            'typeFileId' => $param["id"],
+            'active' => 1,
+            'state' => null,
+            'step' => $param["process"],
+            'stateChange' => null,
+            'description' => "修改项目名:" . AllowanceProjectEnum::getProjectName($detail["project"]) . "的值为:" . $param["months"] . ";备注为:" . $param["description"],
+            'createTime' => date("Y-m-d H:i:s", time()),
+            'createUser' => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"])
+        ]);
+        return new Response(Response::SUCCESS, "修改成功");
+    }
+
     /**
      * 查询工作单位
      */

+ 12 - 0
app/admin/view/talent_allowance/public_check.html

@@ -20,6 +20,18 @@
         width:16%;
         padding-top: 10px;
     }
+    .month-selector ul li{
+        list-style: none;
+        display:inline-block;
+        float:left;
+        margin:0 3px 0 0;
+    }
+    .day-selector ul li{
+        list-style: none;
+        display:inline-block;
+        float:left;
+        margin:0 3px 0 0;
+    }
     #field ul li{
         width:33%;
         padding-top: 5px;

+ 41 - 5
app/common.php

@@ -107,11 +107,34 @@ function export($columns, $rows, $filename = "jjrcw", $settings = [], $sheetname
     $filename .= "_" . time();
     $titleStartLine = 1;
     $rowStartLine = $titleStartLine + 1;
-    $colCount = count($columns);
+    $colCount = 0;
     $rowCount = count($rows);
     //设置表头
-    for ($i = 0; $i < $colCount; $i++) {
-        $objPHPExcel->setCellValue(getExcelColumnByIndex($i) . $titleStartLine, $columns[$i]);
+    for ($i = 0; $i < count($columns); $i++) {
+        if (is_array($columns[$i])) {
+            if (is_int($columns[$i][1][0])) {
+                $merge_x = $columns[$i][1][0];
+                $merge_y = $columns[$i][1][1];
+                $rowStartLine = $rowStartLine > $merge_y ? $rowStartLine : $merge_y;
+                $objPHPExcel->mergeCells(sprintf("%s:%s", getExcelColumnByIndex($colCount) . $titleStartLine, getExcelColumnByIndex($colCount + $merge_x - 1) . ($titleStartLine + $merge_y - 1)));
+                $objPHPExcel->setCellValue(getExcelColumnByIndex($colCount) . ($titleStartLine), $columns[$i][0]);
+
+                $colCount += $columns[$i][1][0];
+            } else {
+                $rowStartLine = $rowStartLine > 2 ? $rowStartLine : 2;
+                $child_titles = $columns[$i][1];
+                $child_count = count($child_titles);
+                $objPHPExcel->mergeCells(sprintf("%s:%s", getExcelColumnByIndex($colCount) . $titleStartLine, getExcelColumnByIndex($colCount + $child_count - 1) . $titleStartLine));
+                $objPHPExcel->setCellValue(getExcelColumnByIndex($colCount) . $titleStartLine, $columns[$i][0]);
+                for ($n = 0; $n < $child_count; $n++) {
+                    $objPHPExcel->setCellValue(getExcelColumnByIndex($colCount + $n) . ($titleStartLine + 1), $child_titles[$n]);
+                }
+                $colCount += $child_count;
+            }
+        } else {
+            $objPHPExcel->setCellValue(getExcelColumnByIndex($i) . $titleStartLine, $columns[$i]);
+            $colCount = count($columns);
+        }
     }
     $formatString = []; //需要文本处理的列
     //设置正文内容
@@ -146,12 +169,25 @@ function export($columns, $rows, $filename = "jjrcw", $settings = [], $sheetname
         switch ($type) {
             case "width":
                 for ($i = 0; $i < count($cfg); $i++) {
-                    $objPHPExcel->getColumnDimension($cfg[$i][0])->setWidth($cfg[$i][1]);
+                    if (is_array($cfg[$i])) {
+                        $objPHPExcel->getColumnDimension($cfg[$i][0])->setWidth($cfg[$i][1]);
+                    } else if (is_numeric($cfg[$i])) {
+                        for ($n = 0; $n < $colCount; $n++) {
+                            $column = getExcelColumnByIndex($n);
+                            $objPHPExcel->getColumnDimension($column)->setWidth($cfg[$i]);
+                        }
+                    }
                 }
                 break;
             case "height":
                 for ($i = 0; $i < count($cfg); $i++) {
-                    $objPHPExcel->getRowDimension($cfg[$i][0])->setRowHeight($cfg[$i][1]);
+                    if (is_array($cfg[$i])) {
+                        $objPHPExcel->getRowDimension($cfg[$i][0])->setRowHeight($cfg[$i][1]);
+                    } else if (is_numeric($cfg[$i])) {
+                        for ($n = 1; $n <= ($colCount + $rowCount); $n++) {
+                            $objPHPExcel->getRowDimension($n)->setRowHeight($cfg[$i]);
+                        }
+                    }
                 }
                 break;
             case "background-color":

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

@@ -626,6 +626,35 @@ class TalentAllowance extends EnterpriseController {
             $response->msg = "不能重复提交审核";
             return $response;
         }
+        if (!$old["allowanceType"]) {
+            $response->msg = "没有明确津贴类型";
+            return $response;
+        }
+        //因为工作津贴和交通补贴两者的考勤分别记录的是月份和天数,如果没有手动修改值会导致数据不对口,如修改类型却未修改考勤记录,则手动改为空。
+        $where = [];
+        $where[] = ["project", "=", AllowanceProjectEnum::PROJECT_ATTENDANCE];
+        $where[] = ["mainId", "=", $data["id"]];
+        $attendanceList = \app\common\model\TalentAllowanceProject::where($where)->select()->toArray();
+        if ($old["allowanceType"] == \app\common\state\AllowanceTypeEnum::JBT_JT) {
+            //因为天数保存格式为 月份=天数 如 01=31,02=20,03=15,月份保存格式为01,02,03,所以可以从有没有=号判断是否有进行考勤的修改保存操作
+            foreach ($attendanceList as $a) {
+                //$a["months"]有值但是没有包含=号则一般可认为是类型修改为交通补贴而未修改考勤,此时的months字段数据是错误的,修改为空。
+                if ($a["months"] && strpos($a["months"], "=") === false) {
+                    $_updProject["id"] = $a["id"];
+                    $_updProject["months"] = "";
+                    \app\common\model\TalentAllowanceProject::update($_updProject);
+                }
+            }
+        } else {
+            foreach ($attendanceList as $a) {
+                //$a["months"]有值但是包含了=号则一般可认为是类型修改为工作津贴而未修改考勤,此时的months字段数据是错误的,修改为空。
+                if ($a["months"] && strpos($a["months"], "=") !== false) {
+                    $_updProject["id"] = $a["id"];
+                    $_updProject["months"] = "";
+                    \app\common\model\TalentAllowanceProject::update($_updProject);
+                }
+            }
+        }
         $where = [];
         $where[] = ["type", "=", $old["type"]];
         $where[] = ["project", "=", ProjectState::JBT];
@@ -824,4 +853,72 @@ class TalentAllowance extends EnterpriseController {
         return new Response(Response::SUCCESS, "", ["rows" => $res, "total" => count($res)]);
     }
 
+    public function export() {
+        $obj["year"] = \StrUtil::getRequestDecodeParam($this->request, "year");
+        $obj["name"] = \StrUtil::getRequestDecodeParam($this->request, "name");
+        $obj["talentArrange"] = \StrUtil::getRequestDecodeParam($this->request, "talentArrange");
+        $obj["address"] = \StrUtil::getRequestDecodeParam($this->request, "address");
+        $obj["identifyCondition"] = \StrUtil::getRequestDecodeParam($this->request, "identifyCondition");
+        $where = [];
+        $where[] = ["ta.enterpriseId", "=", $this->user["uid"]];
+        if (\StrUtil::isNotEmpAndNull($obj["year"])) {
+            $where[] = ["ta.year", "like", "%" . $obj["year"] . "%"];
+        }
+        if (\StrUtil::isNotEmpAndNull($obj["name"])) {
+            $where[] = ["ta.name", "like", "%" . $obj["name"] . "%"];
+        }
+        if (\StrUtil::isNotEmpAndNull($obj["talentArrange"])) {
+            $where[] = ["ta.talentArrange", "=", $obj["talentArrange"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($obj["address"])) {
+            $where[] = ["ta.address", "=", $obj["address"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($obj["identifyCondition"])) {
+            $where[] = ["ta.identifyCondition", "=", $obj["identifyCondition"]];
+        }
+        $projects = [
+            AllowanceProjectEnum::PROJECT_TAX,
+            AllowanceProjectEnum::PROJECT_WAGES,
+            AllowanceProjectEnum::PROJECT_ATTENDANCE,
+            AllowanceProjectEnum::PROJECT_SB_PENSION,
+            AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT,
+            AllowanceProjectEnum::PROJECT_SB_MEDICA,
+        ];
+        $months = [];
+        for ($m = 1; $m <= 12; $m++) {
+            $months[] = $m . "月";
+        }
+        $columns = [["年度", [1, 2]], ["所属镇街", [1, 2]], ["姓名", [1, 2]], ["性别", [1, 2]], ["证件号码", [1, 2]], ["人才层次", [1, 2]], ["认定条件", [1, 2]], ["认定条件取得时间", [1, 2]], ["认定条件名称", [1, 2]], ["公布入选月份", [1, 2]], ["津补贴类型", [1, 2]], ["兑现月份", [1, 2]], ["兑现金额", [1, 2]], ["金额说明", [1, 2]], ["审核状态", [1, 2]], ["缴纳单位", [1, 2]]];
+        $infoCols = count($columns);
+        for ($i = 0; $i < count($projects); $i++) {
+            $columns[] = [AllowanceProjectEnum::getProjectName($projects[$i]), $months];
+        }
+        $list = \app\common\model\TalentAllowanceProject::alias("pro")
+                        ->field("ta.id,ta.year,ta.enterpriseId as curEnterpriseId,ta.address,ta.name,ta.sex,ta.idCard,ta.talentArrange,ta.identifyCondition,ta.identifyConditionName,ta.identifyMonth,ta.allowanceType,ta.months,ta.money,ta.moneyDesc,ta.checkState,pro.months as pre_months,con.enterpriseId,con.startTime,con.endTime,con.entryTime,con.quitTime,con.isQuit")
+                        ->leftJoin("un_talent_allowance_info ta", "ta.id=pro.mainId")
+                        ->leftJoin("un_talent_allowancecontract_detail con", "pro.baseId=con.id")
+                        ->where($where)
+                        ->order("ta.year desc,ta.createTime desc,pro.project asc")
+                        ->select()->toArray();
+        $tmpList = [];
+        foreach ($list as $item) {
+            
+        }
+        $cols = $infoCols + count($projects) * 12 - 1;
+        $settings = [
+            "background-color" => [[sprintf("A1:%s1", getExcelColumnByIndex($cols)), "0066CC"]],
+            "color" => [[sprintf("A1:%s1", getExcelColumnByIndex($cols)), "FFFFFF"]],
+            "border" => sprintf("A1:%s%d", getExcelColumnByIndex($cols), 2),
+            "wrap" => [sprintf("A2:%s%d", getExcelColumnByIndex($cols), 2)],
+            "align" => [[sprintf("A1:%s%d", getExcelColumnByIndex($cols), 2), "hCenter"], [sprintf("A1:%s%d", getExcelColumnByIndex($cols - 1), 2), "vCenter"]],
+            "height" => [18],
+            "freeze" => "D1"
+        ];
+        for ($i = 0; $i < count($projects) * 12; $i++) {
+            $settings["width"][] = [getExcelColumnByIndex($infoCols + $i), 6]; //批设置项目的宽度
+        }
+        $settings["background-color"][] = [sprintf("%s2:%s2", getExcelColumnByIndex($infoCols), getExcelColumnByIndex($cols)), "E1F1DE"];
+        export($columns, [], "津补贴申报名单", $settings);
+    }
+
 }

+ 4 - 9
app/enterprise/view/talent_allowance/indexIC.html

@@ -27,15 +27,6 @@
                                     <input type="text" class="form-control" id="year" 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="enterpriseName" placeholder="">
-                                </div>
-                            </div>
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">
                                     <div class="input-group-btn">
@@ -103,6 +94,9 @@
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.showCheckFileModal()">
                                 <i class="fa fa-upload"></i>&nbsp;上传通用附件
                             </button>
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.export()">
+                                <i class="fa fa-file-excel-o"></i>&nbsp;导出
+                            </button>
                             <!--<button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.openTalentAllowanceInfoSupple()">
                                 <i class="fa fa-upload"></i>&nbsp;补件(公示期)
                             </button>-->
@@ -180,6 +174,7 @@
         </div>
     </div>
 </div>
+<iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
 <!--<script src="${ctxPath}/static/modular/gate/talentAllowance/ic/talentAllowanceInfoIC.js"></script>-->
 <script type="text/javascript">
     document.write('<script src="/static/modular/gate/talentAllowance/ic/talentAllowanceInfoIC.js?v=' + (new Date()).getTime() + '"><\/script>');

+ 17 - 3
public/static/modular/gate/talentAllowance/ic/talentAllowanceInfoIC.js

@@ -15,7 +15,6 @@ TalentAllowanceInfo.initColumn = function () {
     return [
         {field: 'selectItem', radio: true},
         {title: '年度', field: 'year', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "60px"},
-        {title: '单位名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
         {title: '所属镇街', field: 'addressName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
         {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
         {title: '性别', field: 'sex', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "60px",
@@ -166,11 +165,16 @@ TalentAllowanceInfo.openTalentAllowanceInfoDetail = function () {
                     fix: false, //不固定
                     maxmin: true,
                     content: Feng.ctxPath + '/enterprise/talentAllowance/apply/id/' + TalentAllowanceInfo.seItem.id,
-                    btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
+                    btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-check"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
                     btnAlign: 'c',
-                    yes: function (index, layero) {
+                    btn1: function (index, layero) {
+                        var obj = layero.find("iframe")[0].contentWindow;
+                        obj.TalentAllowanceInfoDlg.editSubmit();
+                    },
+                    btn2: function (index, layero) {
                         var obj = layero.find("iframe")[0].contentWindow;
                         obj.TalentAllowanceInfoDlg.submitToCheck();
+                        return false;
                     },
                     success: function (layero, index) {
                         layer.tips('添加基本信息并上传附件后点击', '.layui-layer-btn0', {tips: [1, "#78BA32"], time: 0, closeBtn: 2});
@@ -526,6 +530,16 @@ TalentAllowanceInfo.deleteCheckFile = function (id, type) {
     Feng.confirm("删除后无法恢复,确认删除吗?", operation);
 }
 
+
+/**
+ * 导出基础信息
+ */
+TalentAllowanceInfo.export = function () {
+    var queryData = TalentAllowanceInfo.formParams();
+    var url = Feng.setUrlParam(Feng.ctxPath + "/enterprise/talentAllowance/export", queryData);
+    window.hiddenIframe.location.href = url;
+}
+
 /**
  * 显示审核日志
  */

+ 19 - 5
public/static/modular/talentAllowance/talentAllowanceInfo.js

@@ -395,7 +395,8 @@ TalentAllowanceInfo.updateFieldsAndFiles = function () {
                             '                        </div>\n' +
                             '                        <label for="field_project" class="control-label">可修改字段</label>\n' +
                             '                        <div id="field_field">\n' +
-                            '                           <ul><li style="width: 100%"><input type="checkbox" value="wage"><span>上一年度年薪(元)</span></li></ul>' +
+                            '                           <ul><li style="width: 100%"><input type="checkbox" id="typeChange" class="icheckbox" value="allowanceType"><span>津补贴类型</span></li></ul>\n' +
+                            '                           <!--<ul><li style="width: 100%"><input type="checkbox" value="wage"><span>上一年度年薪(元)</span></li></ul>-->' +
                             '                        </div>\n' +
                             '                        <label for="field_project" class="control-label">可修改项目</label>\n' +
                             '                        <div id="field_project">\n' +
@@ -419,7 +420,7 @@ TalentAllowanceInfo.updateFieldsAndFiles = function () {
                         var files = data.obj.info.files;
                         var projects = data.obj.info.projects;
                         var concats = data.obj.info.concats;
-                        var fields = data.obj.fields;
+                        var fields = data.obj.info.fields;
                         //初始化附件、核查项目、合同
                         if (projectList != null && projectList.length != 0) {
                             var html = '<ul>';
@@ -432,7 +433,7 @@ TalentAllowanceInfo.updateFieldsAndFiles = function () {
                         if (fileList != null && fileList.length != 0) {
                             var html = '';
                             for (var key in fileList) {
-                                html = html + '<ul><li style="width: 100%"><input type="checkbox" class="icheckbox" value="' + fileList[key].id + '"><span>' + fileList[key].name + '</span></li></ul>';
+                                html = html + '<ul><li style="width: 100%"><input type="checkbox" class="icheckbox" data-type="' + fileList[key].isConditionFile + '" value="' + fileList[key].id + '"><span>' + fileList[key].name + '</span></li></ul>';
                             }
                             $("#field_file").empty().append(html);
                         }
@@ -465,9 +466,22 @@ TalentAllowanceInfo.updateFieldsAndFiles = function () {
                                 }
                             });
                         }
-                        if (Feng.isNotEmptyStr(fields) && fields == "wage") {
-                            $("#field_field ul input[value='wage']").iCheck("check");
+                        if (Feng.isNotEmptyStr(fields)) {
+                            $("#field_field input").each(function () {
+                                if (fields.indexOf($(this).val()) != -1) {
+                                    $(this).iCheck("check");
+                                }
+                            });
                         }
+                        $("input[type=checkbox][value=allowanceType]").on("ifChanged", function (e) {
+                            var isChecked = $(this).is(":checked") ? "check" : "uncheck";
+                            $("#field_file input").each(function () {
+                                $(this).iCheck(isChecked);
+                            })
+                            $("#field_project input").each(function () {
+                                $(this).iCheck(isChecked);
+                            })
+                        })
                     },
                     yes: function (index, layero) {
                         var projects = '', files = '', concats = '', fields = '';

+ 26 - 17
public/static/modular/talentAllowance/talentAllowanceInfo_info.js

@@ -541,7 +541,7 @@ TalentAllowanceInfoDlg.showCheckModal = function () {
                     if (fileList != null && fileList.length != 0) {
                         var html = '';
                         for (var key in fileList) {
-                            html = html + '<ul><li style="width: 100%"><input type="checkbox" value="' + fileList[key].id + '"><span>' + fileList[key].name + '</span></li></ul>';
+                            html = html + '<ul><li style="width: 100%"><input type="checkbox" data-type="' + fileList[key].isConditionFile + '" value="' + fileList[key].id + '"><span>' + fileList[key].name + '</span></li></ul>';
                         }
                         $("#field_file").empty().append(html);
                     }
@@ -587,6 +587,15 @@ TalentAllowanceInfoDlg.showCheckModal = function () {
                             }
                         });
                     }
+                    $("input[type=checkbox][value=allowanceType]").on("ifChanged", function (e) {
+                        var isChecked = $(this).is(":checked") ? "check" : "uncheck";
+                        $("#field_file input").each(function () {
+                            $(this).iCheck(isChecked);
+                        })
+                        $("#field_project input").each(function () {
+                            $(this).iCheck(isChecked);
+                        })
+                    })
                 },
                 yes: function (index, layero) {
                     TalentAllowanceInfoDlg.checkSubmit(index);
@@ -712,22 +721,22 @@ TalentAllowanceInfoDlg.checkSubmit = function (index) {
         return;
     }
     /*if (process == 3 && checkState == 2) {
-        var toProcess = $("#toProcess").val();
-        if (Feng.isEmptyStr(toProcess)) {
-            Feng.info("请选择驳回至流程");
-            return;
-        }
-        if (toProcess == 1) {
-            var toDep = $("#toDep").val();
-            for (var key in toDep) {
-                companyCodes = companyCodes + toDep[key] + ",";
-            }
-            if (Feng.isEmptyStr(companyCodes)) {
-                Feng.info("请选择驳回单位");
-                return;
-            }
-        }
-    }*/
+     var toProcess = $("#toProcess").val();
+     if (Feng.isEmptyStr(toProcess)) {
+     Feng.info("请选择驳回至流程");
+     return;
+     }
+     if (toProcess == 1) {
+     var toDep = $("#toDep").val();
+     for (var key in toDep) {
+     companyCodes = companyCodes + toDep[key] + ",";
+     }
+     if (Feng.isEmptyStr(companyCodes)) {
+     Feng.info("请选择驳回单位");
+     return;
+     }
+     }
+     }*/
     var projects = '', files = '', concats = '', fields = "";
     if (process == 1) {
         $("#field_project li input").each(function (index) {

+ 2 - 2
public/static/modular/talentAllowance/talentAllowanceInfo_info_supple.js

@@ -475,8 +475,8 @@ TalentAllowanceInfoDlg.createCheckHtml = function () {
                     '</div>\n' +
                     '<label for="field_project" class="control-label">可修改字段</label>\n' +
                     '<div id="field_field">\n' +
-                    '<ul><li style="width: 100%"><input type="checkbox" value="allowanceType"><span>津补贴类型</span></li>\n' +
-                    '<li style="width: 100%"><input type="checkbox" value="wage"><span>上一年度年薪(元)</span></li></ul>\n' +
+                    '<ul><li style="width: 100%"><input type="checkbox" value="allowanceType"><span>津补贴类型</span></li></ul>\n' +
+                    '<!--<li style="width: 100%"><input type="checkbox" value="wage"><span>上一年度年薪(元)</span></li>--></ul>\n' +
                     '</div>\n';
             //}
             html = html +

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 357 - 306
public/static/modular/talentAllowance/talentAllowanceInfo_public_check.js


+ 1 - 1
public/static/modular/talentAllowance/talentAllowanceInfo_supple.js

@@ -502,7 +502,7 @@ TalentAllowanceInfoSupple.createFourIC = function(process){
                 if(value==5)return "<span class='label label-primary'>已兑现</span>";
             }
         },
-        {title: '是否补件', field: 'isSupple', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"80px",
+        {title: '是否补件', field: 'isSupple', visible: false, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"80px",
             formatter(value,row,index){
                 if(value==1){
                     return '<span style="color:#6495ED">是</span>';

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.