📄 xiaoadd.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<!--#include file="../../Connections/jxc.asp" -->
<%
Set ObjReference = Server.CreateObject("jxc1.check")
ObjReference.myfilee()
%>
<%'初始流水号生成
dim today
today=date()
toyear=year(today)
toyear=toyear*10000
tomonth= month(today)
tomonth=tomonth*100
tonow=day(today)
newid = toyear + tomonth + tonow
newid = newid*10000+1
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_jxc_STRING
Recordset1.Source = "SELECT * FROM xiao ORDER BY xidcode DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
If Recordset1.EOF And Recordset1.BOF Then
xidcode = newid
else
xgidcode =(Recordset1.Fields.Item("xidcode").Value)
xgidcode = right(xgidcode,12)
if newid - xgidcode <5000 then
xidcode = xgidcode +1
else
xidcode = newid
end if
end if
Recordset1_numRows = 0
%>
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = "1"
If (Request.QueryString("id") <> "") Then
Recordset2__MMColParam = Request.QueryString("id")
End If
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_jxc_STRING
Recordset2.Source = "SELECT * FROM cun WHERE id = " + Replace(Recordset2__MMColParam, "'", "''") + ""
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()
Recordset2_numRows = 0
%>
<%
Dim Recordset3__MMColParam
Recordset3__MMColParam = "购货关系"
If (Request("MM_EmptyValue") <> "") Then
Recordset3__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim Recordset3
Dim Recordset3_numRows
Set Recordset3 = Server.CreateObject("ADODB.Recordset")
Recordset3.ActiveConnection = MM_jxc_STRING
Recordset3.Source = "SELECT * FROM guest WHERE gselect = '" + Replace(Recordset3__MMColParam, "'", "''") + "' ORDER BY gname DESC"
Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 1
Recordset3.Open()
Recordset3_numRows = 0
%>
<html>
<head>
<title>www.71base.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="CSS.CSS" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function YY_checkform() { //v4.65
//copyright (c)1998,2002 Yaromat.com
var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
for (var i=1; i<args.length;i=i+4){
if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,""));
myV=myObj.value;
if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){
if (myReq&&myObj.value.length==0){addErr=true}
if ((myV.length>0)&&(args[i+2]==1)){ //fromto
var myMa=args[i+1].split('_');if(isNaN(parseInt(myV))||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}
} else if ((myV.length>0)&&(args[i+2]==2)){
var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");if(!rx.test(myV))addErr=true;
} else if ((myV.length>0)&&(args[i+2]==3)){ // date
var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);
if(myAt){
var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];
var myDate=new Date(myY,myM,myD);
if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};
}else{addErr=true}
} else if ((myV.length>0)&&(args[i+2]==4)){ // time
var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}
} else if (myV.length>0&&args[i+2]==5){ // check this 2
var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,""));
if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")];
if(!myObj1.checked){addErr=true}
} else if (myV.length>0&&args[i+2]==6){ // the same
var myObj1 = MM_findObj(args[i+1]);
if(myV!=myObj1.value){addErr=true}
}
} else
if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){
var myTest = args[i].match(/(.*)\[(\d+)\].*/i);
var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;
if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
if (args[i+2]==2){
var myDot=false;
for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}
if(!myDot){myErr+='* ' +args[i+3]+'\n'}
}
} else if (myObj.type=='checkbox'){
if(args[i+2]==1&&myObj.checked==false){addErr=true}
if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
} else if (myObj.type=='select-one'||myObj.type=='select-multiple'){
if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
}else if (myObj.type=='textarea'){
if(myV.length<args[i+1]){addErr=true}
}
if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
}
if (myErr!=''){alert('T警告!!\t\t\t\t\t\n\n'+myErr)}
document.MM_returnValue = (myErr=='');
}
//-->
</script>
</head>
<body oncontextmenu="return false" >
<table width="100%" cellpadding="0">
<tr>
<td><form action="xiaosave.asp" method="post" name="form1" onSubmit="YY_checkform('form1','shu','#0_100000','1','数量必须正确填写','jiage','#0_10000000','1','价格必须正确填写','shouguest','#q','1','提货人必须填写','xingzhi','#q','1','请选择出库性质','fukuanfangshi','#q','1','请选择付款方式');return document.MM_returnValue">
<table width="100%" cellpadding="0">
<tr>
<td width="26%" height="20"><div align="left"><img src="images/icon-page.gif" width="16" height="15"><font color="#B5B5FF">填写出库表单>></font></div></td>
<td colspan="2">
<input type="hidden" name="kuid" value="<%=(Recordset2.Fields.Item("id").Value)%>"> </td>
</tr>
<tr>
<td><div align="right">购货客户名称:</div></td>
<td colspan="2"> <select name="shouguest" id="shouguest">
<option value="">……请选择购货关系客户……</option>
<%
While (NOT Recordset3.EOF)
%>
<option value="<%=(Recordset3.Fields.Item("gidcode").Value)%>"><%=(Recordset3.Fields.Item("gname").Value)%></option>
<%
Recordset3.MoveNext()
Wend
If (Recordset3.CursorType > 0) Then
Recordset3.MoveFirst
Else
Recordset3.Requery
End If
%>
</select> <font color="#FF0000">列表中无购货客户,请添加</font></td>
</tr>
<tr>
<td height="16"><div align="right">货品名称/商标/型号:</div></td>
<td colspan="2"> <%content = Server.HTMLEncode((Recordset2.Fields.Item("huo").Value))
response.write content%>
<input type="hidden" name="huo" value="<%=(Recordset2.Fields.Item("huo").Value)%>"></td>
</tr>
<tr>
<td><div align="right">供货客户编号:</div></td>
<td colspan="2"><%content = Server.HTMLEncode((Recordset2.Fields.Item("gidcode").Value))
response.write content%>
<input type="hidden" name="gidcode"value="<%=(Recordset2.Fields.Item("gidcode").Value)%>"> </td>
</tr>
<tr>
<td><div align="right">货品编号:</div></td>
<td colspan="2"><%content = Server.HTMLEncode((Recordset2.Fields.Item("hidcode").Value))
response.write content%>
<input type="hidden" name="hidcode" value="<%=(Recordset2.Fields.Item("hidcode").Value)%>"></td>
</tr>
<tr>
<td height="16"><div align="right">库名:</div></td>
<td colspan="2"><%content = Server.HTMLEncode((Recordset2.Fields.Item("ku").Value))
response.write content%>
<input type="hidden" name="ku" value="<%=(Recordset2.Fields.Item("ku").Value)%>"></td>
</tr>
<tr>
<td><div align="right">提货数量:</div></td>
<td colspan="2"><input name="shu" type="text" size="15">
<font color="#000000"><%content = Server.HTMLEncode((Recordset2.Fields.Item("liang").Value))
response.write content%>
</font><font color="#FF0000">(注意:提货数量不能大于该库的库存数
<%content = Server.HTMLEncode((Recordset2.Fields.Item("shu").Value))
response.write content%>
<%content = Server.HTMLEncode((Recordset2.Fields.Item("liang").Value))
response.write content%>
)
<input type="hidden" name="liang" value="<%=(Recordset2.Fields.Item("liang").Value)%>">
</font></td>
</tr>
<tr>
<td><div align="right">价格:</div></td>
<td colspan="2"> <font color="#FF0000">
<input name="jiage" type="text" size="15">
( </tl
>最新入库参考价格¥:<%content = Server.HTMLEncode((Recordset2.Fields.Item("jiage").Value))
response.write content%>
) </font></td>
</tr>
<tr>
<td><div align="right">出库性质:</div></td>
<td colspan="2"> <select name="xingzhi">
<option>……请选择……</option>
<option value="销给客户">销给客户</option>
<option value="退给供货客">退给供货客户</option>
<option value="自耗">自耗</option>
<option value="报废">报废</option>
</select></td>
</tr>
<tr>
<td><div align="right">付款方式:</div></td>
<td colspan="2"> <select name="fukuanfangshi">
<option>……请选择……</option>
<option value="现金">现金</option>
<option value="支票">支票</option>
<option value="转帐">转帐</option>
<option value="信用">信用(记帐)</option>
</select></td>
</tr>
<tr>
<td height="16"><div align="right">出库状态:</div></td>
<td colspan="2"> 有效
<input type="hidden" name="zhuangtai" value="有效"></td>
</tr>
<tr>
<td><div align="right">备注:</div></td>
<td colspan="2"><textarea name="other" cols="50"></textarea></td>
</tr>
<tr>
<td> </td>
<td width="40%"><input type="submit" name="Submit" value="提交"></td>
<td width="34%"> </td>
</tr>
</table>
</form></td>
</tr>
</table>
<p> </p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing %>
<%
Recordset2.Close()
Set Recordset2 = Nothing %>
<%
Recordset3.Close()
Set Recordset3 = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -