<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>
<head>
<title>款型尺码</title>
<%@include file="/common/taglibs.jspf"%>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<section class="panel panel-default">
		<input type="hidden" id="prodId" value="${prodId}">
		<div class="panel-body">
			<table style="width: 100%; font-size: 14px;">
				<tr>
					<td>样式图片</td>
					<td>款型名称</td>
					<td align="center">管理</td>
				</tr>
				<tbody id="styleTb">
				</tbody>
			</table>
		</div>
		<div class="panel-body">
			<form id="form" name="form" class="form-horizontal">
				<input type="hidden" id="styleId" value="">
				<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="styleName" />
					</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 checkRole"
							placeholder="http://图片路径" id="stylePic" />
					</div>
				</div>
			</form>
		</div>
		<footer class="panel-footer text-right bg-light lter">
			<button class="btn btn-primary btn-s-xs" id="styleBtn">保存</button>
		</footer>
		<!-- <div class="panel-heading">产品尺码</div>
		<div class="panel-body" >
			<table style="width: 100%; font-size: 14px;">
				<tr>
					<td>尺码</td>
					<td align="center">管理</td>
				</tr>
				<tbody id="sizeTb">
				</tbody>
			</table>
		</div>
		<footer class="panel-footer text-right bg-light lter">
			<table>
				<tr>
					<td><input type="text" id="sizeName" class="form-control input-medium" style="width:220px;" placeholder="填写尺码标签"></td>
					<td><button class="btn btn-primary btn-s-xs" id="sizeBtn">保存</button>
						<button class="btn btn-danger marR10" id="delSizeBtn">删除</button></td>
				</tr>
			</table>
			
		</footer> -->
	</section>

	<script src="${ctx}/static/plugins/artTemplate/js/template.js"></script>
	<script src="${ctx}/static/resource/ebus/productStyle.js"></script>
	<script type="text/html" id="styleHtml">
		{{each content as style}}
		<tr id="{{style.styleId}}">
			<td><img src='{{style.pic}}' style='max-width:100px;'></td><td>{{style.name}}</td>
			<td align="center">
				<button class="btn btn-info" onclick="styleEdit({{style.styleId}},'{{style.name}}','{{style.pic}}')">编辑</button>
				<button class="btn btn-danger" onclick="deleteStyle({{style.styleId}},'{{style.name}}')">删除</button>
			</td>
		</tr>
		{{/each}}
	</script>
<!-- <span class="prod_size" onclick="selectSize(this)" alt="{{size.sizeId}}">{{size.zname}}</span>
	<script type="text/html" id="sizeHtml">
	{{each content as size}}
		<tr id="size_{{size.sizeId}}">
			<td>{{size.zname}}</td>
			<td align="center">
				<button class="btn btn-danger" onclick="deleteSize({{size.sizeId}},'{{size.zna}}')">删除</button>
			</td>
		</tr>
	{{/each}}
	</script>
	 -->
</body>
</html>