<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<title>卷包车间生产日报表</title>
|
<jsp:include page="../../../../initlib/initAll.jsp"></jsp:include>
|
<script type="text/javascript" src="../../../pub/combobox/comboboxUtil.js" charset="utf-8"></script>
|
<link href="${pageContext.request.contextPath}/css/toptoolbar.css" rel="stylesheet" type="text/css" />
|
<script type="text/javascript">
|
|
var tempUrl ="${pageContext.request.contextPath}/pms/sch/statjbcj";
|
var passRateGrid=null;
|
$(function() {
|
var today = new Date();
|
var enddate=today.getDate();
|
var date=today.getFullYear()+"-"+(today.getMonth()+1)+"-"+01;
|
var lastdate = today.getFullYear()+"-"+(today.getMonth()+1)+"-"+enddate;
|
$("#startTime").datebox("setValue",date); //周初
|
$("#endTime").datebox("setValue",lastdate); //周末
|
|
//初始化
|
$.loadComboboxData($("#SHIFT"),"SHIFT",true);//加载下拉框数据
|
$.loadComboboxData($("#TEAM"),"TEAM",true);//加载下拉框数据
|
$.loadComboboxData($("#mdWorkshopId"),"WORKSHOP",true);//加载下拉框数据
|
$.loadComboboxData($("#mdEquipmentId"),"ALLEQPS",true);//加载下拉框数据
|
passRateGrid = $('#passRateGrid').datagrid({
|
fit : true,
|
fitColumns : false,
|
border : false,
|
pagination : true,
|
striped : true,
|
remoteSort: false,
|
sortName : 'date',
|
sortOrder : 'asc',
|
pageSize : 20,
|
pageList : [ 20, 100, 200, 300, 400, 500 ],
|
singleSelect:true,
|
checkOnSelect : false,
|
selectOnCheck : false,
|
nowrap : true,
|
showPageList:false,
|
columns : [[
|
{title:'日期', field:'date',width:120,align:'center',sortable : true},
|
{title:'牌号', field:'mdMatName',width:120,align:'center',sortable : true},
|
{title:'机台', field:'equipmentName',width:120,align:'center',sortable : true},
|
{title:'班次', field:'mdShiftName',width:60,align:'center',sortable : true},
|
{title:'班组', field:'mdTeamName',width:60,align:'center',sortable : true},
|
{title:'批次', field:'bth',width:240,align:'center',sortable : true},
|
{title:'计划产量', field:'pqty',width:80,align:'center',sortable : true},
|
{title:'实际产量', field:'qty',width:80,align:'center',sortable : true},
|
{title:'耗时(小时)', field:'runTime',width:120,align:'center',sortable : true},
|
]],
|
toolbar : '#passRateToolbar',
|
onLoadSuccess : function() {
|
$(this).datagrid('tooltip');
|
},
|
});
|
|
|
});
|
|
//查询
|
function getShapes() {
|
var date1=$("#startTime").datebox("getValue");//周初
|
var date2=$("#endTime").datebox("getValue");//周末
|
if(date1!=null&date1!=""&&date2!=null&date2!=""){
|
passRateGrid.datagrid({
|
url : tempUrl+"/rollerAndPackerDailySheet.do",
|
queryParams :$("#passRateForm").form("getData"),
|
onLoadError : function(data) {
|
$.messager.show('提示', "查询异常", 'error');
|
}
|
});
|
}else{
|
$.messager.show('提示', "请选择具体时间段后进行查询!", 'info');
|
}
|
}
|
//重置
|
function clearShapeForm(){
|
try{
|
$('#passRateForm input').val(null);
|
$("#TEAM").combobox("setValue", "");//下拉框赋值
|
$("#SHIFT").combobox("setValue", "");//下拉框赋值
|
} catch(e){
|
alert(e);
|
}
|
}
|
//导出execl
|
function derive(){
|
var recordUrl =tempUrl+"/excelDerivedailyShift.do?mdTeamId="+$("#passRateForm").form("getData").mdTeamId+"&mdShiftId="+$("#passRateForm").form("getData").mdShiftId+"&date="+$("#passRateForm").form("getData").date+"&edate="+$("#passRateForm").form("getData").edate+"&mdWorkshopId="+$("#passRateForm").form("getData").mdWorkshopId;
|
var scWidth=parent.window.screen.width/2; //屏幕分辨率的宽:
|
var scHight=parent.window.screen.height/2; //屏幕分辨率的高:
|
parent.window.open(recordUrl,"ExcelWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes, resizable=no,copyhistory=no,width="+scWidth+",height="+scHight+",left=400,top=200");
|
}
|
$(function(){
|
//根据工单类型选择要填充的设备
|
$("#mdWorkshopId").combobox({
|
onChange:function(n){
|
if(n==1){
|
$.loadComboboxData($("#mdEquipmentId"),"ALLROLLERS",false);
|
}else if(n==2){
|
$.loadComboboxData($("#mdEquipmentId"),"ALLFILTERS",false);
|
}else if(n==3){
|
$.loadComboboxData($("#mdEquipmentId"),"ALLEQPS",true);
|
}
|
}
|
})
|
});
|
</script>
|
</head>
|
<body class="easyui-layout" data-options="fit : true,border : false">
|
<div id="passRateToolbar" style="display: none;width:100%;">
|
<form id="passRateForm" style="margin:4px 0px 0px 0px">
|
<div class="topTool">
|
<fieldset >
|
<div >
|
<span class="label">车间:</span>
|
<select id="mdWorkshopId" name="mdWorkshopId" class="easyui-combobox"
|
data-options="panelHeight:'150',width:120,editable:false"></select>
|
</div>
|
<div >
|
<span class="label">机台:</span>
|
<select id="mdEquipmentId" name="mdEquipmentId" class="easyui-combobox"
|
data-options="panelHeight:'150',width:120,editable:false"></select>
|
</div>
|
<div >
|
<span class="label">班组:</span>
|
<select id="TEAM" name="mdTeamId" class="easyui-combobox"
|
data-options="panelHeight:'150',width:120,editable:false"></select>
|
</div>
|
<div >
|
<span class="label">班次:</span>
|
<select id="SHIFT" name="mdShiftId" class="easyui-combobox"
|
data-options="panelHeight:'150',width:120,editable:false"></select>
|
</div>
|
<div>
|
<span class="label">生产日期:</span>
|
<input id="startTime" name="date" readOnly=true type="text"
|
class="easyui-datebox" datefmt="yyyy-MM-dd HH:mm:ss"
|
style="width: 120px" />
|
</div>
|
<div>
|
<span class="label">到</span>
|
<input id="endTime" name="edate" readOnly=true type="text"
|
class="easyui-datebox" datefmt="yyyy-MM-dd HH:mm:ss"
|
style="width: 120px" />
|
</div>
|
</fieldset>
|
</div>
|
</form>
|
<div class="easyui-toolbar" >
|
<c:if test="${not empty sessionInfo.resourcesMap['/pms/sch/statjbcj/rollerAndPackerDailySheet.do/rpws']}">
|
<a onclick="getShapes()" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-zoom'">查询</a>
|
<a onclick="clearShapeForm();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-table-refresh'">重置</a>
|
</c:if>
|
<c:if test="${not empty sessionInfo.resourcesMap['/pms/sch/statjbcj/excelDerivedailyShift.do/rpws']}">
|
<a onclick="derive();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-table-link'">导出Excel</a>
|
|
<!-- <a onclick="deriveEffic();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-table-link'">导出有效作业率Excel</a> -->
|
</c:if>
|
</div>
|
</div>
|
<div data-options="region:'center',border:true,split:false">
|
<table id="passRateGrid"></table>
|
</div>
|
<!--右键按钮 <div id="shiftchgMenu" class="easyui-menu" style="width: 80px; display: none;"></div> -->
|
</body>
|
</html>
|