265 lines
9.9 KiB
Plaintext
265 lines
9.9 KiB
Plaintext
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
|
<%@ page import="com.sipai.tools.SessionManager"%>
|
||
|
|
<%
|
||
|
|
SessionManager sessionManager = new SessionManager();
|
||
|
|
%>
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<title></title>
|
||
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||
|
|
<script type="text/javascript">
|
||
|
|
var grid;
|
||
|
|
|
||
|
|
var cutterStandardFun = function() {
|
||
|
|
var dialog = parent.ext.modalDialog({
|
||
|
|
width: 1000,
|
||
|
|
height:600,
|
||
|
|
title : '刀具补偿专家库',
|
||
|
|
url : ext.contextPath + '/material/cutterpointset/cutterStandardExperts.do',
|
||
|
|
});
|
||
|
|
};
|
||
|
|
|
||
|
|
var addFun = function() {
|
||
|
|
var dialog = parent.ext.modalDialog({
|
||
|
|
width: 780,
|
||
|
|
height:550,
|
||
|
|
title : '添加设备刀具信息',
|
||
|
|
url : ext.contextPath + '/material/cutterpointset/add.do',
|
||
|
|
buttons : [ {
|
||
|
|
text : '保存',
|
||
|
|
handler : function() {
|
||
|
|
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||
|
|
}
|
||
|
|
} ]
|
||
|
|
});
|
||
|
|
};
|
||
|
|
var editFun = function(id) {
|
||
|
|
var dialog = parent.ext.modalDialog({
|
||
|
|
title : '编辑设备信息',
|
||
|
|
url : ext.contextPath + '/material/cutterpointset/edit.do?id=' + id,
|
||
|
|
buttons : [ {
|
||
|
|
text : '保存',
|
||
|
|
handler : function() {
|
||
|
|
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||
|
|
}
|
||
|
|
} ]
|
||
|
|
});
|
||
|
|
};
|
||
|
|
|
||
|
|
var editCutterFun = function(id) {
|
||
|
|
var dialog = parent.ext.modalDialog({
|
||
|
|
title : '编辑设备刀具信息',
|
||
|
|
url : ext.contextPath + '/material/cutterpointset/editCutter.do?id=' + id,
|
||
|
|
buttons : [ {
|
||
|
|
text : '保存',
|
||
|
|
handler : function() {
|
||
|
|
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||
|
|
}
|
||
|
|
} ]
|
||
|
|
});
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
var deleteFun = function(id) {
|
||
|
|
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||
|
|
if (r) {
|
||
|
|
$.post(ext.contextPath + '/material/cutterpointset/delete.do', {id : id}, function(data) {
|
||
|
|
if(data==1){
|
||
|
|
parent.$.messager.alert('提示','删除成功','info');
|
||
|
|
grid.datagrid('reload');
|
||
|
|
}else{
|
||
|
|
parent.$.messager.alert('提示','删除失败','info');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
};
|
||
|
|
var deletesFun = function() {
|
||
|
|
var checkedItems = $('#grid').datagrid('getChecked');
|
||
|
|
var datas="";
|
||
|
|
$.each(checkedItems, function(index, item){
|
||
|
|
datas+=item.id+",";
|
||
|
|
});
|
||
|
|
if(datas==""){
|
||
|
|
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||
|
|
}else{
|
||
|
|
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||
|
|
if (r) {
|
||
|
|
$.post(ext.contextPath + '/material/cutterpointset/deletes.do', {ids:datas} , function(data) {
|
||
|
|
if(data>0){
|
||
|
|
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||
|
|
grid.datagrid('reload');
|
||
|
|
grid.datagrid('clearChecked');
|
||
|
|
}else{
|
||
|
|
parent.$.messager.alert('提示','删除失败','info');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$(function() {
|
||
|
|
grid = $('#grid').datagrid({
|
||
|
|
view: detailview,
|
||
|
|
detailFormatter:function(index,row){
|
||
|
|
return '<div style="padding:2px"><table class="ddv"></table></div>';
|
||
|
|
},
|
||
|
|
title : '',
|
||
|
|
url : ext.contextPath + '/material/cutterpointset/getlist.do',
|
||
|
|
striped : true,
|
||
|
|
rownumbers : true,
|
||
|
|
pagination : true,
|
||
|
|
singleSelect: false,
|
||
|
|
ctrlSelect: true,
|
||
|
|
selectOnCheck: false,
|
||
|
|
checkOnSelect: false,
|
||
|
|
idField : 'id',
|
||
|
|
pageSize : 50,
|
||
|
|
pageList : [ 20, 50, 100],
|
||
|
|
frozenColumns:[[
|
||
|
|
{checkbox:true , field : 'ck'},
|
||
|
|
{width : '130', title : '设备编号', field : 'equipmentcardid', sortable : true, align:'center',halign:'center'},
|
||
|
|
{width : '100', title : '设备名称', field : 'equipmentname', sortable : true,align:'center', halign:'center'},
|
||
|
|
] ],
|
||
|
|
columns : [ [
|
||
|
|
{width : '100', title : '设备状态', field : 'equstatus', sortable : true, align:'center',halign:'center'},
|
||
|
|
{width : '100', title : '运行模式', field : 'equrunmode', sortable : true,align:'center', halign:'center'},
|
||
|
|
{width : '100', title : 'G1进给速度', field : 'equgospeed', sortable : true,align:'center', halign:'center'},
|
||
|
|
{width : '100', title : '主轴转速', field : 'equcaspeed', sortable : true,align:'center', halign:'center'},
|
||
|
|
{width : '100', title : '加工累计数', field : 'processcumno', sortable : true,align:'center', halign:'center'},
|
||
|
|
{width : '100', title : '机械手计数', field : 'mechandno', sortable : true, align:'center',halign:'center'},
|
||
|
|
{width : '100', title : '刀损计数', field : 'cutterlossno', sortable : true, align:'center',halign:'center'},
|
||
|
|
{width : '100', title : '刀损设定', field : 'cutterlossset', sortable : true, align:'center',halign:'center'},
|
||
|
|
{width : '125', title : '操作时间', field : 'insdt', sortable : true, align:'center',halign:'center',formatter : function(value, row){
|
||
|
|
return value.substring(0,19);
|
||
|
|
} },
|
||
|
|
{title : '操作', field : 'action', width : '100', halign:'center', align:'center', formatter : function(value, row) {
|
||
|
|
var str = '';
|
||
|
|
<%if (sessionManager.havePermission(session,"material/cutterpointset/edit.do")) {%>
|
||
|
|
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||
|
|
<%}%>
|
||
|
|
<%if (sessionManager.havePermission(session,"material/cutterpointset/delete.do")) {%>
|
||
|
|
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||
|
|
<%}%>
|
||
|
|
return str;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
] ],
|
||
|
|
toolbar : '#toolbar',
|
||
|
|
onLoadSuccess : function(data) {
|
||
|
|
$('.iconImg').attr('src', ext.pixel_0);
|
||
|
|
|
||
|
|
},
|
||
|
|
onExpandRow: function(index,prow){
|
||
|
|
ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
|
||
|
|
ddv.datagrid({
|
||
|
|
url:ext.contextPath + '/material/cutterpointset/getCutterPoint.do?pid='+prow.id,
|
||
|
|
fitColumns:true,
|
||
|
|
ctrlSelect:true,
|
||
|
|
singleSelect: false,
|
||
|
|
selectOnCheck: false,
|
||
|
|
checkOnSelect: false,
|
||
|
|
striped: true,
|
||
|
|
idField : 'id',
|
||
|
|
rownumbers:true,
|
||
|
|
//loadMsg:'',
|
||
|
|
height:'auto',
|
||
|
|
columns : [ [
|
||
|
|
|
||
|
|
{width : '100', title : '刀具编号', field : 'cutterno', sortable : true,align:'center', halign:'center'},
|
||
|
|
{width : '100', title : '刀补开关', field : 'cutterswitch', sortable : true, align:'center',halign:'center'},
|
||
|
|
{width : '100', title : '刀补量', field : 'cutteramount', sortable : true,align:'center', halign:'center'},
|
||
|
|
{width : '100', title : '首补片数', field : 'firstpieceno', sortable : true, align:'center',halign:'center'},
|
||
|
|
{width : '100', title : '首补量', field : 'firstamount', sortable : true, align:'center',align:'center', halign:'center'},
|
||
|
|
{width : '100', title : '自补频率', field : 'autofreq', sortable : true, align:'center',halign:'center'},
|
||
|
|
{width : '100', title : '自补量', field : 'autoamount', sortable : true, align:'center', halign:'center'},
|
||
|
|
{title : '操作', field : 'action', width : '140', halign:'center', align:'center', formatter : function(value, row) {
|
||
|
|
var str = '';
|
||
|
|
<%if (sessionManager.havePermission(session,"material/cutterpointset/editCutter.do")) {%>
|
||
|
|
str += '<img class="iconImg ext-icon-plugin_link" title="编辑" onclick="editCutterFun(\''+row.id+'\');"/> ';
|
||
|
|
<%}%>
|
||
|
|
return str;
|
||
|
|
}
|
||
|
|
},
|
||
|
|
|
||
|
|
] ],
|
||
|
|
onResize:function(){
|
||
|
|
$('#grid').datagrid('fixDetailRowHeight',index);
|
||
|
|
},
|
||
|
|
onLoadSuccess:function(){
|
||
|
|
$('.iconImg').attr('src', ext.pixel_0);
|
||
|
|
setTimeout(function(){
|
||
|
|
$('#grid').datagrid('fixDetailRowHeight',index);
|
||
|
|
},0);
|
||
|
|
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
</head>
|
||
|
|
<body class="easyui-layout" data-options="fit:true,border:false">
|
||
|
|
<div id="toolbar" style="display: none;">
|
||
|
|
<table>
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<table>
|
||
|
|
<tr>
|
||
|
|
<%if (sessionManager.havePermission(session,"material/cutterpointset/add.do")) {%>
|
||
|
|
<td>
|
||
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||
|
|
onclick="addFun();">添加</a>
|
||
|
|
</td>
|
||
|
|
<%}%>
|
||
|
|
<%if (sessionManager.havePermission(session,"material/cutterpointset/delete.do")) {%>
|
||
|
|
<td>
|
||
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||
|
|
onclick="deletesFun();">删除</a>
|
||
|
|
</td>
|
||
|
|
<%}%>
|
||
|
|
<td><div class="datagrid-btn-separator"></div></td>
|
||
|
|
<%if (sessionManager.havePermission(session,"material/cutterpointset/cutterStandardExperts.do")) {%>
|
||
|
|
<td>
|
||
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-book_edit',plain:true"
|
||
|
|
onclick="cutterStandardFun();">专家库</a>
|
||
|
|
</td>
|
||
|
|
<%}%>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<form id="searchForm">
|
||
|
|
<input name="idStr" type="hidden" />
|
||
|
|
<table class="tooltable">
|
||
|
|
<tr>
|
||
|
|
<td>设备编号</td>
|
||
|
|
<td><input name="search_equipmentcardid" class="easyui-textbox" /></td>
|
||
|
|
<td>设备名称</td>
|
||
|
|
<td><input name="search_equipmentname" class="easyui-textbox" /></td>
|
||
|
|
<td>
|
||
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||
|
|
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||
|
|
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</form>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
<div data-options="region:'center',fit:true,border:false">
|
||
|
|
<table id="grid" data-options="fit:true,border:false"></table>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|