<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="admin/admin/template/style/admin.css" rel="stylesheet" type="text/css" />
<script src="include/js/jquery.js" type="text/javascript"></script>
<script src="include/js/admin.js" type="text/javascript"></script>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
</head>
<body>
<script Language="javascript">

//查看订单
function ordercheck(id)
{
	location.href='?c=ld_order&a=ordershow&orderid='+id;	
}

function func_confirmpay(id,uid,type)
{
	//1确认收款2确认发货
	var Arr = {"1":['你确认已收款吗？'],"2":['你确认要发货吗？']};
	var aa= confirm(Arr[type]);
	if(aa==false)
	{
		return false;	
	}
	
	$.ajax({
		url:'?c=ld_order&a=index&run='+type,
		type:'POST',
		data:{myid:id,myuid:uid},
		
		success:function(bc)
		{
			alert(bc);
			location.href = location.href;
		}
	});
}



</script>
<div class="maintop">当前位置：<?php echo $toptxt ?></div>
<div class="main">
<table width="100%" class="tablist">
  <tr class="trbg">
    <td width="160">订单ID</td>
    
    <td>前台订单号</td>
    <td>收货人</td>
    <td>联系电话</td>
    <td>收货地址</td>
    <td>下单时间</td>
    <td>订单状态</td>
    <td>操作</td>
  </tr>
  <?php if(!empty($orderlist)){ ?>
  	<?php foreach($orderlist as $v){ ?>
	<tr>
    <td width="160"><?php echo $v['id']; ?></td>
    <td width="160"><?php echo $v['order_code'].'-'.$v['id']; ?></td>
    <td width="160"><?php echo $v['reciver_user']; ?></td>
    <td><?php echo $v['mobile']; ?></td>
    <td><?php echo $v['address']; ?></td>
    <td><?php echo date('Y-m-d H:i:s',$v['adddate']);?></td>
    <td><?php echo $orderStatus[$v['status']] ?></td>
    <td width="80">
    <!-- 
    <?php if(2==$v['status']){ ?>
    	<input type="button" value="确认收款" onClick="func_confirmpay(<?php echo $v['id'].','.$v['mid'].',1';?>)" style="cursor:pointer" />
    <?php }elseif(4==$v['status']){ ?>
    <input type="button" value="发货" onClick="func_confirmpay(<?php echo $v['id'].','.$v['mid'].',2';?>)" style="cursor:pointer" />
    <?php } ?>
    
    <input type="button" value="查看" onClick="ordercheck(<?php echo $v['id'];?>)" style="cursor:pointer" />
     -->
    <div class="oper" style="width: 20px;padding:0;"><a href="?c=ld_order&a=ordershow&orderid=<?php echo $v['id'];?>" >查看</a></div>
    </td>
  </tr>
	<?php } ?>
<?php }?>

</table>
<ul class="c pages"><?php echo $pages ; ?></ul>
</div>
</body>

</html>
