finances_collection.blade.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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">
  9. 收款金额=合同总金额:<span id="sum_total">{{$sum_total??0}}</span>
  10. </div>
  11. <div class="ibox-content">
  12. <form class="form-inline" id="searchForm" onsubmit="units.search();return false;">
  13. <div class="form-group" style="margin-top: 5px;">
  14. <div class="input-group">
  15. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
  16. name="keyword"
  17. id="keyword">
  18. <span class="input-group-btn">
  19. <button type="button" class="btn btn-md btn-primary"
  20. onclick="units.search()"> 搜索</button>
  21. <button type="reset" class="btn btn-md btn-primary" style="margin-left: 10px"
  22. name="resetBtn"> 重置</button>
  23. </span>
  24. </div>
  25. </div>
  26. </form>
  27. <hr>
  28. <div class="table-responsive">
  29. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. </body>
  37. @endsection
  38. @section('footer')
  39. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  40. <script>
  41. var units = {
  42. getIdsBySelections: function () {
  43. var selections = $("#table").bootstrapTable('getSelections');
  44. var ids = [];
  45. $.each(selections, function (inx, val) {
  46. ids.push(val.id);
  47. });
  48. return ids;
  49. },
  50. save: function (id,type_status) {
  51. layer.open({
  52. type: 2,
  53. content: ['/admin/finance/' + id + '/save'],
  54. area: ['90%', '80%'],
  55. title: '信息详情'
  56. });
  57. },
  58. search: function () {
  59. tips.selectPage();
  60. },
  61. };
  62. var config = {};
  63. config.url = '/admin/finances/finances_collection';
  64. config.columns = [ //字段
  65. {
  66. title: '序号', align: 'center', formatter: function (value, item, index) {
  67. return index + 1;
  68. }
  69. },
  70. {title: '项目ID', field: 'id', align: 'center'},
  71. {title: '项目名称', field: 'cn_title', align: 'center'},
  72. {title: '合同总金额', field: 'contract_total_fee', align: 'center'},
  73. {title: '维基百科费用', field: 'wiki_fee', align: 'center'},
  74. {title: '其他费用', field: 'other_fee', align: 'center'},
  75. {title: '项目状态', field: 'status_title', align: 'center'},
  76. {title: '创建时间', field: 'created_at', align: 'center'},
  77. {
  78. title: '操作', field: 'id', align: 'center',
  79. formatter: function (value, row) {
  80. var str = '';
  81. // if (row.status === 1) {
  82. str += '<button onclick="units.save(' + value + ')" class="btn btn-xs"><span class="glyphicon glyphicon-edit"></span>查看详情</button>';
  83. // }
  84. return str;
  85. }
  86. },
  87. ];
  88. tips.bootstrapTable(config);
  89. config.onLoadSuccess = function (data) {
  90. $("#sum_total").text(data.sum_total);
  91. };
  92. laydate.render({
  93. elem: '#start_at', //指定元素
  94. type: 'datetime'
  95. });
  96. laydate.render({
  97. elem: '#end_at', //指定元素
  98. type: 'datetime'
  99. });
  100. </script>
  101. @endsection