
<!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>[.$ourphp_adminfont.admintitle.]</title>
<link href="templates/images/ourphp_login.css?ourphp" rel="stylesheet" type="text/css"> 
<script type="text/javascript" src="../../function/plugs/jquery/1.7.2/jquery-1.7.2.min.js"></script>
<script charset="utf-8" src="templates/images/ourphp.js"></script>
<script src="../../function/plugs/layer/layer.min.js"></script>
<script>
function look(id)
{
	$.post("[.$webpath.][.$adminpath.]/ourphp_adminrefresh.php?buylookok&id="+id,{},function(result){
		if(result.error == 0){
			alert("记录出错");
			return false;
		}else{
			$("#look"+id).html(" ");
		}
	},'json');
}
function dialog(id){
    $.layer({
        type: 2,
        title: '搜索',
        shade: [0],
		border: [5, 0.3, '#000'],
        area: ['80%', '600px'],
		iframe:{src: 'ourphp_adminsearch.php?ourphp=ourphp&stype=orders',scrolling: 'yes'}
    });
};
</script>
<style type="text/css">
.aaa {width:100%; float:left; margin-bottom:3px;}
.aa {float:left; width:33%;}
.bb {float:left; width:67%;}
</style>
</head>

<body>
<div style="height:50px;"></div>
<div style="clear:both"></div>
<div id="tabs0">
 <ul class="menu0" id="menu0">
  <li onclick="setTab(0,0)" class="hover">综合订单列表</li>
  <li onclick="setTab(0,1)" ><a href="ourphp_ordersalone.php?id=ourphp">单项处理订单</a></li>
  <li onclick="dialog('search')">搜索</li>
 </ul>
 <div class="main" id="main0" style="border-top:2px #488fcd solid; clear:both;">
  <ul class="block">
	  <li>
		<div class="ourphp_newslist">
			<form id="form2" name="form2" method="post" action="?ourphp_cms=Batch&page=[.intval($smarty.get.page).]">
			
			<table width="100%" border="0" cellpadding="10" class="ourphp_newslist">
			
			[.section loop=$orders name=op.]
			  <tr style="background:[.cycle values='#FCF6E9,#E8E7E5'.]">
				<td width="60%" valign="top">
				
					<table width="100%" border="0" cellpadding="10" class="ourphp_newslist">
					  <tr>
						<td width="2%"><div align="center">ID</div></td>
						<td width="29%">商品</td>
						<td width="18%">商品订单号</td>
						<td width="10%">订单时间</td>
						<td width="6%">付款？</td>
						<td width="6%">发货？</td>
						<td width="10%">发货时间</td>
						<td width="7%">签收？</td>
						<td width="12%" id="look[.$orders[op].id.]">操作[.if $orders[op].look == 0.]: <a href="javascript:look([.$orders[op].id.]);" class="color_a">未读订单</a>[./if.]</td>
					  </tr>
					  [.assign var="money" value=0.]
					  [.assign var="freight" value=0.]
					  [.foreach $orders[op].oid as $opop.]
					  [.sql mysql="select `id`,`OP_Ordersname`,`time`,`OP_Ordersnumber`,`OP_Orderspay`,`OP_Orderssend`,`OP_Ordersgotime`,`OP_Integralok`,`OP_Sign`, `OP_Ordersusermarket`,`OP_Ordersfreight`,`OP_Ordersnum`,`OP_Usermoneyback` from ourphp_orders where id = $opop" font="未找到数据!" name="sql".]
					  <tr>
						<td><div align="center"><font style="background:#009933; color:#FFFFFF; padding:2px; text-align:center;">[.$sql.0.]</font></div></td>
						<td>[.$sql.1.]</td>
						<td>[.$sql.3.]</td>
						<td>[.$sql.2.]</td>
						[.if $sql.12 != 3.]
							<td>
							[.if $sql.7 == 0.]
							[.if $sql.4 == 1.]<img src="[.$webpath.]skin/weifukuan.gif" border="0" />[.elseif $sql.4 == 2.]<img src="[.$webpath.]skin/yifukuan.gif" border="0" />[.elseif $sql.4 == 3.]<img src="[.$webpath.]skin/hdfukuan.gif" border="0" />[.elseif $sql.4 == 4.]虚拟币支付[./if.]
							[.else.]
							<img src="[.$webpath.]skin/jfdh.gif" border="0" />
							[./if.]
							</td>
							<td>[.if $sql.5 == 1.]<img src="[.$webpath.]skin/weifahuo.gif" border="0" />[.elseif $sql.5 == 2.]<img src="[.$webpath.]skin/yifahuo.gif" border="0" />[./if.]</td>
							<td>[.if $sql.5 == 2.][.$sql.6.][./if.]</td>
							<td>[.if $sql.8 == 0.]未签收[.elseif $sql.8 == 1.]已签收[./if.]</td>
						[.else.]
							<td>已退款</td>
							<td>已退款</td>
							<td>已退款</td>
							<td>已退款</td>
						[./if.]
						<td><a href="ourphp_ordersview.php?id=[.$sql.0.]"><img src="[.$webpath.]skin/chulidingdan.gif" border="0" /></a></td>
					  </tr>
					  [.assign var="money" value=$money + $sql.9 * $sql.11.]
					  [.assign var="freight" value=$freight + $sql.10.]
					  [./sql.]
					  [./foreach.]
					</table>
					
				</td>
				<td width="15%" valign="top">
					<p class="aaa"><input type="checkbox" name="op_b[]" value="[.$orders[op].id.]" /></p>
					<p class="aaa"><span class="aa">总订单号：</span><span class="bb">[.$orders[op].num.]</span></p>
					<p class="aaa"><span class="aa">创建时间：</span><span class="bb">[.$orders[op].time.]</span></p>
					<p class="aaa"><span class="aa">收货人姓名：</span><span class="bb">[.$orders[op].fname.]</span></p>
					<p class="aaa"><span class="aa">收货人电话：</span><span class="bb">[.$orders[op].ftel.]</span></p>
					<p class="aaa"><span class="aa">收货人地址：</span><span class="bb">[.$orders[op].fadd|replace:'|':''.]</span></p>
					<p class="aaa"><span class="aa">付款：</span><span class="bb">[.$money.] 元</span></p>
					<p class="aaa"><span class="aa">优惠券：</span><span class="bb">[.$orders[op].couponmoney.] 元</span></p>
					<p class="aaa"><span class="aa">运费：</span><span class="bb">[.$freight.] 元</span></p>
					<p class="aaa"><span class="aa">合计：[.$money - $orders[op].couponmoney + $freight.] 元</span></p>
				</td>
			  </tr>
				[.sectionelse.]
			  <tr>
				<td colspan="9">[.$ourphp_access.]</td>
			  </tr>
			[./section.]
			  <tr>
				<td></td>
				<td>
					<p class="aaa">
						<label><input onclick="selectAll()" type="checkbox" name="controlAll" style="controlAll" id="controlAll"/> 批量全选</label>
					</p>
					<p>
						<label><input type="radio" name="buy_del_print" value="del" /> 删除</label>
						&nbsp;&nbsp;
						<label><input type="radio" name="buy_del_print" value="print" checked /> 打印</label>
						&nbsp;&nbsp;
						<label><input type="radio" name="buy_del_print" value="go" /> 发货</label>
						&nbsp;&nbsp;
						<label><input type="radio" name="buy_del_print" value="buyok" /> 签收</label>
					</p>
				</td>
			  </tr>
			  <tr>
				<td></td>
				<td>
				<input type="submit" name="Submit" value="批量操作" style="width:80px; height:25px; background: #0099FF; color:#FFFFFF; border:0px;" onclick="javascript:return confirm('确定操作吗？成功后无法恢复哦。')" />
				</td>
			  </tr>
			  <tr>
				<td colspan="10">[.$ourphppage.]</td>
			  </tr>
			</table>
			</form>
        </div>
	  </li>
  </ul>
  
 </div>
</div>
[.include file="ourphp_foot.html".]
</body>
</html>