<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/other/kingedit/themes/default/default.css" rel="stylesheet" type="text/css" />
<title>添加商品</title>
</head>
<body>
<div class="pd-20">
	<form action="${pageContext.request.contextPath }/admin/productType/add" class="form form-horizontal" id="form-addGoods" method="POST" enctype="multipart/form-data">
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>类型名称：</label>
			<div class="formControls col-5">
				<input id="typeName" name="typeName" type="text" class="input-text" value="" placeholder="" >
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>类型简称：</label>
			<div class="formControls col-5">
				<input id="typeDetilas" name="typeDetilas" type="text" class="input-text" value="" placeholder="">
			</div>
		</div>

		<div class="row cl">
			<label id="integralLabel" class="form-label col-2"><span class="c-red">*</span>类型状态：</label>
			<div id="integralDiv" class="formControls col-2">
				<span class="select-box">
				<select id="typeState" name="typeState" class="select">
						<option value="1">正常</option>
						<option value="2">停用</option>
						<option value="3">删除</option>
				</select>
				</span>
			</div>
		</div>
		<div class="row cl">
			<div class="col-10 col-offset-2">
				<!-- <button onClick="return admin_addGoods();" class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button> -->
				<button onClick="return checkProoduct();" class="btn btn-primary radius" type="submit">
					<i class="Hui-iconfont">&#xe632;</i>保存
				</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/ueditor.all.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/ueditor.config.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/js/utils/tools.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/js/utils/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/other/kingedit/kindeditor.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/other/kingedit/lang/zh_CN.js"></script> 	
<script type="text/javascript">


$(document).ready(function(){

});


function checkProoduct(){
	//商品名称数据验证
	if(!commonLengthJdg('typeName',1,60,null,true)){
		layer.msg("类型名称不能为空!且长度为1-15位",{icon: 2,time:2000});
		return false;
	}
	//商品简称数据验证
	if(!commonLengthJdg('typeDetilas',1,20,null,true)){
		layer.msg("类型简称不能为空!且长度为1-10位",{icon: 2,time:2000});
		return false;
	}
}

</script>
</body>
</html>