代码拉取完成,页面将自动刷新
<?php
header('Content-type: text/html; charset=utf-8');
require_once('connDB.php');
if((isset($_GET['ShowType']))&&($_GET['ShowType']=="showallinv")){
//echo "ok";
$sql="SELECT * FROM `showallinv1` ";
$result=mysql_query($sql,$dbc);
//$row_Rec=mysql_fetch_assoc($result);
$totalNum=mysql_num_rows($result);
//LOTID 递增 SKU QTY OPTID LOC ATTID
if($totalNum>0){
$table1='<table border="1" cellpadding="0" cellspacing="0" width="1024">';
$table1=$table1.'<tr><td>行号</td><td>LOTID</td><td>SKU</td><td>QTY</td><td>OPTID</td><td>LOC</td><td>ATTID</td></tr>';
$i1=1;
while($row_Rec=mysql_fetch_assoc($result)){
$table1=$table1.'<tr><td>'.$i1++.'</td>';
$table1=$table1.'<td>'.$row_Rec['LOTID'].'</td>';
$table1=$table1.'<td>'.$row_Rec['SKU'].'</td>';
$table1=$table1.'<td>'.$row_Rec['QTY'].'</td>';
$table1=$table1.'<td>'.$row_Rec['OPTID'].'</td>';
$table1=$table1.'<td>'.$row_Rec['LOC'].'</td>';
$table1=$table1.'<td>'.$row_Rec['ATTID'].'</td></tr>';
}
$table1=$table1.'</table>';
//echo $table1;
$obj->status="complete";
$obj->result=1;
$obj->tableData=$table1;
echo json_encode($obj);
}else{
$obj->status="Error No Data";
$obj->result=0;
echo json_encode($obj);
return;
}
return;
}
/**/
if((isset($_GET['ShowType']))&&($_GET['ShowType']=="showall")){
//echo 'OK';
$sql="SELECT * FROM `showinv2` ORDER BY Id DESC;";
$result=mysql_query($sql,$dbc);
$row_Rec=mysql_fetch_assoc($result);
$totalNum=mysql_num_rows($result);
if($totalNum>0){
$table1='<table border="1" cellpadding="0" cellspacing="0" width="1024">';
$table1=$table1.'<tr><td>ID</td><td>LOTID</td><td>SKU商品编码</td><td>库存数量</td><td>入库编号</td><td>入库子编号</td><td>库位</td><td>商品中文名</td><td>供应商中文名</td><td>是否冻结</td></tr>';
do{
//echo "".row_Rec['Id']."".row_Rec['LOTID']."".row_Rec['SKU']."".row_Rec['QTY']."".row_Rec['ASNID']."".row_Rec['VCODE']."".row_Rec['LOC']."".row_Rec['skucn']."".row_Rec['custcn']."<br/>";
/*echo $row_Rec['Id'].",".
$row_Rec['LOTID'].",".
$row_Rec['SKU'].",".
$row_Rec['QTY'].",".
$row_Rec['ASNID'].",".
$row_Rec['VCODE'].",".
$row_Rec['LOC'].",".
$row_Rec['skucn'].",".
$row_Rec['custcn']."<br/>";*/
$table1=$table1.'<tr>';
$table1=$table1.'<td>'.$row_Rec['Id'].'</td>';
$table1=$table1.'<td>'.$row_Rec['LOTID'].'</td>';
$table1=$table1.'<td>'.$row_Rec['SKU'].'</td>';
$table1=$table1.'<td>'.$row_Rec['QTY'].'</td>';
$table1=$table1.'<td>'.$row_Rec['ASNID'].'</td>';
$table1=$table1.'<td>'.$row_Rec['VCODE'].'</td>';
$table1=$table1.'<td>'.$row_Rec['LOC'].'</td>';
$table1=$table1.'<td>'.$row_Rec['skucn'].'</td>';
$table1=$table1.'<td>'.$row_Rec['custcn'].'</td>';
$table1=$table1.'<td>'.$row_Rec['isHold'].'</td>';
$table1=$table1.'</tr>';
}while($row_Rec=mysql_fetch_assoc($result));
$table1=$table1.'</table>';
//echo $table1;
$obj->status="complete";
$obj->result=1;
$obj->tableData=$table1;
echo json_encode($obj);
return;
}else{
$obj->status="Error No Data";
$obj->result=0;
echo json_encode($obj);
return;
}
}
//Id LOTID SKU QTY ASNID VCODE LOC skucn custcn
//shownolot
if((isset($_GET['ShowType']))&&($_GET['ShowType']=="shownolot")){
$sql="SELECT * FROM `showinvnolot` ";
$result=mysql_query($sql,$dbc);
$row_Rec=mysql_fetch_assoc($result);
$totalNum=mysql_num_rows($result);
if($totalNum>0){
$table1='<table border="1" cellpadding="0" cellspacing="0" width="1024">';
$table1=$table1.'<tr><td>SKU商品编码</td><td>总可用库存</td><td>商品中文名 </td><td>供应商ID</td><td>供应商中文名</td></tr>';
do{
/*echo $row_Rec['SKU'].",".
$row_Rec['Sum_QTY'].",".
$row_Rec['skucn'].",".
$row_Rec['custid'].",".
$row_Rec['custcn']."<br/>";*/
$table1=$table1.'<tr>';
$table1=$table1.'<td>'.$row_Rec['SKU'].'</td>';
$table1=$table1.'<td>'.$row_Rec['Sum_QTY'].'</td>';
$table1=$table1.'<td>'.$row_Rec['skucn'].'</td>';
$table1=$table1.'<td>'.$row_Rec['custid'].'</td>';
$table1=$table1.'<td>'.$row_Rec['custcn'].'</td>';
$table1=$table1.'</tr>';
}while($row_Rec=mysql_fetch_assoc($result));
$table1=$table1.'</table>';
//echo $table1;
$obj->status="complete";
$obj->result=1;
$obj->tableData=$table1;
echo json_encode($obj);
return;
}else{
$obj->status="Error No Data";
$obj->result=0;
echo json_encode($obj);
return;
}
}
//SELECT * FROM `showinvnolot`
//SKU Sum_QTY skucn custid custcn
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。