idleCompareMonth.jsp
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<%@ include file="/common/taglibs.jsp"%>
<div class="easyui-layout" data-options="fit:true" style="overflow:auto;">
<script>
$('#idleCompareMonthOrgTree').tree({
onClick: function(node){
loadIdleCompareMonthData(node.id);
}
});
function loadIdleCompareMonthData(nodeId){
var url='<c:url value="/report/idleCompareMonth/showdata.html"/>';
url+="?orgid="+nodeId;
$.messager.progress({
title:'请等待',
msg:'正在加载数据...'
});
$.post(url,{},function(data){
$.messager.progress('close');
if(data.icmList.length==0){
$.messager.alert('Warning','您所选公司没有数据......');
}else{
$('#idleCompareMonth').datagrid('loadData',data.icmList);
}
});
$('#idleCompareMonth').datagrid({
striped: true,
fitColumns: true
});
}
function changeColor(index,row){
var thePattern=/\**\*/;
var thename=row.itemname;
if(thename.match(thePattern)){
return 'background-color:#d9d9c2;';
}
}
function exportExcel(){
var url='<c:url value="/report/idleCompareMonth/export.html"/>';
url+="?orgid="+$('#idleCompareMonthOrgTree').tree('getSelected').id;
window.open(url);
}
</script>
<!-- Menu -->
<div data-options="region:'west',title:'组织树',split:true,lines:true,
url:'<c:url value='/common/orgTreeAsync.html?defaultExpandLv=2&orgMaxType=3'/>'"
style="width:150px;height:100%;overflow:auto;" class="easyui-tree" id="idleCompareMonthOrgTree${dataReportId}">
</div>
<!-- center region -->
<div data-options="region:'center',title:'',iconCls:'icon-ok'" id="centerRegion" style="overflow:auto;">
<style type="text/css">
<!--
.style1 {
color: #0000FF;
font-weight: bold;
}
.style2 {color: #0000FF}
-->
</style>
<script type="text/javascript">
function cellStyler(value,row,index){
if (index %11==0 && index!=0){
return 'border-top:2px solid #000000;';
}
}
</script>
<table cellspacing="0" cellpadding="0" height="100%" width="100%">
<tr height="12px">
<th align="center" ><strong>XXXX 有 限 公 司</strong></th>
</tr>
<tr height="12px">
<th align="center"><strong>折旧/闲置/停工比较表</strong></th>
</tr >
<tr height="12px" style="border-top:5px solid #aaa;">
<th align="center"><strong>2013年月份别预算</strong></th>
</tr>
<tr height="12px">
<th align="left" ><strong>单位:人民币元</strong></th>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" class="easyui-datagrid" title="折旧/闲置/停工月份表"
id="idleCompareMonth" data-options="rownumbers: true,
showFooter: false,
toolbar: '#idleCompareMonth_report_excel_export',
rowStyler:changeColor"
>
<thead>
<tr>
<th width="90" data-options="field:'title',styler:cellStyler">月份</th>
<th width="80" data-options="field:'itemname',styler:cellStyler">项目</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_1',styler:cellStyler">1月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_2',styler:cellStyler">2月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_3',styler:cellStyler">3月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_4',styler:cellStyler">4月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_5',styler:cellStyler">5月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_6',styler:cellStyler">6月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_7',styler:cellStyler">7月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_8',styler:cellStyler">8月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_9',styler:cellStyler">9月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_10',styler:cellStyler">10月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_11',styler:cellStyler">11月</th>
<th width="55" formatter=Formatter.money data-options="field:'month_money_12',styler:cellStyler">12月</th>
<th width="55" formatter=Formatter.money data-options="field:'total',styler:cellStyler">合计</th>
</tr>
</thead>
</div>
</div>
<div id="idleCompareMonth_report_excel_export" style="padding:5px;height:auto">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" οnclick="exportExcel()">导出excel</a>
</div>