<{include file="index/header.html"}>  
<div class="nav"><span>产品规格</span></div>
<div class="explain">
	<div class="name"><span>操作提示</span></div>
	<div class="con">
		<p>产品规格：可以理解为一件商品的不同型号，一样的款式，适合不同的人来使用。</p> 
		<p>比如：一件衣服它是长袖，无领，纯色，纯棉的，这个是属性。同一款式对应他的规格为：大小，颜色，码数状态等。</p>
	</div> 
</div>
<div class="filter">
	<{if $smarty.get.pid}> 
		<a href="javascript:;" onClick="edit_scon('添加规格值','<{$__ADMIN__}>goods_sku/edit?pid=<{$smarty.get.pid}>')" class="add">添加规格值</a> 
		<a href="<{$__ADMIN__}>goods_sku/index" class="button">返回上一层</a> 
	<{else}>
		<a href="javascript:;" onClick="edit_scon('添加规格名','<{$__ADMIN__}>goods_sku/edit')" class="add">添加规格名</a>
	<{/if}> 
</div>
<div class="main">   
	<table class="ltable">
	  	<thead>
		  	<tr> 
				<th width="<{if $smarty.get.pid == ''}>120<{else}>100<{/if}>">操作</th>
				<th width="350"><{if $smarty.get.pid}>规格值<{else}>规格名<{/if}></td> 
				<{if $smarty.get.pid == ''}> 
					<th width="120">所属分类</th>
				<{/if}>
				<th></th> 
		  	</tr>
	  	</thead>
		<tbody>
		<{if $data.list}>
			<{foreach item=i from=$data.list}>
				<tr>
					<td> 
						<a href="javascript:;" data-id="<{$i.id}>" class="del">删除</a>
						<a href="javascript:;" onClick="edit_scon('修改规格','<{$__ADMIN__}>goods_sku/edit?pid=<{$i.pid}>&id=<{$i.id}>');" class="edit">编辑</a> 
						<{if $smarty.get.pid == ''}>
							<a href="<{$__ADMIN__}>goods_sku/index?pid=<{$i.id}>" class="down">下一级</a>  
						<{/if}> 
					</td>
					<{if $smarty.get.pid}>
						<td>|-- &nbsp;<{$i.name}></td> 
					<{else}>
						<td><{$i.name}></td> 
					<{/if}>
					<{if $smarty.get.pid == ''}> 
						<td><{$i.gcname}></td>
					<{/if}> 
					<td></td>
				</tr>
			<{/foreach}> 
		<{else}>
				<tr><td colspan="5">无数据</td></tr>
		<{/if}>
		</tbody>
	</table> 
	<{if $data.page}><div class="page"><{$data.page}></div><{/if}>
</div>
<{include file="index/footer.html"}>  
<script type="text/javascript">
_delete('<{$__ADMIN__}>goods_sku/del');
function edit_scon(name,url){  
	parent.dialog(name,url, 440); 
} 
</script>