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

📄 rs_order.asp

📁 oa办公系统asp程序
💻 ASP
字号:
<!--#include file="../title.asp"-->
<%
'订单信息
dim ref,buyer,style_no,pattern,order_qty,supplier
dim machand,sketch,quantity_qty,quantity_kgs
dim unit_price,amount_us,fabric_dellvery,cloth_dellvery
ref=request("ref")
buyer=request("buyer")
style_no=request("style_no")
pattern=request("pattern")
order_qty=request("order_qty")
merchand=request("merchand")
sketch=request("sketch")
quantity_yds=request("quantity_yds")
quantity_kgs=request("quantity_kgs")
unit_price=request("unit_price")
amount_us=request("amount_us")
fabric_delivery=request("fabric_delivery")
cloth_delivery=request("cloth_delivery")
supplier=request("supplier")
username=session("admin")
date_now=date
'订布单
dim fabric_info
fabric_info=request("fabric_info")
'辅料订单
dim yes_1,yes_2,yes_3,yes_4,yes_5,yes_6,yes_7,yes_8,yes_9,yes_10,yes_11,yes_12,yes_13
dim yes_14,yes_15,yes_16,yes_17,yes_18,yes_19,yes_20,yes_21,yes_22,yes_23
yes_1=request("yes_1")
yes_2=request("yes_2")
yes_3=request("yes_3")
yes_4=request("yes_4")
yes_5=request("yes_5")
yes_6=request("yes_6")
yes_7=request("yes_7")
yes_8=request("yes_8")
yes_9=request("yes_9")
yes_10=request("yes_10")
yes_11=request("yes_11")
yes_12=request("yes_12")
yes_13=request("yes_13")
yes_14=request("yes_14")
yes_15=request("yes_15")
yes_16=request("yes_16")
yes_17=request("yes_17")
yes_18=request("yes_18")
yes_19=request("yes_19")
yes_20=request("yes_20")
yes_21=request("yes_21")
yes_22=request("yes_22")
yes_23=request("yes_23")
response.write "00000"
response.write supplier
response.write "11111"
founderr=false
if ref="" then
 		founderr=true
  		errmsg=errmsg+"<li>	REF NO不允许输入空值!</li>"
end if

if quantity_yds<>"" then
	if not isnumber(quantity_yds) then
 		founderr=true
  		errmsg=errmsg+"<li>Wrong Quantity(YDS)!</li>"
	end if
else
	quantity_yds=0
end if
if order_qty<>"" then
	if not isnumber(order_qty) then
 		founderr=true
  		errmsg=errmsg+"<li>	Wrong Quantity(KGS)!</li>"
	end if
else
	order_qty=0
end if
if quantity_kgs<>"" then
	if not isnumber(quantity_kgs) then
 		founderr=true
  		errmsg=errmsg+"<li>	Wrong Quantity(KGS)!</li>"
	end if
else
	quantity_kgs=0
end if
if Unit_price<>"" then
	if not isnumber(Unit_price) then
 		founderr=true
  		errmsg=errmsg+"<li>	Wrong Unit Price!</li>"
	end if
else
	unit_price=0
end if
if Amount_us<>"" then
	if not isnumber(amount_us) then
 		founderr=true
  		errmsg=errmsg+"<li>	Wrong Amount US$!</li>"
	end if
else
	amount_us=0
end if
if cloth_delivery<>"" then
	if not isdate(cloth_delivery) then
 		founderr=true
  		errmsg=errmsg+"<li>	布料交期 格式不正确!</li>"
	end if
end if
if fabric_delivery<>"" then
	if not isdate(fabric_delivery) then
 		founderr=true
  		errmsg=errmsg+"<li>	成衣交期 格式不正确!!</li>"
	end if
end if
if username="" then
 	founderr=true
  	errmsg=errmsg+"<li>请登陆系统!!!</li>"
end if
if founderr=false then
	sql="select * from cloth_info"
	rs.open sql,conn,1,3
	'rs.addnew
	rs("ref_no")=ref
	rs("buyer")=buyer
	rs("style")=style_no
	rs("patten")=pattern
	rs("order_qty")=order_qty
	rs("merchandiser")=merchand
	rs("sketch")=sketch
	rs("supplier")=supplier
	rs("quantity_yds")=quantity_yds
	rs("quantity_kgs")=quantity_kgs
	rs("unit_price")=unit_price
	rs("amount_us")=amount_us
	if fabric_delivery<>"" then
		rs("fabric_delivery")=fabric_delivery
	end if
	if cloth_delivery<>"" then
		rs("cloth_delivery")=cloth_delivery
	end if
	rs("supplier")=supplier
	rs("fabric_info")=fabric_info
	rs("add_user")=username
	rs("add_time")=date_now
	rs.update
	rs.close
'----------------以下是辅料部分---------------------------
	sql2="select * from cloth_access_1"
	rs2.open sql2,conn,1,3
	do while not rs2.eof
	rs2.delete
	rs2.movenext
	loop
	rs2.close
	sql3="select * from cloth_access_1" 
	rs3.open sql3,conn,1,3
	if yes_1="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=1
		rs3.update
	end if
	if yes_2="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=2
		rs3.update
	end if
	if yes_3="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=3
		rs3.update
	end if
	if yes_4="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=4
	end if
	if yes_5="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=5
		rs3.update
	end if
	if yes_6="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=6
		rs3.update
	end if
	if yes_7="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=7
		rs3.update
	end if
	if yes_8="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=8
		rs3.update
	end if
	if yes_9="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=9
		rs3.update
	end if
	if yes_10="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=10
		rs3.update
	end if
	if yes_11="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=11
		rs3.update
	end if
	if yes_12="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=12
		rs3.update
	end if
	if yes_13="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=13
		rs3.update
	end if
	if yes_14="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=14
		rs3.update
	end if
	if yes_15="ON" then
			rs3.addnew

		rs3("ref_no")=ref
		rs3("access_id")=15
		rs3.update
	end if
	if yes_16="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=16
		rs3.update
	end if
	if yes_17="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=17
		rs3.update
	end if
	if yes_18="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=18
		rs3.update
	end if
	if yes_19="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=19
		rs3.update
	end if
	if yes_20="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=20
		rs3.update
	end if
	if yes_21="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=21
		rs3.update
	end if
	if yes_22="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=22
		rs3.update
	end if
	if yes_23="ON" then
		rs3.addnew
		rs3("ref_no")=ref
		rs3("access_id")=23
		rs3.update
	end if
%>
	<meta http-equiv="refresh" content='2; URL="access.asp?ref=<%=ref%>"'>
<%
	response.write "<br>"
	response.write "第一项-第一行数据已存储!"
else
	response.write "<br>"
 	response.write "由于以下的原因不能保存数据:"
 	response.write errmsg
%>
	<meta http-equiv="refresh" content='5; URL="javascript:history.go(-1)"'>
<%
end if

Function isnumber(strng)
isnumber = fals
Dim regEx, Match
Set regEx = New RegExp
regEx.Pattern = "^\d+(\.\d+)?$"
regEx.IgnoreCase = True
Set Match = regEx.Execute(strng)
if match.count then isnumber= true
End Function

%>

⌨️ 快捷键说明

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