<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>
<head>
<%@include file="/common/taglibs.jspf"%>
<script src="${ctx}/static/plugins/jquery/jQuery.md5.js"></script>
<script src="${ctx}/static/resource/ebus/merchEdit.js"></script>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal">
		<input type="hidden" id="merchId" value="${merch.merchId}">
		<section class="panel panel-default">
			<div class="panel-body">
				<div class="form-group">
					<label class="col-sm-3 control-label">商家名称</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkRole"
							placeholder="商户名称、中英文" id="name" value="${merch.name}" />
					</div>
				</div>
				<c:if test="${merch.merchId eq 0 }">
					<!-- 新增加商户 -->
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">用户名</label>
						<div class="col-sm-9">
							<input type="text" class="form-control checkRole"
								placeholder="英文大小写字母、数字" id="uname"
								onkeyup="this.value=this.value.replace(/[^a-z]/ig,'')" />
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">安全邮箱</label>
						<div class="col-sm-9">
							<input type="email" class="form-control checkRole"
								placeholder="填写安全邮箱" id="email" />
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">初始密码</label>
						<div class="col-sm-9">
							<input type="password" class="form-control checkRole" id="pwd"
								placeholder="商户初始密码，默认：用户名+6个8" id="pwd" />
						</div>
					</div>
				</c:if>
				<c:if test="${merch.merchId gt 0 }">
					<input type="hidden" id="uname" value="">
					<input type="hidden" id="email" value="">
					<input type="hidden" id="pwd" value="">
				</c:if>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">状态级别</label>
					<div class="col-sm-3">
						<select id="status" class="form-control input-medium">
							<option value="1"
								<c:if test="${merch.status eq 1}"> selected="selected" </c:if>>正常</option>
							<option value="0"
								<c:if test="${merch.status eq 0}"> selected="selected" </c:if>>锁定</option>
						</select>
					</div>
					<label class="col-sm-3 control-label"></label>
					<div class="col-sm-3">
						<select id="degree" class="form-control input-medium">
							<option value="A"
								<c:if test="${merch.degree eq 'A'}"> selected="selected" </c:if>>A级</option>
							<option value="B"
								<c:if test="${merch.degree eq 'B'}"> selected="selected" </c:if>>B级</option>
							<option value="C"
								<c:if test="${merch.degree eq 'C'}"> selected="selected" </c:if>>C级</option>
						</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">联系人</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" placeholder="商户负责人、联系人"
							id="link" value="${merch.link}">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">联系电话</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" placeholder="联系人电话"
							id="phone" value="${merch.phone}">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">结算方式</label>
					<div class="col-sm-9">
						<select id="payType"  class="form-control">
							<option value="1"
								<c:if test="${merch.payType eq 1}"> selected="selected" </c:if>>支付宝</option>
							<option value="2"
								<c:if test="${merch.payType eq 2}"> selected="selected" </c:if>>微信</option>
							<option value="3"
								<c:if test="${merch.payType eq 3}"> selected="selected" </c:if>>银联</option>
						</select> 
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">结算账户</label>
					<div class="col-sm-9">
						<input type="text" class="form-control"
							placeholder="商户订单结算账户；支付宝、银联卡号" id="payAcct"
							value="${merch.payAcct}">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">商户介绍</label>
					<div class="col-sm-9">
						<textarea id="info"  class="form-control"  style="width: 96%; height: 120px;">${merch.info}</textarea>
					</div>
				</div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
				<button type="button" class="btn btn-success btn-s-xs"
					id="submitBtn">提交</button>
			</footer>
		</section>
	</form>
</body>
</html>