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

📄 back_modi.asp

📁 不错的进销存管理系统。功能比较全
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
'★                                                                  ★
'☆                   亿达科技WEB进销存管理系统 V3.1                 ☆
'★                                                                  ★
'☆  版权所有: 常州亿达科技有限公司                                  ☆
'★                                                                  ★
'☆  程序制作: 常州亿达科技有限公司                                  ☆
'★            email:yidatech@163.com                                ★
'☆            QQ:874031633                                          ☆
'★                                                                  ★
'☆                                                                  ☆
'★                                                                  ★
'☆                                                                  ☆
'★                                                                  ★
'☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
%>
<%
if session("yida_username")="" then
%>
<script language="javascript">
top.location.href="../index.asp"
</script>
<%  
  response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->

<html>
<head>
<title><%=dianming%> - 修改退货</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
	background-color:#FFFFFF;
}
</style>
</HEAD>

<BODY>
<%
if fla21="0" and session("shiwei_id")<>"1" then
%>
<br><center><img src="../images/note.gif" align="absmiddle">&nbsp;<font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%  
  response.end
end if
%>

<%
if request("hid1")="ok" then
set rs_id=conn.execute("select * from buy where id="&request("id"))
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
nowbianhao=rs_id("bianhao")

'-------------------------
  set rs_huiyuan=conn.execute("select * from buy where bianhao='"&rs_id("bianhao")&"' and zu")
  set rs=conn.execute("select * from buy where bianhao='"&rs_id("bianhao")&"' and zu=false")
  totalprice=0
  do while rs.eof=false
    conn.execute("update produit set shulian=shulian-"&rs("shulian")&" where huohao='"&rs("huohao")&"' and id_ku="&rs("id_ku"))
	totalprice=totalprice+rs("price")*rs("shulian")
    rs.movenext
  loop
  conn.execute("update huiyuan set jifen=jifen+"&totalprice&" where id="&rs_huiyuan("id_huiyuan"))
  sql="delete from buy where bianhao='"&rs_id("bianhao")&"'"
  conn.execute(sql)
'-------------------------

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
  rs.addnew
  rs("id_bigclass")=rs_produit("id_bigclass")
  rs("id_smallclass")=rs_produit("id_smallclass")
  rs("title")=rs_produit("title")
  rs("huohao")=rs_produit("huohao")
  rs("id_ku")=nowku
  rs("shulian")=nowshulian
  rs("danwei")=rs_produit("danwei")
  rs("price")=rs_produit("price")
  rs("price2")=rs_produit("price2")
  rs("guige")=rs_produit("guige")
  rs("baojin")=rs_produit("baojin")
  rs("class")=rs_produit("class")
  rs("duihuan")=rs_produit("duihuan")
  rs("tichen_type")=rs_produit("tichen_type")
  rs("tichen")=rs_produit("tichen")
  rs("photo")=rs_produit("photo")
  rs("beizhu")=rs_produit("beizhu")
else
  rs("shulian")=rs("shulian")+nowshulian
end if
rs.update

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 buy(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")&"',1,#"&nowselldate&"#,"&nowprice&","&rs_produit("price2")&","&nowhuiyuan&",'"&rs_produit("photo")&"','"&nowbianhao&"','"&nowbeizhu&"')"
conn.execute(sql)
end if
next
if nowhuiyuan<>0 then
  conn.execute("update huiyuan set jifen=jifen-"&totalprice&" where id="&nowhuiyuan)
end if
sql="insert into buy(shulian,id_login,login,type,selldate,price,price2,id_huiyuan,bianhao,zu,beizhu) values("&totalshulian&","&nowid_login&",'"&rs_login("username")&"',1,#"&nowselldate&"#,"&totalprice&","&totalprice2&","&nowhuiyuan&",'"&nowbianhao&"',true,'"&nowbeizhu&"')"
conn.execute(sql)
%>
<script language="javascript">
alert("修改退货成功!")
window.opener.location.reload();
window.close();
</script>
<%
response.end
end if
%>
<script language="javascript">
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.shulian1.value=="")
{
alert("请输入数量!");
return false;
}
}
</script>

<script language="javascript">
function chg(objName, objName2, zekou)
{
	var obj;
	obj = document.getElementById(objName);
	obj2 = document.getElementById(objName2);
	temp = obj2.value*zekou
	//obj.value = temp.toFixed(2)
	obj.value = Math.round(temp*100)/100
}
</script>
<%
set rs=conn.execute("select * from buy where id="&request("id"))
set rs_buy=conn.execute("select * from buy where bianhao='"&rs("bianhao")&"' and zu=false")
set rs_huiyuan=conn.execute("select * from huiyuan where id="&rs("id_huiyuan"))
if rs_huiyuan.eof then
  nowusername="单击选择会员"
  nowcard=""
  nowid="0"
else
  nowusername=rs_huiyuan("username")
  nowcard=rs_huiyuan("card")
  nowid=rs_huiyuan("id")
end if
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
  <table cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>&nbsp;修改退货(带*号的为必填项)</td>
	  <td align="right">&nbsp;</td>
    </tr>

⌨️ 快捷键说明

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