<?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"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<head>
<base href="<%=basePath%>" />
<title>订货单</title>
<link rel="stylesheet" href="css/main.css" type="text/css" />
<script language="javascript" src="script/main.js"></script>
<script type='text/javascript' src='dwr/interface/clientAction.js'></script>
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type="text/javascript">
	var codeChk = false;

	function formSubmit() {
		var chk = false;

		var chkRetName = out_chkMaxLength('name', 'msg_name', '名称小于10位且不能为空!',
				'10');
		var chkRetAddress = out_chkMaxLength('address', 'msg_address',
				'地址小于50位且不能为空!', '50');
		var chkRetPhone = out_chkPhone('phone', 'msg_phone', '电话只能输入11位或12位数字!');
		var chkRetEmail = out_chkEmail('email', 'msg_email',
				'EMAIL小于30位且不能为空!', 30);

		if (chkRetAddress && chkRetName && chkRetPhone && chkRetEmail) {
			chk = true;
		}
		return chk;
	}
</script>
</head>
<body>
<s:form action="clientAction" method="post" theme="simple" onsubmit="return formSubmit();">
	<s:hidden name="client.id"></s:hidden>
	<s:hidden name="client.code"></s:hidden>
	<p></p>
	<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="client.code" disabled="true"
				cssClass="TextInput"></s:textfield></td>
			<td align="right" width="10%" nowrap="true">客户名称</td>
			<td width="20%"><s:textfield name="client.name"
				cssClass="TextInput" id="name"
				onFocus="show_message('msg_name','2','请输入名称');"
				onBlur="out_chkMaxLength('name', 'msg_name', '名称小于10位且不能为空!', 10)"></s:textfield>
			<DIV style="DISPLAY: show" id="msg_name" class="box_div_right">&nbsp;</DIV></td>
			<td align="right" width="10%">客户Email</td>
			<td width="20%"><s:textfield name="client.email"
				cssClass="TextInput" id="email"
				onFocus="show_message('msg_email','2','请输入EMAIL');"
				onBlur="out_chkEmail('email', 'msg_email', 'EMAIL小于30位且不能为空!', 30)"></s:textfield>
			<DIV style="DISPLAY: show" id="msg_email" class="box_div_right">&nbsp;</DIV></td>
			<td width="10%">&nbsp;</td>
		</tr>
		<tr>
			<td align="right" width="10%" nowrap="true">客户电话</td>
			<td width="20%"><s:textfield name="client.telephone"
				cssClass="TextInput" id="phone"
				onFocus="show_message('msg_phone','2','请输入电话11位或12位数字.');"
				onBlur="out_chkPhone('phone', 'msg_phone', '电话只能输入11位或12位数字!')"></s:textfield>
			<DIV style="DISPLAY: show" id="msg_phone" class="box_div_right">&nbsp;</DIV></td>
			<td align="right" width="10%" nowrap="true">客户地址</td>

			<td colspan="5"><s:textfield name="client.address"
				cssClass="TextInput"  id="address"
				onFocus="show_message('msg_address','2','请输入地址');"
				onBlur="out_chkMaxLength('address', 'msg_address', '地址小于50位且不能为空!', '50')"></s:textfield>
			<DIV style="DISPLAY: show" id="msg_address" class="box_div_right">&nbsp;</DIV></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="保存" method="updateClient"
				cssClass="BtnAction"></s:submit></td>
			<td width="10%"><input type="button" class="BtnAction"
				value="返回" onClick="history.go(-1);"></td>
			<td width="80%">&nbsp;</td>
		</tr>
	</table>
	</div>
</s:form>
</body>
</html>