{load(fhead)}
<body class="mainbg">
	<!--$msg = $vd['msg'];-->
	
	<!--$pop=intval(request('pop'));$msgdirect=intval(request('msgdirect'));$reply=intval(request('reply'));-->
	
	<!--if($vd['str'] != '投诉'){-->
	
	
	<div id="mainhearder"><span>您的位置：<a href="{$vd['root']}index.php?m=mod_b2b&a=Home">直销商管理系统</a> >> 服务与支持 >> 平台内部短信</span></div>
	
	<?php
	$id = intval(request('id'));
	if($msg['id'] != $id)
	{
		foreach($vd['items'] as $item) 
		{
			if($item['id'] == $id)
			{
				$msg = $item;
				break;
			}
		}
	}
	?>
	
	<!--if($reply == 0){-->
	<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" align="center" cellpadding="0" cellspacing="0" class="table1">
		<tr>
		<td width="22%" height="30" class="tableleft1">发 信 人：</td>
		<td width="78%" class="tableright1"><strong><!--if($msg['msgfrom']==0){-->平台管理员<!--}else{-->{#DisplayCode($msg['msgfrom'], 4)}<!--}--></strong></td>
		</tr>
		<tr>
		<td height="30" class="tableleft1">短信标题：</td>
		<td class="tableright1"><input type='text' size='80' maxlength='100' name='MessengerTitle' class='input1' value="{$msg['title']}" readonly></td>
		</tr>
		<tr>
		<td class="tableleft1">短信内容：</td>
		<td class="tableright1">
<textarea name="MessengerContent" cols="85" rows="10" class='input1' readonly>
<!--echo $msg['content'];-->
</textarea>
</td>
		</tr>
		<tr>
		<td height="30" class="tableleft1">&nbsp;</td>
		<td class="tableright1">
		<input name="button" type="button" class="button" value="回复短信" onclick="javascript:location.href='index.php?m=mod_agent&c=Messenger&a=detail&reply=1&id={$msg['id']}';">
		<input name="button" type="button" class="button" value="删除短信" onclick="javascript:location.href='index.php?m=mod_agent&c=Messenger&a=Add&a=MessengerDel&id[]={$msg['id']}';"></td>
		</tr>
		</table>
	</td>
	</tr>
	</table>
	<!--}else{-->
	<div id="hearder"><span>回复短信</span></div>
	
	<form name="messenger" method="post" action="index.php?m=mod_agent&c=Messenger&a=MessengerSave&parentid=0">
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table1">
		<tr>
		<td width="22%" height="30" class="tableleft1">收 信 人：</td>
		<td width="78%" class="tableright1"><strong><!--if($msg['msgfrom']==0){-->平台管理员<!--}else{-->{#DisplayCode($vd['msgto'], 4)}<!--}--></strong>
		</td>
		</tr>
		<tr>
		<td height="30" class="tableleft1">短信标题：</td>
		<td class="tableright1"><input type='text' size='80' maxlength='100' name='MessengerTitle' class='input' value="回复:{$msg['title']}" datatype="LimitB" min="1" max="90" msg="短信标题未填写或过长"></td>
		</tr>
		<tr>
		<td class="tableleft1">短信内容：</td>
		<td class="tableright1">
<textarea name="content" cols="85" rows="10" class='input' datatype="LimitB" min="1" max="450" msg="短信内容未填写或过长"><!--echo $msg['content'];-->
<!--echo "\n\n";-->
==========回复内容如下==========
</textarea></td>
		</tr>
		<tr>
		<td height="30" class="tableleft1">&nbsp;</td>
		<td class="tableright1">
		<input type="hidden" name="underlingid" value="{$vd['msgto']}" />
		<input type="hidden" name="msgto" value="3"/>
		<input type="hidden" size='57' maxlength='100' name="title" class='input' datatype="LimitB" min="1" max="90" value="Re:{$msg['title']}">
		<input type="hidden" name="msgcc_1" />
    <input type="hidden" name="msgcc_2" /> 
		<input type="hidden" name="msgstate" value="1" /> 
		<input name="submit" type="submit" class="button" value="确认回复">
		<input name="reset" type="reset" class="button" value="重新填写"></td>
		</tr>
		</table>
	</td>
	</tr>
	</table>
	
	<!--}-->
	
	<!--}else{-->
	
	
	<?php
  $mstate = array('','<font color="#ff0000">未处理</font>','<font color="#ff00ff">处理中</font>','<font color="#0000ff">已处理</font>');
  ?>
  
  <!--if($msgdirect == 0){-->
  
  <div id="mainhearder"><span>您的位置：<a href="Mch_Hp.asp">直销商管理系统</a> >> 服务与支持 >> 在线投诉系统</span></div>
  
  <!--if($pop==0){-->
  
	<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" align="center" cellpadding="0" cellspacing="0" class="table1">
		<tr>
		<td width="22%" height="30" class="tableleft1">订单号：</td>
		<td width="78%" class="tableright1"><a href="index.php?m=mod_agent&c=<!--if($msg['msgto'] == $vd['aid']){-->A<!--}-->Order&a=detail&ordno={$msg['ordno']}"><u><b>{$msg['ordno']}</b></u></a></td>
		</tr>
		<tr>
		<td class="tableleft1">投诉接收人：</td>
		<td class="tableright1"><strong>
		<!--if($vd['aid'] > 0){-->供货商({#DisplayCode($msg['msgto'])})<!--}else{-->平台管理员<!--}--></strong></td>
		</tr>
		<tr>
		<td class="tableleft1">投诉问题类型：</td>
		<td class="tableright1">
		<select name="QuestionTitle">
		<option value="{$msg['title']}" selected>{$msg['title']}</option>
		</select>
		</td>
		</tr>
		<tr>
		<td class="tableleft1">希望处理措施：</td>
		<td class="tableright1"><input type="radio" name="TreatType" value="{$msg['hope']}" id="treat0" checked><label for="treat0">{$msg['hope']}</label></td>
		</tr>
		<tr>
		<td class="tableleft1">投诉内容：</td>
		<td class="tableright1">
			<textarea name="QuestionContent" cols="80" rows="5" class='input' readonly>
时间:{$msg['createdate']}投诉内容：
<!--echo $msg['content'];-->
<!--echo "\n\n";-->
<!--foreach($vd['items'] as $item) {-->
<!--if($item['msgfrom'] == $msg['msgfrom']){-->
时间:{$item['createdate']} 补充投诉内容{$msg['msgfrom']}：
<!--echo $item['content'];-->
<!--echo "\n\n";-->
<!--}-->
<!--}--></textarea></td>
		</tr>
		<tr>
		<td class="tableleft1">处理状态：</td>
		<td class="tableright1"><b><!--echo $mstate[$msg['msgstate']]--></b></td>
		</tr>
		<!--if($msg['msgstate'] > 0 ){-->
		<tr>
		<td class="tableleft1">回复内容：</td>
		<td class="tableright1">
<textarea name="AnswerContent" cols="80" rows="5" class='input' readonly>
<!--foreach($vd['items'] as $item) {-->
<!--if($item['msgfrom'] != $msg['msgfrom']){-->
时间:{$item['createdate']}回复的内容：
<!--echo $item['content'];-->
<!--echo "\n\n";-->
<!--$date=$item['createdate'];}}-->
</textarea></td>
		</tr>
		<!--}-->
		<tr>
		<td class="tableleft1">回复时间：</td>
		<td class="tableright1"><!--if(isset($date)){echo $date;}-->&nbsp;</td>
		</tr>
		</table>
	</td>
	</tr>
	</table>
	<br>
	<div align=center><input name="button" type="button" class="button" value="返回上页" onclick="javascript:history.go(-1);"></div>
	<br>
	<br>
	
	<!--}else{-->
	
	<div id="hearder"><span>补充投诉</span></div>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<form name="messenger" method="post" action="index.php?m=mod_agent&c=Complaint&a=ComplaintSave&parentid={$vd['parentid']}">
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table1">
		<tr>
		<td width="22%" height="30" class="tableleft1">订单号：</td>
		<td width="78%" class="tableright1"><a href="index.php?m=mod_agent&c=<!--if($msg['msgto'] == $vd['aid']){-->A<!--}-->Order&a=detail&ordno={$msg['ordno']}"><u><b>{$msg['ordno']}</b></u></a></td>
		</tr>
		<tr>
		<td class="tableleft1">投诉接收人：</td>
		<td class="tableright1"><strong>
		<!--if($vd['aid'] > 0){-->供货商({#DisplayCode($msg['msgto'])})<!--}else{-->平台管理员<!--}--></strong></td>
		</tr>
		<tr>
		<td class="tableleft1">投诉问题类型：</td>
		<td class="tableright1">
		<select name="QuestionTitle">
		<option value="{$msg['title']}" selected>{$msg['title']}</option>
		</select>
		</td>
		</tr>
		<tr>
		<td class="tableleft1">希望处理措施：</td>
		<td class="tableright1"><input type="radio" name="hope" value="{$msg['hope']}" id="treat0" checked><label for="treat0">{$msg['hope']}</label></td>
		</tr>
		<tr>
		<td class="tableleft1">原投诉内容：</td>
		<td class="tableright1">
			<textarea name="QuestionContent" cols="80" rows="5" class='input' readonly>
时间:{$msg['createdate']}投诉内容：
<!--echo $msg['content'];-->
<!--echo "\n\n";-->
<!--foreach($vd['items'] as $item) {-->
<!--if($item['msgfrom'] == $msg['msgfrom']){-->
时间:{$item['createdate']} 补充投诉内容{$msg['msgfrom']}：
<!--echo $item['content'];-->
<!--echo "\n\n";-->
<!--}-->
<!--}--></textarea></td>
		</tr>

		<tr>
		<td class="tableleft1">补充的内容：</td>
		<td class="tableright1">
<textarea name="content" cols="80" rows="5" class='input' onfocus="javascript:this.value='';">请填写需要补充的内容</textarea></td>
		</tr>
		<tr>
		<td height="30" class="tableleft1">&nbsp;</td>
		<td class="tableright1">
		<input type="hidden" name="underlingid" value="{$vd['msgto']}" />
		<input type="hidden" name="msgto" value="3"/>
		<input type="hidden" size='57' maxlength='100' name="title" class='input' datatype="LimitB" min="1" max="90" value="Re:{$msg['title']}">
		<input type="hidden" name="msgcc_1" />
    <input type="hidden" name="msgcc_2" /> 
		<input type="hidden" name="msgstate" value="1" />
		<input name="submit" type="submit" class="button" value="确认补充">
		<input name="reset2" type="reset" class="button" value="重新填写"></td>
		</tr>
		</table>
	  </form>
	</td>
	</tr>
	</table>
	<!--}-->
	
	<!--}else{-->
	
	<div id="mainhearder"><span>您的位置：<a href="Mch_HP.asp">经销商管理系统</a> >> 自有商品管理 >> 订单投诉处理</span></div>

	<div id="hearder"><span>订单投诉回复</span></div>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<form name="messenger" method="post" action="index.php?m=mod_agent&c=Complaint&a=ComplaintSave&parentid={$vd['parentid']}">
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table1">
		<tr>
		<td width="22%" class="tableleft1">投诉客户：</td>
		<td width="78%" align="left" class="tableright1">{#DisplayCode($msg['msgfrom'], 4)}</td>
		</tr>
		<tr>
		<td class="tableleft1">投诉时间：</td>
		<td align="left" class="tableright1">{$msg['createdate']}</td>
		</tr>
		<tr>
		<td class="tableleft1">问题类型：</td>
		<td align="left" class="tableright1"><select name="QuestionTitle"><option value="{$msg['title']}">{$msg['title']}</option></select></td>
		</tr>
		<tr>
		<td class="tableleft1">订 单 号：</td>
		<td align="left" class="tableright1"><a href="index.php?m=mod_agent&c=<!--if($msg['msgto'] == $vd['aid']){-->A<!--}-->Order&a=detail&ordno={$msg['ordno']}"><u><b>{$msg['ordno']}</b></u></a></td>
		</tr>
		<tr>
		<td class="tableleft1">投诉内容：</td>
		<td align="left" class="tableright1">
			<TEXTAREA NAME="QuestionContent" ROWS="5" COLS="70" class="input1" readonly>
<!--echo $msg['content'];-->
<!--echo "\n\n";-->
<!--foreach($vd['items'] as $item) {-->
<!--if($item['msgfrom'] == $msg['msgfrom']){-->
时间:{$item['createdate']} 补充投诉内容{$msg['msgfrom']}：
<!--echo $item['content'];-->
<!--echo "\n\n";-->
<!--}-->
<!--}-->
			</TEXTAREA>
		</td>
		</tr>
		<tr>
		<td class="tableleft1">希望处理方式：</td>
		<td align="left" class="tableright1"><strong><font color=#ff0000>{$msg['hope']}</font></strong>&nbsp;</td>
		</tr>
		<tr>
		<td class="tableleft1">目前状态：</td>
		<td align="left" class="tableright1"><strong><!--echo $mstate[$msg['msgstate']]--></strong></td>
		</tr>
		<!--if($msg['msgstate'] > 1){-->
		<tr style="display:none">
		<td class="tableleft1"></td>
		<td class="tableright1">
<!--foreach($vd['items'] as $item) {-->
<!--if($item['msgfrom'] != $msg['msgfrom']){-->
<!--$date=$item['createdate'];$staffid=$item['staffid'];$aid=$item['aid'];$admnick=$item['admnick'];}}--></td>
		</tr>
		<tr>
		<td class="tableleft1">上次处理时间：</td>
		<td align="left" class="tableright1">{$date}</td>
		</tr>
		<tr>
		<td class="tableleft1">上次处理员工：</td>
		<td align="left" class="tableright1"><!--if($staffid==0){-->总帐号<!--}else{-->{$admnick}({#DisplayCode($staffid, 3)})<!--}--></td>
		</tr>
		<tr>
		<td class="tableleft1">上次回复内容：</td>
		<td class="tableright1">
<textarea name="AnswerContent" cols="70" rows="5" class='input' readonly>
<!--foreach($vd['items'] as $item) {-->
<!--if($item['msgfrom'] != $msg['msgfrom']){-->
时间:{$item['createdate']}回复的内容：
<!--echo $item['content'];-->
<!--echo "\n\n";-->
<!--$date=$item['createdate'];}}-->
</textarea></td>
		</tr>
		<!--}-->
		<tr>
		<td class="tableleft1">本次回复：</td>
		<td align="left" class="tableright1"><TEXTAREA NAME="content" ROWS="5" COLS="70" class="input"></TEXTAREA></td>
		</tr>
		<tr>
		<td class="tableleft1">处理状态：</td>
		<td align="left" class="tableright1"><input type="hidden" name="msgdirect" value="1" /><input type="radio" name="msgstate" value="2" id="treatwith1" checked><label for="treatwith1"><font color=#0000ff><u>受理投诉</u></font></label> <input type="radio" name="msgstate" value="3" id="treatwith2"><label for="treatwith2"><font color=#ff0000><u>最终回复投诉</u></font></label></td>
		</tr>
		<tr>
		<td class="tableleft1">&nbsp;</td>
		<td align="left" class="tableright1">
			<input type="hidden" name="underlingid" value="{$vd['msgto']}" />
			<input type="hidden" name="msgto" value="3"/>
			<input type="hidden" size='57' maxlength='100' name="title" class='input' datatype="LimitB" min="1" max="90" value="Re:{$msg['title']}">
			<input type="hidden" name="msgcc_1" />
			<input type="hidden" name="msgcc_2" /> <input type="hidden" name="Id" value="1"><input type="hidden" name="SearchString" value=""><input type="submit" name="Submit" value="确认处理" class="button"> <input type="reset" name="reset" value="重新填写" class="button"></td>
		</tr>
		</table>
		</form>
	</td>
	</tr>
	</table>
	
	
	<!--}-->
	
	
	<!--}-->
	
</body>
</html>
