orderList.blade.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. @extends('user.layouts')
  2. @section('css')
  3. <link href="/assets/global/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet" type="text/css" />
  4. <style>
  5. .fancybox > img {
  6. width: 75px;
  7. height: 75px;
  8. }
  9. </style>
  10. @endsection
  11. @section('title', '控制面板')
  12. @section('content')
  13. <!-- BEGIN CONTENT BODY -->
  14. <div class="page-content">
  15. <!-- BEGIN PAGE BREADCRUMB -->
  16. <ul class="page-breadcrumb breadcrumb">
  17. <li>
  18. <a href="{{url('user/orderList')}}">消费记录</a>
  19. <i class="fa fa-circle"></i>
  20. </li>
  21. </ul>
  22. <!-- END PAGE BREADCRUMB -->
  23. <!-- BEGIN PAGE BASE CONTENT -->
  24. <div class="row">
  25. <div class="col-md-12">
  26. <!-- BEGIN EXAMPLE TABLE PORTLET-->
  27. <div class="portlet light bordered">
  28. <div class="portlet-title">
  29. <div class="caption font-dark">
  30. <i class="icon-wallet font-dark"></i>
  31. <span class="caption-subject bold uppercase"> 消费记录 </span>
  32. </div>
  33. </div>
  34. <div class="portlet-body">
  35. <div class="table-scrollable">
  36. <table class="table table-striped table-bordered table-hover table-checkable order-column" id="sample_1">
  37. <thead>
  38. <tr>
  39. <th> ID </th>
  40. <th> 订单编号 </th>
  41. <th> 商品信息 </th>
  42. <th> 创建时间 </th>
  43. </tr>
  44. </thead>
  45. <tbody>
  46. @if($orderList->isEmpty())
  47. <tr>
  48. <td colspan="4">暂无数据</td>
  49. </tr>
  50. @else
  51. @foreach($orderList as $key => $order)
  52. <tr class="odd gradeX">
  53. <td> {{$key + 1}} </td>
  54. <td> {{$order->orderId}} </td>
  55. <td>
  56. @foreach($order->goodsList as $goods)
  57. {{$goods->goods_name}}(¥{{$goods->price}})
  58. @endforeach
  59. </td>
  60. <td>{{$order->created_at}}</td>
  61. </tr>
  62. @endforeach
  63. @endif
  64. </tbody>
  65. </table>
  66. </div>
  67. <div class="row">
  68. <div class="col-md-5 col-sm-5">
  69. <div class="dataTables_info" role="status" aria-live="polite">共 {{$orderList->total()}} 个记录</div>
  70. </div>
  71. <div class="col-md-7 col-sm-7">
  72. <div class="dataTables_paginate paging_bootstrap_full_number pull-right">
  73. {{ $orderList->links() }}
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. <!-- END EXAMPLE TABLE PORTLET-->
  80. </div>
  81. </div>
  82. <!-- END PAGE BASE CONTENT -->
  83. </div>
  84. <!-- END CONTENT BODY -->
  85. @endsection
  86. @section('script')
  87. <script src="/assets/global/plugins/fancybox/source/jquery.fancybox.js" type="text/javascript"></script>
  88. <script src="/assets/global/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
  89. <script type="text/javascript">
  90. function buy(goods_id) {
  91. window.location.href = '{{url('user/addOrder?goods_id=')}}' + goods_id;
  92. }
  93. // 编辑商品
  94. function exchange(id) {
  95. //
  96. }
  97. // 查看商品图片
  98. $(document).ready(function () {
  99. $('.fancybox').fancybox({
  100. openEffect: 'elastic',
  101. closeEffect: 'elastic'
  102. })
  103. })
  104. </script>
  105. @endsection