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

📄 procductmng.asp

📁 诚信商店系统源代码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@LANGUAGE="VBScript"%>
<!--#include file="../public/wxl_conn.asp"-->
<!--#include file="../public/PublicFunction.asp"-->
<%
response.expires = 0
Const PageSize=18
Page=CInt(request("Page"))
if Page<=0 then Page=1
wxl=request("wxl")
ProcID=request("ProcID")

%>
<script language="javascript">
function confirmDel(id){
if ( confirm("你确定要删除吗?")) {
  window.location.href = "<%=UrlFile%>?wxl=del&ProcID=" + id
  }
}
</script>
<%

'显示已有商品列表
if wxl="" then
  ShowLookHtml

'显示增加商品的网页
elseif wxl="ShowHtml" then
  dim sql11(40)
  ShowData sql11

'增加商品
elseif wxl="Add" then
  A1=trim(request("A1"))
  A2=trim(request("A2"))
  A3=trim(request("A3"))
  A4=trim(request("A4"))
  A5=trim(request("A5"))
  A6=trim(request("A6"))
  A7=trim(request("A7"))
  A8=trim(request("A8"))
  A9=trim(request("A9"))
  A10=trim(request("A10"))
  A11=trim(request("A11"))
  A12=trim(request("A12"))
  A13=trim(request("A13"))
  A14=trim(request("A14"))
  if A14="" then A14=0
  A15=trim(request("A15"))
  A16=trim(request("A16"))
  A17=trim(request("A17"))
  A18=trim(request("A18"))
  if A15="" then A15=16
  if A17="" then A17=A16
  if A18="" then A18=A16
  A19=trim(request("A19"))
  A20=trim(request("A20"))
  A21=trim(request("A21"))
  A22=request("yy")&"-"&request("mm")&"-"&request("dd")
  A23=trim(request("A23"))
  A24=trim(request("A24"))
  A25=trim(request("A25"))
  A26=trim(request("A26"))
  if A26="" then A26=0
  A30=trim(request("A30"))
  A32=trim(request("A32"))
  A33=trim(request("A33"))
  if A32="" then A32=0
  set sql=Server.Createobject("ADODB.Recordset")
  sql.open "select * from web_ProKind where str_pKindPID like '"&A1&"%'",conn,1,1
  if sql.RecordCount>0 then Back("你选择的分类不是未级,只能选择未级分类!")
  sql.close
  if ProcID<>"" then
   sql.open "select * from web_ProcLib where ProcID="&ProcID,conn,3,2
  else
   ProcID=GetID("select Max(ProcID)+1 from web_ProcLib")
   sql.open "select * from web_ProcLib where ProcID="&ProcID,conn,3,2
   sql.AddNew
   sql("ProcID")=ProcID
   sql("A27")=0
   sql("A28")=now
   sql("A29")=UserInfo("int_sOleUserID")
  end if
  sql("A1")=A1
  sql("A2")=A2
  sql("A3")=A3
  sql("A4")=A4
  sql("A5")=A5
  sql("A6")=A6
  sql("A7")=A7
  sql("A8")=A8
  sql("A9")=A9
  sql("A10")=A10
  sql("A11")=A11
  sql("A12")=A12
  sql("A13")=A13
  sql("A14")=A14
  sql("A15")=A15
  sql("A16")=A16
  sql("A17")=A17
  sql("A18")=A18
  sql("A19")=A19
  sql("A20")=A20
  sql("A21")=A21
  sql("A22")=A22
  sql("A23")=A23
  sql("A24")=A24
  sql("A25")=A25
  sql("A26")=A26
  sql("A30")=A30
  sql("A32")=A32
  sql("A33")=A33
  sql.update
  sql.close
%>
<script language='javascript'>
  alert('商品成功增加!');
  window.location.href = "<%=UrlFile&"?MenuId="&MenuId%>";
</script>
<%

'查看商品
elseif wxl="Look" then
	ShowContent()

'修改商品
elseif wxl="Modi" then
  Query="select * from web_ProcLib where ProcID="&ProcID
  set sql=conn.Execute(Query)
  ShowData sql

'删除商品
elseif wxl="del" then
  Query="delete from  web_ProcLib  where ProcID="&ProcID
  conn.Execute(Query)
%>
<script language='javascript'>
  alert('指定商品成功删除');
  window.location.href = "<%=UrlFile&"?MenuId="&MenuId%>";
</script>
<%
end if

sub ShowData(sql)
 HtmlHead("商品管理")
%>
<SCRIPT language=JavaScript>
  <!--
  function checkvalue() {
    aa=document.form1
    if (aa.A1.value=="") {
        window.alert ("请选择类别!"); aa.A1.focus();return false}
    if (aa.A5.value=="") {
        window.alert ("请输入商品名称描述!"); aa.A5.focus();return false}
    if (aa.A8.value=="") {
        window.alert ("请输入功能说明!"); aa.A8.focus();return false}
    if (aa.A16.value=="") {
        window.alert ("请输入价格!"); aa.A16.focus();return false}
   	if ( isNaN(aa.A16.value)){
    	window.alert ("价格必须为数字!");aa.A16.focus();return false;}
    if (aa.A26.value!="") {
		if ( isNaN(aa.A26.value)){
			window.alert ("价格相近差价必须为数字!");aa.A26.focus();return false;}}
    if (aa.A15.value!="") {
		if ( isNaN(aa.A15.value)){
			window.alert ("原价必须为数字!");aa.A15.focus();return false;}}
    if (aa.A17.value!="") {
		if ( isNaN(aa.A17.value)){
			window.alert ("促销价必须为数字!");aa.A17.focus();return false;}}
    if (aa.A18.value!="") {
		if ( isNaN(aa.A18.value)){
			window.alert ("进价必须为数字!");aa.A18.focus();return false;}}

		
     }

function UpFile()
{

	var html = wxlShowDlg("upload.asp", window, 400, 150);
	if (html) form1.A23.value=html;
}

function UpFile1()
{

	var html = wxlShowDlg("upload.asp", window, 400, 150);
	if (html) form1.A33.value=html;
}
//-->
</SCRIPT>
<table border="1" width="650" cellpadding="3" cellspacing="0" bgcolor="#D6D3CE" bordercolordark="#FFFFFF" bordercolorlight="#808080" align="center" >
<form name=form1 action="<%=UrlFile%>" method="POST" onSubmit='return checkvalue();'>
<tr>                                                                                                      
    <td width="80" align="right">商品分类:</td>
    <td  align="left">
	<select name='A1' id="A1"><option value="">选择商品分类</option>
<%
set tmpSql=conn.execute("select * from web_ProKind order by str_pKindID")
while not tmpSql.eof
	response.write "<option value='"&tmpSql(0)&"'>"
	for i=1 to len(tmpSql(0))
		response.write "&nbsp;"
	next
	response.write tmpSql("str_pKindName")&"</option>"
	tmpSql.movenext
wend
%>	
	</select>
    </td>
    <td width="80" align="right">品牌名:</td>
    <td  align="left"><input name="A2" size="28" value='<%=sql(2)%>' maxlength=50></td>
</tr> 
<tr>                                                                                                      
    <td width="80"  align="right">品牌类别:</td>
    <td   align="left"><input type="text" size="28" name="A3" size="28" value='<%=sql(3)%>' maxlength=50></td>
    <td width="80"  align="right">规格、型号:</td>
    <td   align="left"><input type="text" name="A4" size="28" value='<%=sql(4)%>' maxlength=50></td>                                                                                        
</tr>
<tr>                                                                                                      
    <td width="80"  align="right">商品名称描述:</td>
    <td align="left"><input type='text' size="28" name='A5' value='<%=sql(5)%>' maxlength=50><font color=red>*</font></td>
    <td width="80"  align="right">推荐等级:</td>
    <td align="left">
		<select  name='A30'><option value='1'>★</option><option value='2'>★★</option><option value='3'>★★★</option><option value='4'>★★★★</option><option value='5'>★★★★★</option></select><input type='checkbox' name='A32' value='1'>今日特价
	</td>
</tr>
<tr>
    <td width="80"  align="right">商品特性:</td>
    <td  align="left"><TEXTAREA NAME="A6" ROWS="4" COLS="30"><%=sql(6)%></TEXTAREA></td>
    <td width="80"  align="right">商品技术指标:</td>
	<td   align="left"><TEXTAREA NAME="A7" ROWS="4" COLS="30"><%=sql(7)%></TEXTAREA></td>

</tr> 
<tr>                                                                                                      

    <td width="80"  align="right">功能说明:</td>
    <td   align="left"><TEXTAREA NAME="A8" ROWS="4" COLS="30"><%=sql(8)%></TEXTAREA><font color=red>*</font></td>
    <td width="80"  align="right">卖点推荐:</td>
	<td   align="left"><TEXTAREA NAME="A9" ROWS="4" COLS="30"><%=sql(9)%></TEXTAREA></td>
</tr> 
<tr>                                                                                                      
    <td width="80"  align="right">产地:</td>
    <td align="left"><input name="A10" size="28" value='<%=sql(10)%>' maxlength=50></td>
    <td width="80"  align="right">包装数:</td>
    <td   align="left"><input type='text' size="28" name='A11' value='<%=sql(11)%>' maxlength=10></td>

</tr> 
<tr>                                                                                                      
    <td width="80"  align="right">包装尺寸:</td>
    <td   align="left"><input name="A12" size="28" value='<%=sql(12)%>' maxlength=100></td>
    <td width="80"  align="right">包装重量:</td>
    <td   align="left"><input type='text' size="28" name='A13' value='<%=sql(13)%>' maxlength=10></td>

</tr> 
<tr>                                                                                                      
    <td width="80"  align="right">原价:</td>
    <td   align="left"><input type='text' size="28" name='A15' value='<%=sql(15)%>' maxlength=10>元</td>
    <td width="80"  align="right">价格:</td>
    <td   align="left"><input name="A16" size="15" value='<%=sql(16)%>' maxlength=100>元<font color=red>*</font><input type='checkbox' name='A14' value='1' <%if sql(14)=1 then response.write " checked"%>>免运费</td>
</tr> 
<tr>                                                                                                      
    <td width="80"  align="right">促销价格:</td>
    <td   align="left"><input type='text' size="28" name='A17' value='<%=sql(17)%>' maxlength=10>元</td>
    <td width="80"  align="right">进货价:</td>
    <td   align="left"><input name="A18" size="28" value='<%=sql(18)%>' maxlength=100></td>
</tr> 

⌨️ 快捷键说明

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