<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<head>
<base href="<%=basePath%>" />
<sx:head extraLocales="en-us" />
<title>进货单</title>
<link rel="stylesheet" href="css/main.css" type="text/css" />
<script language="javascript" src="script/main.js"></script>
</head>
<body>

<p></p>
<s:form action="stockorderAction" method="post" theme="simple">
	<p><font style="font-size: 10pt;">销售管理->订货单</font></p>

	<p></p>
	<table border="0" cellpadding="1" cellspacing="1" width="95%">
		<tr>
			<td align="right" width="10%" nowrap="true">订货单编号</td>
			<td width="20%"><s:textfield name="stockorder.code"
				cssClass="TextInput"></s:textfield></td>
			<td align="right" width="10%" nowrap="true">货物名称</td>
			<td width="20%"><s:select list="merchandises"
				name="stockorder.merchandise.id" listKey="id" listValue="name"
				emptyOption="true" theme="simple"></s:select></td>
			<td align="right" width="10%">供应商</td>
			<td width="20%"><s:select list="clients"
				name="stockorder.client.id" listKey="id" listValue="name"
				emptyOption="true" theme="simple"></s:select></td>
			<td width="10%">&nbsp;</td>
		</tr>
		<tr>
			<td align="right" width="10%" nowrap="true">订货日期</td>
			<td width="20%"><sx:datetimepicker label=""
				name="stockorder.orderdate" displayFormat="yyyy-MM-dd"
				language="en-us" type="date" /></td>
			<td align="right" nowrap="true">经手人</td>
			<td><s:select list="employees" name="stockorder.employee.id"
				listKey="id" listValue="name" emptyOption="true" theme="simple"></s:select></td>
			<td align="right">&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>
	</table>

	<p></p>
	<div style="margin-left: 30px; margin-right: 0px">
	<table border="0" cellpadding="0" cellspacing="0" width="95%">
		<tr>
			<td width="10%"><s:submit value="查找" cssClass="BtnAction"
				method="findStockorder"></s:submit></td>
			<td width="10%"><input type="button" class="BtnAction"
				value="新增"
				onClick="replaceModulUrl('<%=basePath%>stockorderAction!preSaveStockorder.action');"></td>
			<td width="10%"><input type="button"
				onClick="deleteRecords('stockorderAction!deleteStockorder.action')"
				value="删除" class="BtnAction" /></td>
				<td width="10%"><input type="reset" value="重置" class="BtnAction" /></td>
			<td width="60%">&nbsp;</td>
		</tr>
	</table>
	</div>

	<p></p>

	<div style="margin-left: 30px; margin-right: 0px">
	<table width="90%" border="1" cellpadding="0" cellspacing="0">
		<tr>
			<td width="5%" class="td_title">选择</td>
			<td width="5%" class="td_title">修改</td>
			<td width="10%" class="td_title">订货单编号</td>
			<td width="10%" class="td_title">销售商</td>
			<td width="15%" class="td_title">货物名称</td>
			<td width="15%" class="td_title">货物数量</td>
			<td width="15%" class="td_title">订货日期</td>
			<td width="15%" class="td_title">经手人</td>
		</tr>
		<s:iterator var="stockorder" value="stockorders">
			<tr>
				<td align="center" class="td_border"><input name="stockorderId"
					type="checkbox" title="选中后可进行删除操作"
					value='<s:property value="#stockorder.id" />'></td>
				<td align="center" class="td_border"><a
					href='stockorderAction!preUpdateStockorder.action?stockorder.id=<s:property value="#stockorder.id" />'><img
					src="image/edit.gif" border="0"></a></td>
				<td class="td_border"><s:property value="#stockorder.code" /></td>
				<td class="td_border"><s:property
					value="#stockorder.client.name" /></td>
				<td class="td_border"><s:property
					value="#stockorder.merchandise.name" /></td>
				<td class="td_border"><s:property
					value="#stockorder.merchandisenumber" /></td>
				<td class="td_border"><s:property value="#stockorder.orderdate" /></td>
				<td class="td_border"><s:property
					value="#stockorder.employee.name" /></td>

			</tr>
		</s:iterator>

	</table>
	</div>
</s:form>
</body>
</html>