chart.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <div class="blank5"></div>
  5. <div class="main">
  6. <div class="main_title_list"><div class="list-line-ico"></div>统计图表&nbsp;&nbsp;&nbsp;&nbsp;
  7. <div class="search_row">
  8. <form name="search" action="__APP__" method="get">
  9. 统计时间 :<input style="margin: 0;width:130px" type="text" class="textbox" size="8" name="start_time" id="start_time" value="{:trim($_REQUEST['start_time'])}" onfocus="return showCalendar('start_time', '%Y-%m-%d %H:%M:%S', false, false, 'start_time');" /> - <input type="text" style="width:130px" class="textbox" size="8" name="end_time" id="end_time" value="{:trim($_REQUEST['end_time'])}" onfocus="return showCalendar('end_time', '%Y-%m-%d %H:%M:%S', false, false, 'end_time');" />
  10. <input type="hidden" value="StatisticsModule" name="m" /><input type="hidden" value="chart" name="a" /><input type="submit" class="button" value="{%SEARCH}" />
  11. </form>
  12. </div>
  13. <div class="blank5"></div>
  14. <div class='wrapper'>
  15. <load href='__TMPL__Common/js/highcharts.js' />
  16. <load href='__TMPL__Common/js/exporting.js' />
  17. <script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
  18. <load href='__TMPL__Common/js/calendar/calendar.css' />
  19. <load href='__TMPL__Common/js/calendar/calendar.js' />
  20. <script type="text/javascript">
  21. var appCPURateobj = eval ("[<foreach name="list" item="cate_item" key="k"><gt name="k" value='0'>,</gt>{$cate_item.money}</foreach>]");
  22. var sysCPURateobj = eval ("[<foreach name="list2" item="cate_item" key="k"><gt name="k" value='0'>,</gt>{$cate_item.money}</foreach>]");
  23. $(function () {
  24. $('#container').highcharts({
  25. chart: {
  26. },
  27. title: {
  28. text: '查询充值与提现统计'
  29. },
  30. //x轴
  31. xAxis: {
  32. categories: [<foreach name="list" item="cate_item" key="k"><gt name="k" value='0'>,</gt>'{$cate_item.bdate|substr=5,5}'</foreach>]
  33. },
  34. tooltip: {
  35. formatter: function() {
  36. var s;
  37. if (this.point.name) { // the pie chart
  38. s = ''+
  39. this.point.name +': '+ this.y +' ';
  40. } else {
  41. s = ''+this.x+'('+ this.y+'元)';
  42. }
  43. return s;
  44. }
  45. },
  46. exporting:{
  47. enabled:false
  48. },
  49. credits: {
  50. enabled: false
  51. },
  52. series: [ {
  53. type: 'spline',
  54. name: '充值汇总',
  55. data: appCPURateobj,
  56. marker: {
  57. lineWidth: 2,
  58. lineColor: Highcharts.getOptions().colors[3],
  59. fillColor: 'white'
  60. }
  61. },
  62. {
  63. type: 'spline',
  64. name: '提现汇总',
  65. data: sysCPURateobj,
  66. marker: {
  67. lineWidth: 2,
  68. lineColor: Highcharts.getOptions().colors[4],
  69. fillColor: 'red'
  70. }
  71. }]
  72. });
  73. });
  74. //new Chart(document.getElementById("canvas").getContext("2d")).Line(myData);
  75. </script>
  76. <div align="center"><b style="font-size:16px;"><a href="__APP__?m=StatisticsModule&a=statistics_recharge&">充值金额</a>:¥{:number_format($user_payment,2)},<a href="__APP__?m=StatisticsModule&a=statistics_refund&">提现金额</a>:¥{:number_format($user_refund,2)},利润:¥{:number_format($user_payment-$user_refund,2)}</b></div>
  77. <div id="container" style="width:1000px;height:300px;margin:0 auto"></div>
  78. </div>
  79. <div class="blank5"></div>
  80. <include file="Public:footer" />