ActivityManagement.blade.php 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. <table id="GridView1" class="table table-striped table-bordered" cellspacing="0">
  32. <thead>
  33. <tr>
  34. <th>ID</th>
  35. <th>活動名稱</th>
  36. <th>登記發票時間</th>
  37. <th>開獎時間</th>
  38. <th>獎號</th>
  39. <th>觸發開獎</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": "activityManagement/grid",
  67. "paging": true,
  68. "ordering": true,
  69. "info": true,
  70. "order": [[1, "desc"]],
  71. "stateSave": true,
  72. "pagingType": "full",
  73. "bFilter": true,
  74. "aoColumnDefs": [{
  75. 'bSortable': false,
  76. 'aTargets': [0] //不想參加排序的欄位,可指定多個,逗號分隔
  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 = 'activityManagement/create';
  92. return false;
  93. });
  94. // 確認連結點擊
  95. function confirmUser(link) {
  96. var ask = confirm("此動作不可回復,確定嗎?");
  97. if (ask) {
  98. window.location = link;
  99. }
  100. }
  101. </script>
  102. @endsection