<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = path + "/common/";
%>
<!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" />
<!--[if lt IE 9]>
<script type="text/javascript" src="<%=basePath %>admin/lib/html5.js"></script>
<script type="text/javascript" src="<%=basePath %>admin/lib/respond.min.js"></script>
<script type="text/javascript" src="<%=basePath %>admin/lib/PIE_IE678.js"></script>
<![endif]-->
<link href="<%=basePath %>admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>admin/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>admin/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="<%=basePath %>admin/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>新增文章</title>
</head>
<body>
<div class="pd-20">
	<form action="${pageContext.request.contextPath }/admin/task/add" method="POST" class="form form-horizontal" id="form-article-add">
		<input type="hidden" name="addTaskToken" value="${addTaskToken }">
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>任务简介：</label>
			<div class="formControls col-10">
				<input type="text" class="input-text" datatype="*4-30" errormsg="请输入4-30位的简介" nullmsg="任务简介不能为空" value="" placeholder="" id="task-Desc" name="taskDesc">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>销售数量：</label>
			<div class="formControls col-10">
				<input type="text" class="input-text" datatype="n1-4" value="" errormsg="请输入1-4位的销售数量" nullmsg="销售数量不能为空" placeholder="" id="task-Sales-Num" name="taskSalesNum">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>奖励金额(分)：</label>
			<div class="formControls col-10">
				<input type="text" class="input-text" datatype="n1-9" value="" errormsg="请输入1-9位的奖励金额" nullmsg="奖励金额不能为空" placeholder="" id="task-Money" name="taskMoney">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>产品奖励类型：</label>
			<div class="formControls col-2"> <span class="select-box">
				<select name="taskProductType" class="select">
				<c:forEach items="${types }" var="type">
					<option value="${type.typeId }">${type.typeName }</option>
				</c:forEach>
				</select>
				</span> 
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>奖励开始日期：</label>
			<div class="formControls col-2">
				<input type="text" datatype="*" nullmsg="开始时间不能为空" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'task-End-Date\')||\'%y-%M-%d\'}'})" id="task-Start-Date" name="taskStartDate" class="input-text Wdate">
			</div>
			<label class="form-label col-2"><span class="c-red">*</span>奖励结束日期：</label>
			<div class="formControls col-2">
				<input type="text" datatype="*" nullmsg="结束时间不能为空" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'task-Start-Date\')}'})" id="task-End-Date" name="taskEndDate" class="input-text Wdate">
			</div>
		</div>
		<div class="row cl">
			<div class="col-10 col-offset-2">
				<button id="butSub" class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存并提交审核</button>
				<button id="btn_reset" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript" src="<%=basePath %>admin/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="<%=basePath %>admin/lib/layer/1.9.3/layer.js"></script> 
<script type="text/javascript" src="<%=basePath %>admin/lib/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript" src="<%=basePath %>admin/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="<%=basePath %>admin/lib/Validform/5.3.2/Validform.min.js"></script> 
<script type="text/javascript" src="<%=basePath %>admin/lib/webuploader/0.1.5/webuploader.min.js"></script> 
<script type="text/javascript" src="<%=basePath %>admin/js/H-ui.js"></script> 
<script type="text/javascript" src="<%=basePath %>admin/js/H-ui.admin.js"></script> 
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-article-add").Validform({
		btnSubmit:"#butSub",
		btnReset:"#btn_reset",
		tiptype:function(msg,o,cssctl){
		    //msg：提示信息;
		    //o:{obj:*,type:*,curform:*},
		    //obj指向的是当前验证的表单元素（或表单对象，验证全部验证通过，提交表单时o.obj为该表单对象），
		    //type指示提示的状态，值为1、2、3、4， 1：正在检测/提交数据，2：通过验证，3：验证失败，4：提示ignore状态, 
		    //curform为当前form对象;
		    //cssctl:内置的提示信息样式控制函数，该函数需传入两个参数：显示提示信息的对象 和 当前提示的状态（既形参o中的type）;
		    if (o.type == 3) {
				layer.msg(msg,{icon:2,time:1500});
		    }
		},
		ignoreHidden: true,
		beforeSubmit:function(curform){
			return true;
		}
	});
});

function mobanxuanze(){
	
}
</script>
</body>
</html>