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

📄 savexs.asp

📁 基础进销存BS系统 ASP+Sql 功能不断完善中
💻 ASP
字号:
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<!--#include file="../Inc/Config.asp" -->
<!--#include file="../Inc/dbconn.asp" -->
<!--#include file="Style.asp" -->

<%
xsbianhao=Trim(Request.Form("xsdanhao"))
xsriqi=Trim(Request.Form("xsriqi")) 
xskaidanren=Trim(Request.Form("kaidanren")) 
xsfangshi=Trim(Request.Form("radiobutton") )
xsqita1=Trim(Request.Form("qita1") )
xsqita2=Trim(Request.Form("qita2"))
xsbeizhu=Trim(Request.Form("beizhu")) 
flag=Trim(Request.Form("radiobutton2"))  
xszongheji=Trim(Request.Form("zongheji"))

'00000000000000000000000000000000000000000000000000000


set rck=server.CreateObject("adodb.recordset")  
sql="EXEC jxc_savexsjiben '"&xsbianhao&"','"&xsriqi&"','"&xskaidanren&"','"&xsfangshi&"','"& xsqita1&"','"&xsqita2&"','"&xszongheji&"','"&xsbeizhu&"','"&flag&"'"
rck.Open sql,Conn
set rck=nothing
'增加基本的入库单 pro_xsjiben

'定义 数组循环添加 字段
dim xsspbianhao(10)  '商品编码
xsspbianhao(1)=Trim(Request.Form("xsspbianhao1"))
xsspbianhao(2)=Trim(Request.Form("xsspbianhao2"))
xsspbianhao(3)=Trim(Request.Form("xsspbianhao3"))
xsspbianhao(4)=Trim(Request.Form("xsspbianhao4"))
xsspbianhao(5)=Trim(Request.Form("xsspbianhao5"))
xsspbianhao(6)=Trim(Request.Form("xsspbianhao6"))
xsspbianhao(7)=Trim(Request.Form("xsspbianhao7"))
xsspbianhao(8)=Trim(Request.Form("xsspbianhao8"))
xsspbianhao(9)=Trim(Request.Form("xsspbianhao9"))
xsspbianhao(10)=Trim(Request.Form("xsspbianhao10"))

dim xsspname(10) '商品名称
xsspname(1)=Trim(Request.Form("xsspname1"))
xsspname(2)=Trim(Request.Form("xsspname2"))
xsspname(3)=Trim(Request.Form("xsspname3"))
xsspname(4)=Trim(Request.Form("xsspname4"))
xsspname(5)=Trim(Request.Form("xsspname5"))
xsspname(6)=Trim(Request.Form("xsspname6"))
xsspname(7)=Trim(Request.Form("xsspname7"))
xsspname(8)=Trim(Request.Form("xsspname8"))
xsspname(9)=Trim(Request.Form("xsspname9"))
xsspname(10)=Trim(Request.Form("xsspname10"))

dim xskehudaima(10)    '销售可户代码
xskehudaima(1)=Trim(Request.Form("xskehudaima1"))
xskehudaima(2)=Trim(Request.Form("xskehudaima2"))
xskehudaima(3)=Trim(Request.Form("xskehudaima3"))
xskehudaima(4)=Trim(Request.Form("xskehudaima4"))
xskehudaima(5)=Trim(Request.Form("xskehudaima5"))
xskehudaima(6)=Trim(Request.Form("xskehudaima6"))
xskehudaima(7)=Trim(Request.Form("xskehudaima7"))
xskehudaima(8)=Trim(Request.Form("xskehudaima8"))
xskehudaima(9)=Trim(Request.Form("xskehudaima9"))
xskehudaima(10)=Trim(Request.Form("xskehudaima10"))

dim xskehuname(10)       '销售可户名字
xskehuname(1)=Trim(Request.Form("xskehuname1"))
xskehuname(2)=Trim(Request.Form("xskehuname2"))
xskehuname(3)=Trim(Request.Form("xskehuname3"))
xskehuname(4)=Trim(Request.Form("xskehuname4"))
xskehuname(5)=Trim(Request.Form("xskehuname5"))
xskehuname(6)=Trim(Request.Form("xskehuname6"))
xskehuname(7)=Trim(Request.Form("xskehuname7"))
xskehuname(8)=Trim(Request.Form("xskehuname8"))
xskehuname(9)=Trim(Request.Form("xskehuname9"))
xskehuname(10)=Trim(Request.Form("xskehuname10"))

dim xsshouliang(10)   '数量
xsshouliang(1)=Trim(Request.Form("xsshouliang1"))
xsshouliang(2)=Trim(Request.Form("xsshouliang2"))
xsshouliang(3)=Trim(Request.Form("xsshouliang3"))
xsshouliang(4)=Trim(Request.Form("xsshouliang4"))
xsshouliang(5)=Trim(Request.Form("xsshouliang5"))
xsshouliang(6)=Trim(Request.Form("xsshouliang6"))
xsshouliang(7)=Trim(Request.Form("xsshouliang7"))
xsshouliang(8)=Trim(Request.Form("xsshouliang8"))
xsshouliang(9)=Trim(Request.Form("xsshouliang9"))
xsshouliang(10)=Trim(Request.Form("xsshouliang10"))

dim xsjiage(10)    '价格
xsjiage(1)=Trim(Request.Form("xsjiage1"))
xsjiage(2)=Trim(Request.Form("xsjiage2"))
xsjiage(3)=Trim(Request.Form("xsjiage3"))
xsjiage(4)=Trim(Request.Form("xsjiage4"))
xsjiage(5)=Trim(Request.Form("xsjiage5"))
xsjiage(6)=Trim(Request.Form("xsjiage6"))
xsjiage(7)=Trim(Request.Form("xsjiage7"))
xsjiage(8)=Trim(Request.Form("xsjiage8"))
xsjiage(9)=Trim(Request.Form("xsjiage9"))
xsjiage(10)=Trim(Request.Form("xsjiage10"))

dim xsqita(10)       '其他
xsqita(1)=Trim(Request.Form("xsqita1"))
xsqita(2)=Trim(Request.Form("xsqita2"))
xsqita(3)=Trim(Request.Form("xsqita3"))
xsqita(4)=Trim(Request.Form("xsqita4"))
xsqita(5)=Trim(Request.Form("xsqita5"))
xsqita(6)=Trim(Request.Form("xsqita6"))
xsqita(7)=Trim(Request.Form("xsqita7"))
xsqita(8)=Trim(Request.Form("xsqita8"))
xsqita(9)=Trim(Request.Form("xsqita9"))
xsqita(10)=Trim(Request.Form("xsqita10"))

dim xsheji(10)  '小记
xsheji(1)=Trim(Request.Form("xsheji1"))
xsheji(2)=Trim(Request.Form("xsheji2"))
xsheji(3)=Trim(Request.Form("xsheji3"))
xsheji(4)=Trim(Request.Form("xsheji4"))
xsheji(5)=Trim(Request.Form("xsheji5"))
xsheji(6)=Trim(Request.Form("xsheji6"))
xsheji(7)=Trim(Request.Form("xsheji7"))
xsheji(8)=Trim(Request.Form("xsheji8"))
xsheji(9)=Trim(Request.Form("xsheji9"))
xsheji(10)=Trim(Request.Form("xsheji10"))

'循环增加 销售单信息记录在 pro_xsdan 表中
for i=1 to 10
'if rs.EOF or rs.BOF then exit for
set rst=server.CreateObject("adodb.recordset")   
sql="EXEC jxc_savexsdan '"&xsbianhao&"','"&xsriqi&"','"&xsspbianhao([i])&"','"&xsspname([i])&"','"& xskehudaima([i]) &"','"& xskehuname([i]) &"','"&xsshouliang([i])  &"','"& xsjiage([i])  &"','"&xsqita([i]) &"','"&xsheji([i])  &"'"
rst.Open sql,Conn
next
'由于是循环 所以增加了许多 空值 将其 杀掉
set rst=nothing
set rst=server.CreateObject("adodb.recordset") 
sql="exec jxc_deletexsdan"
rst.open sql ,conn
set rst=nothing

'如果直接审核入库的操作即增加库存!根据入库单 编号查出商品编码以及数量然后循环UPDATE!更新值!!
if flag="是" then

  set rs = server.CreateObject("adodb.recordset")
  sql="select * from pro_xsdan  where xsdanhao='"&xsbianhao&"'"
  rs.Open sql,conn,0,2,1   
 for i=1 to 10
 if rs.EOF or rs.BOF then exit for
  bianhao1=rs("xsspbianhao")
  shuliang1=rs("xsshuliang")
  response.write rs("xsshuliang")&"<BR>"
 
  set rst=server.CreateObject("adodb.recordset") 
  sql="exec jxc_updatecangku2 '"&bianhao1&"','"&shuliang1&"'"
  rst.open sql ,conn

  rs.movenext
  set rst =nothing
 next
           

end if








call endconn()
 response.write "<script language=javascript>"	'Javascript 开始
				response.write"alert('添加完毕!');"	'警告
				response.write"location.href='kaidan.asp';"	'跳转到页面
				response.write "</script>"	
%>

  

⌨️ 快捷键说明

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