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

📄 xsthaddok.asp

📁 《网上商品交易系统》 开发及测试环境 操作系统:Windows 2000 Server 后台数据库:SQL Server 2000 Web服务器:IIS 5.0  《网上商品交易系统》
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/sell.asp" -->
<%
if(Request("hthph") <> "") then varthph = Request("hthph")
if(Request("hspname") <> "") then varspname = Request("hspname")
if(Request("hjc") <> "") then varjc = Request("hjc")
if(Request("hcd") <> "") then varcd = Request("hcd")
if(Request("hgg") <> "") then vargg = Request("hgg")
if(Request("hbz") <> "") then varbz = Request("hbz")
if(Request("hdw") <> "") then vardw = Request("hdw")
if(Request("hdj") <> "") then vardj = Request("hdj")
if(Request("hje") <> "") then varje = Request("hje")
if(Request("hkhname") <> "") then varkhname = Request("hkhname")
if(Request("hthdate") <> "") then varthdate = Request("hthdate")
if(Request("hczy") <> "") then varczy = Request("hczy")
if(Request("hjsr") <> "") then varjsr = Request("hjsr")
if(Request("hjsfs") <> "") then varjsfs = Request("hjsfs")
if(Request("hsl") <> "") then varsl = Request("hsl")
if(Request("hid") <> "") then varid = Request("hid")
if(Request("hwf") <> "") then varwf = Request("hwf")
if(Request("hsf") <> "") then varsf = Request("hsf")
if(Request("hyf") <> "") then varyf = Request("hyf")
if(Request("hwf") > 0 ) then
	varwhether = "否"
else
	varwhether = "是"
end if
'查询入库结账表中的最大单据号
set rsmaxph = Server.CreateObject("ADODB.Recordset")
sql_max = "SELECT MAX(ID) AS MAXID  FROM dbo.tab_thjz_xs "
rsmaxph.open sql_max,conn,1,3
'生成结款票号
no=trim(rsmaxph("MAXID"))
if (month(date())<10) then
	cmonth="0"+Cstr(month(date()))
else
	cmonth=Cstr(month(date()))
end if
if (day(date())<10) then
	cday="0"+Cstr(day(date()))
else
	cday=Cstr(day(date()))
end if
select case len(int(Right(no,5)+1))
	case 1
		cno="0000"+Cstr(int(Right(no,5)+1))
	case 2
		cno="000"+Cstr(int(Right(no,5)+1))
	case 3
		cno="00"+Cstr(int(Right(no,5)+1))
	case 4
		cno="0"+Cstr(int(Right(no,5)+1))
	case 5
		cno=Cstr(int(Right(no,5)+1))
	case Else
		cno="00001"
end select
intno="JK"+Cstr(year(date()))+cmonth+cday+cno
Ins_sellth = "INSERT INTO dbo.tab_sellth (ID, spid, spname, jc, cd, gg, bz, dw, dj, sl,"&_
" je, khname, thdate, czy, jsr, jsfs)  VALUES ('" + Replace(varthph, "'", "''") + "','" +_
 Replace(varid, "'", "''") + "','" +  Replace(varspname, "'", "''") + "','" +_
 Replace(varjc, "'", "''") + "','" + Replace(varcd, "'", "''") + "','" +_
 Replace(vargg, "'", "''") + "','" + Replace(varbz, "'", "''") + "','" +_
 Replace(vardw, "'", "''") + "'," + Replace(vardj, "'", "''") + "," +_
 Replace(varsl, "'", "''") + "," + Replace(varje, "'", "''") + ",'" +_
 Replace(varkhname, "'", "''") + "','" + Replace(varthdate, "'", "''") + "','" +_
 Replace(varczy, "'", "''") + "','" + Replace(varjsr, "'", "''") + "','" +_
 Replace(varjsfs, "'", "''") + "') "
conn.Execute(Ins_sellth)
Ins_thph = "INSERT INTO dbo.tab_thph_xs (thph, sl, yf, sf, wf, khname, thdate, czy,"&_
" jsr, jsfs, whether)  VALUES ('" + Replace(varthph, "'", "''") +  "'," +_
 Replace(varsl, "'", "''") + "," + Replace(varyf, "'", "''") + "," +_
  Replace(varsf, "'", "''") + "," + Replace(varwf, "'", "''") +  ",'" +_
  Replace(varkhname, "'", "''") + "','" + Replace(varthdate, "'", "''") +_
  "','" + Replace(varczy, "'", "''") + "','" + Replace(varjsr, "'", "''") +_
  "','" + Replace(varjsfs, "'", "''") + "','" + Replace(varwhether,"'","''") + "') "
conn.Execute(Ins_thph)
Ins_jk="INSERT INTO dbo.tab_thjz_xs (ID,thid,khname,bcjk,ye,jkdate,czy,jsr) VALUES ('"&intno&_
"','"&varthph&"','"&varkhname&"',"&varsf&","&varwf&",'"&varthdate&"','"&varczy&"','"&varjsr&"')"
conn.Execute(Ins_jk)
UP_kc = "UPDATE dbo.tab_kucun  SET kcsl = kcsl+"+ Replace(varsl, "'", "''") +_
 ",kcje = (kcsl+" + Replace(varsl,"'","''")+")* dj" + "  WHERE ID ='"+varid+"'"
conn.Execute(UP_kc)
%>
<html>
<head>
<title>明日企业网上销售管理系统——商品销售退货!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet">
</head>
<body bgcolor="#FFFFFF" text="#000000" background="../../images/bg.gif">
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="311">
  <tr> 
    <td>
        <div align="center"> 	
 		<p><b><font color="990000">销售退货信息保存成功!</font></b></p>
        <p><font color="#990000"><b>单击“ <a href="./spxsth.asp" class="l" target="_self">返回</a> 
          ”继续退货。</b></font></p>
      </div>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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