cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title></title>
[#include "/business/pages/include/static.html" /]
 
[#include "/component/newsel.html" /]
[#include "/component/cfgcateSelector.html" /]
<style>
.tonji{width:100%;table-layout:auto;border-collapse:collapse;border-spacing:0; border-top:1px solid #666;border-left:1px solid #666}
.tonji td{ border-bottom:1px solid #666;border-right:1px solid #666;line-height:24px;padding-left:10px;}
</style>
</head>
<body>
<form id="myform" >
        <div class="event_fill sa_event_fill">
        <table><tr><th width="85%">
              <div class="fill_item" class="els">
                    <label>年份:</label>
                     <select name="year" id="year" style="width:142px;height:26px;">
                       <option value="${year}">${year}</option>
                       <option value="${lastYear}">${lastYear}</option>
                       <option value="${flowYear}">${flowYear}</option>
                    </select>
              </div>
           <div class="fill_item">
                <label>备件分类:</label>
                   [@cfgcate id="full_cate_id" name="full_cate_name" catetype="2"/]
               </div>
        </th><td width="15%">
           <!--  <a class="retrievebtn" href="javascript:window.location.reload(true);">重置</a> -->
            <a class="retrievebtn" id="reset">重置</a>
            <a class="retrievebtn focus" href="javascript:query();">查询</a>
        </td></tr></table>
        </div>
     
   <div class="clearfix"></div>
      <div class="statnan_right">
              <div id="pieChart" style="width:98%;height:90%;"></div>
      </div>
 </form>     
<script type="text/javascript">
 
 
function query() {
     var cate_ids =$("#full_cate_id").val();
       var arr = cate_ids.split("-");
       var cate_id="";
      if(arr!=""){
        cate_id=arr[2];
       }
       /* if($.util.isEmpty(cate_id)){
        popupTips("请选择备件分类!");
          return;
      } */
      var year=$("#year").val();
       if($.util.isEmpty(year)){
        popupTips("请选择年份!");
          return;
      }
 
        $.post("${base}/business/pages/tj/sparePartStatis/deliveryDatatj.html",{"cate_id":cate_id,"year":year},function(data){
                var obj = eval("("+data+")");
                showPieChart(obj);
       });
}
 
 
 
function showPieChart(data) {
    var charTitle = '<b>'+'备品备件出入库统计';
    
       $("#pieChart").highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: '<b>'+'备品备件出入库统计'
        },
       
        xAxis:{
          categories:[
          '1月',
          '2月',
          '3月',
          '4月',
          '5月',
          '6月',
          '7月',
          '8月',
          '9月',
          '10月',
          '11月',
          '12月'
          ],
        crosshair:true
        },
        
        plotOptions: {
            column: {
               pointPadding:0.2,
               borderWidth:0,
               dataLabels:{
                   enabled:true
               }
            }
        },
        series:data
    });
 
 
$(function() {
     $("#reset").click(function () {
         $("#full_cate_id").val("");
          $("#myform")[0].reset();
        });
     query();
    })
 
 
 
</script>
 
</body>
</html>