first commit
This commit is contained in:
129
bin/WebRoot/jsp/material/MaterialApplicationAdd.jsp
Normal file
129
bin/WebRoot/jsp/material/MaterialApplicationAdd.jsp
Normal file
@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialapplication/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectmaterialcode(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择物料',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/material/materialinventory/select.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
chosematerial(res)
|
||||
//$("#div_product").panel('close');
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
function chosematerial(res){
|
||||
//console.log("res",res);
|
||||
$("#materialcode").textbox('setValue',res.materialcode);//easyui textbox赋值jquery不一样
|
||||
$("#materialid").val(res.id);
|
||||
$("#materialname").html(res.materialname);
|
||||
$("#unit").html(res.unit);
|
||||
}
|
||||
$(function() {
|
||||
$('#taskorderid').combobox({
|
||||
url : ext.contextPath + '/plan/taskorder/getTaskorder1.do',
|
||||
valueField:'id',
|
||||
textField:'tasklistcode',
|
||||
method:'get',
|
||||
onSelect: function () {
|
||||
$('#workorderid').combobox({
|
||||
url : ext.contextPath + '/work/workorder/getlistbyplanid.do?taskorderid=' + $('#taskorderid').combobox('getValue'),
|
||||
valueField:'id',
|
||||
textField:'workorderno',
|
||||
method:'get',
|
||||
})},
|
||||
});
|
||||
$("#materialcode").textbox('textbox').bind("click", function () {
|
||||
selectmaterialcode();
|
||||
$("#processid").val('${processid}');
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>任务单编号</th>
|
||||
<td><input id="taskorderid" name="taskorderid" class="easyui-combobox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工单编号</th>
|
||||
<td><input id="workorderid" name="workorderid" class="easyui-combobox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td><input id="materialcode" name="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/>
|
||||
<input id="materialid" name="materialid" type="hidden" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td><span id="materialname"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td><span id="unit"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当前库存</th>
|
||||
<td><input name="currentinventory" class="easyui-textbox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料需求</th>
|
||||
<td><input name="materialrequest" class="easyui-textbox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>补料需求</th>
|
||||
<td><input name="supplymaterial" class="easyui-textbox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
198
bin/WebRoot/jsp/material/MaterialApplicationList.jsp
Normal file
198
bin/WebRoot/jsp/material/MaterialApplicationList.jsp
Normal file
@ -0,0 +1,198 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加补料申请单',
|
||||
url : ext.contextPath + '/material/materialapplication/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFunstatus = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要提交此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/materialapplication/editFunstatus.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','提交成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','提交失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑补料申请单',
|
||||
url : ext.contextPath + '/material/materialapplication/edit.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/materialapplication/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/materialapplication/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({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialapplication/getMaterialApplications.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '180', title : '任务单编号', field : 'taskorder', sortable : true, align:'center',halign:'center',formatter : function(value, row) {
|
||||
return value.tasklistcode;
|
||||
}},
|
||||
{width : '100', title : '工单编号', field: 'workorderid', sortable : true, halign:'center',formatter:function(value,row){
|
||||
return row.workOrder.workorderno;
|
||||
|
||||
}
|
||||
},
|
||||
{width : '180', title : '产品名称', field : 'bomname', sortable : true, align:'center',halign:'center'},
|
||||
{width : '180', title : '工单日期', field : 'workOrder', sortable : true, align:'center',halign:'center',formatter : function(value, row) {
|
||||
|
||||
return value.stdt.substring(0,10);
|
||||
}},
|
||||
{width : '180', title : '物料代码', field : 'materialcode', sortable : true, align:'center',halign:'center'},
|
||||
{width : '180', title : '物料名称', field : 'materialname', sortable : true, align:'center',halign:'center'},
|
||||
{width : '180', title : '当前库存', field : 'currentinventory', sortable : true, align:'center',halign:'center'},
|
||||
{width : '180', title : '物料需求', field : 'materialrequest', sortable : true, align:'center',halign:'center'},
|
||||
{width : '180', title : '补料数量', field : 'supplymaterial', sortable : true, align:'center',halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
if(row.status!="1"){
|
||||
<%if (sessionManager.havePermission(session,"material/materialapplication/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/materialapplication/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
str += '<img class="iconImg ext-icon-table_go" title="提交" onclick="editFunstatus(\''+row.id+'\');"/>';
|
||||
}else{
|
||||
str += '<img class="iconImg ext-icon-table_go" title="已提交" />';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_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/materialapplication/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/materialapplication/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>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>物料名称</td>
|
||||
<td><input id="search_name" name= "search_name" class="easyui-textbox" /></td>
|
||||
<td>物料代码</td>
|
||||
<td><input id= "search_code" name="search_code" 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>
|
||||
81
bin/WebRoot/jsp/material/PLMProductsList.jsp
Normal file
81
bin/WebRoot/jsp/material/PLMProductsList.jsp
Normal file
@ -0,0 +1,81 @@
|
||||
<%@ 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;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialinfo/getPLMProducts.do?typename='+encodeURI('${typename}'),
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '物料编码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '240', title : '规格参数', field : 'materialmodel', sortable : true, halign:'center'},
|
||||
{width : '120', title : '创建时间', field : 'insdt', sortable : true, halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
//以json格式返回数据
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
jsonstr = '{"materialcode":"'+row.materialcode+'"}';
|
||||
}
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>物料名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>物料编码</td>
|
||||
<td><input name="search_code" 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>
|
||||
108
bin/WebRoot/jsp/material/alertboardList.jsp
Normal file
108
bin/WebRoot/jsp/material/alertboardList.jsp
Normal file
@ -0,0 +1,108 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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">
|
||||
function selectFun() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas = '{"id":"'+item.id +'","no":"'+item.no +'",'+
|
||||
'"no":"'+item.no +'"}';
|
||||
});
|
||||
console.log("enter",datas);
|
||||
var dataset = $.parseJSON(datas);
|
||||
return dataset;
|
||||
}
|
||||
|
||||
var grid;
|
||||
$(function() {
|
||||
var equid = localStorage.getItem("equid");
|
||||
localStorage.removeItem("equid");
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/inkalert/getBoardbatchList.do?equid='+equid+'&querytype=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '90', title : '网板名称', field : 'name', sortable : true, halign:'center'},
|
||||
{width : '120', title : '网板批次号', field : 'no', sortable : true, halign:'center'},
|
||||
{width : '80', title : '网板类别', field : 'type', sortable : true, halign:'center'},
|
||||
{width : '60', title : '状态', field : 'status', sortable : true, halign:'center',formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '未使用';
|
||||
case '1':
|
||||
return '使用中';
|
||||
case '2':
|
||||
return '使用完毕';
|
||||
}
|
||||
}},
|
||||
{width : '130', title : '使用开始时间', field : 'starttime', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{width : '130', title : '使用结束时间', field : 'endtime', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{width : '150', title : '使用机台', field : 'equipmentName', sortable : true, halign:'center'},
|
||||
{width : '60', title : '修改者', field : 'alteruser', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
value ='admin';
|
||||
return value;
|
||||
} },
|
||||
{width : '130', title : '修改时间', field : 'alterdt', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
<td>批次号</td>
|
||||
<td><input name="search_no" class="easyui-textbox" style="width: 180px;" /></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>
|
||||
109
bin/WebRoot/jsp/material/alertinkList.jsp
Normal file
109
bin/WebRoot/jsp/material/alertinkList.jsp
Normal file
@ -0,0 +1,109 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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">
|
||||
function selectFun() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas = '{"id":"'+item.id +'","no":"'+item.no +'",'+
|
||||
'"no":"'+item.no +'"}';
|
||||
});
|
||||
|
||||
var dataset = $.parseJSON(datas);
|
||||
return dataset;
|
||||
}
|
||||
|
||||
var grid;
|
||||
$(function() {
|
||||
var equid = localStorage.getItem("equid");
|
||||
localStorage.removeItem("equid");
|
||||
//console.log("equid",equid);
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/inkalert/getInkbatchList.do?equid='+equid+'&querytype=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '120', title : '批次号', field : 'no', sortable : true, halign:'center'},
|
||||
{width : '90', title : '油墨名称', field : 'name', sortable : true, halign:'center'},
|
||||
{width : '80', title : '油墨类别', field : 'type', sortable : true, halign:'center'},
|
||||
{width : '60', title : '状态', field : 'status', sortable : true, halign:'center',formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '未使用';
|
||||
case '1':
|
||||
return '使用中';
|
||||
case '2':
|
||||
return '使用完毕';
|
||||
}
|
||||
}},
|
||||
{width : '130', title : '使用开始时间', field : 'starttime', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{width : '130', title : '使用结束时间', field : 'endtime', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{width : '150', title : '使用机台', field : 'equipmentName', sortable : true, halign:'center'},
|
||||
{width : '60', title : '修改者', field : 'alteruser', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
value ='admin';
|
||||
return value;
|
||||
} },
|
||||
{width : '130', title : '修改时间', field : 'alterdt', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
<td>批次号</td>
|
||||
<td><input name="search_no" class="easyui-textbox" style="width: 180px;" /></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>
|
||||
85
bin/WebRoot/jsp/material/auxiliaryMaterialPicking.jsp
Normal file
85
bin/WebRoot/jsp/material/auxiliaryMaterialPicking.jsp
Normal file
@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/auxiliarymaterialpicking/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="pid" name="pid" type="hidden" value="${auxiliaryMaterialPicking.pid}" />
|
||||
<input id="materialcode" name="materialcode" type="hidden" value="${auxiliaryMaterialPicking.materialcode}" />
|
||||
<input id="keyword" name="keyword" type="hidden" value="${auxiliaryMaterialPicking.keyword}" />
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>BOM物料项目</th>
|
||||
<td><input id="bomprojects" name="bomprojects" class="easyui-textbox" value="${auxiliaryMaterialPicking.bomprojects}" readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>数量</th>
|
||||
<td>
|
||||
<input id="num" name="num" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${auxiliaryMaterialPicking.num}" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td>
|
||||
<input id="unit" name="unit" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${auxiliaryMaterialPicking.unit} " readonly/>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>领料人</th>
|
||||
<td>
|
||||
<input id="pickingpeople" name="pickingpeople" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${auxiliaryMaterialPicking.pickingpeople}" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>领料日期</th>
|
||||
<td>
|
||||
<input id="pickingdate" name="pickingdate" class="Wdate" value=""
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" readonly value="${auxiliaryMaterialPicking.pickingdate}" />
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input id="remark" name="remark" class="easyui-textbox"
|
||||
data-options="required:false,validType:'isBlank'" value="${pickingdate.remark}" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
106
bin/WebRoot/jsp/material/boardChange.jsp
Normal file
106
bin/WebRoot/jsp/material/boardChange.jsp
Normal file
@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/inkalert/saveboard.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectBoardbatchList(boardbatchno,No){
|
||||
localStorage.setItem("equid",$("#equipmentcardid").val());
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择可使用网板批次',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/material/inkalert/showBoardbatchList.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
$("#"+boardbatchno).val(res.id);
|
||||
$("#"+No).textbox('setValue',res.no);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#No").textbox('textbox').bind("click", function () {
|
||||
selectBoardbatchList("boardbatchno","No");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="boardbatchno" name="boardbatchno" type="hidden"/>
|
||||
<input id="lastboardbatchno" name="lastboardbatchno" value="${inkalert.lastboardbatchno}" type="hidden"/>
|
||||
<input id="equipmentcardid" name="equipmentcardid" value="${inkalert.equipmentcardid}" type="hidden"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>设备</th>
|
||||
<td><input name="equipmentname" class="easyui-textbox"
|
||||
disabled="disabled" value="${inkalert.equipmentname}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上次更换时间</th>
|
||||
<td><input name="starttime" class="easyui-textbox"
|
||||
disabled="disabled" value="${fn:substring(inkalert.starttime,0,19)}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>更换者</th>
|
||||
<td>
|
||||
<input name="operator" class="easyui-textbox"
|
||||
disabled="disabled" value="admin" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>当前网板批次号</th>
|
||||
<td><input name="no" class="easyui-textbox"
|
||||
disabled="disabled" value="${inkalert.no}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>可使用网板批次号</th>
|
||||
<td>
|
||||
<input id="No" name="No" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
248
bin/WebRoot/jsp/material/boardbatchAdd.jsp
Normal file
248
bin/WebRoot/jsp/material/boardbatchAdd.jsp
Normal file
@ -0,0 +1,248 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/boardbatch/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
|
||||
$.post(ext.contextPath + "/material/boardbatch/saveMachine.do",{no:data.id,mids:getMids(),status:$('#status').textbox('getValue')},function(data1){
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
});
|
||||
/* top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}); */
|
||||
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
//获取当前时间
|
||||
function getNowFormatDate() {
|
||||
var date = new Date();
|
||||
var seperator1 = "-";
|
||||
var seperator2 = ":";
|
||||
var month = date.getMonth() + 1;
|
||||
var strDate = date.getDate();
|
||||
if (month >= 1 && month <= 9) {
|
||||
month = "0" + month;
|
||||
}
|
||||
if (strDate >= 0 && strDate <= 9) {
|
||||
strDate = "0" + strDate;
|
||||
}
|
||||
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
|
||||
+ " " + date.getHours() + seperator2 + date.getMinutes()
|
||||
/*+ seperator2 + date.getSeconds();*/
|
||||
return currentdate;
|
||||
}
|
||||
|
||||
function getMids(){
|
||||
var mrows= $('#grid').datagrid("getRows");
|
||||
var mids="";
|
||||
$.each(mrows, function(index, item){
|
||||
mids+=item.id+",";
|
||||
});
|
||||
mids=mids.replace(/,$/gi,"");
|
||||
return mids;
|
||||
}
|
||||
function doadd_M(){
|
||||
$("#mids").val(getMids());
|
||||
|
||||
localStorage.setItem("mids",$("#mids").val());
|
||||
//清除旧数据
|
||||
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加参数设置中的设备',
|
||||
height:500,
|
||||
url : ext.contextPath + '/material/inkinfo/showEquipmentcardForSelects.do?iframeId=boardbatchAdd',
|
||||
buttons : [ {
|
||||
iconCls:'icon-ok',
|
||||
text : '确认',
|
||||
handler : function() {
|
||||
var data = dialog.find('iframe').get(0).contentWindow.selectFun(dialog, grid);
|
||||
var datas= $.parseJSON(data);
|
||||
console.log('enter',datas);
|
||||
if(datas.length>0){
|
||||
for(var i=0;i<datas.length;i++){
|
||||
grid.datagrid('appendRow',{
|
||||
id:datas[i].id,
|
||||
equipmentcardid:datas[i].equipmentcardid,
|
||||
equipmentname:datas[i].equipmentname,
|
||||
equipmentmodel:datas[i].equipmentmodel,
|
||||
equipmentclass:datas[i].equipmentclass,
|
||||
geographyarea:datas[i].geographyarea
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
}
|
||||
function dodelete_M(){
|
||||
var rows = $('#grid').datagrid('getChecked');
|
||||
if(rows.length==0){
|
||||
top.$.messager.alert("提示","请选择需要删除的数据","info");
|
||||
}else{
|
||||
top.$.messager.confirm("提示", "确定删除这些数据?", function(r) {
|
||||
if (r) {
|
||||
//复制rows,否则deleteRow的index会出错
|
||||
var copyRows = [];
|
||||
for ( var j= 0; j < rows.length; j++) {
|
||||
copyRows.push(rows[j]);
|
||||
}
|
||||
|
||||
$.each(copyRows, function(index, item){
|
||||
$('#grid').datagrid('deleteRow',$('#grid').datagrid('getRowIndex',copyRows[index]));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function selectProcess(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择工艺路线',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/activiti/workflow/getProcessForSelect.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
$("#processrealid").textbox('setValue',res.id);
|
||||
$("#processrealid").textbox('setText',res.name);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#processrealid").textbox('textbox').bind("click", function () {
|
||||
selectProcess();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(function() {
|
||||
document.getElementById('starttime').value=getNowFormatDate();//设置默认时间
|
||||
$('#m').panel({
|
||||
width:"100%",
|
||||
height:"300",
|
||||
title: '使用设备',
|
||||
tools: [{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){doadd_M();}
|
||||
},{
|
||||
iconCls:'icon-remove',
|
||||
handler:function(){dodelete_M();}
|
||||
}]
|
||||
});
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
idField : 'id',
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '145', title : '设备编号', field : 'equipmentcardid', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '设备名称', field : 'equipmentname', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '设备型号', field : 'equipmentmodel', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '设备类型', field : 'equipmentclass', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '存放位置', field : 'geographyarea', sortable : true, editor:'textbox',halign:'center'}
|
||||
] ],
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input id="mids" name="mids" type="hidden" value="" />
|
||||
<form method="post" class="form">
|
||||
<input id="mtypetemp" type="hidden" value=""/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>网板批次号</th>
|
||||
<td><input name="no" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>网板类别</th>
|
||||
<td>
|
||||
<input name="type" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>网板名称</th>
|
||||
<td>
|
||||
<input name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value=""/>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料状态</th>
|
||||
<td><select id="status" name="status" class="easyui-combobox"
|
||||
data-options="panelHeight:'auto'">
|
||||
<option value="0">未使用</option>
|
||||
<option value="1">使用中</option>
|
||||
<option value="2">使用完毕</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用开始时间</th>
|
||||
<td><input id="starttime" name="starttime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<th>使用开始时间</th>
|
||||
<td><input id="endtime" name="endtime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<th>产品工艺路线</th>
|
||||
<td><input id="processrealid" name="processrealid" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div id="m">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
304
bin/WebRoot/jsp/material/boardbatchEdit.jsp
Normal file
304
bin/WebRoot/jsp/material/boardbatchEdit.jsp
Normal file
@ -0,0 +1,304 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%request.setAttribute("Flag_UNUSE",com.sipai.entity.material.Boardbatch.Flag_UNUSE);%>
|
||||
<%request.setAttribute("Flag_INUSE",com.sipai.entity.material.Boardbatch.Flag_INUSE);%>
|
||||
<%request.setAttribute("Flag_USED",com.sipai.entity.material.Boardbatch.Flag_USED);%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var editIndex = undefined;//定义编辑列的索引
|
||||
function endEditing(){//清除editor
|
||||
if (editIndex == undefined){return true;}
|
||||
if ($('#grid').datagrid('validateRow', editIndex)){
|
||||
$('#grid').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function getGriddata(){
|
||||
var gridrows= $('#grid').datagrid("getRows");
|
||||
var griddata= '[';
|
||||
$.each(gridrows, function(index, item){
|
||||
if(index == 0){
|
||||
griddata+='{"equipmentcardid":"'+item.id+'","status":"'+item.ibmstatus+'"}';
|
||||
}
|
||||
else{
|
||||
griddata+=',{"equipmentcardid":"'+item.id+'","status":"'+item.ibmstatus+'"}';
|
||||
}
|
||||
});
|
||||
griddata+= ']';
|
||||
return griddata;
|
||||
|
||||
}
|
||||
//获取已选的工位id
|
||||
function getMids(){
|
||||
var mrows= $('#grid').datagrid("getRows");
|
||||
var mids="";
|
||||
$.each(mrows, function(index, item){
|
||||
mids+=item.id+",";
|
||||
});
|
||||
mids=mids.replace(/,$/gi,"");
|
||||
return mids;
|
||||
}
|
||||
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/boardbatch/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$.post(ext.contextPath + "/material/boardbatch/updateMachine.do",{no:$('#id').val(),griddata:getGriddata()},function(data1){
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
});
|
||||
/* top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}); */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doadd_M(){
|
||||
$("#mids").val(getMids());
|
||||
|
||||
localStorage.setItem("mids",$("#mids").val());
|
||||
//清除旧数据
|
||||
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加参数设置中的设备',
|
||||
height:500,
|
||||
url : ext.contextPath + '/material/inkinfo/showEquipmentcardForSelects.do?iframeId=boardbatchEdit',
|
||||
buttons : [ {
|
||||
iconCls:'icon-ok',
|
||||
text : '确认',
|
||||
handler : function() {
|
||||
var data = dialog.find('iframe').get(0).contentWindow.selectFun(dialog, grid);
|
||||
var datas= $.parseJSON(data);
|
||||
if(datas.length>0){
|
||||
for(var i=0;i<datas.length;i++){
|
||||
grid.datagrid('appendRow',{
|
||||
id:datas[i].id,
|
||||
equipmentcardid:datas[i].equipmentcardid,
|
||||
equipmentname:datas[i].equipmentname,
|
||||
equipmentmodel:datas[i].equipmentmodel,
|
||||
equipmentclassid:datas[i].equipmentclass,
|
||||
areaid:datas[i].geographyarea
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
}
|
||||
function dodelete_M(){
|
||||
var rows = $('#grid').datagrid('getChecked');
|
||||
if(rows.length==0){
|
||||
top.$.messager.alert("提示","请选择需要删除的数据","info");
|
||||
}else{
|
||||
top.$.messager.confirm("提示", "确定删除这些数据?", function(r) {
|
||||
if (r) {
|
||||
//复制rows,否则deleteRow的index会出错
|
||||
var copyRows = [];
|
||||
for ( var j= 0; j < rows.length; j++) {
|
||||
copyRows.push(rows[j]);
|
||||
}
|
||||
|
||||
$.each(copyRows, function(index, item){
|
||||
$('#grid').datagrid('deleteRow',$('#grid').datagrid('getRowIndex',copyRows[index]));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#m').panel({
|
||||
width:"100%",
|
||||
height:"300",
|
||||
title: '使用设备',
|
||||
tools: [{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){doadd_M();}
|
||||
},{
|
||||
iconCls:'icon-remove',
|
||||
handler:function(){dodelete_M();}
|
||||
}]
|
||||
});
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
idField : 'id',
|
||||
onClickCell:function(index){
|
||||
endEditing();
|
||||
},
|
||||
onDblClickCell : function(index,field){
|
||||
/*if (endEditing()) {
|
||||
$('#grid').datagrid('selectRow', index).datagrid('editCell', {index:index,field:field});
|
||||
editIndex = index;
|
||||
}*/
|
||||
if(!endEditing()){
|
||||
return false;
|
||||
}
|
||||
|
||||
editIndex = index;
|
||||
$('#grid').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
|
||||
var ed = $('#grid').datagrid('getEditor', {index:editIndex,field:'name'});
|
||||
($(ed.target).data('textbox') ? $(ed.target).textbox('textbox') : $(ed.target)).focus();
|
||||
},
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '140', title : '设备编号', field : 'equipmentcardid', sortable : true, halign:'center'},
|
||||
{width : '90', title : '设备名称', field : 'equipmentname', sortable : true, halign:'center'},
|
||||
{width : '105', title : '设备油墨使用状态', field : 'ibmstatus', sortable : true,formatter:function(value,row){
|
||||
switch (value) {
|
||||
case '${Flag_UNUSE}':
|
||||
return '未使用';
|
||||
case '${Flag_INUSE}':
|
||||
return '使用中';
|
||||
case '${Flag_USED}':
|
||||
return '使用完毕';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
},editor:{
|
||||
type:'combobox',
|
||||
options:{
|
||||
data: [{
|
||||
name: '未使用',
|
||||
status: '${Flag_UNUSE}'
|
||||
},{
|
||||
name: '使用中',
|
||||
status: '${Flag_INUSE}'
|
||||
},{
|
||||
name: '使用完毕',
|
||||
status: '${Flag_USED}'
|
||||
}],
|
||||
valueField:'status',
|
||||
textField:'name',
|
||||
required:true
|
||||
}
|
||||
}},
|
||||
{width : '90', title : '设备型号', field : 'equipmentmodel', sortable : true, halign:'center'},
|
||||
{width : '90', title : '设备类型', field : 'equipmentclassid', sortable : true,halign:'center'},
|
||||
{width : '90', title : '存放位置', field : 'areaid', sortable : true,halign:'center'}
|
||||
] ],
|
||||
data:${equipmentcardList}
|
||||
});
|
||||
});
|
||||
function selectProcess(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择工艺路线',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/activiti/workflow/getProcessForSelect.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
$("#processrealid").textbox('setValue',res.id);
|
||||
$("#processrealid").textbox('setText',res.name);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#processrealid").textbox('textbox').bind("click", function () {
|
||||
selectProcess();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input id="mids" name="mids" type="hidden" value="" />
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" id = "id" name="id" value="${boardbatch.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>批次号</th>
|
||||
<td><input name="no" class="easyui-textbox"
|
||||
disabled="disabled" value="${boardbatch.no }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>网板类别</th>
|
||||
<td><input name="type" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${boardbatch.type }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>网板名称</th>
|
||||
<td>
|
||||
<input name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${boardbatch.name }" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料状态</th>
|
||||
<td><select id="status" name="status" class="easyui-combobox"
|
||||
data-options="panelHeight:'auto'">
|
||||
<option value="0" <c:if test="${boardbatch.status=='0'}">selected</c:if>>未使用</option>
|
||||
<option value="1" <c:if test="${boardbatch.status=='1'}">selected</c:if>>使用中</option>
|
||||
<option value="2" <c:if test="${boardbatch.status=='2'}">selected</c:if>>使用完毕</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品工艺路线</th>
|
||||
<td><input id="processrealid" name="processrealid" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${boardbatch.processrealid }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>开始时间</th>
|
||||
<td><input id="starttime" name="starttime" class="Wdate"
|
||||
value="${fn:substring(boardbatch.starttime,0,19)}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<%--<tr>
|
||||
<th>结束时间</th>
|
||||
<td>
|
||||
<input id="endtime"name="endtime" class="Wdate"
|
||||
value="${fn:substring(boardbatch.endtime,0,19)}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr><!-- 添加开始结束时间 --> --%>
|
||||
</table>
|
||||
</form>
|
||||
<div id="m">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
270
bin/WebRoot/jsp/material/boardbatchList.jsp
Normal file
270
bin/WebRoot/jsp/material/boardbatchList.jsp
Normal file
@ -0,0 +1,270 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%request.setAttribute("Flag_UNUSE",com.sipai.entity.material.Boardbatch.Flag_UNUSE);%>
|
||||
<%request.setAttribute("Flag_INUSE",com.sipai.entity.material.Boardbatch.Flag_INUSE);%>
|
||||
<%request.setAttribute("Flag_USED",com.sipai.entity.material.Boardbatch.Flag_USED);%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加网板批次信息',
|
||||
url : ext.contextPath + '/material/boardbatch/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看网板批次信息',
|
||||
url : ext.contextPath + '/material/boardbatch/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑网板批次信息',
|
||||
url : ext.contextPath + '/material/boardbatch/edit.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/boardbatch/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/boardbatch/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');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var importFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择文件',
|
||||
width: 600,
|
||||
height:300,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/boardbatch/doimport.do',
|
||||
buttons : [ {
|
||||
text : '导入数据',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doimport(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
$(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/boardbatch/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 : '100', title : '网板批次号', field : 'no', sortable : true, halign:'center'},
|
||||
{width : '90', title : '网板名称', field : 'name', sortable : true, halign:'center'},
|
||||
{width : '80', title : '网板类别', field : 'type', sortable : true, halign:'center'},
|
||||
{width : '60', title : '状态', field : 'status', sortable : true, halign:'center',formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '${Flag_UNUSE}':
|
||||
return '未使用';
|
||||
case '${Flag_INUSE}':
|
||||
return '使用中';
|
||||
case '${Flag_USED}':
|
||||
return '使用完毕';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}},
|
||||
] ],
|
||||
columns : [ [
|
||||
{width : '180', title : '工艺路线', field : 'processrealid', sortable : true, halign:'center' },
|
||||
{width : '130', title : '使用开始时间', field : 'starttime', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{width : '130', title : '使用结束时间', field : 'endtime', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{width : '60', title : '修改者', field : 'alteruser', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
value ='admin';
|
||||
return value;
|
||||
} },
|
||||
{width : '130', title : '修改时间', field : 'alterdt', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/boardbatch/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/boardbatch/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/boardbatch/getMachine.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 : '140', title : '使用网板设备编号', field : 'equipmentcardid', sortable : true, halign:'center'},
|
||||
{width : '140', title : '使用网板设备编号', field : 'equipmentname', sortable : true, halign:'center'},
|
||||
{width : '85', title : '使用网板设备状态', field : 'ibmstatus', sortable : true, align:'center',halign:'center',formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '${Flag_UNUSE}':
|
||||
return '未使用';
|
||||
case '${Flag_INUSE}':
|
||||
return '使用中';
|
||||
case '${Flag_USED}':
|
||||
return '使用完毕';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}},
|
||||
] ],
|
||||
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/boardbatch/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/inkbatch/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>
|
||||
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true" onclick="importFun();">导入网板批次</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_name" class="easyui-textbox" /></td>
|
||||
<td>网板批次号</td>
|
||||
<td><input name="search_no" 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>
|
||||
|
||||
98
bin/WebRoot/jsp/material/boardbatchView.jsp
Normal file
98
bin/WebRoot/jsp/material/boardbatchView.jsp
Normal file
@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%request.setAttribute("Flag_UNUSE",com.sipai.entity.material.Boardbatch.Flag_UNUSE);%>
|
||||
<%request.setAttribute("Flag_INUSE",com.sipai.entity.material.Boardbatch.Flag_INUSE);%>
|
||||
<%request.setAttribute("Flag_USED",com.sipai.entity.material.Boardbatch.Flag_USED);%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#m').panel({
|
||||
width:"100%",
|
||||
height:"300",
|
||||
title: '使用设备',
|
||||
});
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
idField : 'id',
|
||||
columns : [ [
|
||||
{width : '140', title : '设备编号', field : 'equipmentcardid', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '设备名称', field : 'equipmentname', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '105', title : '设备油墨使用状态', field : 'ibmstatus', sortable : true,formatter:function(value,row){
|
||||
switch (value) {
|
||||
case '${Flag_UNUSE}':
|
||||
return '未使用';
|
||||
case '${Flag_INUSE}':
|
||||
return '使用中';
|
||||
case '${Flag_USED}':
|
||||
return '使用完毕';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}},
|
||||
{width : '90', title : '设备型号', field : 'equipmentmodel', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '设备类型', field : 'equipmentclassid', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '存放位置', field : 'areaid', sortable : true, editor:'textbox',halign:'center'}
|
||||
] ],
|
||||
data:${equipmentcardList}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
body{ text-align:center}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${boardbatch.id }"/>
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<th>网板批次号</th>
|
||||
<td>${boardbatch.no }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>网板类别</th>
|
||||
<td>${boardbatch.type }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>网板名称</th>
|
||||
<td>${boardbatch.name }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料状态</th>
|
||||
<td>
|
||||
<c:if test="${boardbatch.status=='0'}">未使用</c:if>
|
||||
<c:if test="${boardbatch.status=='1'}">使用中</c:if>
|
||||
<c:if test="${boardbatch.status=='2'}">使用完毕</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品工艺路线</th>
|
||||
<td>${boardbatch.processrealid }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>开始时间</th>
|
||||
<td>${fn:substring(boardbatch.starttime,0,19)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>结束时间</th>
|
||||
<td>${fn:substring(boardbatch.endtime,0,19)}</td>
|
||||
</tr>
|
||||
<%-- <tr>
|
||||
<th>机台</th>
|
||||
<td>${boardbatch.equipmentName }</td>
|
||||
</tr> --%>
|
||||
</table>
|
||||
</form>
|
||||
<div id="m">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
88
bin/WebRoot/jsp/material/bomsForSelect.jsp
Normal file
88
bin/WebRoot/jsp/material/bomsForSelect.jsp
Normal file
@ -0,0 +1,88 @@
|
||||
<%@ 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;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialbom/getMaterialBOMs.do?querytype=select&bomid=${bomid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
singleSelect:true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '物料编码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '400', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '80', title : '单位', field : 'unit', sortable : true, halign:'center'},
|
||||
{width : '80', title : '版本', field : 'version', sortable : true, align:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
//以json格式返回数据
|
||||
var jsonstr = "";
|
||||
var bomidstr = "";
|
||||
var namestr = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
bomidstr += rows[i].id+",";
|
||||
namestr+= rows[i].materialname+",";
|
||||
}
|
||||
if(bomidstr.length>0){
|
||||
bomidstr = bomidstr.substring(0,bomidstr.length-1);
|
||||
namestr = namestr.substring(0,namestr.length-1);
|
||||
}
|
||||
jsonstr = '{"bomid":"'+bomidstr+'","bomcode":"'+namestr+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>物料名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>物料编码</td>
|
||||
<td><input name="search_code" 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>
|
||||
142
bin/WebRoot/jsp/material/clientsAdd.jsp
Normal file
142
bin/WebRoot/jsp/material/clientsAdd.jsp
Normal file
@ -0,0 +1,142 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/clients/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
//信息验证
|
||||
$.extend($.fn.validatebox.defaults.rules, {
|
||||
phoneRex: {//电话号码自定义验证
|
||||
validator: function(value){
|
||||
var rex=/^1[3-8]+\d{9}$/;
|
||||
//var rex=/^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/;
|
||||
//区号:前面一个0,后面跟2-3位数字 : 0\d{2,3}
|
||||
//电话号码:7-8位数字: \d{7,8
|
||||
//分机号:一般都是3位数字: \d{3,}
|
||||
//这样连接起来就是验证电话的正则表达式了:/^((0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/
|
||||
var rex2=/^((0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/;
|
||||
if(rex.test(value)||rex2.test(value))
|
||||
{
|
||||
// alert('t'+value);
|
||||
return true;
|
||||
}else
|
||||
{
|
||||
//alert('false '+value);
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
message: '请输入正确电话或手机格式'
|
||||
},
|
||||
name: {// 验证姓名,中文或英文,必须输入全是中文或全是英文
|
||||
validator: function (value) {
|
||||
return /^[\Α-\¥]+$/i.test(value) | /^\w+[\w\s]+\w+$/i.test(value);
|
||||
},
|
||||
message: '请输入姓名'
|
||||
},
|
||||
faxno: {// 验证传真
|
||||
validator: function (value) {
|
||||
// return /^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/i.test(value);
|
||||
return /^((\d{2,3})|(\d{3}\-))?(0\d{2,3}|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/i.test(value);
|
||||
},
|
||||
message: '传真号码不正确'
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
/* $('#lineid').combobox({
|
||||
url : ext.contextPath + '/work/line/getSelectList.do?random=' + Math.random(),
|
||||
valueField : 'id',
|
||||
textField : 'name',
|
||||
method:'get',
|
||||
width:250,
|
||||
panelHeight:'auto'
|
||||
});
|
||||
|
||||
$('#typeid').combobox({
|
||||
url : ext.contextPath + '/work/workstationType/getselectlist.do?random=' + Math.random(),
|
||||
valueField:'id',
|
||||
textField:'name',
|
||||
method:'get'
|
||||
}); */
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>客户名称</th>
|
||||
<td><input name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" validtype="name" invalidMessage="请输入正确名称"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>联系电话</th>
|
||||
<td><input name="tel" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" type="text" validtype="phoneRex" invalidMessage="请输入正确的电话号码"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>联系传真</th>
|
||||
<td><input name="fax" class="easyui-textbox"
|
||||
data-options="required:false" value="" validtype="faxno" invalidMessage="请输入正确传真号" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>E-mail</th>
|
||||
<td><input name="email" class="easyui-textbox"
|
||||
data-options="required:false" value="" type="text" validtype="email" required="true" missingMessage="不能为空" invalidMessage="请输入正确的邮箱格式" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>联系人</th>
|
||||
<td><input name="contactname" class="easyui-textbox"
|
||||
data-options="required:false" value="" validtype="name" invalidMessage="请输入正确名称"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>联系人电话</th>
|
||||
<td><input name="contacttel" class="easyui-textbox"
|
||||
data-options="required:false" value="" type="text" validtype="phoneRex" invalidMessage="请输入正确的电话号码"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>地址</th>
|
||||
<td><input name="address" class="easyui-textbox"
|
||||
data-options="required:false" value="" validtype="length[0,250]" invalidMessage="有效长度0-250"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td><input id="remark" name="remark" class="easyui-textbox"
|
||||
style="overflow:auto;height:80px;width:100%" value=""
|
||||
data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
126
bin/WebRoot/jsp/material/clientsEdit.jsp
Normal file
126
bin/WebRoot/jsp/material/clientsEdit.jsp
Normal file
@ -0,0 +1,126 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/clients/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
});
|
||||
//信息验证
|
||||
$.extend($.fn.validatebox.defaults.rules, {
|
||||
phoneRex: {//电话号码自定义验证
|
||||
validator: function(value){
|
||||
var rex=/^1[3-8]+\d{9}$/;
|
||||
//var rex=/^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/;
|
||||
//区号:前面一个0,后面跟2-3位数字 : 0\d{2,3}
|
||||
//电话号码:7-8位数字: \d{7,8
|
||||
//分机号:一般都是3位数字: \d{3,}
|
||||
//这样连接起来就是验证电话的正则表达式了:/^((0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/
|
||||
var rex2=/^((0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/;
|
||||
if(rex.test(value)||rex2.test(value))
|
||||
{
|
||||
// alert('t'+value);
|
||||
return true;
|
||||
}else
|
||||
{
|
||||
//alert('false '+value);
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
message: '请输入正确电话或手机格式'
|
||||
},
|
||||
name: {// 验证姓名,中文或英文,必须输入全是中文或全是英文
|
||||
validator: function (value) {
|
||||
return /^[\Α-\¥]+$/i.test(value) | /^\w+[\w\s]+\w+$/i.test(value);
|
||||
},
|
||||
message: '请输入姓名'
|
||||
},
|
||||
faxno: {// 验证传真
|
||||
validator: function (value) {
|
||||
// return /^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/i.test(value);
|
||||
return /^((\d{2,3})|(\d{3}\-))?(0\d{2,3}|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/i.test(value);
|
||||
},
|
||||
message: '传真号码不正确'
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input name="id" type="hidden" value="${clients.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>客户名称</th>
|
||||
<td><input name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${clients.name}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>联系电话</th>
|
||||
<td><input name="tel" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${clients.tel}" type="text" validtype="phoneRex" invalidMessage="请输入正确的电话号码"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>联系传真</th>
|
||||
<td><input name="fax" class="easyui-textbox"
|
||||
data-options="required:false" value="${clients.fax}" validtype="faxno" invalidMessage="请输入正确传真号"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>E-mail</th>
|
||||
<td><input name="email" class="easyui-textbox"
|
||||
data-options="required:false" value="${clients.email}" validtype="email" required="true" missingMessage="不能为空" invalidMessage="请输入正确的邮箱格式"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>联系人</th>
|
||||
<td><input name="contactname" class="easyui-textbox"
|
||||
data-options="required:false" value="${clients.contactname}" validtype="name" invalidMessage="请输入正确名称"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>联系人电话</th>
|
||||
<td><input name="contacttel" class="easyui-textbox"
|
||||
data-options="required:false" value="${clients.contacttel}" validtype="phoneRex" invalidMessage="请输入正确的电话号码"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>地址</th>
|
||||
<td><input name="address" class="easyui-textbox"
|
||||
data-options="required:false" value="${clients.address}" validtype="length[0,250]" invalidMessage="有效长度0-250"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td><input id="remark" name="remark" class="easyui-textbox"
|
||||
data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250"
|
||||
style="overflow:auto;height:80px;width:100%" value="${clients.remark}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
155
bin/WebRoot/jsp/material/clientsList.jsp
Normal file
155
bin/WebRoot/jsp/material/clientsList.jsp
Normal file
@ -0,0 +1,155 @@
|
||||
<%@ 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 addFun = function(){
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '添加客户',
|
||||
width : 600,
|
||||
height : 500,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/material/clients/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/clients/edit.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/clients/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info',function(){
|
||||
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+",";
|
||||
});
|
||||
//alert(datas);
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/clients/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/clients/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '250', title : '名称', field : 'name', sortable : true, halign:'center',align:'center'},
|
||||
{width : '250', title : '地址', field : 'address', sortable : true, halign:'center',align:'center'},
|
||||
{width : '100', title : '联系人', field : 'contactname', sortable : true, halign:'center',align:'center'},
|
||||
{width : '100', title : '联系人电话', field : 'contacttel', sortable : true, halign:'center',align:'center'},
|
||||
{width : '100', title : '备注', field : 'remark', sortable : true, halign:'center',align:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"material/clients/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/clients/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);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</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/clients/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/clients/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<input id="userids" name="userids" type="hidden" />
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
142
bin/WebRoot/jsp/material/cutterCNCEquList.jsp
Normal file
142
bin/WebRoot/jsp/material/cutterCNCEquList.jsp
Normal file
@ -0,0 +1,142 @@
|
||||
<%@ 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>
|
||||
<style>
|
||||
|
||||
.textsuccess {
|
||||
position: relative;
|
||||
border: 1px solid #95B8E7;
|
||||
background-color: #28FF28;
|
||||
color:#FFFFFF;
|
||||
text-align:center;
|
||||
width:100% ;
|
||||
height:100%;
|
||||
line-height:90px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.texterror {
|
||||
position: relative;
|
||||
border: 1px solid #95B8E7;
|
||||
background-color: red;
|
||||
color:#FFFFFF;
|
||||
text-align:center;
|
||||
width:100% ;
|
||||
height:100%;
|
||||
line-height:90px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.textuntest {
|
||||
position: relative;
|
||||
border: 1px solid #95B8E7;
|
||||
background-color: #46A3FF;
|
||||
color:#FFFFFF;
|
||||
text-align:center;
|
||||
width:100% ;
|
||||
height:100%;
|
||||
line-height:90px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
doDisplayCNCEqu();
|
||||
})
|
||||
|
||||
var displayInfoFun = function(equid) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
width:1000,
|
||||
height:675,
|
||||
title : '编辑设备信息',
|
||||
url : ext.contextPath + '/material/cuttercncinfo/cutterCNCInfoList.do?equid=' + equid,
|
||||
});
|
||||
};
|
||||
|
||||
function doDisplayCNCEqu(){
|
||||
$.getJSON(ext.contextPath +"/material/cuttercncinfo/getCNCEquJson.do",cb);
|
||||
}
|
||||
function cb(data){
|
||||
for(var i = 0;i<data.length;i++){
|
||||
var subDiv = document.createElement("div");
|
||||
subDiv.style.width = "8%";
|
||||
subDiv.style.height = "80px";
|
||||
subDiv.style.float = "left";
|
||||
subDiv.style.margin = "2%";
|
||||
document.getElementById("cncEqupool").appendChild(subDiv);
|
||||
if(data[i].equstatusvalue == "1")
|
||||
{
|
||||
//var img=document.createElement("img");
|
||||
//img.src="/PlantEngine_RLD/IMG/CNCmachine.PNG";
|
||||
var subInput = document.createElement("input");
|
||||
subInput.className = "textsuccess";
|
||||
subInput.value = "CNC#"+data[i].equipmentcardid.substring(data[i].equipmentcardid.length-4,data[i].equipmentcardid.length);//显示cardid
|
||||
subInput.setAttribute("equId",data[i].equid);
|
||||
subInput.readOnly = true;
|
||||
//subDiv.appendChild(img);
|
||||
subDiv.appendChild(subInput);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//var img=document.createElement("img");
|
||||
//img.src="/PlantEngine_RLD/IMG/CNCmachine.PNG";
|
||||
var subInput = document.createElement("input");
|
||||
subInput.className = "texterror";
|
||||
subInput.value = "CNC#"+data[i].equipmentcardid.substring(data[i].equipmentcardid.length-4,data[i].equipmentcardid.length);//显示cardid
|
||||
subInput.setAttribute("equId",data[i].equid);//传递equid
|
||||
subInput.readOnly = true;
|
||||
//subDiv.appendChild(img);
|
||||
subDiv.appendChild(subInput);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
$("input.textsuccess").bind("click", function () {
|
||||
selectequid =$(this).attr("equId");
|
||||
displayInfoFun(selectequid);
|
||||
});
|
||||
|
||||
$("input.texterror").bind("click", function () {
|
||||
selectequid =$(this).attr("equId");
|
||||
displayInfoFun(selectequid);
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id = "cncEqupool" ></div>
|
||||
</body>
|
||||
</html>
|
||||
104
bin/WebRoot/jsp/material/cutterCNCInfoList.jsp
Normal file
104
bin/WebRoot/jsp/material/cutterCNCInfoList.jsp
Normal file
@ -0,0 +1,104 @@
|
||||
<%@ 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 viewFun = function(id,equid) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看刀具信息',
|
||||
width:1000,
|
||||
height:600,
|
||||
url : ext.contextPath + '/material/cuttercncinfo/cutterDetailInfo.do?equid=' + equid+'&id='+id
|
||||
});
|
||||
};
|
||||
|
||||
var equid = "${equid}";//设备id号
|
||||
|
||||
var showSpeedFun = function() {
|
||||
$("#rightCutterSpeed").attr("src",ext.contextPath+"/material/cuttercncinfo/cutterSpeedInfo.do?equid="+equid);
|
||||
};
|
||||
|
||||
var showStatusFun = function() {
|
||||
$("#leftCutterStatus").attr("src",ext.contextPath+"/material/cuttercncinfo/cutterStatusInfo.do?equid="+equid);
|
||||
};
|
||||
|
||||
$(function() {
|
||||
showStatusFun();
|
||||
showSpeedFun();
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/cuttercncinfo/getlist.do?equid='+equid,
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{width : '100', title : '刀具编号', field : 'cutterno', sortable : true, align:'center',halign:'center'},
|
||||
{width : '110', title : '刀补开关', field : 'cutterswitchvalue', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
if(value == 1)
|
||||
{
|
||||
str += '<img class="iconImg ext-icon-tick" title="开" onclick="changeSwitchFun(\''+row.id+'\');"/>';
|
||||
}
|
||||
else
|
||||
{
|
||||
str += '<img class="iconImg ext-icon-cancel" title="关" onclick="changeSwitchFun(\''+row.id+'\');"/>';
|
||||
}
|
||||
return str;
|
||||
} },
|
||||
{width : '120', title : '刀补量', field : 'cutteramountvalue', align:'center', halign:'center'},
|
||||
{width : '100', title : '首补片数', field : 'firstpiecenovalue', align:'center',halign:'center'},
|
||||
{width : '100', title : '首补量', field : 'firstamountvalue', align:'center', halign:'center'},
|
||||
{width : '110', title : '自补频率', field : 'autofreqvalue', align:'center', halign:'center'},
|
||||
{width : '110', title : '自补量', field : 'autoamountvalue', align:'center',halign:'center'},
|
||||
{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+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
onDblClickRow: function(index, row){
|
||||
viewFun(row.id,equid);
|
||||
},
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="mainDiv">
|
||||
<div id="upDiv" style="height:300px">
|
||||
<div id="statusDiv" style="float:left;height:100%;width:30%">
|
||||
<iframe id="leftCutterStatus" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div id="speedDiv" style="float:right;height:100%;width:70%">
|
||||
<iframe id="rightCutterSpeed" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pool" class="easyui-panel" title="CNC刀具(双击显示曲线图)" style="float:left;width:980px;height:340px;padding:10px;background:#fafafa;">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
430
bin/WebRoot/jsp/material/cutterCNCPointAdd.jsp
Normal file
430
bin/WebRoot/jsp/material/cutterCNCPointAdd.jsp
Normal file
@ -0,0 +1,430 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cutterpointset/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectEquipmentCard(equid,equipmentcode){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择设备',
|
||||
width: 900,
|
||||
height:550,
|
||||
url : ext.contextPath + '/equipment/showEquipmentCardForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
$("#"+equid).val(res.id);
|
||||
$("#"+equipmentcode).textbox('setValue',res.equipmentcardid);
|
||||
$("#equipmentname").html(res.equipmentname);
|
||||
}
|
||||
console.log("e",$("#equid").val());
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#equipmentcode").textbox('textbox').bind("click", function () {
|
||||
selectEquipmentCard("equid","equipmentcode");
|
||||
});
|
||||
});
|
||||
|
||||
function selectPoint1(equstatus,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择设备状态监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+equstatus).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#equstatus").textbox('textbox').bind("click", function () {
|
||||
selectPoint1("equstatus","id");
|
||||
});
|
||||
});
|
||||
function selectPoint2(equrunmode,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+equrunmode).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#equrunmode").textbox('textbox').bind("click", function () {
|
||||
selectPoint2("equrunmode","id");
|
||||
});
|
||||
});
|
||||
function selectPoint3(equgospeed,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+equgospeed).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#equgospeed").textbox('textbox').bind("click", function () {
|
||||
selectPoint3("equgospeed","id");
|
||||
});
|
||||
});
|
||||
function selectPoint4(equcaspeed,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+equcaspeed).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#equcaspeed").textbox('textbox').bind("click", function () {
|
||||
selectPoint4("equcaspeed","id");
|
||||
});
|
||||
});
|
||||
function selectPoint5(processcumno,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+processcumno).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#processcumno").textbox('textbox').bind("click", function () {
|
||||
selectPoint5("processcumno","id");
|
||||
});
|
||||
});
|
||||
function selectPoint6(mechandno,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+mechandno).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#mechandno").textbox('textbox').bind("click", function () {
|
||||
selectPoint6("mechandno","id");
|
||||
});
|
||||
});
|
||||
|
||||
function selectcutterlossno(cutterlossno,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+cutterlossno).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#cutterlossno").textbox('textbox').bind("click", function () {
|
||||
selectPoint6("cutterlossno","id");
|
||||
});
|
||||
});
|
||||
function selectcutterlossset(cutterlossset,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+cutterlossset).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#cutterlossset").textbox('textbox').bind("click", function () {
|
||||
selectPoint6("cutterlossset","id");
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="equid" name="equid" type="hidden"/>
|
||||
<input id="id" name="id" type="hidden" value="" />
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>设备编号</th>
|
||||
<td><input id="equipmentcode" name="equipmentcode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<td><span id="equipmentname"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>设备状态</th>
|
||||
<td>
|
||||
<input id="equstatus" name="equstatus" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>运行模式</th>
|
||||
<td><input id="equrunmode" name="equrunmode" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>G1进给速度</th>
|
||||
<td><input id="equgospeed" name="equgospeed" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>主轴转速</th>
|
||||
<td><input id="equcaspeed" name="equcaspeed" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>加工累计数</th>
|
||||
<td><input id="processcumno" name="processcumno" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>机械手计数</th>
|
||||
<td><input id="mechandno" name="mechandno" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀损计数</th>
|
||||
<td>
|
||||
<input id="cutterlossno" name="cutterlossno" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀损设定</th>
|
||||
<td>
|
||||
<input id="cutterlossset" name="cutterlossset" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
429
bin/WebRoot/jsp/material/cutterCNCPointEdit.jsp
Normal file
429
bin/WebRoot/jsp/material/cutterCNCPointEdit.jsp
Normal file
@ -0,0 +1,429 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cutterpointset/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectEquipmentCard(equipmentid,equipmentcode){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择设备',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/equipment/showEquipmentCardForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
|
||||
if(res!=null){
|
||||
$("#"+equid).val(res.id);
|
||||
$("#"+equipmentcode).textbox('setValue',res.equipmentcardid);
|
||||
$("#equipmentname").html(res.equipmentname);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#equipmentcode").textbox('textbox').bind("click", function () {
|
||||
selectEquipmentCard("equipmentid","equipmentcode");
|
||||
});
|
||||
});
|
||||
|
||||
function selectPoint1(equstatus,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择设备状态监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+equstatus).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#equstatus").textbox('textbox').bind("click", function () {
|
||||
selectPoint1("equstatus","id");
|
||||
});
|
||||
});
|
||||
function selectPoint2(equrunmode,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+equrunmode).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#equrunmode").textbox('textbox').bind("click", function () {
|
||||
selectPoint2("equrunmode","id");
|
||||
});
|
||||
});
|
||||
function selectPoint3(equgospeed,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+equgospeed).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#equgospeed").textbox('textbox').bind("click", function () {
|
||||
selectPoint3("equgospeed","id");
|
||||
});
|
||||
});
|
||||
function selectPoint4(equcaspeed,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+equcaspeed).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#equcaspeed").textbox('textbox').bind("click", function () {
|
||||
selectPoint4("equcaspeed","id");
|
||||
});
|
||||
});
|
||||
function selectPoint5(processcumno,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+processcumno).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#processcumno").textbox('textbox').bind("click", function () {
|
||||
selectPoint5("processcumno","id");
|
||||
});
|
||||
});
|
||||
function selectPoint6(mechandno,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+mechandno).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#mechandno").textbox('textbox').bind("click", function () {
|
||||
selectPoint6("mechandno","id");
|
||||
});
|
||||
});
|
||||
|
||||
function selectcutterlossno(cutterlossno,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+cutterlossno).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#cutterlossno").textbox('textbox').bind("click", function () {
|
||||
selectPoint6("cutterlossno","id");
|
||||
});
|
||||
});
|
||||
function selectcutterlossset(cutterlossset,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+cutterlossset).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#cutterlossset").textbox('textbox').bind("click", function () {
|
||||
selectPoint6("cutterlossset","id");
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="id" name="id" type="hidden" value="${cutterCNCPoint.id}"/>
|
||||
<input id="equid" name="equid" type="hidden" value="${cutterCNCPoint.equid}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>设备编号</th>
|
||||
<td><input id="equipmentcode" name="equipmentcode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="${cutterCNCPoint.equipmentcardid }" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<td>${cutterCNCPoint.equipmentname}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>设备状态</th>
|
||||
<td><input id="equstatus" name="equstatus" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterCNCPoint.equstatus}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>运行模式</th>
|
||||
<td><input id="equrunmode" name="equrunmode" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterCNCPoint.equrunmode}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>G1进给速度</th>
|
||||
<td><input id="equgospeed" name="equgospeed" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterCNCPoint.equgospeed}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>主轴转速</th>
|
||||
<td><input id="equcaspeed" name="equcaspeed" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterCNCPoint.equcaspeed}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>加工累计数</th>
|
||||
<td><input id="processcumno" name="processcumno" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterCNCPoint.processcumno}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>机械手计数</th>
|
||||
<td>
|
||||
<input id="mechandno" name="mechandno" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterCNCPoint.mechandno}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀损计数</th>
|
||||
<td>
|
||||
<input id="cutterlossno" name="cutterlossno" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterCNCPoint.cutterlossno}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀损设定</th>
|
||||
<td>
|
||||
<input id="cutterlossset" name="cutterlossset" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterCNCPoint.cutterlossset}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
160
bin/WebRoot/jsp/material/cutterCNCStandardAdd.jsp
Normal file
160
bin/WebRoot/jsp/material/cutterCNCStandardAdd.jsp
Normal file
@ -0,0 +1,160 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cutterstandard/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectEquipmentCard(equid,equipmentcode){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择设备',
|
||||
width: 900,
|
||||
height:550,
|
||||
url : ext.contextPath + '/equipment/showEquipmentCardForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
$("#"+equid).val(res.id);
|
||||
$("#"+equipmentcode).textbox('setValue',res.equipmentcardid);
|
||||
$("#equipmentname").html(res.equipmentname);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#equipmentcode").textbox('textbox').bind("click", function () {
|
||||
selectEquipmentCard("equid","equipmentcode");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function selectSemimanufactures(){
|
||||
localStorage.setItem("materialcode",$("#materialcode").val().split(","));
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择半成品物料代码',
|
||||
width: 500,
|
||||
height:550,
|
||||
url : ext.contextPath + '/material/cutterstandard/selectSemimanufactures.do?',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
$("#materialcode").textbox('setValue',res.materialcode);//easyui textbox赋值jquery不一样
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#materialcode").textbox('textbox').bind("click", function () {
|
||||
selectSemimanufactures();
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="equid" name="equid" type="hidden"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>设备编号</th>
|
||||
<td><input id="equipmentcode" name="equipmentcode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<td><span id="equipmentname"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td>
|
||||
<input id="materialcode" name="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>G1进给速度</th>
|
||||
<td><input id="stequgospeedvalue" name="stequgospeedvalue" class="easyui-textbox" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>主轴转速</th>
|
||||
<td><input id="stequcaspeedvalue" name="stequcaspeedvalue" class="easyui-textbox" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>加工累计数</th>
|
||||
<td><input id="stprocesscumnovalue" name="stprocesscumnovalue" class="easyui-textbox" value="" /> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>机械手计数</th>
|
||||
<td><input id="stmechandnovalue" name="stmechandnovalue" class="easyui-textbox" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀损计数</th>
|
||||
<td>
|
||||
<input id="stcutterlossnovalue" name="stcutterlossnovalue" class="easyui-textbox" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀损设定</th>
|
||||
<td>
|
||||
<input id="stcutterlosssetvalue" name="stcutterlosssetvalue" class="easyui-textbox" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
286
bin/WebRoot/jsp/material/cutterCNCStandardList.jsp
Normal file
286
bin/WebRoot/jsp/material/cutterCNCStandardList.jsp
Normal file
@ -0,0 +1,286 @@
|
||||
<%@ 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 editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑设备信息',
|
||||
url : ext.contextPath + '/material/cutterstandard/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
width: 780,
|
||||
height:550,
|
||||
title : '添加专家库刀具信息',
|
||||
url : ext.contextPath + '/material/cutterstandard/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
var cutterStandardIssuedFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
width: 780,
|
||||
height:550,
|
||||
title : '下发专家库刀具信息',
|
||||
url : ext.contextPath + '/material/cutterstandard/issued.do',
|
||||
});
|
||||
};
|
||||
function dosave(datarow) {
|
||||
$.post(ext.contextPath + "/material/cutterstandard/saveGridData.do",{datarow:datarow},function(data1){
|
||||
if(JSON.parse(data1).res>0)
|
||||
{
|
||||
}
|
||||
else if(JSON.parse(data1).res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data1.res, 'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var deleteFun = 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/cutterstandard/delete.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var editIndex = undefined;//定义编辑列的索引
|
||||
function endEditing(){//清除editor
|
||||
if (editIndex == undefined){return true;}
|
||||
if ($('#grid').datagrid('validateRow', editIndex)){
|
||||
$('#grid').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
/*$.extend($.fn.datagrid.methods, {
|
||||
editCell: function(jq,param){
|
||||
return jq.each(function(){
|
||||
var opts = $(this).datagrid('options');
|
||||
var fields = $(this).datagrid('getColumnFields',true).concat($(this).datagrid('getColumnFields'));
|
||||
for(var i=0; i<fields.length; i++){
|
||||
var col = $(this).datagrid('getColumnOption', fields[i]);
|
||||
col.editor1 = col.editor;
|
||||
if (fields[i] != param.field){
|
||||
col.editor = null;
|
||||
}
|
||||
}
|
||||
$(this).datagrid('beginEdit', param.index);
|
||||
for(var i=0; i<fields.length; i++){
|
||||
var col = $(this).datagrid('getColumnOption', fields[i]);
|
||||
col.editor = col.editor1;
|
||||
}
|
||||
});
|
||||
}
|
||||
});*/
|
||||
grid = $('#grid').datagrid({
|
||||
view: detailview,
|
||||
detailFormatter:function(index,row){
|
||||
return '<div style="padding:2px"><table class="ddv"></table></div>';
|
||||
},
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/cutterstandard/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
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'},
|
||||
{width : '100', title : '物料长代码', field : 'materialcode', sortable : true,align:'center', halign:'center'},
|
||||
] ],
|
||||
columns : [ [
|
||||
{width : '100', title : 'G1进给速度', field : 'stequgospeedvalue', sortable : true,align:'center', halign:'center',editor:'textbox'},
|
||||
{width : '100', title : '主轴转速', field : 'stequcaspeedvalue', sortable : true,align:'center', halign:'center',editor:'textbox'},
|
||||
{width : '100', title : '加工累计数', field : 'stprocesscumnovalue', sortable : true,align:'center', halign:'center',editor:'textbox'},
|
||||
{width : '100', title : '机械手计数', field : 'stmechandnovalue', sortable : true, align:'center',halign:'center',editor:'textbox'},
|
||||
{width : '100', title : '刀损计数', field : 'stcutterlossnovalue', sortable : true, align:'center',halign:'center',editor:'textbox'},
|
||||
{width : '100', title : '刀损设定', field : 'stcutterlosssetvalue', sortable : true, align:'center',halign:'center',editor:'textbox'},
|
||||
{width : '125', title : '操作时间', field : 'insdt', sortable : true, align:'center',halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} }
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
|
||||
},
|
||||
onClickCell:function(index){
|
||||
endEditing();
|
||||
},
|
||||
onDblClickCell : function(index,field){
|
||||
/*if (endEditing()) {
|
||||
$('#grid').datagrid('selectRow', index).datagrid('editCell', {index:index,field:field});
|
||||
editIndex = index;
|
||||
}*/
|
||||
if(!endEditing()){
|
||||
return false;
|
||||
}
|
||||
|
||||
editIndex = index;
|
||||
$('#grid').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
|
||||
var ed = $('#grid').datagrid('getEditor', {index:editIndex,field:'name'});
|
||||
($(ed.target).data('textbox') ? $(ed.target).textbox('textbox') : $(ed.target)).focus();
|
||||
},
|
||||
onAfterEdit:function(index,row){
|
||||
//保存行
|
||||
var datarow = "["+JSON.stringify(row)+"]";
|
||||
dosave(datarow);
|
||||
},
|
||||
onExpandRow: function(index,prow){
|
||||
ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
|
||||
ddv.datagrid({
|
||||
url:ext.contextPath + '/material/cutterstandard/getCutterStandard.do?pid='+prow.id,
|
||||
fitColumns:true,
|
||||
singleSelect: true,
|
||||
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', formatter : function(value, row) {
|
||||
return "刀具";
|
||||
}
|
||||
},
|
||||
{width : '100', title : '刀补量', field : 'stcutteramountvalue', sortable : true,align:'center', halign:'center',editor:'textbox'},
|
||||
{width : '100', title : '首补片数', field : 'stfirstpiecenovalue', sortable : true, align:'center',halign:'center'},
|
||||
{width : '100', title : '首补量', field : 'stfirstamountvalue', sortable : true, align:'center',align:'center', halign:'center'},
|
||||
{width : '100', title : '自补频率', field : 'stautofreqvalue', sortable : true, align:'center',halign:'center'},
|
||||
{width : '100', title : '自补量', field : 'stautoamountvalue', sortable : true, align:'center', halign:'center'},
|
||||
{title : '操作', field : 'action', width : '100', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+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/cutterstandard/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/cutterstandard/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deleteFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-bullet_go',plain:true"
|
||||
onclick="cutterStandardIssuedFun();">下发</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_materialcode" 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>
|
||||
159
bin/WebRoot/jsp/material/cutterChartsInfo.jsp
Normal file
159
bin/WebRoot/jsp/material/cutterChartsInfo.jsp
Normal file
@ -0,0 +1,159 @@
|
||||
<%@ 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">
|
||||
$(function() {
|
||||
});
|
||||
$.ajaxSetup({
|
||||
async : false
|
||||
});
|
||||
//同步
|
||||
var mpid ="${mpid}";
|
||||
|
||||
var getyFun = function(mpid) {
|
||||
var datay = $.get(ext.contextPath +"/material/cuttercncinfo/getInfo.do?mpid="+mpid);
|
||||
return parseFloat(datay.responseText);
|
||||
};
|
||||
|
||||
var judgeNameFun = function(text){
|
||||
var str = "";
|
||||
if(text == "CutterAmount")
|
||||
{
|
||||
str = "刀补量";
|
||||
}
|
||||
else if(text == "FirstPieceNo")
|
||||
{
|
||||
str = "首补片数";
|
||||
}
|
||||
else if(text == "FirstAmount")
|
||||
{
|
||||
str = "首补量";
|
||||
}
|
||||
else if(text == "AutoFreq")
|
||||
{
|
||||
str = "自补频率";
|
||||
}
|
||||
else if(text == "AutoAmount")
|
||||
{
|
||||
str = "自补量";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<div id="container" style="float:left;width: 350px; height: 300px; margin: 0 auto"></div>
|
||||
<script language="JavaScript">
|
||||
$(document).ready(function() {
|
||||
var chart = {
|
||||
type: 'spline',
|
||||
animation: Highcharts.svg, // don't animate in IE < IE 10.
|
||||
marginRight: 10,
|
||||
events: {
|
||||
load: function () {
|
||||
// set up the updating of the chart each second
|
||||
var series = this.series[0];
|
||||
setInterval(function () {
|
||||
//getJson 位置
|
||||
var x = (new Date()).getTime(), // current time
|
||||
y = getyFun(mpid);//getyFun()
|
||||
series.addPoint([x, y], true, true);
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
};
|
||||
var title = {
|
||||
text: judgeNameFun('${text}')
|
||||
};
|
||||
var xAxis = {
|
||||
type: 'datetime',
|
||||
tickPixelInterval: 150
|
||||
};
|
||||
var yAxis = {
|
||||
title: {
|
||||
text: 'Value'
|
||||
},
|
||||
plotLines: [{
|
||||
value: 0,
|
||||
width: 1,
|
||||
color: '#808080'
|
||||
}]
|
||||
};
|
||||
var tooltip = {
|
||||
formatter: function () {
|
||||
return '<b>' + this.series.name + '</b><br/>' +
|
||||
Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br/>' +
|
||||
Highcharts.numberFormat(this.y, 2);
|
||||
}
|
||||
};
|
||||
var plotOptions = {
|
||||
area: {
|
||||
pointStart: 1940,
|
||||
marker: {
|
||||
enabled: false,
|
||||
symbol: 'circle',
|
||||
radius: 2,
|
||||
states: {
|
||||
hover: {
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
var legend = {
|
||||
enabled: false
|
||||
};
|
||||
var credits = {
|
||||
enabled: false
|
||||
};
|
||||
var exporting = {
|
||||
enabled: false
|
||||
};
|
||||
//图表初值
|
||||
var series= [{
|
||||
name: 'Random data',
|
||||
data: (function () {
|
||||
// generate an array of random data
|
||||
var data = [],time = (new Date()).getTime(),i;
|
||||
for (i = -19; i <= 0; i += 1) {
|
||||
data.push({
|
||||
x: time + i * 1000,
|
||||
y: getyFun(mpid)//getyFun(equid,mpid);
|
||||
});
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
}];
|
||||
|
||||
var json = {};
|
||||
json.chart = chart;
|
||||
json.title = title;
|
||||
json.tooltip = tooltip;
|
||||
json.xAxis = xAxis;
|
||||
json.yAxis = yAxis;
|
||||
json.legend = legend;
|
||||
json.credits = credits;
|
||||
json.exporting = exporting;
|
||||
json.series = series;
|
||||
json.plotOptions = plotOptions;
|
||||
|
||||
|
||||
Highcharts.setOptions({
|
||||
global: {
|
||||
useUTC: false
|
||||
}
|
||||
});
|
||||
$('#container').highcharts(json);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
96
bin/WebRoot/jsp/material/cutterDetailInfo.jsp
Normal file
96
bin/WebRoot/jsp/material/cutterDetailInfo.jsp
Normal file
@ -0,0 +1,96 @@
|
||||
<%@ 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">
|
||||
$(function() {
|
||||
showFirstParamFun("${campid}");
|
||||
showSecondParamFun("${fpmpid}");
|
||||
showThirdParamFun("${fampid}");
|
||||
showFourthParamFun("${afmpid}");
|
||||
showFifthParamFun("${aampid}");
|
||||
//showSixthParamFun("${equid}","${sixmpid}");
|
||||
});
|
||||
$.ajaxSetup({
|
||||
async : false
|
||||
});
|
||||
//同步
|
||||
|
||||
//第一个监测点图表
|
||||
var showFirstParamFun = function(mpid) {
|
||||
$("#firstParam").attr("src",ext.contextPath+"/material/cuttercncinfo/cutterChartsInfo.do?mpid="+mpid+"&text=CutterAmount");
|
||||
};
|
||||
//第二个监测点图表
|
||||
var showSecondParamFun = function(mpid) {
|
||||
$("#secondParam").attr("src",ext.contextPath+"/material/cuttercncinfo/cutterChartsInfo.do?mpid="+mpid+"&text=FirstPieceNo");
|
||||
};
|
||||
//第三个监测点图表
|
||||
var showThirdParamFun = function(mpid) {
|
||||
$("#thirdParam").attr("src",ext.contextPath+"/material/cuttercncinfo/cutterChartsInfo.do?mpid="+mpid+"&text=FirstAmount");
|
||||
};
|
||||
//第四个监测点图表
|
||||
var showFourthParamFun = function(mpid) {
|
||||
$("#fourthParam").attr("src",ext.contextPath+"/material/cuttercncinfo/cutterChartsInfo.do?mpid="+mpid+"&text=AutoFreq");
|
||||
};
|
||||
//第五个监测点图表
|
||||
var showFifthParamFun = function(mpid) {
|
||||
$("#fifthParam").attr("src",ext.contextPath+"/material/cuttercncinfo/cutterChartsInfo.do?mpid="+mpid+"&text=AutoAmount");
|
||||
};
|
||||
//第六个监测点图表
|
||||
/*var showSixthParamFun = function(equid,mpid) {
|
||||
$("#sixthParam").attr("src",ext.contextPath+"/material/cuttercncinfo/cutterChartsInfo.do?equid="+equid+"&mpid="+mpid);
|
||||
};*/
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<h1>${equcard} 刀具${cutterno}</h1>
|
||||
<div id="mainDiv">
|
||||
<div id="downDiv" >
|
||||
<div>
|
||||
<div id="firstParamDiv" style="float:left;height:320px;width:370px">
|
||||
<iframe id="firstParam" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div style="float:right;width: 50px; height: 320px; margin: 0 auto"></div>
|
||||
<div id="secondParamDiv" style="float:right;height:320px;width:370px">
|
||||
<iframe id="secondParam" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div style="float:left;width: 50px; height: 320px; margin: 0 auto"></div>
|
||||
<div id="thirdParamDiv" style="float:left;height:320px;width:370px">
|
||||
<iframe id="thirdParam" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div style="float:right;width: 50px; height: 320px; margin: 0 auto"></div>
|
||||
<div id="fourthParamDiv" style="float:right;height:320px;width:370px">
|
||||
<iframe id="fourthParam" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div style="float:left;width: 50px; height: 320px; margin: 0 auto"></div>
|
||||
<div id="fifthParamDiv" style="float:left;height:320px;width:370px">
|
||||
<iframe id="fifthParam" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<!-- <div style="float:right;width: 50px; height: 320px; margin: 0 auto"></div>
|
||||
<div id="sixthParamDiv" style="float:right;height:320px;width:370px">
|
||||
<iframe id="sixthParam" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
136
bin/WebRoot/jsp/material/cutterInfoAdd.jsp
Normal file
136
bin/WebRoot/jsp/material/cutterInfoAdd.jsp
Normal file
@ -0,0 +1,136 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cutterinfo/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#tname').combotree({
|
||||
url : ext.contextPath + '/material/cuttertype/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#tname").tree("unselect");
|
||||
}
|
||||
},
|
||||
onClick : function(node) {
|
||||
$("#typeid").val(node.id);
|
||||
}
|
||||
});
|
||||
|
||||
$('#posname').combotree({
|
||||
url : ext.contextPath + '/material/cutterposition/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#posname").tree("unselect");
|
||||
}
|
||||
},
|
||||
onClick : function(node) {
|
||||
$("#positionid").val(node.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀具编码</th>
|
||||
<td><input id="cuttercode" name="cuttercode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀具名称</th>
|
||||
<td><input name="cuttername" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>类型</th>
|
||||
<td>
|
||||
<select id="tname" name="tname" class="easyui-combotree" value="" ></select>
|
||||
<input id="typeid" name="typeid" type="hidden" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>位置</th>
|
||||
<td>
|
||||
<select id="posname" name="posname" class="easyui-combotree" value="" ></select>
|
||||
<input id="positionid" name="positionid" type="hidden" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用寿命</th>
|
||||
<td><input name="life" class="easyui-textbox" value="" /> h</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>长度</th>
|
||||
<td>
|
||||
<input id="length" name="length" class="easyui-textbox" value="" /> mm
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>宽度</th>
|
||||
<td>
|
||||
<input id="width" name="width" class="easyui-textbox" value="" /> mm
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>厚度</th>
|
||||
<td>
|
||||
<input id="ply" name="ply" class="easyui-textbox" value="" /> mm
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>供应商</th>
|
||||
<td>
|
||||
<input id="producer" name="producer" class="easyui-textbox" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="panelHeight:'auto',editable:false">
|
||||
<option value="1" selected >启用</option>
|
||||
<option value="0">禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" style="width:100%;height:100px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
148
bin/WebRoot/jsp/material/cutterInfoEdit.jsp
Normal file
148
bin/WebRoot/jsp/material/cutterInfoEdit.jsp
Normal file
@ -0,0 +1,148 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cutterinfo/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#tname').combotree({
|
||||
url : ext.contextPath + '/material/cuttertype/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#tname").tree("unselect");
|
||||
}
|
||||
},
|
||||
onClick : function(node) {
|
||||
$("#typeid").val(node.id);
|
||||
},
|
||||
onLoadSuccess: function(node,data){
|
||||
var pid='${cutterInfo.typeid}';
|
||||
var t = $('#tname').combotree('tree');
|
||||
var node = t.tree('find', pid);
|
||||
$('#tname').combotree('setValue',node.text);
|
||||
}
|
||||
});
|
||||
$('#posname').combotree({
|
||||
url : ext.contextPath + '/material/cutterposition/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#posname").tree("unselect");
|
||||
}
|
||||
},
|
||||
onClick : function(node) {
|
||||
$("#positionid").val(node.id);
|
||||
},
|
||||
onLoadSuccess: function(node,data){
|
||||
var pid='${cutterInfo.positionid}';
|
||||
var t = $('#posname').combotree('tree');
|
||||
var node = t.tree('find', pid);
|
||||
$('#posname').combotree('setValue',node.text);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${cutterInfo.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀具编码</th>
|
||||
<td><input id="cuttercode" name="cuttercode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${cutterInfo.cuttercode }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀具名称</th>
|
||||
<td><input name="cuttername" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${cutterInfo.cuttername }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>类型</th>
|
||||
<td>
|
||||
<select id="tname" name="tname" class="easyui-combotree" value="" ></select>
|
||||
<input id="typeid" name="typeid" type="hidden" value="${cutterInfo.typeid }"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>位置</th>
|
||||
<td>
|
||||
<select id="posname" name="posname" class="easyui-combotree" value="" ></select>
|
||||
<input id="positionid" name="positionid" type="hidden" value="${cutterInfo.positionid }"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用寿命</th>
|
||||
<td><input name="life" class="easyui-textbox" value="${cutterInfo.life }" /> h</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>长度</th>
|
||||
<td>
|
||||
<input id="length" name="length" class="easyui-textbox" value="${cutterInfo.length }" /> mm
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>宽度</th>
|
||||
<td>
|
||||
<input id="width" name="width" class="easyui-textbox" value="${cutterInfo.width }" /> mm
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>厚度</th>
|
||||
<td>
|
||||
<input id="ply" name="ply" class="easyui-textbox" value="${cutterInfo.ply }" /> mm
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>供应商</th>
|
||||
<td>
|
||||
<input id="producer" name="producer" class="easyui-textbox" value="${cutterInfo.producer }" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="panelHeight:'auto',editable:false">
|
||||
<option value="1" <c:if test="${cutterInfo.status=='1'}">selected</c:if>>启用</option>
|
||||
<option value="0" <c:if test="${cutterInfo.status=='0'}">selected</c:if>>禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" style="width:100%;height:100px"
|
||||
value="${cutterInfo.remark }" data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
241
bin/WebRoot/jsp/material/cutterInfoList.jsp
Normal file
241
bin/WebRoot/jsp/material/cutterInfoList.jsp
Normal file
@ -0,0 +1,241 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加刀具信息',
|
||||
url : ext.contextPath + '/material/cutterinfo/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看刀具信息',
|
||||
url : ext.contextPath + '/material/cutterinfo/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑刀具信息',
|
||||
url : ext.contextPath + '/material/cutterinfo/edit.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/cutterinfo/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/cutterinfo/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({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/cutterinfo/getCutterInfos.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '120', title : '刀具编码', field : 'cuttercode', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '120', title : '刀具名称', field : 'cuttername', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '类型', field : 'cutterType', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value.typename;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '120', title : '位置', field : 'cutterPosition', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value.name;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '使用寿命', field : 'life', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value+" h";
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '长度', field : 'length', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value+" mm";
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '宽度', field : 'width', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value+" mm";
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '厚度', field : 'ply', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value+" mm";
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '150', title : '供应商', field : 'producer', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '60', title : '状态', field : 'status', sortable : true, align:'center', formatter : function(value, row){
|
||||
if(value=="0"){
|
||||
return "禁用";
|
||||
}else if(value=="1"){
|
||||
return "启用";
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/cutterinfo/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/cutterinfo/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);
|
||||
}
|
||||
});
|
||||
});
|
||||
</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/cutterinfo/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/cutterinfo/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</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_name" class="easyui-textbox" /></td>
|
||||
<td>刀具编码</td>
|
||||
<td><input name="search_code" 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>
|
||||
67
bin/WebRoot/jsp/material/cutterInfoView.jsp
Normal file
67
bin/WebRoot/jsp/material/cutterInfoView.jsp
Normal file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<style>
|
||||
body{ text-align:center}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialInfo.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀具编码</th>
|
||||
<td>${cutterInfo.cuttercode }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀具名称</th>
|
||||
<td>${cutterInfo.cuttername }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>类型</th>
|
||||
<td>${cutterInfo._typename }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>位置</th>
|
||||
<td>${cutterInfo._positionname }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用寿命</th>
|
||||
<td>${cutterInfo.life } h</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>长度</th>
|
||||
<td>${cutterInfo.length } mm</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>宽度</th>
|
||||
<td>${cutterInfo.width } mm</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>厚度</th>
|
||||
<td>${cutterInfo.ply } mm</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>供应商</th>
|
||||
<td>${cutterInfo.producer }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<c:if test="${cutterInfo.status=='1'}">启用</c:if>
|
||||
<c:if test="${cutterInfo.status=='0'}">禁用</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>${cutterInfo.remark }</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
296
bin/WebRoot/jsp/material/cutterPointSetEdit.jsp
Normal file
296
bin/WebRoot/jsp/material/cutterPointSetEdit.jsp
Normal file
@ -0,0 +1,296 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cutterpointset/updateCutter.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectPoint1(cutterswitch,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择设备状态监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+cutterswitch).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#cutterswitch").textbox('textbox').bind("click", function () {
|
||||
selectPoint1("cutterswitch","id");
|
||||
});
|
||||
});
|
||||
function selectPoint2(cutteramount,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+cutteramount).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#cutteramount").textbox('textbox').bind("click", function () {
|
||||
selectPoint2("cutteramount","id");
|
||||
});
|
||||
});
|
||||
function selectPoint3(firstpieceno,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+firstpieceno).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#firstpieceno").textbox('textbox').bind("click", function () {
|
||||
selectPoint3("firstpieceno","id");
|
||||
});
|
||||
});
|
||||
function selectPoint4(firstamount,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+firstamount).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#firstamount").textbox('textbox').bind("click", function () {
|
||||
selectPoint4("firstamount","id");
|
||||
});
|
||||
});
|
||||
function selectPoint5(autofreq,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointAdd',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+autofreq).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#autofreq").textbox('textbox').bind("click", function () {
|
||||
selectPoint5("autofreq","id");
|
||||
});
|
||||
});
|
||||
function selectPoint6(autoamount,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测点位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/mpoint/showlistForSelect.do?iframeId=cutterCNCPointEdit',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+autoamount).textbox("setValue",res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#autoamount").textbox('textbox').bind("click", function () {
|
||||
selectPoint6("autoamount","id");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="id" name="id" type="hidden" value="${cutterPointSet.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀具编号</th>
|
||||
<td>${cutterPointSet.cutterno }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀补开关</th>
|
||||
<td><input id="cutterswitch" name="cutterswitch" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterPointSet.cutterswitch}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>刀补量</th>
|
||||
<td><input id="cutteramount" name="cutteramount" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterPointSet.firstpieceno}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>首补片数</th>
|
||||
<td><input id="firstpieceno" name="firstpieceno" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterPointSet.firstpieceno}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>首补量</th>
|
||||
<td><input id="firstamount" name="firstamount" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterPointSet.firstamount}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>自补频率</th>
|
||||
<td><input id="autofreq" name="autofreq" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterPointSet.autofreq}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>自补量</th>
|
||||
<td>
|
||||
<input id="autoamount" name="autoamount" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterPointSet.autoamount}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
74
bin/WebRoot/jsp/material/cutterPositionAdd.jsp
Normal file
74
bin/WebRoot/jsp/material/cutterPositionAdd.jsp
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cutterposition/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.treegrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$('#pname').combotree({
|
||||
url : ext.contextPath + '/material/cutterposition/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onClick : function(node) {
|
||||
$("#parentid").val(node.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀具位置</th>
|
||||
<td><input name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上级类型</th>
|
||||
<td>
|
||||
<select id="pname" name="pname" class="easyui-combotree" value="" ></select>
|
||||
<input id="parentid" name="parentid" type="hidden" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="panelHeight:'auto',editable:false">
|
||||
<option value="1" selected >启用</option>
|
||||
<option value="0">禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" style="width:100%;height:100px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
82
bin/WebRoot/jsp/material/cutterPositionEdit.jsp
Normal file
82
bin/WebRoot/jsp/material/cutterPositionEdit.jsp
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cutterposition/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.treegrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$('#pname').combotree({
|
||||
url : ext.contextPath + '/material/cutterposition/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onClick : function(node) {
|
||||
$("#parentid").val(node.id);
|
||||
},
|
||||
onLoadSuccess: function(node,data){//编辑界面初始化填充,解析树节点
|
||||
var pid='${cutterPosition.parentid}';
|
||||
var t = $('#pname').combotree('tree');
|
||||
var node = t.tree('find', pid);
|
||||
$('#pname').combotree('setValue',node.text);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${cutterPosition.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀具位置</th>
|
||||
<td><input name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${cutterPosition.name }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上级类型</th>
|
||||
<td>
|
||||
<select id="pname" name="pname" class="easyui-combotree" value="${cutterPosition.parentid}" ></select>
|
||||
<input id="parentid" name="parentid" type="hidden" value="${cutterPosition.parentid}"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="panelHeight:'auto',editable:false">
|
||||
<option value="1" <c:if test="${cutterPosition.status=='1'}">selected</c:if>>启用</option>
|
||||
<option value="0" <c:if test="${cutterPosition.status=='0'}">selected</c:if>>禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" value="${cutterPosition.remark }" data-options="multiline:true" style="width:100%;height:100px"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
241
bin/WebRoot/jsp/material/cutterPositionList.jsp
Normal file
241
bin/WebRoot/jsp/material/cutterPositionList.jsp
Normal file
@ -0,0 +1,241 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加刀具位置',
|
||||
url : ext.contextPath + '/material/cutterposition/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看刀具位置',
|
||||
url : ext.contextPath + '/material/cutterposition/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑刀具位置',
|
||||
url : ext.contextPath + '/material/cutterposition/edit.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/cutterposition/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info');
|
||||
grid.treegrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var datas = "";
|
||||
$("input:checked").each(function(){
|
||||
var id = $(this).attr("id");
|
||||
if(id.indexOf('check_type')== -1 && id.indexOf("check_")>-1){
|
||||
datas += id.replace("check_",'')+',';
|
||||
}
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/cutterposition/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.treegrid('reload');
|
||||
grid.treegrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function check(checkid){
|
||||
var s = '#check_'+checkid;
|
||||
/*选子节点*/
|
||||
var nodes = $("#grid").treegrid("getChildren",checkid);
|
||||
for(i=0;i<nodes.length;i++){
|
||||
$(('#check_'+nodes[i].id))[0].checked = $(s)[0].checked;
|
||||
|
||||
}
|
||||
//选上级节点
|
||||
if(!$(s)[0].checked){
|
||||
var parent = $("#grid").treegrid("getParent",checkid);
|
||||
$(('#check_'+parent.id))[0].checked = false;
|
||||
while(parent){
|
||||
parent = $("#grid").treegrid("getParent",parent.id);
|
||||
$(('#check_'+parent.id))[0].checked = false;
|
||||
}
|
||||
}else{
|
||||
var parent = $("#grid").treegrid("getParent",checkid);
|
||||
var flag= true;
|
||||
var sons = parent.sondata.split(',');
|
||||
for(j=0;j<sons.length;j++){
|
||||
if(!$(('#check_'+sons[j]))[0].checked){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(flag)
|
||||
$(('#check_'+parent.id))[0].checked = true;
|
||||
while(flag){
|
||||
parent = $("#grid").treegrid("getParent",parent.id);
|
||||
if(parent){
|
||||
sons = parent.sondata.split(',');
|
||||
for(j=0;j<sons.length;j++){
|
||||
if(!$(('#check_'+sons[j]))[0].checked){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(flag)
|
||||
$(('#check_'+parent.id))[0].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').treegrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/cutterposition/getCutterPositions.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
treeField: 'name',
|
||||
pagination : true,
|
||||
pageSize : 20,
|
||||
pageList : [20, 50, 100],
|
||||
columns : [ [
|
||||
{ field : 'ck',formatter:function(val,row,index){
|
||||
return '<input type="checkbox" onclick=check("'+row.id+'") id="check_'+row.id+'" (row.checked?"checked":"") />';
|
||||
}
|
||||
},
|
||||
{width : '150', title : '刀具位置', field : 'name', sortable : true, align:'left',halign:'center'},
|
||||
{width : '100', title : '状态', field : 'status', sortable : true, align:'center',halign:'center', formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '禁用';
|
||||
case '1':
|
||||
return '启用';
|
||||
}
|
||||
}},
|
||||
{width : '500', title : '备注', field : 'remark', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/cutterposition/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/cutterposition/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
loadFilter: function (data){
|
||||
resultData = data;
|
||||
$.each(data.rows, function(i) {
|
||||
var parentId = data.rows[i].parentid;
|
||||
if(parentId!='-1'){
|
||||
data.rows[i]._parentId = parentId;
|
||||
}else{
|
||||
data.rows[i]._parentId =undefined;
|
||||
}
|
||||
});
|
||||
return data;
|
||||
},
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(row,data) {
|
||||
$('.iconImg').attr('src', ext.pixel_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/cutterposition/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/cutterposition/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>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>刀具位置</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.treegrid('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.treegrid('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>
|
||||
40
bin/WebRoot/jsp/material/cutterPositionView.jsp
Normal file
40
bin/WebRoot/jsp/material/cutterPositionView.jsp
Normal file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${cutterPosition.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀具类型</th>
|
||||
<td>${cutterPosition.name }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上级类型</th>
|
||||
<td>
|
||||
${parentPosition.name }
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<c:if test="${cutterPosition.status=='1'}">启用</c:if>
|
||||
<c:if test="${cutterPosition.status=='0'}">禁用</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>${cutterPosition.remark }</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
204
bin/WebRoot/jsp/material/cutterSpeedInfo.jsp
Normal file
204
bin/WebRoot/jsp/material/cutterSpeedInfo.jsp
Normal file
@ -0,0 +1,204 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<script src="<%=contextPath%>/JS/Highcharts-3.0.6/js/chart/jquery.min.js" charset="utf-8"></script>
|
||||
<script src="<%=contextPath%>/JS/Highcharts-3.0.6/js/chart/highcharts.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="<%=contextPath%>/JS/Highcharts-3.0.6/js/chart/highcharts-more.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="<%=contextPath%>/JS/Highcharts-3.0.6/js/chart/solid-gauge.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var ext = ext || {};
|
||||
ext.contextPath = '<%=contextPath%>';
|
||||
|
||||
$(function() {
|
||||
$.ajaxSetup({
|
||||
async : false
|
||||
});
|
||||
})
|
||||
//同步
|
||||
var gosmpid ="${gosmpid}";
|
||||
var casmpid ="${gcasmpid}";
|
||||
|
||||
var getSpeedFun = function(mpid) {
|
||||
var datay = $.get(ext.contextPath +"/material/cuttercncinfo/getInfo.do?mpid="+mpid);
|
||||
return parseFloat(datay.responseText);
|
||||
};
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<div style="width: 600px; height: 250px; margin: 0 auto">
|
||||
<div id="container-speed" style="width: 300px; height: 200px; float: left"></div>
|
||||
<div id="container-rpm" style="width: 300px; height: 200px; float: left"></div>
|
||||
</div>
|
||||
<script language="JavaScript">
|
||||
$(document).ready(function() {
|
||||
var chart = {
|
||||
type: 'solidgauge'
|
||||
};
|
||||
var title = null;
|
||||
|
||||
var pane = {
|
||||
center: ['50%', '85%'],
|
||||
size: '140%',
|
||||
startAngle: -90,
|
||||
endAngle: 90,
|
||||
background: {
|
||||
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
|
||||
innerRadius: '60%',
|
||||
outerRadius: '100%',
|
||||
shape: 'arc'
|
||||
}
|
||||
};
|
||||
|
||||
var tooltip = {
|
||||
enabled: false
|
||||
};
|
||||
|
||||
// the value axis
|
||||
var yAxis = {
|
||||
stops: [
|
||||
[0.1, '#55BF3B'], // green
|
||||
[0.5, '#DDDF0D'], // yellow
|
||||
[0.9, '#DF5353'] // red
|
||||
],
|
||||
lineWidth: 0,
|
||||
minorTickInterval: null,
|
||||
tickPixelInterval: 400,
|
||||
tickWidth: 0,
|
||||
title: {
|
||||
y: -70
|
||||
},
|
||||
labels: {
|
||||
y: 16
|
||||
},
|
||||
min: 0,
|
||||
max: 100,
|
||||
title: {
|
||||
text: 'G1进给速度'
|
||||
}
|
||||
};
|
||||
|
||||
var plotOptions = {
|
||||
solidgauge: {
|
||||
dataLabels: {
|
||||
y: 5,
|
||||
borderWidth: 0,
|
||||
useHTML: true
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var credits = {
|
||||
enabled: false
|
||||
};
|
||||
|
||||
var series = [{
|
||||
name: 'G1进给速度',
|
||||
data: [getSpeedFun("${gosmpid}")],
|
||||
dataLabels: {
|
||||
format: '<div style="text-align:center"><span style="font-size:25px;color:' +
|
||||
((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
|
||||
'<span style="font-size:12px;color:silver"> 百分比%</span></div>'
|
||||
},
|
||||
tooltip: {
|
||||
valueSuffix: ' %'
|
||||
}
|
||||
}];
|
||||
|
||||
var json = {};
|
||||
json.chart = chart;
|
||||
json.title = title;
|
||||
json.pane = pane;
|
||||
json.tooltip = tooltip;
|
||||
json.yAxis = yAxis;
|
||||
json.credits = credits;
|
||||
json.series = series;
|
||||
$('#container-speed').highcharts(json);
|
||||
|
||||
|
||||
// the value axis
|
||||
yAxis = {
|
||||
stops: [
|
||||
[0.1, '#55BF3B'], // green
|
||||
[0.5, '#DDDF0D'], // yellow
|
||||
[0.9, '#DF5353'] // red
|
||||
],
|
||||
lineWidth: 0,
|
||||
minorTickInterval: null,
|
||||
tickPixelInterval: 400,
|
||||
tickWidth: 0,
|
||||
title: {
|
||||
y: -70
|
||||
},
|
||||
labels: {
|
||||
y: 16
|
||||
},
|
||||
min: 0,
|
||||
max: 100,
|
||||
title: {
|
||||
text: '主轴转速'
|
||||
}
|
||||
};
|
||||
|
||||
series = [{
|
||||
name: '主轴转速',
|
||||
data: [getSpeedFun("${casmpid}")],
|
||||
dataLabels: {
|
||||
format: '<div style="text-align:center"><span style="font-size:25px;color:' +
|
||||
((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y:.1f}</span><br/>' +
|
||||
'<span style="font-size:12px;color:silver"> 百分比%</span></div>'
|
||||
},
|
||||
tooltip: {
|
||||
valueSuffix: ' %'
|
||||
}
|
||||
}];
|
||||
|
||||
json.yAxis = yAxis;
|
||||
json.series = series;
|
||||
$('#container-rpm').highcharts(json);
|
||||
|
||||
var chartFunction = function() {
|
||||
// Speed
|
||||
var chart = $('#container-speed').highcharts();
|
||||
var point;
|
||||
var newVal;
|
||||
var inc;
|
||||
|
||||
if (chart) {
|
||||
point = chart.series[0].points[0];
|
||||
/*inc = Math.round((Math.random() - 0.5) * 100);
|
||||
newVal = point.y + inc;
|
||||
|
||||
if (newVal < 0 || newVal > 200) {
|
||||
newVal = point.y - inc;
|
||||
}*/
|
||||
point.update(getSpeedFun("${gosmpid}"));
|
||||
}
|
||||
|
||||
// RPM
|
||||
chart = $('#container-rpm').highcharts();
|
||||
if (chart) {
|
||||
point = chart.series[0].points[0];
|
||||
/* inc = Math.random() - 0.5;
|
||||
newVal = point.y + inc;
|
||||
|
||||
if (newVal < 0 || newVal > 5) {
|
||||
newVal = point.y - inc;
|
||||
}*/
|
||||
|
||||
point.update(getSpeedFun("${casmpid}"));
|
||||
}
|
||||
};
|
||||
|
||||
// Bring life to the dials
|
||||
setInterval(chartFunction, 2000);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
69
bin/WebRoot/jsp/material/cutterStandardEdit.jsp
Normal file
69
bin/WebRoot/jsp/material/cutterStandardEdit.jsp
Normal file
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cutterstandard/updateCutter.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="id" name="id" type="hidden" value="${cutterStandard.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀号</th>
|
||||
<td><input id="cutterno" name="cutterno" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="刀具" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>刀补量</th>
|
||||
<td><input id="stcutteramountvalue" name="stcutteramountvalue" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterStandard.stcutteramountvalue}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>首补片数</th>
|
||||
<td><input id="stfirstpiecenovalue" name="stfirstpiecenovalue" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterStandard.stfirstpiecenovalue}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>首补量</th>
|
||||
<td><input id="stfirstamountvalue" name="stfirstamountvalue" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterStandard.stfirstamountvalue}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>自补频率</th>
|
||||
<td><input id="stautofreqvalue" name="stautofreqvalue" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterStandard.stautofreqvalue}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>自补量</th>
|
||||
<td><input id="stautoamountvalue" name="stautoamountvalue" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${cutterStandard.stautoamountvalue}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
106
bin/WebRoot/jsp/material/cutterStandardIssued.jsp
Normal file
106
bin/WebRoot/jsp/material/cutterStandardIssued.jsp
Normal file
@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('#dg').datagrid({
|
||||
view: detailview,
|
||||
detailFormatter:function(index,row){
|
||||
return '<div class="ddv"></div>';
|
||||
},
|
||||
onExpandRow: function(index,row){
|
||||
var ddv = $(this).datagrid('getRowDetail',index).find('div.ddv');
|
||||
ddv.panel({
|
||||
border:false,
|
||||
cache:true,
|
||||
href:'PlantEngine_RLD/material/cutterstandard/getlist.do',
|
||||
onLoad:function(){
|
||||
$('#dg').datagrid('fixDetailRowHeight',index);
|
||||
$('#dg').datagrid('selectRow',index);
|
||||
$('#dg').datagrid('getRowDetail',index).find('form').form('load',row);
|
||||
}
|
||||
});
|
||||
$('#dg').datagrid('fixDetailRowHeight',index);
|
||||
}
|
||||
});
|
||||
});
|
||||
function saveItem(index){
|
||||
var row = $('#dg').datagrid('getRows')[index];
|
||||
var url = row.isNewRecord ? 'C:/Users/yaoyingjie/Downloads/jeasyui-app-crud3/jeasyui-app-crud3/save_user.php' : 'C:/Users/yaoyingjie/Downloads/jeasyui-app-crud3/jeasyui-app-crud3/update_user.php?id='+row.id;
|
||||
$('#dg').datagrid('getRowDetail',index).find('form').form('submit',{
|
||||
url: url,
|
||||
onSubmit: function(){
|
||||
return $(this).form('validate');
|
||||
},
|
||||
success: function(data){
|
||||
data = eval('('+data+')');
|
||||
data.isNewRecord = false;
|
||||
$('#dg').datagrid('collapseRow',index);
|
||||
$('#dg').datagrid('updateRow',{
|
||||
index: index,
|
||||
row: data
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function cancelItem(index){
|
||||
var row = $('#dg').datagrid('getRows')[index];
|
||||
if (row.isNewRecord){
|
||||
$('#dg').datagrid('deleteRow',index);
|
||||
} else {
|
||||
$('#dg').datagrid('collapseRow',index);
|
||||
}
|
||||
}
|
||||
function destroyItem(){
|
||||
var row = $('#dg').datagrid('getSelected');
|
||||
if (row){
|
||||
$.messager.confirm('Confirm','Are you sure you want to remove this user?',function(r){
|
||||
if (r){
|
||||
var index = $('#dg').datagrid('getRowIndex',row);
|
||||
$.post('destroy_user.php',{id:row.id},function(){
|
||||
$('#dg').datagrid('deleteRow',index);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function newItem(){
|
||||
$('#dg').datagrid('appendRow',{isNewRecord:true});
|
||||
var index = $('#dg').datagrid('getRows').length - 1;
|
||||
$('#dg').datagrid('expandRow', index);
|
||||
$('#dg').datagrid('selectRow', index);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Edit form in expanded row details</h2>
|
||||
<div class="demo-info" style="margin-bottom:10px">
|
||||
<div class="demo-tip icon-tip"> </div>
|
||||
<div>Click the expand button to expand a detail form.</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table id="dg" title="My Users" style="width:700px;height:250px"
|
||||
url= '/PlantEngine_RLD/material/cutterstandard/getlist.do',
|
||||
toolbar="#toolbar" pagination="true"
|
||||
fitColumns="true" singleSelect="true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th field="stequgospeedvalue" width="50">stequgospeedvalue</th>
|
||||
<th field="stequcaspeedvalue" width="50">stequcaspeedvalue</th>
|
||||
<th field="stprocesscumnovalue" width="50">stprocesscumnovalue</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div id="toolbar">
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newItem()">New</a>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="destroyItem()">Destroy</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
175
bin/WebRoot/jsp/material/cutterStatusInfo.jsp
Normal file
175
bin/WebRoot/jsp/material/cutterStatusInfo.jsp
Normal file
@ -0,0 +1,175 @@
|
||||
<%@ 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>
|
||||
<style>
|
||||
.textsuccess {
|
||||
position: relative;
|
||||
border: 1px solid #95B8E7;
|
||||
background-color: #28FF28;
|
||||
color:#FFFFFF;
|
||||
text-align:center;
|
||||
width:100% ;
|
||||
height:100%;
|
||||
line-height:90px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.texterror {
|
||||
position: relative;
|
||||
border: 1px solid #95B8E7;
|
||||
background-color: red;
|
||||
color:#FFFFFF;
|
||||
text-align:center;
|
||||
width:100% ;
|
||||
height:100%;
|
||||
line-height:90px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.textuntest {
|
||||
position: relative;
|
||||
border: 1px solid #95B8E7;
|
||||
background-color: #46A3FF;
|
||||
color:#FFFFFF;
|
||||
text-align:center;
|
||||
width:100% ;
|
||||
height:100%;
|
||||
line-height:90px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
if("${equstatusvalue}" == "1")
|
||||
{
|
||||
document.getElementById('status').className = "textsuccess";
|
||||
document.getElementById('status').value = "运行";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('status').className = "texterror";
|
||||
document.getElementById('status').value = "故障";
|
||||
}
|
||||
if("${equrunmodevalue}" == "2")
|
||||
{
|
||||
document.getElementById('mode').className = "textuntest";
|
||||
document.getElementById('mode').value = "自动模式";
|
||||
}
|
||||
else if("${equrunmodevalue}" == "3")
|
||||
{
|
||||
document.getElementById('mode').className = "textuntest";
|
||||
document.getElementById('mode').value = "MDI模式";
|
||||
}
|
||||
else if("${equrunmodevalue}" == "4")
|
||||
{
|
||||
document.getElementById('mode').className = "textuntest";
|
||||
document.getElementById('mode').value = "手动模式";
|
||||
}
|
||||
else if("${equrunmodevalue}" == "5")
|
||||
{
|
||||
document.getElementById('mode').className = "textuntest";
|
||||
document.getElementById('mode').value = "寸动模式";
|
||||
}
|
||||
else if("${equrunmodevalue}" == "6")
|
||||
{
|
||||
document.getElementById('mode').className = "textuntest";
|
||||
document.getElementById('mode').value = "手轮模式";
|
||||
}
|
||||
|
||||
$("#machine").html( "${equcardid}");
|
||||
$("#processcumno").html( "${processcumnovalue}");
|
||||
$("#mechandno").html( "${mechandnovalue}");
|
||||
$("#cutterlossno").html( "${cutterlossnovalue}");
|
||||
$("#cutterlossset").html( "${cutterlosssetvalue}");
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<div id="mainDiv">
|
||||
<table>
|
||||
<tr>
|
||||
<td><span>机台</span></td>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
<td> <span id="machine"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>运行模式</span>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
<td> <input id="mode" style="height:30px" readonly ></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>运行状态</span>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
<td> <input id="status" style="height:30px" readonly></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<div style="background-color:black;width:252px;height:142px">
|
||||
<table>
|
||||
<tr>
|
||||
<td><span style="color:#28FF28;font-size:14px;font-weight:bold">加工累计数</span></td>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
<td> <span id="processcumno" style="color:#FFFF6F;font-size:14px;">1</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span style="color:#28FF28;font-size:14px;font-weight:bold">机械手计数</span>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
<td> <span id="mechandno" style="color:#FFFF6F;font-size:14px;">2</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span style="color:#28FF28;font-size:14px;font-weight:bold">刀损计数</span>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
<td> <span id="cutterlossno" style="color:#FFFF6F;font-size:14px;">3</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span style="color:#28FF28;font-size:14px;font-weight:bold">刀损设定</span>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
<td> <span id="cutterlossset" style="color:#FFFF6F;font-size:14px;">4</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
74
bin/WebRoot/jsp/material/cutterTypeAdd.jsp
Normal file
74
bin/WebRoot/jsp/material/cutterTypeAdd.jsp
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cuttertype/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.treegrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$('#pname').combotree({
|
||||
url : ext.contextPath + '/material/cuttertype/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onClick : function(node) {
|
||||
$("#parentid").val(node.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀具类型</th>
|
||||
<td><input name="typename" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上级类型</th>
|
||||
<td>
|
||||
<select id="pname" name="pname" class="easyui-combotree" value="" ></select>
|
||||
<input id="parentid" name="parentid" type="hidden" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="panelHeight:'auto',editable:false">
|
||||
<option value="1" selected >启用</option>
|
||||
<option value="0">禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" style="width:100%;height:100px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
82
bin/WebRoot/jsp/material/cutterTypeEdit.jsp
Normal file
82
bin/WebRoot/jsp/material/cutterTypeEdit.jsp
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/cuttertype/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.treegrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$('#pname').combotree({
|
||||
url : ext.contextPath + '/material/cuttertype/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onClick : function(node) {
|
||||
$("#parentid").val(node.id);
|
||||
},
|
||||
onLoadSuccess: function(node,data){//编辑界面初始化填充,解析树节点
|
||||
var pid='${cutterType.parentid}';
|
||||
var t = $('#pname').combotree('tree');
|
||||
var node = t.tree('find', pid);
|
||||
$('#pname').combotree('setValue',node.text);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${cutterType.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀具类型</th>
|
||||
<td><input name="typename" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${cutterType.typename }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上级类型</th>
|
||||
<td>
|
||||
<select id="pname" name="pname" class="easyui-combotree" value="${cutterType.parentid}" ></select>
|
||||
<input id="parentid" name="parentid" type="hidden" value="${cutterType.parentid}"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="panelHeight:'auto',editable:false">
|
||||
<option value="1" <c:if test="${cutterType.status=='1'}">selected</c:if>>启用</option>
|
||||
<option value="0" <c:if test="${cutterType.status=='0'}">selected</c:if>>禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" value="${cutterType.remark }" data-options="multiline:true" style="width:100%;height:100px"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
241
bin/WebRoot/jsp/material/cutterTypeList.jsp
Normal file
241
bin/WebRoot/jsp/material/cutterTypeList.jsp
Normal file
@ -0,0 +1,241 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加刀具类型',
|
||||
url : ext.contextPath + '/material/cuttertype/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看刀具类型',
|
||||
url : ext.contextPath + '/material/cuttertype/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑刀具类型',
|
||||
url : ext.contextPath + '/material/cuttertype/edit.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/cuttertype/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info');
|
||||
grid.treegrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var datas = "";
|
||||
$("input:checked").each(function(){
|
||||
var id = $(this).attr("id");
|
||||
if(id.indexOf('check_type')== -1 && id.indexOf("check_")>-1){
|
||||
datas += id.replace("check_",'')+',';
|
||||
}
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/cuttertype/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.treegrid('reload');
|
||||
grid.treegrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function check(checkid){
|
||||
var s = '#check_'+checkid;
|
||||
/*选子节点*/
|
||||
var nodes = $("#grid").treegrid("getChildren",checkid);
|
||||
for(i=0;i<nodes.length;i++){
|
||||
$(('#check_'+nodes[i].id))[0].checked = $(s)[0].checked;
|
||||
|
||||
}
|
||||
//选上级节点
|
||||
if(!$(s)[0].checked){
|
||||
var parent = $("#grid").treegrid("getParent",checkid);
|
||||
$(('#check_'+parent.id))[0].checked = false;
|
||||
while(parent){
|
||||
parent = $("#grid").treegrid("getParent",parent.id);
|
||||
$(('#check_'+parent.id))[0].checked = false;
|
||||
}
|
||||
}else{
|
||||
var parent = $("#grid").treegrid("getParent",checkid);
|
||||
var flag= true;
|
||||
var sons = parent.sondata.split(',');
|
||||
for(j=0;j<sons.length;j++){
|
||||
if(!$(('#check_'+sons[j]))[0].checked){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(flag)
|
||||
$(('#check_'+parent.id))[0].checked = true;
|
||||
while(flag){
|
||||
parent = $("#grid").treegrid("getParent",parent.id);
|
||||
if(parent){
|
||||
sons = parent.sondata.split(',');
|
||||
for(j=0;j<sons.length;j++){
|
||||
if(!$(('#check_'+sons[j]))[0].checked){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(flag)
|
||||
$(('#check_'+parent.id))[0].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').treegrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/cuttertype/getCutterTypes.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
treeField: 'typename',
|
||||
pagination : true,
|
||||
pageSize : 20,
|
||||
pageList : [20, 50, 100],
|
||||
columns : [ [
|
||||
{ field : 'ck',formatter:function(val,row,index){
|
||||
return '<input type="checkbox" onclick=check("'+row.id+'") id="check_'+row.id+'" (row.checked?"checked":"") />';
|
||||
}
|
||||
},
|
||||
{width : '150', title : '刀具类型', field : 'typename', sortable : true, align:'left',halign:'center'},
|
||||
{width : '100', title : '状态', field : 'status', sortable : true, align:'center',halign:'center', formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '禁用';
|
||||
case '1':
|
||||
return '启用';
|
||||
}
|
||||
}},
|
||||
{width : '500', title : '备注', field : 'remark', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/cuttertype/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/cuttertype/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
loadFilter: function (data){
|
||||
resultData = data;
|
||||
$.each(data.rows, function(i) {
|
||||
var parentId = data.rows[i].parentid;
|
||||
if(parentId!='-1'){
|
||||
data.rows[i]._parentId = parentId;
|
||||
}else{
|
||||
data.rows[i]._parentId =undefined;
|
||||
}
|
||||
});
|
||||
return data;
|
||||
},
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(row,data) {
|
||||
$('.iconImg').attr('src', ext.pixel_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/cuttertype/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/cuttertype/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>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>刀具类型</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.treegrid('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.treegrid('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>
|
||||
40
bin/WebRoot/jsp/material/cutterTypeView.jsp
Normal file
40
bin/WebRoot/jsp/material/cutterTypeView.jsp
Normal file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${cutterType.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>刀具类型</th>
|
||||
<td>${cutterType.typename }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上级类型</th>
|
||||
<td>
|
||||
${parentType.typename }
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<c:if test="${cutterType.status=='1'}">启用</c:if>
|
||||
<c:if test="${cutterType.status=='0'}">禁用</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>${cutterType.remark }</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
265
bin/WebRoot/jsp/material/cutterpointsetList.jsp
Normal file
265
bin/WebRoot/jsp/material/cutterpointsetList.jsp
Normal file
@ -0,0 +1,265 @@
|
||||
<%@ 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>
|
||||
79
bin/WebRoot/jsp/material/importBoardbatch.jsp
Normal file
79
bin/WebRoot/jsp/material/importBoardbatch.jsp
Normal file
@ -0,0 +1,79 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>导入人员</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script>
|
||||
var uploader,state;
|
||||
$(function() {
|
||||
var $ = jQuery,
|
||||
$list = $('#thelist'),
|
||||
state = 'pending';
|
||||
|
||||
uploader = WebUploader.create({
|
||||
// swf文件路径
|
||||
swf: ext.contextPath+'/JS/webuploader-0.1.5/Uploader.swf',
|
||||
// 文件接收服务端。
|
||||
server: ext.contextPath+'/material/boardbatch/importBoardbatch.do',
|
||||
// 选择文件的按钮。可选。
|
||||
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
|
||||
pick: {
|
||||
id: '#picker',
|
||||
multiple: false
|
||||
},
|
||||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
|
||||
resize: false,
|
||||
accept: {
|
||||
title: 'Excel',
|
||||
extensions: 'xls,xlsx',
|
||||
mimeTypes: 'excel/*'
|
||||
}
|
||||
});
|
||||
//当有文件被添加进队列的时候
|
||||
uploader.on( 'fileQueued', function( file ) {
|
||||
$list.append( '<div id="' + file.id + '" class="item">' +
|
||||
'<h4 class="info">' + file.name + '</h4>' +
|
||||
'<p class="state">等待上传...</p>' +
|
||||
'</div>' );
|
||||
});
|
||||
});
|
||||
|
||||
var doimport = function(dialog, grid){
|
||||
//执行上传功能
|
||||
if ( state === 'uploading' ) {
|
||||
alert("文件正在上传中,请稍等");
|
||||
} else {
|
||||
uploader.upload();
|
||||
}
|
||||
|
||||
uploader.on( 'uploadError', function( file ) {
|
||||
$( '#'+file.id ).find('p.state').text('上传出错');
|
||||
});
|
||||
|
||||
uploader.on( 'uploadSuccess', function( file,response ) {
|
||||
$( '#'+file.id ).find('p.state').text('已上传');
|
||||
if(response.feedback!=null&&response.feedback!=""){
|
||||
|
||||
alert(response.feedback);
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
alert("导入未完成!");
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="uploader" class="wu-example">
|
||||
<div class="btns">
|
||||
<div id="picker">选择文件</div>
|
||||
</div>
|
||||
<!--用来存放文件信息-->
|
||||
<div id="thelist" class="uploader-list"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
79
bin/WebRoot/jsp/material/importInkbatch.jsp
Normal file
79
bin/WebRoot/jsp/material/importInkbatch.jsp
Normal file
@ -0,0 +1,79 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>导入人员</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script>
|
||||
var uploader,state;
|
||||
$(function() {
|
||||
var $ = jQuery,
|
||||
$list = $('#thelist'),
|
||||
state = 'pending';
|
||||
|
||||
uploader = WebUploader.create({
|
||||
// swf文件路径
|
||||
swf: ext.contextPath+'/JS/webuploader-0.1.5/Uploader.swf',
|
||||
// 文件接收服务端。
|
||||
server: ext.contextPath+'/material/inkbatch/importInkbatch.do',
|
||||
// 选择文件的按钮。可选。
|
||||
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
|
||||
pick: {
|
||||
id: '#picker',
|
||||
multiple: false
|
||||
},
|
||||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
|
||||
resize: false,
|
||||
accept: {
|
||||
title: 'Excel',
|
||||
extensions: 'xls,xlsx',
|
||||
mimeTypes: 'excel/*'
|
||||
}
|
||||
});
|
||||
//当有文件被添加进队列的时候
|
||||
uploader.on( 'fileQueued', function( file ) {
|
||||
$list.append( '<div id="' + file.id + '" class="item">' +
|
||||
'<h4 class="info">' + file.name + '</h4>' +
|
||||
'<p class="state">等待上传...</p>' +
|
||||
'</div>' );
|
||||
});
|
||||
});
|
||||
|
||||
var doimport = function(dialog, grid){
|
||||
//执行上传功能
|
||||
if ( state === 'uploading' ) {
|
||||
alert("文件正在上传中,请稍等");
|
||||
} else {
|
||||
uploader.upload();
|
||||
}
|
||||
|
||||
uploader.on( 'uploadError', function( file ) {
|
||||
$( '#'+file.id ).find('p.state').text('上传出错');
|
||||
});
|
||||
|
||||
uploader.on( 'uploadSuccess', function( file,response ) {
|
||||
$( '#'+file.id ).find('p.state').text('已上传');
|
||||
if(response.feedback!=null&&response.feedback!=""){
|
||||
|
||||
alert(response.feedback);
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
alert("导入未完成!");
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="uploader" class="wu-example">
|
||||
<div class="btns">
|
||||
<div id="picker">选择文件</div>
|
||||
</div>
|
||||
<!--用来存放文件信息-->
|
||||
<div id="thelist" class="uploader-list"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
78
bin/WebRoot/jsp/material/importMaterialBOM.jsp
Normal file
78
bin/WebRoot/jsp/material/importMaterialBOM.jsp
Normal file
@ -0,0 +1,78 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>导入人员</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script>
|
||||
var uploader,state;
|
||||
$(function() {
|
||||
var $ = jQuery,
|
||||
$list = $('#thelist'),
|
||||
state = 'pending';
|
||||
|
||||
uploader = WebUploader.create({
|
||||
// swf文件路径
|
||||
swf: ext.contextPath+'/JS/webuploader-0.1.5/Uploader.swf',
|
||||
// 文件接收服务端。
|
||||
server: ext.contextPath+'/material/materialbom/importMaterialBOM.do',
|
||||
// 选择文件的按钮。可选。
|
||||
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
|
||||
pick: {
|
||||
id: '#picker',
|
||||
multiple: false
|
||||
},
|
||||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
|
||||
resize: false,
|
||||
accept: {
|
||||
title: 'Excel',
|
||||
extensions: 'xls,xlsx',
|
||||
mimeTypes: 'excel/*'
|
||||
}
|
||||
});
|
||||
//当有文件被添加进队列的时候
|
||||
uploader.on( 'fileQueued', function( file ) {
|
||||
$list.append( '<div id="' + file.id + '" class="item">' +
|
||||
'<h4 class="info">' + file.name + '</h4>' +
|
||||
'<p class="state">等待上传...</p>' +
|
||||
'</div>' );
|
||||
});
|
||||
});
|
||||
|
||||
var doimport = function(dialog, grid){
|
||||
//执行上传功能
|
||||
if ( state === 'uploading' ) {
|
||||
alert("文件正在上传中,请稍等");
|
||||
} else {
|
||||
uploader.upload();
|
||||
}
|
||||
|
||||
uploader.on( 'uploadError', function( file ) {
|
||||
$( '#'+file.id ).find('p.state').text('上传出错');
|
||||
});
|
||||
|
||||
uploader.on( 'uploadSuccess', function( file,response ) {
|
||||
$( '#'+file.id ).find('p.state').text('已上传');
|
||||
if(response.feedback!=null&&response.feedback!=""){
|
||||
alert(response.feedback);
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
alert("导入未完成!");
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="uploader" class="wu-example">
|
||||
<div class="btns">
|
||||
<div id="picker">选择文件</div>
|
||||
</div>
|
||||
<!--用来存放文件信息-->
|
||||
<div id="thelist" class="uploader-list"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
78
bin/WebRoot/jsp/material/importMaterialInfo.jsp
Normal file
78
bin/WebRoot/jsp/material/importMaterialInfo.jsp
Normal file
@ -0,0 +1,78 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>导入人员</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script>
|
||||
var uploader,state;
|
||||
$(function() {
|
||||
var $ = jQuery,
|
||||
$list = $('#thelist'),
|
||||
state = 'pending';
|
||||
|
||||
uploader = WebUploader.create({
|
||||
// swf文件路径
|
||||
swf: ext.contextPath+'/JS/webuploader-0.1.5/Uploader.swf',
|
||||
// 文件接收服务端。
|
||||
server: ext.contextPath+'/material/materialinfo/importMaterialInfo.do',
|
||||
// 选择文件的按钮。可选。
|
||||
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
|
||||
pick: {
|
||||
id: '#picker',
|
||||
multiple: false
|
||||
},
|
||||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
|
||||
resize: false,
|
||||
accept: {
|
||||
title: 'Excel',
|
||||
extensions: 'xls,xlsx',
|
||||
mimeTypes: 'excel/*'
|
||||
}
|
||||
});
|
||||
//当有文件被添加进队列的时候
|
||||
uploader.on( 'fileQueued', function( file ) {
|
||||
$list.append( '<div id="' + file.id + '" class="item">' +
|
||||
'<h4 class="info">' + file.name + '</h4>' +
|
||||
'<p class="state">等待上传...</p>' +
|
||||
'</div>' );
|
||||
});
|
||||
});
|
||||
|
||||
var doimport = function(dialog, grid){
|
||||
//执行上传功能
|
||||
if ( state === 'uploading' ) {
|
||||
alert("文件正在上传中,请稍等");
|
||||
} else {
|
||||
uploader.upload();
|
||||
}
|
||||
|
||||
uploader.on( 'uploadError', function( file ) {
|
||||
$( '#'+file.id ).find('p.state').text('上传出错');
|
||||
});
|
||||
|
||||
uploader.on( 'uploadSuccess', function( file,response ) {
|
||||
$( '#'+file.id ).find('p.state').text('已上传');
|
||||
if(response.feedback!=null&&response.feedback!=""){
|
||||
alert(response.feedback);
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
alert("导入未完成!");
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="uploader" class="wu-example">
|
||||
<div class="btns">
|
||||
<div id="picker">选择文件</div>
|
||||
</div>
|
||||
<!--用来存放文件信息-->
|
||||
<div id="thelist" class="uploader-list"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
108
bin/WebRoot/jsp/material/inkChange.jsp
Normal file
108
bin/WebRoot/jsp/material/inkChange.jsp
Normal file
@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/inkalert/saveink.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectInkbatchList(inkbatchno,No){
|
||||
//console.log("en",$("#equipmentcardid").val());
|
||||
localStorage.setItem("equid",$("#equipmentcardid").val());
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择可使用油墨批次',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/material/inkalert/showInkbatchList.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
$("#"+inkbatchno).val(res.id);
|
||||
$("#"+No).textbox('setValue',res.no);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#No").textbox('textbox').bind("click", function () {
|
||||
selectInkbatchList("inkbatchno","No");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="inkbatchno" name="inkbatchno" type="hidden"/>
|
||||
<input id="lastinkbatchno" name="lastinkbatchno" value="${inkalert.lastinkbatchno}" type="hidden"/>
|
||||
<input id="equipmentcardid" name="equipmentcardid" value="${inkalert.equipmentcardid}" type="hidden"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>设备</th>
|
||||
<td><input id="equipmentname" name="equipmentname" class="easyui-textbox"
|
||||
disabled="disabled" value="${inkalert.equipmentname}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上次更换时间</th>
|
||||
<td><input name="starttime" class="easyui-textbox"
|
||||
disabled="disabled" value="${fn:substring(inkalert.starttime,0,19)}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>更换者</th>
|
||||
<td>
|
||||
<input name="operator" class="easyui-textbox"
|
||||
disabled="disabled" value="admin" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>当前油墨批次号</th>
|
||||
<td><input name="no" class="easyui-textbox"
|
||||
disabled="disabled" value="${inkalert.no}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>可使用油墨批次号</th>
|
||||
<td>
|
||||
<input id="No" name="No" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
111
bin/WebRoot/jsp/material/inkInfoAdd.jsp
Normal file
111
bin/WebRoot/jsp/material/inkInfoAdd.jsp
Normal file
@ -0,0 +1,111 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/inkinfo/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectEquipmentCard(equipmentcardid,equipmentcode){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择设备',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/equipment/showEquipmentCardForSelect.do?iframeId=inkInfoAdd',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
|
||||
if(res!=null){
|
||||
$("#"+equipmentcardid).val(res.id);
|
||||
$("#"+equipmentcode).textbox('setValue',res.equipmentcardid);
|
||||
$("#equipmentname").html(res.equipmentname);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#equipmentcode").textbox('textbox').bind("click", function () {
|
||||
selectEquipmentCard("equipmentcardid","equipmentcode");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="equipmentcardid" name="equipmentcardid" type="hidden"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>设备编号</th>
|
||||
<td><input id="equipmentcode" name="equipmentcode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<td><span id="equipmentname"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>油墨更换提醒间隔时间</th>
|
||||
<td>
|
||||
<input id="parameter1" name="parameter1" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /> 分钟
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>稀释剂添加提醒间隔时间</th>
|
||||
<td><input id="parameter2" name="parameter2" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value=""/> 分钟
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>网板更换提醒间隔时间</th>
|
||||
<td>
|
||||
<input id="parameter3" name="parameter3" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value=""/> 分钟
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
113
bin/WebRoot/jsp/material/inkInfoEdit.jsp
Normal file
113
bin/WebRoot/jsp/material/inkInfoEdit.jsp
Normal file
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/inkinfo/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectEquipmentCard(equipmentcardid,equipmentcode){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择设备',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/equipment/showEquipmentCardForSelect.do?iframeId=inkInfoEdit',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
$("#"+equipmentcardid).val(res.id);
|
||||
$("#"+equipmentcode).textbox('setValue',res.equipmentcardid);
|
||||
$("#equipmentname").html(res.equipmentname);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#equipmentcode").textbox('textbox').bind("click", function () {
|
||||
selectEquipmentCard("equipmentcardid","equipmentcode");
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${inkInfo.id }"/>
|
||||
<input id="equipmentcardid" name="equipmentcardid" type="hidden" value="${inkInfo.equipmentcardid }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>设备编号</th>
|
||||
<td><input id="equipmentcode" name="equipmentcode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'," value="${inkInfo.equipmentcode}" readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<td>${inkInfo.equipmentname}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>参数上次修改时间</th>
|
||||
<td><input name="time" class="easyui-textbox"
|
||||
disabled="disabled" value="${fn:substring(inkInfo.time,0,19) }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>修改者</th>
|
||||
<td>
|
||||
<input name="operator" class="easyui-textbox"
|
||||
disabled="disabled" value="admin" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>油墨更换提醒间隔时间</th>
|
||||
<td><input name="parameter1" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${inkInfo.parameter1 }" /> 分钟</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>稀释剂添加提醒间隔时间</th>
|
||||
<td><input name="parameter2" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${inkInfo.parameter2 }" /> 分钟</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>网板更换提醒间隔时间</th>
|
||||
<td><input name="parameter3" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${inkInfo.parameter3 }" /> 分钟</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
185
bin/WebRoot/jsp/material/inkInfoList.jsp
Normal file
185
bin/WebRoot/jsp/material/inkInfoList.jsp
Normal file
@ -0,0 +1,185 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加油墨网板参数信息',
|
||||
url : ext.contextPath + '/material/inkinfo/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看油墨网板参数信息',
|
||||
url : ext.contextPath + '/material/inkinfo/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑油墨网板参数信息',
|
||||
url : ext.contextPath + '/material/inkinfo/edit.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/inkinfo/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/inkinfo/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({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/inkinfo/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '110', title : '设备编号', field : 'equipmentcode', sortable : true, halign:'center'},
|
||||
{width : '110', title : '设备名称', field : 'equipmentname', sortable : true, halign:'center'},
|
||||
{width : '150', title : '参数上次修改时间', field : 'time', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{width : '100', title : '修改者', field : 'operator', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
value ='admin';
|
||||
return value;
|
||||
} },
|
||||
{width : '170', title : '油墨更换提醒间隔时间(分钟)', field : 'parameter1', sortable : true, halign:'center'},
|
||||
{width : '177', title : '稀释剂添加提醒间隔时间(分钟)', field : 'parameter2', sortable : true, halign:'center'},
|
||||
{width : '170', title : '网板更换提醒间隔时间(分钟)', field : 'parameter3', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '110', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/inkinfo/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/inkinfo/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);
|
||||
}
|
||||
});
|
||||
});
|
||||
</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/inkinfo/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/inkinfo/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</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>
|
||||
52
bin/WebRoot/jsp/material/inkInfoView.jsp
Normal file
52
bin/WebRoot/jsp/material/inkInfoView.jsp
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
|
||||
|
||||
<style>
|
||||
body{ text-align:center}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${inkInfo.id}"/>
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<th>设备编号</th>
|
||||
<td>${inkInfo.equipmentcode}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<td>${inkInfo.equipmentname}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>参数上次修改时间</th>
|
||||
<td>${fn:substring(inkInfo.time ,0,19)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>修改者</th>
|
||||
<td><c:if test="${inkInfo.operator=='emp01'}">admin</c:if></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>油墨更换提醒间隔时间</th>
|
||||
<td>${inkInfo.parameter1} 分钟</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>稀释剂添加提醒间隔时间</th>
|
||||
<td>${inkInfo.parameter2 } 分钟</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>网板更换提醒间隔时间</th>
|
||||
<td>${inkInfo.parameter3 } 分钟</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
144
bin/WebRoot/jsp/material/inkalertList.jsp
Normal file
144
bin/WebRoot/jsp/material/inkalertList.jsp
Normal file
@ -0,0 +1,144 @@
|
||||
<%@ 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 deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/inkalert/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/inkalert/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({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/inkalert/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '145', title : '设备', field : 'equipmentcardid', sortable : true, halign:'center'},
|
||||
{width : '100', title : '设备', field : 'equipmentname', sortable : true, halign:'center'},
|
||||
{width : '120', title : '更换油墨批次', field : 'inkbatchno', sortable : true, halign:'center'},
|
||||
{width : '120', title : '更换网板批次', field : 'boardbatchno', sortable : true, halign:'center'},
|
||||
{width : '150', title : '更换时间', field : 'handletime', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{width : '150', title : '更换者', field : 'handleuser', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
value ='admin';
|
||||
return value;
|
||||
} },
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
|
||||
<%if (sessionManager.havePermission(session,"material/inkalert/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);
|
||||
}
|
||||
});
|
||||
});
|
||||
</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/inkalert/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</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_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>
|
||||
105
bin/WebRoot/jsp/material/inkandboardChange.jsp
Normal file
105
bin/WebRoot/jsp/material/inkandboardChange.jsp
Normal file
@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/inkalert/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectInkbatchList(inkbatchno,No){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择可使用油墨批次',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/material/inkalert/showInkbatchList.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
$("#"+inkbatchno).val(res.id);
|
||||
$("#"+No).textbox('setValue',res.no);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#No").textbox('textbox').bind("click", function () {
|
||||
selectInkbatchList("inkbatchno","No");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="inkbatchno" name="inkbatchno" type="hidden"/>
|
||||
<input id="equipmentcardid" name="equipmentcardid" value="${inkalert.equipmentcardid}" type="hidden"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>设备</th>
|
||||
<td><input name="equipmentname" class="easyui-textbox"
|
||||
disabled="disabled" value="${inkalert.equipmentname}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上次更换时间</th>
|
||||
<td><input name="starttime" class="easyui-textbox"
|
||||
disabled="disabled" value="${fn:substring(inkalert.starttime,0,19)}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>更换者</th>
|
||||
<td>
|
||||
<input name="operator" class="easyui-textbox"
|
||||
disabled="disabled" value="admin" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>当前油墨批次号</th>
|
||||
<td><input name="no" class="easyui-textbox"
|
||||
disabled="disabled" value="${inkalert.no}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>可使用油墨批次号</th>
|
||||
<td>
|
||||
<input id="No" name="No" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
299
bin/WebRoot/jsp/material/inkbatchAdd.jsp
Normal file
299
bin/WebRoot/jsp/material/inkbatchAdd.jsp
Normal file
@ -0,0 +1,299 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/inkbatch/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$.post(ext.contextPath + "/material/inkbatch/saveMachine.do",{no:data.id,mids:getMids(),status:$('#status').textbox('getValue')},function(data1){
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
});
|
||||
/* top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}); */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function getMids(){
|
||||
var mrows= $('#grid').datagrid("getRows");
|
||||
var mids="";
|
||||
$.each(mrows, function(index, item){
|
||||
mids+=item.id+",";
|
||||
});
|
||||
mids=mids.replace(/,$/gi,"");
|
||||
return mids;
|
||||
}
|
||||
|
||||
//获取当前时间
|
||||
function getNowFormatDate() {
|
||||
var date = new Date();
|
||||
var seperator1 = "-";
|
||||
var seperator2 = ":";
|
||||
var month = date.getMonth() + 1;
|
||||
var strDate = date.getDate();
|
||||
if (month >= 1 && month <= 9) {
|
||||
month = "0" + month;
|
||||
}
|
||||
if (strDate >= 0 && strDate <= 9) {
|
||||
strDate = "0" + strDate;
|
||||
}
|
||||
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
|
||||
+ " " + date.getHours() + seperator2 + date.getMinutes()
|
||||
/*+ seperator2 + date.getSeconds();*/
|
||||
return currentdate;
|
||||
}
|
||||
function doadd_M(){
|
||||
$("#mids").val(getMids());
|
||||
|
||||
localStorage.setItem("mids",$("#mids").val());
|
||||
//清除旧数据
|
||||
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加参数设置中的设备',
|
||||
height:500,
|
||||
url : ext.contextPath + '/material/inkinfo/showEquipmentcardForSelects.do?iframeId=inkbatchAdd',
|
||||
buttons : [ {
|
||||
iconCls:'icon-ok',
|
||||
text : '确认',
|
||||
handler : function() {
|
||||
var data = dialog.find('iframe').get(0).contentWindow.selectFun(dialog, grid);
|
||||
var datas= $.parseJSON(data);
|
||||
console.log('enter',datas);
|
||||
if(datas.length>0){
|
||||
for(var i=0;i<datas.length;i++){
|
||||
grid.datagrid('appendRow',{
|
||||
id:datas[i].id,
|
||||
equipmentcardid:datas[i].equipmentcardid,
|
||||
equipmentname:datas[i].equipmentname,
|
||||
equipmentmodel:datas[i].equipmentmodel,
|
||||
equipmentclass:datas[i].equipmentclass,
|
||||
geographyarea:datas[i].geographyarea
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
}
|
||||
function dodelete_M(){
|
||||
var rows = $('#grid').datagrid('getChecked');
|
||||
if(rows.length==0){
|
||||
top.$.messager.alert("提示","请选择需要删除的数据","info");
|
||||
}else{
|
||||
top.$.messager.confirm("提示", "确定删除这些数据?", function(r) {
|
||||
if (r) {
|
||||
//复制rows,否则deleteRow的index会出错
|
||||
var copyRows = [];
|
||||
for ( var j= 0; j < rows.length; j++) {
|
||||
copyRows.push(rows[j]);
|
||||
}
|
||||
|
||||
$.each(copyRows, function(index, item){
|
||||
$('#grid').datagrid('deleteRow',$('#grid').datagrid('getRowIndex',copyRows[index]));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function selectProcess(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择工艺路线',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/activiti/workflow/getProcessForSelect.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
$("#processrealid").textbox('setValue',res.id);
|
||||
$("#processrealid").textbox('setText',res.name);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
document.getElementById('starttime').value=getNowFormatDate();//设置默认时间
|
||||
$("#processrealid").textbox('textbox').bind("click", function () {
|
||||
selectProcess();
|
||||
});
|
||||
});
|
||||
$(function() {
|
||||
$('#unit').combobox({
|
||||
url:ext.contextPath + '/material/materialunit/getJsonUnit.do',
|
||||
valueField:'unit',
|
||||
textField:'unit',
|
||||
editable:false,
|
||||
panelHeight:'auto'
|
||||
});
|
||||
$('#m').panel({
|
||||
width:"100%",
|
||||
height:"300",
|
||||
title: '使用设备',
|
||||
tools: [{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){doadd_M();}
|
||||
},{
|
||||
iconCls:'icon-remove',
|
||||
handler:function(){dodelete_M();}
|
||||
}]
|
||||
|
||||
});
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
idField : 'id',
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '145', title : '设备编号', field : 'equipmentcardid', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '设备名称', field : 'equipmentname', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '设备型号', field : 'equipmentmodel', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '设备类型', field : 'equipmentclass', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '存放位置', field : 'geographyarea', sortable : true, editor:'textbox',halign:'center'}
|
||||
] ]
|
||||
});
|
||||
$('#tname').combotree({
|
||||
url : ext.contextPath + '/material/materialtype/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#tname").tree("unselect");
|
||||
}
|
||||
},
|
||||
onClick : function(node) {
|
||||
$("#typeid").val(node.id);
|
||||
var materialcode=$("#materialcode").textbox('getValue');
|
||||
var oldmaterialcode=$("#mtypetemp").val();//删除旧的物料编码前缀
|
||||
if(oldmaterialcode!=null && oldmaterialcode!=""){
|
||||
materialcode=materialcode.substring(oldmaterialcode.length,materialcode.length);
|
||||
}
|
||||
materialcode=node.attributes.typecode+materialcode;
|
||||
$("#mtypetemp").val(node.attributes.typecode);
|
||||
$("#materialcode").textbox('setValue',materialcode);
|
||||
}
|
||||
});
|
||||
|
||||
$("#figurenumber").textbox("textbox").bind("click",function(){
|
||||
selectDrawing();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input id="mids" name="mids" type="hidden" value="" />
|
||||
<form method="post" class="form">
|
||||
<input id="mtypetemp" type="hidden" value=""/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>油墨批次号</th>
|
||||
<td><input name="No" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>油墨类别</th>
|
||||
<td>
|
||||
<input name="type" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>油墨名称</th>
|
||||
<td>
|
||||
<input name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value=""/>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料状态</th>
|
||||
<td><select id="status" name="status" class="easyui-combobox"
|
||||
data-options="panelHeight:'auto'">
|
||||
<option value="0">未使用</option>
|
||||
<option value="1">使用中</option>
|
||||
<option value="2">使用完毕</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<th>使用开始时间</th>
|
||||
<td><input id="starttime" name="starttime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr> -->
|
||||
<!-- <tr>
|
||||
<th>使用开始时间</th>
|
||||
<td><input id="endtime" name="endtime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<th>产品工艺路线</th>
|
||||
<td><input id="processrealid" name="processrealid" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>开始时间</th>
|
||||
<td><input id="starttime" name="starttime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<th>结束时间</th>
|
||||
<td>
|
||||
<input id="endtime"name="endtime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr> -->
|
||||
|
||||
</table>
|
||||
</form>
|
||||
<div id="m">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
313
bin/WebRoot/jsp/material/inkbatchEdit.jsp
Normal file
313
bin/WebRoot/jsp/material/inkbatchEdit.jsp
Normal file
@ -0,0 +1,313 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%request.setAttribute("Flag_UNUSE",com.sipai.entity.material.Inkbatch.Flag_UNUSE);%>
|
||||
<%request.setAttribute("Flag_INUSE",com.sipai.entity.material.Inkbatch.Flag_INUSE);%>
|
||||
<%request.setAttribute("Flag_USED",com.sipai.entity.material.Inkbatch.Flag_USED);%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var editIndex = undefined;//定义编辑列的索引
|
||||
function endEditing(){//清除editor
|
||||
if (editIndex == undefined){return true;}
|
||||
if ($('#grid').datagrid('validateRow', editIndex)){
|
||||
$('#grid').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function getGriddata(){
|
||||
var gridrows= $('#grid').datagrid("getRows");
|
||||
var griddata= '[';
|
||||
$.each(gridrows, function(index, item){
|
||||
if(index == 0){
|
||||
griddata+='{"equipmentcardid":"'+item.id+'","status":"'+item.ibmstatus+'"}';
|
||||
}
|
||||
else{
|
||||
griddata+=',{"equipmentcardid":"'+item.id+'","status":"'+item.ibmstatus+'"}';
|
||||
}
|
||||
});
|
||||
griddata+= ']';
|
||||
return griddata;
|
||||
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#m').panel({
|
||||
width:"100%",
|
||||
height:"300",
|
||||
title: '使用设备',
|
||||
tools: [{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){doadd_M();}
|
||||
},{
|
||||
iconCls:'icon-remove',
|
||||
handler:function(){dodelete_M();}
|
||||
}]
|
||||
});
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
idField : 'id',
|
||||
onClickCell:function(index){
|
||||
endEditing();
|
||||
},
|
||||
onDblClickCell : function(index,field){
|
||||
/*if (endEditing()) {
|
||||
$('#grid').datagrid('selectRow', index).datagrid('editCell', {index:index,field:field});
|
||||
editIndex = index;
|
||||
}*/
|
||||
if(!endEditing()){
|
||||
return false;
|
||||
}
|
||||
|
||||
editIndex = index;
|
||||
$('#grid').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
|
||||
var ed = $('#grid').datagrid('getEditor', {index:editIndex,field:'name'});
|
||||
($(ed.target).data('textbox') ? $(ed.target).textbox('textbox') : $(ed.target)).focus();
|
||||
},
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '140', title : '设备编号', field : 'equipmentcardid', sortable : true, halign:'center'},
|
||||
{width : '90', title : '设备名称', field : 'equipmentname', sortable : true, halign:'center'},
|
||||
{width : '105', title : '设备油墨使用状态', field : 'ibmstatus', sortable : true,formatter:function(value,row){
|
||||
switch (value) {
|
||||
case '${Flag_UNUSE}':
|
||||
return '未使用';
|
||||
case '${Flag_INUSE}':
|
||||
return '使用中';
|
||||
case '${Flag_USED}':
|
||||
return '使用完毕';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
},editor:{
|
||||
type:'combobox',
|
||||
options:{
|
||||
data: [{
|
||||
name: '未使用',
|
||||
status: '${Flag_UNUSE}'
|
||||
},{
|
||||
name: '使用中',
|
||||
status: '${Flag_INUSE}'
|
||||
},{
|
||||
name: '使用完毕',
|
||||
status: '${Flag_USED}'
|
||||
}],
|
||||
valueField:'status',
|
||||
textField:'name',
|
||||
required:true
|
||||
}
|
||||
}},
|
||||
{width : '90', title : '设备型号', field : 'equipmentmodel', sortable : true, halign:'center'},
|
||||
{width : '90', title : '设备类型', field : 'equipmentclassid', sortable : true, halign:'center'},
|
||||
{width : '90', title : '存放位置', field : 'areaid', sortable : true,halign:'center'}
|
||||
] ],
|
||||
data:${equipmentcardList}
|
||||
});
|
||||
});
|
||||
function doupdate(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/inkbatch/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$.post(ext.contextPath + "/material/inkbatch/updateMachine.do",{no:$('#id').val(),griddata:getGriddata()},function(data1){
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
});
|
||||
/* top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}); */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function getMids(){
|
||||
var mrows= $('#grid').datagrid("getRows");
|
||||
var mids="";
|
||||
$.each(mrows, function(index, item){
|
||||
mids+=item.id+",";
|
||||
});
|
||||
mids=mids.replace(/,$/gi,"");
|
||||
return mids;
|
||||
}
|
||||
function doadd_M(){
|
||||
$("#mids").val(getMids());
|
||||
|
||||
localStorage.setItem("mids",$("#mids").val());
|
||||
//清除旧数据
|
||||
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加参数设置中的设备',
|
||||
height:500,
|
||||
url : ext.contextPath + '/material/inkinfo/showEquipmentcardForSelects.do?iframeId=inkbatchEdit',
|
||||
buttons : [ {
|
||||
iconCls:'icon-ok',
|
||||
text : '确认',
|
||||
handler : function() {
|
||||
var data = dialog.find('iframe').get(0).contentWindow.selectFun(dialog, grid);
|
||||
var datas= $.parseJSON(data);
|
||||
console.log('enter',datas);
|
||||
if(datas.length>0){
|
||||
for(var i=0;i<datas.length;i++){
|
||||
grid.datagrid('appendRow',{
|
||||
id:datas[i].id,
|
||||
equipmentcardid:datas[i].equipmentcardid,
|
||||
equipmentname:datas[i].equipmentname,
|
||||
equipmentmodel:datas[i].equipmentmodel,
|
||||
equipmentclassid:datas[i].equipmentclass,
|
||||
areaid:datas[i].geographyarea
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
}
|
||||
function dodelete_M(){
|
||||
var rows = $('#grid').datagrid('getChecked');
|
||||
if(rows.length==0){
|
||||
top.$.messager.alert("提示","请选择需要删除的数据","info");
|
||||
}else{
|
||||
top.$.messager.confirm("提示", "确定删除这些数据?", function(r) {
|
||||
if (r) {
|
||||
//复制rows,否则deleteRow的index会出错
|
||||
var copyRows = [];
|
||||
for ( var j= 0; j < rows.length; j++) {
|
||||
copyRows.push(rows[j]);
|
||||
}
|
||||
|
||||
$.each(copyRows, function(index, item){
|
||||
$('#grid').datagrid('deleteRow',$('#grid').datagrid('getRowIndex',copyRows[index]));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function selectProcess(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择工艺路线',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/activiti/workflow/getProcessForSelect.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
$("#processrealid").textbox('setValue',res.id);
|
||||
$("#processrealid").textbox('setText',res.name);
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#processrealid").textbox('textbox').bind("click", function () {
|
||||
selectProcess();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input id="mids" name="mids" type="hidden" value="" />
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" id = "id" name="id" value="${inkbatch.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>批次号</th>
|
||||
<td><input name="no" class="easyui-textbox"
|
||||
disabled="disabled" value="${inkbatch.no }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>油墨类别</th>
|
||||
<td><input name="type" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${inkbatch.type }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>油墨名称</th>
|
||||
<td>
|
||||
<input name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${inkbatch.name }" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料状态</th>
|
||||
<td><select id="status" name="status" class="easyui-combobox"
|
||||
data-options="panelHeight:'auto'">
|
||||
<option value="0" <c:if test="${inkbatch.status=='0'}">selected</c:if>>未使用</option>
|
||||
<option value="1" <c:if test="${inkbatch.status=='1'}">selected</c:if>>使用中</option>
|
||||
<option value="2" <c:if test="${inkbatch.status=='2'}">selected</c:if>>使用完毕</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<th>使用开始时间</th>
|
||||
<td><input id="starttime" name="starttime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr> -->
|
||||
<!-- <tr>
|
||||
<th>使用开始时间</th>
|
||||
<td><input id="endtime" name="endtime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<th>产品工艺路线</th>
|
||||
<td><input id="processrealid" name="processrealid" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${inkbatch.processrealid }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>开始时间</th>
|
||||
<td><input id="starttime" name="starttime" class="Wdate"
|
||||
value="${fn:substring(inkbatch.starttime,0,19)}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr>
|
||||
<%-- <tr>
|
||||
<th>结束时间</th>
|
||||
<td>
|
||||
<input id="endtime"name="endtime" class="Wdate"
|
||||
value="${fn:substring(inkbatch.endtime,0,19)}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
||||
</td>
|
||||
</tr> --%>
|
||||
</table>
|
||||
</form>
|
||||
<div id="m">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
271
bin/WebRoot/jsp/material/inkbatchList.jsp
Normal file
271
bin/WebRoot/jsp/material/inkbatchList.jsp
Normal file
@ -0,0 +1,271 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%request.setAttribute("Flag_UNUSE",com.sipai.entity.material.Inkbatch.Flag_UNUSE);%>
|
||||
<%request.setAttribute("Flag_INUSE",com.sipai.entity.material.Inkbatch.Flag_INUSE);%>
|
||||
<%request.setAttribute("Flag_USED",com.sipai.entity.material.Inkbatch.Flag_USED);%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加油墨批次信息',
|
||||
url : ext.contextPath + '/material/inkbatch/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看油墨批次信息',
|
||||
url : ext.contextPath + '/material/inkbatch/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑油墨批次信息',
|
||||
url : ext.contextPath + '/material/inkbatch/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doupdate(dialog,grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/inkbatch/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/inkbatch/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');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var importFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择文件',
|
||||
width: 600,
|
||||
height:300,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/inkbatch/doimport.do',
|
||||
buttons : [ {
|
||||
text : '导入数据',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doimport(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
view: detailview,
|
||||
detailFormatter:function(index,row){
|
||||
return '<div style="padding:2px"><table class="ddv"></table></div>';
|
||||
},
|
||||
url : ext.contextPath + '/material/inkbatch/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 : '100', title : '油墨批次号', field : 'no', sortable : true, halign:'center'},
|
||||
{width : '90', title : '油墨名称', field : 'name', sortable : true, halign:'center'},
|
||||
{width : '80', title : '油墨类别', field : 'type', sortable : true, halign:'center'},
|
||||
{width : '60', title : '状态', field : 'status', sortable : true, halign:'center',formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '${Flag_UNUSE}':
|
||||
return '未使用';
|
||||
case '${Flag_INUSE}':
|
||||
return '使用中';
|
||||
case '${Flag_USED}':
|
||||
return '使用完毕';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}}
|
||||
] ],
|
||||
columns : [ [
|
||||
{width : '180', title : '工艺路线', field : 'processrealid', sortable : true, halign:'center' },
|
||||
{width : '130', title : '使用开始时间', field : 'starttime', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{width : '130', title : '使用结束时间', field : 'endtime', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{width : '60', title : '修改者', field : 'alteruser', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
value ='admin';
|
||||
return value;
|
||||
} },
|
||||
{width : '130', title : '修改时间', field : 'alterdt', sortable : true, halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/inkbatch/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/inkbatch/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/inkbatch/getMachine.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 : '140', title : '使用油墨设备编号', field : 'equipmentcardid', sortable : true, halign:'center'},
|
||||
{width : '140', title : '使用油墨设备编号', field : 'equipmentname', sortable : true, halign:'center'},
|
||||
{width : '85', title : '使用油墨设备状态', field : 'ibmstatus', sortable : true, align:'center',halign:'center',formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '${Flag_UNUSE}':
|
||||
return '未使用';
|
||||
case '${Flag_INUSE}':
|
||||
return '使用中';
|
||||
case '${Flag_USED}':
|
||||
return '使用完毕';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}},
|
||||
] ],
|
||||
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/inkbatch/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/inkbatch/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>
|
||||
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true" onclick="importFun();">导入油墨批次</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_name" class="easyui-textbox" /></td>
|
||||
<td>油墨批次号</td>
|
||||
<td><input name="search_no" 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>
|
||||
99
bin/WebRoot/jsp/material/inkbatchView.jsp
Normal file
99
bin/WebRoot/jsp/material/inkbatchView.jsp
Normal file
@ -0,0 +1,99 @@
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%request.setAttribute("Flag_UNUSE",com.sipai.entity.material.Inkbatch.Flag_UNUSE);%>
|
||||
<%request.setAttribute("Flag_INUSE",com.sipai.entity.material.Inkbatch.Flag_INUSE);%>
|
||||
<%request.setAttribute("Flag_USED",com.sipai.entity.material.Inkbatch.Flag_USED);%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#m').panel({
|
||||
width:"100%",
|
||||
height:"300",
|
||||
title: '使用设备',
|
||||
});
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
idField : 'id',
|
||||
columns : [ [
|
||||
{width : '140', title : '设备编号', field : 'equipmentcardid', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '设备名称', field : 'equipmentname', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '105', title : '设备油墨使用状态', field : 'ibmstatus', sortable : true,formatter:function(value,row){
|
||||
switch (value) {
|
||||
case '${Flag_UNUSE}':
|
||||
return '未使用';
|
||||
case '${Flag_INUSE}':
|
||||
return '使用中';
|
||||
case '${Flag_USED}':
|
||||
return '使用完毕';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}},
|
||||
{width : '90', title : '设备型号', field : 'equipmentmodel', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '设备类型', field : 'equipmentclassid', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '90', title : '存放位置', field : 'areaid', sortable : true, editor:'textbox',halign:'center'}
|
||||
] ],
|
||||
data:${equipmentcardList}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
body{ text-align:center}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${inkbatch.id }"/>
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<th>油墨批次号</th>
|
||||
<td>${inkbatch.no }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>油墨类别</th>
|
||||
<td>${inkbatch.type }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>油墨名称</th>
|
||||
<td>${inkbatch.name }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>油墨状态</th>
|
||||
<td>
|
||||
<c:if test="${inkbatch.status=='0'}">未使用</c:if>
|
||||
<c:if test="${inkbatch.status=='1'}">使用中</c:if>
|
||||
<c:if test="${inkbatch.status=='2'}">使用完毕</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品工艺路线</th>
|
||||
<td>${inkbatch.processrealid }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>开始时间</th>
|
||||
<td>${fn:substring(inkbatch.starttime,0,19)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>结束时间</th>
|
||||
<td>${fn:substring(inkbatch.endtime,0,19)}</td>
|
||||
</tr>
|
||||
<%-- <tr>
|
||||
<th>机台</th>
|
||||
<td>${inkbatch.equipmentName }</td>
|
||||
</tr> --%>
|
||||
</table>
|
||||
</form>
|
||||
<div id="m">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
123
bin/WebRoot/jsp/material/inkinfoEquipmentForSelects.jsp
Normal file
123
bin/WebRoot/jsp/material/inkinfoEquipmentForSelects.jsp
Normal file
@ -0,0 +1,123 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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">
|
||||
function selectFun(dialog, grid) {
|
||||
//清除旧数据
|
||||
var wrows= grid.datagrid("getRows");
|
||||
//复制rows,否则deleteRow的index会出错
|
||||
var copyRows = [];
|
||||
for ( var j= 0; j < wrows.length; j++) {
|
||||
copyRows.push(wrows[j]);
|
||||
}
|
||||
$.each(copyRows, function(index, item){
|
||||
grid.datagrid('deleteRow', grid.datagrid('getRowIndex',copyRows[index]));
|
||||
});
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
if(datas !=""){
|
||||
datas+=",";
|
||||
}
|
||||
datas += '{"id":"'+item.id +'","equipmentcardid":"'+item.equipmentcardid +'",'+
|
||||
'"equipmentname":"'+item.equipmentname +'","equipmentmodel":"'+item.equipmentmodel +'","equipmentclass":"'+item.equipmentclass.name +'","geographyarea":"'+item.geographyarea.name +'"}';
|
||||
|
||||
});
|
||||
datas="["+datas+"]";
|
||||
|
||||
return datas;//$.parseJSON(datas);
|
||||
|
||||
}
|
||||
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/inkinfo/getEquipmentCard.do?querytype=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '80', title : '设备编号', field : 'equipmentcardid', sortable : true, halign:'center'},
|
||||
{width : '100', title : '设备名称', field : 'equipmentname', sortable : true, halign:'center'},
|
||||
{width : '100', title : '设备型号', field: 'equipmentmodel', sortable : true, halign:'center'},
|
||||
{width : '100', title : '设备类型', field: 'equipmentclass', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.name;
|
||||
}} },
|
||||
{width : '100', title : '存放位置', field: 'geographyarea', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.name;
|
||||
} }},
|
||||
|
||||
|
||||
{width : '50', title : '管理状态', field: 'currentmanageflag', sortable : true, halign:'center'},
|
||||
{width : '80', title : '备注', field : 'remark', sortable : true, halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
/* var mids = parent.$("#${param.iframeId}")[0].contentWindow.$("#mids").val().split(",");
|
||||
$.each(mids, function(index, item){
|
||||
if(item != ""){
|
||||
$('#grid').datagrid("checkRow",$('#grid').datagrid("getRowIndex",item)); */
|
||||
var mids = localStorage.getItem("mids").split(",");
|
||||
localStorage.removeItem("mids");
|
||||
|
||||
$.each(mids, function(index, item){
|
||||
if(item != ""){
|
||||
$('#grid').datagrid("checkRow",$('#grid').datagrid("getRowIndex",item));
|
||||
}
|
||||
});
|
||||
//$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
//});
|
||||
//}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
<td>名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" style="width: 180px;" /></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>
|
||||
59
bin/WebRoot/jsp/material/materialBoxAdd.jsp
Normal file
59
bin/WebRoot/jsp/material/materialBoxAdd.jsp
Normal file
@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialbox/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>编号</th>
|
||||
<td><input name="boxnumber" class="easyui-textbox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<td><input name="name" class="easyui-textbox" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="required:true,validType:'isBlank',panelHeight:'auto',editable:false">
|
||||
<option value="1" selected >可用</option>
|
||||
<option value="0">不可用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" style="width:100%;height:100px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
61
bin/WebRoot/jsp/material/materialBoxEdit.jsp
Normal file
61
bin/WebRoot/jsp/material/materialBoxEdit.jsp
Normal file
@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialbox/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialBox.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>编号</th>
|
||||
<td><input name="boxnumber" class="easyui-textbox" value="${materialBox.boxnumber }" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<td><input name="name" class="easyui-textbox" value="${materialBox.name }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="required:true,validType:'isBlank',panelHeight:'auto',editable:false,value:'${materialBox.status}'">
|
||||
<option value="1" >可用</option>
|
||||
<option value="0">不可用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" value="${materialBox.remark }" data-options="multiline:true" style="width:100%;height:100px"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
90
bin/WebRoot/jsp/material/materialBoxForSelect.jsp
Normal file
90
bin/WebRoot/jsp/material/materialBoxForSelect.jsp
Normal file
@ -0,0 +1,90 @@
|
||||
<%@ 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;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialbox/getMaterialBoxes.do?querytype=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
ctrlSelect: false,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '200', title : '编号', field : 'boxnumber', sortable : true, align:'center',halign:'center'},
|
||||
{width : '200', title : '名称', field : 'name', sortable : true, align:'center',halign:'center'},
|
||||
{width : '100', title : '状态', field : 'status', sortable : true, align:'center',halign:'center',formatter : function(value, row) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '可用';
|
||||
case '1':
|
||||
return '不可用';
|
||||
}
|
||||
}}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
//以json格式返回数据
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
jsonstr = '{"boxid":"'+row.id
|
||||
+'","boxnumber":"'+row.boxnumber
|
||||
+'","boxname":"'+row.name
|
||||
+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}else{
|
||||
top.$.messager.alert('提示', "请选择要使用的数据!", 'info');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>单位名称</td>
|
||||
<td><input name="search_name" 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>
|
||||
177
bin/WebRoot/jsp/material/materialBoxList.jsp
Normal file
177
bin/WebRoot/jsp/material/materialBoxList.jsp
Normal file
@ -0,0 +1,177 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加单位信息',
|
||||
url : ext.contextPath + '/material/materialbox/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看料盒信息',
|
||||
url : ext.contextPath + '/material/materialbox/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑料盒信息',
|
||||
url : ext.contextPath + '/material/materialbox/edit.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/materialbox/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/materialbox/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({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialbox/getMaterialBoxes.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '180', title : '编号', field : 'boxnumber', sortable : true, align:'center',halign:'center'},
|
||||
{width : '180', title : '名称', field : 'name', sortable : true, align:'center',halign:'center'},
|
||||
{width : '100', title : '状态', field : 'status', sortable : true, align:'center',halign:'center',formatter : function(value, row) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '可用';
|
||||
case '1':
|
||||
return '不可用';
|
||||
}
|
||||
}},
|
||||
{width : '500', title : '备注', field : 'remark', halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/materialbox/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/materialbox/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);
|
||||
}
|
||||
});
|
||||
});
|
||||
</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/materialbox/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/materialbox/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>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>单位名称</td>
|
||||
<td><input name="search_name" 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>
|
||||
38
bin/WebRoot/jsp/material/materialBoxView.jsp
Normal file
38
bin/WebRoot/jsp/material/materialBoxView.jsp
Normal file
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialBox.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>编号</th>
|
||||
<td>${materialBox.boxnumber }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<td>${materialBox.name }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<c:if test="${materialBox.status=='1'}">可用</c:if>
|
||||
<c:if test="${materialBox.status=='0'}">不可用</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
${materialBox.remark }
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
280
bin/WebRoot/jsp/material/materialDateScheduleList.jsp
Normal file
280
bin/WebRoot/jsp/material/materialDateScheduleList.jsp
Normal file
@ -0,0 +1,280 @@
|
||||
<%@ 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>
|
||||
<style>
|
||||
|
||||
.textchoose {
|
||||
position: relative;
|
||||
border: 1px solid #95B8E7;
|
||||
background-color: #46A3FF;
|
||||
color:#FFFFFF;
|
||||
text-align:center;
|
||||
width:100% ;
|
||||
height:100%;
|
||||
line-height:90px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var editIndex = undefined;//当前编辑行索引
|
||||
var flag=false;//当flag为true grid可编辑 为假时不可编辑
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeadd',
|
||||
title : '添加班组',
|
||||
url : ext.contextPath + '/work/group/add.do?iframeId=iframeadd',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFlag= function(){
|
||||
flag=true;
|
||||
}
|
||||
//编辑行
|
||||
var editFun = function (index, field){
|
||||
if(!endEditing()){
|
||||
return false;
|
||||
}
|
||||
if(flag){
|
||||
editIndex = index;
|
||||
$('#grid').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
|
||||
var ed = $('#grid').datagrid('getEditor', {index:editIndex,field:field});
|
||||
($(ed.target).data('textbox') ? $(ed.target).textbox('textbox') : $(ed.target)).focus();
|
||||
}
|
||||
};
|
||||
function endEditing(){//清除editor
|
||||
if (editIndex == undefined){return true;}
|
||||
if ($('#grid').datagrid('validateRow', editIndex)){
|
||||
$('#grid').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var saveFun = function() {
|
||||
|
||||
if($('#grid').datagrid('getSelected')==null){
|
||||
top.$.messager.alert('提示','请先选择要保存的记录','info');
|
||||
}else{
|
||||
flag=false;
|
||||
var id = $('#grid').datagrid('getSelected').id;
|
||||
var url;
|
||||
|
||||
editIndex = $('#grid').datagrid('getRowIndex',id);
|
||||
url = ext.contextPath + '/material/materialdateschedule/update.do';
|
||||
//判断必输项
|
||||
if(!$('#grid').datagrid('validateRow', editIndex)){
|
||||
top.$.messager.alert('提示','请输入必输项','info');
|
||||
return false;
|
||||
}
|
||||
var unit_ed = $('#grid').datagrid('getEditor', {index:editIndex,field:'inventoryfrontline'});
|
||||
var inventoryfrontline = $(unit_ed.target).textbox('getValue');
|
||||
var unit_pd = $('#grid').datagrid('getEditor', {index:editIndex,field:'pickingday'});
|
||||
var pickingday = $(unit_pd.target).textbox('getValue');
|
||||
var unit_icp = $('#grid').datagrid('getEditor', {index:editIndex,field:'inventorycountpostpartum'});
|
||||
var inventorycountpostpartum = $(unit_icp.target).textbox('getValue');
|
||||
|
||||
var unit_r = $('#grid').datagrid('getEditor', {index:editIndex,field:'remark'});
|
||||
var remark = $(unit_r.target).textbox('getValue');
|
||||
$.post(url,{id:id,inventoryfrontline:inventoryfrontline,pickingday:pickingday,
|
||||
inventorycountpostpartum:inventorycountpostpartum,
|
||||
remark:remark},function(data){
|
||||
if(data.res == '1'){
|
||||
top.$.messager.alert('提示','保存成功','info',function (){
|
||||
$('#grid').datagrid('reload');
|
||||
$('#gridad').datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','保存失败','info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
};
|
||||
|
||||
var getwo=function() {
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialdateschedule/getMaterialDateSchedules.do?woid=' + $('#search_wo').combobox('getValue')+'&search_day='+$('#search_day').val(),
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
nowrap:false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
onClickCell: editFun,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : 'BOM物料项目', field : 'bomprojects', sortable : true, halign:'center'},
|
||||
{width : '150', title : '产前线边库存盘点', field : 'inventoryfrontline', sortable : true,editor:'textbox', halign:'center'},
|
||||
{width : '100', title : '当日领料', field : 'pickingday', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '100', title : '当日计划消耗量', field : 'plannedconsumption', sortable : true, halign:'center'},
|
||||
{width : '150', title : '当日产后线边库存盘点', field : 'inventorycountpostpartum', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '100', title : '当日实际消耗量', field : 'actualconsumptionday', sortable : true, halign:'center'},
|
||||
{width : '100', title : '差额', field : 'thedifferent', sortable : true, halign:'center'},
|
||||
{width : '150', title : '差额超出预计百分比', field : 'exceedsplannedpercentage', sortable : true, halign:'center'},
|
||||
{width : '100', title : '说明', field : 'remark', sortable : true,editor:'textbox', halign:'center'},
|
||||
|
||||
] ],
|
||||
toolbar : '#toolbarqe',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
$('#prepare').text(data.prepare);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
gridad = $('#gridad').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialdateschedule/getTaskList.do?woid=' + $('#search_wo').combobox('getValue'),
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
nowrap:false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : 'BOM物料项目', field : 'bomprojects', sortable : true, halign:'center'},
|
||||
{width : '120', title : '当前进度计划消耗量', field : 'currentplanconsumption', sortable : true, halign:'center'},
|
||||
{width : '150', title : '当前进度实际累计消耗量', field : 'curactualconsumptionday', sortable : true, halign:'center'},
|
||||
{width : '130', title : '任务单计划消耗总量', field : 'totaltasksplanned', sortable : true, halign:'center'},
|
||||
{width : '100', title : '线边库存量', field : 'linemargin', sortable : true, halign:'center'},
|
||||
{width : '100', title : '库存总量', field : 'totalinventory', sortable : true, halign:'center'},
|
||||
{width : '130', title : '此任务单可支配量', field : 'tasklistused', sortable : true, halign:'center'},
|
||||
{width : '80', title : '缺口量', field : 'amountofgap', sortable : true, halign:'center'},
|
||||
|
||||
] ],
|
||||
toolbar : '#toolbarad',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
|
||||
$('#prodamount').text(data.prodamount);
|
||||
$('#act').text(data.act);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
function getmo(){
|
||||
|
||||
$('#search_wo').combobox({
|
||||
url : ext.contextPath + '/plan/taskorder/getTaskorder1.do?sdate='+$('#search_date').val(),
|
||||
valueField:'id',
|
||||
textField:'tasklistcode',
|
||||
method:'get'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>任务单下达日期</td>
|
||||
<td><input id="search_date" name="search_date" class="Wdate" value=""
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-{%d}'})" onchange="getmo()" readonly/></td>
|
||||
<td>任务单号</td>
|
||||
<td>
|
||||
<input id="search_wo" name="search_wo" class="easyui-combobox" style="width:200px"/></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="getwo();">搜索</a>
|
||||
</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>
|
||||
|
||||
<div class="easyui-tabs" style="width:1100px;height:500px;" >
|
||||
<div title="日计划" style="padding:0px;">
|
||||
<div id="toolbarqe" style="display: none;">
|
||||
|
||||
<Form id="searchForm">
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<td>日计划日期</td>
|
||||
<td><input id="search_day" name="search_day" class="Wdate" value=""
|
||||
onfocus="WdatePicker({onpicked:getwo(),startDate:'%y',dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-{%d}'})" readonly /></td>
|
||||
<td>本日日计划产品数:</td>
|
||||
<td id='prepare'></td>
|
||||
<td>
|
||||
<a style="position:absolute; left:850px;top:8px;" href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true"
|
||||
onclick="editFlag();">编辑</a>
|
||||
</td>
|
||||
<td>
|
||||
<a style="position:absolute; left:900px;top:8px;" href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true"
|
||||
onclick="saveFun();">保存</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</Form>
|
||||
</div>
|
||||
<div id="cc" class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div title="任务单" closable="true" data-options="closable:false">
|
||||
<div id="toolbarad" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>本任务单产品数:</td>
|
||||
<td id='prodamount'></td>
|
||||
<td>本任务单当前成品数:</td>
|
||||
<td id='act'></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="adcc" class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="gridad" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
97
bin/WebRoot/jsp/material/materialForBomSelect.jsp
Normal file
97
bin/WebRoot/jsp/material/materialForBomSelect.jsp
Normal file
@ -0,0 +1,97 @@
|
||||
<%@ 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;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialinfo/getBomMaterialInfos.do?querytype=select&productcode=${productcode}&typename='+encodeURI('${typename}'),
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '物料编码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '250', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '150', title : '规格参数', field : 'spec', sortable : true, halign:'center'},
|
||||
{width : '80', title : '类型', field : 'materialtype', sortable : true, halign:'center',align:'center', formatter : function(value, row){
|
||||
if(value==null){
|
||||
return "";
|
||||
}else{
|
||||
return value.typename;
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '单位', field : 'unit', sortable : true, halign:'center',align:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
//以json格式返回数据
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
jsonstr = '{"materialid":"'+row.id
|
||||
+'","materialcode":"'+row.materialcode
|
||||
+'","materialname":"'+row.materialname
|
||||
+'","figurenumber":"'+row.figurenumber
|
||||
+'","figurename":"'+row.figurename
|
||||
+'","spec":"'+row.spec
|
||||
+'","type":"'+row._typename
|
||||
+'","unit":"'+row.unit
|
||||
+'"}';
|
||||
}
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<input type="hidden" name="productcode" value="${productcode}"/>
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>物料名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>物料编码</td>
|
||||
<td><input name="search_code" 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>
|
||||
96
bin/WebRoot/jsp/material/materialForSelect.jsp
Normal file
96
bin/WebRoot/jsp/material/materialForSelect.jsp
Normal file
@ -0,0 +1,96 @@
|
||||
<%@ 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;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialinfo/getmaterialinfos.do?querytype=select&typename='+encodeURI('${typename}'),
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '物料编码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '260', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '120', title : '规格参数', field : 'spec', sortable : true, halign:'center'},
|
||||
{width : '100', title : '类型', field : 'materialtype', sortable : true, halign:'center',align:'center', formatter : function(value, row){
|
||||
if(value==null){
|
||||
return "";
|
||||
}else{
|
||||
return value.typename;
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '单位', field : 'unit', sortable : true, halign:'center',align:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
//以json格式返回数据
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
jsonstr = '{"materialid":"'+row.id
|
||||
+'","materialcode":"'+row.materialcode
|
||||
+'","materialname":"'+row.materialname
|
||||
+'","figurenumber":"'+row.figurenumber
|
||||
+'","figurename":"'+row.figurename
|
||||
+'","spec":"'+row.spec
|
||||
+'","type":"'+row._typename
|
||||
+'","unit":"'+row.unit
|
||||
+'"}';
|
||||
}
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>物料名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>物料编码</td>
|
||||
<td><input name="search_code" 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>
|
||||
154
bin/WebRoot/jsp/material/materialInfoAdd.jsp
Normal file
154
bin/WebRoot/jsp/material/materialInfoAdd.jsp
Normal file
@ -0,0 +1,154 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialinfo/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectDrawing(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择图纸',
|
||||
width : 800,
|
||||
height : 480,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/document/selectDrawing.do?productcode=${productcode}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#figurenumberid").val((res.id== 'undefined')?'':res.id);
|
||||
$("#figurenumber").textbox('setValue',(res.number == 'undefined')?'':res.number);
|
||||
$("#figurename").text((res.docname == 'undefined')?'':res.docname);
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#unit').combobox({
|
||||
url:ext.contextPath + '/material/materialunit/getJsonUnit.do',
|
||||
valueField:'unit',
|
||||
textField:'unit',
|
||||
editable:false,
|
||||
panelHeight:'auto',
|
||||
});
|
||||
|
||||
$('#tname').combotree({
|
||||
url : ext.contextPath + '/material/materialtype/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#tname").tree("unselect");
|
||||
}
|
||||
},
|
||||
onClick : function(node) {
|
||||
$("#typeid").val(node.id);
|
||||
var materialcode=$("#materialcode").textbox('getValue');
|
||||
var oldmaterialcode=$("#mtypetemp").val();//删除旧的物料编码前缀
|
||||
if(oldmaterialcode!=null && oldmaterialcode!=""){
|
||||
materialcode=materialcode.substring(oldmaterialcode.length,materialcode.length);
|
||||
}
|
||||
materialcode=node.attributes.typecode+materialcode;
|
||||
$("#mtypetemp").val(node.attributes.typecode);
|
||||
$("#materialcode").textbox('setValue',materialcode);
|
||||
}
|
||||
});
|
||||
|
||||
$("#figurenumber").textbox("textbox").bind("click",function(){
|
||||
selectDrawing();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="mtypetemp" type="hidden" value=""/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td><input id="materialcode" name="materialcode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td><input name="materialname" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料型号</th>
|
||||
<td><input name="materialmodel" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料属性</th>
|
||||
<td ><select id="materialproperties" name="materialproperties" class="easyui-combobox" data-options="panelHeight:'auto'">
|
||||
<option value="自制" selected>自制</option>
|
||||
<option value="外购">外购</option>
|
||||
</select></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>辅助属性</th>
|
||||
<td><input name="secondaryattribute" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>基本单位用量</th>
|
||||
<td><input name="unituse" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td>
|
||||
<input id="unit" name="unit" class="easyui-combobox" value="" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>良率(%)</th>
|
||||
<td><input name="materialmodel" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" style="width:100%;height:100px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
266
bin/WebRoot/jsp/material/materialInfoEdit.jsp
Normal file
266
bin/WebRoot/jsp/material/materialInfoEdit.jsp
Normal file
@ -0,0 +1,266 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialinfo/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
$('#unit').combobox({
|
||||
url:ext.contextPath + '/material/materialunit/getJsonUnit.do',
|
||||
valueField:'unit',
|
||||
textField:'unit',
|
||||
editable:false,
|
||||
panelHeight:'auto'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialInfo.id }"/>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>层次</th>
|
||||
<td><input name="levels" class="easyui-textbox"
|
||||
value="${materialInfo.levels }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td><input name="materialcode" class="easyui-textbox"
|
||||
value="${materialInfo.materialcode }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td><input name="materialname" class="easyui-textbox"
|
||||
value="${materialInfo.materialname }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>规格型号</th>
|
||||
<td><input name="materialmodel" class="easyui-textbox"
|
||||
value="${materialInfo.materialmodel }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>辅助属性</th>
|
||||
<td><input name="secondaryattribute" class="easyui-textbox"
|
||||
value="${materialInfo.secondaryattribute}" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料属性</th>
|
||||
<td><input name="materialproperties" class="easyui-textbox"
|
||||
value="${materialInfo.materialproperties }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>图号</th>
|
||||
<td><input name="drawnum" class="easyui-textbox"
|
||||
value="${materialInfo.drawnum }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>基本单位</th>
|
||||
<td><input name="unit" class="easyui-textbox"
|
||||
value="${materialInfo.unit }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>基本单位用量</th>
|
||||
<td><input name="unituse" class="easyui-textbox"
|
||||
value="${materialInfo.unituse }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>用量</th>
|
||||
<td><input name="unituse" class="easyui-textbox"
|
||||
value="${materialInfo.dosage }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>常用单位</th>
|
||||
<td><input name="usuallyunit" class="easyui-textbox"
|
||||
value="${materialInfo.usuallyunit }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>常用用量</th>
|
||||
<td><input name="usualuseunit" class="easyui-textbox"
|
||||
value="${materialInfo.usualuseunit }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>失效日期</th>
|
||||
<td><input id="faildt" name="faildt" class="Wdate"
|
||||
data-options="required:true,validType:'isBlank'" value="${materialInfo.faildt}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
/></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>生效日期</th>
|
||||
<td><input id="effectdt" name="effectdt" class="Wdate"
|
||||
data-options="required:true,validType:'isBlank'" value="${materialInfo.effectdt }" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
/></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>计划百分比</th>
|
||||
<td><input name="plannedpercentage" class="easyui-textbox"
|
||||
value="${materialInfo.plannedpercentage }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>耗损率</th>
|
||||
<td><input name="wearrate" class="easyui-textbox"
|
||||
value="${materialInfo. wearrate}" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>位置号</th>
|
||||
<td><input name="localnum" class="easyui-textbox"
|
||||
value="${materialInfo.localnum }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>毛坯尺寸</th>
|
||||
<td><input name="billetsize" class="easyui-textbox"
|
||||
value="${materialInfo.billetsize }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>坯料数</th>
|
||||
<td><input name="billetnum" class="easyui-textbox"
|
||||
value="${materialInfo.billetnum }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>子项类型</th>
|
||||
<td><input name="itemtype" class="easyui-textbox"
|
||||
value="${materialInfo.itemtype}" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工序号</th>
|
||||
<td><input name="operationnumber" class="easyui-textbox"
|
||||
value="${materialInfo.operationnumber }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工序</th>
|
||||
<td><input name="process" class="easyui-textbox"
|
||||
value="${materialInfo.process }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工位</th>
|
||||
<td><input name="station" class="easyui-textbox"
|
||||
value="${materialInfo.station }" /></td>
|
||||
|
||||
</tr><tr>
|
||||
<th>发货仓库</th>
|
||||
<td><input name="warehouse" class="easyui-textbox"
|
||||
value="${materialInfo.warehouse }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>关键件标志</th>
|
||||
<td><input name="keysymbol" class="easyui-textbox"
|
||||
value="${materialInfo.keysymbol }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用状态</th>
|
||||
<td><input name="usestate" class="easyui-textbox"
|
||||
value="${materialInfo.usestate }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>是否禁用</th>
|
||||
<td><input name="ifdown" class="easyui-textbox"
|
||||
value="${materialInfo.ifdown}" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" value="${materialInfo.remark }" data-options="multiline:true" style="width:50%;height:100px"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注1</th>
|
||||
<td>
|
||||
<input name="remark1" class="easyui-textbox" value="${materialInfo.remark1 }" data-options="multiline:true" style="width:50%;height:100px"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>备注2</th>
|
||||
<td>
|
||||
<input name="remark2" class="easyui-textbox" value="${materialInfo.remark2 }" data-options="multiline:true" style="width:50%;height:100px"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注3</th>
|
||||
<td>
|
||||
<input name="remark3" class="easyui-textbox" value="${materialInfo.remark3 }" data-options="multiline:true" style="width:50%;height:100px"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>是否倒冲</th>
|
||||
<td><input name="ifpour" class="easyui-textbox"
|
||||
value="${materialInfo.ifpour }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>跳层</th>
|
||||
<td><input name="jumplayer" class="easyui-textbox"
|
||||
value="${materialInfo.jumplayer }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>存在替代关系</th>
|
||||
<td><input name="havereplace" class="easyui-textbox"
|
||||
value="${materialInfo.havereplace }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>良率</th>
|
||||
<td><input name="yield" class="easyui-textbox"
|
||||
value="${materialInfo. yield}" /></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
195
bin/WebRoot/jsp/material/materialInfoEdit1.jsp
Normal file
195
bin/WebRoot/jsp/material/materialInfoEdit1.jsp
Normal file
@ -0,0 +1,195 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialinfo/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
$('#unit').combobox({
|
||||
url:ext.contextPath + '/material/materialunit/getJsonUnit.do',
|
||||
valueField:'unit',
|
||||
textField:'unit',
|
||||
editable:false,
|
||||
panelHeight:'auto'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialInfo.id }"/>
|
||||
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td><input name="materialcode" class="easyui-textbox"
|
||||
value="${materialInfo.materialcode }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td><input name="materialname" class="easyui-textbox"
|
||||
value="${materialInfo.materialname }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>规格型号</th>
|
||||
<td><input name="materialmodel" class="easyui-textbox"
|
||||
value="${materialInfo.materialmodel }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料属性</th>
|
||||
<td><input name="materialproperties" class="easyui-textbox"
|
||||
value="${materialInfo.materialproperties }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>辅助属性</th>
|
||||
<td><input name="secondaryattribute" class="easyui-textbox"
|
||||
value="${materialInfo.secondaryattribute}" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td><input name="unit" class="easyui-textbox"
|
||||
value="${materialInfo.unit }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>数量</th>
|
||||
<td><input name="num" class="easyui-textbox"
|
||||
value="${materialInfo.num }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>良率</th>
|
||||
<td><input name="yield" class="easyui-textbox"
|
||||
value="${materialInfo. yield}" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td><input name="state" class="easyui-textbox"
|
||||
value="${materialInfo.state}" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>审核</th>
|
||||
<td><input name="audit" class="easyui-textbox"
|
||||
value="${materialInfo.audit}" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>版本</th>
|
||||
<td><input name="version" class="easyui-textbox"
|
||||
value="${materialInfo.version}" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>图号</th>
|
||||
<td><input name="drawnum" class="easyui-textbox"
|
||||
value="${materialInfo.drawnum }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工艺路线代码</th>
|
||||
<td><input name="processlinecode" class="easyui-textbox"
|
||||
value="${materialInfo.processlinecode }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工艺路线名称</th>
|
||||
<td><input name="processlinename" class="easyui-textbox"
|
||||
value="${materialInfo.processlinename }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>建立人员</th>
|
||||
<td><input name="remark1" class="easyui-textbox"
|
||||
value="${materialInfo.remark1 }" /></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>建立日期</th>
|
||||
<td><input id="insdt" name="insdt" class="Wdate"
|
||||
data-options="required:true,validType:'isBlank'" value="${materialInfo.insdt }" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
/></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>最后更新人</th>
|
||||
<td><input name="lastinsuser" class="easyui-textbox"
|
||||
value="${materialInfo.lastinsuser }" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>最后更新日期</th>
|
||||
<td><input id="lastinsdt" name="lastinsdt" class="Wdate"
|
||||
data-options="required:true,validType:'isBlank'" value="${materialInfo.lastinsdt}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
/></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用人员</th>
|
||||
<td><input id="usepeople" name="usepeople" class="easyui-textbox"
|
||||
value="${materialInfo.usepeople }"
|
||||
/></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>使用日期</th>
|
||||
<td><input name="userdt" class="Wdate"
|
||||
value="${materialInfo.userdt }" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" value="${materialInfo.remark }" data-options="multiline:true" style="width:50%;height:100px"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<th>跳层</th>
|
||||
<td><input name="jumplayer" class="easyui-textbox"
|
||||
value="${materialInfo.jumplayer }" /></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
305
bin/WebRoot/jsp/material/materialInfoList.jsp
Normal file
305
bin/WebRoot/jsp/material/materialInfoList.jsp
Normal file
@ -0,0 +1,305 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加物料信息',
|
||||
url : ext.contextPath + '/material/materialinfo/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看物料信息',
|
||||
url : ext.contextPath + '/material/materialinfo/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑物料信息',
|
||||
url : ext.contextPath + '/material/materialinfo/edit.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/materialinfo/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/materialinfo/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');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var downFun = function() {
|
||||
searchForm.action = ext.contextPath + '/material/materialinfo/downtemplate.do';
|
||||
|
||||
searchForm.submit();
|
||||
};
|
||||
|
||||
var importFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择文件',
|
||||
width: 600,
|
||||
height:300,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/doimport.do',
|
||||
buttons : [ {
|
||||
text : '导入数据',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doimport(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
var exportFun = function() {
|
||||
//通过response导出,用户自己选择路径
|
||||
searchForm.action = ext.contextPath + '/material/materialinfo/exportByResponse.do';
|
||||
searchForm.submit();
|
||||
var win = $.messager.progress({
|
||||
title:'提示',
|
||||
msg:'文件正在导出,请稍后...'
|
||||
});
|
||||
setTimeout(function(){
|
||||
$.messager.progress('close');
|
||||
},3000);
|
||||
|
||||
};
|
||||
var exportByIdFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要导出的记录','info');
|
||||
}else{
|
||||
searchForm.idStr.value=datas;
|
||||
searchForm.action = ext.contextPath + '/material/materialinfo/exportByIds.do';
|
||||
searchForm.submit();
|
||||
var win = $.messager.progress({
|
||||
title:'提示',
|
||||
msg:'文件正在导出,请稍后...'
|
||||
});
|
||||
setTimeout(function(){
|
||||
$.messager.progress('close');
|
||||
},3000);
|
||||
}
|
||||
};
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialinfo/getmaterialinfos.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '120', title : '物料代码', field : 'materialcode', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '220', title : '物料名称', field : 'materialname', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '220', title : '物料型号', field : 'materialmodel', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '100', title : '物料属性', field : 'materialproperties', sortable : true, align:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '180', title : '辅助属性', field : 'secondaryattribute', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '单位', field : 'unit', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '图号', field : 'drawnum', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
/*{width : '80', title : '图名', field : 'D.docname', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(row.figure!=null){
|
||||
return row.figure.docname;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
|
||||
{width : '100', title : '类型', field : 'materialtype', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value.typename;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},*/
|
||||
{width : '80', title : '良率(%)', field : 'yield', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="详细资料" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/materialinfo/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/materialinfo/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);
|
||||
}
|
||||
});
|
||||
/* <td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_save',plain:true" onclick="downFun();">模版下载</a></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true" onclick="importFun();">导入</a></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_go',plain:true" onclick="exportFun();">全部导出</a></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_go',plain:true" onclick="exportByIdFun();">指定导出</a></td>*/
|
||||
});
|
||||
</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/materialinfo/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/materialinfo/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>
|
||||
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true" onclick="importFun();">导入</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_name" class="easyui-textbox" /></td>
|
||||
<td>物料代码</td>
|
||||
<td><input name="search_code" 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>
|
||||
163
bin/WebRoot/jsp/material/materialInfoView.jsp
Normal file
163
bin/WebRoot/jsp/material/materialInfoView.jsp
Normal file
@ -0,0 +1,163 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
|
||||
<style>
|
||||
body{ text-align:center}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialInfo.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>层次</th>
|
||||
<td>${materialInfo.levels }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td>${materialInfo.materialcode }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td>${materialInfo.materialname }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>规格型号</th>
|
||||
<td>${materialInfo.materialmodel }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>辅助属性</th>
|
||||
<td>${materialInfo.secondaryattribute}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料属性</th>
|
||||
<td>${materialInfo.materialproperties }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>图号</th>
|
||||
<td>${materialInfo.drawnum }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>基本单位</th>
|
||||
<td>${materialInfo.unit }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>基本单位用量</th>
|
||||
<td>${materialInfo.unituse }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>用量</th>
|
||||
<td>${materialInfo.dosage }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>常用单位</th>
|
||||
<td>${materialInfo.usuallyunit }</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>常用用量</th>
|
||||
<td>${materialInfo.usualuseunit }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>失效日期</th>
|
||||
<td>${materialInfo.faildt}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>生效日期</th>
|
||||
<td>${materialInfo.effectdt }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>计划百分比</th>
|
||||
<td>${materialInfo.plannedpercentage }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>耗损率</th>
|
||||
<td>${materialInfo. wearrate}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>位置号</th>
|
||||
<td>${materialInfo.localnum }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>毛坯尺寸</th>
|
||||
<td>${materialInfo.billetsize }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>坯料数</th>
|
||||
<td>${materialInfo.billetnum }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>子项类型</th>
|
||||
<td>${materialInfo.itemtype}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工序号</th>
|
||||
<td>${materialInfo.operationnumber }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工序</th>
|
||||
<td>${materialInfo.process }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工位</th>
|
||||
<td>${materialInfo.station }</td>
|
||||
</tr><tr>
|
||||
<th>发货仓库</th>
|
||||
<td>${materialInfo.warehouse }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>关键件标志</th>
|
||||
<td>${materialInfo.keysymbol }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用状态</th>
|
||||
<td>${materialInfo.usestate }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>是否禁用</th>
|
||||
<td>${materialInfo.ifdown}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>${materialInfo.remark }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注1</th>
|
||||
<td>${materialInfo.remark1 }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注2</th>
|
||||
<td>${materialInfo.remark2 }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>库存量</th>
|
||||
<td>${materialInfo.inventory }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>是否倒冲</th>
|
||||
<td>${materialInfo.ifpour }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>跳层</th>
|
||||
<td>${materialInfo.jumplayer }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>存在替代关系</th>
|
||||
<td>${materialInfo.havereplace }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>良率</th>
|
||||
<td>${materialInfo. yield}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<div class="barcode2" id="div128" style="text-align:center;margin-left:250px;margin-top:200px;"></div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
112
bin/WebRoot/jsp/material/materialInfoView1.jsp
Normal file
112
bin/WebRoot/jsp/material/materialInfoView1.jsp
Normal file
@ -0,0 +1,112 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<style>
|
||||
body{ text-align:center}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialInfo.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td>${materialInfo.materialcode }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td>${materialInfo.materialname }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>规格型号</th>
|
||||
<td>${materialInfo.materialmodel }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料属性</th>
|
||||
<td>${materialInfo.materialproperties }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>辅助属性</th>
|
||||
<td>${materialInfo.secondaryattribute}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td>${materialInfo.unit }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>数量</th>
|
||||
<td>${materialInfo.num }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>成品率(%)</th>
|
||||
<td>${materialInfo.yield }</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>${materialInfo.state }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>审核</th>
|
||||
<td>${materialInfo.audit }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>版本</th>
|
||||
<td>${materialInfo.version }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>图号</th>
|
||||
<td>${materialInfo.drawnum}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工艺路线代码</th>
|
||||
<td>${materialInfo.processlinecode }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工艺路线名称</th>
|
||||
<td>${materialInfo.processlinename }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>建立人员</th>
|
||||
<td>${materialInfo. remark1}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>建立日期</th>
|
||||
<td>${materialInfo.insdt }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>最后更新人</th>
|
||||
<td>${materialInfo.lastinsuser }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>最后更新日期</th>
|
||||
<td>${materialInfo.lastinsdt }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用人员</th>
|
||||
<td>${materialInfo.usepeople}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用日期</th>
|
||||
<td>${materialInfo.userdt }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>${materialInfo.remark }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>跳层</th>
|
||||
<td>${materialInfo.jumplayer }</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<br />
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
147
bin/WebRoot/jsp/material/materialInventoryAdd.jsp
Normal file
147
bin/WebRoot/jsp/material/materialInventoryAdd.jsp
Normal file
@ -0,0 +1,147 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialinventory/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectmaterialcode(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择物料',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/material/materialinventory/select.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
chosematerial(res)
|
||||
//$("#div_product").panel('close');
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function chosematerial(res){
|
||||
//console.log("res",res);
|
||||
$("#materialcode").textbox('setValue',res.materialcode);//easyui textbox赋值jquery不一样
|
||||
$("#materialid").val(res.id);
|
||||
$("#materialname").html(res.materialname);
|
||||
$("#unit").html(res.unit);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#materialcode").textbox('textbox').bind("click", function () {
|
||||
selectmaterialcode();
|
||||
$("#processid").val('${processid}');
|
||||
|
||||
});
|
||||
$('#processid').combobox({
|
||||
url : ext.contextPath + '/process/taskprocedure/getprovedurenamelist.do',
|
||||
valueField:'id',
|
||||
textField:'procedurename',
|
||||
method:'get',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>工序名称</th>
|
||||
<td><input id="processid" name="processid" class="easyui-combobox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value=""
|
||||
onclick="processFun();"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td><input id="materialcode" name="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/>
|
||||
<input id="materialid" name="materialid" type="hidden" value="" />
|
||||
<input id="processid" name="processid" type="hidden" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td><span id="materialname"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td><span id="unit"></span></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<br />
|
||||
<!-- <table class="table">
|
||||
<tr>
|
||||
<th>产前线边库存盘点</th>
|
||||
<td><input id="inventoryfrontline" name="inventoryfrontline" class="easyui-textbox" data-options="required:true,validType:'isBlank' " value="" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当日领料</th>
|
||||
<td><input id="pickingday" name="pickingday" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当日计划消耗量</th>
|
||||
<td><input id="plannedconsumption" name="plannedconsumption" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当日产后线边库存盘点</th>
|
||||
<td><input id="inventorycountpostpartum" name="inventorycountpostpartum" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当日实际消耗量</th>
|
||||
<td><input id="actualconsumptionday" name="actualconsumptionday" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>差额</th>
|
||||
<td><input id="thedifferent" name="thedifferent" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>差额超出预计百分比</th>
|
||||
<td><input id="exceedsplannedpercentage" name="exceedsplannedpercentage" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
||||
</tr>
|
||||
</table> -->
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
62
bin/WebRoot/jsp/material/materialInventoryEdit.jsp
Normal file
62
bin/WebRoot/jsp/material/materialInventoryEdit.jsp
Normal file
@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialinventory/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" id="materialid" name="materialid" value="${materialInventory.materialid }"/>
|
||||
<input type="hidden" id= "processid" name="processid" value="${materialInventory.processid }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>工序名称</th>
|
||||
<td><input name="processname" class="easyui-textbox" value="${materialInventory.processname }" readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td><input name="materialname" class="easyui-textbox" value="${materialInventory.materialname }" readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产前线边库存盘点</th>
|
||||
<td><input name="inventoryfrontline" class="easyui-textbox" value="${materialInventory.inventoryfrontline }" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当日领料</th>
|
||||
<td><input name="pickingday" class="easyui-textbox" value="${materialInventory.pickingday }" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>该工序当日产量</th>
|
||||
<td><input name="plannedconsumption" class="easyui-textbox" value="${materialInventory.plannedconsumption }" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当日产后线边库存盘点</th>
|
||||
<td><input name="inventorycountpostpartum" class="easyui-textbox" value="${materialInventory.inventorycountpostpartum }" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
134
bin/WebRoot/jsp/material/materialInventoryForSelect.jsp
Normal file
134
bin/WebRoot/jsp/material/materialInventoryForSelect.jsp
Normal file
@ -0,0 +1,134 @@
|
||||
<%@ 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;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialinfo/getmaterialinfos.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '120', title : '物料代码', field : 'materialcode', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '220', title : '物料名称', field : 'materialname', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '220', title : '物料型号', field : 'materialmodel', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '100', title : '物料属性', field : 'materialproperties', sortable : true, align:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '180', title : '辅助属性', field : 'secondaryattribute', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '单位', field : 'unit', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
//以json格式返回数据
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
jsonstr = '{"id":"'+row.id
|
||||
+'","materialcode":"'+row.materialcode
|
||||
+'","materialname":"'+row.materialname
|
||||
+'","unit":"'+row.unit
|
||||
+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
/* var row = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
if (row){
|
||||
jsonstr = '{"id":"'+row.id
|
||||
+'","materialcode":"'+row.materialcode
|
||||
+'","materialname":"'+row.materialname
|
||||
+'","unit":"'+row.unit
|
||||
+'"}';
|
||||
return $.parseJSON(jsonstr); */
|
||||
}else{
|
||||
top.$.messager.alert('提示', "请选择要使用的数据!", 'info');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>物料名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>物料代码</td>
|
||||
<td><input name="search_code" 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>
|
||||
326
bin/WebRoot/jsp/material/materialInventoryList.jsp
Normal file
326
bin/WebRoot/jsp/material/materialInventoryList.jsp
Normal file
@ -0,0 +1,326 @@
|
||||
<%@ 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 editIndex = undefined;//当前编辑行索引
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
width:1000,
|
||||
height:600,
|
||||
title : '该物料盘点历史',
|
||||
url : ext.contextPath +'/material/materialinventory/view.do?id=' + id,
|
||||
|
||||
});
|
||||
};
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加单位信息',
|
||||
url : ext.contextPath + '/material/materialinventory/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
var editFun = function (index, field){
|
||||
if(!endEditing()){
|
||||
return false;
|
||||
}
|
||||
editIndex = index;
|
||||
$('#grid').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
|
||||
var ed = $('#grid').datagrid('getEditor', {index:editIndex,field:field});
|
||||
|
||||
($(ed.target).data('textbox')?$(ed.target).textbox('textbox') : $(ed.target)).focus();
|
||||
|
||||
};
|
||||
function endEditing(){//清除editor
|
||||
if (editIndex == undefined){return true;}
|
||||
if ($('#grid').datagrid('validateRow', editIndex)){
|
||||
$('#grid').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var saveFun = function() {
|
||||
|
||||
if($('#grid').datagrid('getSelected')==null){
|
||||
top.$.messager.alert('提示','请先选择要保存的记录','info');
|
||||
}else{
|
||||
flag=false;
|
||||
var id = $('#grid').datagrid('getSelected').id;
|
||||
var url;
|
||||
|
||||
editIndex = $('#grid').datagrid('getRowIndex',id);
|
||||
url = ext.contextPath + '/material/materialinventory/saveinvent.do';
|
||||
//判断必输项
|
||||
if(!$('#grid').datagrid('validateRow', editIndex)){
|
||||
top.$.messager.alert('提示','请输入必输项','info');
|
||||
return false;
|
||||
}
|
||||
var unit_ed = $('#grid').datagrid('getEditor', {index:editIndex,field:'inventoryfrontline'});
|
||||
var inventoryfrontline = $(unit_ed.target).textbox('getValue');
|
||||
var unit_pd = $('#grid').datagrid('getEditor', {index:editIndex,field:'pickingday'});
|
||||
var pickingday = $(unit_pd.target).textbox('getValue');
|
||||
var unit_icp = $('#grid').datagrid('getEditor', {index:editIndex,field:'inventorycountpostpartum'});
|
||||
var inventorycountpostpartum = $(unit_icp.target).textbox('getValue');
|
||||
|
||||
var unit_r = $('#grid').datagrid('getEditor', {index:editIndex,field:'plannedconsumption'});
|
||||
var plannedconsumption = $(unit_r.target).textbox('getValue');
|
||||
$.post(url,{id:id,inventoryfrontline:inventoryfrontline,pickingday:pickingday,
|
||||
inventorycountpostpartum:inventorycountpostpartum,
|
||||
plannedconsumption:plannedconsumption},function(data){
|
||||
if(data.res == '1'){
|
||||
top.$.messager.alert('提示','保存成功','info',function (){
|
||||
$('#grid').datagrid('reload');
|
||||
$('#gridad').datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','保存失败','info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/materialinventory/delete.do', {id : id}, function(data) {
|
||||
if(data>0){
|
||||
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/materialinventory/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() {
|
||||
|
||||
$('#search_code').combobox({
|
||||
url : ext.contextPath + '/process/taskprocedure/getprovedurenamelist.do',
|
||||
valueField:'id',
|
||||
textField:'procedurename',
|
||||
method:'get',
|
||||
onLoadSuccess: function (data) {
|
||||
if (data ==null) {
|
||||
$.messager.alert("系统提示", "数据库异常,请联系管理员!", "warning");
|
||||
} else {
|
||||
var data1 = $('#search_code').combobox('getData'); //赋默认值
|
||||
if (data1.length >0){
|
||||
|
||||
$("#search_code").combobox('select', data1[0].id);
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialinventory/getMaterialInventorys.do',
|
||||
queryParams: {
|
||||
bb:'${procedureidd}',
|
||||
search_code: $('#search_code').combobox('getValue'),
|
||||
},
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
onClickCell: editFun,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '工序名称', field : 'processname', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料单位', field : 'unit', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料代码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '150', title : '盘点日期', field : 'insdt', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
return value.substring(0,19);
|
||||
}},
|
||||
{width : '150', title : '产前线边库存盘点', field : 'inventoryfrontline', sortable : true,editor:'textbox', halign:'center'},
|
||||
{width : '100', title : '当日领料', field : 'pickingday', sortable : true,editor:'textbox',halign:'center'},
|
||||
{width : '100', title : '该工序当日产量', field : 'plannedconsumption', sortable : true,editor:'textbox', halign:'center'},
|
||||
{width : '150', title : '当日产后线边库存盘点', field : 'inventorycountpostpartum', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '100', title : '当日实际消耗量', field : 'actualconsumptionday', sortable : true, halign:'center'},
|
||||
{width : '100', title : '差额', field : 'thedifferent', sortable : true, halign:'center'},
|
||||
{width : '150', title : '差额计划比', field : 'exceedsplannedpercentage', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
if (value > 0.3) {
|
||||
return '<font color="red">' + value + '</font>';
|
||||
}
|
||||
else{
|
||||
return value}
|
||||
}},
|
||||
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="历史" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%-- <%if (sessionManager.havePermission(session,"material/materialbox/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%> --%>
|
||||
<%if (sessionManager.havePermission(session,"material/materialbox/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,row){
|
||||
ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
|
||||
ddv.datagrid({
|
||||
url : ext.contextPath + '/material/materialinventory/getmaterialInventorysorts.do?pid='+row.id,
|
||||
fitColumns:true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
striped: true,
|
||||
idField : 'id',
|
||||
rownumbers:true,
|
||||
//loadMsg:'',
|
||||
height:'auto',
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '工序名称', field : 'processname', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料单位', field : 'unit', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料代码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '150', title : '盘点日期', field : 'insdt', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
return value.substring(0,19);
|
||||
}},
|
||||
{width : '150', title : '产前线边库存盘点', field : 'inventoryfrontline', sortable : true,editor:'textbox', halign:'center'},
|
||||
{width : '100', title : '当日领料', field : 'pickingday', sortable : true,halign:'center'},
|
||||
{width : '100', title : '当日计划消耗量', field : 'plannedconsumption', sortable : true, halign:'center'},
|
||||
{width : '150', title : '当日产后线边库存盘点', field : 'inventorycountpostpartum', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '100', title : '当日实际消耗量', field : 'actualconsumptionday', sortable : true, halign:'center'},
|
||||
{width : '100', title : '差额', field : 'thedifferent', sortable : true, halign:'center'},
|
||||
{width : '150', title : '差额超出预计百分比', field : 'exceedsplannedpercentage', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
if (value > 0.05) {
|
||||
return '<font color="red">' + value + '</font>';
|
||||
}
|
||||
else{
|
||||
return value}
|
||||
}},
|
||||
] ],
|
||||
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/materialbox/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/materialbox/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true"
|
||||
onclick="saveFun();">保存</a>
|
||||
|
||||
</td>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>工序名称</td>
|
||||
<td>
|
||||
<input id="search_code" name="search_code" class="easyui-combobox" style="width:200px" /></td>
|
||||
<td>物料名称</td>
|
||||
<td><input id="search_name" name="search_name" 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>
|
||||
64
bin/WebRoot/jsp/material/materialInventoryView.jsp
Normal file
64
bin/WebRoot/jsp/material/materialInventoryView.jsp
Normal file
@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
$(function() {
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialinventory/getmaterialInventorysorts.do?pid=${pid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '工序名称', field : 'processname', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料单位', field : 'unit', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料代码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '150', title : '盘点日期', field : 'insdt', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
return value.substring(0,19);
|
||||
}},
|
||||
{width : '150', title : '产前线边库存盘点', field : 'inventoryfrontline', sortable : true,editor:'textbox', halign:'center'},
|
||||
{width : '100', title : '当日领料', field : 'pickingday', sortable : true,halign:'center'},
|
||||
{width : '100', title : '当日计划消耗量', field : 'plannedconsumption', sortable : true, halign:'center'},
|
||||
{width : '150', title : '当日产后线边库存盘点', field : 'inventorycountpostpartum', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '100', title : '当日实际消耗量', field : 'actualconsumptionday', sortable : true, halign:'center'},
|
||||
{width : '100', title : '差额', field : 'thedifferent', sortable : true, halign:'center'},
|
||||
{width : '150', title : '差额超出预计百分比', field : 'exceedsplannedpercentage', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
if (value > 0.05) {
|
||||
return '<font color="red">' + value + '</font>';
|
||||
}
|
||||
else{
|
||||
return value}
|
||||
}},
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
},
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
155
bin/WebRoot/jsp/material/materialListForNotBOMSelect.jsp
Normal file
155
bin/WebRoot/jsp/material/materialListForNotBOMSelect.jsp
Normal file
@ -0,0 +1,155 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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">
|
||||
function selectFun() {
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
jsonstr = '{"id":"'+row.id
|
||||
+'","materialcode":"'+row.materialcode
|
||||
+'","materialname":"'+row.materialname
|
||||
+'","unit":"'+row.unit
|
||||
+'","materialmodel":"'+row.materialmodel
|
||||
+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}else{
|
||||
top.$.messager.alert('提示', "请选择要使用的数据!", 'info');
|
||||
}
|
||||
}
|
||||
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialinfo/getmaterialinfos.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '120', title : '物料代码', field : 'materialcode', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '220', title : '物料名称', field : 'materialname', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '220', title : '物料型号', field : 'materialmodel', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '100', title : '物料属性', field : 'materialproperties', sortable : true, align:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '180', title : '辅助属性', field : 'secondaryattribute', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '单位', field : 'unit', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '图号', field : 'drawnum', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
/*{width : '80', title : '图名', field : 'D.docname', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(row.figure!=null){
|
||||
return row.figure.docname;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
|
||||
{width : '100', title : '类型', field : 'materialtype', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value.typename;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},*/
|
||||
{width : '80', title : '良率(%)', field : 'yield', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
<td>物料名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" style="width: 180px;" /></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>
|
||||
57
bin/WebRoot/jsp/material/materialOverneckAdd.jsp
Normal file
57
bin/WebRoot/jsp/material/materialOverneckAdd.jsp
Normal file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialOverneck/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<th >物料代码</th>
|
||||
<td ><input id="materialcode" name="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >物料名称</th>
|
||||
<td ><input id="materialname" name="materialname" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >单位</th>
|
||||
<td ><input id="unit" name="unit" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >数量</th>
|
||||
<td ><input id="num" name="num" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;" value="" /></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
55
bin/WebRoot/jsp/material/materialOverneckEdit.jsp
Normal file
55
bin/WebRoot/jsp/material/materialOverneckEdit.jsp
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialOverneck/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="id" name="id" type="hidden" value="${materialOverneck.id}" />
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th >物料代码</th>
|
||||
<td ><input id="materialcode" name="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;" value="${materialOverneck.materialcode}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >物料名称</th>
|
||||
<td ><input id="materialname" name="materialname" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;" value="${materialOverneck.materialname}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >单位</th>
|
||||
<td ><input id="unit" name="unit" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;" value="${materialOverneck.unit}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >数量</th>
|
||||
<td ><input id="num" name="num" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;" value="${materialOverneck.num}" /></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
195
bin/WebRoot/jsp/material/materialOverneckList.jsp
Normal file
195
bin/WebRoot/jsp/material/materialOverneckList.jsp
Normal file
@ -0,0 +1,195 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加超领单',
|
||||
url : ext.contextPath + '/material/materialOverneck/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看超领单',
|
||||
url : ext.contextPath + '/material/materialOverneck/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑超领单',
|
||||
url : ext.contextPath + '/material/materialOverneck/edit.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/materialOverneck/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/materialOverneck/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({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialOverneck/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '物料代码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
|
||||
{width : '150', title : '超领单产生日期', field : 'picktime', sortable : true,halign:'center',formatter : function(value, row){
|
||||
return value.substring(0,19);
|
||||
} },
|
||||
/* {width : '100', title : '单位', field : 'unit', sortable : true,halign:'center'}, */
|
||||
{width : '150', title : '所需数量', field : 'num', sortable : true,halign:'center'},
|
||||
{width : '150', title : '单位', field : 'unit', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '150', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/materialOverneck/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/materialOverneck/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);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</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/materialOverneck/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/materialOverneck/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
|
||||
<!-- <tr><td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true"
|
||||
onclick="pickingFun();">领(退)料</a>
|
||||
</td></tr>
|
||||
-->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<input name="idStr" type="hidden" />
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>物料名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>物料代码</td>
|
||||
<td><input name="search_code" 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>
|
||||
45
bin/WebRoot/jsp/material/materialOverneckView.jsp
Normal file
45
bin/WebRoot/jsp/material/materialOverneckView.jsp
Normal file
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
|
||||
|
||||
<style>
|
||||
body{ text-align:center}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialOverneck.id}"/>
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td>${materialOverneck.materialcode}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td>${materialOverneck.materialname}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td>${materialOverneck.unit}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>数量</th>
|
||||
<td>${materialOverneck.num}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>超领单生成时间</th>
|
||||
<td>${fn:substring(materialOverneck.picktime,0,19)}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
308
bin/WebRoot/jsp/material/materialPickingList.jsp
Normal file
308
bin/WebRoot/jsp/material/materialPickingList.jsp
Normal file
@ -0,0 +1,308 @@
|
||||
<%@page import="com.sun.rowset.internal.Row"%>
|
||||
<%@ 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>
|
||||
<style>
|
||||
|
||||
.textchoose {
|
||||
position: relative;
|
||||
border: 1px solid #95B8E7;
|
||||
background-color: #46A3FF;
|
||||
color:#FFFFFF;
|
||||
text-align:center;
|
||||
width:100% ;
|
||||
height:100%;
|
||||
line-height:90px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var editIndex = undefined;//当前编辑行索引
|
||||
var flag=false;//当flag为true grid可编辑 为假时不可编辑
|
||||
var editFlag= function(){
|
||||
flag=true;
|
||||
}
|
||||
//编辑行
|
||||
var editFun = function (index, field){
|
||||
if(!endEditing()){
|
||||
return false;
|
||||
}
|
||||
if(flag){
|
||||
editIndex = index;
|
||||
$('#grid').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
|
||||
var ed = $('#grid').datagrid('getEditor', {index:editIndex,field:field});
|
||||
($(ed.target).data('textbox') ? $(ed.target).textbox('textbox') : $(ed.target)).focus();
|
||||
}
|
||||
};
|
||||
function endEditing(){//清除editor
|
||||
if (editIndex == undefined){return true;}
|
||||
if ($('#grid').datagrid('validateRow', editIndex)){
|
||||
$('#grid').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var saveFun = function() {
|
||||
|
||||
if($('#grid').datagrid('getSelected')==null){
|
||||
top.$.messager.alert('提示','请先选择要保存的记录','info');
|
||||
}else{
|
||||
flag=false;
|
||||
var id = $('#grid').datagrid('getSelected').id;
|
||||
var url;
|
||||
|
||||
editIndex = $('#grid').datagrid('getRowIndex',id);
|
||||
url = ext.contextPath + '/material/materialdateschedule/update.do';
|
||||
//判断必输项
|
||||
if(!$('#grid').datagrid('validateRow', editIndex)){
|
||||
top.$.messager.alert('提示','请输入必输项','info');
|
||||
return false;
|
||||
}
|
||||
var unit_ed = $('#grid').datagrid('getEditor', {index:editIndex,field:'num'});
|
||||
var num = $(unit_ed.target).textbox('getValue');
|
||||
var unit_r = $('#grid').datagrid('getEditor', {index:editIndex,field:'remark'});
|
||||
var remark = $(unit_r.target).textbox('getValue');
|
||||
$.post(url,{id:id,num:num,remark:remark},function(data){
|
||||
if(data.res == '1'){
|
||||
top.$.messager.alert('提示','保存成功','info',function (){
|
||||
$('#grid').datagrid('reload');
|
||||
$('#gridad').datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','保存失败','info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
};
|
||||
var pickingFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '领料',
|
||||
url : ext.contextPath + '/material/auxiliarymaterialpicking/picking.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog,grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var rejectFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '退料',
|
||||
url : ext.contextPath + '/material/auxiliarymaterialpicking/reject.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog,grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var num=0;
|
||||
$(function() {
|
||||
|
||||
$('#tasklist').combobox({
|
||||
url : ext.contextPath + '/plan/taskorder/getTaskorder1.do',
|
||||
valueField:'id',
|
||||
textField:'tasklistcode',
|
||||
method:'get',
|
||||
onLoadSuccess: function (data) {
|
||||
if (data ==null) {
|
||||
$.messager.alert("系统提示", "数据库异常,请联系管理员!", "warning");
|
||||
} else {
|
||||
var data1 = $('#tasklist').combobox('getData'); //赋默认值
|
||||
if (data1.length > 0) {
|
||||
$("#tasklist ").combobox('select', data1[0].id);
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
onSelect: function () {
|
||||
$('#workno').combobox({
|
||||
url : ext.contextPath + '/work/workorder/getlistbyplanid.do?taskorderid=' + $('#tasklist').combobox('getValue'),
|
||||
valueField:'id',
|
||||
textField:'workorderno',
|
||||
method:'get',
|
||||
onLoadSuccess: function (data) {
|
||||
if (data ==null) {
|
||||
$.messager.alert("系统提示", "数据库异常,请联系管理员!", "warning");
|
||||
} else {
|
||||
var data1 = $('#workno').combobox('getData'); //赋默认值
|
||||
if (data1.length > 0) {
|
||||
$("#workno ").combobox('select', data1[0].id);
|
||||
grid = $('#grid').datagrid({
|
||||
view: detailview,
|
||||
detailFormatter:function(index,row){
|
||||
return '<div style="padding:2px"><table class="ddv"></table></div>';
|
||||
},
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/auxiliarymaterialpicking/getAuxiliaryMaterialPickings.do',
|
||||
queryParams: {
|
||||
|
||||
workno:$('#workno').combobox('getValue'),
|
||||
},
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
nowrap:false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
onClickCell: editFun,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : 'BOM物料项目', field : 'bomprojects', sortable : true, halign:'center'},
|
||||
{width : '150', title : '数量', field : 'num', sortable : true,editor:'textbox', halign:'center'},
|
||||
{width : '100', title : '单位', field : 'unit', sortable : true,halign:'center'},
|
||||
{width : '100', title : '最后一次领料人', field : 'pickingpeople', sortable : true, halign:'center'},
|
||||
{width : '150', title : '最后一次领料日期', field : 'pickingdate', sortable : true,halign:'center',formatter : function(value, row) {
|
||||
if(value!=null){
|
||||
return value.substring(0,16);
|
||||
}
|
||||
}},
|
||||
{width : '150', title : '领(退)料', field : 'keyword', sortable : true,halign:'center'},
|
||||
{width : '100', title : '备注', field : 'remark', sortable : true,editor:'textbox', halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
|
||||
var str = '';
|
||||
if (row.statusworkorder=="0" ||row.statusworkorder=="1"||row.statusworkorder=="2") {
|
||||
str += '<img class="iconImg ext-icon-table_add" title="领料" onclick="pickingFun(\''+row.id+'\');"/>';
|
||||
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="退料" onclick="rejectFun(\''+row.id+'\');"/>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
//下面的代码可以让字表默认展开
|
||||
/* if(num==0){
|
||||
num=1;
|
||||
grid.datagrid('load',ext.serializeObject($('#searchForm')));//搜索
|
||||
}else{
|
||||
//展开所有的行
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#grid').datagrid('expandRow',i);
|
||||
}
|
||||
} */
|
||||
|
||||
},
|
||||
onExpandRow: function(index,row){
|
||||
ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
|
||||
ddv.datagrid({
|
||||
url : ext.contextPath + '/material/auxiliarymaterialpicking/getAuxiliaryMaterialPickingpids.do?pid='+row.id,
|
||||
fitColumns:true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
striped: true,
|
||||
idField : 'id',
|
||||
rownumbers:true,
|
||||
//loadMsg:'',
|
||||
height:'auto',
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : 'BOM物料项目', field : 'bomprojects', sortable : true, halign:'center'},
|
||||
{width : '150', title : '数量', field : 'num', sortable : true,editor:'textbox', halign:'center'},
|
||||
{width : '100', title : '单位', field : 'unit', sortable : true,halign:'center'},
|
||||
{width : '100', title : '最后一次领料人', field : 'pickingpeople', sortable : true, halign:'center'},
|
||||
{width : '150', title : '最后一次领料日期', field : 'pickingdate', sortable : true,halign:'center',formatter : function(value, row) {
|
||||
if(value!=null){
|
||||
return value.substring(0,16);
|
||||
}
|
||||
}},
|
||||
{width : '150', title : '领(退)料', field : 'keyword', sortable : true,halign:'center'},
|
||||
{width : '100', title : '备注', field : 'remark', sortable : true,editor:'textbox', halign:'center'},
|
||||
] ],
|
||||
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>
|
||||
<form id="searchForm">
|
||||
<table >
|
||||
<tr>
|
||||
<tr>
|
||||
<td>任务单号</td>
|
||||
<td>
|
||||
<input id="tasklist" name="tasklist" class="easyui-combobox" style="width:200px"/></td>
|
||||
<td>工单号</td>
|
||||
<td>
|
||||
<input id="workno" name="workno" class="easyui-combobox" style="width:200px"/></td>
|
||||
<td>领退料日期</td>
|
||||
<td><input id="search_date" name="search_date" class="Wdate" value=""
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" readonly/></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>
|
||||
79
bin/WebRoot/jsp/material/materialTypeAdd.jsp
Normal file
79
bin/WebRoot/jsp/material/materialTypeAdd.jsp
Normal file
@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialtype/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.treegrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$('#pname').combotree({
|
||||
url : ext.contextPath + '/material/materialtype/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onClick : function(node) {
|
||||
$("#parentid").val(node.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料类型</th>
|
||||
<td><input name="typename" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>类型代码</th>
|
||||
<td><input name="typecode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上级物料类型</th>
|
||||
<td>
|
||||
<select id="pname" name="pname" class="easyui-combotree" value="" ></select>
|
||||
<input id="parentid" name="parentid" type="hidden" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="panelHeight:'auto',editable:false">
|
||||
<option value="1" selected >启用</option>
|
||||
<option value="0">禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" style="width:100%;height:100px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
87
bin/WebRoot/jsp/material/materialTypeEdit.jsp
Normal file
87
bin/WebRoot/jsp/material/materialTypeEdit.jsp
Normal file
@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialtype/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.treegrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$('#pname').combotree({
|
||||
url : ext.contextPath + '/material/materialtype/getMenusJsonActive.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
required:true,
|
||||
onClick : function(node) {
|
||||
$("#parentid").val(node.id);
|
||||
},
|
||||
onLoadSuccess: function(node,data){//编辑界面初始化填充,解析树节点
|
||||
var pid='${materialType.parentid}';
|
||||
var t = $('#pname').combotree('tree');
|
||||
var node = t.tree('find', pid);
|
||||
$('#pname').combotree('setValue',node.text);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialType.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料类型</th>
|
||||
<td><input name="typename" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${materialType.typename }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>类型代码</th>
|
||||
<td><input name="typecode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${materialType.typecode }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上级物料类型</th>
|
||||
<td>
|
||||
<select id="pname" name="pname" class="easyui-combotree" value="${materialType.parentid}" ></select>
|
||||
<input id="parentid" name="parentid" type="hidden" value="${materialType.parentid}"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="panelHeight:'auto',editable:false">
|
||||
<option value="1" <c:if test="${materialType.status=='1'}">selected</c:if>>启用</option>
|
||||
<option value="0" <c:if test="${materialType.status=='0'}">selected</c:if>>禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" value="${materialType.remark }" data-options="multiline:true" style="width:100%;height:100px"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
244
bin/WebRoot/jsp/material/materialTypeList.jsp
Normal file
244
bin/WebRoot/jsp/material/materialTypeList.jsp
Normal file
@ -0,0 +1,244 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加物料类型',
|
||||
url : ext.contextPath + '/material/materialtype/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看物料类型',
|
||||
url : ext.contextPath + '/material/materialtype/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑物料类型',
|
||||
url : ext.contextPath + '/material/materialtype/edit.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/materialtype/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info');
|
||||
grid.treegrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var datas = "";
|
||||
$("input:checked").each(function(){
|
||||
var id = $(this).attr("id");
|
||||
if(id.indexOf('check_type')== -1 && id.indexOf("check_")>-1){
|
||||
datas += id.replace("check_",'')+',';
|
||||
}
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/materialtype/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.treegrid('reload');
|
||||
grid.treegrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function check(checkid){
|
||||
var s = '#check_'+checkid;
|
||||
/*选子节点*/
|
||||
var nodes = $("#grid").treegrid("getChildren",checkid);
|
||||
for(i=0;i<nodes.length;i++){
|
||||
$(('#check_'+nodes[i].id))[0].checked = $(s)[0].checked;
|
||||
|
||||
}
|
||||
//选上级节点
|
||||
if(!$(s)[0].checked){
|
||||
var parent = $("#grid").treegrid("getParent",checkid);
|
||||
$(('#check_'+parent.id))[0].checked = false;
|
||||
while(parent){
|
||||
parent = $("#grid").treegrid("getParent",parent.id);
|
||||
$(('#check_'+parent.id))[0].checked = false;
|
||||
}
|
||||
}else{
|
||||
var parent = $("#grid").treegrid("getParent",checkid);
|
||||
var flag= true;
|
||||
var sons = parent.sondata.split(',');
|
||||
for(j=0;j<sons.length;j++){
|
||||
if(!$(('#check_'+sons[j]))[0].checked){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(flag)
|
||||
$(('#check_'+parent.id))[0].checked = true;
|
||||
while(flag){
|
||||
parent = $("#grid").treegrid("getParent",parent.id);
|
||||
if(parent){
|
||||
sons = parent.sondata.split(',');
|
||||
for(j=0;j<sons.length;j++){
|
||||
if(!$(('#check_'+sons[j]))[0].checked){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(flag)
|
||||
$(('#check_'+parent.id))[0].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').treegrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialtype/getMaterialTypes.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
treeField: 'typename',
|
||||
pagination : true,
|
||||
pageSize : 20,
|
||||
pageList : [20, 50, 100],
|
||||
columns : [ [
|
||||
{ field : 'ck',formatter:function(val,row,index){
|
||||
return '<input type="checkbox" onclick=check("'+row.id+'") id="check_'+row.id+'" (row.checked?"checked":"") />';
|
||||
}
|
||||
},
|
||||
{width : '150', title : '物料类型', field : 'typename', sortable : true, align:'left',halign:'center'},
|
||||
{width : '100', title : '类型代码', field : 'typecode', sortable : true, align:'center',halign:'center'},
|
||||
{width : '100', title : '状态', field : 'status', sortable : true, align:'center',halign:'center', formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '禁用';
|
||||
case '1':
|
||||
return '启用';
|
||||
}
|
||||
}},
|
||||
{width : '500', title : '备注', field : 'remark', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/materialtype/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/materialtype/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
loadFilter: function (data){
|
||||
resultData = data;
|
||||
$.each(data.rows, function(i) {
|
||||
var parentId = data.rows[i].parentid;
|
||||
if(parentId!='-1'){
|
||||
data.rows[i]._parentId = parentId;
|
||||
}else{
|
||||
data.rows[i]._parentId =undefined;
|
||||
}
|
||||
});
|
||||
return data;
|
||||
},
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(row,data) {
|
||||
$('.iconImg').attr('src', ext.pixel_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/materialtype/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/materialtype/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>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>物料类型</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>类型代码</td>
|
||||
<td><input name="search_code" class="easyui-textbox" /></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.treegrid('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.treegrid('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>
|
||||
180
bin/WebRoot/jsp/material/materialTypeList_backup.jsp
Normal file
180
bin/WebRoot/jsp/material/materialTypeList_backup.jsp
Normal file
@ -0,0 +1,180 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加物料类型',
|
||||
url : ext.contextPath + '/material/materialtype/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看物料类型',
|
||||
url : ext.contextPath + '/material/materialtype/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑物料类型',
|
||||
url : ext.contextPath + '/material/materialtype/edit.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/materialtype/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/materialtype/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({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialtype/getMaterialTypes.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '物料类型', field : 'typename', sortable : true, align:'center',halign:'center'},
|
||||
{width : '100', title : '类型代码', field : 'typecode', sortable : true, align:'center',halign:'center'},
|
||||
{width : '100', title : '状态', field : 'status', sortable : true, align:'center',halign:'center', formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '禁用';
|
||||
case '1':
|
||||
return '启用';
|
||||
}
|
||||
}},
|
||||
{width : '500', title : '备注', field : 'remark', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/materialtype/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/materialtype/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);
|
||||
}
|
||||
});
|
||||
});
|
||||
</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/materialtype/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/materialtype/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>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>物料类型</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>类型代码</td>
|
||||
<td><input name="search_code" 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>
|
||||
44
bin/WebRoot/jsp/material/materialTypeView.jsp
Normal file
44
bin/WebRoot/jsp/material/materialTypeView.jsp
Normal file
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialType.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料类型</th>
|
||||
<td>${materialType.typename }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>类型代码</th>
|
||||
<td>${materialType.typecode }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上级物料类型</th>
|
||||
<td>
|
||||
${parentType.typename }
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<c:if test="${materialType.status=='1'}">启用</c:if>
|
||||
<c:if test="${materialType.status=='0'}">禁用</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>${materialType.remark }</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
55
bin/WebRoot/jsp/material/materialUnitAdd.jsp
Normal file
55
bin/WebRoot/jsp/material/materialUnitAdd.jsp
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialunit/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td><input name="unit" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="panelHeight:'auto',editable:false">
|
||||
<option value="1" selected >启用</option>
|
||||
<option value="0">禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" style="width:100%;height:100px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
57
bin/WebRoot/jsp/material/materialUnitEdit.jsp
Normal file
57
bin/WebRoot/jsp/material/materialUnitEdit.jsp
Normal file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialunit/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialUnit.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td><input name="unit" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${materialUnit.unit }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<select name="status" class="easyui-combobox" data-options="panelHeight:'auto',editable:false">
|
||||
<option value="1" <c:if test="${materialUnit.status=='1'}">selected</c:if>>启用</option>
|
||||
<option value="0" <c:if test="${materialUnit.status=='0'}">selected</c:if>>禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" value="${materialUnit.remark }" data-options="multiline:true" style="width:100%;height:100px"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
176
bin/WebRoot/jsp/material/materialUnitList.jsp
Normal file
176
bin/WebRoot/jsp/material/materialUnitList.jsp
Normal file
@ -0,0 +1,176 @@
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加单位信息',
|
||||
url : ext.contextPath + '/material/materialunit/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看单位信息',
|
||||
url : ext.contextPath + '/material/materialunit/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑单位信息',
|
||||
url : ext.contextPath + '/material/materialunit/edit.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/materialunit/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/materialunit/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({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialunit/getMaterialUnits.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '单位', field : 'unit', sortable : true, align:'center',halign:'center'},
|
||||
{width : '100', title : '状态', field : 'status', sortable : true, align:'center',halign:'center', formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '禁用';
|
||||
case '1':
|
||||
return '启用';
|
||||
}
|
||||
}},
|
||||
{width : '500', title : '备注', field : 'remark', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/materialunit/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"material/materialunit/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);
|
||||
}
|
||||
});
|
||||
});
|
||||
</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/materialunit/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/materialunit/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>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>单位名称</td>
|
||||
<td><input name="search_name" 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>
|
||||
47
bin/WebRoot/jsp/material/materialUnitView.jsp
Normal file
47
bin/WebRoot/jsp/material/materialUnitView.jsp
Normal file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
// $('#role').combobox({
|
||||
// url:ext.contextPath + '/user/getJsonRole.do',
|
||||
// valueField:'id',
|
||||
// textField:'name',
|
||||
// required:true,validType:'isBlank',
|
||||
// multiple:true,
|
||||
// editable:false
|
||||
// });
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialUnit.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td>${materialUnit.unit }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<td>
|
||||
<c:if test="${materialUnit.status=='1'}">启用</c:if>
|
||||
<c:if test="${materialUnit.status=='0'}">禁用</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
${materialUnit.remark }
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
73
bin/WebRoot/jsp/material/materialapplicationEdit.jsp
Normal file
73
bin/WebRoot/jsp/material/materialapplicationEdit.jsp
Normal file
@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialapplication/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialApplication.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>任务单编号</th>
|
||||
<td> ${materialApplication.taskorder.tasklistcode }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工单编号</th>
|
||||
<td>${materialApplication.workOrder.workorderno }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品名称</th>
|
||||
<td><input id="bomname" name="bomname" class="easyui-textbox" value="${materialApplication.bomname }" readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工单编号</th>
|
||||
<td>${fn:substring(materialApplication.workOrder.stdt,0,10)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td><input id="materialcode" name="materialcode" class="easyui-textbox" value="${materialApplication.materialcode }" data-options="required:true,validType:'isBlank'" readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td><input id="materialname" name="materialname" class="easyui-textbox" value="${materialApplication.materialname }" readonly /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当前库存</th>
|
||||
<td><input id="currentinventory" name="currentinventory" class="easyui-textbox" value="${materialApplication.currentinventory}" ></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料需求</th>
|
||||
<td><input id="materialrequest" name="materialrequest" class="easyui-textbox" value="${materialApplication.materialrequest }" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>补料数量</th>
|
||||
<td><input id="supplymaterial" name="supplymaterial" class="easyui-textbox" value="${materialApplication.supplymaterial }" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
105
bin/WebRoot/jsp/material/materialbomAdd.jsp
Normal file
105
bin/WebRoot/jsp/material/materialbomAdd.jsp
Normal file
@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialbom/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectMaterial(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择材料',
|
||||
width : 800,
|
||||
height : 400,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/selectMaterial.do?typename='+encodeURI(encodeURI('成品')),
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#materialcode").textbox('setValue',(res.materialcode == 'undefined')?'':res.materialcode);
|
||||
$("#materialname").textbox('setValue',(res.materialname == 'undefined')?'':res.materialname);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#materialcode").textbox('textbox').bind("click", function () {
|
||||
selectMaterial();
|
||||
});
|
||||
$('#unit').combobox({
|
||||
url:ext.contextPath + '/material/materialunit/getJsonUnit.do',
|
||||
valueField:'unit',
|
||||
textField:'unit',
|
||||
editable:false,
|
||||
panelHeight:'auto'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" id="pid" name="pid" value="-1" />
|
||||
<input type="hidden" id="num" name="num" value="1" />
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
<td><input id="materialcode" name="materialcode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td><input id="materialname" name="materialname" class="easyui-textbox"
|
||||
readonly="readonly" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td>
|
||||
<input id="unit" name="unit" class="easyui-combobox" value="" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<td><input id="ordernumber" name="ordernumber" class="easyui-numberbox"
|
||||
data-options="required:true,validType:'isBlank'" value="0" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>版本</th>
|
||||
<td><input id="version" name="version" class="easyui-numberbox"
|
||||
data-options="" value="0" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<input name="remark" class="easyui-textbox" style="width:100%;height:100px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
298
bin/WebRoot/jsp/material/materialbomEdit.jsp
Normal file
298
bin/WebRoot/jsp/material/materialbomEdit.jsp
Normal file
@ -0,0 +1,298 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var editIndex = undefined;//当前编辑行索引
|
||||
|
||||
$(function() {
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialbom/getBOMDetailsJson.do?pid=${materialBOM.id}',
|
||||
|
||||
onClickCell: editFun,
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
selectOnCheck: true,
|
||||
columns : [ [
|
||||
// {width : '60', title : '序号', field : 'ordernumber', sortable : true, editor:'textbox',halign:'center',align:'center'},
|
||||
// {width : '80', title : '层次', field : 'levels', halign:'center',align:'left'},
|
||||
{width : '200', title : '物料代码', field : 'materialcode', sortable : true, halign:'center',align:'left'},
|
||||
{width : '220', title : '物料名称', field : 'materialname', sortable : true, halign:'center',align:'left'},
|
||||
{width : '80', title : '良率', field : 'yield', sortable : true, halign:'center',align:'left'},
|
||||
{width : '80', title : '基本单位用量', field : 'unituse', sortable : true, editor:'textbox',halign:'center',align:'center'},
|
||||
{width : '80', title : '单位', field : 'unit', sortable : true, align:'center',halign:'center'},
|
||||
] ],
|
||||
toolbar : '#toolbar'
|
||||
});
|
||||
});
|
||||
|
||||
function endEditing(){//清除editor
|
||||
if (editIndex == undefined){return true;}
|
||||
if ($('#grid').datagrid('validateRow', editIndex)){
|
||||
$('#grid').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//新增行
|
||||
var addFun = function() {
|
||||
if(!endEditing()){
|
||||
return false;
|
||||
}
|
||||
|
||||
editIndex = 0;//设置当前编辑行
|
||||
|
||||
if($('#grid').datagrid('getRows')[editIndex]==undefined){//如果一行都不存在
|
||||
$('#grid').datagrid('insertRow', {index: editIndex,row: {materialcode:'onClick:function (){alert("test")}',materialpcode:'${materialInfo.materialcode}'}});
|
||||
}else{
|
||||
if($('#grid').datagrid('getRows')[editIndex]['id']!=undefined){//判断是否已经存在未保存的新增行
|
||||
$('#grid').datagrid('insertRow', {index: editIndex,row: {materialpcode:'${materialInfo.materialcode}'}});
|
||||
}
|
||||
}
|
||||
|
||||
$('#grid').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
|
||||
var ed = $('#grid').datagrid('getEditor', {index:editIndex,field:'name'});
|
||||
($(ed.target).data('textbox') ? $(ed.target).textbox('textbox') : $(ed.target)).focus();
|
||||
|
||||
};
|
||||
//编辑行
|
||||
var editFun = function (index, field){
|
||||
if(!endEditing()){
|
||||
return false;
|
||||
}
|
||||
|
||||
editIndex = index;
|
||||
$('#grid').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
|
||||
var ed = $('#grid').datagrid('getEditor', {index:editIndex,field:field});
|
||||
($(ed.target).data('textbox') ? $(ed.target).textbox('textbox') : $(ed.target)).focus();
|
||||
};
|
||||
//保存行
|
||||
var saveFun = function() {
|
||||
|
||||
if($('#grid').datagrid('getSelected')==null){
|
||||
top.$.messager.alert('提示','请先选择要保存的记录','info');
|
||||
}else{
|
||||
var id = $('#grid').datagrid('getSelected').id;
|
||||
var url;
|
||||
/*if(id==undefined){//新增
|
||||
editIndex = $('#grid').datagrid('getRowIndex');
|
||||
url = ext.contextPath + '/material/materialAllbom/save.do';
|
||||
}else{//编辑
|
||||
editIndex = $('#grid').datagrid('getRowIndex',id);
|
||||
url = ext.contextPath + '/material/materialAllbom/update.do';
|
||||
}*/
|
||||
editIndex = $('#grid').datagrid('getRowIndex',id);
|
||||
url = ext.contextPath + '/material/materialbom/updatepid.do';
|
||||
//判断必输项
|
||||
if(!$('#grid').datagrid('validateRow', editIndex)){
|
||||
top.$.messager.alert('提示','请输入必输项','info');
|
||||
return false;
|
||||
}
|
||||
//获取数据
|
||||
//var ordernumber_ed = $('#grid').datagrid('getEditor', {index:editIndex,field:'ordernumber'});
|
||||
//var ordernumber = $(ordernumber_ed.target).textbox('getValue');
|
||||
//var materialcode_ed = $('#grid').datagrid('getEditor', {index:editIndex,field:'materialcode'});
|
||||
//var materialcode = $(materialcode_ed.target).textbox('getValue');
|
||||
|
||||
var unit_ed = $('#grid').datagrid('getEditor', {index:editIndex,field:'unituse'});
|
||||
var unituse = $(unit_ed.target).textbox('getValue');
|
||||
|
||||
$.post(url,{id:id,unituse:unituse},function(data){
|
||||
if(data.res == '1'){
|
||||
top.$.messager.alert('提示','保存成功','info',function (){
|
||||
$('#grid').datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','保存失败','info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
};
|
||||
//删除行
|
||||
var deleteFun = function() {
|
||||
if($('#grid').datagrid('getSelected')==null){
|
||||
top.$.messager.alert('提示','请先选择要删除的记录','info');
|
||||
}else{
|
||||
var id = $('#grid').datagrid('getSelected').id;
|
||||
if(id==undefined){//未经保存的数据
|
||||
top.$.messager.confirm('提示', '确定删除此记录?', function(r) {
|
||||
if (r) {
|
||||
editIndex = $('#grid').datagrid('getRowIndex');
|
||||
$('#grid').datagrid('cancelEdit', editIndex).datagrid('deleteRow', editIndex);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '确定删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/materialbom/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
$('#grid').datagrid('cancelEdit', editIndex).datagrid('deleteRow', editIndex);
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function selectMaterials(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择材料',
|
||||
width : 800,
|
||||
height : 400,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/selectMaterials.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
var materialcode = (res.materialcode == 'undefined')?'':res.materialcode;
|
||||
var pid = '${materialBOM.id}';
|
||||
|
||||
$.post(ext.contextPath + '/material/materialbom/initsave.do',{pid:pid,materialcode:materialcode},function(data){
|
||||
if(data.res > 0){
|
||||
top.$.messager.alert('提示','保存成功','info',function (){
|
||||
$('#grid').datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','保存失败','info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
function selectBOMs(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择成品',
|
||||
width : 800,
|
||||
height : 400,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialbom/selectBOMs.do?id=${materialBOM.id}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
var bomid = (res.bomid == 'undefined')?'':res.bomid;
|
||||
var pid = '${materialBOM.id}';
|
||||
|
||||
$.post(ext.contextPath + '/material/materialbom/initbomsave.do',{pid:pid,bomid:bomid},function(data){
|
||||
if(data.res > 0){
|
||||
top.$.messager.alert('提示','保存成功','info',function (){
|
||||
$('#grid').datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','保存失败','info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
function doupdate() {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialbom/update.do", $(".form").serialize(), function(result) {
|
||||
if(result.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info');
|
||||
}else if(result.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', result.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="tt">
|
||||
<a href="javascript:void(0)" class="icon-save" title="保存" onclick="doupdate()"></a>
|
||||
</div>
|
||||
<div class="easyui-panel" title="BOM信息" style="padding:10px;"
|
||||
data-options="tools:'#tt'">
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialBOM.id }"/>
|
||||
<input type="hidden" id="num" name="num" value="${materialBOM.num }" />
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td>${materialBOM.materialcode }</td>
|
||||
<th>物料名称</th>
|
||||
<td>${materialBOM.materialname }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>规格型号</th>
|
||||
<td>${materialBOM.materialmodel }</td>
|
||||
<th>版本</th>
|
||||
<td>${materialBOM.version }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td colspan="3">
|
||||
<input name="remark" class="easyui-textbox" value="${materialBOM.remark }" validtype="length[0,250]" invalidMessage="有效长度0-250"
|
||||
data-options="multiline:true" style="width:100%;height:100px"/>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="easyui-panel" title="物料清单">
|
||||
<div id="toolbar">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true"
|
||||
onclick="saveFun();">保存</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="border:false">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
256
bin/WebRoot/jsp/material/materialbomList.jsp
Normal file
256
bin/WebRoot/jsp/material/materialbomList.jsp
Normal file
@ -0,0 +1,256 @@
|
||||
<%@page import="com.sun.rowset.internal.Row"%>
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加BOM信息',
|
||||
url : ext.contextPath + '/material/materialbom/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
width:850,
|
||||
height:600,
|
||||
title : '查看BOM信息',
|
||||
url : ext.contextPath + '/material/materialbom/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '配置BOM信息',
|
||||
url : ext.contextPath + '/material/materialbom/edit.do?id=' + id,
|
||||
onClose : function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/materialbom/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/materialbom/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');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var downFun = function() {
|
||||
$.post(ext.contextPath + '/material/materialbom/ERPsynchronousbom.do', function(data) {
|
||||
if(JSON.parse(data).tot==1){
|
||||
parent.$.messager.alert('提示','bom同步成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','未同步成功的'+JSON.parse(data).suc+'请手动同步','info');
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var importFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择文件',
|
||||
width: 600,
|
||||
height:300,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/doimport.do',
|
||||
buttons : [ {
|
||||
text : '导入数据',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doimport(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var importERPFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择任务',
|
||||
width: 1100,
|
||||
height:600,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/plan/taskorder/doimporterpbom.do',
|
||||
buttons : [ {
|
||||
text : '导入数据',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
|
||||
}
|
||||
} ]
|
||||
});
|
||||
grid.datagrid('reload');
|
||||
};
|
||||
var exportsFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要导出的BOM','info');
|
||||
}else{
|
||||
//通过response导出,用户自己选择路径
|
||||
searchForm.idStr.value=datas;
|
||||
searchForm.action = ext.contextPath + '/material/materialbom/exportByResponse.do';
|
||||
searchForm.submit();
|
||||
var win = $.messager.progress({
|
||||
title:'提示',
|
||||
msg:'文件正在导出,请稍后...'
|
||||
});
|
||||
setTimeout(function(){
|
||||
$.messager.progress('close');
|
||||
},3000);
|
||||
}
|
||||
};
|
||||
$(function() {
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialbom/getMaterialBOMs.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
/* {width : '80', title : '序号', field : 'ordernumber', sortable : true, align:'center', halign:'center'}, */
|
||||
{width : '120', title : '物料代码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '220', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '220', title : '物料型号', field : 'materialmodel', sortable : true, halign:'center'},
|
||||
{width : '180', title : '插入时间', field : 'insdt', sortable : true, align:'center', halign:'center',formatter :function(value, row) {
|
||||
if(value!=null){
|
||||
return value.substring(0,19);
|
||||
}
|
||||
}},
|
||||
{width : '50', title : '单位', field : 'unit', sortable : true, align:'center', halign:'center'},
|
||||
{width : '80', title : '版本', field : 'version', sortable : true, align:'center', halign:'center'},
|
||||
|
||||
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%-- <%if (sessionManager.havePermission(session,"material/materialbom/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="配置" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%> --%>
|
||||
<%if (sessionManager.havePermission(session,"material/materialbom/delete.do")) {%>
|
||||
/* if(row.state != "使用"){
|
||||
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);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
|
||||
<div id="toolbar" style="display: none;">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<tr>
|
||||
<%-- <%if (sessionManager.havePermission(session,"material/materialbom/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%> --%>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_save',plain:true" onclick="importERPFun();">任务单ERP同步</a></td>
|
||||
<!-- <td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_save',plain:true" onclick="downFun();">ERP同步</a></td> -->
|
||||
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true" onclick="importFun();">导入</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_name" class="easyui-textbox" /></td>
|
||||
<td>物料代码</td>
|
||||
<td><input name="search_code" 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>
|
||||
230
bin/WebRoot/jsp/material/materialbomList2.jsp
Normal file
230
bin/WebRoot/jsp/material/materialbomList2.jsp
Normal file
@ -0,0 +1,230 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ 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 addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加BOM信息',
|
||||
url : ext.contextPath + '/material/materialbom/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看BOM信息',
|
||||
url : ext.contextPath + '/material/materialbom/view.do?id=' + id
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '配置BOM信息',
|
||||
url : ext.contextPath + '/material/materialbom/edit.do?id=' + id,
|
||||
onClose : function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/materialbom/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+",";
|
||||
});
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/material/materialbom/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');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var downFun = function() {
|
||||
searchForm.action = ext.contextPath + '/material/materialbom/downtemplate.do';
|
||||
searchForm.submit();
|
||||
};
|
||||
|
||||
var importFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择文件',
|
||||
width: 600,
|
||||
height:300,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialbom/doimport.do',
|
||||
buttons : [ {
|
||||
text : '导入数据',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doimport(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
var exportsFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要导出的BOM','info');
|
||||
}else{
|
||||
//通过response导出,用户自己选择路径
|
||||
searchForm.idStr.value=datas;
|
||||
searchForm.action = ext.contextPath + '/material/materialbom/exportByResponse.do';
|
||||
searchForm.submit();
|
||||
var win = $.messager.progress({
|
||||
title:'提示',
|
||||
msg:'文件正在导出,请稍后...'
|
||||
});
|
||||
setTimeout(function(){
|
||||
$.messager.progress('close');
|
||||
},3000);
|
||||
}
|
||||
};
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialbom/getallmBOMs.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
/* {width : '80', title : '序号', field : 'ordernumber', sortable : true, align:'center', halign:'center'}, */
|
||||
{width : '200', title : '物料编码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '380', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '50', title : '单位', field : 'unit', sortable : true, align:'center', halign:'center'},
|
||||
{width : '80', title : '版本', field : 'version', sortable : true, align:'center', halign:'center'},
|
||||
{width : '280', title : '备注', field : 'remark', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/>';
|
||||
<%if (sessionManager.havePermission(session,"material/materialbom/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="配置" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '.toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
tree = $('#materialBOMTree').tree({
|
||||
url : ext.contextPath + '/material/materialbom/getBomTreeJson2.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
dnd:false,
|
||||
onClick : function(node){
|
||||
if(node.id != ''&& node.id != null&&node.id!='1'){
|
||||
$("#bomnodeid").val(node.attributes.materialcode);
|
||||
grid.datagrid('load',ext.serializeObject($('#searchForm')));
|
||||
}else{
|
||||
$("#bomnodeid").val('');
|
||||
grid.datagrid('load',ext.serializeObject($('#searchForm')));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="cc" class="easyui-layout" data-options="fit:true,border:false" >
|
||||
<div data-options="region:'north',collapsed:true,title:'搜索'" style="height:80px;background-color:#eeeeee">
|
||||
<!-- <div style="display: none;height:70px;"> -->
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<input id="bomnodeid" name="bomnodeid" type="hidden" value=""/>
|
||||
<table>
|
||||
<tr>
|
||||
<td>物料名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>物料编码</td>
|
||||
<td><input name="search_code" 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>
|
||||
<div data-options="region:'west',collapsed:true,split:false,title:'物料资料'" style="width:20%;padding:0;">
|
||||
<div>
|
||||
<ul id="materialBOMTree" class="easyui-tree" data-options="method:'get',animate:true"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-options="region:'center',title:'物料BOM内容'" style="padding:0px;" >
|
||||
<div id="dlg-toolbar" class="toolbar" style="background-color:#eeeeee">
|
||||
<%if (sessionManager.havePermission(session,"material/materialbom/add.do")) {%>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
<%}%>
|
||||
<div class="datagrid-btn-separator"></div>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_save',plain:true" onclick="downFun();">模版下载</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true" onclick="importFun();">导入</a>
|
||||
<!-- <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_go',plain:true" onclick="exportsFun();">导出</a> -->
|
||||
</div>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
73
bin/WebRoot/jsp/material/materialbomView.jsp
Normal file
73
bin/WebRoot/jsp/material/materialbomView.jsp
Normal file
@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').treegrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialbom/getBOMDetailsTree.do?pid=${materialBOM.id}',
|
||||
striped : true,
|
||||
rownumbers: true,
|
||||
collapsible:true,
|
||||
showFooter:true,
|
||||
idField : 'id',
|
||||
treeField: 'materialcode',
|
||||
columns : [ [
|
||||
|
||||
{width : '260', title : '物料代码', field : 'materialcode', halign:'center',halign:'center'},
|
||||
|
||||
{width : '220', title : '物料名称', field : 'materialname', halign:'center',halign:'center'},
|
||||
{width : '125', title : '基本单位用量', field : 'unituse', halign:'center'},
|
||||
{width : '80', title : '良率', field : 'yield', sortable : true, halign:'center',align:'left'},
|
||||
{width : '50', title : '单位', field : 'unit', halign:'center',align:'center'}
|
||||
] ],
|
||||
onLoadError : function(arguments){
|
||||
alert();
|
||||
console.info(arguments);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="easyui-panel" title="BOM信息" style="padding:10px;"
|
||||
data-options="tools:'#tt'">
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${materialBOM.id }"/>
|
||||
<input type="hidden" id="num" name="num" value="${materialBOM.num }" />
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td>${materialBOM.materialcode }</td>
|
||||
<th>物料名称</th>
|
||||
<td>${materialBOM.materialname }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>规格型号</th>
|
||||
<td>${materialBOM.materialmodel }</td>
|
||||
<th>版本</th>
|
||||
<td>${materialBOM.version }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td colspan="3">
|
||||
<input name="remark" class="easyui-textbox" value="${materialBOM.remark }" validtype="length[0,250]" invalidMessage="有效长度0-250"
|
||||
data-options="multiline:true" style="width:100%;height:100px"/>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="easyui-panel" title="物料清单">
|
||||
<div>
|
||||
<table id="grid" data-options="border:false" class="easyui-treegrid"></table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
115
bin/WebRoot/jsp/material/materialofNotBOMForSelect.jsp
Normal file
115
bin/WebRoot/jsp/material/materialofNotBOMForSelect.jsp
Normal file
@ -0,0 +1,115 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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">
|
||||
function selectFun() {
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
jsonstr = '{"id":"'+row.id
|
||||
+'","materialcode":"'+row.materialcode
|
||||
+'","materialname":"'+row.materialname
|
||||
+'","unit":"'+row.unit
|
||||
+'","materialmodel":"'+row.materialmodel
|
||||
+'","materialid":"'+row.materialid
|
||||
+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}else{
|
||||
top.$.messager.alert('提示', "请选择要使用的数据!", 'info');
|
||||
}
|
||||
}
|
||||
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/NotBOM/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '120', title : '物料代码', field : 'materialcode', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '220', title : '物料名称', field : 'materialname', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '220', title : '物料型号', field : 'materialmodel', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '单位', field : 'unit', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '150', title : '线边库存', field : 'inventoryFrontLine', sortable : true,halign:'center'},
|
||||
{width : '150', title : '仓库库存', field : 'warehousestocknum', sortable : true,editor:'textbox', halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
<td>物料名称</td>
|
||||
<td><input name="search_materialname" class="easyui-textbox" style="width: 180px;" /></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>
|
||||
179
bin/WebRoot/jsp/material/materialrequisitionAdd.jsp
Normal file
179
bin/WebRoot/jsp/material/materialrequisitionAdd.jsp
Normal file
@ -0,0 +1,179 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialrequisition/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectWorkstation(workstationno,workstationid){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择工位',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/workstation/showlistForSelect.do',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+workstationno).textbox("setValue",res.serial);
|
||||
$("#"+workstationid).val(res.id);
|
||||
$("#workstationname").html(res.name);
|
||||
$("#workstationshop").html(res.deptname);
|
||||
$("#workstationline").html(res.linename);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
function selectMaterial(materialcode,materialid){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择物料',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/selectMaterial.do',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+materialcode).textbox("setValue",res.materialcode);
|
||||
$("#"+materialid).val(res.materialid);
|
||||
$("#materialname").html(res.materialname);
|
||||
$("#materialspec").html(res.spec);
|
||||
$("#materialunit").html(res.unit);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
//dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<input id="status" name="status" type="hidden" value="0" />
|
||||
<tr>
|
||||
<th >单号</th>
|
||||
<td ><input id="orderno" name="orderno" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;" value="${orderno}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >工位编号</th>
|
||||
<td >
|
||||
<input id="workstationno" name="workstationno" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/>
|
||||
<input id="workstationid" name="workstationid" type="hidden" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#workstationno").textbox('textbox').bind("click", function () {
|
||||
selectWorkstation("workstationno","workstationid");
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<tr>
|
||||
<th >工位名称</th>
|
||||
<td ><span id="workstationname"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >所属车间</th>
|
||||
<td ><span id="workstationshop"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >所属产线</th>
|
||||
<td ><span id="workstationline"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >物料编码</th>
|
||||
<td >
|
||||
<input id="materialcode" name="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/>
|
||||
<input id="materialid" name="materialid" type="hidden" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#materialcode").textbox('textbox').bind("click", function () {
|
||||
selectMaterial("materialcode","materialid");
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<tr>
|
||||
<th >物料名称</th>
|
||||
<td ><span id="materialname"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >物料规格</th>
|
||||
<td ><span id="materialspec"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >物料单位</th>
|
||||
<td ><span id="materialunit"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >申领物料数量</th>
|
||||
<td >
|
||||
<input id="quantity" name="quantity" class="easyui-numberspinner" data-options="min:1,max:999,required:true,validType:'isBlank',prompt:'1-999'" style="width:130px;" value='1'></input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >要求发料日期</th>
|
||||
<td ><input id="requestsenddate" name="requestsenddate" class="Wdate" value="${fn:substring(nowdate,0,16) }" data-options="required:true,validType:'isBlank'"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'%y-%M-%d'})"
|
||||
readonly></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
180
bin/WebRoot/jsp/material/materialrequisitionEdit.jsp
Normal file
180
bin/WebRoot/jsp/material/materialrequisitionEdit.jsp
Normal file
@ -0,0 +1,180 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/material/materialrequisition/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectWorkstation(workstationno,workstationid){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择工位',
|
||||
width: 600,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/workstation/showlistForSelect.do',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+workstationno).textbox("setValue",res.serial);
|
||||
$("#"+workstationid).val(res.id);
|
||||
$("#workstationname").html(res.name);
|
||||
$("#workstationshop").html(res.deptname);
|
||||
$("#workstationline").html(res.linename);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
function selectMaterial(materialcode,materialid){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择物料',
|
||||
width: 600,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/selectMaterial.do',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+materialcode).textbox("setValue",res.materialcode);
|
||||
$("#"+materialid).val(res.materialid);
|
||||
$("#materialname").html(res.materialname);
|
||||
$("#materialspec").html(res.spec);
|
||||
$("#materialunit").html(res.unit);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
//dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<input id="id" name="id" type="hidden" value="${materialrequisition.id}" />
|
||||
<tr>
|
||||
<th >单号</th>
|
||||
<td ><input id="orderno" name="orderno" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;" value="${materialrequisition.orderno}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >工位编号</th>
|
||||
<td >
|
||||
<input id="workstationno" name="workstationno" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="${materialrequisition.workstation.serial}" readonly/>
|
||||
<input id="workstationid" name="workstationid" type="hidden" value="${materialrequisition.workstation.id}" />
|
||||
</td>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#workstationno").textbox('textbox').bind("click", function () {
|
||||
selectWorkstation("workstationno","workstationid");
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<tr>
|
||||
<th >工位名称</th>
|
||||
<td ><span id="workstationname">${materialrequisition.workstation.name}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >所属车间</th>
|
||||
<td ><span id="workstationshop">${materialrequisition.workstation.linename}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >所属产线</th>
|
||||
<td ><span id="workstationline">${materialrequisition.workstation.deptname}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >物料编码</th>
|
||||
<td >
|
||||
<input id="materialcode" name="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="${materialrequisition.materialinfo.materialcode}" readonly/>
|
||||
<input id="materialid" name="materialid" type="hidden" value="${materialrequisition.materialinfo.id}" />
|
||||
</td>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#materialcode").textbox('textbox').bind("click", function () {
|
||||
selectMaterial("materialcode","materialid");
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<tr>
|
||||
<th >物料名称</th>
|
||||
<td ><span id="materialname">${materialrequisition.materialinfo.materialname}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >物料规格</th>
|
||||
<td ><span id="materialspec">${materialrequisition.materialinfo.spec}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >物料单位</th>
|
||||
<td ><span id="materialunit">${materialrequisition.materialinfo.unit}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >申领物料数量</th>
|
||||
<td >
|
||||
<input id="quantity" name="quantity" class="easyui-numberspinner" data-options="min:1,max:999,required:true,validType:'isBlank',prompt:'1-999'" style="width:130px;" value='${materialrequisition.quantity}'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >要求发料日期</th>
|
||||
<td ><input id="requestsenddate" name="requestsenddate" class="Wdate" data-options="required:true,validType:'isBlank'"
|
||||
value="${fn:substring(materialrequisition.requestsenddate,0,16)}"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'%y-%M-%d'})"
|
||||
readonly></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user