不错的进销存管理系统。功能比较全

源代码在线查看: huiyuan_duihuan.asp

软件大小: 1312 K
上传用户: MOMO89752118
关键词: 进销 管理系统 比较
下载地址: 免注册下载 普通下载 VIP

相关代码

								if session("yida_username")="" then
				%>
				
				top.location.href="../index.asp"
				
								  response.end
				end if
				%>
				
				
				
				
				
				 - 积分兑换礼物
				
				
				
				body {
					background-color:#FFFFFF;
				}
				
				
				
				
								if fla17="0" and session("shiwei_id")"1" then
				%>
				 你不具备此权限,请与管理员联系!
								  response.end
				end if
				%>
				
								if request("hid1")="ok" then
				nowselldate=request("selldate")
				nowbeizhu=request("beizhu")
				nowid_login=request("id_login")
				set rs_login=conn.execute("select * from login where id="&nowid_login)
				nowhuiyuan=request("huiyuan")
				if nowhuiyuan="" then
				  nowhuiyuan=0
				end if
				set rs_huiyuan=conn.execute("select * from huiyuan where id="&nowhuiyuan)
				nowbianhao=replace(replace(replace(replace(replace(replace(FormatDateTime(now(),0),":","")," ",""),"-",""),"/",""),"上午",""),"下午","")
				
				
				totalshulian=0
				totalprice=0
				totalprice2=0
				for x=1 to maxproduit
				nowku=request("ku"&x)
				set rs_ku=conn.execute("select * from ku where id="&nowku)
				nowhuohao=request("huohao"&x)
				nowshulian=request("shulian"&x)
				nowprice=request("price"&x)
				if nowprice="" then
				  nowprice=0
				end if
				if nowhuohao"单击选择产品" and nowshulian"" then
				set rs_produit=conn.execute("select * from produit where huohao='"&nowhuohao&"'")
				set rs=server.createobject("ADODB.RecordSet")
				sql="select * from produit where huohao='"&nowhuohao&"' and id_ku="&nowku
				rs.open sql,conn,1,3
				if rs.eof then
				%>
				
				alert(" 中没有产品 !")
				window.history.go(-1)
				 
								  response.end
				  exit for
				elseif rs("shulian")-nowshulian				%>
				
				alert(" 中  库存不足!")
				window.history.go(-1)
				 
								  response.end
				  exit for
				end if
				totalprice=totalprice+nowprice*nowshulian
				end if
				next
				if rs_huiyuan("jifen")-totalprice				%>
				
				alert(" 积分不足!")
				window.history.go(-1)
				 
								  response.end 
				end if
				
				
				totalshulian=0
				totalprice=0
				totalprice2=0
				for x=1 to maxproduit
				nowku=request("ku"&x)
				set rs_ku=conn.execute("select * from ku where id="&nowku)
				nowhuohao=request("huohao"&x)
				nowshulian=request("shulian"&x)
				nowprice=request("price"&x)
				if nowprice="" then
				  nowprice=0
				end if
				if nowhuohao"单击选择产品" and nowshulian"" then
				set rs_produit=conn.execute("select * from produit where huohao='"&nowhuohao&"'")
				set rs=server.createobject("ADODB.RecordSet")
				sql="select * from produit where huohao='"&nowhuohao&"' and id_ku="&nowku
				rs.open sql,conn,1,3
				rs("shulian")=rs("shulian")-nowshulian 
				rs.update
				rs.close
				sql="select bigclass from bigclass where id="&rs_produit("id_bigclass")
				set rs_bigclass=conn.execute(sql)
				sql="select smallclass from smallclass where id="&rs_produit("id_smallclass")
				set rs_smallclass=conn.execute(sql)
				if rs_smallclass.eof then
				  smallclass=""
				else
				  smallclass=rs_smallclass(0)
				end if
				totalshulian=totalshulian+nowshulian
				totalprice=totalprice+nowprice*nowshulian
				totalprice2=totalprice2+rs_produit("price2")*nowshulian
				sql="insert into sell(id_produit,bigclass,smallclass,title,huohao,id_ku,ku,shulian,guige,id_login,login,type,selldate,price,price2,id_huiyuan,photo,bianhao,beizhu) values("&rs_produit("id")&",'"&rs_bigclass(0)&"','"&smallclass&"','"&rs_produit("title")&"','"&nowhuohao&"',"&rs_ku("id")&",'"&rs_ku("ku")&"',"&nowshulian&",'"&rs_produit("guige")&"',"&nowid_login&",'"&rs_login("username")&"',3,#"&nowselldate&"#,"&nowprice&","&rs_produit("price2")&","&nowhuiyuan&",'"&rs_produit("photo")&"','"&nowbianhao&"','"&nowbeizhu&"')"
				conn.execute(sql)
				end if
				next
				if nowhuiyuan0 then
				  conn.execute("update huiyuan set jifen=jifen-"&totalprice&" where id="&nowhuiyuan)
				end if
				sql="insert into sell(shulian,id_login,login,type,selldate,price,price2,id_huiyuan,bianhao,zu,beizhu) values("&totalshulian&","&nowid_login&",'"&rs_login("username")&"',3,#"&nowselldate&"#,"&totalprice&","&totalprice2&","&nowhuiyuan&",'"&nowbianhao&"',true,'"&nowbeizhu&"')"
				conn.execute(sql)
				%>
				
				alert("兑换礼物成功!");
				window.close();
				window.opener.location.reload();
				 
								  response.end
				end if
				%>
				
				function isNumberString (InString,RefString)
				{
				if(InString.length==0) return (false);
				for (Count=0; Count < InString.length; Count++)  {
					TempChar= InString.substring (Count, Count+1);
					if (RefString.indexOf (TempChar, 0)==-1)  
					return (false);
				}
				return (true);
				}
				
				function check1()
				{
				if (document.form1.huohao1.value=="单击选择产品")
				{
				alert("还没有选择产品!");
				return false;
				}
				if (document.form1.shulian1.value=="")
				{
				alert("请输入兑换一个产品所需积分!");
				return false;
				}
				}
				
				
				
				
				
				
				  
				    
				        兑换礼物 (共有  积分)(带*号的为必填项)
					   
				    
				  
				
				
				
				
				
				
				
					  
					  
				      
				        选择产品:
				        
				          
						    
						    
							  
							    
								数量: 
								积分: 
																if session("shiwei_id")="1" or fla88="1" then
								  sql="select * from ku order by id"
								  set rs_ku=conn.execute(sql)
								else
								  sql="select * from ku where instr(login,'"&session("shiwei_id")&",')>0 order by id"
								  set rs_ku=conn.execute(sql)	  
								end if
								if rs_ku.eof then
								%>
								
								  alert("没有属于你管理的仓库,请先添加仓库!")
								  window.location.href="../system/ku_add.asp"
								
																response.end
								end if
								%>
								仓库: 
																do while rs_ku.eof=false
								%>
							      
																  rs_ku.movenext
								loop
								%>
															
								下一个产品
								*
								
						      
									
									
						  
						
				      
					  
					    出库时间:
				        
						  
						  
						
				        
					  
				        经办人:
				        
						  						  if session("shiwei_id")=1 then
							sql="select * from login order by id_zu,id"
							set rs_login=conn.execute(sql)
						  else
							sql="select * from login where id="&session("shiwei_id")
							set rs_login=conn.execute(sql)	  
						  end if
						  if rs_login.eof then
						  %>
					      
					        alert("请先添加员工!")
					        window.location.href="../system/user_add.asp"
					      
						  						  response.end
						  else
						  %>
						  
						  						  do while rs_login.eof=false
						  %>
						     ()
						  						    rs_login.movenext
						  loop
						  %>
						  
						  						  end if
						  %>		
						
				       
					  
					    备注:
				        
						  
						
				         
				      
					     
				        
						  
						  
						  
						  
				      
					  
				
				
				
				
				
				
				
				
				
				
				
							

相关资源