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

📄 rkthaddok.asp

📁 《网上商品交易系统》 开发及测试环境 操作系统:Windows 2000 Server 后台数据库:SQL Server 2000 Web服务器:IIS 5.0  《网上商品交易系统》
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/sell.asp" -->
<%
if(Request("hspid") <> "") then varspid = Request("hspid")
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("hgysname") <> "") then vargysname = Request("hgysname")
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("hws") <> "") then varws = Request("hws")
if(Request("hss") <> "") then varss = Request("hss")
if(Request("hys") <> "") then varys = Request("hys")
if(Request("hws") > 0 ) then
	varwhether = "否"
else
	varwhether = "是"
end if
'查询入库结账表中的最大单据号
set rsmaxph = Server.CreateObject("ADODB.Recordset")
sql_max = "SELECT MAX(ID) AS MAXID  FROM dbo.tab_thjz_rk "
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
%>
<%
set rssl= Server.CreateObject("ADODB.Recordset")
sql_kc="SELECT kcsl FROM dbo.tab_kucun WHERE ID ='"+varid+"'"
rssl.open sql_kc,conn,1,3
if (rssl("kcsl")-varsl<0) then
 myend
else
Ins_rkth = "INSERT INTO dbo.tab_rukuth (ID, spid, spname, jc, cd, gg, bz, dw, dj, sl,"&_
" je, gysname, thdate, czy, jsr, jsfs)  VALUES ('" + Replace(varspid, "'", "''") +_
 "','" + Replace(varid, "'", "''") + "','" +  Replace(varspname, "'", "''") + "','" +_
  Replace(varjc, "'", "''") + "','" + Replace(varcd, "'", "''") + "','" +_
  Replace(vargg, "'", "''") + "','" + Replace(varbz, "'", "''") + "','" +_
  Replace(vardw, "'", "''") + "'," + Replace(vardj, "'", "''") + "," +_
  Replace(varsl, "'", "''") + "," + Replace(varje, "'", "''") + ",'" +_
  Replace(vargysname, "'", "''") + "','" + Replace(varthdate, "'", "''") +_
   "','" + Replace(varczy, "'", "''") + "','" + Replace(varjsr, "'", "''") +_
    "','" + Replace(varjsfs, "'", "''") + "') "
conn.Execute(Ins_rkth)
Ins_thph = "INSERT INTO dbo.tab_thph_rk (thph, sl, ys, ss, ws, gysname, thdate, czy,"&_
" jsr, jsfs, whether)  VALUES ('" + Replace(varspid, "'", "''") +  "'," +_
 Replace(varsl, "'", "''") + "," + Replace(varys, "'", "''") + "," +_
 Replace(varss, "'", "''") + "," + Replace(varws, "'", "''") +  ",'" +_
 Replace(vargysname, "'", "''") + "','" + Replace(varthdate, "'", "''") + "','" +_
 Replace(varczy, "'", "''") + "','" + Replace(varjsr, "'", "''") + "','" +_
 Replace(varjsfs, "'", "''") + "','" + Replace(varwhether,"'","''") + "') "
conn.Execute(Ins_thph)
Ins_jk="INSERT INTO dbo.tab_thjz_rk (ID,thid,gysname,bcjk,ye,jkdate,czy,jsr) VALUES ('"&intno&_
"','"&varspid&"','"&vargysname&"',"&varss&","&varws&",'"&varthdate&"','"&varczy&"','"&varjsr&"')"
conn.Execute(Ins_jk)
Up_kc = "UPDATE dbo.tab_kucun  SET kcsl = kcsl-"+ Replace(varsl, "'", "''") +_
 ",dj = "+ Replace(vardj, "'", "''")+", kcje = (kcsl-" + Replace(varsl,"'","''")+_
 ")*"+Replace(vardj, "'", "''")+"  WHERE ID ='"+varid+"'"
conn.Execute(Up_kc)
end if
%>
<%
sub myend
response.Write" <div align="""+"center"""+"><p><b><font color="""+"#990000"""+_
"> 库存数量不足,退货操作将终止</font></b></p></div>"
end sub
%>
<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"> 	
<% if (rssl("kcsl")-varsl>=0) then %>		
 		<p><b><font color="990000">入库退货信息保存成功!</font></b></p>
<% end if %>		
        <p><font color="#990000"><b>单击“ <a href="./sprkth.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 + -