<?php
	session_start();
	require_once("../Wx.Config.php");	//只加载一次
	
	$strbillno = trim($_REQUEST["selbillno"]);
?>
<!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 language="JavaScript"> 
		//不允许进行后退
		javascript:window.history.forward(0); 
	</script>
</head>

<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<!--第一个页面的内容实现---------------------------->
<section data-role="page" id="mdipage1">
    <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="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="20"></td>
		  	</tr>
		</table>
	</header>
	
	<article data-role="none">
					
		<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
			<tr>
				<td height="8" width="15"></td>
				<td height="8" align="left"></td>
				<td height="8" width="60"></td>
				<td height="8" width="15"></td>
			</tr>
			<?php 
				require_once("db/db.php");	
				require_once("common/common.php");
				//判断是否有沽清的项目
				$sql = sprintf("SELECT a.Item_Name,a.Item_Unite,a.Item_Count FROM WX_Bill_Item a,WX_Bill_Inform b,TCP_Item_List d,TCP_Item_Type e
								Where a.Bill_No=b.Bill_No And b.Bill_No='%s' And e.DListNo=b.DListNo And d.TypeListNo=e.ListNo 
								And a.Item_No=d.ItemNo And d.SellClearFlag>0 And a.Item_Count>d.SellClearCount",$strbillno);
										
				$result = querySql($sql);
				
				while($row = fetch_array($result))
				{
					$strItemName = $row['Item_Name'];
					$strItemUnite = $row['Item_Unite'];
					$intItemCount = $row['Item_Count'];
					
					if(strlen($strItemUnite)>0)
					{
						$strItemUnite=$intItemCount . ' ' . $strItemUnite;
					}
					else
					{
						$strItemUnite=$intItemCount;
					}
					
			?>
				

			<tr>
				<td height="30" width="15"></td>
				<td height="30" align="left">
					<span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;"><?php echo $strItemName;?></span>
				</td>
				<td height="8" width="60">
					<span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;"><?php echo $strItemUnite;?></span>
				</td>
				<td height="30" width="15"></td>
			</tr>
			
			<tr>
				<td height="5" width="15"></td>
				<td height="5" colspan="2" align="left"></td>
				<td height="5" width="15"></td>
			</tr>
			
			<tr>
				<td height="1" width="15"></td>
				<td height="1" align="left" colspan="2" bgcolor="#F2E2E2"></td>
				<td height="1" width="15"></td>
			</tr>
			
			<tr>
				<td height="5" width="15"></td>
				<td height="5" colspan="2" align="left"></td>
				<td height="5" width="15"></td>
			</tr>
				
			<?php					
				}				
				freeResult($result);	//释放数据库
				closeDb();		
			?>
			
			<tr>
				<td height="5" width="15"></td>
				<td height="5" colspan="2" align="left"></td>
				<td height="5" width="15"></td>
			</tr>
			
			<tr>
				<td height="8" width="15"></td>
				<td height="8" align="center" colspan="2">
					 <div data-rel="back" onClick="bmtReturnBill()" 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="8" width="15"></td>
			</tr>
		
			
			<tr>
				<td height="6" width="15"></td>
				<td height="6" colspan="2" align="left"></td>
				<td height="6" width="15"></td>
			</tr>
		</table>
	
		
		<script type="text/javascript">	 	
			//返回到订单页面
			function bmtReturnBill()
			{
				var strBillNo = <?php echo $strbillno;?>;
				window.location="ordermodify.php?selbillno=" + strBillNo;
			};
		</script>
		
	<script>
		//禁止页面上下滑动,整个页面都不能滑动了
		document.addEventListener('touchmove', function(e) {
			e.preventDefault();
		});
	</script>
	
	</article>
</section>

</body>
	
</html>