balance.blade.php 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. @extends('layouts.base')
  2. <script src="{{static_url('js/echarts.js')}}" type="text/javascript"></script>
  3. @section('title', trans('余额数据统计'))
  4. @section('content')
  5. <link href="{{static_url('yunshop/css/order.css')}}" media="all" rel="stylesheet" type="text/css"/>
  6. <style>
  7. .balance-count{ margin-bottom:20px !important;line-height: 40px;height: 40px;}
  8. .status-content{ margin: 20px 0;}
  9. .panel-heading{ border: 0 !important; font-size: 1.2em !important;}
  10. .panel-body-change{ font-size: 1.5em !important;}
  11. /*.daterangepicker .right .calendar-date, .daterangepicker ul, .daterangepicker label, .daterangepicker_end_input{display:none;}*/
  12. /*[name=daterangepicker_start]{width:164px !important;}*/
  13. </style>
  14. <div class="w1200 m0a">
  15. <div class="rightlist">
  16. @include('layouts.tabs')
  17. <!-- 新增加右侧顶部三级菜单 -->
  18. <div class="panel panel-info">
  19. <div class="panel-body">
  20. <div class="card">
  21. <div class="card-content">
  22. <form action="" method="post" class="form-horizontal" role="form" id="form1">
  23. <div class='form-group col-xs-12 col-sm-6'>
  24. <div class="input-group">
  25. <span class="input-group-addon">
  26. <input type="checkbox" name="search[is_time]" value="1"
  27. @if($search['is_time'] == '1')checked="checked"@endif>
  28. </span>
  29. {!!app\common\helpers\DateRange::tplFormFieldDateRange('search[time]', [
  30. 'starttime'=>$search['time']['start'] ?: date('Y-m-d H:i:s'),
  31. 'endtime'=>$search['time']['end'] ?: date('Y-m-d H:i:s'),
  32. 'start'=>0,
  33. 'end'=>0
  34. ])!!}
  35. </div>
  36. </div>
  37. <div class="form-group col-xs-12 col-sm-4">
  38. <button class="btn btn-success" id="search"><i class="fa fa-search"></i> 搜索</button>
  39. <button type="submit" name="export" value="1" id="export" class="btn btn-default">导出 Excel</button>
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="panel panel-default">
  47. <table class='table balance-count'>
  48. <tr class='trhead'>
  49. <td colspan='8' style="text-align: left;">
  50. 余额统计:系统总余额,系统已提现余额,收入提现时转入总余额(分销佣金,股东分红,招商,区域分红,经销商提成等提现时用提现到余额的方式),后台充值余额,会员充值余额,已使用余额(只统计买单和购买)
  51. </td>
  52. </tr>
  53. </table>
  54. </div>
  55. <div class="panel panel-default">
  56. <table class='table balance-count'>
  57. <tr class='trhead'style="text-align: center;">
  58. <td>
  59. <h4>可使用余额</h4>
  60. <p style="font-size: 1.2em">{{ $balanceUseCount }}</p>
  61. </td>
  62. <td>
  63. <h4>已消耗余额</h4>
  64. <p style="font-size: 1.2em">{{ $balanceUsedCount * -1 }}</p>
  65. </td>
  66. <td>
  67. <h4>已提现余额</h4>
  68. <p style="font-size: 1.2em">{{ $balanceWithdrawCount * -1 }}</p>
  69. </td>
  70. <td>
  71. <h4>收入余额</h4>
  72. <p style="font-size: 1.2em">{{ $balanceIncomeCount }}</p>
  73. </td>
  74. <td>
  75. <h4>后台充值余额</h4>
  76. <p style="font-size: 1.2em">{{ $balanceRechargeCount }}</p>
  77. </td>
  78. <td>
  79. <h4>会员充值余额</h4>
  80. <p style="font-size: 1.2em">{{ $balanceMemberRechargeCount }}</p>
  81. </td>
  82. {{--<td>--}}
  83. {{--<h4>已赠送余额</h4>--}}
  84. {{--<p style="font-size: 1.2em">{{ $balanceGivenCount }}</p>--}}
  85. {{--</td>--}}
  86. </tr>
  87. </table>
  88. </div>
  89. <div class="panel panel-default">
  90. <table class='table' style='float:left;margin-bottom:0;table-layout: fixed;line-height: 40px;height: 40px'>
  91. <tr class='trhead'>
  92. <td colspan='8' style="text-align: left;">
  93. 余额趋势图
  94. </td>
  95. </tr>
  96. </table>
  97. </div>
  98. <div class='panel panel-default form-horizontal form'>
  99. <div class='panel-body'style="border: 1px solid #e6e6e6">
  100. <div id="balanceChart" style="width: 100%;height:400px;float: left;"></div>
  101. </div>
  102. </div>
  103. <div class="panel panel-default" style="border: 1px solid #e6e6e6; margin-top: 10px;">
  104. <div class="panel-heading">详细数据</div>
  105. <div class='panel-body'>
  106. <table class="table table-hover table-responsive table-striped">
  107. <thead>
  108. <tr>
  109. <th >时间</th>
  110. <th >可使用余额</th>
  111. <th >已消耗余额</th>
  112. <th >已提现余额</th>
  113. <th >收入余额</th>
  114. <th >后台充值余额</th>
  115. <th >会员充值余额</th>
  116. {{--<th >已赠送余额</th>--}}
  117. </tr>
  118. </thead>
  119. <tbody>
  120. @foreach($AllBalanceData as $key => $item)
  121. <tr>
  122. <td>
  123. {{ $item['date'] }}
  124. </td>
  125. <td>{{ $item['useBalance'] }}</td>
  126. <td>
  127. {{ $item['usedBalance'] }}
  128. </td>
  129. <td>
  130. {{ $item['withdrawBalance'] }}
  131. </td>
  132. {{--<td>--}}
  133. {{--{{ $item['givenBalance'] }}--}}
  134. {{--</td>--}}
  135. <td>
  136. {{ $item['incomeBalance'] }}
  137. </td>
  138. <td>
  139. {{ $item['recharge'] }}
  140. </td>
  141. <td>
  142. {{ $item['memberRecharge'] }}
  143. </td>
  144. </tr>
  145. @endforeach
  146. </table>
  147. {!! $page !!}
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. <script type="text/javascript">
  153. //余额统计
  154. var balanceChart = echarts.init(document.getElementById('balanceChart'));
  155. {{--gender_data = {!! $gender !!};--}}
  156. option = {
  157. tooltip: {
  158. trigger: 'axis'
  159. },
  160. legend: {
  161. data:['可使用余额','已消耗余额','已提现余额','收入余额','后台充值余额','会员充值余额']
  162. },
  163. grid: {
  164. left: '3%',
  165. right: '4%',
  166. bottom: '3%',
  167. containLabel: true
  168. },
  169. toolbox: {
  170. feature: {
  171. saveAsImage: {}
  172. }
  173. },
  174. xAxis: {
  175. type: 'category',
  176. boundaryGap: false,
  177. data: {!! $balanceTime !!}
  178. },
  179. yAxis: {
  180. type: 'value'
  181. },
  182. series: [
  183. {
  184. name:'可使用余额',
  185. type:'line',
  186. stack: '总量4',
  187. data:{!! $balanceUseData !!}
  188. },
  189. {
  190. name:'已消耗余额',
  191. type:'line',
  192. stack: '总量3',
  193. data:{!! $balanceUsedData !!}
  194. },
  195. {
  196. name:'已提现余额',
  197. type:'line',
  198. stack: '总量1',
  199. data:{!! $balanceWithdrawData !!}
  200. },
  201. {
  202. name:'收入余额',
  203. type:'line',
  204. stack: '总量2',
  205. data:{!! $balanceIncomeData !!}
  206. },
  207. {
  208. name:'后台充值余额',
  209. type:'line',
  210. stack: '总量5',
  211. data:{!! $balanceRechargeData !!}
  212. },
  213. {
  214. name:'会员充值余额',
  215. type:'line',
  216. stack: '总量6',
  217. data:{!! $balanceMemberRechargeData !!}
  218. },
  219. ]
  220. };
  221. balanceChart.setOption(option, true);
  222. </script>
  223. <script>
  224. $(function () {
  225. $('#export').click(function () {
  226. $('#form1').attr('action', '{!! yzWebUrl('charts.finance.balance.export') !!}');
  227. $('#form1').submit();
  228. setTimeout(() =>{
  229. $('#form1').attr('action', " ");
  230. },0)
  231. });
  232. });
  233. </script>
  234. @endsection