calc_history.blade.php 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. @extends('admin/layout')
  2. @section('content')
  3. <body class="gray-bg">
  4. <div class="wrapper wrapper-content animated fadeInRight">
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <div class="ibox float-e-margins">
  8. <div class="ibox-content">
  9. <form class="form-inline" id="searchForm" onsubmit="units.search();return false;">
  10. <div class="input-group">
  11. <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
  12. <input type="text" class="form-control lay-datetime" id="start_at" name="start_at">
  13. </div>
  14. <div class="input-group">
  15. <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
  16. <input type="text" class="form-control lay-datetime" id="end_at" name="end_at">
  17. </div>
  18. <div class="form-group" style="margin-top: 5px;">
  19. <div class="input-group">
  20. <input type="text" placeholder="请输入用户名" class="input-md form-control" name="keyword"
  21. id="keyword">
  22. <span class="input-group-btn">
  23. <button type="button" class="btn btn-md btn-primary"
  24. onclick="units.search()"> 搜索</button>
  25. <button type="reset" class="btn btn-md btn-primary" style="margin-left: 10px"
  26. name="resetBtn"> 重置</button>
  27. </span>
  28. </div>
  29. </div>
  30. <div class="form-group pull-right" style="padding-left: 20px">
  31. <label class="form-control">结算总金额</label>
  32. <label class="form-control" id="totalAmount"></label>
  33. </div>
  34. <div class="form-group pull-right">
  35. <label class="form-control">结算总外链</label>
  36. <label class="form-control" id="totalLinkNum"></label>
  37. </div>
  38. </form>
  39. <hr>
  40. <div class="table-responsive">
  41. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </body>
  49. @endsection
  50. @section('footer')
  51. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  52. <script>
  53. var units = {
  54. search: function () {
  55. tips.selectPage();
  56. }
  57. };
  58. var config = {};
  59. config.url = '/admin/link/calc-history';
  60. config.columns = [ //字段
  61. {
  62. title: '序号', align: 'center', formatter: function (value, item, index) {
  63. return index + 1;
  64. }
  65. },
  66. {title: '兼职人员', field: 'username', align: 'center'},
  67. {title: '外链', field: 'title', align: 'center'},
  68. {title: '结算金额', field: 'amount', align: 'center'},
  69. {title: '结算外链数', field: 'url_num', align: 'center'},
  70. {title: '结算时间', field: 'settle_at', align: 'center'}
  71. ];
  72. config.onLoadSuccess = function (data) {
  73. $("#totalLinkNum").text(data.totalLinkNum);
  74. $("#totalAmount").text(data.totalAmount);
  75. };
  76. tips.bootstrapTable(config);
  77. laydate.render({
  78. elem: '#start_at', //指定元素
  79. type: 'datetime'
  80. });
  81. laydate.render({
  82. elem: '#end_at', //指定元素
  83. type: 'datetime'
  84. });
  85. </script>
  86. @endsection