|
|
@@ -18,7 +18,7 @@
|
|
|
<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>-->
|
|
|
+ <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;">
|
|
|
@@ -28,8 +28,6 @@
|
|
|
<input class="easyui-datetimebox" id="datebeginMaster" name="datebeginMaster" data-options="required:true,prompt:'',tipPosition:'top'" style="width: 165px; height: 32px;">
|
|
|
截止日期:
|
|
|
<input class="easyui-datetimebox" id="dateendMaster" name="dateendMaster" data-options="required:true,prompt:'',tipPosition:'top'" style="width: 165px; height: 32px;">
|
|
|
- 成型线:
|
|
|
- <input class="easyui-combobox" id="groutinglineMaster" name="groutinglineMaster" data-options="required:false,prompt:'',tipPosition:'top',url:'../../rpt/rpt.ashx?m=getLine&select=1',method:'get',valueField:'GROUTINGLINECODE',textField:'GROUTINGLINECODE',panelHeight:'300px',editable:true ,multiple:false" style="width: 165px; height: 32px;">
|
|
|
产品编码:
|
|
|
<input class="easyui-combobox" id="goodsMaster" name="goodsMaster" data-options="required:false,prompt:'',tipPosition:'top',url:'../../rpt/rpt.ashx?m=getGoods&select=1',method:'get',valueField:'GOODSID',textField:'GOODSCODE',panelHeight:'300px',editable:true,multiple:true" style="width:165px;height:32px;">
|
|
|
|
|
|
@@ -40,134 +38,133 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--表格-->
|
|
|
- <table class="easyui-datagrid"
|
|
|
- id="DataGridMaster"
|
|
|
- data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:false">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th data-options="field:'成型线编码',title:'成型线编码',align:'left',sortable:true,width:80"></th>
|
|
|
- <th data-options="field:'产品编码',title:'产品编码',align:'left',sortable:true,width:80"></th>
|
|
|
- <th data-options="field:'期初数量',title:'期初数量',align:'left',sortable:true,width:80"></th>
|
|
|
- <th data-options="field:'接收数量',title:'接收数量',align:'left',sortable:true,width:80"></th>
|
|
|
- <th data-options="field:'干补回收',title:'干补回收',align:'left',sortable:true,width:80"></th>
|
|
|
- <th data-options="field:'损坯数量',title:'损坯数量',align:'left',sortable:true,width:80"></th>
|
|
|
- <th data-options="field:'发出数量',title:'发出数量',align:'left',sortable:true,width:80"></th>
|
|
|
- <th data-options="field:'期末数量',title:'期末数量',align:'left',sortable:true,width:80"></th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
+ <table class="easyui-datagrid"
|
|
|
+ id="DataGridMaster"
|
|
|
+ data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:false">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th data-options="field:'产品编码',title:'产品编码',align:'left',sortable:true,width:80"></th>
|
|
|
+ <th data-options="field:'期初数量',title:'期初数量',align:'left',sortable:true,width:80"></th>
|
|
|
+ <th data-options="field:'接收数量',title:'接收数量',align:'left',sortable:true,width:80"></th>
|
|
|
+ <th data-options="field:'干补回收',title:'干补回收',align:'left',sortable:true,width:80"></th>
|
|
|
+ <th data-options="field:'损坯数量',title:'损坯数量',align:'left',sortable:true,width:80"></th>
|
|
|
+ <th data-options="field:'发出数量',title:'发出数量',align:'left',sortable:true,width:80"></th>
|
|
|
+ <th data-options="field:'期末数量',title:'期末数量',align:'left',sortable:true,width:80"></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
|
|
|
- <!--中部右侧-->
|
|
|
- <!--<div data-options="border:false,region:'east',split:true,title:'子报表',iconCls:'icon-grid'" title="East" style="width:700px;">
|
|
|
+ <!--中部右侧-->
|
|
|
+ <!--<div data-options="border:false,region:'east',split:true,title:'子报表',iconCls:'icon-grid'" title="East" style="width:700px;">
|
|
|
<table class="easyui-datagrid"
|
|
|
id="DataGridDetail"
|
|
|
data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
|
|
|
</table>
|
|
|
</div>-->
|
|
|
|
|
|
- <script type="text/javascript">
|
|
|
+ <script type="text/javascript">
|
|
|
|
|
|
- function formatterUA(value, row, index) {
|
|
|
- return Math.round(value * 10000) / 100 + '%';
|
|
|
- }
|
|
|
+ function formatterUA(value, row, index) {
|
|
|
+ return Math.round(value * 10000) / 100 + '%';
|
|
|
+ }
|
|
|
|
|
|
- $(document).ready(function () {
|
|
|
- var ctime = new Date();
|
|
|
- var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + " 00:00:00";
|
|
|
- var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + " 23:59:59";
|
|
|
- $("#datebeginMaster").datetimebox("setValue", beginDate);
|
|
|
- $("#dateendMaster").datetimebox("setValue", endDate);
|
|
|
- //tbSearchSubmit();
|
|
|
- });
|
|
|
- // 清空恢复默认值
|
|
|
- function toClear() {
|
|
|
- $('#ffMaster').form('clear');
|
|
|
- var ctime = new Date();
|
|
|
- var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + " 00:00:00";
|
|
|
- var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + " 23:59:59";
|
|
|
- $("#datebeginMaster").datetimebox("setValue", beginDate);
|
|
|
- $("#dateendMaster").datetimebox("setValue", endDate);
|
|
|
- }
|
|
|
- //加载子表数据
|
|
|
- function LoadDataGridDetail(index, row) {
|
|
|
- //if ($('#ffDetail').form("validate")) {
|
|
|
- // $('#DataGridDetail').datagridLoadRpt({
|
|
|
- // title: '明细表',
|
|
|
- // idField: 'SID',
|
|
|
- // queryParams: $('#ffDetail').serializeJson(),
|
|
|
- // url: 'rpt.ashx?m=detail&id=' + $('#DataGridMaster').datagrid('getSelections')[0]['SID'],
|
|
|
- // fixWidth: 120,
|
|
|
- // mergeWidth: 100,
|
|
|
- // splitChar: '_',
|
|
|
- // columnMoving: true
|
|
|
- // });
|
|
|
- //}
|
|
|
- }
|
|
|
+ $(document).ready(function () {
|
|
|
+ var ctime = new Date();
|
|
|
+ var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + " 00:00:00";
|
|
|
+ var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + " 23:59:59";
|
|
|
+ $("#datebeginMaster").datetimebox("setValue", beginDate);
|
|
|
+ $("#dateendMaster").datetimebox("setValue", endDate);
|
|
|
+ //tbSearchSubmit();
|
|
|
+ });
|
|
|
+ // 清空恢复默认值
|
|
|
+ function toClear() {
|
|
|
+ $('#ffMaster').form('clear');
|
|
|
+ var ctime = new Date();
|
|
|
+ var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + " 00:00:00";
|
|
|
+ var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + " 23:59:59";
|
|
|
+ $("#datebeginMaster").datetimebox("setValue", beginDate);
|
|
|
+ $("#dateendMaster").datetimebox("setValue", endDate);
|
|
|
+ }
|
|
|
+ //加载子表数据
|
|
|
+ function LoadDataGridDetail(index, row) {
|
|
|
+ //if ($('#ffDetail').form("validate")) {
|
|
|
+ // $('#DataGridDetail').datagridLoadRpt({
|
|
|
+ // title: '明细表',
|
|
|
+ // idField: 'SID',
|
|
|
+ // queryParams: $('#ffDetail').serializeJson(),
|
|
|
+ // url: 'rpt.ashx?m=detail&id=' + $('#DataGridMaster').datagrid('getSelections')[0]['SID'],
|
|
|
+ // fixWidth: 120,
|
|
|
+ // mergeWidth: 100,
|
|
|
+ // splitChar: '_',
|
|
|
+ // columnMoving: true
|
|
|
+ // });
|
|
|
+ //}
|
|
|
+ }
|
|
|
|
|
|
- //搜索提交
|
|
|
- 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,
|
|
|
- onSelect: LoadDataGridDetail
|
|
|
- });
|
|
|
- }
|
|
|
+ //搜索提交
|
|
|
+ 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,
|
|
|
+ onSelect: LoadDataGridDetail
|
|
|
+ });
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- //导出
|
|
|
- function tbExport() {
|
|
|
- //加载表头
|
|
|
- var fields = $('#DataGridMaster').datagrid('getColumnFields');
|
|
|
- var headers = [];
|
|
|
- for (var i = 0; i < fields.length; i++) {
|
|
|
- //headers.push($('#DataGridMaster').datagrid('getColumnOption', fields[i])['title']);
|
|
|
- headers.push(fields[i]);
|
|
|
- }
|
|
|
+ //导出
|
|
|
+ function tbExport() {
|
|
|
+ //加载表头
|
|
|
+ var fields = $('#DataGridMaster').datagrid('getColumnFields');
|
|
|
+ var headers = [];
|
|
|
+ for (var i = 0; i < fields.length; i++) {
|
|
|
+ //headers.push($('#DataGridMaster').datagrid('getColumnOption', fields[i])['title']);
|
|
|
+ headers.push(fields[i]);
|
|
|
+ }
|
|
|
|
|
|
- $('#DataGridMaster').datagridExport({
|
|
|
- headers: headers,
|
|
|
- fileName: '导出数据(成型收发存统计表).xls',
|
|
|
- workSheet: '导出数据(成型收发存统计表)'
|
|
|
- });
|
|
|
+ $('#DataGridMaster').datagridExport({
|
|
|
+ headers: headers,
|
|
|
+ fileName: '导出数据(成型收发存统计表).xls',
|
|
|
+ workSheet: '导出数据(成型收发存统计表)'
|
|
|
+ });
|
|
|
|
|
|
- //导出多sheet
|
|
|
- //$.dataGridToExcel(
|
|
|
- // ['DataGridMaster', 'DataGridDetail'],
|
|
|
- // ['page1', 'page2'],
|
|
|
- // "导出数据(表名).xls"
|
|
|
- //);
|
|
|
- }
|
|
|
+ //导出多sheet
|
|
|
+ //$.dataGridToExcel(
|
|
|
+ // ['DataGridMaster', 'DataGridDetail'],
|
|
|
+ // ['page1', 'page2'],
|
|
|
+ // "导出数据(表名).xls"
|
|
|
+ //);
|
|
|
+ }
|
|
|
|
|
|
- //搜索按钮
|
|
|
- function tbSearch() {
|
|
|
- $('#tbSearchDiv').toggle();
|
|
|
- $('#DataGridMaster').datagrid('resize');
|
|
|
- }
|
|
|
+ //搜索按钮
|
|
|
+ function tbSearch() {
|
|
|
+ $('#tbSearchDiv').toggle();
|
|
|
+ $('#DataGridMaster').datagrid('resize');
|
|
|
+ }
|
|
|
|
|
|
- //刷新
|
|
|
- function tbReload() {
|
|
|
- tbSearchSubmit();
|
|
|
- }
|
|
|
+ //刷新
|
|
|
+ function tbReload() {
|
|
|
+ tbSearchSubmit();
|
|
|
+ }
|
|
|
|
|
|
- //帮助事件
|
|
|
- function tbHelp() {
|
|
|
- $('#DataGridMaster').datagridDialog({
|
|
|
- title: '帮助',
|
|
|
- width: 640,
|
|
|
- height: 480,
|
|
|
- url: 'rpt_help.html'
|
|
|
- });
|
|
|
- }
|
|
|
+ //帮助事件
|
|
|
+ function tbHelp() {
|
|
|
+ $('#DataGridMaster').datagridDialog({
|
|
|
+ title: '帮助',
|
|
|
+ width: 640,
|
|
|
+ height: 480,
|
|
|
+ url: 'rpt_help.html'
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- </script>
|
|
|
+ </script>
|
|
|
</body>
|
|
|
</html>
|