sugangqiang hace 1 año
padre
commit
f5ed790e3d

+ 5 - 5
app/admin/controller/TalentAllowance.php

@@ -939,7 +939,7 @@ class TalentAllowance extends AdminController {
     public function exportBasicInfo() {
         $obj["year"] = \StrUtil::getRequestDecodeParam($this->request, "year");
         $obj["enterpriseName"] = \StrUtil::getRequestDecodeParam($this->request, "enterpriseName");
-        $obj["name"]= \StrUtil::getRequestDecodeParam($this->request, "name");
+        $obj["name"] = \StrUtil::getRequestDecodeParam($this->request, "name");
         $obj["idCard"] = \StrUtil::getRequestDecodeParam($this->request, "idCard");
         $obj["talentType"] = \StrUtil::getRequestDecodeParam($this->request, "talentType");
         $obj["talentArrange"] = \StrUtil::getRequestDecodeParam($this->request, "talentArrange");
@@ -1022,7 +1022,7 @@ class TalentAllowance extends AdminController {
     private function valideAllowanceType(&$info, $projectList, $monthMap, $monthAndDayMap) {
         $set = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
         /*         * 2.判定工作月份、五险和个税是否满足重叠6个月要求* */
-        $workdaySet = $this->chkMonths($monthMap[AllowanceProjectEnum::PROJECT_WORKDAY], $info, "上年度工作月份", "①");
+        $workdaySet = $this->chkMonths($monthMap[AllowanceProjectEnum::PROJECT_ATTENDANCE], $info, "上年度工作月份", "①");
         $pensionSet = $this->chkMonths($monthMap[AllowanceProjectEnum::PROJECT_SB_PENSION], $info, "养老保险", "②");
         $unemploymentSet = $this->chkMonths($monthMap[AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT], $info, "失业保险", "③");
         $medicaSet = $this->chkMonths($monthMap[AllowanceProjectEnum::PROJECT_SB_MEDICA], $info, "医疗保险", "④");
@@ -1065,7 +1065,7 @@ class TalentAllowance extends AdminController {
         if ($info["recommendAllowanceType"] == 2) {
             //判断境内工作时间是否大于30天
             $totalDays = 0;
-            $workmonths = $monthAndDayMap[AllowanceProjectEnum::PROJECT_WORKDAY];
+            $workmonths = $monthAndDayMap[AllowanceProjectEnum::PROJECT_ATTENDANCE];
             foreach ($workmonths as $days) {
                 $totalDays += $days;
             }
@@ -1396,14 +1396,14 @@ class TalentAllowance extends AdminController {
             $project["projectName"] = AllowanceProjectEnum::getProjectName($project["project"]);
             if ($info["checkState"] == 1) {
                 $project["isEdit"] = in_array($project["project"], [
-                            AllowanceProjectEnum::PROJECT_CONTRACT,
+                            //AllowanceProjectEnum::PROJECT_CONTRACT,
                             AllowanceProjectEnum::PROJECT_TAX,
                             AllowanceProjectEnum::PROJECT_WAGES,
                             AllowanceProjectEnum::PROJECT_ATTENDANCE,
                             AllowanceProjectEnum::PROJECT_SB_PENSION,
                             AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT,
                             AllowanceProjectEnum::PROJECT_SB_MEDICA,
-                            AllowanceProjectEnum::PROJECT_WORKDAY
+                                //AllowanceProjectEnum::PROJECT_WORKDAY
                         ]) ? 1 : 2;
             } else if ($info["checkState"] == 10) {
                 $projects = explode(",", $info["projects"]);

+ 1 - 1
app/admin/view/talent_allowance/info.html

@@ -202,7 +202,7 @@
                                                         <input type="text" class="form-control" readonly="readonly" id="identifyGetTime" name="identifyGetTime" value="{$row.identifyGetTime}"/>
                                                     </div>
                                                 </div>
-                                                <div class="rowGroup" id="wageDiv" {if condition="$row['allowanceType' neq 1]"}style="display:none;"{/if}>
+                                                <div class="rowGroup" id="wageDiv" style="display:none;">
                                                     <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>上一年度年薪(元)</label>
                                                     <div class="col-sm-2 spacing">
                                                         <input type="text" class="form-control" id="wage" readonly="readonly" placeholder="正常工资薪金、一次性奖金收入" name="wage" value="{$row.wage}"/>

+ 1 - 1
app/admin/view/talent_allowance/public_check.html

@@ -209,7 +209,7 @@
                                                         <input type="text" class="form-control" readonly="readonly" id="identifyGetTime" name="identifyGetTime" value="{$row.identifyGetTime}"/>
                                                     </div>
                                                 </div>
-                                                <div class="rowGroup" id="wageDiv" {if condition="$row['allowanceType' neq 1]"}style="display:none;"{/if}>
+                                                <div class="rowGroup" id="wageDiv" style="display:none;">
                                                     <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>上一年度年薪(元)</label>
                                                     <div class="col-sm-2 spacing">
                                                         <input type="text" class="form-control" readonly="readonly" id="wage" placeholder="正常工资薪金、一次性奖金收入" name="wage" value="{$row.wage}"/>

+ 1 - 1
app/admin/view/talent_allowance/select.html

@@ -200,7 +200,7 @@
                                                         <input type="text" class="form-control" readonly="readonly" id="identifyGetTime" name="identifyGetTime" value="{$row.identifyGetTime}"/>
                                                     </div>
                                                 </div>
-                                                <div class="rowGroup" id="wageDiv" {if condition="$row['allowanceType' neq 1]"}style="display:none;"{/if}>
+                                                <div class="rowGroup" id="wageDiv" style="display:none;">
                                                     <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>上一年度年薪(元)</label>
                                                     <div class="col-sm-2 spacing">
                                                         <input type="text" class="form-control" readonly="readonly" id="wage" placeholder="正常工资薪金、一次性奖金收入" name="wage" value="{$row.wage}"/>

+ 6 - 0
app/common/controller/Batch.php

@@ -20,4 +20,10 @@ class Batch extends BaseController {
         return json(BatchApi::checkBatchValid($this->request->param(), $user["type"]));
     }
 
+    public function listBatchByType() {
+        $projectType = $this->request["type"];
+        $talentType = $this->request["source"];
+        return json(BatchApi::getValidBatchs($projectType, $talentType));
+    }
+
 }

+ 9 - 14
app/enterprise/controller/TalentAllowance.php

@@ -19,6 +19,7 @@ use app\common\model\TalentAllowance as TaModel;
 use app\common\state\AllowanceProjectEnum;
 use app\common\model\TalentChecklog;
 use think\facade\Db;
+use app\common\api\Response;
 
 /**
  * Description of TalentAllowance
@@ -366,14 +367,14 @@ class TalentAllowance extends EnterpriseController {
     private function createAllowanceProject($info, $contractList) {
         foreach ($contractList as $detail) {
             $projects = [
-                AllowanceProjectEnum::PROJECT_CONTRACT,
+                //AllowanceProjectEnum::PROJECT_CONTRACT,
                 AllowanceProjectEnum::PROJECT_TAX,
                 AllowanceProjectEnum::PROJECT_WAGES,
                 AllowanceProjectEnum::PROJECT_ATTENDANCE,
                 AllowanceProjectEnum::PROJECT_SB_PENSION,
                 AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT,
                 AllowanceProjectEnum::PROJECT_SB_MEDICA,
-                AllowanceProjectEnum::PROJECT_WORKDAY,
+                    //AllowanceProjectEnum::PROJECT_WORKDAY,
             ];
             $list = [];
             foreach ($projects as $project) {
@@ -424,14 +425,14 @@ class TalentAllowance extends EnterpriseController {
             $project["projectName"] = AllowanceProjectEnum::getProjectName($project["project"]);
             if ($info["checkState"] == 1) {
                 $project["isEdit"] = in_array($project["project"], [
-                            AllowanceProjectEnum::PROJECT_CONTRACT,
+                            //AllowanceProjectEnum::PROJECT_CONTRACT,
                             AllowanceProjectEnum::PROJECT_TAX,
                             AllowanceProjectEnum::PROJECT_WAGES,
                             AllowanceProjectEnum::PROJECT_ATTENDANCE,
                             AllowanceProjectEnum::PROJECT_SB_PENSION,
                             AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT,
                             AllowanceProjectEnum::PROJECT_SB_MEDICA,
-                            AllowanceProjectEnum::PROJECT_WORKDAY
+                                //AllowanceProjectEnum::PROJECT_WORKDAY
                         ]) ? 1 : 2;
             } else if ($info["checkState"] == 10) {
                 $projects = explode(",", $info["projects"]);
@@ -546,8 +547,6 @@ class TalentAllowance extends EnterpriseController {
     public function validateIsEdit() {
         $id = $this->request["id"];
         $type = $this->request["type"];
-        $response = new \stdClass();
-        $response->code = 500;
         $info = null;
         if ($type == 1) {                //编辑合同
             $detail = \app\common\model\TalentAllowancecontractDetail::find($id);
@@ -557,18 +556,14 @@ class TalentAllowance extends EnterpriseController {
         $info = TalentAllowanceApi::getInfoById($detail["mainId"]);
         if ($info["checkState"] != 1 && $info["checkState"] != 10) {
             if ($info["checkState"] == -1) {
-                $response->msg = "您的申报审核不通过,无法操作";
-                return $response;
+                return new Response(Response::ERROR, "您的申报审核不通过,无法操作");
             } else if ($info["checkState"] == 30) {
-                $response->msg = "您的申报已审核通过,无法操作";
-                return $response;
+                return new Response(Response::ERROR, "您的申报已审核通过,无法操作");
             } else {
-                $response->msg = "您的申报正在审核中,请耐心等待";
-                return $response;
+                return new Response(Response::ERROR, "您的申报正在审核中,请耐心等待");
             }
         }
-        $response->code = 200;
-        return $response;
+        return new Response(Response::SUCCESS, "");
     }
 
     /**

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

@@ -17,6 +17,7 @@
                 <div class="row row-lg">
                     <div class="col-sm-12">
                         <div class="row">
+                            <input type="text" class="form-control" id="type" value="{$type}">
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">
                                     <div class="input-group-btn">
@@ -96,6 +97,12 @@
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.openTalentAllowanceInfoSelect()">
                                 <i class="fa fa-book"></i>&nbsp;查看
                             </button>
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.openTalentAllowanceInfoSelect()">
+                                <i class="fa fa-plus"></i>&nbsp;批量申请津补贴
+                            </button>
+                            <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.openTalentAllowanceInfoSupple()">
                                 <i class="fa fa-upload"></i>&nbsp;补件(公示期)
                             </button>-->
@@ -113,6 +120,45 @@
         </div>
     </div>
 </div>
+
+<div class="modal fade " id="checkFileModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
+    <div class="modal-dialog modal-lg" role="document" style="min-width: 1000px;">
+        <div class="modal-content animated flipInY">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                <h4 class="modal-title" id="checkFileModalLabel">通用附件上传</h4>
+            </div>
+            <div class="modal-body">
+                <div class="row row-lg">
+                    <div class="col-sm-12">
+                        <form class="form-horizontal" style="padding-bottom: 5px;">
+                            <div class="form-group-sm ">
+                                <div class="row">
+                                    <div class="rowGroup">
+                                        <label class="col-sm-2 control-label">申报批次</label>
+                                        <div class="col-sm-6 spacing">
+                                            <select  class="form-control input-sm"  id="batch" name="batch" onchange="TalentAllowanceInfo.initCheckFileTable()">
+                                            </select>
+                                        </div>
+                                    </div>
+                                    <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.checkFileUpload()">
+                                        <i class="fa fa-upload"></i>&nbsp;上传
+                                    </button>
+                                </div>
+                            </div>
+                        </form>
+                        <input type='file'  multiple id="upload_file" name="fileUrl" style='display: none'>
+                        <table id="checkFileTable">
+                        </table>
+                    </div>
+                </div>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
+            </div>
+        </div>
+    </div>
+</div>
 <!--<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>');

+ 1 - 1
public/static/modular/gate/talentAllowance/common/talentAllowanceInfo_select.js

@@ -342,7 +342,7 @@ $(function() {
         $("#bankNumberSpan,#talentTypeSpan,#introductionModeSpan,#firstInJJTimeSpan").attr("style","display:none");
     }
     if ($("#allowanceType").val() == 1) {
-        $("#wageDiv").css("display", "block");
+        //$("#wageDiv").css("display", "block");
     }
     //批量加载时间控件
     $(".date").each(function(){

+ 36 - 36
public/static/modular/gate/talentAllowance/common/talentAllowance_info.js

@@ -12,7 +12,7 @@ var TalentAllowanceInfoDlg = {
                     message: "请填写上一年度年薪",
                     callback: function (value, validator) {
                         if ($("#allowanceType").val() == 1 && $("#wage").val().trim().length == 0) {
-                            return false;
+                            //return false;
                         }
                         return true;
                     }
@@ -78,7 +78,7 @@ TalentAllowanceInfoDlg.validate = function () {
 TalentAllowanceInfoDlg.onAllowanceTypeChange = function (allowanceType) {
     $("#wageDiv").val("");
     if (allowanceType == 1) {
-        $("#wageDiv").css("display", "block");
+        //$("#wageDiv").css("display", "block");
     } else {
         $("#wageDiv").css("display", "none");
     }
@@ -133,17 +133,17 @@ TalentAllowanceInfoDlg.addSubmit = function () {
         TalentAllowanceInfoDlg.editSubmit();
         return;
     }
-    var allowanceType = $("#allowanceType").val();
-    if (allowanceType == 1) {
-        if (Feng.isEmptyStr(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
-            Feng.info("请填写上一年度年薪");
-            return;
-        }
-        if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
-            Feng.info("上一年度年薪格式不合法,无需填写单位元");
-            return;
-        }
-    }
+    /*var allowanceType = $("#allowanceType").val();
+     if (allowanceType == 1) {
+     if (Feng.isEmptyStr(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
+     Feng.info("请填写上一年度年薪");
+     return;
+     }
+     if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
+     Feng.info("上一年度年薪格式不合法,无需填写单位元");
+     return;
+     }
+     }*/
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/enterprise/talentAllowance/apply", function (data) {
             if (data.code == 200) {
@@ -172,17 +172,17 @@ TalentAllowanceInfoDlg.editSubmit = function () {
     }
     if (!TalentAllowanceInfoDlg.validateIsEdit())
         return;
-    var active = $("#active").val();
-    if (active == 2) {
-        if (Feng.isEmptyStr(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
-            Feng.info("请填写上一年度年薪");
-            return;
-        }
-        if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
-            Feng.info("上一年度年薪格式不合法,无需填写单位元");
-            return;
-        }
-    }
+    /*var active = $("#active").val();
+     if (active == 2) {
+     if (Feng.isEmptyStr(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
+     Feng.info("请填写上一年度年薪");
+     return;
+     }
+     if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
+     Feng.info("上一年度年薪格式不合法,无需填写单位元");
+     return;
+     }
+     }*/
     var ajax = new $ax(Feng.ctxPath + "/enterprise/talentAllowance/apply", function (data) {
         if (data.code == 200) {
             Feng.success(data.msg);
@@ -673,17 +673,17 @@ TalentAllowanceInfoDlg.submitToCheck = function () {
     TalentAllowanceInfoDlg.collectData();
     if (!TalentAllowanceInfoDlg.validateIsEdit())
         return;
-    var active = $("#active").val();
-    if (active == 2) {
-        if (Feng.isEmptyStr(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
-            Feng.info("请填写上一年度年薪");
-            return;
-        }
-        if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
-            Feng.info("上一年度年薪格式不合法,无需填写单位元");
-            return;
-        }
-    }
+    /*var active = $("#active").val();
+     if (active == 2) {
+     if (Feng.isEmptyStr(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
+     Feng.info("请填写上一年度年薪");
+     return;
+     }
+     if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(TalentAllowanceInfoDlg.talentAllowanceData.wage)) {
+     Feng.info("上一年度年薪格式不合法,无需填写单位元");
+     return;
+     }
+     }*/
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/enterprise/talentAllowance/submitToCheck", function (data) {
             if (data.code == 200) {
@@ -768,7 +768,7 @@ $(function () {
         $(this).val($(this).attr("value"));
     });
     if ($("#allowanceType").val() == 1) {
-        $("#wageDiv").css("display", "block");
+        //$("#wageDiv").css("display", "block");
     }
     //设置禁止字段
     var checkState = $("#checkState").val();

+ 1 - 1
public/static/modular/gate/talentAllowance/common/talentAllowance_info_supple.js

@@ -101,7 +101,7 @@ TalentAllowanceInfoDlg.initProjectColumns = function () {
             formatter : function(value,row,index){
                 var butHtml = "";
                 if(row.isEdit == 1){
-                    butHtml = butHtml + "<button type='button' data-value='"+row.description+"' onclick=\"TalentAllowanceInfoDlg.showEditProjectModal('"+row.project+"','"+row.id+"','"+row.enterpriseId+"','"+row.months+"','"+row.days+"',this)\" style='margin-left: 5px' class=\"btn btn-xs btn-danger tips\">" +
+                    butHtml = butHtml + "<button type='button' data-value='"+(row.description?row.description:"")+"' onclick=\"TalentAllowanceInfoDlg.showEditProjectModal('"+row.project+"','"+row.id+"','"+row.enterpriseId+"','"+row.months+"','"+row.days+"',this)\" style='margin-left: 5px' class=\"btn btn-xs btn-danger tips\">" +
                         "<i class=\"fa fa-edit\"></i>修改</button>";
                 }
                 butHtml = butHtml +"<button type='button' onclick='TalentAllowanceInfoDlg.showLog(\""+row.id+"\")' style='margin-left: 5px' class='btn btn-xs btn-success'><i class=\"fa fa-book\"></i>日志</button>";

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

@@ -292,6 +292,132 @@ TalentAllowanceInfo.getIdentifyCondition = function () {
     $("#identifyCondition").trigger('chosen:updated');
 }
 
+
+TalentAllowanceInfo.initCheckFileTable = function () {
+    $('#checkFileTable').bootstrapTable('destroy');
+    $('#checkFileTable').bootstrapTable({
+        url: Feng.ctxPath + "/enterprise/talentAllowance/listCommonFile",
+        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 {"batch": $("#batch").val(), "fileTag": "master_living_allowance"};
+        },
+        rowStyle: function (row, index) {
+            return {css: {"word-break": "break-word", "white-space": "inherit"}}
+        },
+        columns:
+                [
+                    {title: '附件原名', field: 'originalName', visible: true, align: 'center', valign: 'middle', width: '120px'},
+                    {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px",
+                        formatter: function (value, row, index) {
+                            var sn = value.lastIndexOf(".");
+                            var suffix = value.substring(sn + 1, value.length);
+                            var imgStr = "";
+                            if (suffix == "pdf" || suffix == "PDF") {
+                                imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
+                            } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
+                                imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
+                            } else {
+                                imgStr = '<img class=\"imgUrl\"  src=\"' + value + '\" style=\"width:25px;height:25px;\">';
+                            }
+                            return imgStr;
+                        }
+                    },
+                    {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle', width: '80px',
+                        formatter: function (value, row, index) {
+                            return "<button type='button' onclick=\"downloadFile('" + row.id + "','6')\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button>" +
+                                    "<button type='button' onclick=\"TalentAllowanceInfo.deleteCheckFile('" + row.id + "','" + CONFIG.project_jbt + "')\" class=\"btn btn-xs btn-danger\">" +
+                                    "<i class=\"fa fa-times\"></i>删除" +
+                                    "</button>";
+                        }
+                    },
+                ],
+        onPostBody: function () {
+            $('#checkFileTable' + "td.uitd_showTip").bind("mouseover", function () {
+                var htm = $(this).html();
+                $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+            });
+            $(".imgUrl").viewer({fullscreen: false});
+        },
+    });
+}
+
+/**
+ * 核查材料留存上传
+ */
+TalentAllowanceInfo.showCheckFileModal = function () {
+    Feng.addAjaxSelect({
+        "id": "batch",
+        "displayCode": "id",
+        "displayName": "batch",
+        "type": "GET",
+        "url": "/common/batch/listBatchByType?type=" + CONFIG.project_jbt + "&source=" + $("#type").val()
+    });
+    $("#upload_file").val("");
+    $("#checkFileModal").modal("show");
+}
+
+
+TalentAllowanceInfo.checkFileUpload = function () {
+    var batch = $("#batch").val();
+    if (Feng.isEmptyStr(batch)) {
+        Feng.info("请选择申报批次后再上传!");
+        return;
+    }
+    $("#upload_file ").unbind("change");
+    $("#upload_file ").change(function () {
+        var formData = new FormData();
+        formData.append("batch", batch);
+        for (var i = 0; i < $('#upload_file')[0].files.length; i++) {
+            formData.append('file', $('#upload_file')[0].files[i]);
+        }
+        $.ajax({
+            url: Feng.ctxPath + "/enterprise/talentAllowance/uploadCommonFile",
+            type: "POST",
+            processData: false,
+            contentType: false,
+            data: formData,
+            success: function (data) {
+                $("#checkFileTable").bootstrapTable("refresh", {});
+                Feng.info(data.msg);
+            }, error: function (data) {
+                Feng.error("上传失败!" + data.responseJSON.message + "!");
+            }
+        });
+    });
+    $('#upload_file').val("");
+    $('#upload_file').click();
+}
+
+TalentAllowanceInfo.deleteCheckFile = function (id, type) {
+    var operation = function () {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talentAllowance/deleteCommonFile", function (data) {
+            if (data.code = 200) {
+                Feng.success(data.msg);
+                $("#checkFileTable").bootstrapTable("refresh", {});
+            } else {
+                Feng.error(data.msg);
+            }
+        }, function (data) {
+            Feng.error("删除失败!" + data.responseJSON.message + "!");
+        });
+        ajax.set("id", id);
+        ajax.set("type", type);
+        ajax.start();
+    }
+    Feng.confirm("删除后无法恢复,确认删除吗?", operation);
+}
+
 /**
  * 显示审核日志
  */