<%@ Page language="c#" Codebehind="ProductNoRule.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.ProductNoRule" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
	    <!--#include file="inc/head.inc"-->
		<title>ProductNoRule</title>
        <%--20110107 add by liwenhai--%>
		<script type="text/javascript">
		    $(document).ready(function(){
		       $('#btnSave').click(function(){  
		       if(!check())
				   return false;
		       });
		       function check(){
		           var intReg = new RegExp(/[^\d]/g);
		           if($('#txtOrderNum').val().Trim()==''){
		           	   alert("流水号位数不能为空");
		               return false;
		           }
		           else if(intReg.test($('#txtOrderNum').val().Trim())){
		               alert("流水号位数只能为数字");
		               return false;
		           }
		           else if(parseInt($('#txtOrderNum').val().Trim())>4){
		               alert("流水号位数长度大太");
					   return false;
		           }
		           return true;
		           }		       
		    });//end ready
		</script>
	</head>
	<body>
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />生成规则</div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title">商品编码生成规则</div>
		        <div class="frame_content">
					<table class="ptable" cellspacing="0" cellpadding="0">
						<tr>
							<th class="tl">
								商品编码生成规则：
							</th>
							<td class="tr">
								<asp:TextBox id="txtProductNoRule" runat="server" Width="200px">{Lead}{Time}{Number}</asp:TextBox><FONT face="宋体"><BR>
								</FONT><FONT face="宋体">
								    {Lead}代表前导字符,位于商品编码的前面<br />
								    {Time}代表添加时间,具体时间格式按下面的时间设置<br />
									{Number}代表添加流水号,具体位数可于下面设置</FONT>
							</td>
						</tr>
						<tr>
							<th class="tl">
								前导字符：
							</th>
							<td class="tr">
								<P>
									<asp:TextBox id="txtLead" runat="server" Width="150px">PN</asp:TextBox></P>
							</td>
						</tr>
						<tr>
							<th class="tl">
								时间格式：
							</th>
							<td class="tr">
								<P>
									<asp:TextBox id="txtTimeFormat" runat="server" Width="150px">yyyyMMdd</asp:TextBox><FONT face="宋体">y代表年,M代表月份,d代表日期,h代表小时,m代表分钟,s代表秒</FONT></P>
							</td>
						</tr>
						<tr>
							<th class="tl">
								流水号位数：
							</th>
							<td class="tr">
								<asp:TextBox id="txtOrderNum" runat="server" Width="50px">6</asp:TextBox><em>*流水号位数最大不能超过4</em>
							</td>
						</tr>
						<tr>
							<th class="tl"></th>
							<td class="tr">	
								<asp:Button id="btnSave" OnClick="btnSave_Click" runat="server" Text="保存" CssClass="inputbtn"></asp:Button>
							</td>
						</tr>
					</table>
		        </div>
	        </div>
		</form>
		</div>
		</div>
		</div>
	</body>
</html>
