库存管理.html 2.82 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="http://static.yohobuy.com/admin/css/style.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://static.yohobuy.com/admin/js/jquery.min.js"></script>
<title>YOHO有货后台管理Right</title>
</head>

<body>
<div class="mainbox">

<script>
function setData(value){
	$("#keyword").val(value);
	$('#search_auto').html('').css('display','none');
}
$()
$(function(){
	$('#search_auto').css({'width':$('#keyword').width()+2});
	$('#keyword').keyup(function(){
		$.ajax({
			type: "GET",
			url: "/storage/getresult",
			 data: "type=" + $("#type").val() + "&keyword=" + $("#keyword").val(),
			dataType:'json',
			success: function(data){
				if(data.code != 200){
					$('#search_auto').html('').css('display','none');
				}else{
					var html = '<ul>';
					for(var key in data.data){
						val = data.data[key];
						html += '<li><a href="javascript:void(0);" onclick="setData(this.innerHTML);">'+val+'</a></li>';
					 }
					 html += '</ul>';
				 	$('#search_auto').html(html).css('display','block');
				}
			}
		});
	});
});
</script>
<div class="daohang">当前位置:<a href="/">首页</a> > <a href="/storage">库存管理</a></div>
<form action="/storage" method="GET">
<table class="table1" style="width: 100%;">
	<thead>
		<tr>
			<th colspan="3">产品查询</th>
		</tr>
	</thead>
	<tr>
		<td width="10%">
			<select id="type" name="type">
				<option value="product" >产品编号</option>
				<option value="goods" >商品编号</option>
			</select>
		</td>
		<td width="10%">
        <div id="search_auto_box">
        <input type="text" name="keyword" autocomplete="off" id="keyword" style="width:130px;"  />
        <div id="search_auto" style="display: block;">
        <ul>
        <li><a onclick="setData(this.innerHTML);" href="javascript:void(0);">LOSN0241-B</a></li>
        <li><a onclick="setData(this.innerHTML);" href="javascript:void(0);">SSLT0001-W</a></li>
        </ul>
        </div>
        </div>
        </td>
		<td><button class="but2">查询</button></td>
	</tr>
</table>
</form>
<table class="table1" style="width: 100%; text-align: center;">
	<thead>
		<tr>
			<th align="center">ID</th>
			<th align="center">商品名称</th>
			<th align="center">商品编号</th>
			<th align="center">颜色</th>
			<th align="center">尺码</th>
			<th align="center">总库存</th>
			<th align="center">销量</th>
			<th align="center">冻结数</th>
			<th align="center">库存</th>
		</tr>
	</thead>
		<tfoot>
		<tr>
			<td colspan="9">
			<div class="pagination"></div>
			</td>
		</tr>
	</tfoot>
		<tbody>
			</tbody>
</table></div>
</body>
</html>