ordersca.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php require_once 'header.php' ?>
  2. <div class="row wrapper wrapper-content">
  3. <div class="row">
  4. <div class="col-md-12">
  5. <div class="panel panel-default">
  6. <div class="panel-heading">
  7. <div class="panel-title">
  8. <em class="fa fa-list">
  9. </em>
  10. <?php echo $title ?>
  11. </div>
  12. </div>
  13. <div class="panel-body">
  14. <form class="form-inline m-b-xs" action="" method="get">
  15. <div class="input-group">
  16. <span class="input-group-addon">
  17. <i class="fa fa-calendar"></i>
  18. </span>
  19. <input size="16" type="text" name="fdate" readonly class="form_datetime form-control"
  20. value="<?php echo $search['fdate']?>">
  21. <span class="input-group-addon">
  22. </span>
  23. <input size="16" type="text" name="tdate" readonly class="form_datetime form-control"
  24. value="<?php echo $search['tdate']?>">
  25. </div>
  26. <button type="submit" class="btn btn-primary">
  27. <i class="fa fa-search"></i>
  28. &nbsp;立即查询
  29. </button>
  30. </form>
  31. <div class="table-responsive">
  32. <table class="table table-bordered">
  33. <thead>
  34. <tr>
  35. <th>
  36. <a class="blue" href="?fdate=<?php echo $search['fdate']?>&tdate=<?php echo $search['tdate']?>&by=channelid&sort=<?php echo $by=='channelid' && $sort ? 0 : 1 ?>">
  37. 通道编号
  38. <span class="glyphicon glyphicon-triangle-<?php echo $by=='channelid' && $sort ? 'bottom' : 'top'?>">
  39. </span>
  40. </a>
  41. </th>
  42. <th>
  43. <a class="blue" href="?fdate=<?php echo $search['fdate']?>&tdate=<?php echo $search['tdate']?>&by=total_orders&sort=<?php echo $by=='total_orders' && $sort ? 0 : 1 ?>">
  44. 订单总数
  45. <span class="glyphicon glyphicon-triangle-<?php echo $by=='total_orders' && $sort ? 'bottom' : 'top'?>">
  46. </span>
  47. </a>
  48. </th>
  49. <th>
  50. <a class="blue" href="?fdate=<?php echo $search['fdate']?>&tdate=<?php echo $search['tdate']?>&by=total_fee&sort=<?php echo $by=='total_fee' && $sort ? 0 : 1 ?>">
  51. 订单总额
  52. <span class="glyphicon glyphicon-triangle-<?php echo $by=='total_fee' && $sort ? 'bottom' : 'top'?>">
  53. </span>
  54. </a>
  55. </th>
  56. <th>
  57. <a class="blue" href="?fdate=<?php echo $search['fdate']?>&tdate=<?php echo $search['tdate']?>&by=total_income&sort=<?php echo $by=='total_income' && $sort ? 0 : 1 ?>">
  58. 订单收入总额
  59. <span class="glyphicon glyphicon-triangle-<?php echo $by=='total_income' && $sort ? 'bottom' : 'top'?>">
  60. </span>
  61. </a>
  62. </th>
  63. </tr>
  64. </thead>
  65. <tbody>
  66. <?php if($lists):?>
  67. <?php $total[ 'orders']=0;$total[ 'money']=0;$total[ 'income']=0;foreach($lists
  68. as $key=>
  69. $val):$total['orders']+=$val['total_orders'];$total['money']+=$val['total_fee'];$total['income']+=$val['total_income'];$acc=$this->model()->select('name')->from('acc')->where(array('fields'=>'id=?','values'=>array($val['channelid'])))->fetchRow();$cname=$acc
  70. ? $acc['name'] : '-';?>
  71. <tr data-id="<?php echo $val['channelid']?>">
  72. <td>
  73. <?php echo $cname?>
  74. </td>
  75. <td>
  76. <?php echo $val[ 'total_orders']?>
  77. </td>
  78. <td>
  79. <?php echo $val[ 'total_fee']?>
  80. </td>
  81. <td>
  82. <?php echo number_format($val[ 'total_income'],2, '.', '')?>
  83. </td>
  84. </tr>
  85. <?php endforeach;?>
  86. <tr class="active">
  87. <td class="gray">
  88. 总计:
  89. </td>
  90. <td class="red">
  91. <?php echo $total[ 'orders']?>
  92. </td>
  93. <td class="blue">
  94. <?php echo $total[ 'money']?>
  95. </td>
  96. <td class="green">
  97. <?php echo $total[ 'income']?>
  98. </td>
  99. </tr>
  100. <?php else:?>
  101. <tr>
  102. <td colspan="4" class="text-center">
  103. 暂无记录
  104. </td>
  105. </tr>
  106. <?php endif;?>
  107. </tbody>
  108. </table>
  109. </div>
  110. </div></div></div></div></div></div>
  111. <?php require_once 'footer.php' ?>