<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<form class="layui-form whitebg pb10 pt10" action="" id="data_form">  
	<div class="tab-pane active">     
		<div class="panel-body">
			<div class="wrapper wrapper-content">
				<div class="panel-form animated fadeInRight wp60 fc">
					<div class="layui-form-item dn	has-error" >   
						<label class="layui-form-label">id</label>  
						<div class="layui-input-block">
							<input type="text" name="id" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${activityActivate.id }" >
						</div>  
					</div>
					<%-- <div class="layui-form-item 	has-error" >   
						<label class="layui-form-label">userId</label>  
						<div class="layui-input-block">
							<input type="text" name="userId" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${activityActivate.userId }" >
						</div>  
					</div> --%>
					<%-- <div class="layui-form-item 	has-error" >   
						<label class="layui-form-label">merchantCode</label>  
						<div class="layui-input-block">
							<input type="text" name="merchantCode" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${activityActivate.merchantCode }" >
						</div>  
					</div>
					<div class="layui-form-item 	has-error" >   
						<label class="layui-form-label">merchantName</label>  
						<div class="layui-input-block">
							<input type="text" name="merchantName" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${activityActivate.merchantName }" >
						</div>  
					</div> --%>
					
					<!--管理员看到的  -->
                    <c:if test="${admin eq 'admin' }">
                        <div class="form-group">
                            <div class="layui-form-item">          
                                <label class="layui-form-label">商户</label>
                                <div class="layui-input-block">
                                    <select name="merchantCode" lay-filter="selectMerchantCode" id="merchantCode">  
                                        <option value="">请选择</option>
                                        <c:forEach items="${merchantBaseInfoList }" var="mb">
                                            <option value="${mb.merchantCode }" <c:if test="${activityActivate.merchantCode eq mb.merchantCode }">selected</c:if>>${mb.merchantName }</option>
                                        </c:forEach>
                                    </select>
                                </div>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <div class="layui-form-item">
                                <label class="layui-form-label">门店</label>
                                <div class="layui-input-block">
                                    <select name="storeId" id="storeId">  
                                        <option value="">请选择</option>
                                        <c:forEach items="${merchantStoreList }" var="ms">
                                            <option value="${ms.storeId }" <c:if test="${ms.storeId eq activityActivate.storeId }">selected</c:if>>${ms.storeName }</option>
                                        </c:forEach>
                                    </select>              
                                </div>
                            </div>
                        </div>
                    </c:if>
                    
                    <!--不是管理员看到的  -->
                    <c:if test="${admin ne 'admin' }">
                        <div class="form-group">
                            <div class="layui-form-item">
                                <label class="layui-form-label">门店</label>
                                <div class="layui-input-block">
                                    <select name="storeId" id="storeId">  
                                        <option value="">请选择</option>
                                        <c:forEach items="${merchantStoreList }" var="ms">
                                            <option value="${ms.storeId }" <c:if test="${ms.storeId eq activityActivate.storeId }">selected</c:if>>${ms.storeName }</option>
                                        </c:forEach>
                                    </select>              
                                </div>
                            </div>
                        </div>
                    </c:if>
                    
                    <div class="layui-form-item     has-error" >   
                        <label class="layui-form-label">活动名称</label>  
                        <div class="layui-input-block">
                            <input type="text" name="name" id="name" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${activityActivate.name }" >
                        </div>  
                    </div>
					
					<div class="layui-form-item 	has-error" >   
						<label class="layui-form-label">激活赠送金额</label>  
						<div class="layui-input-block">
							<input type="text" name="giveMoney" id="giveMoney" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${activityActivate.giveMoney }" >
						</div>  
					</div>
					<%-- <div class="layui-form-item 	has-error" >   
						<label class="layui-form-label">storeId</label>  
						<div class="layui-input-block">
							<input type="text" name="storeId" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${activityActivate.storeId }" >
						</div>  
					</div>
					<div class="layui-form-item 	has-error" >   
						<label class="layui-form-label">storeName</label>  
						<div class="layui-input-block">
							<input type="text" name="storeName" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${activityActivate.storeName }" >
						</div>  
					</div> --%>
					<%-- <div class="layui-form-item 	has-error" >   
						<label class="layui-form-label">createDt</label>  
						<div class="layui-input-block">
							<input type="text" name="createDt" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${activityActivate.createDt }" >
						</div>  
					</div> --%>
	               <c:if test="${admin eq 'admin' }">
                       <input type="hidden" id="isAdmin" value="1">
                    </c:if>
                    <c:if test="${admin ne 'admin' }">
                       <input type="hidden" id="isAdmin" value="0">
                    </c:if>
				</div>
			</div>
		</div>  
	</div>
</form>
<script type="text/javascript">
   $(function(){
	   //form表单样式
	    layui.use(['layer', 'form'], function() {    
	        var layer = layui.layer,
	            form = layui.form;
	        form.render();
	    });
	  //日历控件
	    layui.use(['layer', 'laydate'], function() {
	        var layer = layui.layer;
	        laydate = layui.laydate;
	        laydate.render({
	             elem: '#date1' //指定元素
	        });
	        laydate.render({
	            elem: '#date2' //指定元素
	        });
	    });
   })
   
</script> 

