<?php include_once(mvc::$cfg['PATH_TPL'].'public/topSeller.php');?>
<div class="maintb">
	<?php include_once(mvc::$cfg['PATH_TPL'].'seller/leftMenu.php');?>
	<div class="main_middle">
		<div class="mod-main">
			<form id="shopBrandForm">
			<table class="table table-bordered mart10" id="shopBrand" style="width:350px">
				<thead>
					<tr>
						<th width="35px"><input type="checkbox" class="checkAll" name=""></th>
						<th>品牌名称</th>
						<th width="40px">排序</th>
						<th width="40px">操作</th>
					</tr>
				</thead>
				<tbody>
				<?php if(count($brandList)){?>
					<?php foreach($brandList as $v){?>
					<tr>
						<td><input type="checkbox" name="prbCheckId[]" class="checkOne" value="<?php echo $v['prb_id'];?>"></td>
						<td>
							<input type="text" value="<?php echo $v['prb_name'];?>" class="form-control" name="shopBrandName[]">
							<input type="hidden" name="prbId[]" value="<?php echo $v['prb_id'];?>">
						</td>
						<td><input type="text" class="form-control" onchange="SHOPBRAND.saveSeq(this,<?php echo $v['prb_id'];?>);" name="seq[]" value="<?php echo $v['sprl_seq']?>"></td>
						<td><i class="icon2 icon2_del" onclick="SHOPBRAND.removeBrand(this)"></i></td>
					</tr>
					<?php }?>
				<?php }else{?>
					<tr>
						<td><input type="checkbox" name="prbCheckId[]" class="checkOne" value=""></td>
						
						<td>
							<input type="text" value="" class="form-control" name="shopBrandName[]">
							<input type="hidden" name="prbId[]" value="">
						</td>
						<td><input type="text" class="form-control" onchange="SHOPBRAND.saveSeq(this,<?php echo $v['prb_id'];?>);" name="seq[]" value=""></td>
						<td><i class="icon2 icon2_del" onclick="SHOPBRAND.removeBrand(this)"></i></td>
					</tr>
				<?php }?>
				</tbody>
			</table>
			</form>
			<div class="main-head">
				<button type="button" title="" onclick="SHOPBRAND.getAddShopBrand();" class="btn btn-default">添加品牌</button>
				<button type="button" title="" onclick="SHOPBRAND.unbindBrand();" class="btn btn-danger">删除已选</button>
				
				<button type="button" title="" onclick="SHOPBRAND.addBrandSubmit();" class="btn btn-info">保存</button>
			</div>
		</div>
	</div>
</div>
<!-- Modal -->
<div class="modal" id="layer_box" tabindex="-1" role="dialog" aria-labelledby="layer_box">
	<div class="modal-dialog modal-lg" role="document">
		<div class="modal-content"></div>
	</div>
</div>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footAll.php');?>
<script type="text/javascript">
	$(document).ready(function(){
		SHOPBRAND.init();
	});
</script>