first commit
This commit is contained in:
101
bin/WebRoot/jsp/material/semiManufacturesForSelect.jsp
Normal file
101
bin/WebRoot/jsp/material/semiManufacturesForSelect.jsp
Normal file
@ -0,0 +1,101 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" 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">
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/cutterstandard/getSemimanufactures.do?flag=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
rowStyler: function(index,row){
|
||||
var rowstyler='';
|
||||
if(row.status=='1'){
|
||||
rowstyler+= ' background-color:#C0C0C0;color:#fff;';
|
||||
}
|
||||
return rowstyler;
|
||||
},
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '物料代码', field : 'materialcode', align:'center',sortable : true, halign:'center'},
|
||||
{width : '100', title : '物料名称', field : 'materialname', align:'center',sortable : true, halign:'center'},
|
||||
{width : '150', title : '存入MES时间', field : 'insdt', sortable : true, align:'center', halign:'center',formatter:function(value,row){
|
||||
var str = value.substring(0,19);
|
||||
return str;
|
||||
}}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess:function(data){
|
||||
/*var wids = localStorage.getItem("materialcode").split(",");
|
||||
localStorage.clear();
|
||||
$.each(wids, function(index, item){
|
||||
if(item != ""){
|
||||
$('#grid').datagrid("checkRow",$('#grid').datagrid("getRowIndex",item));
|
||||
}
|
||||
});*/
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
//以json格式返回数据
|
||||
jsonstr = '{"materialcode":"'+row.materialcode
|
||||
+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
localStorage.clear();
|
||||
}
|
||||
</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_materialcode" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></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>
|
||||
<td><div class="datagrid-btn-separator"></div></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>
|
||||
|
||||
Reference in New Issue
Block a user