浏览代码

津补贴批量申报excel版(未完成)

sugangqiang 1 年之前
父节点
当前提交
781ab294b7

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

@@ -106,6 +106,9 @@
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.openBatchApplyModal()">
                                 <i class="fa fa-plus"></i>&nbsp;批量申请津补贴
                             </button>
+                            <button type="button" class="btn btn-sm btn-primary" onclick="TalentAllowanceInfo.batchImportApply()">
+                                <i class="fa fa-upload"></i>&nbsp;批量申请津补贴(Excel导入)
+                            </button>
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.showCheckFileModal()">
                                 <i class="fa fa-upload"></i>&nbsp;上传通用附件
                             </button>
@@ -151,6 +154,38 @@
         </div>
     </div>
 </div>
+
+<div class="modal fade " id="importModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
+    <div class="modal-dialog" role="document">
+        <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="importModalLabel">批量申请津补贴</h4>
+            </div>
+            <div class="modal-body">
+                <form id="import-form" action="/enterprise/talentAllowance/batchImportApply" method="post" enctype="multipart/form-data" target="hiddenIframe">
+                    <input type="file" id="file" name="file" onchange="$('#fileName').val($('#file').val());" class="hidden">
+                    <div class="form-group row">
+                        <div class="col-sm-12">
+                            <div class="input-group">
+                                <input type="hidden" name="type" id="importType">
+                                <input type="text" class="form-control" id="fileName" name="fileName" placeholder="请选择附件(附件格式需依照模板文件)" readonly="readonly" >
+                                <span class="input-group-btn">
+                                    <button class="btn btn-secondary" type="button" onclick="$('#file').click()"><i class="fa fa-search"></i>选择文件</button>
+                                </span>
+                            </div>
+                        </div>
+                    </div>
+                </form>
+                <a href="/jbtsbb.xlsx">下载津补贴申报表模板文件</a>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-primary" onclick="TalentAllowanceInfo.importSubmit()">提交</button>
+                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
+            </div>
+        </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">

二进制
public/jbtbiao.xlsx


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

@@ -470,6 +470,28 @@ $('#uncheckAllBatch').click(function () {
     $("#batchApplyTable").bootstrapTable('togglePagination').bootstrapTable('uncheckAll').bootstrapTable('togglePagination')
 })
 
+TalentAllowanceInfo.batchImportApply = function () {
+    $("#file,#fileName").val("");
+    $("#importModal").modal("show");
+}
+
+/**
+ *
+ */
+TalentAllowanceInfo.importSubmit = function () {
+    $("#import-form")[0].submit();
+}
+
+
+TalentAllowanceInfo.importCallBack = function (data) {
+    if (data.code == 200) {
+        $("#importModal").modal("hide");
+        TalentAllowanceInfo.table.refresh();
+        Feng.success(data.msg);
+    } else {
+        Feng.error(data.msg);
+    }
+}
 
 /**
  * 核查材料留存上传