⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 insertallocatinventory.jsp

📁 (Java+SQL)-大型企业JAVA的ERP系统
💻 JSP
字号:
<%@ taglib prefix="list" uri="/jsp/tld/WuYangTag.tld" %>
<jsp:useBean id="inventory" class="src.wuyang.Inventory" scope="page"/>
<jsp:useBean id="allocatproduct" class="src.wuyang.AllocatProduct" 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="changePlan" class="src.wuyang.ChangePlan" scope="page"/>
<jsp:useBean id="allocat" class="src.wuyang.Allocat" 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"><br><br><blockquote>
      <script language="JavaScript">
function VerifyInput(e)
{
	if(isEmpty(e.wearhouseId.value))
	{    
		alert("请输入仓库编码");
		e.wearhouseId.focus();  
		return false;
	} 
	if(isEmpty(e.locationId.value))
	{    
		alert("请输入货位编码");
		e.locatoinId.focus();  
		return false;
	} 
	if(isEmpty(e.huodanNo.value))
	{    
		alert("请输入送货单号");
		e.huodanNo.focus();  
		return false;
	} 
}

</script>
      <b><span class="textb"> 
      <%
	String allocatId = request.getParameter("allocatId");	
	String productId = request.getParameter("productId");
	String curMarkId = request.getParameter("curMarkId"); 
	String pack[] = {"带包装","净水"};

	if (request.getParameter("insert")!=null){ 	//修改仓库记录
%>
      <jsp:setProperty name="inventory" property="*"/>
      <%
		inventory.setReceiptType(1);   
		inventory.setStatu(1);   
    		inventory.setGlobal(global);  
	
		int rtcode = inventory.insert();

		if(rtcode < 0) {	
%>
      <jsp:forward page="../pub/DBErr.jsp" > 
      <jsp:param name="rtcode" value="<%=rtcode%>" />
      </jsp:forward>
      <%  
		}  
		
		allocat.load(allocatId);
		if (allocat.getFormat()==1) {		//修改计划(计划为调拨)
			changePlan.setQuantityFinish(inventory.getQuantity());
			changePlan.setProductId(inventory.getProductId());
			changePlan.setDeptId(allocat.getSubCompanyId());
			
			changePlan.process();
		}
	}
        inventory.setGlobal(global);  
	product.load(productId);
	allocatproduct.load(allocatId,productId);
	countList.load(curMarkId);

	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(); 
    	}
%>
      调拨申请单编码:<%=allocatproduct.getAllocatId()%> <br>
      产品编码:<%=product.getProductId()%> <br>
      产品名称:<%=product.getProductName()%> <br>
      规格/型号:<%=product.getProductDesc()%> <br>
      单位:<%=product.getUnit()%> <br>
      包装:<%=pack[allocatproduct.getPack()]%> <br>
      应收/发数量:<%=allocatproduct.doubleFormat(allocatproduct.getQuantity(),2)%> <br>
      已收/发数量:<%=allocatproduct.doubleFormat(allocatproduct.getActQuantity(),2)%> <br>
      <%if(actQuantity > 0){%>
      唛单编号:<%=curMarkId%> <br>
      唛单数量:<%=allocatproduct.doubleFormat(actQuantity,2)%> <br>
      件数:<%=allocatproduct.doubleFormat(actCounting,0)%></span> 
      <%}%>
      <p>	
		
        
        <table border="1" bordercolorlight="#000000" bordercolordark="#CCCCCC" cellpadding="0" cellspacing="0" width="671">
          <tr bgcolor="#949b93"> 
            <td height="19" class="text" width="58"> 
              <div align="center"><b>仓库名称 </b></div>
          </td>
            <td height="19" class="text" width="58"> 
              <div align="center"><b>货位编码 </b></div>
          </td>
            <td height="19" class="text" width="58"> 
              <div align="center"><b>库存数量 </b></div>
          </td>
            <td height="19" class="text" width="58"> 
              <div align="center"><b>库存件数 </b></div>
          </td>
            <td height="19" class="text" width="89"> 
              <div align="center"><b>实收/发数量 </b></div>
          </td>
            <td height="19" class="text" width="60"> 
              <div align="center"><b>实收/发件数 </b></div>
          </td>
            <td height="19" class="text" width="154"> 
              <div align="center"><b>批号 </b></div>
          </td>
            <td height="19" class="text" width="72"> 
              <div align="center"><b>送货单号 </b></div>
          </td>
            <td height="19" class="text" width="44"> 
              <div align="center"><b>&nbsp;</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="<%=allocatproduct.getAllocatId()%>"/>
            <input type="hidden" name="productId" value="<%=allocatproduct.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" width="58"><%=wearHouse.getWearhouseName()%></td>
              <td class="textb" width="58"><%=locationState.getLocationId()%></td>
              <td class="textb" width="58" align="right"><%=locationState.doubleFormat(locationState.getQuantity(),2)%></td>
              <td class="textb" width="58" align="right"><%=locationState.doubleFormat(locationState.getCounting(),0)%></td>
              <td class="textb" width="89"> 
                <input type="text" name="quantity" value="<%=locationState.doubleFormat(actQuantity,2)%>"/ size="12" maxlength="12">
            </td>
              <td class="textb" width="60"> 
                <input type="text" name="counting" value="<%=locationState.doubleFormat(actCounting,0)%>"/ size="8" maxlength="8">
            </td>
              <td class="textb" width="154"> 
                <input type="text" name="groupId">
            </td>
              <td class="textb" width="72"> 
                <input type="text" name="huodanNo" size="10" maxlength="10">
            </td>
              <td class="textb" width="44"> 
                <input type="submit" name="insert" value="出库" />
            </td>
          </form>
        </tr>
        <%	
	}
%>
      </table>
<form method="post" action="AllocatReceiptList.jsp?allocatId=<%=allocatId%>">
<input type="submit" name="back" value="返回">
</form>
</blockquote>
</td>
</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -