|
@@ -0,0 +1,220 @@
|
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
|
+<html>
|
|
|
|
|
+<head>
|
|
|
|
|
+ <meta charset="utf-8" />
|
|
|
|
|
+ <meta name="keywords" content="dongke,mes,ibossmes">
|
|
|
|
|
+ <meta name="description" content="制造企业生产过程执行管理系统">
|
|
|
|
|
+ <meta name="author" content="xuwei">
|
|
|
|
|
+ <title>东科软件</title>
|
|
|
|
|
+ <script src="/plugins/xeasyui/xeasyui.min.js"></script>
|
|
|
|
|
+ <link href="/plugins/xeasyui/toolbar.min.css" rel="stylesheet" />
|
|
|
|
|
+</head>
|
|
|
|
|
+<body class="easyui-layout">
|
|
|
|
|
+
|
|
|
|
|
+ <!--上部工具条-->
|
|
|
|
|
+ <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;">
|
|
|
|
|
+ <form id="ffMaster">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 开始日期:
|
|
|
|
|
+ <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="procedureidMaster" name="procedureidMaster" data-options="required:true,prompt:'',tipPosition:'top',url:'../../rpt/rpt.ashx?m=getProcedure&select=1',method:'get',valueField:'PROCEDUREID',textField:'PROCEDURENAME',panelHeight:'300px',editable:'true'" style="width:200px;height:32px;">
|
|
|
|
|
+ 产品类别
|
|
|
|
|
+ <input class="easyui-combotree" id="goodstypecodeMaster" name="goodstypecodeMaster" data-options="required:false,prompt:'',tipPosition:'top',url:'../../rpt/rpt.ashx?m=getGoodsType',method:'get',panelHeight:'200px',editable:true" style="width:180px;height:32px;">
|
|
|
|
|
+ 产品编码
|
|
|
|
|
+ <input class="easyui-combobox" id="goodsidMaster" name="goodsidMaster" 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:200px;height:32px;">
|
|
|
|
|
+
|
|
|
|
|
+ <a href="javascript:void(0)" id="btnSearchSubmit" title="清空" class="easyui-linkbutton" plain="false" onclick="toClear()">清空</a>
|
|
|
|
|
+ <a href="javascript:void(0)" id="btnSearchSubmit" title="搜索" class="easyui-linkbutton" plain="false" onclick="tbSearchSubmit()">搜索</a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </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%">
|
|
|
|
|
+ <!--表格-->
|
|
|
|
|
+ <table class="easyui-datagrid"
|
|
|
|
|
+ id="DataGrid0"
|
|
|
|
|
+ data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true,onDblClickRow: dgDblclickrow">
|
|
|
|
|
+ <thead data-options="frozen:true">
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
|
+
|
|
|
|
|
+ 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() + " 7:00:00";
|
|
|
|
|
+ var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + (ctime.getDate() + 1) + " 7:00:00";
|
|
|
|
|
+ $("#datebeginMaster").datebox("setValue", beginDate);
|
|
|
|
|
+ $("#dateendMaster").datebox("setValue", endDate);
|
|
|
|
|
+
|
|
|
|
|
+ //tbSearchSubmit();
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //主表双击事件
|
|
|
|
|
+ function dgDblclickrow(index, row) {
|
|
|
|
|
+ $("#tableTabs").tabs("select", 1);
|
|
|
|
|
+ LoadDataGridDetail(index, row);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 清空恢复默认值 陈强
|
|
|
|
|
+ function toClear() {
|
|
|
|
|
+ var ctime = new Date();
|
|
|
|
|
+ var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + " 7:00:00";
|
|
|
|
|
+ var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + (ctime.getDate() + 1) + " 7:00:00";
|
|
|
|
|
+ $("#datebeginMaster").datebox("setValue", beginDate);
|
|
|
|
|
+ $("#dateendMaster").datebox("setValue", endDate);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //加载子表数据
|
|
|
|
|
+ function LoadDataGridDetail(index, row) {
|
|
|
|
|
+ //加载子表1
|
|
|
|
|
+ //var id = $('#DataGridMaster').datagrid('getSelections')[0]['SID'];
|
|
|
|
|
+ var id = row['工序编号'];
|
|
|
|
|
+ $('#DataGrid1').datagridLoad({
|
|
|
|
|
+ idField: '工序编号',
|
|
|
|
|
+ url: 'rpt.ashx?m=1&id=' + id + '&goodstypecodeMaster=' + $('#goodstypecodeMaster').combotree('getValue') + '&goodsidMaster=' + $("#goodsidMaster").combobox('getValues'),
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ fixWidth: 160,
|
|
|
|
|
+ mergeWidth: 100,
|
|
|
|
|
+ splitChar: '_'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //搜索提交
|
|
|
|
|
+ function tbSearchSubmit() {
|
|
|
|
|
+ var index = $('#tableTabs').tabs('getTabIndex', $('#tableTabs').tabs('getSelected'));
|
|
|
|
|
+
|
|
|
|
|
+ if (index == 0) {
|
|
|
|
|
+ if ($('#ffMaster').form("validate")) {
|
|
|
|
|
+ $('#DataGrid' + index).datagridLoadRpt({
|
|
|
|
|
+ title: '',
|
|
|
|
|
+ idField: 'SID',
|
|
|
|
|
+ queryParams: $('#ffMaster').serializeJson(),
|
|
|
|
|
+ url: 'rpt.ashx?m=' + 0 + '&id=' + request('id'),
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ fixWidth: 100,
|
|
|
|
|
+ mergeWidth: 120,
|
|
|
|
|
+ splitChar: '$'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (index == 1) {
|
|
|
|
|
+ if ($('#ffMaster').form("validate")) {
|
|
|
|
|
+ $('#DataGrid' + index).datagridLoadRpt({
|
|
|
|
|
+ title: '',
|
|
|
|
|
+ idField: 'SID',
|
|
|
|
|
+ queryParams: $('#ffMaster').serializeJson(),
|
|
|
|
|
+ url: 'rpt.ashx?m=' + index,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ fixWidth: 100,
|
|
|
|
|
+ mergeWidth: 120,
|
|
|
|
|
+ splitChar: '$'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //导出
|
|
|
|
|
+ function tbExport() {
|
|
|
|
|
+ var index = $('#tableTabs').tabs('getTabIndex', $('#tableTabs').tabs('getSelected'));
|
|
|
|
|
+
|
|
|
|
|
+ if (index == 0) {
|
|
|
|
|
+ //加载表头
|
|
|
|
|
+ var fields1 = $('#DataGrid' + index).datagrid('getColumnFields');
|
|
|
|
|
+ var fields2 = $('#DataGrid' + index).datagrid('getColumnFields', true);
|
|
|
|
|
+ var fields = fields2.concat(fields1);
|
|
|
|
|
+ var headers = [];
|
|
|
|
|
+ for (var i = 0; i < fields.length; i++) {
|
|
|
|
|
+ //headers.push($('#DataGridMaster').datagrid('getColumnOption', fields[i])['title']);
|
|
|
|
|
+ headers.push(fields[i]);
|
|
|
|
|
+ }
|
|
|
|
|
+ $('#DataGrid' + index).datagridExport({
|
|
|
|
|
+ headers: headers,
|
|
|
|
|
+ fileName: '导出数据(在产产品汇总表).xls',
|
|
|
|
|
+ workSheet: '导出数据(在产产品汇总表)'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (index == 1) {
|
|
|
|
|
+ //加载表头
|
|
|
|
|
+ var fields1 = $('#DataGrid' + index).datagrid('getColumnFields');
|
|
|
|
|
+ var fields2 = $('#DataGrid' + index).datagrid('getColumnFields', true);
|
|
|
|
|
+ var fields = fields2.concat(fields1);
|
|
|
|
|
+ var headers = [];
|
|
|
|
|
+ for (var i = 0; i < fields.length; i++) {
|
|
|
|
|
+ //headers.push($('#DataGridMaster').datagrid('getColumnOption', fields[i])['title']);
|
|
|
|
|
+ headers.push(fields[i]);
|
|
|
|
|
+ }
|
|
|
|
|
+ $('#DataGrid' + index).datagridExport({
|
|
|
|
|
+ headers: headers,
|
|
|
|
|
+ fileName: '导出数据(在产产品明细表).xls',
|
|
|
|
|
+ workSheet: '导出数据(在产产品明细表)'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //$('#DataGridMaster').datagridExport({
|
|
|
|
|
+ // headers: headers,
|
|
|
|
|
+ // fileName: '导出数据(表名).xls',
|
|
|
|
|
+ // workSheet: '导出数据(表名)'
|
|
|
|
|
+ //});
|
|
|
|
|
+
|
|
|
|
|
+ //导出多sheet
|
|
|
|
|
+ //$.dataGridToExcel(
|
|
|
|
|
+ // ['DataGridMaster', 'DataGridDetail1', 'DataGridDetail2'],
|
|
|
|
|
+ // ['表名','表名明细表1', '表名明细表2'],
|
|
|
|
|
+ // "导出数据(表名).xls"
|
|
|
|
|
+ //);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //搜索按钮
|
|
|
|
|
+ function tbSearch() {
|
|
|
|
|
+ $('#tbSearchDiv').toggle();
|
|
|
|
|
+ //$('#DataGridMaster').datagrid('resize');
|
|
|
|
|
+ $('#toolbarLayout').panel('resize', { height: 'auto' });
|
|
|
|
|
+ $('body').layout('resize');
|
|
|
|
|
+ $('#tableTabs').tabs('resize');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //刷新
|
|
|
|
|
+ function tbReload() {
|
|
|
|
|
+ tbSearchSubmit();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //帮助事件
|
|
|
|
|
+ function tbHelp() {
|
|
|
|
|
+ $('#DataGrid0').datagridDialog({
|
|
|
|
|
+ title: '帮助',
|
|
|
|
|
+ width: 640,
|
|
|
|
|
+ height: 480,
|
|
|
|
|
+ url: 'rpt_help.html'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ </script>
|
|
|
|
|
+</body>
|
|
|
|
|
+</html>
|