You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

49 lines
2.1 KiB

  1. <?php
  2. require_once '../st-xm/Common/Mysql.php';
  3. header("Access-Control-Allow-Origin:*");
  4. header("Content-type:text/html;charset=utf-8");
  5. /**
  6. * Created by PhpStorm.
  7. * User: luocj
  8. * Date: 2017/1/25
  9. * Time: 11:10
  10. */
  11. $data = isset($_POST['date'])?$_POST['date']:date("Y-m-d");
  12. $pdo=conn();
  13. //$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 ";
  14. $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 ";
  15. $result=$pdo->query($sql);
  16. $result_array=$result->fetchAll();
  17. ?>
  18. <link rel="stylesheet" type="text/css" href="../css/bootstrap/bootstrap.min.css" />
  19. <link rel="stylesheet" type="text/css" href="../css/datepicker.css" />
  20. <script type="text/javascript" src="../js/jquery-2.2.4.min.js"></script>
  21. <script type="text/javascript" src="../js/date-time/bootstrap-datepicker.min.js"></script>
  22. <form method="post" style="margin-left: 10px;margin-top: 10px;">
  23. 日期:<input id="date" name="date" value="<?php echo $data; ?>" class="date-picker" data-date-format="yyyy-mm-dd" placeholder="查询日期">
  24. <input type="submit" value="查询">
  25. </form>
  26. <script type="text/javascript">
  27. $('.date-picker').datepicker({autoclose:true});
  28. </script>
  29. <table border="1" style="margin-left: 10px;">
  30. <thead>
  31. <tr>
  32. <th style="text-align:center;">No.</th>
  33. <th style="text-align:center;min-width: 100px;">酒店名称</th>
  34. <th style="text-align:center;min-width: 50px;">间数</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. <?php $index_no = 1;foreach ($result_array as $k=>$v){ ?>
  39. <tr>
  40. <td><?php echo $index_no; ?></td>
  41. <td><?php echo $v['parent_prod_name']; ?></td>
  42. <td style="text-align:right;"><?php echo number_format($v['order_number']); ?></td>
  43. </tr>
  44. <?php $index_no++;} ?>
  45. </tbody>
  46. </table>