<%@ 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 dataGrid = null;
|
var param = null;
|
$(function () {
|
$.loadComboboxData($("#team"), "SHIFT", true);
|
//初始化时间
|
var today = new Date();
|
var month = today.getMonth() + 1;
|
if (month < 10) {
|
month = ("0" + month);
|
}
|
var date = today.getFullYear() + "-" + month + "-" + today.getDate();
|
$("#date1").datebox("setValue", date);
|
$("#etim").datebox("setValue", date);
|
dataGrid = $('#dataGrid').datagrid({
|
fit: true,
|
fitColumns: true,
|
border: false,
|
pagination: true,
|
idField: 'id',
|
striped: true,
|
rownumbers: true,
|
remoteSort: false,
|
pageSize: 20,
|
pageList: [10, 20, 30, 40, 50],
|
sortName: 'id',
|
sortOrder: 'desc',
|
singleSelect: true,
|
checkOnSelect: true,
|
selectOnCheck: false,
|
nowrap: false,
|
showPageList: false,
|
frozenColumns: [[{
|
field: 'id',
|
title: 'ID',
|
checkbox: true
|
}, {
|
field: 'bth',
|
title: '批次表id',
|
hidden: true
|
}, {
|
field: 'mat',
|
title: '产品',
|
width: 260,
|
rowspan: 2,
|
align: 'center'
|
}, {
|
field: 'code',
|
title: '工单',
|
align: 'center',
|
rowspan: 2,
|
width: 150
|
}, {
|
|
field: 'date',
|
title: '检测日期',
|
align: 'center',
|
rowspan: 2,
|
width: 200,
|
sortable: true
|
}, {
|
|
field: 'equipment',
|
title: '机台',
|
align: 'center',
|
width: 150,
|
rowspan: 2
|
}, {
|
|
field: 'team',
|
title: '班组',
|
align: 'center',
|
width: 80,
|
rowspan: 2,
|
sortable: true
|
}, {
|
field: 'gy1',
|
title: '甘油施加量1',
|
align: 'center',
|
width: 80,
|
rowspan: 2,
|
sortable: true
|
}, {
|
field: 'gy2',
|
title: '甘油施加量2',
|
align: 'center',
|
width: 80,
|
rowspan: 2,
|
sortable: true
|
}, {
|
field: 'status',
|
title: '反馈状态',
|
align: 'center',
|
width: 87,
|
rowspan: 2,
|
formatter: function (value, row, index) {
|
if (value == 1) {
|
return "<span style='color:green'>已反馈MES<span>";
|
} else if (value == 0) {
|
return "<span style='color:red'>未反馈<span>";
|
} else {
|
return "<span style='color:red'>—<span>";
|
}
|
}
|
}, {
|
field: 'createUserName',
|
title: '创建人姓名',
|
align: 'center',
|
width: 70,
|
sortable: true,
|
hidden: 'true'
|
}, {
|
field: 'createUserTime',
|
title: '创建时间',
|
align: 'center',
|
width: 150,
|
sortable: true,
|
hidden: 'true'
|
}, {
|
field: 'updateUserName',
|
title: '修改人姓名',
|
align: 'center',
|
width: 70,
|
sortable: true
|
}, {
|
field: 'updateUserTime',
|
title: '最后修改时间',
|
align: 'center',
|
width: 130,
|
sortable: true
|
}]],
|
toolbar: '#toolbar',
|
url: "${pageContext.request.contextPath}/pms/onlineCheck/getCxGyList.do",
|
queryParams: $("#searchForm").form("getData"),
|
onLoadError: function (data) {
|
$.messager.show('提示', "查询在线监测记录异常", 'error');
|
},
|
onLoadSuccess: function () {
|
},
|
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
|
});
|
id = rowData.id;
|
}
|
});
|
|
});
|
|
// 查询在线监测记录
|
function query() {
|
dataGrid.datagrid({
|
url: "${pageContext.request.contextPath}/pms/onlineCheck/getCxGyList.do",
|
queryParams: $("#searchForm").form("getData"),
|
onLoadError: function (data) {
|
$.messager.show('提示', "查询在线监测记录异常", 'error');
|
}
|
});
|
$('#dataGrid').datagrid('clearSelections');
|
}
|
|
//获取维保详细
|
function getParam(id) {
|
var orderType = $("#orderType").val();
|
param.datagrid({
|
url: "${pageContext.request.contextPath}/pms/onlineCheck/getListDetail.do?pid=" + id + "&orderType=" + orderType,
|
onLoadError: function (data) {
|
$.messager.show('提示', "查询在线监测详细记录异常", 'error');
|
}
|
});
|
}
|
|
function clearForm() {
|
$("#searchForm input").val(null);
|
//初始化时间
|
$("#inspectionType").val("1");
|
$("#zxq").val("zq")
|
var today = new Date();
|
var month = today.getMonth() + 1;
|
if (month < 10) {
|
month = ("0" + month);
|
}
|
var date = today.getFullYear() + "-" + month + "-" + today.getDate();
|
$("#date1").datebox("setValue", date);
|
$("#etim").datebox("setValue", date);
|
}
|
|
/* 反馈MES 质量外观缺陷 */
|
function sendMes() {
|
var rows = dataGrid.datagrid('getChecked');
|
var ids = [];
|
var orderType = $("#orderType").val();
|
if (rows.length > 0) {
|
parent.$.messager.confirm('确认', '确定将选中数据反馈MES吗?', function (r) {
|
if (r) {
|
for (var i = 0; i < rows.length; i++) {
|
ids.push(rows[i].id);
|
}
|
parent.$.messager.progress({
|
title: '提示',
|
text: '数据处理中,请稍后....'
|
});
|
$.post('${pageContext.request.contextPath}/pms/onlineCheck/sendMsgCP.do',
|
{
|
id: ids.join(','),
|
orderType: orderType
|
}, function (json) {
|
parent.$.messager.progress('close');
|
if (json.success) {
|
$.messager.show('提示', json.msg, 'info');
|
query();
|
} else {
|
$.messager.show('提示', json.msg, 'info');
|
}
|
}, "JSON");
|
}
|
});
|
} else {
|
parent.$.messager.show({
|
title: '提示',
|
msg: '请选择数据!!'
|
});
|
}
|
|
}
|
|
|
function sendFiniMes() {
|
//按钮是否点击标志(默认为true:可被点击)
|
var isClick = true;
|
var rows = dataGrid.datagrid('getChecked');
|
var ids = [];
|
var orderType = $("#orderType").val();
|
if (rows.length > 0) {
|
parent.$.messager.confirm('确认', '确定将选中数据反馈MES吗?', function (r) {
|
if (r) {
|
for (var i = 0; i < rows.length; i++) {
|
ids.push(rows[i].id);
|
}
|
parent.$.messager.progress({
|
title: '提示',
|
text: '数据处理中,请稍后....'
|
});
|
//未点击过则执行里面的内容
|
if (isClick) {
|
//改变为点击无效状态
|
isClick = false;
|
$.post('${pageContext.request.contextPath}/pms/onlineCheck/sendGYSJLToMES.do',
|
{
|
id: ids.join(','),
|
orderType: orderType,
|
param: "add"
|
}, function (json) {
|
//恢复点击有效状态
|
isClick = true;
|
parent.$.messager.progress('close');
|
if (json.success) {
|
$.messager.show('提示', json.msg, 'info');
|
query();
|
} else {
|
$.messager.show('提示', json.msg, 'info');
|
}
|
}, "JSON");
|
}
|
}
|
});
|
} else {
|
parent.$.messager.show({
|
title: '提示',
|
msg: '请选择数据!!'
|
});
|
}
|
|
}
|
|
/* 批量删除 */
|
function deleteProd() {
|
var rows = dataGrid.datagrid('getChecked');
|
var param = $("#inspectionType").val();
|
var ids = [];
|
if (rows.length > 0) {
|
parent.$.messager.confirm('确认', '确定删除选中数据吗?', function (r) {
|
if (r) {
|
for (var i = 0; i < rows.length; i++) {
|
ids.push(rows[i].id);
|
}
|
parent.$.messager.progress({
|
title: '提示',
|
text: '数据处理中,请稍后....'
|
});
|
$.post('${pageContext.request.contextPath}/pms/onlineCheck/deleteProd.do',
|
{
|
id: ids.join(','), param: 'deleteHslYsd'
|
}, function (json) {
|
parent.$.messager.progress('close');
|
if (json.success) {
|
$.messager.show('提示', json.msg, 'info');
|
query();
|
} else {
|
$.messager.show('提示', json.msg, 'info');
|
}
|
}, "JSON");
|
}
|
});
|
} else {
|
parent.$.messager.show({
|
title: '提示',
|
msg: '请选择数据!!'
|
});
|
}
|
|
}
|
|
/* 反馈班长 */
|
function feedbackProd() {
|
var rows = dataGrid.datagrid('getChecked');
|
var param = "2";
|
var ids = [];
|
if (rows.length > 0) {
|
parent.$.messager.confirm('确认', '确定将选中的数据反馈给班长吗?', function (r) {
|
if (r) {
|
for (var i = 0; i < rows.length; i++) {
|
ids.push(rows[i].id);
|
}
|
parent.$.messager.progress({
|
title: '提示',
|
text: '数据处理中,请稍后....'
|
});
|
$.post('${pageContext.request.contextPath}/pms/onlineCheck/feedbackProd.do',
|
{
|
id: ids.join(','), param: param
|
}, function (json) {
|
parent.$.messager.progress('close');
|
if (json.success) {
|
$.messager.show('提示', json.msg, 'info');
|
query();
|
} else {
|
$.messager.show('提示', json.msg, 'info');
|
}
|
}, "JSON");
|
}
|
});
|
} else {
|
parent.$.messager.show({
|
title: '提示',
|
msg: '请选择数据!!'
|
});
|
}
|
|
}
|
|
/* 追加含末含水端部数据 */
|
|
function qmOnlineCheckAppend() {
|
//按钮是否点击标志(默认为true:可被点击)
|
var isClick = true;
|
var rows = dataGrid.datagrid('getChecked');
|
|
if (rows.length > 0 && rows.length < 2) {
|
var ids = rows[0].id;
|
var code = rows[0].bth;
|
var gy1 = rows[0].gy1;
|
var gy2 = rows[0].gy2;
|
var userAddmodalDialog = parent.$.modalDialog({
|
title: '检验数据录入',
|
width: 300,
|
height: 300,
|
href: '${pageContext.request.contextPath}/pms/onlineCheck/qmCxOnlineCheckGYEdit.do?id=' + ids + '&code=' + code + '&gy1=' + gy1 + '&gy2=' + gy2,
|
buttons: [{
|
text: '保存',
|
iconCls: 'icon-standard-disk',
|
handler: function () {
|
var f = userAddmodalDialog.find('#form');
|
if (f.form("validate")) {
|
//未点击过则执行里面的内容
|
if (isClick) {
|
//改变为点击无效状态
|
isClick = false;
|
f.form({
|
url: "${pageContext.request.contextPath}/pms/onlineCheck/saveCxOnlineCHKGY.do",
|
success: function (data) {
|
//恢复点击有效状态
|
isClick = true;
|
var obj = JSON.parse(data);
|
$.messager.show('提示', obj.msg, 'info');
|
userAddmodalDialog.dialog('destroy');
|
query();
|
|
}
|
});
|
f.submit();
|
}
|
}
|
}
|
}]
|
});
|
} else if (rows.length >= 2) {
|
parent.$.messager.show({
|
title: '提示',
|
msg: '只能选择一组数据!'
|
});
|
} else {
|
parent.$.messager.show({
|
title: '提示',
|
msg: '请选择数据!!'
|
});
|
}
|
}
|
|
/**
|
*超标支数数据录入
|
*/
|
function goToOverproofAddJsp() {
|
var rows = dataGrid.datagrid('getChecked');
|
var ids = [];
|
for (var i = 0; i < rows.length; i++) {
|
ids.push(rows[i].id);
|
}
|
var userAddmodalDialog = parent.$.modalDialog({
|
title: '含水含末等数据修改',
|
width: 800,
|
height: 400,
|
href: '${pageContext.request.contextPath}/pms/onlineCheck/goToOverproofAddJsp.do?ids=' + ids + '¶m=edit',
|
buttons: [{
|
text: '保存',
|
iconCls: 'icon-standard-disk',
|
handler: function () {
|
var f = userAddmodalDialog.find('#form');
|
if (f.form("validate")) {
|
f.form({
|
url: '${pageContext.request.contextPath}//pms/onlineCheck/insertQmFinished.do',
|
success: function (data) {
|
var obj = JSON.parse(data);
|
$.messager.show('提示', obj.msg, 'info');
|
userAddmodalDialog.dialog('destroy');
|
query();
|
|
}
|
});
|
f.submit();
|
}
|
}
|
}]
|
});
|
}
|
|
|
</script>
|
</head>
|
<body class="easyui-layout" data-options="fit : true,border : false">
|
<div id="toolbar" style="display: none;width:100%;">
|
<form id="searchForm" style="margin:4px 0px 0px 0px">
|
<input type="hidden" value="1" name="inspectionType" id="inspectionType"/>
|
<input type="hidden" value="zq" name="zxq" id="zxq">
|
<div class="topTool">
|
<fieldset>
|
<div>
|
<span class="label">班次:</span>
|
<select id="team" name="shift" class="easyui-combobox"
|
data-options="panelHeight:'auto',width:120,editable:false"></select>
|
</div>
|
<div>
|
<span class="label">反馈状态:</span>
|
<select id="sts" name="sts" class="easyui-combobox"
|
data-options="panelHeight:'auto',width:120,editable:false">
|
<option value="">全部</option>
|
<option value="0">未反馈</option>
|
<option value="1">已反馈</option>
|
</select>
|
</div>
|
<div>
|
<span class="label">检测日期:</span>
|
<input id="date1" name="date" type="text" class="easyui-datebox" readOnly=true datefmt="yyyy-MM-dd"
|
style="width:120px"/>
|
</div>
|
<div>
|
<span class="label">到</span>
|
<input id="etim" name="etim" type="text" class="easyui-datebox" readOnly=true datefmt="yyyy-MM-dd"
|
style="width:120px"/>
|
</div>
|
</fieldset>
|
</div>
|
</form>
|
<div class="easyui-toolbar">
|
<c:if test="${not empty sessionInfo.resourcesMap['/pms/onlineCheck/getCxGyList.do/cxgyjl']}">
|
<a onclick="query()" 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>
|
</c:if>
|
<c:if test="${not empty sessionInfo.resourcesMap['/pms/onlineCheck/sendGYSJLToMES.do/cxgyjl']}">
|
<a onclick="sendFiniMes();" href="javascript:void(0);" class="easyui-linkbutton"
|
data-options="plain:true,iconCls:'icon-standard-plugin'">反馈MES</a>
|
</c:if>
|
<c:if test="${not empty sessionInfo.resourcesMap['/pms/onlineCheck/saveCxOnlineCHKGY.do/cxgyjl']}">
|
<a onclick="qmOnlineCheckAppend();" href="javascript:void(0);" class="easyui-linkbutton"
|
data-options="plain:true,iconCls:'icon-standard-user-add'">编辑</a>
|
</c:if>
|
|
</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;">
|
<c:if test="${not empty sessionInfo.resourcesMap['/pms/onlineCheck/saveCxOnlineCHKGY.do/cxgyjl']}">
|
<div onclick="qmOnlineCheckAppend()" data-options="iconCls:'icon-hamburg-docs'">编辑</div>
|
</c:if>
|
</div>
|
|
</body>
|
</html>
|