calc_history.blade.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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">
  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">
  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="keyword"
  51. id="keyword">
  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. </span>
  58. </div>
  59. </div>
  60. <div class="form-group pull-right">
  61. <label class="form-control">结算总金额</label>
  62. <label class="form-control" id="totalAmount"></label>
  63. </div>
  64. </form>
  65. <hr>
  66. <div class="table-responsive">
  67. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </body>
  75. @endsection
  76. @section('footer')
  77. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  78. <script>
  79. var units = {
  80. search: function () {
  81. tips.selectPage();
  82. }
  83. };
  84. var config = {};
  85. config.pageSize = 50;
  86. config.url = '/admin/articles/calc-history';
  87. config.columns = [ //字段
  88. {
  89. title: '序号', align: 'center', formatter: function (value, item, index) {
  90. return index + 1;
  91. }
  92. },
  93. {title: '翻译人员', field: 'username', align: 'center'},
  94. {title: '文章标题', field: 'title', align: 'center'},
  95. {title: '已翻词数', field: 'translate_words', align: 'center'},
  96. {title: '结算金额', field: 'amount', align: 'center'},
  97. {title: '审核时间', field: 'audit_at', align: 'center'}
  98. ];
  99. config.onLoadSuccess = function (data) {
  100. $("#totalAmount").text(data.totalAmount);
  101. };
  102. tips.bootstrapTable(config);
  103. laydate.render({
  104. elem: '#start_at', //指定元素
  105. type: 'datetime'
  106. });
  107. laydate.render({
  108. elem: '#end_at', //指定元素
  109. type: 'datetime'
  110. });
  111. </script>
  112. @endsection