<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=">
<title>后台管理系统</title>
<link rel="stylesheet" href="__PUBLIC__/Admin/css/css.css">
<script src="__PUBLIC__/Admin/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/Common/Layer/layer.js"></script>
<script src="__PUBLIC__/Common/Layer/extend/layer.ext.js"></script>
<script src="__PUBLIC__/Common/My97Date/WdatePicker.js"></script>

<script>
//查看详情
	function look_detail(id){
		parent.layer.open({
			type: 2,
			title: '订单',
			shadeClose: true,
			shade: 0.5,
			maxmin: true,
			area: ['80%', '90%'],
			content: "{:U('Goods/order_lst_detail')}?id="+id //iframe的url
		});
	}
	function refresh(){
		window.location.href="{:U('Goods/orders_list')}"
	}
</script>
</head>
<body>
<style>
	.tr_content {
		line-height: 32px;
		height:32px;
		font-size: 14px;
	}
	
	.layui-layer-title{
		font-weight:bold;
	}
</style>
<div class="nav">
	<div class="nav_title">
    	<h4><img class="nav_img" src="__PUBLIC__/Admin/img/tab.gif" /><span class="nav_a">理财专区</span></h4>
    </div>
</div>
<div class="list">
	  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_table">
      <thead>
	    <tr>
	      <td width="10%"><div align="center">序号</div></td>
	      <td width="10%"><div align="center">消费档次</div></td>
	      <td width="20%"><div align="center">年利率</div></td>
	      <td width="20%"><div align="center">半年利率</div></td>
	      <td width="20%"><div align="center">最大可购买理财金额</div></td>
		  <td><div align="center">操作</div></td>

        </tr>
        </thead>
        <tbody>
		   <volist name='rows' id='row'>
	  		<tr class="tr_content" onmouseover="$(this).css('color','red')" onmouseleave="$(this).css('color','#555')">
				<td width="10%" style="height: 40px"><div align="center">{$i}</div></td>
				<td width="10%"><div align="center">{$row.grade}</div></td>
				<td width="20%"><div align="center"><?php echo $row['annual_rate']* 100;?>%</div></td>
				<td width="20%"><div align="center"><?php echo $row['half_rate']* 100;?>%</div></td>
				<td width="20%"><div align="center">{$row.max_buy}</div></td>
				<td>
				<div align="center">
				<a href="javascript:void (0);" style=" background-color: #146AC1; padding: 8px; border-radius: 4px; color: #ffffff" onclick="edit({$row.id})">编辑</a>
				<!-- <a class="a_button" href="javascript:;" onclick="del({$vo[id]})">删除</a> -->
				</div>
				</td>
			</tr>
			</volist>
        </tbody>
<script>
function done(id,td){
	//prompt层
	var index=layer.prompt({
	  title: '输入操作密码，并确认',
	  formType: 1 //prompt风格，支持0-2
	}, function(pass){
	$(".layui-layer-btn0").attr("disabled","disabled");
	$(".layui-layer-btn0").text("提交中...");
	  $.post("{:U('Goods/done')}",{
					   'order_id':id,
					   'password':pass
					},function(data){
						if(data==1){
							layer.close(index); 
							$(td).hide();
							layer.msg('已经成功标记为确认收货');
						}else if(data==2){
							layer.close(index); 
							layer.msg('密码错误');
						}else{
							layer.close(index); 
							layer.msg('标记出错');
						}
					})
	});
}

	function edit(id){
		parent.layer.open({
			type: 2,
			shadeClose: true,
			shade: 0.2,
			area: ['800px', '480px'],
			title: '',
			content: "{:U('Financial/edit')}"+"?id="+id,
		});
	}
</script>
  </table>
</div>

<!-- 分页 -->
<div class="page">
{$page}
</div>


</body>
</html>
