<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>批量申请借阅</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv=X-UA-Compatible IE=EmulateIE7>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
    <script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
    <![endif]-->
    <script>
        var path = "${path}";
    </script>
    <style type="text/css">
        .mainDiv {
            background-color: #fff;
        }

        .modal-header2 {
            height: 30px;
            text-align: center !important;
            vertical-align: middle !important;
            background-color: #3c8dbc !important;
            color: #fff;
            font-size: 16px;
            font-weight: bold;
            padding: 5px 5px 5px 5px !important;
        }

        /**搜索区*/
        .searchDiv {
            padding-top: 1%;
            height: 30px;
        }

        .searchDiv1 {
            padding-top: 2%;
            height: 30px;
        }

        .tableDiv {
            width: 100%;
            background-color: #fff;
            margin-left: 1%;
        }

        .dateSearchDiv {
            width: 29%;
        }

        .dateSearchInput {
            width: 30%;
            margin-left: 3%;
        }

        .dateLabelDiv {
            width: 30%;
            text-align: right;
        }

        .searchInput {
            width: 22%;
        }

        .searchElement {
            width: 40%;
        }

        .searchInputElement {
            width: 60%;
            text-align: right;
        }

        .labelDiv {
            padding-top: 4%;
            margin-left: 2%;
        }

        /**查询按钮组*/
        .btnsDiv {
            height: 5%;
        }

        .btn {
            margin-right: 5px;
            margin-left: 10px;
        }

        /**批准驳回按钮组*/
        .approveBtns {
            margin-left: 110px;
        }

        /*模态框头*/
        .modal-header {
            background-color: #199ED8;
            text-align: center;
        }
    </style>
</head>
<body>
<div class="main">
    <div class="headDiv">
        <div class="headSpanDiv">
             <span class="headspan">
                批量申请借阅
            </span>
        </div>
    </div>
    <div class="mainDiv">
        <!--搜索区-->
        <div class="searchDiv">
            <div class="searchInput left" style="margin-left: 10px;">
                <div class="searchElement left">
                    <label class="labelDiv">批次名称：</label>
                </div>
                <div class="searchInputElement left">
                    <input type="test" class="form-control input-sm" id="batchName" maxlength="16">
                </div>
            </div>
            <c:if test="${createNameFlag == '0'}">
            <div class="searchInput left" style="margin-left: 10px;">
                <div class="searchElement left">
                    <label class="labelDiv">创建人：</label>
                </div>
                <div class="searchInputElement left">
                    <input type="test" class="form-control input-sm" id="createName" maxlength="16">
                </div>
            </div>
            </c:if>
            <div class="dateSearchDiv left">
                <div class="dateLabelDiv left">
                    <label class="labelDiv">创建日期：</label>
                </div>
                <div class="dateSearchInput left">
                    <input type="text" class="form-control input-sm" id="startTime1" placeholder="开始时间"
                           autocomplete="off">
                </div>
                <div class="dateSearchInput left">
                    <input type="text" class="form-control input-sm" id="endTime1" placeholder="结束时间"
                           autocomplete="off">
                </div>
            </div>
            <div class="btnsDiv">
                <button type="button" class="btn btn-sm btn-primary" onclick="refreshTable()">查询</button>
                <button type="button" class="btn btn-sm btn-primary" onclick="empty()">清空</button>
                <button class="btn btn-sm btn-warning btns" data-toggle="modal" data-target="#myModal">新增批次</button>
            </div>
        </div>
        <div id="tableDiv" class="table-responsive tableDiv">
            <table id="mytab" class="table text-nowrap table-bordered">
            </table>
        </div>
    </div>
</div>

<%--新增批次弹窗--%>
<div class="modal fade" id="myModal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    <font size="30">&times;</font>
                </button>
                <h4 class="modal-title" style="font-weight: bold">
                    新增批次
                </h4>
            </div>
            <div class="modal-body">
                <form id="borrowingTable">
                    <div class="form-group">
                        <label for="batchName" class="col-form-label">批次名称:</label>
                        <input type="text" autofocus class="form-control" id="batchNotes">
                    </div>
                    <div class="form-group">
                        <label for="batchName" class="col-form-label">申请人工号:</label>
                        <input type="text" autofocus class="form-control" id="applyName">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="emptyBorrowingForm()">取消</button>
                <button type="button" class="btn btn-primary" onclick="insertBatch()">确定</button>
            </div>
        </div>
    </div>
</div>







<%--修改批次弹窗--%>
<div class="modal fade" id="myModal1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    <font size="30">&times;</font>
                </button>
                <h4 class="modal-title" style="font-weight: bold">
                    修改批次
                </h4>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label for="batchName" class="col-form-label">批次名称:</label>
                        <input type="text" autofocus class="form-control" id="updateId" style="display: none" >
                        <input type="text" autofocus class="form-control" id="updateBatchName" >
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" onclick="saveBatch()">确定</button>
            </div>
        </div>
    </div>
</div>

<script src="${path}/static/js/batchApply/batchApply.js?t=2021-08-20"></script>
<script src="${path}/static/js/commom.js"></script>
<script src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script>
<script src="${path}/static/js/dateUtil.js"></script>
</body>
</html>
