DB2的设置命令
db2move icsc export -tn tb* -u db2admin -p db2admin //导出数据库
db2move erp[名称] import[导入/导出] -u[用户名] db2admin -p[密码] db2admin //导入数据库
db2set db2codepage=1386 //将DB2的代码设为1386[简体中文]
db2set db2codepage=950 //将DB2的代码设为950[繁体]
cp950|GBK[繁体编码] gb2312[简体编码]
/************************************************************************************************************************/
//自动增列手工代码
//自动增列
function AddTR(count){
var tab2 = document.getElementById("tab1").children[0];
var seq = parseInt(count)+1;
if(count != (tab2.rows.length-1)) {
return;
}
addNnewTR=tab2.insertRow();
trColor = "";
if(tab2.children[tab2.rows.length-2].children[0].className =="light-bg") {
trColor = "deep-bg";
}
else {
trColor = "light-bg";
}
//新增一个cell
addNnewTD1 = addNnewTR.insertCell();
//设置cell的width为10%
addNnewTD1.width = "10%" ;
//设置对其方式
addNnewTD1.align = "center";
addNnewTD1.className = trColor;
addNnewTD1.insertAdjacentHTML("AfterBegin","<input type='checkbox' name='box' value='"+seq+"' onClick=AddTR('"+seq+"')>"+(seq+1));
addNnewTD2 = addNnewTR.insertCell();
addNnewTD2.width = "30%" ;
addNnewTD2.align = "left";
addNnewTD2.className = trColor;
addNnewTD2.insertAdjacentHTML("AfterBegin","<input type='hidden' name='TYPECODE"+seq+"_c' value='' style='text-align:left'><input type='text' name='ACCTCODE"+seq+"_c' value='' maxlength='2' size=2 style='text-align:left' onClick=AddTR('"+seq+"')>");
}
</script>
例程:
<%@ page contentType = "text/html;charset=gb2312" %>
<%-- ---------------------------------------------------*/
/* ( ICSC ERP CL System ) */
/*------------------------------------------------------*/
/* author : W10397 姚皓 */
/* system : 转投资管理系统(CL) */ */
/* @version $Id: cljj0004Acct.jsp wuhan/W10397 Exp $*/
/*---------------------------------------------------- --%>
<%@ page import="com.icsc.dpms.de.*" %>
<%@ page import="com.icsc.dpms.de.web.*" %>
<%@ page import="com.icsc.dpms.de.structs.*" %>
<%@ page import="com.icsc.dpms.de.structs.web.*" %>
<%@ page import="com.icsc.cl.dao.*"%>
<%@ page import="java.util.*" %>
<%@ page import="java.math.*" %>
<%! public static final String _AppId = "CLJJ0005"; %>
<%@ include file="../../jsp/dzjjmain.jsp" %>
<%
dejcWebInfoOut infoOut = null==(dejcWebInfoOut)request.getAttribute("infoOut") ? new dejcWebInfoOut() :(dejcWebInfoOut)request.getAttribute("infoOut") ;
/*当第一个折页中选取一笔资料得时候传过来得值*/
String typeName = request.getParameter("typeName") ;
String compId_qry = null!=infoOut.getAttribute("compId_qry")? (String)infoOut.getAttribute("compId_qry"):"";
String typeCode_qry = null!=infoOut.getAttribute("typeCode_qry")? (String)infoOut.getAttribute("typeCode_qry"):"";
/*组合业务代码和业务名称*/
String type;
/*会计科目类别显示*/
if(typeCode_qry==null||"".equals(typeCode_qry))
type="";
else
type=typeCode_qry+"-"+typeName;
/*取出逻辑中得List*/
List cl0005List = null!=infoOut.getResultVO("c")? (List)infoOut.getResultVO("c") : null;
boolean bo=true;
if (null==cl0005List || cl0005List.size()<=0) {
bo=false;
cl0005List = new ArrayList ();
cl0005List.add(new cljc0005VO());
}
String downLoadStr=infoOut.getAttribute("downLoadStr1")==null?"":(String)infoOut.getAttribute("downLoadStr1");
%>
<Script src="<%=_de300.script("de","/dejtFolderFrame.jss")%>"></script>
<Script src="<%=_de300.script("de","/dejtTemplate1.jss")%>"></script>
<script src="<%=_de300.script("oi", "/oijtCommon.jss") %>"></script>
<script src="<%=_de300.script("oi", "/oijtAction.jss") %>"></script>
<script src="<%=_de300.script("de","/dejtab08.jss")%>"></script>
<form name="form1" method="post" action="/erp/cl/do?_pageId=cljj0004Acct" target="cljj0004Acct_<%= session.getId()%>">
<table border="0" cellspacing="1" cellpadding="0" width="100%">
<tr>
<td class="subsys-title" width="10%">业务类别</td>
<td><%=type%></td>
</tr>
<tr>
<td class="subsys-title" width="10%">功能</td>
<td class="function-bar-left">
<input type="button" name="BUTTON1" value="新增" οnclick="return actionN()" <%if(compId_qry==null||"".equals(compId_qry)) out.print("disabled");%>>
<!--<input type="button" name="BUTTON2" value="修改" οnclick="return actionR()">-->
<input type="button" name="BUTTON3" value="删除" οnclick="return actionD()" <%if(compId_qry==null||"".equals(compId_qry)||bo==false) out.print("disabled");%>>
<input type="button" name="BUTTON4" value="列印" οnclick="return actionP()" <%if(compId_qry==null||"".equals(compId_qry)||bo==false) out.print("disabled");%>>
<%
if ( !"".equals(downLoadStr) ) {
%>
<a href='<%=downLoadStr%>' target='_blank'>下载</a>
<%}%>
<input type="hidden" name="_action" value="">
<!--执行逻辑必须带入compId,否则键值为空-->
<input type="hidden" name="compId_qry" value="<%=compId_qry%>">
<input type="hidden" name="typeCode_qry" value="<%=typeCode_qry%>">
</td>
<td width="10%" class="subsys-title">讯息</td>
<td width="50%" id="msg" class="Msg"><%=infoOut.getMessage()%></td>
</tR>
</table>
<div style=overflow-y:scroll;height:100%>
<table border="0" cellspacing="1" cellpadding="0" width="100%">
<tr class=subsys-title>
<td width=10% >项次</td>
<td width=30% >会计科目</td>
<td width=60% >会计科目名称</td>
</tr>
</table>
</div>
<div style=overflow-y:scroll;height:300>
<table border="0" cellspacing="1" cellpadding="0" width="100%" id="tab1">
<%
for(int i=0; null!= cl0005List && i<cl0005List.size(); i++){
cljc0005VO cl0005VO =(cljc0005VO) cl0005List.get(i);
String style=(i%2==0)?"light-bg":"deep-bg" ;
%>
<tr class="<%=style%>">
<td width=10%><input type="checkbox" name="box" value="<%=i%>" οnclick="AddTR(<%=i%>)"><%=i+1%></td>
<td width=30%>
<input type="text" name="acctCode<%=i%>_c" value="<%=cl0005VO.getAcctCode()%>" maxlength="2" size=2 style='text-align:left' οnclick="AddTR(<%=i%>)">
</td>
<td width=60% align="left">
</td>
</tr>
<%}%>
</table>
</div>
</form>
<script>
//自动增列
function AddTR(count){
var tab2 = document.getElementById("tab1").children[0];
var seq = parseInt(count)+1;
if(count != (tab2.rows.length-1)) {
return;
}
addNnewTR=tab2.insertRow();
trColor = "";
if(tab2.children[tab2.rows.length-2].children[0].className =="light-bg") {
trColor = "deep-bg";
}
else {
trColor = "light-bg";
}
addNnewTD1 = addNnewTR.insertCell();
addNnewTD1.width = "10%" ;
addNnewTD1.align = "center";
addNnewTD1.className = trColor;
addNnewTD1.insertAdjacentHTML("AfterBegin","<input type='checkbox' name='box' value='"+seq+"' onClick=AddTR('"+seq+"')>"+(seq+1));
addNnewTD2 = addNnewTR.insertCell();
addNnewTD2.width = "30%" ;
addNnewTD2.align = "left";
addNnewTD2.className = trColor;
addNnewTD2.insertAdjacentHTML("AfterBegin","<input type='hidden' name='typeCode"+seq+"_c' value='' style='text-align:left'><input type='text' name='acctCode"+seq+"_c' value='' maxlength='2' size=2 style='text-align:left' onClick=AddTR('"+seq+"')>");
addNnewTD3 = addNnewTR.insertCell();
addNnewTD3.align = "left";
addNnewTD3.className = trColor;
}
</script>
<script>
// 按下【新增】 时触发
function actionN() {
var ch = new checkList();
form1._action.value="N" ;
var bo = true;
if(!deCheckChoice("box", "1")) {
document.getElementById("msg").innerHTML="必须勾选一项!";
bo = false;
}
var box = document.getElementsByName("box") ;
for(var i=0 ;i<box.length; i++) {
if(box[i].checked==true){
ch.addBlank("acctCode"+i+"_c");
}
}
if((bo)&&ch.check()&& confirm("确定新增吗?"))
form1.submit();
else
return false;
}
// 按下【修改】 时触发
/*function actionR() {
var bo = true;
var bo1 = true;
var ch = new checkList();
if(!deCheckChoice("box", "1")) {
document.getElementById("msg").innerHTML="必须勾选一项!";
bo1 = false;
}
var box = document.getElementsByName("box") ;
for(var i=0 ;i<box.length; i++) {
if(box[i].checked){
ch.addBlank("acctCode"+i+"_c");
}
}
if((bo1)&&ch.check()&& confirm("确定修改吗?")) {
form1._action.value="R" ;
form1.submit();
} else {
return false;
}
}*/
//按下【删除】 时触发
function actionD() {
var bo = true;
if(!deCheckChoice("box", "1")) {
document.getElementById("msg").innerHTML="必须勾选一项!";
bo = false;
}
if (bo&& confirm("确定删除吗?")){
form1._action.value="D" ;
form1.submit();
} else {
return false;
}
}
// 按下列印时触发
function actionP() {
form1._action.value="P" ;
form1.submit();
}
window.name="cljj0004Acct_<%= session.getId()%>";
</script>
<%= infoOut.generateElementControll(_de300) %>
/************************************************************************************************************************/
/************************************************************************************************************************/
//如何在按钮按下以后跳到后一个折页
定义折页
var ff = new inFolderFrame() ;
var dt = new deTab(tab1, showcljj0004Main) ;
dt.addFrame("cljj0004MainID") ;
ff.addTab("业务类别资料", dt) ;
//两个参数div的ID名字和当点击折页时候产生的方法
var dt = new deTab(tab2, showcljj0004Acct) ;
dt.addFrame("cljj0004AcctID") ;
ff.addTab("会计科目分类", dt) ;
ff.tabTable.setHeight(80) ;
ff.tabTable.setTabWidth(10) ;
ff.tabTable.enableLock() ;
ff.end() ;
//当点击折页时候触发的动作方法
function showcljj0004Main() {
document.frames("cljj0004Main_<%=session.getId()%>").form1._action.value="I" ;
document.frames("cljj0004Main_<%=session.getId()%>").form1.submit() ;
}
function showcljj0004Acct() {
document.frames("cljj0004Main_<%=session.getId()%>").form2._action.value="I" ;
document.frames("cljj0004Main_<%=session.getId()%>").form2.submit() ;
}
function showTab2() {
ff.tabTable.show(tab2);
}
//这段代码放在想使用折页跳转的按钮或其他东西的onclick方法中
function myClick(compId,typeCode,typeName){
form2.compId_qry.value=compId;
form2.typeCode_qry.value=typeCode;
form2.typeName.value=typeName;
form2._action.value="I";
parent.showTab2();
form2.submit();
}