<?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="navrow proPackTpl-nar">
			<ul class="navrow_ul">
				<li class="active"><a href="/seller/group">配件组合列表</a></li>
			</ul>
        </div>
		<div class="mod-main">
			<div class="main-head">
				<button type="button" <?php if(!empty($dataArr) && count($dataArr)>=50){echo 'disabled';}?> title="最多添加50个组合!"; onclick="location.href='/seller/addGroup'" class="btn btn-default">添加组合</button>
			</div>
			<div class="main-body">
				<table class="table table-hover">
			      <thead>
			        <tr>
			          <th>操作</th>
			          <th width="400">名称</th>
			          <th>当前状态</th>
			          <th width="200">添加时间</th>
			          <th width="200">修改时间</th>
			        </tr>
			      </thead>
			      <tbody>
			      	<?php if(!empty($dataArr)){ ?>
			      	<?php foreach($dataArr as $v){ ?>
			        <tr myAttr="<?php echo $v['prg_id'];?>">
			          <td>
			          	<a class="a_blue" href="/seller/addGroup?gId=<?php echo $v['prg_id'];?>">编辑</a>
			          	<a class="a_blue" onclick="MESSAGE.confirm('确定删除该组合吗？','delThisProGroup(<?php echo $v['prg_id'];?>)')" href="javascript:;">删除</a>
			          </td>
			          <td><?php echo $v['prg_name'];?></td>
			          <td><?php if($v['prg_status']){echo '生效中';}else{echo '未生效';}?></td>
			          <td><?php echo date('Y-m-d H:i:s',$v['prg_atime']);?></td>
			          <td><?php if(!empty($v['prg_etime'])){ echo date('Y-m-d H:i:s',$v['prg_etime']);}?></td>
			        </tr>
			        <?php } ?>
			        <?php }else{ ?>
			         <tr>
			         	<td colspan="9" class="center">还没有配件组合，点击<a href="/seller/addGroup" class="orange">这里</a>去设置</td>
			         </tr>
			        <?php }?>
			      </tbody>
			    </table>
			</div>

		</div>
		<div class="clear"></div>
		<div><?php echo $Page;?></div>
	</div>
</div>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footAll.php');?>