| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <!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="btnReload" title="刷新" class="easyui-linkbutton" iconcls="icon-reload" plain="true" onclick="tbReload()">刷新</a>
- <div id="tbSearchDiv" style="display: block; padding: 10px;">
- <form id="ffMaster">
- <div>
- 日期
- <input class="easyui-datebox" id="datebeginMaster" name="datebeginMaster" data-options="required:true,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
- -
- <input class="easyui-datebox" id="dateendMaster" name="dateendMaster" data-options="required:true,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
- 产品编码<input class="easyui-textbox" id="goodscode" name="goodscode" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
- 车间号
- <input class="easyui-combobox" id="workshopcodeMaster" name="workshopcodeMaster" data-options="required:false,prompt:'',tipPosition:'top',
- data:[{'value':'','text':'全部'},{'value':'A','text':'一车间'},{'value':'B','text':'二车间'},{'value':'C','text':'三车间'},{'value':'D','text':'四车间'}],
- method:'get',valueField:'value',textField:'text',panelHeight:'300px',editable:'true'" style="width:120px;height:32px;">
- 产品类别<input class="easyui-combotree" id="goodstypecode" name="goodstypecode" data-options="required:false,prompt:'',tipPosition:'top',url:'../rpt.ashx?m=getGoodsType',method:'get',panelHeight:'200px',editable:true" style="width:165px;height:32px;">
- 高压标识
- <input class="easyui-combobox" id="HIGHPRESSUREFLAG" name="HIGHPRESSUREFLAG" data-options="required:false,prompt:'',tipPosition:'top',
- data:[{'value':'','text':'全部'},{'value':'1','text':'高压'},{'value':'0','text':'普通'}],method:'get',valueField:'value',textField:'text',panelHeight:'300px',editable:'true'" style="width:120px;height:32px;">
- <br />成型线号:
- <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:'GROUTINGLINEID',textField:'GROUTINGLINECODE',panelHeight:'300px',editable:true" style="width: 246px; height: 32px;">
- 产品商标:
- <input class="easyui-combobox" id="LOGONAME" name="LOGONAME" data-options="required:false,prompt:'',tipPosition:'top',url:'../../rpt/rpt.ashx?m=getLogoByGoods&select=1',method:'get',valueField:'ID',textField:'TEXT',panelHeight:'300px',multiple:true" style="width:315px;height:30px;">
- 成型工号:
- <input class="easyui-combobox" id="usercodeMaster" name="usercodeMaster" data-options="required:false,prompt:'',tipPosition:'top',url:'../rpt.ashx?m=getUser&select=1',method:'get',valueField:'USERCODE',textField:'USERCODE',panelHeight:'300px',editable:'true'" style="width:120px;height:32px;">
- <a href="javascript:void(0)" id="btnSearchSubmit" title="清空" class="easyui-linkbutton" plain="false" onclick="$('#ffMaster').form('clear')">清空</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%">
- <!--表格-->
- <div title="半成品报废率">
- <table class="easyui-datagrid"
- id="DataGridMaster"
- data-options="toolbar: '#tb',method:'get',border:false,singleSelect:true,fit:true,fitColumns:false">
- <thead>
- <tr>
- <th data-options="field:'产品编码',title:'产品编码',width:100,align:'left',sortable:true"></th>
- <th data-options="field:'交坯数',title:'交坯数',width:100,align:'left',sortable:false"></th>
- <th data-options="field:'干补数',title:'干补数',width:100,align:'left',sortable:false"></th>
- <th data-options="field:'半检不合格数',title:'半检不合格数',width:100,align:'left',sortable:false"></th>
- <th data-options="field:'复检不合格数',title:'复检不合格数',width:100,align:'left',sortable:false"></th>
- <th data-options="field:'损坯数',title:'损坯数',width:100,align:'left',sortable:false"></th>
- <th data-options="field:'报废率',title:'报废率',width:100,align:'left',sortable:false"></th>
- <th data-options="field:'合格率',title:'合格率',width:100,align:'left',sortable:false"></th>
- </tr>
- </thead>
- </table>
- </div>
- <div title="综合优等率">
- <table class="easyui-datagrid"
- id="DataGridMaster1"
- data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:false">
- <thead>
- <tr>
- <th data-options="field:'产品编码',title:'产品编码',width:100,align:'left',sortable:true"></th>
- <th data-options="field:'本烧出窑数',title:'本烧出窑数',width:100,align:'left',sortable:false"></th>
- <th data-options="field:'本烧合格数',title:'本烧合格数',width:100,align:'left',sortable:false"></th>
- <th data-options="field:'重烧合格数',title:'重烧合格数',width:100,align:'left',sortable:false"></th>
- <th data-options="field:'综合合格率',title:'综合合格率',width:100,align:'left',sortable:false"></th>
- </tr>
- </thead>
- </table>
- </div>
- </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 ctime = new Date();
- var nowMonth = ctime.getMonth(); //当前月
- var nowYear = ctime.getFullYear(); //当前年
- //本月的开始时间
- var monthStartDate = new Date(nowYear, nowMonth, 1);
- //本月的结束时间
- var monthEndDate = new Date(nowYear, nowMonth + 1, 0);
- var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + monthStartDate.getDate();
- var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + monthEndDate.getDate();
- $("#datebeginMaster").datebox("setValue", beginDate);
- $("#dateendMaster").datebox("setValue", endDate);
- });
- //搜索提交
- function tbSearchSubmit() {
- var index = $('#tableTabs').tabs('getTabIndex', $('#tableTabs').tabs('getSelected'));
- if (index == 0) {
- if ($('#ffMaster').form("validate")) {
- $('#DataGridMaster').datagridLoadRpt({
- title: '',//半成品报废率
- idField: 'SID',
- queryParams: $('#ffMaster').serializeJson(),
- url: 'rpt.ashx?m=master&n=' + index + '&id=' + request('id'),
- pageSize: 10,
- fixWidth: 160,
- mergeWidth: 100,
- });
- }
- }
- if (index == 1) {
- if ($('#ffMaster').form("validate")) {
- $('#DataGridMaster1').datagridLoadRpt({
- title: '',//综合优等率
- idField: 'SID',
- queryParams: $('#ffMaster').serializeJson(),
- url: 'rpt.ashx?m=master&n=' + index + '&id=' + request('id'),
- pageSize: 10,
- fixWidth: 160,
- mergeWidth: 100,
- });
- }
- }
- }
- //导出
- function tbExport() {
- var index = $('#tableTabs').tabs('getTabIndex', $('#tableTabs').tabs('getSelected'));
- if (index == 0) {
- //加载表头
- var fields = $('#DataGridMaster').datagrid('getColumnFields');
- var headers = [];
- for (var i = 0; i < fields.length; i++) {
- headers.push(fields[i]);
- }
- $('#DataGridMaster').datagridExport({
- headers: headers,
- fileName: '导出数据(半成品报废率表).xls',
- workSheet: '导出数据(半成品报废率表)'
- });
- }
- if (index == 1) {
- //加载表头
- var fields = $('#DataGridMaster1').datagrid('getColumnFields');
- var headers = [];
- for (var i = 0; i < fields.length; i++) {
- headers.push(fields[i]);
- }
- $('#DataGridMaster1').datagridExport({
- headers: headers,
- fileName: '导出数据(综合优等率表).xls',
- workSheet: '导出数据(综合优等率表)'
- });
- }
- }
- //搜索按钮
- function tbSearch() {
- $('#tbSearchDiv').toggle();
- $('#toolbarLayout').panel('resize', { height: 'auto' });
- $('body').layout('resize');
- $('#tableTabs').datagrid('resize');
- }
- //刷新
- function tbReload() {
- tbSearchSubmit();
- }
- </script>
- </body>
- </html>
|