<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>     
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">                      
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black"> 
<meta name="format-detection" content="telephone=no">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> 
<meta name="renderer" content="webkit">
<!-- 移动设备 viewport -->                                     
<meta name="viewport"
    content="width=device-width, initial-scale=1.0, maximum-scale=1.0">   
<jsp:include page="../../common.jsp" />
<script type="text/javascript">
</script>
<title>编辑</title>
</head>                                 
    <body class="lgraybg">            
        <div class="    container-fluid animated fadeInRight col-sm-12">
            <div class="panel-toolbar mt10 mb10 pt5 pb5 pl10 bdd whitebg">
                <div class="buttons">
                    <!-- <a href="javascript:void(0);" class="btn btn-primary fa fa-save f12"><span>保存</span></a> -->
                    <a href="${ctx }/activityActivate/index?pageIndex=${pageIndex}"  class="btn btn-primary fa fa-back f12" id="goback"><span>返回</span></a>
                </div>
            </div>
                <div class="tabs-container whitebg">
                    <div class="pt10 pl5 pr5">
                        <ul class="nav nav-tabs" id="nav-tabs">
                            <li class="active" data-action="base">   
                                <a href="javascript:void(0);" >基本资料</a>
                            </li>
                            <!-- <li class="" data-action="functions">
                                <a href="javascript:void(0);"  >多功能输入</a>
                            </li>
                            <li class="" data-action="extends">
                                <a href="javascript:void(0);" >扩展属性</a>
                            </li> -->
                        </ul>
                        <div class="tab-content pt30 p30">               
                                <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" disabled="disabled">  
                                        <option value="">请选择</option>
                                        <c:forEach items="${merchantBaseInfoList }" var="mb">
                                            <option value="${mb.merchantCode }" <c:if test=" ${activityActivate.merchantCode eq mb.merchantCode }">selected="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" disabled="disabled">  
                                        <option value="">请选择</option>
                                        <c:forEach items="${merchantStoreList }" var="ms">
                                            <option value="${ms.storeId }" <c:if test="${ms.storeId eq activityActivate.storeId }">selected="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" disabled="disabled">  
                                        <option value="">请选择</option>
                                        <c:forEach items="${merchantStoreList }" var="ms">
                                            <option value="${ms.storeId }" <c:if test="${ms.storeId eq activityActivate.storeId }">selected="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" readonly="readonly" 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" lay-verify="title" readonly="readonly" 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> --%>
    
                </div>
            </div>
        </div>  
    </div>
</form>
<script type="text/javascript">
    //form表单样式
    layui.use(['layer', 'form'], function() {    
        var layer = layui.layer,
            form = layui.form;
        form.render();
    });
</script> 
                        </div>     
                    </div>
                </div>    
        </div>
        <!-- 隐藏域 -->
        <input type="hidden" id="activityActivateId" value="${activityActivate.id }"/>
    </body>
</html>
