<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>
<head>
<%@include file="/common/taglibs.jspf"%>
<script src="${ctx}/static/ueditor/ueditor.config.js"></script>
<script src="${ctx}/static/ueditor/ueditor.all.min.js"> </script>
<script src="${ctx}/static/ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="${ctx}/static/resource/ebus/productEdit.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="prodId" value="${prod.prodId}">
		<input type="hidden" id="merchId" value="${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="产品名称  推荐50-100字" id="name" value="${prod.name}" />
				</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-3">
					<select id="mainType" class="form-control">
						<option value="0">请选择</option>
					</select>
				</div>
				<!-- <div class="col-sm-3">
					<select id="secondType" class="form-control">
						<option value="0">请选择</option>
					</select>
				</div> -->
				<div class="col-sm-3">
					<select id="typeId" class="form-control">
						<option value="0">请选择</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 checkRole"
						placeholder="SKU唯一编码" id="sku" value="${prod.sku}" />
				</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="merch" value="${prod.merch}" />
				</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-4">
					<input type="number" class="form-control"
						placeholder="销售价格，单位：RMB/￥" id="price" value="${prod.price}"
						min="0" max="1000000">
				</div>

				<label class="col-sm-3 control-label">市场价</label>
				<div class="col-sm-4">
					<input type="number" class="form-control" id="orig"
						value="${prod.orig}" min="0" max="1000000"
						placeholder="市场价格 >= 销售价">
				</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-4">
					<select id="status" class="form-control">
						<option value="1"
							<c:if test="${prod.status eq 1}"> selected="selected" </c:if>>正常</option>
						<option value="0"
							<c:if test="${prod.status eq 0}"> selected="selected" </c:if>>维护</option>
						<option value="-1"
							<c:if test="${prod.status eq -1}"> selected="selected" </c:if>>下架</option>
					</select>
				</div>
				<label class="col-sm-3 control-label">销售状态</label>
				<div class="col-sm-4">
					<select id="state" class="form-control">
						<option value="1"
							<c:if test="${prod.state eq 1}"> selected="selected" </c:if>>热销</option>
						<option value="0"
							<c:if test="${prod.state eq 2}"> selected="selected" </c:if>>新品</option>
						<option value="-1"
							<c:if test="${prod.state 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="url" class="form-control" placeholder="产品缩略图" id="pic"
						value="${prod.pic}">
				</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">
					<c:if test="${prod.pic=='' || prod.pic==null}">
						<img id="picshow"  src="${ctx}/images/zwtp.jpg" class="thum-img">
					</c:if>
					<c:if test="${prod.pic!='' && prod.pic!=null}">
						<img id="picshow" src="${prod.pic}" class="thum-img">
					</c:if>
				</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 id="img" type="url" class="form-control" placeholder="展示图"
						value="${prod.img}">
				</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">
					 <script id="editor" type="text/plain"  style="width:98%;height: 100px;">${prod.info}</script>
				</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>