1 Star 1 Fork 1

gujiejing / WEBWMS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
inventory.php 6.47 KB
一键复制 编辑 原始数据 按行查看 历史
wisdom 提交于 2017-11-03 23:31 . upupup new alll
<?php
header('Content-type: text/html; charset=utf-8');
require_once('connDB.php');
$totalRow=0;
if(!isset($_SESSION)){
session_start();
}
$editFormAction = $_SERVER['PHP_SELF'];
/*$sql="SELECT * FROM `showinv` ";
$result=mysql_query($sql,$dbc);
$row_Rec=mysql_fetch_assoc($result);
$totalNum=mysql_num_rows($result);
*/
if((isset($_POST['MM_search']))&&($_POST['MM_search']=="Sform1")){
$LOTID = $_POST['LOTID'];
$SKU = $_POST['SKU'];
$ASNID = $_POST['ASNID'];
$LOC = $_POST['LOC'];
$skucn = $_POST['skucn'];
$custcn = $_POST['custcn'];
$sql="SELECT * FROM `showinv` WHERE";
if(!empty($LOTID)){
$sql=$sql." `showinv`.`LOTID` = '$LOTID' AND ";
}
if(!empty($SKU)){
$sql=$sql." `showinv`.`SKU` = '$SKU' AND ";
}
if(!empty($ASNID)){
$sql=$sql." `showinv`.`ASNID` = '$ASNID' AND ";
}
if(!empty($LOC)){
$sql=$sql." `showinv`.`LOC` = '$LOC' AND ";
}
if(!empty($skucn)){
$sql=$sql." `showinv`.`skucn` LIKE '$skucn' AND ";
}
if(!empty($custcn)){
$sql=$sql." `showinv`.`custcn` LIKE '$custcn' AND ";
}
$sql=substr($sql,0,strlen($sql)-5);
$result=mysql_query($sql,$dbc);
$totalRow=mysql_num_rows($result);
}
/*SELECT *
FROM `showinv`
WHERE `Id` =1
AND `LOTID` LIKE '1'
AND `SKU` LIKE '1'
AND `QTY` =1
AND `ASNID` LIKE '1'
AND `VCODE` LIKE '1'
AND `LOC` LIKE '1'
AND `skucn` LIKE '1'
AND `custcn` LIKE '1'*/
/*SELECT * FROM `sku` */
$sql = "SELECT * FROM `sku`";
$resultSKU = mysql_query($sql,$dbc);
//$row_RecSKU = mysql_fetch_assoc($resultSKU);
$resultSKU2 = mysql_query($sql,$dbc);
//$row_RecSKU2 = mysql_fetch_assoc($resultSKU2);
$sql = "SELECT * FROM `cust` ";
$resultCUST = mysql_query($sql,$dbc);
//$row_RecCUST = mysql_fetch_assoc($resultCUST);
$sql="SELECT `LOC` FROM `lotxloc` GROUP BY `LOC` HAVING SUM(`QTY`) >0";
$resultLOC = mysql_query($sql,$dbc);
//$row_RecLOC = mysql_fetch_assoc($resultLOC);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>库存查询</title>
<script src="utils.js" type="text/javascript"></script>
<script src="inventory.js" type="text/javascript"></script>
<link rel="stylesheet" href="./themes/base/jquery.ui.all.css">
<script src="jquery-1.9.1.js" type="text/javascript"></script>
<script src="./ui/jquery.ui.core.js"></script>
<script src="./ui/jquery.ui.widget.js"></script>
<script src="./ui/jquery.ui.datepicker.js"></script>
<script src="./ui/jquery.ui.mouse.js"></script>
<script src="./ui/jquery.ui.draggable.js"></script>
<script src="./ui/jquery.ui.position.js"></script>
<script src="./ui/jquery.ui.resizable.js"></script>
<script src="./ui/jquery.ui.button.js"></script>
<script src="./ui/jquery.ui.dialog.js"></script>
<script src="./ui/jquery.ui.effect.js"></script>
<script src="./ui/jquery.ui.effect-blind.js"></script>
<script src="./ui/jquery.ui.effect-explode.js"></script>
<link rel="stylesheet" href="demos.css">
<script type="text/javascript">
</script>
<style type="text/css">
<!--
body {
#background-color: #00FFF1;
background:url(yh3.gif);
}
table {
border-collapse : collapse;
background-color: #FFFFFF;
}
.STYLE2 {
background-color: #FFFFFF;
}
-->
</style>
</head>
<body>
<h2 align="center">库存查询</h2>
<!--Id LOTID SKU QTY ASNID VCODE LOC skucn custcn-->
<form method="POST" action="<?php echo $editFormAction?>" id="Sform1" name="Sform1">
<table border = "0" cellpadding="2" cellspacing="1" width="100%">
<tr><td>LOTID(批次号)</td><td><input name="LOTID" id="LOTID" type="text" /></td>
<td>SKU(商品编码)</td><td>
<select name="SKU" id="SKU" >
<option></option>
<?php while($row_RecSKU = mysql_fetch_assoc($resultSKU)){?>
<option value="<?php echo $row_RecSKU['skuid']?>">
<?php echo $row_RecSKU['skuid']?>
</option>
<?php } ?>
</select>
<!--<input name="SKU" id="SKU" type="text" />-->
</td>
<td>ASNID(ASN编号)</td><td><input name="ASNID" id="ASNID" type="text" /></td>
<td>LOC(库位号)</td><td>
<select name="LOC" id="LOC" >
<option></option>
<?php while($row_RecLOC = mysql_fetch_assoc($resultLOC)){?>
<option value="<?php echo $row_RecLOC['LOC']?>">
<?php echo $row_RecLOC['LOC']?>
</option>
<?php } ?>
</select>
<!--<input name="LOC" id="LOC" type="text" />-->
</td></tr>
<tr><td>skucn(商品中文)</td><td>
<select name="skucn" id="skucn" >
<option></option>
<?php while($row_RecSKU2 = mysql_fetch_assoc($resultSKU2)){?>
<option value="<?php echo $row_RecSKU2['skucn']?>">
<?php echo $row_RecSKU2['skucn']?>
</option>
<?php } ?>
</select>
<!--<input name="skucn" id="skucn" type="text" />-->
</td>
<td>custcn(客户名)</td><td>
<select name="custcn" id="custcn" >
<option></option>
<?php while($row_RecCUST = mysql_fetch_assoc($resultCUST)){?>
<option value="<?php echo $row_RecCUST['custcn']?>">
<?php echo $row_RecCUST['custcn']?>
</option>
<?php } ?>
</select>
<!--<input name="custcn" id="custcn" type="text" />-->
</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
</table>
<p align="right">
<input type="submit" name="Submit" value="搜索" style="width:150;height:30"/>
</p>
<input type="hidden" name="MM_search" value="Sform1" />
</form>
<p align="center">
库存数量<br/>
<button type="button" id="showall">显示可用库存带批次属性</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button type="button" id="shownotlot">显示可用库存无批次属性</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button type="button" id="showallinv">显示所有在库库存</button>
</p>
<?php if($totalRow>0){?>
<div align="center" id="showData2">
<!--Id LOTID SKU QTY ASNID VCODE LOC skucn custcn-->
<table border = "1" cellpadding="1" cellspacing="1" width="100%">
<tr><td>Id</td><td>LOTID</td><td>SKU</td><td>QTY</td><td>ASNID</td><td>VCODE</td><td>LOC</td><td>skucn</td><td>custcn</td></tr>
<?php while($row_Rec=mysql_fetch_assoc($result)){?>
<tr><td><?php echo $row_Rec['Id']?></td>
<td><?php echo $row_Rec['LOTID']?></td>
<td><?php echo $row_Rec['SKU']?></td>
<td><?php echo $row_Rec['QTY']?></td>
<td><?php echo $row_Rec['ASNID']?></td>
<td><?php echo $row_Rec['VCODE']?></td>
<td><?php echo $row_Rec['LOC']?></td>
<td><?php echo $row_Rec['skucn']?></td>
<td><?php echo $row_Rec['custcn']?></td></tr>
<?php }?>
</table>
</div>
<?php }else{ ?>
<h2 align="center">无查询内容,显示所有库存内容</h2>
<div align="center" id="showData1"></div>
<?php } ?>
</body>
<script type="text/javascript">
</script>
</html>
PHP
1
https://gitee.com/laotou99_admin/WEBWMS.git
git@gitee.com:laotou99_admin/WEBWMS.git
laotou99_admin
WEBWMS
WEBWMS
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891