history.blade.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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-title"></div>
  9. <div class="ibox-content">
  10. <form class="form-inline" id="searchForm">
  11. <div class="form-group">
  12. <div class="input-group">
  13. <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
  14. <input type="text" title="开始时间" class="form-control lay-datetime" id="start_at"
  15. name="start_at">
  16. </div>
  17. </div>
  18. -
  19. <div class="form-group">
  20. <div class="input-group">
  21. <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
  22. <input type="text" title="结束时间" class="form-control lay-datetime" id="end_at"
  23. name="end_at">
  24. </div>
  25. </div>
  26. <div class="form-group" style="margin-top: 5px;">
  27. <div class="input-group">
  28. {{--<input type="text" placeholder="请输入关键词" class="input-md form-control" name="keyword"--}}
  29. {{--id="keyword">--}}
  30. <span class="input-group-btn">
  31. <button type="button" class="btn btn-md btn-primary"
  32. onclick="units.search()"> 搜索</button>
  33. <button type="reset" class="btn btn-md btn-primary" style="margin-left: 10px"
  34. name="resetBtn"> 重置</button>
  35. </span>
  36. </div>
  37. </div>
  38. <div class="form-group pull-right">
  39. <label class="form-control">结算总金额</label>
  40. <label class="form-control" id="settleTotal">{{$settleTotal}}</label>
  41. </div>
  42. </form>
  43. <hr>
  44. <div class="table-responsive">
  45. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </body>
  53. @endsection
  54. @section('footer')
  55. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  56. <script>
  57. var units = {
  58. search: function () {
  59. tips.selectPage();
  60. },
  61. detail: function (idsStr) {
  62. var ids = idsStr.split(',');
  63. var ladingBillIds = '';
  64. $.each(ids, function (inx, val) {
  65. ladingBillIds += '&ladingBillIds[]=' + val;
  66. });
  67. layer.open({
  68. type: 2,
  69. content: ['/admin/finances/detail?isSettle=1' + ladingBillIds],
  70. area: ['80%', '80%'],
  71. title: '详情'
  72. });
  73. }
  74. };
  75. var config = {};
  76. config.url = '/admin/finances/history';
  77. config.columns = [ //字段
  78. {
  79. title: '序号', align: 'center', formatter: function (value, item, index) {
  80. return index + 1;
  81. }
  82. },
  83. {title: '用户姓名', field: 'username', align: 'center'},
  84. {title: '结算金额', field: 'settle_total_amount', align: 'center'},
  85. {
  86. visible: false, field: 'ids'
  87. },
  88. {
  89. title: '操作', field: '_', align: 'center',
  90. formatter: function (value, row) {
  91. var idsStr = row.ids.join(',');
  92. return (
  93. '<button onclick="units.detail(\'' + idsStr + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-edit"></span>查看</button>&nbsp;'
  94. );
  95. }
  96. }
  97. ];
  98. config.onLoadSuccess = function (data) {
  99. // $("#settleTotal").text(data.settle_total);
  100. };
  101. tips.bootstrapTable(config);
  102. laydate.render({
  103. elem: '#start_at', //指定元素
  104. type: 'datetime'
  105. });
  106. laydate.render({
  107. elem: '#end_at', //指定元素
  108. type: 'datetime'
  109. });
  110. </script>
  111. @endsection