📄 insertpurchinventory.jsp
字号:
<%@ taglib prefix="list" uri="/jsp/tld/WuYangTag.tld" %>
<jsp:useBean id="inventory" class="src.wuyang.Inventory" scope="page"/>
<jsp:useBean id="purchProduct" class="src.wuyang.PurchProduct" scope="page"/>
<jsp:useBean id="product" class="src.wuyang.Production" scope="page"/>
<jsp:useBean id="locationState" class="src.wuyang.LocationState" scope="page"/>
<jsp:useBean id="countList" class="src.wuyang.CountList" scope="page"/>
<jsp:useBean id="wearHouse" class="src.wuyang.Wearhouse" scope="page"/>
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>
<% if (global.isLogined == false) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="-4" />
</jsp:forward>
<% }
%>
<html>
<head>
<title>采购入库信息</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language ="javascript" src='../pub/pub.js' type=text/javascript></script>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body bgcolor=#949b93><table width="100%" border="1" height="90%" bordercolorlight="#616860" bordercolordark="#CCCCCC" bgcolor="#4c7171" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"> <span class="textb"><br>
</span>
<blockquote> <span class="textb"><b class="text">
<script language="JavaScript">
function AddLocation() {
open("LocationId.jsp","LocationList","scrollbars=yes,width=250,height=200")
}
function VerifyInput(e)
{
if(isEmpty(e.wearhouseId.value))
{
alert("请输入仓库编码");
e.wearhouseId.focus();
return false;
}
if(isEmpty(e.locationId.value))
{
alert("请输入货位编码");
e.locationId.focus();
return false;
}
if(isEmpty(e.huodanNo.value))
{
alert("请输入验货单号");
e.huodanNo.focus();
return false;
}
}
</script>
<%
String purchId = request.getParameter("purchId");
String productId = request.getParameter("productId");
String curMarkId = request.getParameter("curMarkId");
String pack[] = {"带包装","净水"};
if (request.getParameter("insert")!=null){
%>
<jsp:setProperty name="inventory" property="*"/>
<%
inventory.setReceiptType(2);
inventory.setStatu(2);
inventory.setGlobal(global);
int rtcode = inventory.insert();
if(rtcode < 0) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="<%= rtcode%>" />
</jsp:forward>
<%
}
}
purchProduct.load(purchId,productId);
product.load(productId);
int rowCount = countList.query("markId="+curMarkId,"");
int actCounting=0;
float actQuantity=0;
for (int i = rowCount;(i>0)&&(countList.next()>0);i--) {
actCounting = actCounting + 1;
actQuantity = actQuantity + countList.getQuantity();
}
%>
用款申请单编码:<%=purchProduct.getPurchId()%> <br>
产品编码:<%=product.getProductId()%> <br>
产品名称:<%=product.getProductName()%> <br>
规格/型号:<%=product.getProductDesc()%> <br>
单位:<%=product.getUnit()%> <br>
包装:<%=pack[purchProduct.getPack()]%> <br>
应收/发数量:<%=purchProduct.doubleFormat(purchProduct.getQuantity(),2)%> <br>
已收/发数量:<%=purchProduct.doubleFormat(purchProduct.getActQuantity(),2)%> <br>
<%if(actQuantity > 0){%>
唛单编号:<%=curMarkId%> <br>
唛单数量:<%=purchProduct.doubleFormat(actQuantity,2)%> <br>
件数:<%=purchProduct.doubleFormat(actCounting,0)%>
<%}%>
</b></span><b class="text"></b>
<p>
<table border="1" bordercolorlight="#000000" bordercolordark="#CCCCCC" width="800" cellpadding="0" cellspacing="0" height="110">
<tr bgcolor="#949b93">
<td class="text">
<div align="center"><b>仓库名称</b></div>
</td>
<td class="text">
<div align="center"><b>货位编码 </b></div>
</td>
<td class="text">
<div align="center"><b>库存数量 </b></div>
</td>
<td class="text">
<div align="center"><b>库存件数 </b></div>
</td>
<td class="text">
<div align="center"><b>实收/发数量 </b></div>
</td>
<td class="text">
<div align="center"><b>实收/发件数 </b></div>
</td>
<td class="text">
<div align="center"><b>批号 </b></div>
</td>
<td class="text">
<div align="center"><b>进货验收单号 </b></div>
</td>
<td class="text">
<div align="center"><b><b> </b></b></div>
</td>
</tr>
<%
int num = locationState.query("productId='"+productId+"'","");
for (int i=0;i<num;i++) {
locationState.next();
wearHouse.load(locationState.getWearhouseId());
%>
<tr>
<form method="POST" onsubmit="return VerifyInput(this);">
<input type="hidden" name="receiptId" value="<%=purchProduct.getPurchId()%>"/>
<input type="hidden" name="productId" value="<%=purchProduct.getProductId()%>"/>
<input type="hidden" name="markId" value="<%=curMarkId%>">
<input type="hidden" name="wearhouseId" value="<%=locationState.getWearhouseId()%>"/>
<input type="hidden" name="locationId" value="<%=locationState.getLocationId()%>"/>
<td class="textb"><%=wearHouse.getWearhouseName()%></td>
<td class="textb"><%=locationState.getLocationId()%></td>
<td class="textb"><%=locationState.doubleFormat(locationState.getQuantity(),2)%></td>
<td class="textb"><%=locationState.doubleFormat(locationState.getCounting(),0)%></td>
<td class="textb">
<input type="text" name="quantity" value="<%=locationState.doubleFormat(actQuantity,2)%>"/ size="12" maxlength="12">
</td>
<td class="textb">
<input type="text" name="counting" value="<%=locationState.doubleFormat(actCounting,0)%>"/ size="8" maxlength="8">
</td>
<td class="textb">
<input type="text" name="groupId">
</td>
<td class="textb">
<input type="text" name="huodanNo" size="10" maxlength="10">
</td>
<td class="textb">
<input type="submit" name="insert" value="入库" />
</td>
</form>
</tr>
<%
}
%>
<tr>
<form method="POST" name="insert" onsubmit="return VerifyInput(this);">
<input type="hidden" name="receiptId" value="<%=purchProduct.getPurchId()%>"/>
<input type="hidden" name="productId" value="<%=purchProduct.getProductId()%>"/>
<input type="hidden" name="markId" value="<%=curMarkId%>">
<td class="textb">
<select name="wearhouseId">
<list:wearhouse showType="select"/>
</select>
</td>
<td class="textb">
<input type="text" name="locationId" size="10" maxlength="10"/><input type="button" value=">>" onclick="AddLocation()"/>
</td>
<td class="textb">0</td>
<td class="textb">0</td>
<td class="textb">
<input type="text" name="quantity" value="<%=locationState.doubleFormat(actQuantity,2)%>"/ size="12" maxlength="12">
</td>
<td class="textb">
<input type="text" name="counting" value="<%=locationState.doubleFormat(actCounting,0)%>"/ size="8" maxlength="8">
</td>
<td class="textb">
<input type="text" name="groupId">
</td>
<td class="textb">
<input type="text" name="huodanNo" size="10" maxlength="10">
</td>
<td class="textb">
<input type="submit" name="insert" value="入库" />
</td>
</form>
</tr>
</table>
<form method="post" action="PurchReceiptList.jsp?purchId=<%=purchId%>">
<input type="submit" name="back" value="返回">
</form></blockquote>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -