📄 handtakeshift.jsp
字号:
<%@ page
language="java"
contentType="text/html; charset=GBK"
import="imis.*,javax.naming.*,javax.rmi.PortableRemoteObject,java.util.*,java.sql.*,java.io.*"
%>
<%
session=request.getSession();
userStruct user=(userStruct)session.getAttribute("user");
if(user==null){
response.sendRedirect("../../login.html");
}
else
if(!((user.getAccess().intValue() == 3)||(user.getAccess().intValue() == 4))){
response.sendRedirect("../../error/access.html");
}else{
int t_unitid=user.unitid.intValue(); //get from session "user" , need modify
%>
<jsp:useBean id="officeunitget" scope="page" class="imis.officeunitget" />
<jsp:useBean id="handtakeget" scope="page" class="imis.handtakeget" />
<HTML><HEAD>
<TITLE>MSA Office</TITLE>
<link rel="stylesheet" href="../../css/msa.css" type="text/css">
<script language="JavaScript" src="../../public/js/table_display.js"></script>
<script language="JavaScript" src="../../public/js/all_checked.js"></script>
<script language="JavaScript" src="../../public/js/equipment_menu.js"></script>
<script language="javascript" src="../../public/util/openselect.js"></script>
<script language="javascript" src="../../public/js/getdate.js"></script>
<script language="javascript" src="../../public/js/selffunction.js"></script>
<script language="javascript">
init1();
</script>
<SCRIPT>
window.onload=init
</SCRIPT>
<script>
function sel_change(){
frm1.action="handtakeShift.jsp";
frm1.submit();
}
function frm1_check(){
if(frm1.unitid.value==""){
alert("请选择子部门");
frm1.unitid.focus();
}else if(frm1.handtake_id.value==""){
alert("请选择设备!");
frm1.handtake_id.focus();
}else if(frm1.hamount.value==""){
alert("请填写调度数量!");
frm1.hamount.focus();
}else if(isInt(trim(frm1.hamount.value))==false){
alert("调度数量只能是大于零的整数!");
frm1.hamount.focus();
}else{
var re=confirm("您确定要调度"+frm1.hamount.value+"台这样的设备吗?");
if(re){
frm1.hamount.value=trim(frm1.hamount.value);
frm1.action="handtakeShifted.jsp";
frm1.submit();
}
}
}
function frm1_reset(){
window.location.replace("handtakeShift.jsp");
//frm1.unitid.options[0].selected=true;
//frm1.handtake_id.options[0].selected=true;
}
</script>
</HEAD>
<BODY class="bg" topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
<DIV align=center>
<TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
<TR>
<TD><IMG height=4 src="../../MacOS/lefttop.gif" width=6></TD>
<TD background=../../MacOS/top.gif colSpan=3><IMG height=4
src="../MacOS/top.gif" width=1></TD>
<TD><IMG height=4 src="../../MacOS/righttop.gif"></TD>
</TR>
<TR>
<TD vAlign=top background=../../MacOS/lwing.gif rowSpan=3><IMG height=18
src="../../MacOS/left.gif" width=6></TD>
<TD vAlign=top background=../../MacOS/titlebg.gif width="16"> <DIV><img src="../../MacOS/logo.gif" width="16" height="16" border="0" alt="返回MSA_Office首页"></a></DIV></TD>
<TD vAlign=top noWrap align=center width="100%"
background=../../MacOS/titlebg.gif><SPAN
style="BACKGROUND-COLOR: #cecece"><FONT class=strong> MSA - OFFICE </font></SPAN></TD>
<TD><IMG height=18 src="../../MacOS/right_b2.gif" width=18 border="0" alt="关闭窗口"></TD>
<TD vAlign=top background=../../MacOS/rwing.gif rowSpan=3><IMG height=18
src="../../MacOS/right.gif" width=7></TD>
</TR>
<TR>
<TD background=../../MacOS/hr.gif colSpan=3><IMG height=2
src="../../MacOS/hr.gif" width=1></TD>
</TR>
<TR>
<TD colSpan=3 align="center" valign="top"><br> <table width="600" border="1" cellspacing="1" bordercolor="#666666">
<tr bgcolor="#FAFAFA">
<td valign="top">
<table width="601" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="589" height="15" bgcolor="#666666"><font color='white' size='2'>设备管理</font></td>
</tr>
<tr bgcolor="#fafafa">
<td>设备管理>> 设备调拨</td>
</tr>
</table>
<table class=title width="600" border="0" cellspacing="1" cellpadding="2">
<form name="frm1" method="post">
<tr bgcolor="#fafafa">
<td width="131" bgcolor="#fafafa"> <font class="strong" > 部门:</font>
</td>
<td width="463" bgcolor="#fafafa">
<%
System.out.println("unitid="+t_unitid);
officeunitget.setSqlwhereget("unitid="+t_unitid);
officeunitget.query(pageContext);
String processname=officeunitget.getProcessname();
if(processname==null){
processname="";
}
processname=processname.trim();
%>
<%=processname%>
<input name="t_unitid" type="hidden" value="<%=t_unitid%>">
<input name="t_unitname" type="hidden" class="file" readonly value="<%=officeunitget.getProcessname()%>">
</td>
</tr>
<tr bgcolor="#fafafa">
<td width="131"> <font class="strong"> 子部门: </font> </td>
<td width="463" bgcolor="#e0e0e0"><select name="unitid">
<option value="">请选择子部门</option>
<%
String unitid=request.getParameter("unitid");
if(unitid==null){
unitid="";
}
officeunitget.setSqlwhereget("upunitid="+t_unitid);
officeunitget.query(pageContext);
for(int i=0;i<officeunitget.getRows();i++){
officeunitget.next();
if(officeunitget.getUnitid().trim().equals(unitid)){
out.print("<option value=\""+officeunitget.getUnitid()+"\" selected>"+"--"+officeunitget.getProcessname()+"--");
}else{
out.print("<option value=\""+officeunitget.getUnitid()+"\">"+"--"+officeunitget.getProcessname()+"--");
}
out.print("</option>");
System.out.println("2");
}
%>
</select> </td>
</tr>
<tr bgcolor="#e0e0e0">
<td> <font class="strong" > 选择设备:</font> </td>
<td><select name="handtake_id" onchange="sel_change();">
<option value="">请选择设备名称</option>
<%
System.out.println("3");
String handtake_id=request.getParameter("handtake_id");
if(handtake_id==null){
handtake_id="";
}
System.out.println("3="+handtake_id);
//String wei = officeunitget.getProcessname();
//out.print(processname);
handtakeget.setSqlwhereget("unit='"+ processname +"' and hamount>0");
System.out.println("unit="+officeunitget.getProcessname());
handtakeget.query(pageContext);
System.out.println("4");
for(int i=0;i<handtakeget.getRows();i++){
handtakeget.next();
if(handtakeget.getHandtake_id().trim().equals(handtake_id)){
out.print("<option value=\""+handtakeget.getHandtake_id()+"\" selected>"+"--"+handtakeget.getDev_name()+"<b>("+handtakeget.getEnglishdevname()+")</b>--");
}else{
out.print("<option value=\""+handtakeget.getHandtake_id()+"\">"+"--"+handtakeget.getDev_name()+"<b>("+handtakeget.getEnglishdevname()+")</b>--");
}
out.print("</option>");
}
%>
</select> </td>
</tr>
<tr bgcolor="#e0e0e0">
<td> <font class="strong" > 调拨数量:</font> </td>
<td><input name="hamount" type="text" class="file" value="">
<%
int hamount=0;
if( !(handtake_id.equals("")) ){
handtakeget.setSqlwhereget("handtake_id='"+handtake_id+"'");
handtakeget.query(pageContext);
hamount=Integer.parseInt(handtakeget.getHamount());
}else{
hamount=0;
}
if(hamount==0){
out.print("台(您还没有选择设备)");
}else{
out.print("台(现有<font color=blue>"+hamount+"</font>台)");
}
%>
<input type="hidden" name="amount" value="<%=hamount%>">
</td>
</tr>
<tr bgcolor="#fafafa" align="center">
<td colspan="2" height="30"> <input type="button" name="Button2" value=" 调 拨 " class="file" onclick="javascript:frm1_check();">
<input type="button" name="Button32" value=" 还 原 " class="file" onclick="javascript:frm1_reset();">
</td>
</tr>
</form>
</table></td>
</tr>
</table>
<p><img src="../../images/msalogo.gif" width="272" height="50">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3"><img src="../personal/project/a.gif" width="1" height="1"></td>
</tr>
<tr>
<td background="../../MacOS/hr.gif"><img src="../../MacOS/hr.gif" width="1" height="2"></td>
</tr>
<tr>
<td height="3"><img src="../personal/project/a.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <div align="right"><a href="../help.htm" target="blank" style="cursor:help" title="使用帮助"><img src="../../MacOS/help.gif" width="16" height="16" border="0">HELP</a></div></td>
</tr>
</table></TD>
</TR>
<TR>
<TD><IMG height=7 src="../../MacOS/leftbottom.gif" width=6></TD>
<TD background="../../MacOS/bottom.gif" colSpan=3><IMG height=7
src="../../MacOS/bottom.gif" width=1></TD>
<TD><IMG height=7 src="../../MacOS/rightbottom.gif"
width=7></TD>
</TR>
</TABLE>
<BR>
<TABLE cellSpacing=1 cellPadding=2 width="300" border=0>
<TBODY>
<TR>
<TD align=center><FONT class=footer><IMG height=8
src="../../MacOS/hr_black.gif" width="100%"><BR>
Orient Super Net MSA-OFFICE System1.0
</FONT></TD>
</TR>
</TBODY>
</TABLE>
</DIV>
</BODY></HTML>
<%
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -