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

📄 binfo.jsp

📁 这是一个简单但是很实用的JSP应用实例
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.lang.*,java.text.*,java.util.*,java.io.*" %>
<%@include file="/db/dbPool.inc"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="/lib/main.css" rel="stylesheet" type="text/css">
<title>待确认批次工位信息</title>
<style type="text/css">
<!--
.style1{
	color: #000099;}
.menuskin {
	BORDER: #666666 1px solid; VISIBILITY: hidden; FONT: 12px Verdana;
	POSITION: absolute; 
	BACKGROUND-COLOR:#EFEFEF;
	background-repeat : repeat-y;
	}
.menuskin A {
	PADDING-RIGHT: 10px; PADDING-LEFT: 25px; COLOR: black; TEXT-DECORATION: none; behavior:url(inc/noline.htc);
	}
body {
	margin-left: 3px;
	margin-top: 3px;
	margin-right: 3px;
	margin-bottom: 3px;
}

-->
</style>
</head>
<script src="/lib/menufunc.js"></script>
<script src="/lib/jsFunc.js"></script>
<script language="javascript">
function confirmSel()
{
		if(confirm("您确定要确认该批次生产计划吗?"))
		   return true;
}
</script>
<jsp:useBean id="pageList" scope="session" class="myLib.PageList" />
<jsp:useBean id="queryBean" scope="page" class="Query.Query" />
<%
    String bID="",lineID="",prodID="",sID="",pNum="",proTo="",Info="";
	bID=request.getParameter("bID");
	lineID=request.getParameter("lineID");
	prodID=request.getParameter("prodID");
	sID=request.getParameter("sID");
	session.putValue("sID",sID);
	pNum=request.getParameter("pNum");
	proTo=request.getParameter("proTo");
	Info=bID+":"+lineID+":"+prodID+":"+sID+":"+pNum+":"+proTo;// 工位计划表中批次信息
%>
<body style="background-color:#FFFFFF " text="000000" link="000099"  vlink="000099" alink="ff0000" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="25"><a href="#">【</a><a href="../schManage/index.jsp"><strong>生产计划管理</strong></a>→<a href="bList.jsp"><font color="#FF0000">生产计划确认</font></a>→工位信息】</td>
  </tr>
  <div class=menuskin id=popmenu 
      onMouseOver="clearhidemenu();highlightmenu(event,'on')" 
      onMouseOut="highlightmenu(event,'off');dynamichide(event)" style="Z-index:100"> </div>
  <tr>
    <td height="26" align="left" class="style1"><strong>&gt;&gt;<a href="#" onMouseOver="showmenu(event,'<a href=\'#\'>批次号:<%=bID%></a><br><a href=\'#\'>状态编码:<%=sID%></a><br><a href=\'#\'>生产线:<%=lineID%></a><br><a href=\'#\'>机型:<%=prodID%></a><br><a href=\'#\'>计划数:<%=pNum%></a><br><a href=\'#\'>贴花后走向:<%=proTo%></a>',0)" style="CURSOR:hand">查看批次信息</a></strong></td>
  </tr>
</table>
<table width="80%" border="0" cellpadding="0">
  <tr>
    <td width="88" align="right"><strong>工位名称:</strong></td>
	<td width="708" colspan="3"><table width="100%" border="0" cellpadding="1" cellspacing="1">
<%
	int resNum=0;
	String wID="",wName="";
    ResultSet rs=null;
	queryBean.initialize(conn1);
	//rs=queryBean.executeQuery("select distinct wpList.wID,sID,picName,pID,busyNum,oInstr,wName from wpList,wInfo where wpList.wID=wInfo.wID and bID='"+bID+"'");
	rs=queryBean.executeQuery("select wID,picName,pID,busyNum,oInstr,wName from vwpList_wInfo where bID='"+bID+"'");
	if(rs.last())
		resNum=rs.getRow();
	rs.beforeFirst();
	
	int j=1;
	while(rs.next()){
	    wID=rs.getString("wID");
	    wName=rs.getString("wName");
		 if(j%10==1){%>
	   <tr>
		 <%}%>
         <td align="left" width="10%" height="20"><a  href="#<%=j%>"><%=wName%></a></td>
         <%if(j%10==0|| j==resNum){%>
	  <td>&nbsp;</td>
	  </tr>
       <%}
	     j++;
       }
	rs.beforeFirst();
%> 
</table></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="26" align="left" class="style1">&nbsp;</td>
    <form name="mainFm" method="post" action="">
	<td width="8%" height="26" align="center" bgcolor="#dfdfdf" class="FlatBtn" id=delBtn onClick="if(confirmSel()) document.mainFm.action='bConfirm.jsp?Info=<%=Info%>'; document.mainFm.submit();">计划确认</td>
    <td width=7% align=left class="flatBtn" onClick="javasrcipt:self.location='bList.jsp'"><img src="../../../img/back01.gif" width="12" height="10">返 回</td>
    </form>
  </tr>
</table>
<%
	String picName="",pID="",tmp_busyNum="",tmp_oInstr="",oInstr="";
	int m=1;
	while(rs.next())
{
	wID=rs.getString("wID");
	//sID=rs.getString("sID");
	picName=rs.getString("picName");
    if(picName==null||picName.equals(""))
	   picName="-";
	else{
	   ResultSet rs_p=queryBean.executeQuery("select pID from partsInfo where picName='"+picName+"'");
	   if(rs_p.next())
	       picName=rs_p.getString("pID");
	   else
	       queryBean.executeQuery("update wpList set picName='' where wID='"+wID+"' and sID='"+sID+"'");
	}
	
	pID=rs.getString("pID");
	if(pID==null||pID.equals("")) pID="-";
	
	tmp_busyNum=Integer.toString(rs.getInt("busyNum"));
	tmp_oInstr=rs.getString("oInstr");
	oInstr=tmp_oInstr.replaceAll("\\\\n","&nbsp;");
	wName=rs.getString("wName");
	
	ResultSet rs_w=null;
	//rs_w=queryBean.executeQuery("select wBOM.pID,wBOM.pName,partsInfo.picName from wBOM,partsInfo where sID='"+sID+"' and wBOM.wID='"+wID+"' and wBOM.pID!='' and wBOM.pID=partsInfo.pID");
	rs_w=queryBean.executeQuery("select pID,pName,picName from vwBOM_partsInfo where sID='"+sID+"' and wID='"+wID+"'");
	int recordCount=0;
	rs_w.last();
	recordCount=rs_w.getRow();
%>
<table width="100%" border="0" style="border-top-style:double" cellpadding="3" cellspacing="0"  align="center" bordercolor="#cccccc"  bgcolor="efefef">
   <tr>
     <td width="86" align="right">工位名称:</td>
     <td width="134" align="left"><font color="#FF0000"><a name="<%=m%>"></a><%=wName%></font></td>
     <td width="91" align="right">下发图片:</td>
     <td width="138" align="left"><%=picName%></td>
     <td width="162" align="right">需比对零部件 :</td>
     <td width="165" align="left"> <%=pID%></td>
     <td width="88" align="right">忙临界值:</td>
     <td width="91" align="left"><%=tmp_busyNum%></td>
   </tr>
   <tr>
     <td align="right">装配要点:</td>
     <td colspan="7" align="left"><%=oInstr%></td>
   </tr>
</table>
 <table width="100%" border="1" cellpadding="3" cellspacing="0"  align="center" bordercolor="#cccccc">
   <tr>
     <td width="18%" align="center"><strong>零部件编码</strong></td>
     <td width="32%" align="center"><strong>零部件名称</strong></td>
     <td width="17%" align="center"><strong>零部件编码</strong></td>
     <td width="33%" align="center"><strong>零部件名称</strong></td>
   </tr>
<%if(recordCount==0){%>
  <tr bgcolor="#FFFFFF">
    <td height="25" colspan="5" align="center" class="tdBottom"><b><font color="#FF0000">没有零部件信息 </font></b></td>
  </tr>
<%
	}else{	
		rs_w.beforeFirst();
		String tmp_picName="";
		String tmp_pID="";
		String pName="";
        String hasPic="";
		int i=1;
		while(rs_w.next())
	   {
			hasPic="无";
			tmp_pID=rs_w.getString("pID");
			pName=rs_w.getString("pName");
			tmp_picName=rs_w.getString("picName"); 
			if(tmp_picName!=null&&!tmp_picName.equals("")) hasPic="有"; 
	  if(i%2==1){%>
	   <tr>
		 <%}%>
		 <td align="left"><%=tmp_pID%></td>
		 <td align="left"><%=pName%>&nbsp;<%if(hasPic.equals("有")) out.print("<img src='../../../img/img.gif' width='12' height='12'>");%></td><%if(i%2==0){%>
	   </tr>
	   <%}
		i++;}
	}
%>
</table>
<table width="100%" border="0" cellpadding="3" cellspacing="0"  align="center" bordercolor="#cccccc"  bgcolor="efefef">
<form name="fm"  method="post" action="modwInfo.jsp?bID=<%=bID%>&&wID=<%=wID%>&&sID=<%=sID%>&&wName=<%=wName%>&&tmp_busyNum=<%=tmp_busyNum%>&&oInstr=<%=tmp_oInstr%>&&picName=<%=picName%>&&pID=<%=pID%>">
     <tr bgcolor="efefef">
       <td width="29%" align="center">&nbsp; </td>  
       <td width="40%" align="center">  
	       <input type="submit" class="flatBtn" value="修 改" style="width:50"> &nbsp;
	   </td> 
      <td width="31%" align="right"> <a href="#">*返回顶部*</a>&nbsp;&nbsp;
	   </td> 
  	</tr>
 </form>
</table>
 <p>&nbsp;</p>
 <%
 m++;
 }
 rs.close();
 %>
</body>
</html>
<%@ include file="/db/dbpoolEnd.inc" %>
<script src="/lib/jsFooter.js"></script>

⌨️ 快捷键说明

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