210 lines
6.6 KiB
Plaintext
210 lines
6.6 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.sipai.tools.SessionManager"%>
|
|
<%
|
|
SessionManager sessionManager = new SessionManager();
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title></title>
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
|
<style>
|
|
|
|
|
|
</style>
|
|
<script type="text/javascript">
|
|
var grid;
|
|
var addFun = function() {
|
|
var dialog = parent.ext.modalDialog({
|
|
title : '领(退)料',
|
|
url : ext.contextPath + '/material/NotBOMPick/picking.do',
|
|
buttons : [ {
|
|
text : '提交',
|
|
handler : function() {
|
|
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
|
}
|
|
} ]
|
|
});
|
|
};
|
|
/* var addFun1 = function() {
|
|
var dialog = parent.ext.modalDialog({
|
|
title : '退料操作',
|
|
url : ext.contextPath + '/material/NotBOMPick/pick.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/NotBOMPick/view.do?id=' + id
|
|
});
|
|
};
|
|
var editFun = function(id) {
|
|
var dialog = parent.ext.modalDialog({
|
|
title : '配置BOM信息',
|
|
url : ext.contextPath + '/material/NotBOMPick/edit.do?id=' + id,
|
|
onClose : function(){
|
|
grid.datagrid('reload');
|
|
}
|
|
});
|
|
}; */
|
|
var deleteFun = function(id) {
|
|
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
|
if (r) {
|
|
$.post(ext.contextPath + '/material/NotBOMPick/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/NotBOMPick/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/NotBOMPick/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 : 'handletype', sortable : true,editor:'textbox', halign:'center',formatter : function(value, row, index) {
|
|
switch (value) {
|
|
case '0':
|
|
return '领料';
|
|
case '1':
|
|
return '退料';
|
|
}
|
|
}},
|
|
{width : '150', title : '物料代码', field : 'materialcode', sortable : true, halign:'center'},
|
|
{width : '150', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
|
{width : '150', title : '操作数量', field : 'handlenum', sortable : true,editor:'textbox', halign:'center'},
|
|
{width : '100', title : '单位', field : 'unit', sortable : true,halign:'center'},
|
|
{width : '100', title : '操作人', field : 'insuser', sortable : true,halign:'center',formatter : function(value, row) {
|
|
value ='admin';
|
|
return value;
|
|
} },
|
|
{width : '150', title : '领(退)料时间', field : 'handledate', sortable : true,editor:'textbox', 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 = '';
|
|
<%if (sessionManager.havePermission(session,"material/NotBOMPick/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>
|
|
<form id="searchForm">
|
|
<table >
|
|
<tr>
|
|
<td>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true"
|
|
onclick="addFun();">领(退)料</a>
|
|
</td>
|
|
<!-- <td>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_delete',plain:true"
|
|
onclick="addFun1();">退料</a>
|
|
</td> -->
|
|
<tr>
|
|
<td>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
|
onclick="deletesFun();">删除记录</a>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>操作类型</td>
|
|
<td colspan='1'>
|
|
<select id="search_handletype" name="search_handletype" class="easyui-combobox" style="width:200px">
|
|
<option value='0'select>领料</option>
|
|
<option value='1'>退料</option>
|
|
</select></td>
|
|
<td>物料名称</td>
|
|
<td>
|
|
<input id="search_materialname" name="search_materialname" class="easyui-textbox" style="width:200px"/></td>
|
|
|
|
<td>日期</td>
|
|
<td><input id="handledate" name="handledate" class="Wdate" value=""
|
|
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" 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> |