📄 aopm003.jsp
字号:
<html>
<head>
<title>管理软件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<%@ include file="../aadm/jspheader.jsp"%>
<%@ page contentType="text/html; charset=gb2312" %>
<%
/**
* <p>功能: 编辑公司部门</p>
* <p>作者: sxit</p>
* <p>公司: 深训信科</p>
* <p>日期: 2004-11-11</p>
* @版本: 1.0
* @修改:
**/
%>
<%
String parentid="";
if(request.getAttribute("parentid")!=null){
parentid=(String)request.getAttribute("parentid");
}
com.sxit.operator.Topmcorporation topmcorporation=null;
if(request.getAttribute("topmcorporation")!=null){
topmcorporation=(com.sxit.operator.Topmcorporation)request.getAttribute("topmcorporation");
}
int i=0;
int j=0;
int sendcount=0;
int maxcount=0;
%>
<script type="text/javascript" src="/calendar.js"></script>
<script language=javascript>
<!--
var CalendarWebControl = new atCalendarControl();
-->
</script>
<script lanaguage="javascript">
<!--
function isEmpty(s){
return ((s == null) || (s.length == 0))
}
function isInBag(s,bag){
var i;
for (i = 0; i < s.length; i++){
var c = s.charAt(i);
if (bag.indexOf(c) == -1) return false;
}
return true;
}
function isNotInBag(s,bag){
var i;
for (i = 0; i < s.length; i++){
var c = s.charAt(i);
if (bag.indexOf(c) > -1) return false;
}
return true;
}
function isGoodChar(content2){
if (isNotInBag(content2," -_.><,[]{}?/+=|\\\'\":;~!@#$%^&()`")) return true;
else return false;
}
function isNumber(content2){
if (isInBag(content2,"0123456789")) return true;
else return false;
}
function isDouble(content2){
if (isInBag(content2,".0123456789")) return true;
else return false;
}
function isLetter(content2){
if (isInBag(content2,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")) return true;
else return false;
}
function isLetterNumber(content2){
if (isInBag(content2,"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")) return true;
else return false;
}
function isTel(content2){
if (isInBag(content2,",;/()-0123456789 ")) return true;
else return false;
}
//str全部为空格
function isSpace(content2){
for(i=0;i<content2.length;i++){
var c=content2.charAt(i);
if(c!=" ") return false;
}
return true;
}
//str为邮件地址
function isEMail(content2){
len=content2.length;
pos1=content2.indexOf("@");
pos2=content2.indexOf(".");
if ((pos1<= 0)||(pos1==len)||(pos2<= 0)||(pos2== len)){
return false;
}else{
if((pos1==pos2-1)||(pos1==pos2+1)){
return false;
}
}
return true;
}
function getStringLength(content2){
var num=0;
if (content2!=""){
var i;
var s;
for(i=0;i<content2.length;i++){
s=content2.charCodeAt(i);
if(s-128<0) num=num+1;
else num=num+2;
}
}
return num;
}
function isOneSpace (s)
{
var whitespace = " tnr";
var i;
for (i = 0; i < s.length; i++)
{
var c = s.charAt(i);
if (whitespace.indexOf(c) >= 0)
{
return true;
}
}
return false;
}
function getValue(){
if(document.form1.parentid.options[document.form1.parentid.selectedIndex].value==0){
// alert("请选择上级,不能不选!");
// document.form1.parentid.focus();
// return false;
document.form1.parentid.value=1;
}
if(isEmpty(document.form1.corporationname.value)){
alert("请输入公司部门名,不能为空!");
document.form1.corporationname.focus();
return false;
}else{
if(isSpace(document.form1.corporationname.value)){
alert("请输入正确公司部门名,不能全部为空格!");
document.form1.corporationname.focus();
return false;
}else{
if(getStringLength(document.form1.corporationname.value)>100){
alert("请输入正确公司部门名,长度为1-100位!");
document.form1.corporationname.focus();
return false;
}
}
}
// if(isEmpty(document.form1.corpnameen.value)){
// alert("请输入英文名,不能为空!");
// document.form1.corpnameen.focus();
// return false;
// }else{
// if(isSpace(document.form1.corpnameen.value)){
// alert("请输入正确英文名,不能全部为空格!");
// document.form1.corpnameen.focus();
// return false;
// }else{
if(getStringLength(document.form1.corpnameen.value)>100){
alert("请输入正确英文名,长度为1-100位!");
document.form1.corpnameen.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.corpaddr.value)){
// alert("请输入公司地址,不能为空!");
// document.form1.corpaddr.focus();
// return false;
// }else{
// if(isSpace(document.form1.corpaddr.value)){
// alert("请输入正确公司地址,不能全部为空格!");
// document.form1.corpaddr.focus();
// return false;
// }else{
if(getStringLength(document.form1.corpaddr.value)>100){
alert("请输入正确公司地址,长度为1-100位!");
document.form1.corpaddr.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.corpman.value)){
// alert("请输入法人代表,不能为空!");
// document.form1.corpman.focus();
// return false;
// }else{
// if(isSpace(document.form1.corpman.value)){
// alert("请输入正确法人代表,不能全部为空格!");
// document.form1.corpman.focus();
// return false;
// }else{
if(getStringLength(document.form1.corpman.value)>15){
alert("请输入正确法人代表,长度为1-15位!");
document.form1.corpman.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.corpurl.value)){
// alert("请输入公司网址,不能为空!");
// document.form1.corpurl.focus();
// return false;
// }else{
// if(isSpace(document.form1.corpurl.value)){
// alert("请输入正确公司网址,不能全部为空格!");
// document.form1.corpurl.focus();
// return false;
// }else{
if(getStringLength(document.form1.corpurl.value)>150){
alert("请输入正确公司网址,长度为1-150位!");
document.form1.corpurl.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.corpship.value)){
// alert("请输入公司性质,不能为空!");
// document.form1.corpship.focus();
// return false;
// }else{
// if(isSpace(document.form1.corpship.value)){
// alert("请输入正确公司性质,不能全部为空格!");
// document.form1.corpship.focus();
// return false;
// }else{
if(getStringLength(document.form1.corpship.value)>20){
alert("请输入正确公司性质,长度为1-20位!");
document.form1.corpship.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.custservertel.value)){
// alert("请输入热线电话,不能为空!");
// document.form1.custservertel.focus();
// return false;
// }else{
// if(isSpace(document.form1.custservertel.value)){
// alert("请输入正确热线电话,不能全部为空格!");
// document.form1.custservertel.focus();
// return false;
// }else{
if(getStringLength(document.form1.custservertel.value)>20){
alert("请输入正确热线电话,长度为1-20位!");
document.form1.custservertel.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.contacter.value)){
// alert("请输入联系人,不能为空!");
// document.form1.contacter.focus();
// return false;
// }else{
// if(isSpace(document.form1.contacter.value)){
// alert("请输入正确联系人,不能全部为空格!");
// document.form1.contacter.focus();
// return false;
// }else{
if(getStringLength(document.form1.contacter.value)>8){
alert("请输入正确联系人,长度为1-8位!");
document.form1.contacter.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.contacteremail.value)){
// alert("请输入联系邮件,不能为空!");
// document.form1.contacteremail.focus();
// return false;
// }else{
// if(isSpace(document.form1.contacteremail.value)){
// alert("请输入正确联系邮件,不能全部为空格!");
// document.form1.contacteremail.focus();
// return false;
// }else{
if(getStringLength(document.form1.contacteremail.value)>30){
alert("请输入正确联系邮件,长度为1-30位!");
document.form1.contacteremail.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.contacterfax.value)){
// alert("请输入联系传真,不能为空!");
// document.form1.contacterfax.focus();
// return false;
// }else{
// if(isSpace(document.form1.contacterfax.value)){
// alert("请输入正确联系传真,不能全部为空格!");
// document.form1.contacterfax.focus();
// return false;
// }else{
if(getStringLength(document.form1.contacterfax.value)>20){
alert("请输入正确联系传真,长度为1-20位!");
document.form1.contacterfax.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.contactertel.value)){
// alert("请输入联系电话,不能为空!");
// document.form1.contactertel.focus();
// return false;
// }else{
// if(isSpace(document.form1.contactertel.value)){
// alert("请输入正确联系电话,不能全部为空格!");
// document.form1.contactertel.focus();
// return false;
// }else{
if(getStringLength(document.form1.contactertel.value)>20){
alert("请输入正确联系电话,长度为1-20位!");
document.form1.contactertel.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.postcode.value)){
// alert("请输入邮政编码,不能为空!");
// document.form1.postcode.focus();
// return false;
// }else{
// if(isSpace(document.form1.postcode.value)){
// alert("请输入正确邮政编码,不能全部为空格!");
// document.form1.postcode.focus();
// return false;
// }else{
if(getStringLength(document.form1.postcode.value)>10){
alert("请输入正确邮政编码,长度为1-10位!");
document.form1.postcode.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.disciption.value)){
// alert("请输入公司简介,不能为空!");
// document.form1.disciption.focus();
// return false;
// }else{
// if(isSpace(document.form1.disciption.value)){
// alert("请输入正确公司简介,不能全部为空格!");
// document.form1.disciption.focus();
// return false;
// }else{
if(getStringLength(document.form1.disciption.value)>2000){
alert("请输入正确公司简介,长度为1-2000位!");
document.form1.disciption.focus();
return false;
}
// }
// }
if(document.form1.statusid.options[document.form1.statusid.selectedIndex].value==0){
alert("请选择状态,不能不选!");
document.form1.statusid.focus();
return false;
}
// if(isEmpty(document.form1.opendate.value)){
// alert("请输入开放时间,不能为空!");
// document.form1.opendate.focus();
// return false;
// }
// if(isEmpty(document.form1.confirmdate.value)){
// alert("请输入批准日期,不能为空!");
// document.form1.confirmdate.focus();
// return false;
// }
if(isEmpty(document.form1.opendate.value)){
document.form1.opendate.value="2005-1-1"
}
if(isEmpty(document.form1.confirmdate.value)){
document.form1.confirmdate.value="2005-1-1"
}
// if(isEmpty(document.form1.confirmman.value)){
// alert("请输入批准人,不能为空!");
// document.form1.confirmman.focus();
// return false;
// }else{
// if(isSpace(document.form1.confirmman.value)){
// alert("请输入正确批准人,不能全部为空格!");
// document.form1.confirmman.focus();
// return false;
// }else{
if(getStringLength(document.form1.confirmman.value)>20){
alert("请输入正确批准人,长度为1-20位!");
document.form1.confirmman.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.confirmadvise.value)){
// alert("请输入批准意见,不能为空!");
// document.form1.confirmadvise.focus();
// return false;
// }else{
// if(isSpace(document.form1.confirmadvise.value)){
// alert("请输入正确批准意见,不能全部为空格!");
// document.form1.confirmadvise.focus();
// return false;
// }else{
if(getStringLength(document.form1.confirmadvise.value)>500){
alert("请输入正确批准意见,长度为1-500位!");
document.form1.confirmadvise.focus();
return false;
}
// }
// }
// if(isEmpty(document.form1.dealin.value)){
// alert("请输入经营范围,不能为空!");
// document.form1.dealin.focus();
// return false;
// }else{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -