⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jinadd.asp

📁 本软件程序是一个基于WEB的进销存管理平台,代码十分完整,无错!
💻 ASP
字号:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% 
    
    Response.Buffer = True 
    
    Response.ExpiresAbsolute = Now() - 1 
    
    Response.Expires = 0 
    
    Response.CacheControl = "no-cache" 
    
    %>
          <%
Set ObjReference = Server.CreateObject("jxc1.check") 
ObjReference.myfilec()
%>
<!--#include file="../../Connections/jxc.asp" -->
<%'初始流水号生成 
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 jin ORDER BY jidcode DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
If Recordset1.EOF And Recordset1.BOF Then 
jidcode = newid
else
pjidcode =(Recordset1.Fields.Item("jidcode").Value)
pjidcode = right(pjidcode,12)
if newid - pjidcode <5000 then 
jidcode = pjidcode +1
else
jidcode = newid
end if
end if
Recordset1_numRows = 0
%>
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = "1"
If (Request.QueryString("hidcode") <> "") Then 
  Recordset2__MMColParam = Request.QueryString("hidcode")
End If
%>
<%
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_jxc_STRING
Recordset2.Source = "SELECT * FROM goods WHERE hidcode = '" + Replace(Recordset2__MMColParam, "'", "''") + "'"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()

Recordset2_numRows = 0
%>
<%
Dim Recordset3
Dim Recordset3_numRows

Set Recordset3 = Server.CreateObject("ADODB.Recordset")
Recordset3.ActiveConnection = MM_jxc_STRING
Recordset3.Source = "SELECT * FROM ku"
Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 1
Recordset3.Open()

Recordset3_numRows = 0
%>
<%
Dim Recordset4
Dim Recordset4_numRows

Set Recordset4 = Server.CreateObject("ADODB.Recordset")
Recordset4.ActiveConnection = MM_jxc_STRING
Recordset4.Source = "SELECT * FROM ku"
Recordset4.CursorType = 0
Recordset4.CursorLocation = 2
Recordset4.LockType = 1
Recordset4.Open()

Recordset4_numRows = 0
%>
<%
Dim Recordset5
Dim Recordset5_numRows

Set Recordset5 = Server.CreateObject("ADODB.Recordset")
Recordset5.ActiveConnection = MM_jxc_STRING
Recordset5.Source = "SELECT * FROM kuxingzhi"
Recordset5.CursorType = 0
Recordset5.CursorLocation = 2
Recordset5.LockType = 1
Recordset5.Open()

Recordset5_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\n\n'+myErr)}
  document.MM_returnValue = (myErr=='');
}
//-->
</script>
</head>

<body oncontextmenu="return false" >
<table width="100%" cellpadding="0">
  <tr>
    <td><form action="jinsave.asp" method="post" name="form1" onSubmit="YY_checkform('form1','shu','#0_100000','1','数量必须正确填写','jiage','#0_99999999999999999999999999999999','1','价格请填写数字','fukuanfangshi','#q','1','请选择付款方式','ku','#q','1','请选择库名称','xingzhi','#q','1','请选择入库性质','wanhao','#q','1','请选择货品性质');return document.MM_returnValue">
        <table width="100%" cellpadding="0">
          <tr> 
            <td height="22" colspan="3"> <div align="left"><img src="images/icon-page.gif" width="16" height="15"><font color="#6AB5FF">填写入库表单&gt;&gt;</font></div></td>
          </tr>
          <tr> 
            <td width="12%" height="9"><div align="right">货品编号:</div></td>
            <td colspan="2"> <% 
			dim hidcode
			hidcode=Request.QueryString("hidcode")
			%> <%= hidcode %> <input type="hidden" name="hidcode"value="<%= hidcode %>"> 
              <input type="hidden" name="gidcode"value="<%=(Recordset2.Fields.Item("hgidcode").Value)%>"></td>
          </tr>
          <tr> 
            <td height="10"><div align="right">货品信息:</div></td>
            <td colspan="2"><%content = Server.HTMLEncode((Recordset2.Fields.Item("hgoodsname").Value))
response.write content%>
              &nbsp;&nbsp;&nbsp; 
              <%content = Server.HTMLEncode((Recordset2.Fields.Item("hshangbiao").Value))
response.write content%>
              &nbsp;&nbsp;&nbsp;
<%content = Server.HTMLEncode((Recordset2.Fields.Item("hxinghao").Value))
response.write content%>
              <input type="hidden" name="huo"value="<%=(Recordset2.Fields.Item("hgoodsname").Value)%>/<%=(Recordset2.Fields.Item("hshangbiao").Value)%>/<%=(Recordset2.Fields.Item("hxinghao").Value)%>"></td>
          </tr>
          <tr> 
            <td height="17"><div align="right">数量:</div></td>
            <td colspan="2"> <input name="shu" type="text" size="15"> <%content = Server.HTMLEncode((Recordset2.Fields.Item("hdanwei").Value))
response.write content%>
              <input type="hidden" name="liang"value="<%=(Recordset2.Fields.Item("hdanwei").Value)%>"></td>
          </tr>
          <tr> 
            <td height="16"><div align="right">入库价格:</div></td>
            <td colspan="2"> <input name="jiage" type="text"  size="15"> <font color="#FF0000">价格参考:( 
              最初入库价格¥<%=(Recordset2.Fields.Item("hjiage").Value)%>)</font></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><div align="right">库名称:</div></td>
            <td colspan="2"><select name="ku">
                <option value="">……请选择……</option>
                <%
While (NOT Recordset3.EOF)
%>
                <option value="<%=(Recordset3.Fields.Item("kuname").Value)%>"><%=(Recordset3.Fields.Item("kuname").Value)%></option>
                <%
  Recordset3.MoveNext()
Wend
If (Recordset3.CursorType > 0) Then
  Recordset3.MoveFirst
Else
  Recordset3.Requery
End If
%>
              </select> &nbsp;</tl
            ></td>
          </tr>
          <tr> 
            <td height="7"><div align="right">当前状态:</div></td>
            <td colspan="2"><font color="#FF0000">有效</font> <input type="hidden" name="zhuangtai" value="有效"> 
            </td>
          </tr>
          <tr> 
            <td height="0"><div align="right">入库性质:</div></td>
            <td colspan="2"><select name="xingzhi">
                <option selected>……请选择……</option>
                <option value="从供货客户进货">从供货客户进货</option>
              </select></td>
          </tr>
          <tr> 
            <td height="0"><div align="right">库货性质:</div></td>
            <td colspan="2"> <font color="#FF0000">
              <select name="wanhao">
                <option value="">……请选择……</option>
                <%
While (NOT Recordset5.EOF)
%>
                <option value="<%=(Recordset5.Fields.Item("kuxingzhi").Value)%>"><%=(Recordset5.Fields.Item("kuxingzhi").Value)%></option>
                <%
  Recordset5.MoveNext()
Wend
If (Recordset5.CursorType > 0) Then
  Recordset5.MoveFirst
Else
  Recordset5.Requery
End If
%>
              </select>
              (注意:选择的库名与相关的进货性质统一,<a href="kulist.asp">查看</a>)</font></td>
          </tr>
          <tr> 
            <td height="3"><div align="right">入库备注:</div></td>
            <td colspan="2"><textarea name="other" cols="50"></textarea></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td width="54%"><input type="submit" name="Submit" value="提交"></td>
            <td width="34%">&nbsp;</td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>

<p>&nbsp;</p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing %> 
<%
Recordset2.Close()
Set Recordset2 = Nothing %> 
<%
Recordset3.Close()
Set Recordset3 = Nothing %>
<%
Recordset4.Close()
Set Recordset4 = Nothing %>
<%
Recordset5.Close()
Set Recordset5 = Nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -