{load(fhead)}
<body class="mainbg">
	<div id="mainhearder"><span>您的位置：<a href="{$vd['root']}index.php?m=mod_b2b&c=Dealer&a=home">经销商管理系统</a> >> 下属客户管理 >> 下属客户价格管理 >> 模板价格管理</span></div>
	
	<div id="type">
		<ul>
			<li><a href="index.php?m=mod_b2b&c=Price&a=AddRankTpl"><span class=type>添加价格模板</span></a></li><li><span class=type>价格模板列表</span></li><li><a href="index.php?m=mod_b2b&c=price&a=Agent"><span class=type>价格模板套用</span></a></li>
		</ul>
	</div>
	
	<div id="hearder"><span>价格模板列表</span></div>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
		<tr>
		<td width="6%" class="heardertop1">编号</td>
		<td width="25%" class="heardertop1">模板名称</td>
		<td width="13%" class="heardertop1">适用级别</td>
		<td width="20%" class="heardertop1">模板价格设定</td>
		<td width="20%" class="heardertop1">套用客户</td>
		<td width="8%" class="heardertop1">清除价格</td>
		<td width="4%" class="heardertop1">修改</td>
		<td width="4%" class="heardertop1">删除</td>
		</tr>
		<!--foreach($vd['items'] as $item) {-->
		<tr class="stline" onmouseover="this.className='nd'" onmouseout="this.className='stline'">
		<td align="center">{$item['id']}</td>
		<td align="left">{$item['name']}</td>
		<td align="center">{#TxtByOption($vd['rank'], $item['rankid'], 'name', 'id')}</td>
		<td align="center"><a href="index.php?m=mod_b2b&c=product&a=RankTplPrice&pricetpl={$item['id']}&name=<!--echo urlencode($item['name']);-->"><font color=#0000ff><u>模板价格设定</u></font></a></td>
		<td align="center"><a href="index.php?m=mod_b2b&c=Price&a=Agent&pricetpl={$item['id']}"><font color=#0000ff><u>套用该模板客户</u></a></td>
		<td align="center"><a href="index.php?m=mod_b2b&c=price&a=TplDel&id={$item['id']}" onclick="{if(confirm('确认要清除价格模板{$item['name']}的定价吗？')){return true;}return false;}"><u><font color=#ff0000>清除定价</font></u></td>
		<td><a href="index.php?m=mod_b2b&c=price&a=DetailRankTpl&id={$item['id']}"><img src="{$vd['content']}images/icon_xg.gif" border="0"></a></td>
		<td><a href="index.php?m=mod_b2b&c=price&a=TplDel&id={$item['id']}" onclick="{if(confirm('确认要删除价格模板{$item['name']}吗？')){return true;}return false;}"><img src="{$vd['content']}images/icon_del.gif" border="0"></a></td>
		</tr>
		<!--}-->
		</table>
	</td>
	</tr>
	</table>
	<div id="page">
		{load(fpage)}
	</div>
	
</body>
</html>

<script type="text/javascript">
	var $=function(id){
		return document.getElementById(id);
	}
	
	function disp(idx,val1,val2,val3,val4,val5)
	{
		$("name").value = val1;
		
		len = $("rankid").length;

		for(i=0; i<len; i++)
		{
			val = $("rankid").options[i].value;
			if(val2 == val)
			{
				$("rankid").options[i].selected = true;
			}
		}
		
		len = $("parentid").length;
		
		for(i=0; i<len; i++)
		{
			val = $("parentid").options[i].value;
			if(val3 == val)
			{
				$("parentid").options[i].selected = true;
			}
		}
		
		$("oldparentid").value = val4;
		$("id").value = val5;
		
		$(idx).style.display = ($(idx).style.display == "") ? "none" : "";
	}
</script>
