<div style="width:90%;margin:30px auto;">
  <div class="panel panel-primary">
      <div class="panel-heading">
        <h3 class="panel-title">交易记录导出&nbsp;<a style="margin-left:50px;" target='_blank' href="<?php echo site_url('apps/train/index/ht_order_list');?>">订单列表>></a> </h3>
      </div>
      <div class="panel-body">
       <form style="width: 80%;" action="/info.php/apps/trainsystem/api/lanhai_export_excel/" method="post">
        <input type="text" name="from_date" class="date" value="<?php echo empty($from_date)?"":$from_date;?>" autocomplete="off" placeholder="开始日期">&nbsp;&nbsp;至&nbsp;&nbsp;
        <input type="text" name="to_date" class="date" value="<?php echo empty($to_date)?"":$to_date;?>" autocomplete="off" placeholder="结束日期">
        显示列表：<input type="checkbox" <?php echo empty($examine)?"":"checked";?> name="examine" />&nbsp;&nbsp;|&nbsp;&nbsp;
        导入汉特：<input type="checkbox" <?php echo empty($importht)?"":"checked";?> name="importht" />&nbsp;  <a href="javascript:void(0);" title="勾选此项后，会以开始时间和结束时间为编码把数据导入汉特。&#10 注意：为了防止重复 ，请不要有同一时间段的导入。比如8月1日到30日导入，然后8月1日到29日又导入一次。"><i
                      class="text-muted glyphicon glyphicon-question-sign"></i></a>&nbsp;&nbsp;&nbsp;
        <button type="submit" id="sub" class="btn btn-warning btn-sm"><span class="glyphicon glyphicon-download-alt"></span> Download</button> 
        &nbsp;<a href="javascript:void(0);" title="什么都不选，点击此按钮下载EXCEL账单，选择显示列表就只显示数据。&#10 选择导入汉特后会单独另外进行一个导入的操作。"><i
                      class="text-muted glyphicon glyphicon-question-sign"></i></a> 
       </form>
       <p style="margin: 0 0 10px; width: 200px; float: left; line-height: 30px;">
  <!--       <table class="table table-hover" >
               <thead>
                 <tr><th>时间</th><th>信息</th><th>变化值</th><th>团名</th><th>外联</th></tr>
               </thead>
               <tbody>
                 
                 <tr data-id="161130252" title="Popover title"  data-container="body" data-toggle="popover" data-placement="top" data-content="顶部的 Popover 中的一些内容">
                   <td>2016-12-01 11:18:28</td>
                   <td> 票款(有充值)</td>
                   <td>-1106.00</td>
                   <td>R161228-BYW161130252</td>
                   <td>李毅文</td>
                 </tr>
                 
               </tbody>
            </table> -->
        <div class="row <?php echo empty($examine)?"hidden":"";?>" style="width:90%;margin:0 auto;">
          <div class="">       
            <table class="table table-hover" id="list_table">
               <thead>
                 <tr><th>日期</th><th>类型</th><th>金额</th><th>订单号</th><th>外联</th><th>团号</th><th>乘客</th></tr>
               </thead>
               <tbody>
                 
                  <?php $total=0; $count=0; foreach ($data as $key => $value) {?>
                  <tr data-id="<?php echo $value["mainOrderId"];?>"  title="Popover title"  data-container="body" data-toggle="popover" data-placement="top" data-content="顶部的 Popover 中的一些内容">
                   <td><?php echo $value["saveDay"];?></td><td><?php echo $value["type"];?></td><td><?php echo $value["price"];?></td><td><?php echo $value["mainOrderId"];?></td>
                   <td><?php echo $value["wl"];?></td><td><?php echo $value["griName"];?></td><td><?php echo $value["passengerName"];?></td>
                  </tr>
                  <?php $total +=  $value["price"]; $count+=1; }?>
                  <tr><td colspan="2">总额：</td><td colspan="2"><?php echo($total) ?></td><td>记录数:</td><td colspan="2"><?php echo($count)  ?></td></tr>
               </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
    
</div>
<div class="popover fade top in" role="tooltip" id="popover" style="width:auto;max-width: 100% !important;top: 139.6px; left: 50%; display: none;">
  <div class="arrow"></div>
  <h3 class="popover-title">我的支付</h3>
  <div class="popover-content">
    <table class="table" id="my_pay_data">
      <thead>
        <tr>
          <td>序号</td><td>车次</td><td>出发日期</td><td>价格</td><td>备注</td>
        </tr>
      </thead>
      <tbody>
        
      </tbody>
    </table>
  </div>
</div>
<script>
$(function(){
    $(".date").datepicker({
    'dateFormat': 'yy-mm-dd',
    'autoclose': true
  });

})
</script>