📄 contractadd.jsp
字号:
<%--
模块名称:撰拟合同
模块功能:新增记录
版 本:V1.0
著 作 人:谢永刚 SIMM(java)
著作日期:2001-10-22
该模块所需的文件:
使用说明:
主要技术说明:
参考文献:法律事务设计书
修改历史:= = = = = = = = = = = = = = = = = = = = = = = = = =
修改日期:
修 改 人:
修改理由:
修改出处:
= = = = = = = = = = = = = = = = = = = = = = = = = =
--%>
<%@ page contentType= "text/html; charset=gb2312" %>
<%@ page language="java" import="java.sql.*" %>
<%@ page import="system.*" %>
<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page" />
<%
Security auth = new Security();
String scu_employee_id = (String)session.getAttribute("employee_id");
if(scu_employee_id == null || scu_employee_id.equals(""))
{
response.sendRedirect(response.encodeRedirectURL("../Error/nonlogin.htm"));
}
String modelid = "Law022"; // 案件管理/顾问管理新增
int authflag = auth.popedom(scu_employee_id, modelid);
if(authflag == 0 || authflag == 2 || authflag == -1)
{%>
<jsp:forward page="../inc/noauth.jsp" >
</jsp:forward>
<%}%>
<%
//获取系统自动ID编号
GetID gid = new GetID();
ExtendString es = new ExtendString();
String fid = "HT" + es.digitToString(gid.getIDNumber("case_id")+1);
String costID = "FY" + es.digitToString(gid.getIDNumber("charge_id")+1);
String customerID = "KH" + es.digitToString(gid.getIDNumber("customer_id")+1);
ResultSet rs = null;
%>
<html>
<head>
<title>撰拟合同增加</title>
<%@ include file="../inc/config.jsp" %>
<script language="JavaScript">
<!--
function addfile()
{
attach.insertAdjacentHTML("BeforeEnd","<INPUT id=file1 name=Accessory type=file size=30 class=input><br>")
}
//-->
</script>
</head>
<body class="page">
<script language="javascript">
//检测合同金额输入的合法性
function checkNumber(num) {
var legalchar=new Array("1","2","3","4","5","6","7","8","9","0",".");
var t="";
var dot = 0;
for(i=0;i<num.length;i++) {
n=num.substr(i,1);
for(j=0;j<legalchar.length;j++) {
if(n==legalchar[j]) {
if (n==".")
dot = dot + 1;
break;
}
}
if (j == legalchar.length)
t = t + n;
}
if(t != "") {
alert("费用金额中有非法字符" + t + "!");
return false;
}
else {
if (dot >= 2) {
alert("费用金额中有两个.号!");
return false;
}
}
return true;
}
//输入合法性
function checkForm() {
if (document.myForm.txtCaseID.value=="") {
MM_showHideLayers('Layer1','','show','Layer2','','hide','Layer3','','hide','Layer4','','hide')
alert("请输入合同信息编码!");
document.myForm.txtCaseID.focus();
return false;
}
if (document.myForm.txtCaseReason.value=="") {
MM_showHideLayers('Layer1','','show','Layer2','','hide','Layer3','','hide','Layer4','','hide')
alert("请输入合同名称!");
document.myForm.txtCaseReason.focus();
return false;
}
if (document.myForm.txtBeginDate.value=="") {
MM_showHideLayers('Layer1','','show','Layer2','','hide','Layer3','','hide','Layer4','','hide')
alert("请输入合同撰拟时间!");
document.myForm.txtBeginDate.focus();
return false;
}
if ((document.myForm.txtCharged.value=="1") &&
(document.myForm.txtNoPayReason.value!=""))
{
MM_showHideLayers('Layer1','','show','Layer2','','hide','Layer3','','hide','Layer4','','hide')
alert("收费时不应该有免费原由!");
document.myForm.txtNoPayReason.focus();
return false;
}
charge_sum = document.myForm.charge_sum.value;
if(document.myForm.charge_id.value!=""){
if (!checkNumber(charge_sum)) {
MM_showHideLayers('Layer1','','hide','Layer2','','show','Layer3','','hide','Layer4','','hide')
document.myForm.charge_sum.value = "";
document.myForm.charge_sum.focus();
return false;
}}
}
//取费用编码流水号
getCostIDNumberState=0
function getCostIDNumber()
{
if((getCostIDNumberState%2) == 0)
document.myForm.charge_id.value=document.myForm.txtCostIDNumber.value;
else
document.myForm.charge_id.value="";
getCostIDNumberState++;
}
//取客户编码流水号
getCustomerIDNumberState=0
function getCustomerIDNumber()
{
if((getCustomerIDNumberState%2) == 0)
document.myForm.customer_id.value=document.myForm.txtCustomerIDNumber.value;
else
document.myForm.customer_id.value="";
getCustomerIDNumberState++;
}
//-----------------------
FileCount1=0
RealFileCount1=0
function addfile1()
{
FileCount1++;
RealFileCount1++;
spFileCount1.innerText=RealFileCount1;
tempTxt="<table id=sp"+FileCount1+" border='0' cellspacing='0' cellpadding='0' height='25' width='100%' >"
tempTxt+="<tr class='tr_bg1' align='center'>"
tempTxt+="<td class='table_bg' ><img src='../images/c.gif' width='1' height='1'></td>"
tempTxt+="<td width='11%' >"
tempTxt+="<input type='text' name='txtTranCont'+FileCount1+'' size='6' class='input'>"
tempTxt+="</td>"
tempTxt+="<td class='table_bg' ><img src='../images/c.gif' width='1' height='1'></td>"
tempTxt+="<td width='23%' >"
tempTxt+="<input type='text' name='txt32"+FileCount1+"' size='20' class='input'>"
tempTxt+="</td>"
tempTxt+="<td class='table_bg' ><img src='../images/c.gif' width='1' height='1'></td>"
tempTxt+="<td width='12%' >"
tempTxt+="<input type='text' name='txt32'+FileCount1+'' size='8' class='input'>"
tempTxt+="</td>"
tempTxt+="<td class='table_bg' ><img src='../images/c.gif' width='1' height='1'></td>"
tempTxt+="<td width='17%'>"
tempTxt+="<input type='text' name='fromDate"+FileCount1+"' maxlength='10' size='10' value='' class='input' readOnly>"
tempTxt+="<img src='../images/datetime.gif' border='0' align='absmiddle' alt='弹出日历下拉菜单' onClick='fPopUpCalendarDlg(fromDate"+FileCount1+");return false' width='16' height='16'></td>"
tempTxt+="<td class='table_bg' ><img src='../images/c.gif' width='1' height='1'></td>"
tempTxt+="<td width='12%'>"
tempTxt+="<input type='text' name='textfield32' size='6' class='input'>"
tempTxt+="</td>"
tempTxt+="<td class='table_bg' ><img src='../images/c.gif' width='1' height='1'></td>"
tempTxt+="<td width='9%'>"
tempTxt+="<input type='text' name='textfield3' size='6' class='input'>"
tempTxt+="</td>"
tempTxt+="<td class='table_bg' ><img src='../images/c.gif' width='1' height='1'></td>"
tempTxt+="<td width='8%'>"
tempTxt+="<input type='text' name='textfield32' size='6' class='input'>"
tempTxt+="</td>"
tempTxt+="<td class='table_bg'><img src='../images/c.gif' width='1' height='1'></td>"
tempTxt+="<td width='8%'><a href='#'><img src='../images/del.gif' width='16' height='16' alt='删除' onClick=\"sp"+FileCount1+".style.display='none';RealFileCount1--;spFileCount1.innerText=RealFileCount1;form1.txtTranCont"+FileCount1+".text='';\" style='cursor:hand' border='0'></a></td>"
tempTxt+="<td class='table_bg' ><img src='../images/c.gif' width='1' height='1'></td>"
tempTxt+="</tr>"
tempTxt+="<tr class='tr_bg1' align='center'> "
tempTxt+="<td class='table_bg' colspan='17' height='1' ></td>"
tempTxt+="</tr>"
tempTxt+="</table>"
attach1.insertAdjacentHTML("BeforeEnd",tempTxt);
}
</script>
<!--显示工具条-->
<form name="myForm" METHOD="post" action="ContractAddDo.jsp" ENCTYPE="multipart/form-data">
<div id="Layer1" style="Position:absolute; left:3px; top:70px; width:98%; height:236px; z-index:1; visibility: visible">
<table border="0" cellspacing="0" cellpadding="0" height="25" >
<tr class="tr_bg1" align="center">
<td class="table_bg" colspan="11" height="1" ></td>
</tr>
<tr class="tr_bg1" align="center">
<td class="table_bg" width="1" ></td>
<td onClick="MM_showHideLayers('Layer1','','show','Layer2','','hide','Layer3','','hide','Layer4','','hide')" style="cursor:hand" class="tr_bg2" width="70" >案件信息</td>
<td class="table_bg" width="1"></td>
<td onClick="MM_showHideLayers('Layer1','','hide','Layer2','','show','Layer3','','hide','Layer4','','hide')" style="cursor:hand" width="70">费用信息</td>
<td class="table_bg" width="1"></td>
<td onClick="MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','show','Layer4','','hide')" style="cursor:hand" width="90">其他费用列表</td>
<td class="table_bg" width="1"></td>
<td onClick="MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','hide','Layer4','','show')" style="cursor:hand" width="80">委托人信息</td>
<td class="table_bg" width="1"></td>
</tr>
</table>
<table align="center" border="0" cellspacing="1" cellpadding="5" class="table_bg" width="100%">
<tr>
<td width="18%" align="right" class="title_bg"> 编 码: </td>
<td width="28%" class="tr_bg1">
<input name="txtCaseID" size="12" class="input" readOnly value=<%=fid%>>
<font color="#FF0000">* </font></td>
<td width="19%" align="right" class="title_bg"> 合同类型: </td>
<td width="35%" class="tr_bg1">
<input name="txtContractType" size="12" class="input">
<font color="#FF0000"> </font></td>
</tr>
<tr>
<td align="right" width="18%" class="title_bg"> 合同名称:</td>
<td width="18%" class="tr_bg1">
<input name="txtCaseReason" size="28" class="input">
<font color="#FF0000">* </font>
</td>
<td width="18%" class="title_bg" align="right"> 客户名称:</td>
<td width="35%" class="tr_bg1">
<select name="txtCustomer" class="select">
<option> </option>
<%
rs = db.executeQuery("select customer_id, customer_name from t_customer");
while (rs.next()) {
%>
<option value=<%=rs.getString("customer_id")%>><%=rs.getString("customer_name")%></option>
<%}%>
</select>
</td>
</tr>
<tr>
<td align=right width=18% class="title_bg"> 撰拟时间: </td>
<td width=35% class="tr_bg1" >
<input type="text" name="txtBeginDate" maxlength="10" size="10" class="input" readOnly value="">
<img src="../images/datetime.gif" border="0" align="absmiddle"
alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(txtBeginDate);return false" width="16" height="16">
<font color="#FF0000">* </font>
</td>
<td align=right width=19% class="title_bg"> 涉外信息: </td>
<td width=28% class="tr_bg1">
<select name="txtReferForeign" class="select">
<option value=""> </option>
<option value=0 >无</option>
<option value=1>涉外</option>
<option value=2>涉台</option>
<option value=3>涉港澳</option>
</select>
</td>
</tr>
<tr>
<td align=right width=18% class="title_bg"> 承办律师:</td>
<td class="tr_bg1" width="28%">
<select name="txtLawyer" class="select">
<option value=""> </option>
<%
rs = db.executeQuery("select employee_id, employee_name from t_employee where (duty like '%律师' or duty='主任' or duty='合伙人') and active='1'");
while (rs.next()) {
%>
<option value=<%=rs.getString("employee_id")%>><%=rs.getString("employee_name")%></option>
<%}%>
<option value="">_______ </option>
</select>
<font color="#FF0000">*</font>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -