1 Star 1 Fork 1

gujiejing / WEBWMS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
inventoryf.php 4.68 KB
一键复制 编辑 原始数据 按行查看 历史
wisdom 提交于 2017-11-03 23:31 . upupup new alll
<?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
?>
PHP
1
https://gitee.com/laotou99_admin/WEBWMS.git
git@gitee.com:laotou99_admin/WEBWMS.git
laotou99_admin
WEBWMS
WEBWMS
master

搜索帮助