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

📄 insertpurchcountlist.jsp

📁 (Java+SQL)-大型企业JAVA的ERP系统
💻 JSP
字号:
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>
<jsp:useBean id="countList" class="src.wuyang.CountList" scope="page"/>
<jsp:useBean id="product" class="src.wuyang.Production" scope="page"/>
<jsp:useBean id="inventory" class="src.wuyang.Inventory" scope="page"/>
<jsp:setProperty name="countList" property="*" />

<% 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" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="1" height="90%" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#616860" bordercolordark="#CCCCCC" bgcolor="#4c7171" >
  <tr> 
    <td valign="top" > <br><br>
      <blockquote> <span class="textb"> 
        <script language="JavaScript">
function VerifyInput(e)
{	
	if(noFloat(e.quantity.value))	
	{    
		alert("请输入正确的数量");
		e.quantity.focus();  
		return false;
	}
}
</script>
        <%! String  strMarkNo;%>
        <%	
	String productName=request.getParameter("productName");
	String mode = request.getParameter("mode");
	String curMarkId = request.getParameter("curMarkId");
	String purchId = request.getParameter("purchId");
	String productId = request.getParameter("productId");
	
	product.load(productId);

	if(request.getParameter("delete")!=null){
		String strMarkNo = request.getParameter("markNo");
		countList.delete();
	}
	
	if(request.getParameter("update")!=null){
		String strMarkNo = request.getParameter("markNo");
		String quantity = request.getParameter("quantity");		
		countList.update(strMarkNo,quantity);
	}
	
	if (request.getParameter("insert")!=null && mode.equals("insert") ){ 
		countList.setGlobal(global);	
		int rtcode = countList.insert();
	
		if(rtcode >= 0) {
%>
        <jsp:forward page="InsertPurchCountList.jsp" > 
        <jsp:param name="success" value="ok" />
        <jsp:param name="mode" value="ok" />
        </jsp:forward>
        <% 	
		}else {  
%>
        <jsp:forward page="../pub/DBErr.jsp" > 
        <jsp:param name="rtcode" value="<%= rtcode %>" />
        </jsp:forward>
        </span> 
        <p class="textb"> <b>
          <%  
		}  
	}

	if (request.getParameter("success") != null ){	
    
%>
          成功插入记录!! 
          <%
	}
%>
          <br>
          采购用款申请单编号:<%=purchId%> <br>
          产品编码:<%=productId%> <br>
          产品名称:<%=product.getProductName()%> </b></p>
        <table border="1" bordercolorlight="#000000" bordercolordark="#CCCCCC" cellpadding="0" cellspacing="0">
          <tr> 
            <td class="text" bgcolor="#949b93"> 
              <div align="center"><b> 唛单号 </b></div>
            </td>
            <td class="text" bgcolor="#949b93"> 
              <div align="center"><b> 唛头 </b></div>
            </td>
            <td class="text" bgcolor="#949b93"> 
              <div align="center"><b> 数量 </b></div>
            </td>
            <td class="text" bgcolor="#949b93"> 
              <div align="center"><b> &nbsp; </b></div>
            </td>
            <td class="text" bgcolor="#949b93"> 
              <div align="center"><b> &nbsp; </b></div>
            </td>
          </tr>
          <%
	countList.query("markId="+curMarkId,"");
	
	int i=0;
	float qty=0;
	for (;countList.next()>0;) { 
%>
          <form method="post" >
            <input type="hidden" name="success" value="success">
            <input type="hidden" name="markNo" value="<%=countList.getMarkNo()%>">
            <tr> 
              <td class="textb"><%=countList.getMarkId()%></td>
              <td class="textb"><%=countList.getMark()%>&nbsp;</td>
              <td class="textb"> 
                <input type="text" name="quantity" value="<%=countList.doubleFormat(countList.getQuantity(),2)%>">
              </td>
              <td class="textb"> 
                <input type="submit" name="update" value="修改" />
              </td>
              <td class="textb"> 
                <input type="submit" name="delete" value="删除" />
              </td>
            </tr>
          </form>
          <%
	i = i + 1;
	qty = qty + countList.getQuantity();
	}
%>
          <form method="POST"   onsubmit="return VerifyInput(this);">
            <input type="hidden" name="mode" value="insert"/>
            <tr> 
              <td class="textb"><%=curMarkId%> 
                <input type="hidden" name="markId" value="<%=curMarkId%>" >
              </td>
              <td class="textb"> 
                <input type="text" name="mark" >
              </td>
              <td class="textb"> 
                <input type="text" name="quantity" >
              </td>
              <td class="textb"> 
                <input type="submit" name="insert" value="增加" />
              </td>
              <td class="textb"> 
                <input type="reset" name="reset" value="重置" />
              </td>
            </tr>
          </form>
        </table>
        <b><span class="textb">件数:<%=i%> 数量:<%=countList.doubleFormat(qty,2)%> </span></b> 
        <form method="post" action="InsertPurchInventory.jsp?purchId=<%=purchId%>&productId=<%=productId%>&curMarkId=<%=curMarkId%>">
          <input type="submit" name="Ok" value="唛单增加结束" />
        </form>
      </blockquote>
</td>
</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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