{load(fhead)}
<body class="mainbg">
	<!--if($vd['msgdirect']==1){-->
	<div id="mainhearder"><span>您的位置：<a href="{$vd['root']}index.php?m=mod_b2b&c=Dealer&a=home">经销商管理系统</a> >> 自有商品管理 >> 订单投诉处理</span></div>
	<!--}else{-->
	<div id="mainhearder"><span>您的位置：<a href="{$vd['root']}index.php?m=mod_b2b&a=Home">直销商管理系统</a> >> 服务与支持 >> 在线投诉系统</span></div>
	<!--}-->
	<!--$mst = intval(request('msgstate'));-->
	<div id="tabs5">
		<ul class="menu5" id="menu5">
		<li onclick="location.href='index.php?m=mod_agent&c=Complaint&msgdirect={$vd['msgdirect']}';" <!--if($mst==0){-->class=hover<!--}-->><span class="type">全部投诉</span></li>
		<li onclick="location.href='index.php?m=mod_agent&c=Complaint&msgstate=1&msgdirect={$vd['msgdirect']}';" <!--if($mst==1){-->class=hover<!--}-->><span class="type">未处理</span></li>
		<li onclick="location.href='index.php?m=mod_agent&c=Complaint&msgstate=2&msgdirect={$vd['msgdirect']}';" <!--if($mst==2){-->class=hover<!--}-->><span class="type">处理中</span></li>
		<li onclick="location.href='index.php?m=mod_agent&c=Complaint&msgstate=3&msgdirect={$vd['msgdirect']}';" <!--if($mst==3){-->class=hover<!--}-->><span class="type">已处理</span></li>
		</ul>
	</div>
	<div id="hearder"><span>我<!--if($vd['msgdirect']==1){-->收到的<!--}-->的投诉</span></div>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<form name="history" method="get" action="index.php">
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table1">
		<tr>
		<td width="22%" class="tableleft1">订 单 号：</td>
		<td width="78%" class="tableright1">
			<input type="hidden" name="m" value="mod_agent"/>
			<input type="hidden" name="c" value="Complaint"/>
			<input type="hidden" name="stype" value="ordno"/>
			<input type="hidden" name="msgstate" value="{$mst}"/>
			<input type="hidden" name="msgdirect" value="{$vd['msgdirect']}"/>
			<input type='text' size='30' maxlength='30' name='keywords' class='input' value="">
		</td>
		<tr>
		<td height="30" class="tableleft1">&nbsp;</td>
		<td class="tableright1"><input type="hidden" name="TreatWith" value=""><input type="submit" name="Submit2" value="确认查询" class="button"> <input type="reset" name="reset" value="重置查询" class="button"></td>
		</tr>
		</table>
		</form>
	</td>
	</tr>
	</table>
	<br>
	<?php
	$mstate = array('','<font color="#ff0000">未处理</font>','<font color="#ff00ff">处理中</font>','<font color="#0000ff">已处理</font>');
	?>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<table width="100%" cellspacing=0 cellpadding=0 border=0 class="table">
		<tr>
		<td width="16%" class="heardertop1">投诉时间</td>
		<td width="12%" class="heardertop1">订单号</td>
		<td width="34%" class="heardertop1">类型或问题</td>
		<td width="10%" class="heardertop1">措施</td>
		<td width="10%" class="heardertop1">处理状态</td>
		<td width="18%" class="heardertop1">管理</td>
		</tr>
		<!--foreach($vd['items'] as $item) {-->
		<tr class="stline" onmouseover="this.className='nd'" onmouseout="this.className='stline'">
		<td>{$item['createdate']}</td>
		<td><a href="index.php?m=mod_agent&c=<!--if($vd['msgdirect']==1){-->A<!--}-->Order&a=<!--if($vd['msgdirect']==1){-->d<!--}else{-->n<!--}-->etail&msgdirect={$msgdirect}&ordno={$item['ordno']}"><u><strong>{$item['ordno']}</strong></u></a></td>
		<td align=left>{$item['other']}</td>
		<td>{$item['hope']}</td>
		<td><b><!--echo $mstate[$item['msgstate']]--></b></td>
		<td>
			<!--if($vd['msgdirect']>0){-->
			  <input type=button name=detail value=<!--if($item['msgstate']==1){-->受理<!--}else{-->回复<!--}--> class=buttonnor onclick="javascript:location.href='index.php?m=mod_agent&c=Messenger&a=detail&msgdirect=1&id={$item['id']}';">
			<!--}else{-->
			<a href="index.php?m=mod_agent&c=Messenger&a=detail&id={$item['id']}"><img src="{$vd['content']}images/icon_ck.gif" align="absmiddle">查看</a> <a href="javascript:openScript('index.php?m=mod_agent&c=Messenger&pop=1&a=detail&id={$item['id']}','complaint',600,500);"><img src="{$vd['content']}images/icon_law.gif" align="absmiddle"> <!--if($item['msgstate']==3){-->重新提交<!--}else{-->补充<!--}--></a>
		  <!--}-->
		</td>
		</tr>
		<!--}-->
		</table>
	</td>
	</tr>
	</table>
	<div id="page" align="right">
		{load(fpage)}
	</div>
	
</body>
</html>
<script type="text/javascript"> 
	function openScript(url,name,width,height)
  {
    var Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,status=no');
  }
</script>