?? back_modi.asp
字號:
<%
'☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
'★ ★
'☆ 簡單WEB進銷存管理系統 V2.1 ☆
'★ ★
'☆ 版權所有: cnshitou.cn ☆
'★ ★
'☆ 程序制作: 石頭網絡 ☆
'★ email:chinashiwei007@yahoo.com.cn ★
'☆ QQ:365167311 ☆
'★ ★
'☆ ☆
'★ 主頁地址: http://www.cnshitou.cn/ 石頭網絡及產品 ★
'☆ http://www.cnshitou.cn/avonjxc/ 演示地址 ☆
'★ ★
'☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
%>
<%
if request.Cookies("shiwei_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 request.Cookies("shiwei_id")<>"1" then
%>
<br><center><img src="../images/note.gif" align="absmiddle"> <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> 修改退貨(帶*號的為必填項)</td>
<td align="right"> </td>
</tr>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -