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

📄 sell_product_choose.asp

📁 Activity——活动管理模块 Analyse——分析模块 Client——客户管理系统模块 Email——E-mail管理模块 Fee——费用管理模块 Report——报表模块 Sel
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<!--#include file="../IsUser.asp"-->
<!--#include file="../Pub_Fun.asp"-->
<!--#include file="../scripts/check.vs"-->
<html>
<head>
<meta name="版权" content="">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>物品选择列表</title>
<link rel="STYLESHEET" href="../css.css" type="text/css">

</head>

<script language="VBScript">
sub save_onclick()

	frmMain.act.value = "save"
	frmMain.action  = "Sell_Product_choose.asp"
	frmMain.submit()
end sub
</script>
<body topmargin="0" marginheight="0" leftmargin="0" marginwidth="0" bgcolor="#ffffff">
<center>
<br>
<%
'保存选中

if request("act")="save" then

	if request("Product_sel")<>"" then
	Product_choose=split(trim(request("Product_sel")),",")

	  for i=0 to cint(UBound(Product_choose))	   
		Product_num="Num"&trim(Product_choose(i))
		Product_Price="Price"&trim(Product_choose(i))
		Product_name="name"&trim(Product_choose(i))
		if request(Product_num)="" then
			Productnum=1
		else
			Productnum=cint(request(Product_num))
		end if
		if request(Product_Price)="" then
			ProductPrice=1
		else
			ProductPrice=cdbl(request(Product_Price))
		end if
		
		ProductName=(request(Product_name))

		set rec = server.createobject("adodb.recordset")
		sql = "select * from Stock_temp where CreatorID = '" & session("Session_User") & "' and CreateDate = convert(char(10),getdate(),120) and ProductID= " & trim(Product_choose(i))
		'response.Write(sql)
		'response.End()
		rec.open sql,conn,3
		if rec.eof then
				sql = "insert Into Stock_temp (ProductID,ProductName,Productprice,Productnum,CreatorID,CreateDate,type) "
				sql=sql&"values("&trim(Product_choose(i)) & ",'"&ProductName&"'," & ProductPrice & "," & Productnum & ","& session("Session_User")  & ",convert(char(10),getdate(),120),'sell')"
		        'response.write(sql&"<p>")
				conn.execute sql
		end if

	next
		%>
		<script language="vBScript">
    		msgbox "物品增加成功!!"
			opener.childfm.action = "sell.asp"
			opener.childfm.submit()
			window.close()
		</script>
		<%
  end if
end if


''显示物品

	set rs=server.createobject("adodb.recordset")
	str="select  * from Product  order by Productid desc"
	rs.open str,conn,3
%>



<form method="POST" name="frmMain">
	<input type="Hidden" name="ID">
	<input type="Hidden" name="act">

<table  border=0 cellPadding=0 cellSpacing=1 width="650">
<tr  class=CRow>
        <td  height="30">&nbsp;&nbsp;&nbsp;选择销售物品</td>
</tr>
<tr><td >
<TABLE border=0 cellPadding=0 cellSpacing=1 width="100%">
	<tr class="CListTTL">
		<td align="CENTER" width="5%">选择</td>
		<td align="CENTER" width="20%">物品名称</td>
		<td align="CENTER" width="10%">入库单价</td>
		<td align="CENTER" width="10%">数量</td>
		<td align="CENTER"  width="30%">供应商</td>
		<td align="CENTER" >物品简介</td>
	</tr>
<%

	if not rs.eof then 

for i=1 to rs.recordcount%>
	<%if rs.eof then exit for
	NO = NO + 1
	%>
	<tr class=CRow>

		<td align="CENTER"><input type="checkbox" name="Product_sel" value=<%=rs("ProductID")%>></td>
		<td align="CENTER"><input type="Hidden" name="name<%=rs("ProductID")%>" value=<%=rs("ProductName")%>><%=rs("ProductName")%></td>
		<td align="CENTER"><input  onBlur=Num_onBlur("Price<%=rs("ProductID")%>")  type="text" class=CInput name="Price<%=rs("ProductID")%>"  size = 6 maxlength="4"></td>
		<td align="CENTER"><input  onBlur=IntNum_onBlur("num<%=rs("ProductID")%>")  type="text" class=CInput name="Num<%=rs("ProductID")%>"  size = 6 maxlength="4"></td>
		<td align="CENTER"><div align="left"><%=showclientname(rs("ProductSupplyID"))%></div></td>
		<td align="CENTER"><div align="left"><%=(rs("ProductInfo"))%></div></td>
	</tr>
	<%rs.movenext%>
	<%if rs.eof then exit for%>
<%next
  else
  	%>
	<tr class=CRow>

		<td align="CENTER" colspan="7">没有物品可供选择!请填写进货。</td>

	</tr>
	<%
end if
%>

</table>
</td></tr>

<tr  class=CRow>
<td height="20" align="center">
<br>

<br>
<input name="SaveButton" type="button" class="button_all"  value="保存" onclick="save_onclick()">
<input name="CancelButton" type="button" class="button_all"  value="取消" onclick="window.close()">

<br>
</td>
</tr>
</table>
</form>
</center>
</body>
</html>

⌨️ 快捷键说明

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