|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- require_once '../st-xm/Common/Mysql.php';
- header("Access-Control-Allow-Origin:*");
- header("Content-type:text/html;charset=utf-8");
- /**
- * Created by PhpStorm.
- * User: luocj
- * Date: 2017/1/25
- * Time: 11:10
- */
- $data = isset($_POST['date'])?$_POST['date']:date("Y-m-d");
- $pdo=conn();
- //$sql = "select count(id) as order_number,parent_prod_name from order_main where order_prod_type = 26 and order_status in (313,198,314,147,382) and cancel_flag = 0 and prod_start_station_date = '$data' group by parent_prod_name order by parent_prod_name ";
- $sql = "select count(id) as order_number,parent_prod_name from order_main where order_prod_type = 26 and order_valid_status=1 and cancel_flag = 0 and prod_start_station_date = '$data' group by PARENT_PROD_ID order by parent_prod_name ";
- $result=$pdo->query($sql);
- $result_array=$result->fetchAll();
-
- ?>
- <link rel="stylesheet" type="text/css" href="../css/bootstrap/bootstrap.min.css" />
- <link rel="stylesheet" type="text/css" href="../css/datepicker.css" />
- <script type="text/javascript" src="../js/jquery-2.2.4.min.js"></script>
- <script type="text/javascript" src="../js/date-time/bootstrap-datepicker.min.js"></script>
-
- <form method="post" style="margin-left: 10px;margin-top: 10px;">
- 日期:<input id="date" name="date" value="<?php echo $data; ?>" class="date-picker" data-date-format="yyyy-mm-dd" placeholder="查询日期">
- <input type="submit" value="查询">
- </form>
- <script type="text/javascript">
- $('.date-picker').datepicker({autoclose:true});
- </script>
- <table border="1" style="margin-left: 10px;">
- <thead>
- <tr>
- <th style="text-align:center;">No.</th>
- <th style="text-align:center;min-width: 100px;">酒店名称</th>
- <th style="text-align:center;min-width: 50px;">间数</th>
- </tr>
- </thead>
- <tbody>
- <?php $index_no = 1;foreach ($result_array as $k=>$v){ ?>
- <tr>
- <td><?php echo $index_no; ?></td>
- <td><?php echo $v['parent_prod_name']; ?></td>
- <td style="text-align:right;"><?php echo number_format($v['order_number']); ?></td>
- </tr>
- <?php $index_no++;} ?>
- </tbody>
- </table>
|