<?php
	session_start();
	require_once("../Wx.Config.php");	//只加载一次
	
	ini_set('session.gc_maxlifetime', 99999999); //设置时间 永不过期
	
	$strselcarttempid = trim($_SESSION["main_defcarttempid"]);
	$_SESSION["main_defcarttempid"]="";
	$_SESSION["main_defcarttempid"] = $strselcarttempid;
	
	header("Content-type:text/html;charset=gb2312");
?>

<!DOCTYPE html>
<html>
<head>
	<meta charset="gb2312">	
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<meta name="apple-mobile-web-app-capable" content="1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="format-detection" content="telephone=0">
	<meta name="apple-touch-fullscreen" content="1">

	<title>微信商城</title>
	
	<link rel="stylesheet" href="css/mycss.css"> 
	<script src="jsp4/jquery.js"></script>
	<!--<link rel="stylesheet" href="jsp5/jquery.mobile-1.4.5.min.css">-->
	<!--<script src="jsp4/jquery.mobile-1.4.3.min.js"></script>-->
	<script src="jsp5/jquery.mobile-1.4.5.min.js"></script>
	<link rel="stylesheet" href="jsp5/jquery.mobile-1.4.5.min.css">
	
	
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	  
    
	<script language="JavaScript"> 
		//不允许进行后退
		javascript:window.history.forward(0); 
	</script>
</head>

<?php

	//加载系统参数信息
	require_once("db/db.php");	
	require_once("common/common.php");
	
	$fltintegralcashrate = 0;
	
	$strselBillNo=trim($_REQUEST['selbillno']);
	
	$sql=sprintf("SELECT IntegralCashRate from VIP_Config");
	$result = querySql($sql);
	
	if($row = fetch_array($result))
	{
		$fltintegralcashrate = $row['IntegralCashRate'];
	}
	freeResult($result);	//释放数据库
	
	
	//获得单据信息
	$intBillState = 0;
	$strReceiveMan = '';
	$strReceiveTel = '';
	$strReceiveAddr = '';
	$strTradeTime = '';
	$strPayForTime = '';
	$strSendOutTime = '';
	$strFinishTime = '';
	
	$sql=sprintf("SELECT BillState,CONVERT(varchar(16),TradeTime, 120) AS TradeTime,CONVERT(varchar(16),PayForTime, 120) AS PayForTime,CONVERT(varchar(16),SendOutTime, 120) AS SendOutTime,
					CONVERT(varchar(16),FinishTime, 120) AS FinishTime,ReceiveMan,ReceiveTel,ReceiveAddr FROM WX_Bill_Inform Where Bill_No='%s'",$strselBillNo);
	
	$result = querySql($sql);
	
	if($row = fetch_array($result))
	{
		$intBillState = $row['BillState'];
		$strReceiveMan = $row['ReceiveMan'];
		$strReceiveTel = $row['ReceiveTel'];
		$strReceiveAddr = $row['ReceiveAddr'];
		$strTradeTime = $row['TradeTime'];
		$strPayForTime = $row['PayForTime'];
		$strSendOutTime = $row['SendOutTime'];
		$strFinishTime = $row['FinishTime'];
	}
	freeResult($result);	//释放数据库
	
	//0未支付,1已支付,2已发货,3已完成,4交易取消
	$strBillState = '未支付';
	$strShowTime = $strTradeTime;
	switch($intBillState)
	{
		case 1:
			$strBillState = '已支付';
			$strShowTime = $strPayForTime;
			break;
		case 2:
			$strBillState = '已发货';
			$strShowTime = $strSendOutTime;
			break;
		case 3:
			$strBillState = '已完成';
			$strShowTime = $strFinishTime;
			break;
		case 4:
			$strBillState = '交易取消';
			$strShowTime = $strFinishTime;
			break;
	}
	
	$strBillPayForText = '';	
	if($intBillState>0 & $intBillState<4)
	{
		//得到付款信息
		$sql=sprintf("Select PayForType,PayForVal,Remarks from WX_Bill_PayFor Where Bill_No='%s'",$strselBillNo);
		$result = querySql($sql);
	
		while($row = fetch_array($result))
		{
			$strPayType = $row['PayForType'];
			$fltPayValue = $row['PayForVal'];
			$strPayRemarks = $row['Remarks'];
			$strPayValue = number_format($fltPayValue,1);
			$strPayValue = str_replace(',','',$strPayValue);
			
			if(strlen($strBillPayForText)>0)
			{
				$strBillPayForText = $strBillPayForText.'，'.$strPayType.'('.$strPayValue.')：'.$strPayRemarks;
			}
			else
			{
				$strBillPayForText = $strBillPayForText.$strPayType.'('.$strPayValue.')：'.$strPayRemarks;
			}
		}
		freeResult($result);	//释放数据库
	
	}
	if($intBillState == 4)
	{
		$strBillPayForText = '订单已取消';		
	}
	
	$fltsumvalue = 0;
	$intsumcount = 0;

?>

<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">		
<!--第一个页面的内容实现---------------------------->
<section data-role="page" id="page1">
	<header data-role="header" data-position="fixed" data-tap-toggle="false" style="border-top-width:0px;border-bottom-width:0px;">
        <table width="100%" height="52" border="0" cellpadding="0" cellspacing="0" bgcolor="<?php echo WxMainConfig::colHeadBkColor;?>">
		   	<tr>
            	<td height="50" width="30" align="right">
	                <a href="orderlist.php?bstat=0&bstat=<?php echo $intBillState;?>" target="_blank"data-iconpos="notext">
	                    <img src="images\back.png" width="12" height="21" border="0" style="margin-top:3px;">
                    </a>
				</td>
				<td height="52" width="20"></td>
				<td height="52" align="center" valign="middle">
	                <span style="color:<?php echo WxMainConfig::colHeadTextColor;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:19px;text-shadow:none;">订单详情</span>
               	</td>
				<td height="52" width="40"></td>
		  	</tr>
		</table>
	</header>
	
	<article data-role="none">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
            <tr><td height="5" colspan="3"></td></tr>
            
            <tr>
                <td height="10" width="5"></td>
                <td height="10" align="left">
                	<table width="100%" border="0" cellpadding="0" cellspacing="0">
                    	<tr>
                			<td height="20" width="30" align="right">
                            	<img src="images\item.png" width="18" height="20" border="0" style="margin-top:3px;">
                            </td>
                            <td height="20" width="8"></td>
                            <td height="20" align="left">
                            	<span style="color: #816618;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;"><?php echo $strBillState;?></span> 
                            </td>
                            <td height="20" width="120" align="right">
                            	<span style="color: #CCB2B4;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;"><?php echo $strShowTime;?></span> 
                            </td>
                            <td height="20" width="5"></td>
                     	</tr>
                        
                        <tr><td height="5" colspan="4"></td></tr>
                        
                        <tr>
                			<td height="20" width="30" align="right" valign="top">
                            	<img src="images\address.png" width="18" height="20" border="0" style="margin-top:3px;">
                            </td>
                            <td height="20" width="8"></td>
                            <td height="20" align="left" colspan="2">
                            	<table width="100%" border="0" cellpadding="0" cellspacing="0">
                                	<tr>
	                                	<td height="10" width="100">
	                                    	<span style="color: #CCB2B4;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;">收货人：<?php echo $strReceiveMan;?></span> 
                                    	</td>
                                       	<td height="10" align="right">
	                                    	<span style="color: #CCB2B4;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;"><?php echo $strReceiveTel;?></span> 
                                    	</td>
                                    </tr>
                                    <tr>
	                                	<td height="10" colspan="2">
	                                    	<span style="color: #CCB2B4;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;">收货地址：<?php echo $strReceiveAddr;?></span> 
                                    	</td>
                                    </tr>
                                </table>
                            </td>
                            <td height="20" width="5"></td>
                     	</tr>
                        <tr><td height="2" colspan="4"></td></tr>
                    </table>
                </td>
                <td height="10" width="5"></td>
            </tr>
            
            <tr><td height="5" colspan="3"></td></tr>
            
            <tr><td height="4" colspan="3" bgcolor="#F2E2E2"></td></tr>
                        
            
			<?php 
                $intRowIndex = 0;
                
                $sql = sprintf("select ListNo,Item_No,Item_Name,Item_Unite,Remarks,wximage,Item_Price,Item_Count 
                    from WX_Bill_Item Where Bill_No='%s'",$strselBillNo);
                    
                $result = querySql($sql);

                while($row = fetch_array($result))
                {
                    $strlistno = $row['ListNo'];
                    $stritemno = $row['Item_No'];
                    $stritemname = $row['Item_Name'];
                    $fltprice = $row['Item_Price'];
                    $stritemunite = trim($row['Item_Unite']);
                    $strremarks = trim($row['Remarks']);
                    $stritemimg = trim($row['wximage']);
                    
                    $intitemcount = $row['Item_Count'];;
                    
                    //合计金额	
                    $fltitemvalue = round($fltprice * $intitemcount,1);
                    
                    $fltsumvalue = $fltsumvalue + $fltitemvalue;
                    $intsumcount = $intsumcount + $intitemcount;
                    
                    $stritemimg = 'hotel_images/TY001/1001.jpg';
                    
                    //处理数据转换和显示
                    $fltintegralval =  round($fltprice * $fltintegralcashrate,0);
                
                    $stritemprice = number_format($fltprice,1);
                    $striteminteg = number_format($fltintegralval,0);
                    $stritemprice = str_replace(',','',$stritemprice);
                    $striteminteg = str_replace(',','',$striteminteg);
                
                
                    if(strlen($stritemunite)>0)
                        $stritemunite ='/'.$stritemunite;
                                
                    $intRowIndex = $intRowIndex + 1;
            ?>
            <tr><td height="5" colspan="3"></td></tr>
            <tr>
                <td height="15" width="5"></td>
                <td height="15" align="left">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="20" width="10"></td>
                            <td height="20">
                            
                                <!---显示商品信息：图片，项目名称，单价，对应积分，项目说明 -->
                                <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                    	<td height="20"> 
                                        	<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:15px;"><?php echo $stritemname; ?></span> 
                                    	</td>
                                        <td height="20" width="140"> 
                                        	<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td height="100%" align="right">
                                                        <span style="color: #996600;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;">￥<?php echo $stritemprice.$stritemunite; ?></span> 
                                                    </td>
                                                    
                                                    <td width="50" height="100%" align="right">
                                                         <span style="color: #996600;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;">X&nbsp;
    <?php echo number_format($intitemcount,0); ?>&nbsp;&nbsp;</span> 
                                                    </td>
                                                </tr>
                                             </table>					
                                    	</td>
                                    </tr>

                                    <tr><td height="2" colspan="2"></td></tr>
                                    <tr><td height="10" colspan="2" valign="top">
										<span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;"><?php echo $strremarks; ?></span> 
                                    </td></tr>
                                    <tr><td height="4" colspan="2"></td></tr>
                                </table>
                                                                        
                            </td>
							<?php if($intBillState<1) {?>
							<td height="15" width="30" align="center">
								<div onClick="bmtDeleteOnItem('<?php echo $strlistno;?>')">
									<img src="images\del.png" width="22" height="22" border="0" style="margin-top:3px;">
								</div>
							</td>
							<?php } ?>
                        </tr>
                    </table>
                </td>
                <td height="15" width="5"></td>
            </tr>
            
            <tr><td height="1" colspan="3"></td></tr>
            
            <tr>
                <td height="1" width="5"></td>
                <td height="1" align="left">
                	<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0">
                    	<td height="1" width="5"></td>
                        <td height="1" align="left" bgcolor="#F2E2E2"></td>
                        <td height="1" width="5"></td>
                    </table>
                </td>
                <td height="1" width="5"></td>
            </tr>
            
            <?php	
                    
                }
                freeResult($result);	//释放数据库
                closeDb();				//关闭数据库
            ?>
            
            <tr><td height="4" colspan="3"></td></tr>
            
            <tr>
                <td height="20" width="5"></td>
                <td height="20">
                	<table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
                    	<tr>
                        	<td height="100%" align="right" valign="middle">
                              	<span id="spansum1" style="color: #E50015;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:15px;">
            			        	共&nbsp;<?php echo number_format($intsumcount,0);?>&nbsp;件商品，合计：￥<?php echo number_format($fltsumvalue,1);?>
			                    </span> 
                            </td>
                            <td height="100%" width="10"></td>
                        </tr>
                    </table>
                </td>
                <td height="20" width="5"></td>
            </tr>
            <tr><td height="4" colspan="3"></td></tr>
            
           	<tr><td height="4" colspan="3" bgcolor="#F2E2E2"></td></tr>
            
            <tr><td height="6" colspan="3"></td></tr>
            
            <tr>
				<td height="8" width="5"></td>
				<td height="8" align="center">
                	<?php if($intBillState>0) { ?>
                    	<span style="color: #E50015;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;"><?php echo $strBillPayForText;?></span> 
                    <?php } else { ?>
                         <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="50%" align="center">
									<a data-transition="slide" href="#ShowMsgBoxA" data-rel="popup" data-position-to="window" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666;text-decoration: none;">
										<div data-rel="back" style="border-radius:5px;width:80%; height:38px; background-color:#523D84;">
											<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
												<tr><td width="100%" height="100%" align="center">
													<span style="color:#fff ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;">取消订单</span>                            	
												</td></tr>
											</table>
										</div>
									</a>
									
									<!-- 以下是点击项目弹出的详细信息界面 -->
									<div data-role="popup" id="ShowMsgBoxA" data-corners="false">
										<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
										<table width="280" height="155" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
											<tr><td height ="2" colspan="3" align="center"></td></tr>
											<tr><td height ="35" colspan="3" align="center"><span style="color: #808000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:18px;text-shadow:none;">取消订单</span></td></tr>
											<tr><td height ="1" colspan="3" align="center" bgcolor="#F2E2E2"></td></tr>
											<tr><td height ="10" colspan="3" align="center"></td></tr>
																						
											 <tr>
												<td height ="18" width="10"></td>
												<td height ="18">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:15px;text-shadow:none;">确实要取消订单吗？</span>
																					
												</td>
												<td height ="18" width="10"></td>
											</tr>
																 

											<tr>
												<td height ="18" width="10"></td>
												<td height ="18" align="left">
													<span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;"><?php echo $strremarks2; ?></span> 
												</td>
												<td height ="18" width="10"></td>
											</tr>
											
											<tr><td height ="10" colspan="3" align="center"></td></tr>
																		
											<tr>
												<td height ="40" width="10"></td>
												<td height ="40" align="center">
													<div data-rel="back" onClick="bmtCancelBill()" style="border-radius:5px;width:80%; height:38px; background-color:#D7AA28;">
														<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
															<tr><td width="100%" height="100%" align="center">
																<span style="color:#fff ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;">取消订单</span>                            	
															</td></tr>
														</table>
													</div>
												</td>
												<td height ="40" width="10"></td>
											</tr>
											
											<tr><td height ="15" colspan="3" align="center"></td></tr>
										
										</table>
									</div>
									<!----------------------------------------------------->
									
									
									
									
									
									
                                </td>
                                <td width="50%" align="center">
                                    <div data-rel="back" onClick="bmtToPayFor()" style="border-radius:5px;width:80%; height:38px; background-color:<?php echo WxMainConfig::colHeadBkColor;?>;">
                                        <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                                            <tr><td width="100%" height="100%" align="center">
                                                <span style="color:#fff ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;">去支付</span>                            	
                                            </td></tr>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    <?php } ?>
                </td>
				<td height="8" width="5"></td>
			</tr>
            
			
			<?php if($intBillState==2) { ?>
			<tr>
				<td height="10" width="5"></td>
				<td height="10" align="left"></td>
				<td height="10" width="5"></td>
			</tr>
			 <tr>
				<td height="10" width="5"></td>
				<td height="10" align="center">
					<a data-transition="slide" href="#ShowMsgBox" data-rel="popup" data-position-to="window" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666;text-decoration: none;">
						<div data-rel="back" style="border-radius:5px;width:60%; height:38px; background-color:#D7AA28;">
							<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
								<tr><td width="100%" height="100%" align="center">
									<span style="color:#fff ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;">确认收货</span>                            	
								</td></tr>
							</table>
						</div>
					</a>
					
					<!-- 以下是点击项目弹出的详细信息界面 -->
					<div data-role="popup" id="ShowMsgBox" data-corners="false">
						<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
						<table width="280" height="155" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
							<tr><td height ="2" colspan="3" align="center"></td></tr>
							<tr><td height ="35" colspan="3" align="center"><span style="color: #808000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:18px;text-shadow:none;">确认收获</span></td></tr>
							<tr><td height ="1" colspan="3" align="center" bgcolor="#F2E2E2"></td></tr>
							<tr><td height ="10" colspan="3" align="center"></td></tr>
																		
							 <tr>
								<td height ="18" width="10"></td>
								<td height ="18">
									<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:15px;text-shadow:none;">确实要设置订单已收货吗？</span>
																	
								</td>
								<td height ="18" width="10"></td>
							</tr>
												 

							<tr>
								<td height ="18" width="10"></td>
								<td height ="18" align="left">
									<span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;"><?php echo $strremarks2; ?></span> 
								</td>
								<td height ="18" width="10"></td>
							</tr>
							
							<tr><td height ="10" colspan="3" align="center"></td></tr>
														
							<tr>
								<td height ="40" width="10"></td>
								<td height ="40" align="center">
									<div data-rel="back" onClick="bmtSetFinish()" style="border-radius:5px;width:80%; height:38px; background-color:#D7AA28;">
										<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
											<tr><td width="100%" height="100%" align="center">
												<span style="color:#fff ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;">确认收货</span>                            	
											</td></tr>
										</table>
									</div>
								</td>
								<td height ="40" width="10"></td>
							</tr>
							
							<tr><td height ="15" colspan="3" align="center"></td></tr>
						
						</table>
					</div>
					<!----------------------------------------------------->
					
				</td>
				<td height="10" width="5"></td>
			</tr>
			<tr>
				<td height="5" width="5"></td>
				<td height="5" align="left"></td>
				<td height="5" width="5"></td>
			</tr>
			<?php } ?>
			
			
			
            <tr><td height="6" colspan="3"></td></tr>
            
           	<tr><td height="1" colspan="3" bgcolor="#F2E2E2"></td></tr>
            
            <tr><td height="2" colspan="3"></td></tr>

			<tr>
				<td height="8" width="5"></td>
				<td height="5" >
					<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td height="100%" align="left">
								<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">								
									 <tr>
										<td height="6" align="left">
											<span style="color: #CCB2B4;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;">&nbsp;&nbsp;订单编号：<?php echo $strselBillNo;?></span> 
											<!--<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;"><?php echo $strselBillNo;?></span> -->
										</td>
									</tr>
									<tr>
										<td height="6" align="left">
											<span style="color: #CCB2B4;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;">&nbsp;&nbsp;创建时间：<?php echo $strTradeTime;?></span> 
										</td>
									</tr>
									<tr>
										<td height="6" align="left">
											<span style="color: #CCB2B4;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;">&nbsp;&nbsp;付款时间：<?php echo $strPayForTime;?></span> 
										</td>
									</tr>
									<tr>
										<td height="6" align="left">
											<span style="color: #CCB2B4;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;">&nbsp;&nbsp;发货时间：<?php echo $strSendOutTime;?></span> 
										</td>
									</tr>
									<tr>
										<td height="6" align="left">
											<span style="color: #CCB2B4;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;">&nbsp;&nbsp;完成时间：<?php echo $strFinishTime;?></span> 
										</td>
									</tr>
								</table>
							</td>
							<td height="100%" width="125" align="left" valign="middle">
								<?php if($intBillState>0 & $intBillState<4) {?>
								<img width="100" height="100" src="phpqrcodedo.php?mybar=<?php echo $strselBillNo;?>">
								<?php } ?>
							</td>
						</tr>
                    </table>
				</td>
				<td height="8" width="5"></td>
			</tr>
			
			<tr>
				<td height="15" width="5"></td>
				<td height="15" align="left"></td>
				<td height="15" width="5"></td>
			</tr>
           <!-- 
            <tr>
				<td height="10" width="5"></td>
				<td height="10" align="center">
					<div data-rel="back" onClick="bmtReturnBK()" style="border-radius:5px;width:60%; height:38px; background-color:#D7AA28;">
						<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
							<tr><td width="100%" height="100%" align="center">
								<span style="color:#fff ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;">返 回</span>                            	
                            </td></tr>
						</table>
                    </div>
				</td>
				<td height="10" width="5"></td>
			</tr>
            
			-->
			
			<tr>
				<td height="10" width="5"></td>
				<td height="10" align="left"></td>
				<td height="10" width="5"></td>
			</tr>
			
		</table>
	</article>
	
    
	 <script type="text/javascript">
	 	
		//删除一个项目
		function bmtDeleteOnItem(clistno)
		{
			
			var strurl="delbillitem.php?clistno=" + clistno;
			var strret="";
			//用ajax的“同步方式”调用一般处理程序
			$.ajax({
				url: strurl ,
				async: false,//改为同步方式
				type: "POST",
				//data: {doid:1, rmid: "strRoomNo" },
				success: function (RetData) 
				{
					strret = RetData;
				}
			});
			
			if(strret.length>0)
			{
				window.location="ordermodify.php?selbillno=<?php echo $strselBillNo;?>";
			}
			
		};
		
		//取消订单
		function bmtCancelBill()
		{
			var strBillNo = <?php echo $strselBillNo;?>;
			var strurl="ordercancel.php?selbillno=" + strBillNo + "&seldid=1";
			var strret="";
			//用ajax的“同步方式”调用一般处理程序
			$.ajax({
				url: strurl ,
				async: false,//改为同步方式
				type: "POST",
				//data: {doid:1, rmid: "strRoomNo" },
				success: function (RetData) 
				{
					strret = RetData;
				}
			});
			
			if(strret.length>0)
			{
				//得到新的数量值
				window.location="orderlist.php?bstat=0";
			}
		};
		
		//确认收货
		function bmtSetFinish()
		{
			var strBillNo = <?php echo $strselBillNo;?>;
			var strurl="ordercancel.php?selbillno=" + strBillNo + "&seldid=2";
			var strret="";
			//用ajax的“同步方式”调用一般处理程序
			$.ajax({
				url: strurl ,
				async: false,//改为同步方式
				type: "POST",
				//data: {doid:1, rmid: "strRoomNo" },
				success: function (RetData) 
				{
					strret = RetData;
				}
			});
			
			if(strret.length>0)
			{
				//得到新的数量值
				window.location="orderlist.php?bstat=3";
			}
		};

		function bmtReturnBK()
		{
			window.location="orderlist.php?bstat=0&bstat=<?php echo $intBillState;?>";	
		};
			
		//进入订单支付界面
		function bmtToPayFor()
		{	
			var strBillNo = <?php echo $strselBillNo;?>;
			window.location="orderpaysel.php?selbillno=" + strBillNo;									
		}
		
	</script>
	
</section>

</body>
	
</html>