115 lines
3.5 KiB
Plaintext
115 lines
3.5 KiB
Plaintext
|
|
<%@ 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>
|