stat_predeposit.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.ds_stattrade}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <div class="fixed-empty"></div>
  13. <form method="get" name="formSearch" id="formSearch">
  14. <input type="hidden" name="" value="" />
  15. <div class="ds-search-form">
  16. <dl>
  17. <dd>
  18. <select name="pd_type" id="pd_type" class="querySelect">
  19. <option value="recharge" {$Request.param.pd_type =='recharge'?'selected':''}>{$Think.lang.pd_type_recharge}</option>
  20. <option value="order_pay" {$Request.param.pd_type =='order_pay'?'selected':''}>{$Think.lang.pd_type_order_pay}</option>
  21. <option value="cash_pay" {$Request.param.pd_type =='cash_pay'?'selected':''}>{$Think.lang.pd_type_cash_pay}</option>
  22. <option value="refund" {$Request.param.pd_type =='refund'?'selected':''}>{$Think.lang.pd_type_refund}</option>
  23. </select>
  24. </dd>
  25. <dd>
  26. <select name="search_type" id="search_type" class="querySelect">
  27. <option value="day" {$Request.param.search_type =='day'?'selected':''}>{$Think.lang.search_type_day}</option>
  28. <option value="week" {$Request.param.search_type =='week'?'selected':''}>{$Think.lang.search_type_week}</option>
  29. <option value="month" {$Request.param.search_type =='month'?'selected':''}>{$Think.lang.search_type_month}</option>
  30. </select>
  31. </dd>
  32. <dd id="searchtype_day" style="display:none;">
  33. <input class="txt date" type="text" value="{$Request.param.search_time}" id="search_time" name="search_time">
  34. </dd>
  35. <dd id="searchtype_week" style="display:none;">
  36. <select name="search_time_year" class="querySelect">
  37. {foreach name="year_arr" item="v"}
  38. <option value="{$key}" {$current_year == $key ?'selected':''}>{$v}</option>
  39. {/foreach}
  40. </select>
  41. <select name="search_time_month" class="querySelect">
  42. {foreach name="month_arr" item="v"}
  43. <option value="{$key}" {$current_month == $key ? 'selected' :''}>{$v}</option>
  44. {/foreach}
  45. </select>
  46. <select name="search_time_week" class="querySelect">
  47. {foreach name="week_arr" item="v"}
  48. <option value="{$v.key}" {$current_week == $v.key ?'selected' :''}>{$v.val}</option>
  49. {/foreach}
  50. </select>
  51. </dd>
  52. <dd id="searchtype_month" style="display:none;">
  53. <select name="search_time_year" class="querySelect">
  54. {foreach name="year_arr" item="v"}
  55. <option value="{$key}" {$current_year == $key ?'selected':''}>{$v}</option>
  56. {/foreach}
  57. </select>
  58. <select name="search_time_month" class="querySelect">
  59. {foreach name="month_arr" item="v"}
  60. <option value="{$key}" {$current_month == $key ?'selected':''}>{$v}</option>
  61. {/foreach}
  62. </select>
  63. </dd>
  64. </dl>
  65. <div class="btn_group">
  66. <a href="javascript:void(0);" id="dssubmit" class="btn tooltip" >{$Think.lang.ds_query}</a>
  67. <a href="{:url('Stattrade/predeposit')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
  68. </div>
  69. </div>
  70. </form>
  71. <div class="stat-info">
  72. <span>{$Think.lang.recharge_amount}:
  73. <strong>{:number_format($stat_array.recharge_amount,2)}</strong>
  74. {$Think.lang.ds_yuan}</span>
  75. <span>{$Think.lang.order_amount}:
  76. <strong>{:number_format($stat_array.order_amount,2)}</strong>
  77. {$Think.lang.ds_yuan}</span>
  78. <span>{$Think.lang.cash_amount}:
  79. <strong>{:number_format($stat_array.cash_amount,2)}</strong>
  80. {$Think.lang.ds_yuan}</span>
  81. <span>{$Think.lang.usable_amount}:
  82. <strong>{:number_format($usable_amount,2)}</strong>
  83. {$Think.lang.ds_yuan}</span>
  84. <span>{$Think.lang.user_amount}:
  85. <strong>{:intval($user_amount)}</strong>
  86. </span>
  87. </div>
  88. <div id="container" class="w100pre close_float" style="height:400px"></div>
  89. <div style="text-align:right;">
  90. <input type="hidden" id="export_type" data-url="{:url(request()->controller().'/'.request()->action())}/exporttype/excel" name="export_type" data-param='{"url":"{$actionurl}/pd_type/{$Request.param.pd_type}/exporttype/excel"}' value="excel"/>
  91. <a class="btn btn-mini" href="javascript:void(0);" id="export_btn">{$Think.lang.ds_export}Excel</a> </div>
  92. <table class="ds-default-table">
  93. <thead>
  94. <tr class="thead">
  95. <th class="align-center">{$Think.lang.ds_member_name}</th>
  96. <th class="align-center">{$Think.lang.lg_addtime}</th>
  97. <th class="align-center">{$Think.lang.lg_av_amount}({$Think.lang.ds_yuan})</th>
  98. <th class="align-center">{$Think.lang.lg_freeze_amount}({$Think.lang.ds_yuan})</th>
  99. <th class="align-center">{$Think.lang.lg_admin_name}</th>
  100. <th class="align-center">{$Think.lang.operate_type}</th>
  101. <th class="align-center">{$Think.lang.ds_description}</th>
  102. </tr>
  103. </thead>
  104. <tbody id="datatable">
  105. {notempty name="log_list"}
  106. {foreach name="log_list" item="v"}
  107. <tr class="hover">
  108. <td class="align-center">{$v.lg_member_name}</td>
  109. <td class="align-center">{:date('Y-m-d H:i:s',$v.lg_addtime)}</td>
  110. <td class="align-center">{$v.lg_av_amount}</td>
  111. <td class="align-center">{$v.lg_freeze_amount}</td>
  112. <td class="align-center">{$v.lg_admin_name}</td>
  113. <td class="align-center">
  114. {switch name="v.lg_type"}
  115. {case value="recharge"}{$Think.lang.pd_type_recharge}{/case}
  116. {case value="order_pay"}{$Think.lang.pd_type_order_pay}{/case}
  117. {case value="cash_pay"}{$Think.lang.pd_type_cash_pay}{/case}
  118. {case value="refund"}{$Think.lang.pd_type_refund}{/case}
  119. {/switch}
  120. </td>
  121. <td class="align-center">{$v.lg_desc}</td>
  122. </tr>
  123. {/foreach}
  124. {else /}
  125. <tr class="no_data">
  126. <td colspan="15">{$Think.lang.ds_no_record}</td>
  127. </tr>
  128. {/notempty}
  129. </tbody>
  130. </table>
  131. {$show_page|raw}
  132. </div>
  133. <script src="{$Think.PLUGINS_SITE_ROOT}/highcharts/highcharts.js"></script>
  134. <script src="{$Think.PLUGINS_SITE_ROOT}/statistics.js"></script>
  135. <script>
  136. //展示搜索时间框
  137. function show_searchtime(){
  138. s_type = $("#search_type").val();
  139. $("[id^='searchtype_']").hide();
  140. $("#searchtype_"+s_type).show();
  141. }
  142. $(function () {
  143. //统计数据类型
  144. var s_type = $("#search_type").val();
  145. $('#search_time').datepicker({dateFormat: 'yy-mm-dd'});
  146. show_searchtime();
  147. $("#search_type").change(function(){
  148. show_searchtime();
  149. });
  150. //更新周数组
  151. $("[name='search_time_month']").change(function(){
  152. var year = $("[name='search_time_year']").val();
  153. var month = $("[name='search_time_month']").val();
  154. $("[name='search_time_week']").html('');
  155. $.getJSON(ADMINSITEURL+'/Common/getweekofmonth',{y:year,m:month},function(data){
  156. if(data != null){
  157. for(var i = 0; i < data.length; i++) {
  158. $("[name='search_time_week']").append('<option value="'+data[i].key+'">'+data[i].val+'</option>');
  159. }
  160. }
  161. });
  162. });
  163. $('#container').highcharts({$stat_json|raw});
  164. $('#dssubmit').click(function(){
  165. $('#formSearch').submit();
  166. });
  167. $('select[name="search_time_year"]').change(function(){
  168. var s_year = $(this).val();
  169. $('select[name="search_time_year"]').each(function(){
  170. $(this).val(s_year);
  171. });
  172. });
  173. $('select[name="search_time_month"]').change(function(){
  174. var s_month = $(this).val();
  175. $('select[name="search_time_month"]').each(function(){
  176. $(this).val(s_month);
  177. });
  178. });
  179. //导出图表
  180. $("#export_btn").click(function(){
  181. var item = $("#export_type");
  182. var type = $(item).val();
  183. if(type == 'excel'){
  184. export_xls(item.attr('data-url').replace('.html',''));
  185. }
  186. });
  187. $('#dsexport').click(function(){
  188. $('#formSearch').submit();
  189. });
  190. });
  191. </script>