<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>编码制定管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		var validateForm;
		function doSubmit(){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
			  $("#inputForm").submit();
			  return true;
		  }
	
		  return false;
		}
		$(document).ready(function() {
			validateForm = $("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
			
		});
	</script>
</head>
<body class="hideScroll">
		<form:form id="inputForm" modelAttribute="sysNumberInfo" action="${ctx}/sysnumberinfo/sysNumberInfo/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>	
		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
		   <tbody>
				<tr>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>流水名称：</label></td>
					<td class="width-35">
						<form:input path="name" htmlEscape="false"    class="form-control required"/>
					</td>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>前缀名：</label></td>
					<td class="width-35">
						<form:input path="first" htmlEscape="false"    class="form-control required"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>分割符：</label></td>
					<td class="width-35">
						<form:input path="separator" htmlEscape="false"    class="form-control required"/>
					</td>
					<td class="width-15 active"><label class="pull-right">年：</label></td>
					<td class="width-35">
						<form:select path="year" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('is_yesno')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">月：</label></td>
					<td class="width-35">
						<form:select path="mouth" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('is_yesno')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
					<td class="width-15 active"><label class="pull-right">日：</label></td>
					<td class="width-35">
						<form:select path="day" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('is_yesno')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">标识符：</label></td>
					<td class="width-35">
						<form:input path="identifier" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>编号分类：</label></td>
					<td class="width-35">
					 <sys:treeselect id="sysNumberClass" name="sysNumberClass.id" value="${sysNumberInfo.sysNumberClass.id}" labelName="classId.name" labelValue="${sysNumberInfo.sysNumberClass.name}"
						title="编号分类" url="/sysnumberclass/sysNumberClass/treeData" cssClass="form-control required" notAllowSelectParent="true"/>
					</td>
				</tr>
				<tr> 
					<td class="width-15 active"><label class="pull-right">序列长度：</label></td>
					<td class="width-35">
						<form:input path="numLength" htmlEscape="false"    class="form-control  digits"/>
					</td>
					<td class="width-15 active"><label class="pull-right">序列起始值：</label></td>
					<td class="width-35">
						<form:input path="numFirst" htmlEscape="false"    class="form-control  digits"/>
					</td>
				</tr>
		 	</tbody>
		</table>
	</form:form>
</body>
</html>