<%@ 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>
|
<script type="text/javascript">
|
var dataGrid=null;
|
var dialog;
|
|
$(function(){
|
/* $.loadComboboxData($("#teamId"),"TEAM",true); */
|
$.loadComboboxData($("#eqpId"),"ALLROLLERS",true);
|
var date=new Date;
|
var year=date.getFullYear();
|
var month=date.getMonth()+1;
|
month =(month<10 ? "0"+month:month);
|
var mydate = (year.toString()+"-"+month.toString());
|
console.info(mydate);
|
$("#sDate").my97('setValue',mydate);
|
|
$("#eqptype").combobox({
|
onSelect: function () {
|
console.info($("#eqptype").combobox('getText'));
|
var selectText = $("#eqptype").combobox('getText');
|
if(selectText=="卷接机组"){
|
$.loadComboboxData($("#eqpId"),"ALLROLLERS",true);
|
} else if(selectText=="成型机组"){
|
$.loadComboboxData($("#eqpId"),"ALLFILTERS",true);
|
}
|
}
|
})
|
});
|
/* $("#eqptype").on('change',function(){
|
var selectText = $(this).find('option:selected').text();
|
console.log(selectText);
|
if(selectText=="卷接机组"){
|
$.loadComboboxData($("#eqpId"),"ALLROLLERS",false);
|
} else if(selectText=="成型机组"){
|
$.loadComboboxData($("#eqpId"),"ALLFILTERS",false);
|
}
|
|
})*/
|
|
$(function() {
|
dataGrid = $('#dataGrid').datagrid({
|
rownumbers :true,
|
idField : 'id',
|
fit : true,
|
singleSelect :true,
|
fitColumns : false,
|
border : false,
|
striped : true,
|
nowrap : true,
|
checkOnSelect : false,
|
selectOnCheck : false,
|
columns : [ [ {
|
title : '编号',
|
field : 'id',
|
checkbox : true
|
|
}, {
|
field : 'dat',
|
title : '日期',
|
width : 150
|
} , {
|
field : 'team',
|
title : '班组',
|
width : 50,
|
} , {
|
field : 'eqp',
|
title : '机台',
|
width : 150,
|
}, {
|
field : 'score',
|
title : '检验得分奖罚',
|
width : 120
|
},
|
{
|
field : 'processFault',
|
title : '工序过失奖罚',
|
width : 120
|
},{
|
field : 'massA',
|
title : 'A类质量缺陷',
|
width : 120
|
},{
|
field : 'massB',
|
title : 'B类质量缺陷',
|
width : 120
|
},{
|
field : 'massDefect',
|
title : 'C/D类质量缺陷',
|
width : 120
|
/* },{
|
field : 'noInnerLine',
|
title : '无内粘线',
|
width : 120
|
}, {
|
field : 'jkDefect',
|
title : '胶孔缺陷',
|
width : 120*/
|
},
|
] ],
|
toolbar : '#toolbar',
|
onLoadSuccess : function() {
|
$(this).datagrid('tooltip');
|
/* queryList(); */
|
},
|
onRowContextMenu : function(e, rowIndex, rowData) {
|
e.preventDefault();
|
$(this).datagrid('unselectAll').datagrid('uncheckAll');
|
$(this).datagrid('selectRow', rowIndex);
|
$('#menu').menu('show', {
|
left : e.pageX-10,
|
top : e.pageY-5
|
});
|
}
|
});
|
});
|
/**
|
*查询数据
|
*/
|
function queryList(){
|
dataGrid.datagrid({
|
url : "${pageContext.request.contextPath}/pms/wages/queryList.do",
|
queryParams : $("#searchForm").form("getData")
|
});
|
|
}
|
function clearForm(){
|
$("#searchForm input").val(null);
|
}
|
/**
|
* 跳转至添加页面
|
*/
|
function goToQmWagesAddJsp() {
|
dialog = parent.$.modalDialog({
|
title : '添加',
|
width : 500,
|
height : 550,
|
href : '${pageContext.request.contextPath}/pms/wages/goToQualityWagesAddJsp.do',
|
buttons : [ {
|
text : '保存',
|
iconCls:'icon-standard-disk',
|
handler : function() {
|
//var f = $("#form");
|
var f = dialog.find('#form');
|
if(f.form("validate")){
|
$.post("${pageContext.request.contextPath}/pms/wages/addQualityWages.do",f.form("getData"),function(json){
|
if (json.success) {
|
$.messager.show('提示', json.msg, 'info');
|
|
dialog.dialog('destroy');
|
queryList();
|
}else{
|
$.messager.show('提示', json.msg, 'error');
|
}
|
},"JSON");
|
}
|
|
}
|
} ]
|
});
|
}
|
|
function goToQmWagesEditJsp() {
|
console.info(dataGrid.datagrid('getSelected').id)
|
dialog = parent.$.modalDialog({
|
title : '编辑',
|
width : 500,
|
height : 550,
|
href : '${pageContext.request.contextPath}/pms/wages/goToQualityWagesEditJsp.do?id=' + dataGrid.datagrid('getSelected').id,
|
buttons : [ {
|
text : '保存',
|
iconCls:'icon-standard-disk',
|
handler : function() {
|
//var f = $("#form");
|
var f = dialog.find('#form');
|
if(f.form("validate")){
|
$.post("${pageContext.request.contextPath}/pms/wages/editQualityWages.do",f.form("getData"),function(json){
|
if (json.success) {
|
$.messager.show('提示', json.msg, 'info');
|
|
dialog.dialog('destroy');
|
queryList();
|
}else{
|
$.messager.show('提示', json.msg, 'error');
|
}
|
},"JSON");
|
}
|
|
}
|
} ]
|
});
|
}
|
|
/*
|
批量删除
|
*/
|
function deleteBatch() {
|
var rows = dataGrid.datagrid('getChecked');
|
var rowIds = [];
|
if(rows && rows.length > 0) {
|
parent.$.messager.confirm('操作提示', '您是否要删除当前数据?', function(b) {
|
if (b) {
|
$.messager.progress({
|
title:'提示',
|
msg:'请稍候:',
|
text:'正在删除。。。'
|
})
|
rows.forEach(function(row){
|
rowIds.push(row.id);
|
})
|
rowIds = rowIds.join(",");
|
$.post('${pageContext.request.contextPath}/pms/wages/deleteWagesBatch.do', {
|
ids : rowIds
|
}, function(json) {
|
if (json.success) {
|
$.messager.show('提示', json.msg, 'info');
|
queryList();
|
}else{
|
$.messager.show('提示', json.msg, 'error');
|
}
|
$.messager.progress('close')
|
}, 'JSON');
|
}
|
});
|
}else{
|
$.messager.show('提示', '请选择数据!', 'error');
|
}
|
}
|
|
function deleteItem() {
|
var row = dataGrid.datagrid('getSelected');
|
if(row.id) {
|
parent.$.messager.confirm('操作提示', '您是否要删除当前数据?', function(b) {
|
if (b) {
|
$.messager.progress({
|
title:'提示',
|
msg:'请稍候:',
|
text:'正在删除。。。'
|
})
|
|
|
$.post('${pageContext.request.contextPath}/pms/wages/deleteWages.do', {
|
id : row.id
|
}, function(json) {
|
if (json.success) {
|
$.messager.show('提示', json.msg, 'info');
|
queryList();
|
}else{
|
$.messager.show('提示', json.msg, 'error');
|
}
|
$.messager.progress('close')
|
}, 'JSON');
|
}
|
});
|
}else{
|
$.messager.show('提示', '请选择数据!', 'error');
|
}
|
}
|
|
|
/**
|
* 跳转到车间编辑页面
|
*/
|
function goToFilterCountEditJsp() {
|
dialog = parent.$.modalDialog({
|
title : '编辑',
|
width : 500,
|
height : 420,
|
href : '${pageContext.request.contextPath}/pms/stopmaintain/goToStopMaintainEditJsp.do?id='+dataGrid.datagrid('getSelected').id,
|
buttons : [ {
|
text : '保存',
|
iconCls:'icon-standard-disk',
|
handler : function() {
|
var f = dialog.find("#form");
|
if(f.form("validate")){
|
$.post("${pageContext.request.contextPath}/pms/stopmaintain/editStopMaintain.do",f.form("getData"),function(json){
|
if (json.success) {
|
$.messager.show('提示', json.msg, 'info');
|
dialog.dialog('destroy');
|
queryList();
|
}else{
|
$.messager.show('提示', json.msg, 'error');
|
}
|
},"JSON");
|
}
|
|
|
}
|
} ]
|
});
|
}
|
|
/**
|
* 车间删除
|
*/
|
function deleteFilterCount() {
|
var row = dataGrid.datagrid('getSelected');
|
parent.$.messager.confirm('操作提示', '您是否要删除当前数据?', function(b) {
|
if (b) {
|
$.post('${pageContext.request.contextPath}/pms/stopmaintain/deleteStopMaintain.do', {
|
id : row.id
|
}, function(json) {
|
if (json.success) {
|
$.messager.show('提示', json.msg, 'info');
|
queryList();
|
}else{
|
$.messager.show('提示', json.msg, 'error');
|
}
|
}, 'JSON');
|
}
|
});
|
}
|
|
</script>
|
</head>
|
<body class="easyui-layout" data-options="fit : true,border : false">
|
<div id="toolbar" style="display: none;">
|
|
<div class="topTool">
|
<form id="searchForm">
|
<fieldset >
|
|
<div>
|
<span class="label">日期:</span>
|
<input id="sDate" name="dat" type="text" class="easyui-my97" datefmt="yyyy-MM" style="width:130px"/>
|
</div>
|
<div >
|
<span class="label">班组:</span>
|
<select id="teamId" name="team" class="easyui-combobox" data-options="panelHeight:'100',width:100,editable:false"">
|
<option value="">全部</option>
|
<option value="1">甲班</option>
|
<option value="2">乙班</option>
|
<option value="3">丙班</option>
|
<option value="4">丁班</option>
|
</select>
|
</div>
|
<div >
|
<span class="label">设备类型:</span>
|
<select id="eqptype" name="eqpType" class="easyui-combobox" data-options="panelHeight:'100',width:100,editable:false">
|
<option value="">全部</option>
|
<option value="4028998349c6880e0149c688e9fb0001">卷接机组</option>
|
<option value="4028998349c6880e0149c688e9fb0003">成型机组</option>
|
</select>
|
|
</div>
|
<div >
|
<span class="label">机台号:</span>
|
|
<select id="eqpId" name="eqp" class="easyui-combobox" data-options="panelHeight:'100',width:135,editable:false"></select>
|
|
</div>
|
|
</fieldset>
|
</form>
|
</div>
|
|
<div class="easyui-toolbar">
|
<a onclick="queryList();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-zoom'">查询</a>
|
<a onclick="clearForm();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-table-refresh'">重置</a>
|
<a onclick="goToQmWagesAddJsp();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-user-add'">添加</a>
|
<a onclick="goToQmWagesEditJsp();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-user-edit'">编辑</a>
|
<a onclick="deleteBatch();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-user-delete'">批量删除</a>
|
</div>
|
</div>
|
<div data-options="region:'center',border:false">
|
<table id="dataGrid"></table>
|
</div>
|
<div id="menu" class="easyui-menu" style="width: 80px; display: none;">
|
<div onclick="goToQmWagesEditJsp();" data-options="iconCls:'icon-standard-user-edit'">编辑</div>
|
<div onclick="deleteItem();" data-options="iconCls:'icon-standard-user-delete'">删除</div>
|
</div>
|
</body>
|
</html>
|