<{import file="index/header_shop.html" title="售后详情"}> 
<style type="text/css">
.process ul li.step{ width:315px;}
.rbox{ width:944px; border:1px solid #eee; padding:0; float:left; }
.rbox .pleft{ width:650px; min-height:350px; border-right:1px solid #eee; float:left;}
.rbox .pleft .snav{ width:100%; border-bottom:1px solid #efefef; float:left; }
.rbox .pleft .snav span{ padding:8px 20px; font-size:16px; color:#333; float:left; } 

/*操作按钮*/
.action{ width:100%; padding:30px 0 50px 0; float:left;}
 
.s-con{ width:100%; } 
.submit_msg{width:100%; font-size:14px; text-align:center; padding:20px 0 20px 0; float:left;}

/*历史记录*/
.refund_log {width:610px;margin:0 20px; padding:6px 0;  border-top:1px solid #efefef;  float: left; }
.refund_log .pname{ width:620px; margin:0; float:left;}
.refund_log .pname span{ margin-top:10px; padding:0 0 0 10px; border-left:3px solid #f00; line-height:15px; color:#666; font-size:14px; float:left;} 
.refund_log .pcon{ width:620px; padding:0 0 50px 0; float:left; } 
.refund_log .pcon .my{ width:100%; padding:10px 0; border-bottom:1px dashed #efefef; float:left;}
.refund_log .pcon .my .myname{width:620px; padding:5px 0; float:left;}
.refund_log .pcon .my .myname span{ padding:0 10px 0 0; color:#333333; font-size:14px; float:left;}
.refund_log .pcon .my .myname em{ padding:2px 0 0 20px; color:#999; font-style:inherit; float:left; }
.refund_log .pcon .my .mycon{ width:620px; padding:0; color:#666; line-height:26px; float: left; }

/*右侧*/
.rbox .pright{ width:260px; padding:0 15px 0; height:350px; border-left:1px solid #eee; margin-left:-1px; float:left;} 
.rbox .pright .sname{ width:100%; padding:8px 0; margin:0 0 5px 0; border-bottom:1px solid #eee; float:left;}
.rbox .pright .sname span{ margin-top:10px; padding:0 0 0 10px; font-size:14px; line-height:15px; border-left:3px solid #f00; color:#666666; float:left;}
.rbox .pright .scon{ padding:0; width:280px; float:left; }
.rbox .pright .scon dl{ width:260px; padding:3px 10px 3px 0; float:left;}
.rbox .pright .scon dl dt{ width:70px; color:#999; text-align:left; padding:0 12px 0 0; float:left; }
.rbox .pright .scon dl dd{ width:165px; color:#333; float:left; } 
</style>
</head>
<{uqcms m="refund" v="row" c="get_one:service_id=smarty.get.service_id&is_shop=1"}> 
<div class="lbox">
	<div class="process">
		<ul>
			<li class="step <{if $row.order_status >= 1 || $rrow.status == ''}>step1<{else}>step0<{/if}>">
				<div class="ttl">1.买家申请退款</div>
				<div class="number">√</div> 
				<div class="meta"><{if $row.addtime}><{$row.addtime}><{/if}></div>
			</li>
			<li class="step <{if $row.status >= 2}> step1<{else}>step0<{/if}>">
				<div class="ttl">2.商家 处理退款申请</div>
				<div class="number">√</div> 
				<div class="meta"><{if $row.passtime}><{$row.passtime}><{/if}></div>
			</li>
			<li class="step <{if $row.status == 5}> step1<{else}>step0<{/if}>">
				<div class="ttl">3.结束完成</div>
				<div class="number">√</div>
				<div class="meta"><{if $row.endtime}><{$row.endtime}><{/if}></div>
			</li> 
		</ul>
	</div>  
	<div class="rbox">  
		<div class="pleft"> 
			<div class="s-con"> 
			<{if $row}>
				<{if $row.status == '1'}>
					<div class="action">
						<form action="#" method="post" id="form2"> 
							<input type="hidden" name="service_id" value="<{$row.service_id}>"/> 
							<table class="etable">
								<tr>
									<td width="100">退货原因：</td>
									<td><{$row.reason_cn}></td>
								</tr>
								<tr>
									<td>退款金额：</td>
									<td><{$row.price}></td>
								</tr>
								<tr>
									<td>退款说明：</td>
									<td><{$row.remarks}></td>
								</tr>
								<{if $row.certificate_img}>
									<tr>
										<td>上传凭证：</td>
										<td><img src="<{$__IMG__}><{$row.certificate_img|img_size:80x80}>" width="80"/></td>
									</tr> 
								<{/if}>
								<tr>
									<td>退货操作：</td>
									<td>
										<select name="is_return">
											<option value="0">--请选择操作--</option>
											<option value="return_goods">同意退货【需买家发货】</option>
											<option value="return_price">直接退款【无需退货】</option>
											<option value="no_agreen">不同意/平台介入</option>
										</select> 
									</td>
								</tr> 
								<tr>
									<td valign="top" style="padding-top:8px;">回复备注：</td>
									<td><textarea name="content" cols="70" rows="2"></textarea></td>
								</tr>
								<tr>
									<td>&nbsp;</td>
									<td><input type="submit" name="return_submit" class="submit"  value="确定"/></td>
								</tr>
							</table>
						</form> 	 
					</div>
				<{elseif $row.status == '2'}>
					 <div class="submit_msg">已经同意退款，等待买家退货。</div>
				<{elseif $row.status == '3'}> 
					<div class="action">
						<form action="#" method="post" id="form2">
							<input type="hidden" name="service_id" value="<{$row.service_id}>"/> 
							<table class="etable"> 
								<tr>
									<td width="120">操作状态：</td>
									<td>已经发货,等待商家确认收货</td>
								</tr> 
								<tr>
									<td>退货操作：</td>
									<td> 
										<select name="is_return">
											<option value="0">--请选择操作--</option>
											<option value="return_price">确认收货并退款</option> 
											<option value="no_agreen">不同意/平台介入</option>
										</select>
									</td>
								</tr> 
								<tr>
									<td>回复备注：</td>
									<td><textarea name="content" cols="70" rows="2"></textarea></td>
								</tr>
								<tr>
									<td>&nbsp;</td>
									<td><input type="submit" name="return_submit" class="submit"  value="确定"/></td>
								</tr>
							</table>
						</form>
					</div>
				<{elseif $row.status == '4'}>
					<div class="submit_msg">平台介入/等待官方处理</div>
				<{elseif $row.status == '5'}>
					<div class="submit_msg">退款成功</div>
				<{elseif $row.status == '6'}>
					<div class="submit_msg">退款失败</div>
				<{/if}>
			<{else}>
				<div class="submit_msg">未提交申请</div>
			<{/if}> 
			</div>
			
			<!--协商记录-->
			<div class="refund_log">
				<div class="pname"><span>协商记录</span></div>
				<div class="pcon">
					<{foreach item=i from=$row.process}>
						<div class="my">
							<div class="myname">
								<span><{$i.title}></span> <em><{$i.addtime}></em>
							</div>
							<div class="mycon"><{$i.content}></div>
						</div>
					<{/foreach}> 
				</div>
			</div>
			
		</div>
		
		<!--售后商品情况--->
		<{uqcms m="refund" v="goods" c="refund_goods:service_id=smarty.get.service_id&is_shop=1"}>
		<div class="pright">
			<div class="sname"><span>售后商品</span></div>
			<div class="scon">
				<dl style="border-bottom:1px dashed #efefef; padding:8px 0; margin-bottom:10px;">
					<dt style="width:60px;"><a href="index.php?m=goods&a=detail&id=<{$row.goods_row.gid}>" target="_blank"><img src="<{$__IMG__}><{$goods.images|img_size:60x60}>" width="60"/></a></dt>
					<dd><a href="index.php?m=goods&a=detail&id=<{$goods.gid}>" target="_blank"><{$goods.title}></a></dd>
				</dl>
				<dl>
					<dt>订单编号：</dt>
					<dd><{$goods.order_no}></dd>
				</dl>
				<dl>
					<dt>卖&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;家：</dt>
					<dd><{$goods.shop_name}></dd>
				</dl>
				<dl>
					<dt>价&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格：</dt>
					<dd>￥<{$goods.goods_price}></dd>
				</dl>
				<dl>
					<dt>数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;量：</dt>
					<dd>￥<{$goods.buy_num}></dd>
				</dl>
				<dl>
					<dt>总&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;计：</dt>
					<dd style="color:#FF0000; font-weight:bold; font-family:tahoma,arial;">￥<{$goods.goods_price}></dd>
				</dl>
				<dl>
					<dt>支付时间：</dt>
					<dd><{$goods.pay_time}></dd>
				</dl>
			</div> 
		</div>
	</div>  
</div> 
<{include file="index/footer.html"}> 
<script type="text/javascript">
$(function(){
	$("form#form2").submit(function(){  
		pars = $("select").find("option:selected").val(); 
		if(pars == '0'){ $.alert('请选择退货操作');	return false;  } 
		var params = $("#form2").serialize();
		$.post('member.php?m=goods_order&a=seller_submit', params, function(result){ 
			var data = jQuery.parseJSON(result); 
			if(data.error == '0'){
				$.alert('操作成功', function(){
					location.reload();
				}); 
			}else{
				$.alert(data.msg);
			}
		});  
		return false;
	});
});
</script>
