<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML>
<html>
<head>
<title id="pageTitle">上海复星星泰医药科技有限公司</title>
<meta name="renderer" content="webkit"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0 user-scalable=no"/>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/axingtai/css/swiper.min.css"/>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/axingtai/css/common.css"/>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/axingtai/css/center.css"/>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/axingtai/css/wap.css"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/axingtai/js/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/journalism/h-ui/js/H-ui.min.js"></script>
<script src="${pageContext.request.contextPath}/axingtai/laydate/laydate.js"></script>
</head>

<body style="background:#f5f5f5;">
    <div class="header">
        <jsp:include page='<%="/newshead.html"%>'></jsp:include>

    </div>


<script type="text/javascript">
$(function(){
	var exptopfixed=$(".exp_fixed").offset().top;

    $(".havelevel").hover(function(){
            $(this).children(".levelson").addClass('cur');
            $(this).children(".down_level").stop().slideDown();
            
        },function(){
            $(this).children(".levelson").removeClass('cur');
            $(this).children(".down_level").stop().slideUp();
            Fixed();

        })
	
    $(window).scroll(function(){	
		Fixed()
    });
	
	function Fixed(){
		var top = $(document).scrollTop();        
		 //console.log(top+',,'+exptopfixed);
		if(top>=79){
		  $(".top").addClass("top_jl");
          $(".down_level").css("top","70px");
		  }
		  else{
			  $(".top").removeClass("top_jl");
            $(".down_level").css("top","110px");
			  }
		}
	
	$(".wapmenu").click(function(){
			$(".menucon").show(500);
			})
	$(".close").click(function(){
		$(".menucon").hide(500);
		})		
	
})
</script>


<div class="main center clearfix">
    <div class="selfleft">
        <ul class="clearfix">
            <li class="dispcblock">
                <p class="selfleic">平台中心</p>
            </li>
            <li>
                <a class="webborderright" href="center.html"><i class="icon_center_1"></i>基本信息</a>
            </li>
            <li>
                <a href="roomlist.html"><i class="icon_center_2"></i>会议室预约</a>
            </li>
            <li>
                <a class="selfleonc webborderright" href="order.html"><i class="icon_center_3"></i>我的预约订单</a>
            </li>
            <li>
                <a href="notice.html"><i class="icon_center_4"></i>站内公告</a>
            </li>

            <li>
                <a class="webborderright" href="download.html"><i class="icon_center_6"></i>下载中心</a>
            </li>
            <li>
                <a href="safe.html"><i class="icon_center_7"></i>密码修改</a>
            </li>
            <li class="webwidthall">
                <a href="out.html">退出账号</a>
            </li>
        </ul>
    </div>


    <div class="selfright">
        <input type="hidden" id="returnst" value="${returnst}">
        <div class="selfbread">
            我的预约订单
        </div>    
        <div class="roomlist">
            <div class="pers_date clearfix">
            <form class="form form-horizontal" id="form-article-adds" action="orderTime.html" method="post"  enctype="multipart/form-data">


                    <input id="test1" class="pro_datetime" name="startTime" value="${startTime}">
                    <span class="pro_dateto">至</span>
                    <input id="test2" class="pro_datetime" name="endTime" value="${endTime}">
                    <button type="submit" class="pro_dateque" >查询</button>


            </form>
            <p class="search_num">共<span>${ordersPid.total}</span>条数据</p>
            </div>
            <table class="order_table" cellspacing="0" cellpadding="0" border="0">

                <tr>
                    <th>会议室编号</th>
                    <th>使用人数</th>
                    <th>使用原因</th>
                    <th>使用时间</th>
                    <th>预约时间</th>
                    <th>操作</th>
                </tr>
                <c:forEach items="${ordersPid.list}" var="ordersPid">
                    <tr>
                        <td> <c:forEach items="${cooms}" var="coom">
                            <c:if test="${coom.id==ordersPid.cid}">
                                ${coom.name}
                            </c:if>
                        </c:forEach>
                        </td>
                        <td>${ordersPid.numbers}</td>
                        <td>${ordersPid.cause}</td>
                        <td>${ordersPid.starttime} 到 ${ordersPid.endtime}</td>
                        <td>${ordersPid.ordertime}</td>
                        <td>
                            <a style="text-decoration:none" onClick="article_del(this,${ordersPid.id})" class="usebtn"
                               title="取消">取消</a>

                        </td>
                    </tr>
                </c:forEach>
            </table>
           <c:if test="${ordersPid.lastPage>1}">
            <div class="page clearfix">
                <div class="swiper-container">
                    <div class="swiper-wrapper">
                        <c:forEach  items="${ordersPid.navigatepageNums}" varStatus="s" var="page">

                            <c:if test="${s.index==0}">
                                <div class="swiper-slide"><ul>
                            </c:if>
                            <c:if test="${page%7==0}">
                                <div class="swiper-slide"><ul>
                            </c:if>
                            <li>
                                <c:if test="${page==pageNums}">
                                    <a href="order.html?pageNum=${page}" class="page_cur">${page}</a>
                                </c:if>
                                <c:if test="${page!=pageNums}">
                                    <a href="order.html?pageNum=${page}" >${page}</a>
                                </c:if>
                            </li>
                            <c:if test="${page%6==0}">
                                </ul> </div>
                            </c:if>
                            <c:if test="${page==ordersPid.lastPage}">
                                </ul> </div>
                            </c:if>
                        </c:forEach>
                    </div>
                </div>
                    <div class="arrow arrow-left"> <</div>
                      <div class="arrow arrow-right"> ></div>

            </div>

           </c:if>
            <c:if test="${ordersPid.total==0}">
                <div class="page clearfix">
                    <div class="swiper-container">
                        <div class="swiper-wrapper">
                        </div>
                    </div>
                    <div style="color: #9b4449;font-size: 20px;height: 280px;text-align:center;line-height:280px;">暂无信息</div>
                </div>
            </c:if>
        </div>

    </div>
</div>
        </div>
    <jsp:include page='<%="/footer.html"%>'></jsp:include>
            <script type="text/javascript" src="${pageContext.request.contextPath}/axingtai/js/swiper.min.js"></script>
            <script>
                var iSwiper = new Swiper('.page .swiper-container', {
                    paginationClickable: true,
                    autoplayDisableOnInteraction: false,
                    calculateHeight : true,
                    loop:false
                });
                $('.arrow-left').on('click', function(e){
                    e.preventDefault();
                    iSwiper.swipePrev();
                });
                $('.arrow-right').on('click', function(e){
                    e.preventDefault();
                    iSwiper.swipeNext();
                });
            </script>
<script>

        laydate.render({
            elem : '#test1', //指定元素
            type : 'datetime',
            done: function (value) {
                var startDate = new Date(value).getTime();
                var endTime = new Date($('#test2').val()).getTime();
                if (endTime < startDate) {
                    layer.msg('结束时间不能小于开始时间');
                    $('#test1').val($('#test2').val());
                }
            }
        });


    laydate.render({
        elem : '#test2', //指定元素
        type : 'datetime',
        done: function (value) {
            var startDate = new Date($('#test1').val()).getTime();
            var endTime = new Date(value).getTime();
            if (endTime < startDate) {
                layer.msg('结束时间不能小于开始时间');
                $('#test2').val($('#test1').val());
            }
        }

    });

/*value: new Date(),*/
   /* laydate.render({
        elem: '#test1' //指定元素
        ,type: 'datetime'
    });
/!*value: new Date(),*!/
    laydate.render({
        elem: '#test2' //指定元素
        ,type: 'datetime'
    });*/
</script>

<script type="text/javascript">
    function article_del(obj, id) {
        layer.confirm('确认要取消吗？', function (index) {
            $.post("delOrderById.html", {"id": id}, function () {
                console.log(111);
                $(obj).parents("tr").remove();
                layer.msg('已取消!', {icon: 1, time: 1000});
            });
        });
    }
    function del(obj, id) {

        layer.confirm('确认要取消吗？', function (index) {
            $.post("delOrderById.html", {"id": id}, function () {
                console.log(111);
                $(obj).parents("tr").remove();
                layer.msg('已取消!', {icon: 1, time: 1000});
            });
        });

    }
    $(function () {
        var jQuery = $("#returnst").val();
        if (jQuery!=''){
            alert(jQuery);
        }
    })
</script>
</body>
</html>