<!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>
|