1 Star 1 Fork 1

gujiejing / WEBWMS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
inventoryreport.php 4.25 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($_SESSION)){
session_start();
}
$editFormAction = $_SERVER['PHP_SELF'];
$oType="";
if(isset($_GET['orderType'])&&($_GET['orderType']=="loc")){
$oType=" ORDER BY `LOC`";
}
if(isset($_GET['orderType'])&&($_GET['orderType']=="sku")){
$oType=" ORDER BY `SKU`";
}
//sLoc eLoc
if(isset($_POST['sLoc'])&&isset($_POST['eLoc'])){
if(!empty($_POST['sLoc'])&&!empty($_POST['eLoc'])){
$str1=$_POST['sLoc'];
$str2=$_POST['eLoc'];
$oType=" WHERE `LOC` BETWEEN '$str1' AND '$str2' ORDER BY `LOC`";
}
/*SELECT * FROM `showinv`
WHERE `LOC` BETWEEN 'aaa' AND 'babbbbb1'
ORDER BY `LOC` */
}
$sql="SELECT * FROM `showinv2`".$oType;
$result=mysql_query($sql,$dbc);
$sql2="SELECT `LOC` FROM `showinv` ORDER BY `LOC`";
$result2=mysql_query($sql2,$dbc);
$result3=mysql_query($sql2,$dbc);
//$row_Rec=mysql_fetch_assoc($result);
$_SESSION['SQL1']=$sql;
?>
<html>
<head>
<title>盘库报表</title>
<script src="utils.js" type="text/javascript"></script>
<script src="inventoryreport.js" type="text/javascript"></script>
<link rel="stylesheet" href="./themes/base/jquery.ui.all.css">
<script src="jquery-1.9.1.js"></script>
<script src="./ui/jquery.ui.core.js"></script>
<script src="./ui/jquery.ui.widget.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>
<link rel="stylesheet" href="demos.css">
<style type="text/css">
<!--
body {
#background-color: #00FFF1;
background:url(yh3.gif);
}
table {
border-collapse : collapse;
background-color: #FFFFF0;
}
.STYLE2 {
background-color: #FFFFFF;
}
table#border{
border-top:#000 1px solid;
border-left:#000 1px solid;
}
table#border td{
border-bottom:#000 1px solid;
border-right:#000 1px solid;
}
-->
</style>
</head>
<body align="center">
<div id="showSQL" value="<?php echo $sql?>"></div>
<p>查询与排序</p>
<button id="aloc">按库位排序</button>
<button id="asku">按品名排序</button>
<form method="POST" action="<?php echo $editFormAction?>" id="form1" name="form1">
<table><tr><td>库位区间查询:&nbsp;&nbsp;&nbsp;</td>
<td>起始库位</td>
<td>
<select id="sLoc" name="sLoc">
<option></option>
<?php while($row_Rec1=mysql_fetch_assoc($result2)){?>
<option value="<?php echo $row_Rec1['LOC']?>">
<?php echo $row_Rec1['LOC']?>
</option>
<?php }?>
</select>
<!--<input type="text" name="sLoc" value="">-->
</td>
<td>结束库位</td>
<td>
<select id="eLoc" name="eLoc">
<option></option>
<?php while($row_Rec2=mysql_fetch_assoc($result3)){?>
<option value="<?php echo $row_Rec2['LOC']?>">
<?php echo $row_Rec2['LOC']?>
</option>
<?php }?>
</select>
<!--<input type="text" name="sLoc" value="">-->
</td>
<td><input type="submit" name="Submit" value="查询" />
</td>
</tr></table>
</form>
<br>
冻结库位:
<input type="text" name="holdloc" id="holdloc" value="请输入要冻结的库位号" />
<button id="holdlocbtn">确定</button>
<br>
<p align="right">
<button id="printReport">打印报表</button>
</p>
<!--Id LOTID SKU QTY ASNID VCODE LOC skucn custcn-->
<table border = "0" cellpadding="2" 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><td>isHold</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>
<td><?php
//echo $row_Rec['isHold']
if($row_Rec['isHold']==0){
echo '否';
}else
{
echo '是';
}
?></td>
</tr>
<?php }?>
</table>
</body>
</html>
<?php
mysql_free_result($result);
mysql_free_result($result3);
mysql_free_result($result2);
?>
PHP
1
https://gitee.com/laotou99_admin/WEBWMS.git
git@gitee.com:laotou99_admin/WEBWMS.git
laotou99_admin
WEBWMS
WEBWMS
master

搜索帮助