audit_word.blade.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. @extends('admin/layout')
  2. @section('content')
  3. <style>
  4. .btn-danger, .btn-primary, .btn-info {
  5. background: #009688 !important;
  6. border-color: #009688 !important;
  7. }
  8. .table-striped > tbody > tr:nth-of-type(odd) {
  9. background: #f8f8f8 !important;
  10. }
  11. .table-striped > tbody > tr .btn {
  12. background: none !important;
  13. }
  14. .table-striped > tbody > tr td {
  15. font-size: 14px !important;
  16. }
  17. .table-striped > tbody > tr:hover {
  18. background: #ffebd8 !important;
  19. }
  20. .table-striped > tbody > tr:hover .btn {
  21. background: #009688 !important;
  22. color: #fff !important;
  23. }
  24. .table-striped > tbody > tr:hover .btn .glyphicon {
  25. color: #fff !important;
  26. }
  27. </style>
  28. <body class="gray-bg">
  29. <div class="wrapper wrapper-content animated fadeInRight">
  30. <div class="row">
  31. <div class="col-sm-12">
  32. <div class="ibox float-e-margins">
  33. <div class="ibox-content">
  34. <form class="form-inline" id="searchForm" onsubmit="units.search();return false;">
  35. <div class="form-group">
  36. <div class="input-group">
  37. <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
  38. <input type="text" class="form-control lay-datetime" id="start_at" name="start_at" title="">
  39. </div>
  40. </div>
  41. -
  42. <div class="form-group">
  43. <div class="input-group">
  44. <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
  45. <input type="text" class="form-control lay-datetime" id="end_at" name="end_at" title="">
  46. </div>
  47. </div>
  48. <div class="form-group" style="margin-top: 5px;">
  49. <div class="input-group">
  50. <input type="text" placeholder="用户名" class="input-md form-control" name="username"
  51. id="username">
  52. <span class="input-group-btn">
  53. <button type="button" class="btn btn-md btn-primary"
  54. onclick="units.search()"> 搜索</button>
  55. <button type="reset" class="btn btn-md btn-primary" style="margin-left: 10px"
  56. name="resetBtn"> 重置</button>
  57. <button type="button" class="btn btn-md btn-warning" style="margin-left: 10px"
  58. onclick="units.settle()">结算</button>
  59. </span>
  60. </div>
  61. </div>
  62. </form>
  63. <hr>
  64. <div class="table-responsive">
  65. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </body>
  73. @endsection
  74. @section('footer')
  75. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  76. <script>
  77. var units = {
  78. search: function () {
  79. tips.selectPage();
  80. },
  81. getTaskIdsBySelections: function () {
  82. var selections = $("#table").bootstrapTable('getSelections');
  83. var ids = [];
  84. $.each(selections, function (inx, val) {
  85. ids = ids.concat(val.article_ids);
  86. });
  87. return ids;
  88. },
  89. settle: function () {
  90. var ids = units.getTaskIdsBySelections();
  91. if (ids.length === 0) {
  92. layer.alert('请先选择您所要操作的对象', {icon: 0});
  93. return;
  94. }
  95. layer.confirm('您确定要进行结算吗?', {icon: 3, title: '删除信息'}, function () {
  96. tips.ajax({url: '/admin/articles/calc/settle', type: 'put', data: {ids: ids}});
  97. tips.tableRefresh('#table');
  98. });
  99. }
  100. };
  101. var config = {};
  102. config.url = '/admin/articles/audit-word';
  103. config.columns = [ //字段
  104. {checkbox: true},
  105. {
  106. title: '序号', align: 'center', formatter: function (value, item, index) {
  107. return index + 1;
  108. }
  109. },
  110. {title: '审核人员', field: 'username', align: 'center'},
  111. {title: '审核词数', field: 'totalWords', align: 'center'},
  112. ];
  113. tips.bootstrapTable(config);
  114. laydate.render({
  115. elem: '#start_at', //指定元素
  116. type: 'datetime'
  117. });
  118. laydate.render({
  119. elem: '#end_at', //指定元素
  120. type: 'datetime'
  121. });
  122. </script>
  123. @endsection