?? gsdef.jsp
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<%@ page language="java" import="java.sql.*" %>
<%@ page contentType="text/html;charset=gb2312"%>
<jsp:useBean id="DbBean" class="publib.OperDbBean" scope="page"></jsp:useBean>
<%! ResultSet RS; %>
<%! String sql,sql1,sql2,Bbbm,Bbmc,GsHc,GsLc,JsGs,JsJb,BZ,zdbz,bbbz,LxLc,HxHc,LxMc,HxMc; %>
<%! int i,j,num,num1,num2; %>
<%! int MaxHc,MaxLc,DyKd,DyGd,BgLs,BgHs,BgKd,LlKd,SyKd,BgGs,ZhYs,Biao; %>
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);
%>
<%
Bbbm = request.getParameter("T_bbbm");
Bbmc = request.getParameter("T_bbmc");
sql = "SELECT BBHS,BBLS,BBBZ FROM DBO.BBZD WHERE BBBM='" + Bbbm + "'";
RS = DbBean.sqlQuery(sql);
if( RS.next() )
{
MaxHc = Integer.parseInt(RS.getString("BBHS"));
MaxLc = Integer.parseInt(RS.getString("BBLS"));
zdbz = RS.getString("BBBZ");
bbbz = zdbz.substring(1,2);
}
RS.close();
DyKd = 24; //單元寬度 單位為像素
DyGd = 25; //單元高度 單位為像素
BgLs = 22; //表格列數
BgHs = MaxHc; //表格行數
BgKd = DyKd * ( BgLs + 2 ); //表格長度 單位為像素
BgGs = MaxLc / BgLs; //表格個數
ZhYs = MaxLc % BgLs; //最后余數
LlKd = DyKd * 2; //兩列寬度
SyKd = BgKd - DyKd * 2; //剩余寬度
%>
<META http-equiv="Content-Language" content="zh-cn">
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5 for Windows">
<META http-equiv="Content-Style-Type" content="text/css">
<STYLE type=text/css>
<!--
.box {BACKGROUND:#FBE3FD; color:#00ffff; FONT: 9pt "宋體"; POSITION: absolute;}
-->
</STYLE>
<LINK rel="stylesheet" href="/resources/Master.css" type="text/css">
<title>1</title>
</HEAD>
<BODY onload="Remmber()">
<H2>公式定義[<%=Bbmc%>]</H2>
<FORM method="POST" action="Insert.jsp" name="form1">
<table class=box id=messagetable style="display: none" width="250" height="60">
<tbody><tr><td width="250" height="60" valign="top"><span id="clock"></span></td></tr>
</tbody></table>
<script language=JavaScript>
function S1(str)
{
if ( form1[str].value != "" )
{
zdgs = form1[str].value.length / 60;
zdys = form1[str].value.length % 60;
oldstr = form1[str].value;
beginno = 0;
endno = 59;
newstr = "";
for (i = 1; i <= zdgs; i++)
{
newstr = newstr + oldstr.substring(beginno,endno) + "<br>";
beginno = beginno + 60;
endno = endno + 60;
}
newstr = newstr + oldstr.substring(beginno,endno);
document.all.clock.innerHTML=newstr;
newX = window.event.x + document.body.scrollLeft;
newY = window.event.y + document.body.scrollTop;
menu = document.all.messagetable;
if ( newX >=250 && newX < 350)
{
menu.style.pixelLeft = newX - 100;
}
else
{
if ( newX >=350 && newX < 450 )
{
menu.style.pixelLeft = newX - 200;
}
else
{
if ( newX >=450 )
{
menu.style.pixelLeft = newX - 350;
}
else
{
menu.style.pixelLeft = newX - 30;
}
}
}
if ( newY <= 300 )
{
menu.style.pixelTop = newY + 30;
}
else
{
menu.style.pixelTop = newY - 90;
}
menu.style.display = "";
}
}
function Z1()
{
menu = document.all.messagetable
if ( menu.style.display == "")
{
menu.style.display = "none"
}
}
function D1(str)
{
if ( window.confirm('您確實想統一該列的公式嗎?') )
{
strArray = str.split("LC");
str1 = "H1L" + strArray[1];
if ( form1[str1].value == "" )
{
alert("請先定義該列第一行的公式!");
}
else
{
for ( i=1;i<=<%=MaxHc%>;i++ )
{
str2 = "H" + i + "L" + strArray[1];
form1[str2].value = form1[str1].value;
str4 = "x" + str2;
document[str4].src='../../resources/images/GSDef/yes.jpg';
}
str3 = "L" + strArray[1];
}
}
}
function W1(str1,str2)
{
var gs='';
str3 = "H" + str1 + "L" + str2;
str4 = "J" + str1 + "B" + str2;
str5 = "B" + str1 + "Z" + str2;
gs = form1[str3].value;
window.open('Input.jsp?Hc='+str1+'&Lc='+str2+'&Bbbm='+<%=Bbbm%>+'&JsJb='+form1[str4].value+'&BZ='+form1[str5].value,'PopupWindow','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=610,height=444,top=107,left=178');
}
function WriteValue(str)
{
str1 = "x" + str;
document[str1].src='../../resources/images/GSDef/yes.jpg';
}
function PageSubmit()
{
document.form1.submit();
}
function Remmber()
{
form1.MaxHc.value = "<%=MaxHc%>";
form1.MaxLc.value = "<%=MaxLc%>";
form1.T_bbbm.value = "<%=Bbbm%>";
form1.T_bbbz.value = "<%=bbbz%>";
<%
sql = "SELECT * FROM DBO.BBGSDY WHERE BBBM='" + Bbbm + "'";
RS = DbBean.sqlQuery(sql);
while( RS.next() )
{
GsHc = RS.getString("HC");
GsLc = RS.getString("LC");
JsGs = RS.getString("JSGS");
JsJb = RS.getString("JSJB");
BZ = RS.getString("BZ");
out.println(" form1.H" + GsHc + "L" + GsLc + ".value = '" + JsGs + "';");
out.println(" form1.J" + GsHc + "B" + GsLc + ".value = '" + JsJb + "';");
out.println(" form1.B" + GsHc + "Z" + GsLc + ".value = '" + BZ + "';");
out.println(" document['xH" + GsHc + "L" + GsLc + "'].src='../../resources/images/GSDef/yes.jpg';");
}
RS.close();
sql = "SELECT * FROM DBO.BBLXDY WHERE BBBM='" + Bbbm + "' ORDER BY LC";
RS = DbBean.sqlQuery(sql);
while( RS.next() )
{
LxLc = RS.getString("LC");
LxMc = RS.getString("LXMC");
out.println(" form1.LC" + LxLc + ".value = '" + LxMc + "';");
}
RS.close();
sql = "SELECT * FROM DBO.BBHXDY WHERE BBBM='" + Bbbm + "' ORDER BY HC";
RS = DbBean.sqlQuery(sql);
while( RS.next() )
{
HxHc = RS.getString("HC");
HxMc = RS.getString("HXMC");
out.println(" form1.HC" + HxHc + ".value = '" + HxMc + "';");
}
RS.close();
%>
}
</script>
<INPUT type="button" name="B_submit" value="確認" onclick="PageSubmit()"><br><br clear="all">
<%
//##########################################################################################################################################################################################################################
if ( bbbz.equals("0") )
{
if ( BgGs >= 1 )
{
out.println("<table border='1' width='" + BgKd + "'>");
out.println(" <tr>");
out.println(" <td width='" + LlKd + "' colspan='2' rowspan='2'></td>");
out.println(" <td width='" + SyKd + "' colspan='" + BgLs + "'><p align='center'>表 列 次</td>");
out.println(" </tr>");
out.println(" <tr>");
for ( i=1;i<=BgLs;i++ )
{
out.println(" <td width='" + DyKd + "' align='center' onclick=\"S1('LC" + i + "')\" onmouseout=\"Z1()\" ondblclick=\"D1('LC" + i + "')\">" + i + "<INPUT type='hidden' name='LC" + i + "'></td>");
}
out.println(" </tr>");
for ( i=0;i<=0;i++ )
{
out.println(" <tr>");
if ( i == 0 )
{
out.println(" <td width='" + DyKd + "' rowspan='" + BgHs + "'>行</td>");
}
out.println(" <td width='" + DyKd + "' align='center1' onclick=\"S1('HC" + i + "')\" onmouseout=\"Z1()\">" + i + "<INPUT type='hidden' name='HC" + i + "'></td>");
for ( j=1;j<=BgLs;j++ )
{
out.println(" <td width='" + DyKd + "' onclick=\"S1('H" + i + "L" + j + "')\" onmouseout=\"Z1()\" ondblclick=\"W1('" + i + "','" + j + "')\"><img src=\"../../resources/images/GSDef/no.jpg\" name='xH" + i + "L" + j + "'\"><INPUT type='hidden' name='H" + i + "L" + j + "'><INPUT type='hidden' name='J" + i + "B" + j + "'><INPUT type='hidden' name='B" + i + "Z" + j + "'></td>");
}
out.println(" </tr>");
}
out.println("</table>");
out.println("<br>");
}
if ( BgGs >= 2 )
{
for ( Biao=2;Biao<=BgGs;Biao++)
{
out.println("<table border='1' width='" + BgKd + "'>");
out.println(" <tr>");
out.println(" <td width='" + LlKd + "' colspan='2' rowspan='2'></td>");
out.println(" <td width='" + SyKd + "' colspan='" + BgLs + "'><p align='center'>表 列 次</td>");
out.println(" </tr>");
out.println(" <tr>");
for ( i=(BgLs * ( Biao - 1) + 1);i<=(BgLs * Biao);i++ )
{
out.println(" <td width='" + DyKd + "' align='center' onclick=\"S1('LC" + i + "')\" onmouseout=\"Z1()\" ondblclick=\"D1('LC" + i + "')\">" + i + "<INPUT type='hidden' name='LC" + i + "'></td>");
}
out.println(" </tr>");
for ( i=0;i<=0;i++ )
{
out.println(" <tr>");
if ( i == 0 )
{
out.println(" <td width='" + DyKd + "' rowspan='" + BgHs + "'>行</td>");
}
out.println(" <td width='" + DyKd + "' align='center1' onclick=\"S1('HC" + i + "')\" onmouseout=\"Z1()\">" + i + "</td>");
for ( j=( 1 + BgLs * ( Biao - 1 ) );j<=( BgLs * Biao );j++ )
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -