RoundManagement.blade.php 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. @extends('admin.master')
  2. @section('content')
  3. <div class="row">
  4. <div class="col-lg-12">
  5. <div class="contentpanel">
  6. <form id="listForm" method="post">
  7. <!-- 功能按鈕(新增/批量處理等等) -->
  8. <div class="row" style="margin-bottom: 5px;">
  9. <div class="col-lg-12">
  10. <ol class="headermenu">
  11. <li>
  12. <button class="btn btn-darkblue btn-xs" id="btnNew"><strong>新增</strong></button>
  13. </li>
  14. </ol>
  15. </div>
  16. </div>
  17. <!-- 搜尋段 -->
  18. <div class="panel panel-default">
  19. <div class="panel-heading" data-toggle="collapse" data-target="#search_content">
  20. <h3 class="panel-title">回合管理</h3>
  21. </div>
  22. <div id="search_content" class="collapse in">
  23. <div class="panel-body">
  24. </div>
  25. </div>
  26. </div>
  27. <hr class="search-hr"/>
  28. <!-- 列表段 -->
  29. <div class="row">
  30. <div class="col-lg-12">
  31. 相同一筆設定,若有分上下兩部分:<br>
  32. 上排代表目前修改中的最新設定,在審核通過前都不會生效。<br>
  33. 下排代表目前經審核通過的線上設定。
  34. </div>
  35. <div class="col-lg-12">
  36. <table id="GridView1" class="table table-striped table-bordered" cellspacing="0">
  37. <thead>
  38. <tr>
  39. <th>ID</th>
  40. <th>回合名稱</th>
  41. <th>起日</th>
  42. <th>迄日</th>
  43. <th>兌獎延長天數</th>
  44. <th>有效否</th>
  45. <th>建立時間</th>
  46. <th>修改時間</th>
  47. <th>修改人</th>
  48. </tr>
  49. </thead>
  50. </table>
  51. </div>
  52. </div>
  53. </form>
  54. <!-- row -->
  55. </div>
  56. </div>
  57. </div>
  58. @endsection
  59. @section('extjs')
  60. <script>
  61. $(document).ready(function () {
  62. var table = $('#GridView1').dataTable({
  63. "scrollX": true,
  64. "processing": true,
  65. "serverSide": true,
  66. "ajax": "roundManagement/grid",
  67. "paging": true,
  68. "ordering": true,
  69. "info": true,
  70. "order": [[0, "desc"]],
  71. "stateSave": true,
  72. "pagingType": "full",
  73. "bFilter": true,
  74. "aoColumnDefs": [{
  75. 'bSortable': false,
  76. 'aTargets': [] //不想參加排序的欄位,可指定多個,逗號分隔
  77. }]
  78. });
  79. // 從網址參觸發搜尋
  80. custom_search();
  81. $('#GridView1_filter').hide();
  82. });
  83. //客製化搜尋欄位
  84. function custom_search() {
  85. $('#GridView1').DataTable()
  86. ;
  87. $('#GridView1').dataTable().fnDraw(true);
  88. }
  89. // 新增
  90. $("#btnNew").click(function () {
  91. location.href = 'roundManagement/create';
  92. return false;
  93. });
  94. </script>
  95. @endsection