<%@ 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="${merchantStore.id }" >
						</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="aihao" id="merchantCode">
			                            <option value="">请选择</option>
			                            <c:forEach items="${merchantBaseInfoList }" var="mb">
			                                 <option value="${mb.merchantCode }" <c:if test="${mb.merchantCode eq merchantStore.merchantCode }">selected="selected"</c:if>>${mb.merchantName }</option>
			                            </c:forEach>
			                        </select>           
			                    </div>
			                </div>
			            </div>
			            <input type="hidden"  id="isAdmin" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="1" >
					</c:if>
					<c:if test="${admin ne 'admin' }">
						 <div class="layui-form-item dn  has-error" >
	                        <label class="layui-form-label">merchantCode</label>  
	                        <div class="layui-input-block">
	                            <input type="text" name="merchantCode" id="merchantCode" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${merchantStore.merchantCode }" >
	                        </div>  
	                    </div>
	                    <input type="hidden"  id="isAdmin" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="0" >
					</c:if>
					 
					<%--
					<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="${merchantStore.storeId }" >
						</div>  
					</div> --%>
					<div class="layui-form-item 	has-error" >   
						<label class="layui-form-label">店铺名称</label>  
						<div class="layui-input-block">
							<input type="text" name="storeName" id="storeName" lay-verify="title" autocomplete="off"  placeholder="请输入内容" class="layui-input" value="${merchantStore.storeName }" >
						</div>  
					</div>
					<div class="layui-form-item    has-error" >   
                        <label class="layui-form-label">门店地址</label>  
                        <div class="layui-input-block">
                            <input type="text" name="address" id="address" lay-verify="title" autocomplete="off"  placeholder="请输入内容" class="layui-input" value="${merchantStore.address }" >
                        </div>  
                    </div>
                    
                    <div class="layui-form-item     has-error" >   
                        <label class="layui-form-label">电话号码</label>  
                        <div class="layui-input-block">
                            <input type="text" name="linkPhone" id="linkPhone" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${merchantStore.linkPhone }" >
                        </div>  
                    </div>
                    
                    <div class="form-group">
                <div class="layui-form-item">          
                    <label class="layui-form-label">经营类目</label>
                    <div class="layui-input-block">
                        <select name="productDesc" id="productDesc">  
                            <option value=""></option>
                            <option value="餐饮" <c:if test="${merchantStore.productDesc eq '餐饮' }">selected</c:if>>餐饮</option>         
                            <option value="线下零售" <c:if test="${merchantStore.productDesc eq '线下零售' }">selected</c:if>>线下零售</option>
                            <option value="居民生活服务" <c:if test="${merchantStore.productDesc eq '居民生活服务' }">selected</c:if>>居民生活服务</option>
                            <option value="休闲娱乐" <c:if test="${merchantStore.productDesc eq '休闲娱乐' }">selected</c:if>>休闲娱乐</option>
                            <option value="交通出行" <c:if test="${merchantStore.productDesc eq '交通出行' }">selected</c:if>>交通出行</option>  
                            <option value="其它" <c:if test="${merchantStore.productDesc eq '其它' }">selected</c:if>>其它</option>  
                        </select>              
                    </div>
                </div>
            </div>
					
					<div class="layui-form-item    has-error" >   
                        <label class="layui-form-label">营业时间</label>  
                        <div class="layui-input-block">
                            <input type="text" id="openingTime" name="openingTime" lay-verify="title" autocomplete="off" placeholder="请输入内容" class="layui-input" value="${merchantStore.openingTime }" >
                        </div>  
                    </div>
					
					<div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">简介</label>  
                    <div class="layui-input-block">              
                        <textarea name="storeDesc"  placeholder="请输入内容" id="storeDesc" class="layui-textarea">${merchantStore.storeDesc }</textarea>
                    </div>
                </div>
                
                
                <div class="form-group">
                <div class="layui-form-item">          
                    <label class="layui-form-label">店铺状态</label>
                    <div class="layui-input-block">
                        <select name="status" lay-filter="aihao" id="status">
                            <option value="">请选择</option>
                            <option value="0" <c:if test="${merchantStore.status eq '0' }">selected="selected"</c:if>>商家打烊</option>         
                            <option value="1" <c:if test="${merchantStore.status eq '1' }">selected="selected"</c:if>>营业中</option>
                            <option value="2" <c:if test="${merchantStore.status eq '2' }">selected="selected"</c:if>>系统禁用</option>
                        </select>           
                    </div>
                </div>
            </div>
            
            
            <div class="layui-form-item layui-form-text" onclick="uploadImage1()">
                <label class="layui-form-label">门店LOGO</label>
                <div class="layui-input-block"  >
                    <div class="layui-upload-drag w300 h200 postionr">
                        <i class="layui-icon"> </i>    
                        <img src="${merchantStore.logo}" id="demo1" onerror="this.src='${ctx }/resources/images/error.jpg'" class="positiona top0 left0 w300 h200 dblock">      
                        <input type="hidden" name="logo" value="${merchantStore.logo}"   id="logo">
                    </div>
                </div>
            </div>
            
					
			<div class="layui-form-item layui-form-text" onclick="uploadImage2()">
                <label class="layui-form-label">门头照</label>
                <div class="layui-input-block"  >
                    <div class="layui-upload-drag w300 h200 postionr">
                        <i class="layui-icon"> </i>    
                        <img src="${merchantStore.storeHeadPic}" id="demo2" onerror="this.src='${ctx }/resources/images/error.jpg'" class="positiona top0 left0 w300 h200 dblock">      
                        <input type="hidden" name="storeHeadPic" value="${merchantStore.storeHeadPic}"   id="storeHeadPic">
                    </div>
                </div>
            </div>
            
            <div class="layui-form-item layui-form-text" onclick="uploadImage3()">
                <label class="layui-form-label">收银台照</label>
                <div class="layui-input-block"  >
                    <div class="layui-upload-drag w300 h200 postionr">
                        <i class="layui-icon"> </i>    
                        <img src="${merchantStore.cashPic}" id="demo3" onerror="this.src='${ctx }/resources/images/error.jpg'" class="positiona top0 left0 w300 h200 dblock">      
                        <input type="hidden" name="cashPic" value="${merchantStore.cashPic}"   id="cashPic">
                    </div>
                </div>
            </div>
            
            <div class="layui-form-item layui-form-text" onclick="uploadImage4()">
                <label class="layui-form-label">店内环境照</label>
                <div class="layui-input-block"  >
                    <div class="layui-upload-drag w300 h200 postionr">
                        <i class="layui-icon"> </i>    
                        <img src="${merchantStore.storeInsidePic}" id="demo4" onerror="this.src='${ctx }/resources/images/error.jpg'" class="positiona top0 left0 w300 h200 dblock">      
                        <input type="hidden" name="storeInsidePic" value="${merchantStore.cashPic}"   id="storeInsidePic">
                    </div>
                </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>

