toStatement.jsp 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  6. <title>固定资产报表</title>
  7. <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  8. <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
  9. <script type="text/javascript" src="/shares/datePicker/WdatePicker.js"></script>
  10. <script type="text/javascript" src="/shares/js/jquery-1.9.0.min.js"></script>
  11. <script type="text/javascript" src="/shares/highcharts/js/highcharts.js"></script>
  12. <script type="text/javascript" src="/shares/highcharts/js/modules/exporting.js"></script>
  13. <script type="text/javascript" src="/shares/highcharts/js/modules/data.js"></script>
  14. <!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> -->
  15. <!-- <script src="http://code.highcharts.com/highcharts.js"></script> -->
  16. <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
  17. <style type="text/css">
  18. body {
  19. overflow: hidden;
  20. background: #fff;
  21. }
  22. .default_search li{height:25px}
  23. .default_search ul{display:inline;width:250px;float:left;}
  24. .default_search li.text{float:left;width:151px;padding-top:5px;}
  25. .default_search li.title{float:left;width:90px;padding-top:9px;text-align: right;padding-left: 5px; font-size: 13px;font-weight: normal;}
  26. .search-button {padding-top:5px;float:left;}
  27. .default_search li input[type='text']{width:100px;background:#fff; height:18px;border-style: inherit; line-height: 18px}
  28. .default_search li select{height:20px;border-style: inherit; line-height: 21px; }
  29. </style>
  30. <script type="text/javascript">
  31. $(function (){
  32. createQuarterChartForAccount();
  33. });
  34. function createQuarterChartForAccount() {
  35. changeQuarterChart();
  36. var name_ = [];
  37. var count_ = [];
  38. var sum_ = [];
  39. $.ajax({
  40. type : "POST",
  41. url : "erpAssetReportForms.do?task=getChartDataForAccount",
  42. dataType : 'json',
  43. async : false,
  44. success : function(data) {
  45. if (data != null && data.length != 0) {
  46. for (var i = 0; i < data.length; i++) {
  47. name_[i] = new Array(data[i].asset_type_name);
  48. count_[i] = data[i].asset_count;
  49. sum_[i] = data[i].sum_asset;
  50. }
  51. }
  52. }
  53. });
  54. $('#container').highcharts({
  55. chart: {
  56. type: 'column'
  57. },
  58. lang : {
  59. printChart : '打印图表',
  60. downloadJPEG : '下载JPEG图片',
  61. downloadPDF : '下载PDF文件',
  62. downloadPNG : '下载PNG图片',
  63. downloadSVG : '下载SVG矢量图'
  64. },
  65. credits : {
  66. enabled : false
  67. },
  68. title: {
  69. text: '固定资产台帐',
  70. style: {
  71. fontSize: "28px"
  72. }
  73. },
  74. xAxis: {
  75. categories: name_
  76. },
  77. yAxis: {
  78. min: 0,
  79. title: {
  80. text: '数值'
  81. }
  82. },
  83. tooltip: {
  84. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  85. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  86. '<td style="padding:0"><b>{point.y:.0f}</b></td></tr>',
  87. footerFormat: '</table>',
  88. shared: true,
  89. useHTML: true
  90. },
  91. plotOptions: {
  92. column: {
  93. pointPadding: 0.2,
  94. borderWidth: 0
  95. }
  96. },
  97. series: [{
  98. name: '资产数量',
  99. data: count_
  100. }, {
  101. name: '资产金额',
  102. data: sum_
  103. }]
  104. });
  105. }
  106. function createQuarterChartForTendency() {
  107. var sum_ = [];
  108. var date_ = [1,2,3,4,5,6,7,8,9,10,11,12];
  109. var sel_date = $("#sel_date").val();
  110. if("" == sel_date){
  111. document.getElementById("msg").innerHTML="<font color='red'>&nbsp;请选择年份!</font>";
  112. return;
  113. }else{
  114. document.getElementById("msg").innerHTML="";
  115. }
  116. $.ajax({
  117. type : "POST",
  118. url : "erpAssetReportForms.do?task=getChartDataForTendency&sel_date="+sel_date,
  119. dataType : 'json',
  120. async : false,
  121. success : function(data) {
  122. if (data != null && data.length != 0) {
  123. var temp = 0;
  124. for (var i = 0; i < date_.length; i++) {
  125. if(date_[i] == data[temp].month_date){
  126. sum_[i] = data[temp].asset_sum;
  127. if(data.length > temp+1){
  128. temp ++;
  129. }
  130. }else{
  131. sum_[i] = 0;
  132. }
  133. }
  134. }
  135. }
  136. });
  137. $('#container').highcharts({
  138. chart: {
  139. type: 'line'
  140. },
  141. lang : {
  142. printChart : '打印图表',
  143. downloadJPEG : '下载JPEG图片',
  144. downloadPDF : '下载PDF文件',
  145. downloadPNG : '下载PNG图片',
  146. downloadSVG : '下载SVG矢量图'
  147. },
  148. credits : {
  149. enabled : false
  150. },
  151. title: {
  152. text: sel_date+'年度公司资产趋势图',
  153. style: {
  154. fontSize: "28px"
  155. }
  156. },
  157. xAxis: {
  158. categories: [
  159. '一月',
  160. '二月',
  161. '三月',
  162. '四月',
  163. '五月',
  164. '六月',
  165. '七月',
  166. '八月',
  167. '九月',
  168. '十月',
  169. '十一月',
  170. '十二月'
  171. ]
  172. },
  173. yAxis: {
  174. title: {
  175. text: '金额'
  176. }
  177. },
  178. tooltip: {
  179. enabled: false,
  180. formatter: function() {
  181. return '<b>'+ this.series.name +'</b><br/>'+this.x +': '+ this.y;
  182. }
  183. },
  184. plotOptions: {
  185. line: {
  186. dataLabels: {
  187. enabled: true
  188. },
  189. enableMouseTracking: false
  190. }
  191. },
  192. series: [{
  193. name: '金额',
  194. data: sum_
  195. }]
  196. });
  197. }
  198. function changeQuarterChart(type){
  199. document.getElementById("container").innerHTML="";
  200. if(type == '0'){
  201. document.getElementById("year").style.display="";
  202. createQuarterChartForTendency();
  203. }else{
  204. document.getElementById("year").style.display="none";
  205. }
  206. }
  207. </script>
  208. </head>
  209. <body>
  210. <div class="s_title b10 f6">
  211. <img src="/shares/images/master1/fqlc.png" width="27" height="26" /> 报表分析
  212. </div>
  213. <div class="container-layout" style="margin-top: 50px;">
  214. <div class="lc_b_div">
  215. <div class="lc_btn">
  216. <a href="#" class="f8" onclick="createQuarterChartForAccount();" title="固定资产台帐">
  217. <img src="/shares/images/master1/lc_ico.png" width="19" height="21" />固定资产台帐
  218. </a>
  219. </div>
  220. <div class="lc_btn">
  221. <a href="#" class="f8" onclick="changeQuarterChart('0');" title="年度公司资产趋势图">
  222. <img src="/shares/images/master1/lc_ico.png" width="19" height="21" />年度公司资产趋势图
  223. </a>
  224. </div>
  225. </div>
  226. <div id="year" class="default_search" style="margin: 0;display: none;">
  227. <ul class="list_search">
  228. <li class="title" style="width: 100px;font-family:'新宋体';font-size:9pt;">年度:</li>
  229. <li class="text" style="width: 135px;">
  230. <input type="text" class="Wdate" name="sel_date" id="sel_date" onclick="WdatePicker({dateFmt:'yyyy'})"
  231. value="${requestScope.currentYear }">
  232. </li>
  233. </ul>
  234. <div style="float: left;">
  235. <input type="button" class="l-button" value="生成报表" onclick="createQuarterChartForTendency()" style="width: 80px;" />
  236. </div>
  237. <div id="msg" style="float: left;"></div>
  238. </div>
  239. <div id="container" style="min-width: 700px; height: 400px"></div>
  240. </div>
  241. </body>
  242. </html>