|
|
@@ -10,13 +10,14 @@
|
|
|
<link href="/plugins/xeasyui/toolbar.min.css" rel="stylesheet" />
|
|
|
</head>
|
|
|
<body class="easyui-layout">
|
|
|
- <!--生产日进度报表-->
|
|
|
- <!--中部主体-->
|
|
|
- <div data-options="border:false,region:'center',title:'',iconCls:'icon-grid'">
|
|
|
- <!--工具条-->
|
|
|
- <div id="tb" class="i-toolbar">
|
|
|
+
|
|
|
+ <!--上部工具条-->
|
|
|
+ <div id="toolbarLayout" data-options="border:false,region:'north',title:'',iconCls:'icon-grid'">
|
|
|
+ <div class="i-toolbar">
|
|
|
<a href="javascript:void(0)" id="btnSearch" title="搜索" class="easyui-linkbutton" iconcls="icon-search" plain="true" toggle="true" onclick="tbSearch()">搜索</a>
|
|
|
<a href="javascript:void(0)" id="btnExport" title="导出" class="easyui-linkbutton" iconcls="icon-excel" plain="true" onclick="tbExport()">导出</a>
|
|
|
+ <!--<a href="javascript:void(0)" id="btnColumn" class="easyui-menubutton" data-options="menu:'#btnColumnMenu',iconCls:'icon-undo'">列显示</a>-->
|
|
|
+ <!--<div id="btnColumnMenu" style="width:150px;" ></div>-->
|
|
|
<a href="javascript:void(0)" id="btnReload" title="刷新" class="easyui-linkbutton" iconcls="icon-reload" plain="true" onclick="tbReload()">刷新</a>
|
|
|
<a href="javascript:void(0)" id="btnHelp" title="帮助" class="easyui-linkbutton" iconcls="icon-help" plain="true" onclick="tbHelp()">帮助</a>
|
|
|
<div id="tbSearchDiv" style="display:block;padding:10px;">
|
|
|
@@ -39,15 +40,30 @@
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!--表格-->
|
|
|
- <table class="easyui-datagrid"
|
|
|
- id="DataGridMaster"
|
|
|
- data-options="toolbar: '#tb',method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
|
|
|
- <thead>
|
|
|
- </thead>
|
|
|
- </table>
|
|
|
</div>
|
|
|
|
|
|
+ <!--中部-->
|
|
|
+ <div id="tableLayout" data-options="border:false,region:'center',split:true,title:'',iconCls:'icon-grid'" title="East" style="width:700px;">
|
|
|
+ <div id="tableTabs" class="easyui-tabs" data-options="border:false" style="width: 100%; height: 100%">
|
|
|
+ <div title="汇总表">
|
|
|
+ <table class="easyui-datagrid" id="DataGridMaster"
|
|
|
+ data-options="toolbar: '#tb',method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
|
|
|
+ <thead>
|
|
|
+ </thead>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <div title="明细表">
|
|
|
+ <table class="easyui-datagrid"
|
|
|
+ id="DataGridDetail1"
|
|
|
+ data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
|
|
|
+ <thead>
|
|
|
+ </thead>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
<script type="text/javascript">
|
|
|
function formatterUA(value, row, index) {
|
|
|
return Math.round(value * 10000) / 100 + '%';
|
|
|
@@ -73,26 +89,52 @@
|
|
|
//搜索提交
|
|
|
function tbSearchSubmit() {
|
|
|
if ($('#ffMaster').form("validate")) {
|
|
|
- $('#DataGridMaster').datagridLoad({
|
|
|
- title: '',
|
|
|
- idField: 'SID',
|
|
|
- queryParams: $('#ffMaster').serializeJson(),
|
|
|
- url: 'rpt.ashx?m=master&id=' + request('id'),
|
|
|
- fixWidth: 160,
|
|
|
- mergeWidth: 100,
|
|
|
- splitChar: '_',
|
|
|
- columnMenu: '#btnColumnMenu',
|
|
|
- columnMoving: true,
|
|
|
- pagination: true,
|
|
|
- pagelist: [10000, 50, 100, 50, 1000, 5000],
|
|
|
- pageSize: 10000
|
|
|
- })
|
|
|
+ var index = $('#tableTabs').tabs('getTabIndex', $('#tableTabs').tabs('getSelected'));
|
|
|
+ if (index == 0) {
|
|
|
+ $('#DataGridMaster').datagridLoad({
|
|
|
+ title: '',
|
|
|
+ idField: 'SID',
|
|
|
+ queryParams: $('#ffMaster').serializeJson(),
|
|
|
+ url: 'rpt.ashx?m=master&id=' + request('id'),
|
|
|
+ fixWidth: 160,
|
|
|
+ mergeWidth: 100,
|
|
|
+ splitChar: '_',
|
|
|
+ columnMenu: '#btnColumnMenu',
|
|
|
+ columnMoving: true,
|
|
|
+ pagination: true,
|
|
|
+ pagelist: [10000, 50, 100, 50, 1000, 5000],
|
|
|
+ pageSize: 10000
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
+ if (index == 1) {
|
|
|
+ $('#DataGridDetail1').datagridLoad({
|
|
|
+ title: '',
|
|
|
+ idField: 'SID',
|
|
|
+ queryParams: $('#ffMaster').serializeJson(),
|
|
|
+ url: 'rpt.ashx?m=Detail1&id=' + request('id'),
|
|
|
+ fixWidth: 160,
|
|
|
+ mergeWidth: 100,
|
|
|
+ splitChar: '_',
|
|
|
+ columnMenu: '#btnColumnMenu',
|
|
|
+ columnMoving: true,
|
|
|
+ pagination: true,
|
|
|
+ pagelist: [10000, 50, 100, 50, 1000, 5000],
|
|
|
+ pageSize: 10000
|
|
|
+ })
|
|
|
+ }
|
|
|
};
|
|
|
}
|
|
|
//导出
|
|
|
function tbExport() {
|
|
|
- $('#DataGridMaster').datagrid('toExcel', '(生产日进度表).xls' + $("#datebeginMaster").datetimebox("getValue") + '_' + $("#dateendMaster").datetimebox("getValue"));
|
|
|
+
|
|
|
+ var index = $('#tableTabs').tabs('getTabIndex', $('#tableTabs').tabs('getSelected'));
|
|
|
+ if (index == 0) {
|
|
|
+ $('#DataGridMaster').datagrid('toExcel', '(生产日进度表-汇总)' + $("#datebeginMaster").datetimebox("getValue") + '_' + $("#dateendMaster").datetimebox("getValue")+'.xls');
|
|
|
+ }
|
|
|
+ if (index == 1) {
|
|
|
+ $('#DataGridDetail1').datagrid('toExcel', '(生产日进度表-明细)' + $("#datebeginMaster").datetimebox("getValue") + '_' + $("#dateendMaster").datetimebox("getValue")+'.xls');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//搜索按钮
|