Keine Beschreibung

customerGiftList.blade.php 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. @if(session('info'))
  5. <div class="Huialert Huialert-info" onclick="$(this).remove()" id="info">
  6. {{session('info')}}
  7. </div>
  8. @endif
  9. <div class="page-container">
  10. <div>
  11. <input class="input-text" style="width:5%;text-align:center" type="text" value="赠礼类型"/>
  12. <select style="width:6%;text-align:center" id='type' name="type" class="select-box">
  13. <option value="-1" @if($type=='-1') selected @endif>-- 请选择--</option>
  14. <option value="1" @if($type==1) selected @endif>生日赠礼</option>
  15. <option value="0" @if($type==0) selected @endif>12月赠礼</option>
  16. </select>
  17. <a class="btn btn-primary radius" onclick="gift_search()" href="javascript:;">搜索</a>
  18. <a class="btn btn-primary radius" onclick="gift_add('新增')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加礼品</a>
  19. </div>
  20. <div class="mt-20">
  21. <table class="table table-border table-bordered table-bg table-hover table-sort">
  22. <thead>
  23. <tr class="text-c">
  24. <th width="10%">ID</th>
  25. <th width="10%">商品名称</th>
  26. <th width="10%">商品图片</th>
  27. <th width="10%">商品规格</th>
  28. <th width="10%">商品数量</th>
  29. <th width="10%">类型</th>
  30. <th width="10%">日期</th>
  31. <th width="10%">操作</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. @if($result)
  36. @foreach($result as $a)
  37. <tr class="text-c">
  38. <td class="text-c">{{$a['id']}}</td>
  39. <td class="text-c">{{$a['goods']['name']}}</td>
  40. <td class="text-c"><img style="width:100px;" src="{{$a['goods']['picUrl']}}"/></td>
  41. <td class="text-c">{{$a['sku']['propsName']}}</td>
  42. <td class="text-c">{{$a['num']}}</td>
  43. <td class="text-c">{{$a['type'] == 0 ? '12月赠礼' : '生日赠礼'}}</td>
  44. <td class="text-c">{{$a['mtime']}}</td>
  45. <td class="f-14 product-brand-manage">
  46. <a style="text-decoration:none" onClick='gift_edit("{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
  47. </td>
  48. </tr>
  49. @endforeach
  50. @endif
  51. </tbody>
  52. </table>
  53. </div>
  54. <div id="page" class="page_div"></div>
  55. </div>
  56. <!--_footer 作为公共模版分离出去-->
  57. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  58. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  59. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  60. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  61. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  62. <!--/_footer 作为公共模版分离出去-->
  63. <!--/_footer 作为公共模版分离出去-->
  64. <script type="text/javascript">
  65. $(function(){
  66. setTimeout("$('#info').hide()",3000);
  67. });
  68. /*管理员-添加*/
  69. function gift_add(){
  70. location.href = '/admin/customer/giftAdd';
  71. }
  72. /*管理员-编辑*/
  73. function gift_edit(id){
  74. location.href = "/admin/customer/giftEdit?id="+id;
  75. }
  76. function gift_search(){
  77. var type = $('#type').val();
  78. location.href='giftList?page='+num+'&type='+type;
  79. }
  80. $("#page").paging({
  81. pageNo:{{$page}},
  82. totalPage: {{$pages}},
  83. totalSize: {{$count}},
  84. callback: function(num) {
  85. var type = $('#type').val();
  86. location.href='giftList?page='+num + '&type='+type;
  87. }
  88. })
  89. </script>
  90. </body>
  91. @endsection