28,409
社区成员




<!-- #include file="conn.asp" -->
<%
response.CacheControl="no-cache"
response.AddHeader "progma","no-cache"
response.Expires=-1
Response.Charset="gb2312"
UserName=Trim(Request.QueryString("tempBH"))
if UserName<>"" then
dim reStr,xName
reStr=""
xName=Conn.Execute("Select id From liaohao where liaohao1='" & UserName & "'")
if xName="" Then
reStr="no_exist"
else
reStr="exist"
end if
end if
conn.close
set conn=nothing
response.Write reStr
%>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
response.CacheControl="no-cache"
response.AddHeader "progma","no-cache"
response.Expires=-1
%>
<!--#include file="../Ajax_register/conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> 禁用物质检测系统</title>
<style type="text/css">
<!--
body {
background-image: url(../image/exptextb.jpg);
}
.STYLE7 {
font-size: 24px;
color: #FF0000;
font-weight: bold;
}
.STYLE8 {color: #FF0000}
.STYLE10 {color: #FF0000; font-size: 14px; }
.STYLE11 {
color: #000000;
font-weight: bold;
}
-->
</style>
<script type="text/javascript" language="javascript">
function $(id){
return "string" == typeof(id) ? document.getElementById(id) : id ;
}
//---------------------------------------------------------------------
function createXMLHttp(){
var objXMLHttp;
if (window.XMLHttpRequest){
objXMLHttp = new XMLHttpRequest();
if (objXMLHttp.overrideMimeType){
objXMLHttp.overrideMimeType("text/xml");
}
}else if(!objXMLHttp && window.ActiveXObject){
var activexName = ["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
for (var i = 0; i < activexName.length; i++) {
try{
objXMLHttp = new ActiveXObject(activexName[i]);
}catch(e){
continue;
}
if(objXMLHttp) break;
}
}
if(objXMLHttp){
return objXMLHttp;
}else{
alert("Can not create XMLHttpRequest object, maybe update your browser to new version.\n\nXMLHttpRequest对象创建失败! 请升级你的浏览器");
return;
}
}
//------------------------------------------------------------------------------------
function CheckUserName(inputObjID,outputObjID){
var xmlhttp=null;
var refBH=$(inputObjID).value;
if(refBH=="") return;
var goURL="check1.asp?tempBH="+refBH;
if(!xmlhttp) xmlhttp=createXMLHttp();
xmlhttp.open("GET",goURL,true);
xmlhttp.onreadystatechange=function(){callBackFun(xmlhttp,inputObjID,outputObjID);};
xmlhttp.send(null);
}
//------------------------------------------------------------------------------------
function callBackFun(XMLHttp,inputObjID,outputObjID){
var xmlhttp=XMLHttp;
if(xmlhttp.readyState==4){
if(xmlhttp.status==200){
var r=xmlhttp.responseText; //return value: exist = have exist the BianHao, no_exist = no exist the BianHao
r=r.toLowerCase();
$(outputObjID).style.fontSize="12px";
$(outputObjID).style.fontFamily="arial";
if(r=="exist"){
$(inputObjID).style.border="2px solid red";
$(outputObjID).innerHTML="这个编号已经存在";
}else{
$(inputObjID).style.border="1px solid #333333";
$(outputObjID).innerHTML="这个编号不存在,可以使用";
}
}
}
}
function resetBox(inputObjID,outputObjID){
$(inputObjID).border="1px solid #333333";
if($(outputObjID).innerHTML!="")
$(outputObjID).innerHTML="";
}
//------------------------------------------------------------------------------------
function SelectSubmit(){
document.all.registerForm.submit();
return true;
}
function submit1(){
if(document.all.bgbh.value.length==0)
alert("请输入报告编号!");
return false;
}
</script>
</head>
<script type="text/javascript" src="../html/function.js"></script>
<body>
<form action="insert_liaohao.asp" method="post" name="form1" id="form1" onsubmit="this.action=this.action+document.form1.liaohao1.value">
<div align="center"><span class="STYLE7">报告编号对应新增物料料号</span> </div>
<table width="1165" height="314" align="center">
<tr>
<td height="23"><div align="left"><a href="../index.asp"> 返回主页</a></div></td>
<td><span class="STYLE11">报告编号:</span></td>
<td colspan="2"><input name="bgbh" type="text" id="bgbh" value="" />
<span class="STYLE8">*</span></td>
<td colspan="4"><strong>MSDS文件位置:</strong>
<input name="msds" type="file" id="msds" /></td>
</tr>
<tr>
<td width="107" height="18">物料料号1:</td>
<td width="176"><input name="liaohao1" type="text" id="liaohao1" onclick="resetBox('liaohao1','CheckUserName1');" onblur="CheckUserName('liaohao1','CheckUserName1')"/><div align="left" id="CheckUserName1" class="alert"></div></td>
<td width="118">物料料号2:</td>
<td width="168"><input name="liaohao2" type="text" id="liaohao2" onclick="resetBox('liaohao2','CheckUserName2');" onblur="CheckUserName('liaohao2','CheckUserName2')"/><div align="left" id="CheckUserName2" class="alert"></div></td>
<td width="106">物料料号3:</td>
<td width="168"><input name="liaohao3" type="text" id="liaohao3" onclick="resetBox('liaohao3','CheckUserName3');" onblur="CheckUserName('liaohao3','CheckUserName3')"/><div align="left" id="CheckUserName3" class="alert"></div></td>
<td width="116">物料料号4:</td>
<td><input name="liaohao4" type="text" id="liaohao4" onclick="resetBox('liaohao4','CheckUserName4);" onblur="CheckUserName('liaohao4','CheckUserName4')"/><div align="left" id="CheckUserName4" class="alert"></div></td>
</tr>
<tr>
<td height="18">物料料号5:</td>
<td><input name="liaohao5" type="text" id="liaohao5" onclick="resetBox('liaohao5','CheckUserName5');" onblur="CheckUserName('liaohao5','CheckUserName5')"/><div align="left" id="CheckUserName5" class="alert"></div></td>
<td>物料料号6:</td>
<td><input name="liaohao6" type="text" id="liaohao6" onclick="resetBox('liaohao6','CheckUserName6');" onblur="CheckUserName('liaohao6','CheckUserName6')"/><div align="left" id="CheckUserName6" class="alert"></div></td>
<td>物料料号7:</td>
<td><input name="liaohao7" type="text" id="liaohao7" onclick="resetBox('liaohao7','CheckUserName7');" onblur="CheckUserName('liaohao7','CheckUserName7')"/><div align="left" id="CheckUserName7" class="alert"></div></td>
<td>物料料号8:</td>
<td><input name="liaohao8" type="text" id="liaohao8" onclick="resetBox('liaohao8','CheckUserName8');" onblur="CheckUserName('liaohao8','CheckUserName8')"/><div align="left" id="CheckUserName8" class="alert"></div></td>
</tr>
<tr>
<td height="22">物料料号9:</td>
<td><input name="liaohao9" type="text" id="liaohao9" onclick="resetBox('liaohao9','CheckUserName9');" onblur="CheckUserName('liaohao9','CheckUserName9')"/><div align="left" id="CheckUserName9" class="alert"></div></td>
<td>物料料号10:</td>
<td><input name="liaohao10" type="text" id="liaohao10" onclick="resetBox('liaohao10','CheckUserName10');" onblur="CheckUserName('liaohao10','CheckUserName10')"/><div align="left" id="CheckUserName10" class="alert"></div></td>
<td>物料料号11:</td>
<td><input name="liaohao11" type="text" id="liaohao11" onclick="resetBox('liaohao11','CheckUserName11');" onblur="CheckUserName('liaohao11','CheckUserName11')"/><div align="left" id="CheckUserName11" class="alert"></div></td>
<td>物料料号12:</td>
<td><input name="liaohao12" type="text" id="liaohao12" onclick="resetBox('liaohao12','CheckUserName12');" onblur="CheckUserName('liaohao12','CheckUserName12')"/><div align="left" id="CheckUserName12" class="alert"></div></td>
</tr>
<tr>
<td height="18">物料料号13:</td>
<td><input name="liaohao13" type="text" id="liaohao13" onclick="resetBox('liaohao13','CheckUserName13');" onblur="CheckUserName('liaohao13','CheckUserName13')"/><div align="left" id="CheckUserName13" class="alert"></div></td>
<td>物料料号14:</td>
<td><input name="liaohao14" type="text" id="liaohao14" onclick="resetBox('liaohao14','CheckUserName14');" onblur="CheckUserName('liaohao14','CheckUserName14')"/><div align="left" id="CheckUserName14" class="alert"></div></td>
<td>物料料号15:</td>
<td><input name="liaohao15" type="text" id="liaohao15" onclick="resetBox('liaohao15','CheckUserName15);" onblur="CheckUserName('liaohao15','CheckUserName15')"/><div align="left" id="CheckUserName15" class="alert"></div></td>
<td>物料料号16:</td>
<td><input name="liaohao16" type="text" id="liaohao16" onclick="resetBox('liaohao16','CheckUserName16');" onblur="CheckUserName('liaohao16','CheckUserName16')"/><div align="left" id="CheckUserName16" class="alert"></div></td>
</tr>
<tr>
<td height="18">物料料号17:</td>
<td><input name="liaohao17" type="text" id="liaohao17" onclick="resetBox('liaohao17','CheckUserName17');" onblur="CheckUserName('liaohao17','CheckUserName17')"/><div align="left" id="CheckUserName17" class="alert"></div></td>
<td>物料料号18:</td>
<td><input name="liaohao18" type="text" id="liaohao18" onclick="resetBox('liaohao18','CheckUserName18');" onblur="CheckUserName('liaohao18','CheckUserName18')"/><div align="left" id="CheckUserName18" class="alert"></div></td>
<td>物料料号19:</td>
<td><input name="liaohao19" type="text" id="liaohao19" onclick="resetBox('liaohao19','CheckUserName19');" onblur="CheckUserName('liaohao19','CheckUserName19')"/><div align="left" id="CheckUserName19" class="alert"></div></td>
<td>物料料号20:</td>
<td><input name="liaohao20" type="text" id="liaohao20" onclick="resetBox('liaohao20','CheckUserName20');" onblur="CheckUserName('liaohao20','CheckUserName20')"/><div align="left" id="CheckUserName20" class="alert"></div></td>
</tr>
<%
'end if '//what ?! comment it for now
%>
<tr>
<td colspan="8"><div align="center">
<input type="submit" name="Submit1" value="保 存" onclick="return submit1()"/>
<input type="reset" name="Submit" value="重 置" />
</div></td>
</tr>
<tr>
<td colspan="8"><span class="STYLE10">备注:带*号必须输入</span></td>
</tr>
</table>
</form>
</body>
</html>