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

📄 caigou_add2.asp

📁 一个做得非常精美的进存销系统,可惜某些功能上做了限制.
💻 ASP
字号:
<!--#include file="Conn.asp"-->
<!--#include file="Check.asp"-->
<%
Dim bianhao,spid,pro_jg,pro_sl,pro_mone,wuliu,feiyong,pro_news,arr_news
Dim isdataman
Dim i
Dim padd,Sql 
Dim padd2,Sql2
Dim cg,cg_id
isdataman = Manage_Level(adl) 
If isdataman = "采购员" Then

Set cg = Conn.Execute("Select ID From [HQ_User] Where User_Name='"&adu&"'")
cg_id = cg(0)
cg.Close
Set cg=Nothing

bianhao = Trim(Request.Form("bianhao"))
wuliu = Trim(Request.Form("wuliu"))
feiyong = Trim(Request.Form("feiyong"))

For i=1 to Request.Form("spsl")
 spid = Trim(Request.Form("spid"&i))
 pro_news = Trim(Request.Form("pro_news"&i))
'arr_news = Sqlit(pro_news,",")
'pro_news = arr_news(2)
 pro_jg = Trim(Request.Form("pro_jg"&i))
 pro_sl = Trim(Request.Form("pro_sl"&i))
 pro_mone = Trim(Request.Form("pro_mone"&i))

'If Cint(pro_jg) > Cint(pro_news) Then
'Response.write "<script language='javascript'>alert('购买单价不能高于零售价!');" & chr(13)
'Response.write "window.document.location.href='javascript:history.go(-1)';</script>"
'exit for
'Else

  If spid="" or pro_sl="" or pro_jg="" or pro_mone="" then
     exit for
  Else
  Set padd = Server.CreateObject("ADODB.RecordSet")
  Sql = "Select * From [CaiGou2] Where (ID is null)"
  padd.Open Sql,Conn,1,3
  padd.addNew
  padd("Cai_ID") = bianhao
  padd("Product_ID") = spid
  padd("Shuliang") = pro_sl
  padd("Money") = pro_jg
  padd("Mone") = pro_mone
  padd.Update
  padd.Close
  Set padd=Nothing
  End if
'End if
Next

  Set padd2 = Server.CreateObject("ADODB.RecordSet")
  Sql2 = "Select * From [CaiGou] Where (ID is null)"
  padd2.Open Sql2,Conn,1,3
  padd2.addNew
  padd2("CaiWuYuan") = cg_id
  padd2("Cai_ID") = bianhao
  padd2("WuLiu") = wuliu
  padd2("YunFei") = feiyong
  padd2.Update
  padd2.Close
  Set padd2=Nothing

  Conn.Close
  Set Conn=Nothing

  Response.write "<script language='javascript'>alert('采购单添加成功!');" & chr(13)
  Response.write "window.document.location.href='CaiGou_Add.asp';</script>"

Else
  Response.write "<script language='javascript'>alert('对不起,你没有权限进行此项操作!');" & chr(13)
  Response.write "window.document.location.href='CaiGou_Add.asp';</script>"
End if
%>

⌨️ 快捷键说明

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