JavaWeb项目开发案例精粹-第6章报价管理系统-07View层

时间:2023-03-09 03:44:32
JavaWeb项目开发案例精粹-第6章报价管理系统-07View层

1.

JavaWeb项目开发案例精粹-第6章报价管理系统-07View层

2.back_index.html

 <HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=gbk">
<TITLE>报价管理系统</TITLE>
</HEAD> <FRAMESET cols = "130,*" frameborder=yes bordercolor=silver>
<FRAME SRC="outlook.html" NAME="Links" SCROLLING="No">
<FRAME SRC="main.html" NAME="main" SCROLLING="AUTO">
</FRAMESET>
<NOFRAMES>
<BODY>
</BODY> </NOFRAMES> </HTML>

3.

 <HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=GBK">
<TITLE>导航栏</TITLE>
<STYLE>
div {
position:absolute;
}
</STYLE> <script language="JavaScript" src="crossbrowser.js" type="text/javascript">
</script>
<script language="JavaScript" src="outlook.js" type="text/javascript">
</script> <SCRIPT>
//create OutlookBar
var o = new createOutlookBar('Bar',0,0,screenSize.width,screenSize.height,'#606060','white')//'#000099')
var p //create first panel
p = new createPanel('customer','客户');
p.addButton('images/c.png','客户管理','parent.main.location="control/customer.do"');
p.addButton('images/cq.png','查询客户','parent.main.location="control/customermanage_query.do"');
o.addPanel(p); p = new createPanel('product','产品');
p.addButton('images/pt.png','产品类别管理','parent.main.location="control/producttype.do"');
p.addButton('images/ptq.png','产品类别查询','parent.main.location="control/producttypemanage_query.do"');
p.addButton('images/p.png','产品管理','parent.main.location="control/product.do"');
p.addButton('images/pq.png','产品查询','parent.main.location="control/productmanage_query.do"');
o.addPanel(p); p = new createPanel('order','订单');
p.addButton('images/o.png','订单管理','parent.main.location="control/order.do"');
p.addButton('images/oq.png','订单查询','parent.main.location="control/ordermanage_query.do"');
o.addPanel(p); p = new createPanel('quotation','报价');
p.addButton('images/q.png','报价管理','parent.main.location="control/quotation.do"');
p.addButton('images/qq.png','报价查询','parent.main.location="control/quotationmanage_query.do"');
o.addPanel(p); p = new createPanel('user','用户');
p.addButton('images/u.png','用户管理','parent.main.location="control/user.do"');
p.addButton('images/uq.png','用户查询','parent.main.location="control/usermanage_query.do"');
o.addPanel(p);
o.draw(); function resize_op5() {
if (bt.op5) {
o.showPanel(o.aktPanel);
var s = new createPageSize();
if ((screenSize.width!=s.width) || (screenSize.height!=s.height)) {
screenSize=new createPageSize();
setTimeout("o.resize(0,0,screenSize.width,screenSize.height)",100);
}
setTimeout("resize_op5()",100);
}
} //resize IE & NS (onResize event!)
function myOnResize() {
if (bt.ie4 || bt.ie5 || bt.ns5) {
var s=new createPageSize();
o.resize(0,0,s.width,s.height);
}
else
if (bt.ns4) location.reload();
} </SCRIPT>
</head>
<body onLoad="resize_op5();" onResize="myOnResize();">
</body>
</html>

4.main.html

 <HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=gbk">
<TITLE>报价管理系统首页</TITLE>
<style type="text/css">
<!--
a{ color:#008EE3}
a:link { text-decoration: none;color:#008EE3}
A:visited {text-decoration: none;color:#666666}
A:active {text-decoration: underline}
A:hover {text-decoration: underline;color: #0066CC}
A.b:link {
text-decoration: none;
font-size:12px;
font-family: "Helvetica,微软雅黑,宋体";
color: #FFFFFF;
}
A.b:visited {
text-decoration: none;
font-size:12px;
font-family: "Helvetica,微软雅黑,宋体";
color: #FFFFFF;
}
A.b:active {
text-decoration: underline;
color: #FF0000; }
A.b:hover {text-decoration: underline; color: #ffffff} .table1 {
border: 1px solid #CCCCCC;
}
.font {
font-size: 12px;
text-decoration: none;
color: #999999;
line-height: 20px; }
.input {
font-size: 12px;
color: #999999;
text-decoration: none;
border: 0px none #999999; } td {
font-size: 12px;
color: #007AB5;
}
form {
margin: 1px;
padding: 1px;
}
input {
border: 0px;
height: 26px;
color: #007AB5;
.unnamed1 {
border: thin none #FFFFFF;
}
.unnamed1 {
border: thin none #FFFFFF;
}
select {
border: 1px solid #cccccc;
height: 18px;
color: #666666; .unnamed1 {
border: thin none #FFFFFF;
}
body {
background-repeat: no-repeat;
background-color: #9CDCF9;
background-position: 0px 0px; }
.tablelinenotop {
border-top: 0px solid #CCCCCC;
border-right: 1px solid #CCCCCC;
border-bottom: 0px solid #CCCCCC;
border-left: 1px solid #CCCCCC;
}
.tablelinenotopdown { border-top: 1px solid #eeeeee;
border-right: 1px solid #eeeeee;
border-bottom: 1px solid #eeeeee;
border-left: 1px solid #eeeeee;
}
.style6 {FONT-SIZE: 9pt; color: #7b8ac3; }
.STYLE9 {font-size: 24px} -->
</style>
</head>
<body> <table width="681" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:20px">
<tr>
<td align="center"><span class="STYLE9">欢迎使用报价管理系统</span></td>
</tr>
<tr>
<td>
<p>&nbsp;&nbsp;报价管理系统可以分为五个功能模块,分别是客户管理模块、产品管理模块、订单管理模块、报价管理模块以及系统用户管理模块,其中各功能模块的具体说明如下。</p>
<p>客户管理模块:该模块主要用来管理客户信息,包括客户的名称、联系电话、联系地址、联系人等信息。</p>
<p>产品管理模块:该模块主要用来管理产品类别和产品信息,包括产品的名称、产品的单位、产品的价格等信息。</p>
<p>订单管理模块:该模块主要用来管理订单信息,包括下单客户名称、产品名称、产品数量等信息。</p>
<p>报价管理模块:该模块主要用来管理报价信息,包括客户名称、产品名称、报价人、报价时间等信息。</p>
<p>系统用户管理模块:该模块用来管理系统用户信息,包括用户名、用户级别、用户密码等信息。</p>
</td>
<tr>
</tr>
</table>
</body>
</html>

5.outlook.js

 // ---------------------------------------------------------------------------
// this script is copyright (c) 2001 by Michael Wallner!
// http://www.wallner-software.com
// mailto:dhtml@wallner-software.com
//
// you may use this script on web pages of your own
// you must not remove this copyright note!
//
// This script featured on Dynamic Drive (http://www.dynamicdrive.com)
// Visit http://www.dynamicdrive.com for full source to this script and more
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Outlook like navigation bar version 1.2
//
// supported browsers: IE4, IE5, NS4, NS6, MOZ, OP5
// needed script files: crossbrowser.js
//
// History:
// 1.0: initial version
// 1.1: no Reload in IE and NS6
// 1.2: no Reload in OP5 if width is not changed
// --------------------------------------------------------------------------- //add one button to a panel
//einen Button zu einem Panel hinzufügen
//img: image name - Name der Bilddatei
//label: button caption - Beschriftung des Buttons
//action: javascript on MouseUp event - Javascript beim onMouseUp event
function b_addButton(img, label, action) {
this.img[this.img.length]=img;
this.lbl[this.lbl.length]=label;
this.act[this.act.length]=action;
this.sta[this.sta.length]=0; return this
} //reset all panel buttons (ns4, op5)
//alle Panel Buttons zurücksetzten (ns4, op5)
function b_clear() {
var i
for (i=0;i<this.sta.length;i++) {
if (this.sta[i] != 0)
this.mOut(i);
}
} //----------------------------------------------------------------------------
// Panel functions for Netscape 4
//---------------------------------------------------------------------------- // write new htmlcode into the button layer
// schreibe den neuen HTML Code in den Button Layer
function b_mOver_ns4(nr) {
this.clear();
l=this.obj.layers[0].layers[nr].document;
l.open();
l.write("<Center>")
l.write("<SPAN class='imgbout'>")
l.write("<A href='#' onmouseOut='"+this.v+".mOut("+nr+")' ");
l.write("onMousedown='"+this.v+".mDown("+nr+")'><img src='"+this.img[nr]);
l.write("' border=0></A></SPAN><Font size=2 face=Arial color=white>");
l.write(this.lbl[nr]+"</FONT><BR><BR>");
l.close();
this.sta[nr]=1;
} function b_mOut_ns4(nr) {
l=this.obj.layers[0].layers[nr].document;
l.open();
l.write("<Center>")
l.write("<SPAN class='imgnob'>")
l.write("<A href='#' onmouseOver='"+this.v+".mOver("+nr+")' ");
l.write("onmouseOut='"+this.v+".mOut("+nr+")'><img src='"+this.img[nr]);
l.write("' border=0></A></SPAN><Font size=2 Face=Arial color=white>");
l.write(this.lbl[nr]+"</FONT><BR><BR>");
l.close();
this.sta[nr]=0;
} function b_mDown_ns4(nr) {
l=this.obj.layers[0].layers[nr].document;
l.open();
l.write("<Center>")
l.write("<SPAN class='imgbin'>")
l.write("<A href='#' onmouseOver='"+this.v+".mOver("+nr+")' ");
l.write("onmouseOut='"+this.v+".mOut("+nr+")' onMouseup='"+this.act[nr]);
l.write(";"+this.v+".mOver("+nr+")'><img src='"+this.img[nr]);
l.write("' border=0></A></SPAN><Font size=2 Face=Arial color=white>");
l.write(this.lbl[nr]+"</FONT><BR><BR>");
l.close();
this.sta[nr]=1;
} //test if scroll buttons should be visible
//teste ob Scroll-Buttons sichtbar sein sollen
function b_testScroll_ns4() {
var i
var j
var k i=this.obj.clip.bottom;
j=this.obj.layers[0].clip.bottom;
k=parseInt(this.obj.layers[0].top); if (k==38)
this.obj.layers[2].visibility='hide';
else
this.obj.layers[2].visibility='show'; if ((j+k)<i) {
this.obj.layers[3].visibility='hide';
}
else
this.obj.layers[3].visibility='show';
} //scroll the panel content up
//scrolle den Panel Inhalt nach Oben
function b_up_ns4(nr) {
this.ftop = this.ftop - 5;
this.obj.layers[0].top=this.ftop;
nr--
if (nr>0)
setTimeout(this.v+'.up('+nr+');',10);
else
this.testScroll();
} //scroll the panel content down
//scrolle den Panel Inhalt nach Unten
function b_down_ns4(nr) {
this.ftop = this.ftop + 5;
if (this.ftop>=38) {
this.ftop=38;
nr=0;
}
this.obj.layers[0].top=this.ftop;
nr-- if (nr>0)
setTimeout(this.v+'.down('+nr+');',10);
else
this.testScroll();
} //----------------------------------------------------------------------------
// Panel functions for Opera5
//---------------------------------------------------------------------------- //show one panelbutton layer and hide the others two
//zeige einen Panel Button Layer und verstecke die anderen beiden
function b_mOver_op5(nr) {
var obj0=getObj(this.name+'_b'+nr+'0')
var obj1=getObj(this.name+'_b'+nr+'1')
var obj2=getObj(this.name+'_b'+nr+'2') this.clear();
obj1.style.visibility="VISIBLE";
obj0.style.visibility="HIDDEN";
obj2.style.visibility="HIDDEN";
this.sta[nr]=1;
} function b_mOut_op5(nr) {
var obj0=getObj(this.name+'_b'+nr+'0')
var obj1=getObj(this.name+'_b'+nr+'1')
var obj2=getObj(this.name+'_b'+nr+'2') obj2.style.visibility="visible";
obj0.style.visibility="hidden";
obj1.style.visibility="hidden";
this.sta[nr]=1;
} function b_mDown_op5(nr) {
var obj0=getObj(this.name+'_b'+nr+'0')
var obj1=getObj(this.name+'_b'+nr+'1')
var obj2=getObj(this.name+'_b'+nr+'2') obj0.style.visibility="visible";
obj1.style.visibility="hidden";
obj2.style.visibility="hidden";
this.sta[nr]=1;
} // ---------------------------------------------------------------------------
// Panel functions for ie4, ie5, ns5, op5
// --------------------------------------------------------------------------- //test if scroll buttons should be visible
//teste ob Scroll-Buttons sichtbar sein sollen
function b_testScroll() { if (bt.op5) {
var i=parseInt(this.obj.style.pixelHeight);
var j=parseInt(this.objf.style.pixelHeight);
}
else {
var i=parseInt(this.obj.style.height);
var j=parseInt(this.objf.style.height);
}
var k=parseInt(this.objf.style.top); if (k==38)
this.objm1.style.visibility='hidden';
else
this.objm1.style.visibility='visible'; if ((j+k)<i) {
this.objm2.style.visibility='hidden';
}
else
this.objm2.style.visibility='visible';
} //scroll the panel content up
//scrolle den Panel Inhalt nach Oben
function b_up(nr) {
this.ftop = this.ftop - 5;
this.objf.style.top=this.ftop;
nr--
if (nr>0)
setTimeout(this.v+'.up('+nr+');',10);
else
this.testScroll();
} //scroll the panel content down
//scrolle den Panel Inhalt nach Unten
function b_down(nr) {
this.ftop = this.ftop + 5;
if (this.ftop>=38) {
this.ftop=38;
nr=0;
}
this.objf.style.top=this.ftop;
nr-- if (nr>0)
setTimeout(this.v+'.down('+nr+');',10);
else
this.testScroll();
} // ---------------------------------------------------------------------------
// Panel object
// --------------------------------------------------------------------------- //create one panel
function createPanel(name,caption) {
this.name=name; // panel layer ID
this.ftop=38; // actual panel scroll position
this.obj=null; // panel layer object
this.objc=null; // caption layer object
this.objf=null; // panel field layer object
this.objm1=null; // scroll button up
this.objm2=null; // scroll button down
this.caption=caption; // panel caption
this.img=new Array(); // button images
this.lbl=new Array(); // button labels
this.act=new Array(); // button actions
this.sta=new Array(); // button status (internal)
this.addButton=b_addButton; // add one button to panel
this.clear=b_clear; // reset all buttons
if (bt.ns4) { // functions for ns4
this.mOver=b_mOver_ns4; // handles mouseOver event
this.mOut=b_mOut_ns4; // handles mouseOut & mouseUp event
this.mDown=b_mDown_ns4; // handles mouseDown event
this.testScroll=b_testScroll_ns4; // test if scroll buttons visible
this.up=b_up_ns4; // scroll panel buttons up
this.down=b_down_ns4; // scroll panel buttons down
}
if (bt.op5) { // functions for op5
this.mOver=b_mOver_op5; // handles mouseOver event
this.mOut=b_mOut_op5; // handles mouseOut & mouseUp event
this.mDown=b_mDown_op5; // handles mouseDown event
}
if (!bt.ns4) { // functions for all browsers but ns4
this.testScroll=b_testScroll; // test if scroll buttons should be visible
this.up=b_up; // scroll panel buttons up
this.down=b_down; // scroll panel buttons down
} this.v = this.name + "var"; // global var of 'this'
eval(this.v + "=this"); return this
} //add one panel to the outlookbar
function b_addPanel(panel) {
panel.name=this.name+'_panel'+this.panels.length
this.panels[this.panels.length] = panel;
} //write style sheets
//schreibe die Style sheets
function b_writeStyle() { document.write('<STYLE TYPE="text/css">'); document.write('.button {width:300; text-align:center; font-family:arial;');
document.write(' font-size:12pt; cursor:hand; border-width:3;');
document.write(' border-style:outset; border-color:silver; ');
document.write('background-color:silver;}'); document.write('.noLine {text-decoration:none;}'); document.write('.imgB {color:white; font-family:arial; font-size:10pt;}'); if (bt.op5) {
document.write('.imgbin {border-width:3; border-style:inset; ');
document.write('border-color:white;}');
}
else {
document.write('.imgbin {border-width:3; border-style:inset; ');
document.write('border-color:silver;}');
} if (bt.op5) {
document.write('.imgbout {border-width:3; border-style:outset; ');
document.write('border-color:white;}');
}
else {
document.write('.imgbout {border-width:3; border-style:outset; width:54;');
document.write('border-color:silver;}');
} document.write(' .imgnob {border-width:3; border-style:solid;width:54; ');
document.write('border-color:'+this.bgcolor+';}'); document.write('</STYLE>'); } // Draw the Outlook Bar
function b_draw() {
var i;
var j;
var t=0;
var h;
var c=0; this.writeStyle(); if (bt.ns5 || bt.op5) c=6; //two times border width if (bt.ns4) { //draw OutlookBar for ns4
//OutlookBar layer..
document.write('<layer bgcolor='+this.bgcolor+' name='+this.name+' left=');
document.write(this.xpos+' top='+this.ypos+' width='+this.width);
document.write(' clip="0,0,'+this.width+','+this.height+'">'); //one layer for every panel...
for (i=0;i<this.panels.length;i++) {
document.write('<Layer name='+this.name+'_panel'+i+' width='+this.width);
document.write(' top='+i*28+' bgcolor='+this.bgcolor);
document.write(' clip="0,0,'+this.width+',');
document.write(this.height-(this.panels.length-1)*28+'">'); //one layer to host the panel buttons
document.write('<Layer top=38 width='+this.width+'>');
mtop=0 //one layer for every button
for (j=0;j<this.panels[i].img.length;j++) {
document.write('<Layer top='+mtop+' width='+this.width);
document.write('><Center><SPAN class=imgnob>');
document.write("<A href='#' onmouseOut='"+this.panels[i].v);
document.write(".rst("+j+")' onmouseOver='"+this.panels[i].v);
document.write(".mOver("+j+")'><img src='"+this.panels[i].img[j]);
document.write("' border=0></A></SPAN>");
document.write("<Font size=2 face=arial color=white>");
document.write(this.panels[i].lbl[j]+"</FONT><BR><BR>");
document.write('</Layer>');
mtop=mtop+this.buttonspace;
} document.write('</Layer>'); //one layer for the panels caption
document.write('<Layer top=0 width='+this.width+' clip="0,0,');
document.write(this.width+',28" bgcolor=silver class=button ');
document.write('onmouseOver="'+this.panels[i].v+'.clear();">');
document.write('<A class=noLine href="javascript:'+this.v+'.showPanel(');
document.write(i+');" onmouseOver="'+this.panels[i].v+'.clear();">');
document.write('<Font Color=black class=noLine>'+this.panels[i].caption);
document.write('</Font></A></Layer>'); //two layers for scroll-up -down buttons
document.write('<Layer visibility=hide top=40 left='+(this.width-20));
document.write('><A href="#" onClick="'+this.panels[i].v+'.down(16);" ');
document.write('onmouseOver="'+this.panels[i].v+'.clear();"><img ');
document.write('width=16 height=16 src=images/arrowup.gif border=0>');
document.write('</A></LAYER><Layer top=');
document.write((this.height-(this.panels.length)*28)+'<Layer top=');
document.write((this.height-(this.panels.length)*28)+' left=');
document.write((this.width-20)+'><A href="#" onClick="');
document.write(this.panels[i].v+'.up(16);" onmouseOver="');
document.write(this.panels[i].v+'.clear();"><img width=16 height=16 ');
document.write('src=images/arrowdown.gif border=0></A></LAYER>'); document.write('</LAYER>');
}
document.write('</LAYER>');
}
else { //draw Outlook bar for all browsers but ns4 //OutlookBar layer..
document.write('<DIV id='+this.name+' Style="position:absolute; left:');
document.write(this.xpos+'; top:'+this.ypos+'; width:'+this.width);
document.write('; height:'+this.height+'; background-color:'+this.bgcolor)
document.write('; clip:rect(0,'+this.width+','+this.height+',0)">');
h=this.height-((this.panels.length-1)*28) //one layer for every panel...
for (i=0;i<this.panels.length;i++) {
document.write('<DIV id='+this.name+'_panel'+i);
document.write(' Style="position:absolute; left:0; top:'+t);
document.write('; width:'+this.width+'; height:'+h+'; clip:rect(0px, ');
document.write(this.width+'px, '+h+'px, 0px); background-color:');
document.write(this.bgcolor+';">')
t=t+28; //one layer to host the panel buttons
document.write('<div id='+this.name+'_panel'+i);
document.write('_f Style="position:absolute; left:0; top:38; width:');
document.write(this.width+'; height:');
document.write((this.panels[i].img.length*this.buttonspace));
document.write('; background-color:'+this.bgcolor+';">')
mtop=0 //one (ie4, ie5, ns5) or three layers (op5) for every button
for (j=0;j<this.panels[i].img.length;j++) {
if (bt.op5) {
document.write('<DIV id='+this.name+'_panel'+i+'_b'+j);
document.write('0 class=imgB Style="position:absolute; ');
document.write('visibility:hidden; left:0; width:'+this.width);
document.write('; top:'+mtop+'; text-align:center;">');
document.write('<img src='+this.panels[i].img[j]);
document.write(' class=imgbin onmouseUp=\''+this.panels[i].v);
document.write('.mOver('+j+');'+this.panels[i].act[j]);
document.write(';\' onmouseOut="'+this.panels[i].v+'.mOut('+j);
document.write(');"><BR>'+this.panels[i].lbl[j]+'</DIV>'); document.write('<DIV id='+this.name+'_panel'+i+'_b'+j+'1 class=imgB');
document.write(' Style="position:absolute; visibility:hidden; ');
document.write('left:0; width:'+this.width+'; top:'+mtop);
document.write('; text-align:center;">');
document.write('<img src='+this.panels[i].img[j]);
document.write(' class=imgbout onmouseDown="'+this.panels[i].v);
document.write('.mDown('+j+');" onmouseUp=\''+this.panels[i].v);
document.write('.mOver('+j+');'+this.panels[i].act[j]);
document.write(';\' onmouseOut="'+this.panels[i].v+'.mOut('+j);
document.write(');"><BR>'+this.panels[i].lbl[j]+'</DIV>'); document.write('<DIV id='+this.name+'_panel'+i+'_b'+j);
document.write('2 class=imgB Style="position:absolute; ');
document.write('visibility:visible; left:0; width:'+this.width);
document.write('; top:'+mtop+'; text-align:center;">');
document.write('<img src='+this.panels[i].img[j]+' class=imgnob ');
document.write('onmouseOver="'+this.panels[i].v+'.mOver('+j);
document.write(');"><BR>'+this.panels[i].lbl[j]+'</DIV>');
}
else {
document.write('<DIV id='+this.name+'_panel'+i+'_b'+j+' class=imgB ');
document.write('Style="position:absolute; left:0; width:'+this.width);
document.write('; top:'+mtop+'; text-align:center;">');
document.write('<img src='+this.panels[i].img[j]+' class=imgnob ');
document.write('onmouseOver="this.className=\'imgbout\';" ');
document.write('onmouseDown="this.className=\'imgbin\';" ');
document.write('onmouseUp=\'this.className="imgbout";');
document.write(this.panels[i].act[j]+';\' ');
document.write('onmouseOut="this.className=\'imgnob\';"><BR>');
document.write(this.panels[i].lbl[j]+'</DIV>');
}
mtop=mtop+this.buttonspace;
} document.write('</DIV>'); //one layer for the panels caption if not op5!
if (!bt.op5) {
document.write('<DIV id='+this.name+'_panel'+i+'_c class=button ');
document.write('onClick="javascript:'+this.v+'.showPanel('+i);
document.write(');" style="position:absolute; left:0; top:0; width:');
document.write((this.width-c)+'; height:'+(28-c)+';"><A href="#" ');
document.write('onClick="'+this.v+'.showPanel('+i+');this.blur();');
document.write('return false;" class=noLine><FONT color=black ');
document.write('class=noLine">'+this.panels[i].caption);
document.write('</FONT></A></DIV>')
}
//two layers for scroll-up -down buttons
document.write('<DIV id='+this.name+'_panel'+i);
document.write('_m1 style="position:absolute; top:40; left:');
document.write((this.width-20)+';"><A href="#" onClick="');
document.write(this.panels[i].v+'.down(16);this.blur();return false;" ');
document.write('onmouseOver="'+this.panels[i].v+'.clear();">');
document.write('<img width=16 height=16 src=images/arrowup.gif border=0>');
document.write('</A></DIV>');
document.write('<DIV id='+this.name+'_panel'+i);
document.write('_m2 style="position:absolute; top:');
document.write((this.height-(this.panels.length)*28)+'; left:');
document.write((this.width-20)+';"><A href="#" onClick="');
document.write(this.panels[i].v+'.up(16);this.blur();return false" ');
document.write('onmouseOver="'+this.panels[i].v+'.clear();">');
document.write('<img width=16 height=16 src=images/arrowdown.gif border=0>');
document.write('</A></DIV>'); document.write('</DIV>') }
//Opera bug (Clip!)
//op5 doesn't support layer clipping! so use top layers for panel caption
//and two top layers with background-color like page color to hide
//panel content outside of the outlookbar.
//op5 unterstützt kein Clip bei Layers! darum erzeugen wir drei top level
//layers für die Panel Überschrift und zwei top Layers mit der gleichen
//Hintergrundfarbe wie die HTML Seite um den Panel Inhalt außerhalb des
//Outlook Bars zu verdecken!
if (bt.op5) {
//one layers for panel captions if op5
for (i=0;i<this.panels.length;i++) {
document.write('<DIV id='+this.name+'_panel'+i);
document.write('_c class=button onmouseOver="'+this.panels[i].v);
document.write('.clear();" onClick="'+this.v+'.showPanel('+i);
document.write(');" style="position:absolute; left:0; top:0; width:');
document.write((this.width-c)+'; height:'+(28-c)+';">');
document.write('<A href="#" ');
document.write('onClick="'+this.v+'.showPanel('+i+');this.blur();');
document.write('return false;" class=noLine><FONT color=black ');
document.write('class=noLine">'+this.panels[i].caption);
document.write('</FONT></A></DIV>')
}
//two layers to hide 'nonvisible' part of panel
//(op5 doesn't support clipping!)
//document.write('<DIV style="position:absolute; left:0; top:');
//document.write(this.height+'; height:300; width:'+this.width);
//document.write('; background-color:'+this.pagecolor+';"></DIV>');
//document.write('<DIV style="position:absolute; left:0; top:-300; ');
//document.write('height:300; width:'+this.width+'; background-color:');
//document.write(this.pagecolor+';"></DIV>');
}
document.write('</DIV>'); }
for (i=0;i<this.panels.length;i++) {
this.panels[i].obj=getObj(this.name+'_panel'+i);
if (!bt.ns4) {
this.panels[i].objc=getObj(this.name+'_panel'+i+'_c');
this.panels[i].objf=getObj(this.name+'_panel'+i+'_f');
this.panels[i].objm1=getObj(this.name+'_panel'+i+'_m1');
this.panels[i].objm2=getObj(this.name+'_panel'+i+'_m2');
}
this.panels[i].testScroll();
} //activate last panel
//op5 dosen't support cookies!
//so get actual panel from url paramter
if (bt.op5) {
if (document.location.search=='') {
this.showPanel(0);
}
else
this.showPanel(document.location.search.substr(1,1));
}
else {
//actual panel is saved in a cookie
if (document.cookie)
this.showPanel(document.cookie);
else
this.showPanel(0);
}
} // ---------------------------------------------------------------------------
// outlookbar function for ns4
// --------------------------------------------------------------------------- function b_showPanel_ns4(nr) {
var i
var l
document.cookie=nr;
l = this.panels.length;
for (i=0;i<l;i++) {
if (i>nr) {
this.panels[i].obj.top=this.height-((l-i)*28)-1;
}
else {
this.panels[i].obj.top=i*28;
}
}
} // ---------------------------------------------------------------------------
// outlookbar function for ie4, ie5, ns5, op5
// --------------------------------------------------------------------------- function b_showPanel(nr) {
var i
var l
var o
document.cookie=nr;
this.aktPanel=nr;
l = this.panels.length;
for (i=0;i<l;i++) {
if (i>nr) {
this.panels[i].obj.style.top=this.height-((l-i)*28);
//Opera doesn't support clip:rect()!
//so hide non visible panels
//and move panel caption
if (bt.op5) {
this.panels[i].objf.style.visibility='hidden';
this.panels[i].objc.style.top=this.height-((l-i)*28);
}
}
else {
this.panels[i].obj.style.top=i*28;
//Opera doesn't support clip:rect()!
//so show visible panel
//and move panel caption
if (bt.op5) {
this.panels[i].objf.style.visibility='visible';
this.panels[i].objc.style.top=i*28;
}
}
}
} //resize the Outlook Like Bar
//IE4/5 & NS6 -> resize all layers (width & height)
//op5 -> resize only height - reload on width change
//ns4 -> reload on any change!
//
//if you change the width of a layer (style="text-align:center;") then
//the content will not be moved!
function b_resize(x,y,width,height) {
var o
var i
var j
var h
var c=(bt.ns5)?6:0; if (bt.ns4)
location.reload();
else {
if (bt.op5 && (width!=this.width))
if (location.href.indexOf('?')!=-1)
location.href=location.href.replace(/\?./,"?"+this.aktPanel)
else
location.href= location.href+'?'+this.aktPanel;
else {
this.xpos=x;
this.yPos=y;
this.width=width
this.height=height o=getObj(this.name);
o.style.left=x;
o.style.top=y;
o.style.width=width;
o.style.height=height;
o.style.clip='rect(0px '+this.width+'px '+this.height+'px 0px)'; h=this.height-((this.panels.length-1)*28) for (i=0; i<this.panels.length; i++) { o=getObj(this.name+'_panel'+i+'_c');
o.style.width=(this.width-c); if (!bt.op5)
for (j=0;j<this.panels[i].img.length;j++) {
o=getObj(this.name+'_panel'+i+'_b'+j);
o.style.width=this.width;
} this.panels[i].objm1.style.left=(this.width-20);
this.panels[i].objm2.style.top=(this.height-(this.panels.length)*28);
this.panels[i].objm2.style.left=(this.width-20);
this.panels[i].objf.style.width=this.width;
this.panels[i].obj.style.width=this.width
this.panels[i].obj.style.height=h
this.panels[i].obj.style.pixelHeight=h
this.panels[i].obj.style.clip='rect(0px '+this.width+'px '+h+'px 0px)'; this.panels[i].testScroll();
}
}
this.showPanel(this.aktPanel);
}
} // ---------------------------------------------------------------------------
// OutlookBar object for ie4, ie5, ns5, op5
// --------------------------------------------------------------------------- function createOutlookBar(name,x,y,width,height,bgcolor,pagecolor) {
this.aktPanel=0; // last open panel
this.name=name // OutlookBar name
this.xpos=x; // bar x-pos
this.ypos=y; // bar y-pos
this.width=width; // bar width
this.height=height; // bar height
this.bgcolor=bgcolor; // bar background color
this.pagecolor=pagecolor; // page bgcolor (op5!)
this.buttonspace=80 // distance of panel buttons
this.panels=new Array() // OutlookBar panels
this.addPanel=b_addPanel; // add new panel to bar
this.writeStyle=b_writeStyle;
this.draw=b_draw; // write HTML code of bar
if (bt.ns4)
this.showPanel=b_showPanel_ns4; // make a panel visible (ns4)
else
this.showPanel=b_showPanel; // make a panel visible (!=ns4) this.resize=b_resize; // resize Outlook Like Bar this.v = name + "var"; // global var of 'this'
eval(this.v + "=this"); return this
}

6.crossbrowser.js

 // ---------------------------------------------------------------------------
// this script is copyright (c) 2001 by Michael Wallner!
// http://www.wallner-software.com
// mailto:dhtml@wallner-software.com
//
// you may use this script on web pages of your own
// you must not remove this copyright note!
//
// This script featured on Dynamic Drive (http://www.dynamicdrive.com)
// Visit http://www.dynamicdrive.com for full source to this script and more
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// crossbrowser DHTML functions version 1.0
//
// supported browsers: IE4, IE5, NS4, NS6, MOZ, OP5
// --------------------------------------------------------------------------- //get browser info
//ermittle den verwendeten Browser
//Unterstόtzt IE4, IE5, IE6?, NS4, NS6, Mozilla5 und Opera5
//(Achtung op5 kann sich auch als NS oder IE ausgeben!)
function browserType() {
this.name = navigator.appName;
this.version = navigator.appVersion; //Version string
this.dom=document.getElementById?1:0 //w3-dom
this.op5=(this.name.indexOf("Opera") > -1 && (this.dom))?1:0 //Opera Browser
this.ie4=(document.all && !this.dom)?1:0 //ie4
this.ie5=(this.dom && this.version.indexOf("MSIE ") > -1)?1:0 //IE5, IE6?
this.ns4=(document.layers && !this.dom)?1:0 //NS4
this.ns5=(this.dom && this.version.indexOf("MSIE ") == -1)?1:0 //NS6, Mozilla5 //test if op5 telling "i'm ie..." (works because op5 doesn't support clip)
//testen ob sich ein op5 als ie5 'ausgibt' (funktioniert weil op5 kein clip
//unterstόtzt)
if (this.ie4 || this.ie5) {
document.write('<DIV id=testOpera style="position:absolute; visibility:hidden">TestIfOpera5</DIV>');
if (document.all['testOpera'].style.clip=='rect()') {
this.ie4=0;
this.ie5=0;
this.op5=1;
}
} this.ok=(this.ie4 || this.ie5 || this.ns4 || this.ns5 || this.op5) //any DHTML
eval ("bt=this");
}
browserType(); //crossbrowser replacement for getElementById (find ns4 sublayers also!)
//ersetzte 'getElementById' (findet auch sublayers in ns4)
function getObj(obj){
//do not use 'STYLE=' attribut in <DIV> tags for NS4!
//zumindest beim NS 4.08 dόrfen <DIV> Tags keine 'STYLE=' Angabe beinhalten
//sonst werden die restlichen Layers nicht gefunden! class= ist jedoch erlaubt! //search layer for ns4
//Recursive Suche nach Layer fόr NS4
function getRefNS4(doc,obj){
var fobj=0;
var c=0
while (c < doc.layers.length) {
if (doc.layers[c].name==obj) return doc.layers[c];
fobj=getRefNS4(doc.layers[c].document,obj)
if (fobj != 0) return fobj
c++;
}
return 0;
} return (bt.dom)?document.getElementById(obj):(bt.ie4)?
document.all[obj]:(bt.ns4)?getRefNS4(document,obj):0
} //get the actual browser window size
//ermittle die grφίe der Browser Anzeigeflδche
//op5 supports offsetXXXX ans innerXXXX but offsetXXXX only after pageload!
//op5 unterstόtzt sowohl innerXXXX als auch offsetXXXX aber offsetXXXX erst
//nach dem vollstδndigen Laden der Seite!
function createPageSize(){
this.width=(bt.ns4 || bt.ns5 || bt.op5)?innerWidth:document.body.offsetWidth;
this.height=(bt.ns4 || bt.ns5 || bt.op5)?innerHeight:document.body.offsetHeight;
return this;
}
var screenSize = new createPageSize(); //create a crossbrowser layer object
function createLayerObject(name) {
this.name=name;
this.obj=getObj(name);
this.css=(bt.ns4)?obj:obj.style;
this.x=parseInt(this.css.left);
this.y=parseInt(this.css.top);
this.show=b_show;
this.hide=b_hide;
this.moveTo=b_moveTo;
this.moveBy=b_moveBy;
this.writeText=b_writeText;
return this;
} //crossbrowser show
function b_show(){
// this.visibility='visible'
this.css.visibility='visible';
} //crossbrowser hide
function b_hide(){
// this.visibility='hidden'
this.css.visibility='hidden';
} //crossbrowser move absolute
function b_moveTo(x,y){
this.x = x;
this.y = y;
this.css.left=x;
this.css.top=y;
} //crossbrowser move relative
function b_moveBy(x,y){
this.moveTo(this.x+x, this.y+y)
} //write text into a layer (not supported by Opera 5!)
//this function is not w3c-dom compatible but ns6
//support innerHTML also!
//Opera 5 does not support change of layer content!!
function b_writeText(text) {
if (bt.ns4) {
this.obj.document.write(text);
this.obj.document.close();
}
else {
this.obj.innerHTML=text;
}
}

7.script/public.js

 /*
* 打开新窗口
* f:链接地址
* n:窗口的名称
* w:窗口的宽度
* h:窗口的高度
* s:窗口是否有滚动条,1:有滚动条;0:没有滚动条
*/
function openWin(f,n,w,h,s){
sb = s == "1" ? "1" : "0";
l = (screen.width - w)/2;
t = (screen.height - h)/2;
sFeatures = "left="+ l +",top="+ t +",height="+ h +",width="+ w
+ ",center=1,scrollbars=" + sb + ",status=0,directories=0,channelmode=0";
openwin = window.open(f , n , sFeatures );
if (!openwin.opener)
openwin.opener = self;
openwin.focus();
return openwin;
} /*
* 打开删除窗口
*/
function openDeleteDialog(url,confirmString){
var c = confirmString;
if(c == null || c == ''){
c = "你确认要删除记录吗?";
}
if(confirm(c)){
return window.showModalDialog(url,"window123","dialogHeight:234px;dialogWidth:271px;resizable:no;help:yes;status:no;scroll:no");
}
return false;
} /*
* 删除记录
*/
function del(url,info){
if(openDeleteDialog(url,info)){
window.location.reload(true);
}
} /*
* 校验checkbox
*/
function checkAll( chkName, checkboxName, pageSize ) {
var src = event.srcElement;
var chkN=eval("document.all."+chkName); if (src.checked) {
chkN[0].checked = true;
chkN[1].checked = true;
for(var i=0; i<pageSize; i++) {
var chk = eval("document.all." + checkboxName + i);
if (chk) {
chk.checked=true;
}
}
} else {
chkN[0].checked = false;
chkN[1].checked = false;
for(var i=0; i<pageSize; i++) {
var chk = eval("document.all." + checkboxName + i);
if(chk) {
chk.checked=false;
}
}
}
} /*
*
*/
function makePages(maxPage, selectedPage, selectName) {
var sel=eval("document.all."+selectName);
sel.length=0;
for(var i=1; i<=maxPage; i++) {
sel.options[i]=new Option(i,i);
if(sel.options[i]==selectedPage) {
sel.options[i].selected=true;
}
}
} /*
* 替换字符串
*/
function replaceStr( str ) {
var re="/( )/gi";
str = str.replace(re,"");
re="/\</gi";
str = str.replace(re,"&lt;"); return str;
} /*
* 去掉左边空格
*/
function LTrim(str) {
var whitespace = new String(" \t\n\r");
var s = new String(str);
if (whitespace.indexOf(s.charAt(0)) != -1) {
var j=0, i = s.length;
while (j < i && whitespace.indexOf(s.charAt(j)) != -1) {
j++;
}
s = s.substring(j, i);
}
return s;
} /*
* 去掉右边空格
*/
function RTrim(str) {
var whitespace = new String(" \t\n\r");
var s = new String(str);
if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
var i = s.length - 1;
while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1) {
i--;
}
s = s.substring(0, i+1);
}
return s;
} /*
* 去掉两边空格
*/
function Trim(str) {
return RTrim(LTrim(str));
} /*
*
*/
function exeOperation( exePath ){
var obj = new ActiveXObject("Microsoft.XMLHTTP");
obj.open("post",exePath,false);
obj.send();
var res = obj.responseText;
var rs = Trim(res);
if (rs.indexOf('true',0) != -1) {
return true;
} else {
return false;
}
} /*
*
*/
function exeValidate( exePath ){
var obj = new ActiveXObject("Microsoft.XMLHTTP");
obj.open("post",exePath,false);
obj.send();
var res = obj.responseText;
var rs = Trim(res);
if (rs.indexOf('validate_login_user',0) != -1) {
return true;
} else {
return false;
}
} /*
* 显示
*/
function validate_date( exePath ) {
var obj = new ActiveXObject("Microsoft.XMLHTTP");
obj.open("post",exePath,false);
obj.send();
var res = obj.responseText;
var rs = Trim(res);
var begin_str = "<!--begin-->";
var beginIndex = rs.indexOf(begin_str) + begin_str.length;
var endIndex = rs.indexOf("<!--end-->");
rs = ((beginIndex >= 0) && (endIndex >= 0)) ? rs.substring(beginIndex,endIndex) : "";
return Trim(rs);
} /*
* 校验是否数字
*/
function checkNumber(name, TempS) {
for(Count=0;Count<TempS.length;Count++) {
TempChar=TempS.substring(Count,Count+1);
RefString="0123456789";
if (RefString.indexOf(TempChar,0)==-1) {
alert("请输入数字");
eval("document.all." + name).focus();
return false;
}
}
} /*
* 是否有非法字符
*/
function chksafe(a){
fibdn = new Array ("'" ,"\\");
i=fibdn.length;
j=a.length;
for (ii=0; ii<i; ii++) {
for (jj=0; jj<j; jj++) {
temp1=a.charAt(jj);
temp2=fibdn[ii];
if (temp1==temp2){
return false;
}
}
}
return true;
} /*
*
*/
function fucCheckNUM(NUM){
var i,j,strTemp;
strTemp="0123456789";
if ( NUM.length== 0)
return false;
for (i=0;i<NUM.length;i++) {
j=strTemp.indexOf(NUM.charAt(i));
if (j==-1){
return false;
}
}
return true;
} /*
*
*/
function fucCheckLength(strTemp) {
var i,sum;
sum=0;
for(i=0;i<strTemp.length;i++) {
if ((strTemp.charCodeAt(i)>=0) && (strTemp.charCodeAt(i)<=255)) {
sum=sum+1;
} else {
sum=sum+2;
}
}
return sum;
} /*
*
*/
function chkElements( name, errMsg, max_length, lengthMsg ) {
var el_name = eval("document.all." + name);
var v = el_name.value;
if (!chksafe(v)) {
el_name.focus();
alert(errMsg);
return false;
} else if (fucCheckLength(v) > max_length) {
el_name.focus();
alert(lengthMsg);
return false;
}
return true;
} /*
* 校验空字符串
*/
function checkNullStr(name, msg) {
var el_name = eval("document.all."+name);
if (Trim(el_name.value).length==0) {
alert(msg);
el_name.focus();
return false;
}
return true;
} /*
* 显示日期控件
*/
function GetDate(nText,para){
var v_url = para=="1"?"./common/data.html":"../../common/data.html";
var reVal = window.showModalDialog(v_url, 'data',"status:no;center:yes;scroll:no;resizable:no;dialogWidth:255px;dialogHeight:260px");
if (reVal != null) {
var n = eval("document.all." + nText);
n.value=reVal;
}
} /*
* 按比例缩小图片
*/
function DrawImage(ImgD,iwidth,iheight){
var flag=false;
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= iwidth/iheight){
if(image.width>iwidth){
ImgD.width=iwidth;
ImgD.height=(image.height*iwidth)/image.width;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
// ImgD.alt=image.width+"×"+image.height;
}else{
if(image.height>iheight){
ImgD.height=iheight;
ImgD.width=(image.width*iheight)/image.height;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
// ImgD.alt=image.width+"×"+image.height;
}
}
ImgD.style.visibility = "visible";
} /*
* 回车键转为Tab键
*/
function enterTab(){
if(event.keyCode==13){
oElement = document.activeElement;
if(oElement.tagName != "TEXTAREA" && oElement.type != "button")
event.keyCode=9;
return ;
}
} /*
*
*/
function objectEval(text) {
text = text.replace(/\n/g, " ");
text = text.replace(/\r/g, " ");
if (text.match(/^\s*\{.*\}\s*$/)) {
text = "[" + text + "]";
}
return eval(text)[0];
} /*
* 打开领导查询页面
* action - 查询的Action
* method - 调用的方法
* title - 标题message
* name - 员工选择域的name
*/
function openLeaderQuery(action,method,title,name){
openWin("../../common/selectStaff.jsp?action="+action+"&method="+method+"&title="+title+"&name="+name,"public_leader_find_page","400","150");
} /*
* 第一行变色
*/
function chgColor(){
var v_table = document.all["PowerTable"];
var v_row = v_table.rows[1];
var len = v_row.cells.length;
for(var i=0;i<len;i++){
var v_cell = v_row.cells[i];
v_cell.style.backgroundColor = "yellow";
}
} /*
* 第一行变色
*/
function chgColor2(){
var v_table = document.all["PowerTable"];
var rows_count=v_table.rows.length;
var v_row,v_cell,temp_len,len;
var rowspan=0; //get rowspan
if (v_table.rows.length > 1) {
len = v_table.rows[1].cells.length;
for (var r=2; r < rows_count; r++) {
v_row = v_table.rows[r];
temp_len = v_row.cells.length;
if (temp_len==len) {
rowspan=r-1;
break;
}
} rowspan=(rowspan>0) ? (rowspan+1) : rows_count;
for(var r=1; r < rowspan; r++) {
v_row=v_table.rows[r];
for (var t=0; t < v_row.cells.length; t++) {
v_cell = v_row.cells[t];
v_cell.style.backgroundColor = "yellow";
}
}
}
} /*
* 添加页面载入后触发的事件
*/
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof(window.onload) != "function") {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}
//adsName:名称,adsUrl:地址,sTime:时间(小时) add by wujie 2005.12.12
function PopAds(adsName,adsUrl,sTime,number,w,h,s)
{
if(document.cookie.indexOf(adsName)==-1)
{
window.open(adsUrl,adsName);
self.focus();
var expireDate = new Date();
var lefttime = 1000 * (3600 * sTime);
expireDate.setTime (expireDate.getTime() + lefttime);
document.cookie = adsName +"=yes" + "; expires=" + expireDate.toGMTString() + ";";
}
openWin(adsUrl,number,w,h,s);
}
document.onkeydown=enterTab;

8.customer/customer_add.jsp

 <%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@include file="/share/taglib.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<link href="<%=basePath%>style/oa.css" rel="stylesheet" type="text/css">
<script language="javascript" src="<%=basePath%>script/public.js"></script>
<title>新增客户信息</title>
</head>
<body>
<center>
<form action="customermanage_add.do" method="post">
<TABLE class="tableEdit" border="0" cellspacing="1" cellpadding="0" style="width:580px;">
<TBODY>
<TR>
<!-- 这里是添加、编辑界面的标题 -->
<td align="center" class="tdEditTitle">新增客户信息</TD>
</TR>
<TR>
<td>
<!-- 主输入域开始 -->
<table class="tableEdit" style="width:580px;" cellspacing="0" border="0" cellpadding="0">
<tr>
<td class="tdEditLabel" >客户编号</td>
<td class="tdEditContent"><input type="text" name="customerNO">
</td>
<td class="tdEditLabel" >客户名称</td>
<td class="tdEditContent"><input type="text" name="customerName"></td>
</tr>
<tr>
<td class="tdEditLabel" >联系电话</td>
<td class="tdEditContent"><input type="text" name="phone">
</td>
<td class="tdEditLabel" >联系地址</td>
<td class="tdEditContent"><input type="text" name="address"></td>
</tr>
<tr>
<td class="tdEditLabel" >联系人</td>
<td class="tdEditContent"><input type="text" name="relationman">
</td>
<td class="tdEditLabel" >其他</td>
<td class="tdEditContent"><input type="text" name="otherInfo"></td>
</tr>
</table>
<!-- 主输入域结束 -->
</td>
</TR>
</TBODY>
</TABLE>
<TABLE>
<TR align="center">
<TD colspan="3" bgcolor="#EFF3F7">
<input type="submit" name="saveButton"
class="MyButton" value="保存客户信息">
<input type="button" class="MyButton"
value="关闭窗口" onclick="window.close()">
</TD>
</TR>
</TABLE>
</form>
</center>
</body>
</html>

9.customer/customer_list.jsp

 <%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@include file="/share/taglib.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<link href="<%=basePath%>style/oa.css" rel="stylesheet" type="text/css">
<script language="javascript" src="<%=basePath%>script/public.js"></script>
<script type="text/javascript">
//到指定的分页页面
function topage(page){
var form = document.forms[0];
form.page.value=page;
form.submit();
}
</script>
<title>客户管理</title>
</head>
<BODY bgColor=#dee7ff leftMargin=0 background="" topMargin=0 marginheight="0" marginwidth="0">
<center>
<TABLE width="778" border=0 cellPadding=0 cellSpacing=0 borderColor=#ffffff bgColor=#dee7ff style="FONT-SIZE: 10pt">
<TBODY>
<TR height=35>
<TD align=middle width=20 background=<%=basePath%>images/title_left.gif
bgColor=#dee7ff></TD>
<TD align=middle width=120 background=<%=basePath%>images/title_left.gif
bgColor=#dee7ff><FONT color=#f7f7f7> 客户管理<font color="#FFFFFF">&nbsp;</font></FONT> </TD>
<TD align=middle width=11 background=<%=basePath%>images/title_middle.gif
bgColor=#dee7ff><FONT color=#f7f7f7>&nbsp;</FONT> </TD>
<TD align=middle background=<%=basePath%>images/title_right.gif
bgColor=#dee7ff><FONT color=#f7f7f7>&nbsp;</FONT> </TD>
</TR>
</TBODY>
</TABLE>
<TABLE width="778" border=0 align=center cellPadding=0 cellSpacing=0 borderColor=#ffffff style="FONT-SIZE: 10pt">
<TBODY>
<TR>
<TD width="82%" height=14 align=right vAlign=center noWrap>
</TD>
<TD width="18%" align=right vAlign=center noWrap> </TD>
</TR>
<TR>
<TD height=14 align=right vAlign=center noWrap>
<!-- 在这里插入查询表单 -->
</TD>
<TD height=14 align="left" vAlign=center noWrap>
<a href="#" onclick="openWin('customermanage_addUI.do','addperson',600,200);">新增客户信息</a>
</TD>
</TR>
<TR>
<TD height=28 colspan="2" align=right vAlign=center noWrap background="<%=basePath%>images/list_middle.jpg">&nbsp;&nbsp;
<!-- 可以在这里插入分页导航条 -->
</TD>
</TR>
</TBODY>
</TABLE>
<form action="customer.do" method="post">
<s:hidden name="page"/>
<s:hidden name="customercode"/>
<s:hidden name="customername"/>
<s:hidden name="phone"/>
<s:hidden name="address"/>
<s:hidden name="relationman"/>
<s:hidden name="other"/>
<table width="778" border="0" cellPadding="0" cellSpacing="1" bgcolor="#6386d6">
<!-- 列表标题栏 -->
<tr bgcolor="#EFF3F7" class="TableBody1">
<td width="10%" height="37" align="center"><b>客户编号</b></td>
<td width="10%" height="37" align="center"><B>客户名称</B></td>
<td width="18%" height="37" align="center"><b>联系电话</b></td>
<td width="18%" height="37" align="center"><b>联系地址</b></td>
<td width="18%" height="37" align="center"><b>联系人</b></td>
<td width="18%" height="37" align="center"><b>其他信息</b></td>
<td width="10%" height="37" align="center"><b>操作</b></td>
</tr>
<!-- 列表数据栏 -->
<s:if test="null != #request.pageView.records && !#request.pageView.records.isEmpty() ">
<s:iterator value="#request.pageView.records" id="entity">
<tr bgcolor="#EFF3F7" class="TableBody1" onmouseover="this.bgColor = '#DEE7FF';" onmouseout="this.bgColor='#EFF3F7';">
<td align="center" vAlign="center">${entity.customerNO }</td>
<td align="center" vAlign="center">${entity.customerName }</td>
<td align="center" vAlign="center">${entity.phone }</td>
<td align="center" vAlign="center">${entity.address }</td>
<td align="center" vAlign="center">${entity.relationman }</td>
<td align="center" vAlign="center">${entity.otherInfo }</td>
<td align="center" vAlign="center"><a href="#" onclick="del('customermanage_del.do?customerNO=${entity.customerNO}');">删除</a>
<a href="#" onclick="openWin('customermanage_updateUI.do?customerNO=${entity.customerNO}','addperson',600,200);">修改</a>
</td>
</tr>
</s:iterator>
</s:if>
<!-- 在列表数据为空的时候,要显示的提示信息 -->
<s:else>
<tr>
<td colspan="7" align="center" bgcolor="#EFF3F7" class="TableBody1" onmouseover="this.bgColor = '#DEE7FF';" onmouseout="this.bgColor='#EFF3F7';">
没有找到相应的记录
</td>
</tr>
</s:else>
</table>
<TABLE width="778" border=0 align=center cellPadding=0 cellSpacing=0 borderColor=#ffffff style="FONT-SIZE: 10pt">
<TBODY>
<TR>
<TD height=28 align=right vAlign=center noWrap background="<%=basePath%>images/list_middle.jpg">&nbsp;&nbsp;
<!-- 可以在这里插入分页导航条 -->
<%@ include file="/share/fenye.jsp" %>
</TD>
</TR>
</TBODY>
</TABLE>
</form>
</center> </body> </html>

10.customer/customer_query.jsp

 <%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@include file="/share/taglib.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<link href="<%=basePath%>style/oa.css" rel="stylesheet" type="text/css">
<script language="javascript" src="<%=basePath%>script/public.js"></script>
<title>查询客户信息</title>
</head>
<body>
<center>
<form action="customer.do" method="post">
<input type="hidden" name="query" value="true">
<center>
<TABLE width="778" border=0 cellPadding=0 cellSpacing=0 borderColor=#ffffff bgColor=#dee7ff style="FONT-SIZE: 10pt">
<TBODY>
<TR height=35>
<TD align=middle width=20 background=<%=basePath%>images/title_left.gif
bgColor=#dee7ff></TD>
<TD align=middle width=120 background=<%=basePath%>images/title_left.gif
bgColor=#dee7ff><FONT color=#f7f7f7>客户查询<font color="#FFFFFF">&nbsp;</font></FONT> </TD>
<TD align=middle width=11 background=<%=basePath%>images/title_middle.gif
bgColor=#dee7ff><FONT color=#f7f7f7>&nbsp;</FONT> </TD>
<TD align=middle background=<%=basePath%>images/title_right.gif
bgColor=#dee7ff><FONT color=#f7f7f7>&nbsp;</FONT> </TD>
</TR>
</TBODY>
</TABLE>
</center>
<TABLE width="778" border=0 align=center cellPadding=0 cellSpacing=0 borderColor=#ffffff style="FONT-SIZE: 10pt">
<TBODY>
<TR>
<TD width="82%" height=14 align=right vAlign=center noWrap>
</TD>
<TD width="18%" align=right vAlign=center noWrap> </TD>
</TR>
<TR>
<TD height=14 align=right vAlign=center noWrap>
<!-- 在这里插入查询表单 -->
</TD>
</TR>
<TR>
<TD height=28 colspan="2" align=right vAlign=center noWrap background="<%=basePath%>images/list_middle.jpg">&nbsp;&nbsp;
<!-- 可以在这里插入分页导航条 -->
</TD>
</TR>
</TBODY>
</TABLE>
<TABLE class="tableEdit" border="0" cellspacing="1" cellpadding="0" style="width:580px;">
<TBODY>
<TR>
<td>
<!-- 主输入域开始 -->
<table class="tableEdit" style="width:778px;" cellspacing="0" border="0" cellpadding="0">
<tr>
<td class="tdEditLabel" >客户编号</td>
<td class="tdEditContent"><input type="text" name="customerNO">
</td>
</tr>
<tr>
<td class="tdEditLabel" >客户名称</td>
<td class="tdEditContent"><input type="text" name="customerName"></td>
</tr>
<tr>
<td class="tdEditLabel" >联系电话</td>
<td class="tdEditContent"><input type="text" name="phone">
</td>
</tr>
<tr>
<td class="tdEditLabel" >联系地址</td>
<td class="tdEditContent"><input type="text" name="address"></td>
</tr>
<tr>
<td class="tdEditLabel" >联系人</td>
<td class="tdEditContent"><input type="text" name="relationman">
</td>
</tr>
<tr>
<td class="tdEditLabel" >其他信息</td>
<td class="tdEditContent"><input type="text" name="otherInfo"></td>
</tr>
</table>
<!-- 主输入域结束 -->
</td>
</TR>
</TBODY>
</TABLE> <TABLE>
<TR align="center">
<TD colspan="3" bgcolor="#EFF3F7">
<input type="submit" name="saveButton"
class="MyButton" value="查询客户信息">
</TD>
</TR>
</TABLE>
<TABLE width="778" border=0 align=center cellPadding=0 cellSpacing=0 borderColor=#ffffff style="FONT-SIZE: 10pt">
<TBODY>
<TR>
<TD height=28 align=right vAlign=center noWrap background="<%=basePath%>images/list_middle.jpg">&nbsp;&nbsp;
</TD>
</TR>
</TBODY>
</TABLE>
</form>
</center>
</body>
</html>

11.customer/customer_update.jsp

 <%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@include file="/share/taglib.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<link href="<%=basePath%>style/oa.css" rel="stylesheet" type="text/css">
<script language="javascript" src="<%=basePath%>script/public.js"></script>
<title>更新客户信息</title>
</head>
<body>
<center>
<form action="customermanage_update.do" method="post">
<input type="hidden" name="customerNO" value="${customer.customerNO}">
<TABLE class="tableEdit" border="0" cellspacing="1" cellpadding="0" style="width:580px;">
<TBODY>
<TR>
<!-- 这里是添加、编辑界面的标题 -->
<td align="center" class="tdEditTitle">更新客户信息</TD>
</TR>
<TR>
<td>
<!-- 主输入域开始 -->
<table class="tableEdit" style="width:580px;" cellspacing="0" border="0" cellpadding="0">
<tr>
<td class="tdEditLabel" >客户名称</td>
<td class="tdEditContent"><input type="text" name="customerName" value="${customer.customerName}"></td>
<td class="tdEditLabel" >联系电话</td>
<td class="tdEditContent"><input type="text" name="phone" value="${customer.phone}">
</td>
</tr>
<tr>
<td class="tdEditLabel" >联系地址</td>
<td class="tdEditContent"><input type="text" name="address" value="${customer.address}"></td>
<td class="tdEditLabel" >联系人</td>
<td class="tdEditContent"><input type="text" name="relationman" value="${customer.relationman}">
</td>
</tr>
<tr>
<td class="tdEditLabel" >其他</td>
<td class="tdEditContent" colspan="3"><input type="text" name="otherInfo" value="${customer.otherInfo}"></td>
</tr>
</table>
<!-- 主输入域结束 -->
</td>
</TR>
</TBODY>
</TABLE> <TABLE>
<TR align="center">
<TD colspan="3" bgcolor="#EFF3F7">
<input type="submit" name="saveButton"
class="MyButton" value="更新客户信息">
<input type="button" class="MyButton"
value="关闭窗口" onclick="window.close()">
</TD>
</TR>
</TABLE>
</form>
</center>
</body>
</html>

12.