📄 pdt_upd.asp
字号:
<!-- #include file="../inc_config.asp" -->
<!-- #include file="LoginCk.asp" -->
<%
Call PopCheck(15)
Set PdtData = Conn.Query("EfangPdt","Pdt_Sign='" & Sign & "'")
if PdtData.BOF or PdtData.EOF then ShowErMsg("商品不存在!")
If Cmd="Upd" then
Pdt_State = Request("Pdt_State")
Pdt_Name = Request("Pdt_Name")
Pdt_Sort = Request("Pdt_Sort")
Pdt_LNum = Request("Pdt_LNum")
Pdt_CBen = Request("Pdt_CBen")
If IsNumeric(Pdt_CBen) = False Then Pdt_CBen = 0
Pdt_PUnit = Request("Pdt_PUnit")
Pdt_Desc = Request("Pdt_Desc")
If IsNumeric(Pdt_Desc) = False Then Pdt_Desc = 99
Pdt_Level1 = Request("Pdt_Level1")
If IsNumeric(Pdt_Level1) = False And Len(Pdt_Level1)>0 Then Pdt_Level1 = 0
Pdt_Level2 = Request("Pdt_Level2")
If IsNumeric(Pdt_Level2) = False And Len(Pdt_Level2)>0 Then Pdt_Level2 = 0
Pdt_Level3 = Request("Pdt_Level3")
If IsNumeric(Pdt_Level3) = False And Len(Pdt_Level3)>0 Then Pdt_Level3 = 0
Pdt_Level4 = Request("Pdt_Level4")
If IsNumeric(Pdt_Level4) = False And Len(Pdt_Level4)>0 Then Pdt_Level4 = 0
Pdt_Level5 = Request("Pdt_Level5")
If IsNumeric(Pdt_Level5) = False And Len(Pdt_Level5)>0 Then Pdt_Level5 = 0
Pdt_Level6 = Request("Pdt_Level6")
If IsNumeric(Pdt_Level6) = False And Len(Pdt_Level6)>0 Then Pdt_Level6 = 0
Pdt_Level7 = Request("Pdt_Level7")
If IsNumeric(Pdt_Level7) = False And Len(Pdt_Level7)>0 Then Pdt_Level7 = 0
Pdt_Level8 = Request("Pdt_Level8")
If IsNumeric(Pdt_Level8) = False And Len(Pdt_Level8)>0 Then Pdt_Level8 = 0
Pdt_Level9 = Request("Pdt_Level9 ")
If IsNumeric(Pdt_Level9) = False And Len(Pdt_Level9)>0 Then Pdt_Level9 = 0
If Len(Request("SongA"))>0 Then Pdt_Song = Pdt_Song & Request("SongA") & "="
If Len(Request("SongB"))>0 Then Pdt_Song = Pdt_Song & Request("SongB") & "="
If Len(Request("SongC"))>0 Then Pdt_Song = Pdt_Song & Request("SongC") & "="
If Len(Request("SongD"))>0 Then Pdt_Song = Pdt_Song & Request("SongD") & "="
Pdt_DSuff = Request("Pdt_DSuff")
Pdt_MaxDisk = Request("Pdt_MaxDisk")
If IsNumeric(Pdt_MaxDisk)=False Then Pdt_MaxDisk=0
Pdt_MaxNum = Request("Pdt_MaxNum")
If IsNumeric(Pdt_MaxNum)=False Then Pdt_MaxNum=0
Pdt_KPick = Request("Pdt_KPick")
If Len(Pdt_KPick)=0 Then Pdt_KPick=False
Pdt_KSvr = Request("Pdt_KSvr")
If Len(Pdt_KSvr)=0 Then Pdt_KSvr=0
Pdt_KStyle = Request("Pdt_KStyle")
Pdt_TPick = Request("Pdt_TPick")
If Len(Pdt_KPick)=0 Then Pdt_KPick=False
Pdt_TIP = Request("Pdt_TIP")
Pdt_TUser = Request("Pdt_TUser")
Pdt_TPass = Request("Pdt_TPass")
Pdt_TSign = Request("Pdt_TSign")
Pdt_Intro1 = Request("Pdt_Intro1")
Pdt_Intro2 = Request("Pdt_Intro2")
Pdt_Notice = Request("Pdt_Notice")
Pdt_Memo = Request("Pdt_Memo")
EfsValue= "Pdt_State=" & Pdt_State & ","
EfsValue=EfsValue & "Pdt_Name='" & Pdt_Name & "',"
EfsValue=EfsValue & "Pdt_Sort='" & Pdt_Sort & "',"
EfsValue=EfsValue & "Pdt_CBen=" & Pdt_CBen & ","
EfsValue=EfsValue & "Pdt_PUnit='" & Pdt_PUnit & "',"
EfsValue=EfsValue & "Pdt_LNum='" & Pdt_LNum & "',"
EfsValue=EfsValue & "Pdt_Desc=" & Pdt_Desc & ","
If Len(Pdt_Level1)>0 Then EfsValue=EfsValue & "Pdt_Level1=" & Pdt_Level1 & ","
If Len(Pdt_Level2)>0 Then EfsValue=EfsValue & "Pdt_Level2=" & Pdt_Level2 & ","
If Len(Pdt_Level3)>0 Then EfsValue=EfsValue & "Pdt_Level3=" & Pdt_Level3 & ","
If Len(Pdt_Level4)>0 Then EfsValue=EfsValue & "Pdt_Level4=" & Pdt_Level4 & ","
If Len(Pdt_Level5)>0 Then EfsValue=EfsValue & "Pdt_Level5=" & Pdt_Level5 & ","
If Len(Pdt_Level6)>0 Then EfsValue=EfsValue & "Pdt_Level6=" & Pdt_Level6 & ","
If Len(Pdt_Level7)>0 Then EfsValue=EfsValue & "Pdt_Level7=" & Pdt_Level7 & ","
If Len(Pdt_Level8)>0 Then EfsValue=EfsValue & "Pdt_Level8=" & Pdt_Level8 & ","
If Len(Pdt_Level9)>0 Then EfsValue=EfsValue & "Pdt_Level9=" & Pdt_Level9 & ","
EfsValue=EfsValue & "Pdt_DSuff='" & Pdt_DSuff & "',"
EfsValue=EfsValue & "Pdt_MaxDisk=" & Pdt_MaxDisk & ","
EfsValue=EfsValue & "Pdt_MaxNum=" & Pdt_MaxNum & ","
EfsValue=EfsValue & "Pdt_Song='" & Pdt_Song & "',"
EfsValue=EfsValue & "Pdt_KPick=" & Pdt_KPick & ","
EfsValue=EfsValue & "Pdt_KSvr=" & Pdt_KSvr & ","
EfsValue=EfsValue & "Pdt_KStyle='" & Pdt_KStyle & "',"
EfsValue=EfsValue & "Pdt_TPick=" & Pdt_TPick & ","
EfsValue=EfsValue & "Pdt_TIP='" & Pdt_TIP & "',"
EfsValue=EfsValue & "Pdt_TUser='" & Pdt_TUser & "',"
EfsValue=EfsValue & "Pdt_TPass='" & Pdt_TPass & "',"
EfsValue=EfsValue & "Pdt_TSign='" & Pdt_TSign & "',"
EfsValue=EfsValue & "Pdt_Intro1='" & Pdt_Intro1 & "',"
EfsValue=EfsValue & "Pdt_Intro2='" & Pdt_Intro2 & "',"
EfsValue=EfsValue & "Pdt_Notice='" & Pdt_Notice & "',"
EfsValue=EfsValue & "Pdt_Memo='" & Pdt_Memo&"'"
call Conn.Update("EfangPdt",EfsValue,"Pdt_Sign='" & Sign & "'")
Call ShowErMsgGo("修改成功!","?Sign=" & Sign)
Elseif Cmd = "Del" then
If Conn.Num("EfangYeWu","YeWu_PSign='"& Sign &"'") > 0 Then ShowErMsg("请先删除此商品相关的所有业务!")
call Conn.Delete("EfangPdt","Pdt_Sign='" & Sign & "'")
WriteLog "删除商品 - " & Sign
Call ShowErMsgGo("商品 " & Sign & " 已经成功删除!","Pdt_List.asp")
End if
%>
<html>
<head>
<title>商品修改</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link id="style_sheet" href="css/save.css" type="text/css" rel="stylesheet">
<script language="JavaScript">style_sheet.href = parent.parent.style_sheet.href;</script>
<%=Efs_Cfg_PHeader%>
<style type="text/css">
<!--
.unnamed1 {
color: #FF0000;
font-weight: bold;
}
.style1 {color: #FF0000}
-->
</style>
</head>
<script language="JavaScript" src="js/common_Efang.js"></script>
<body class="NormalPage">
<form id="form_help" action="help_content.asp" method="get" target="working_area">
<input name="help_topic" type="hidden" value="商品列表">
</form>
<form action="?Cmd=Upd" method="POST" name="EForm" id="EForm">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="headerToolBar" valign="middle" nowrap style="width:100%; height:22px;"><table cellpadding="0" cellspacing="0" class="HeaderPageControl">
<tr>
<td align="left" valign="middle" nowrap height="20">系统设置>> 商品管理 >> <b></b><b></b><b>商品列表</b></td>
<td align="center" valign="middle" nowrap width="10" height="20"></td>
<td align="right" valign="middle" width="100%" nowrap height="20"></td>
<td align="center" valign="middle" nowrap width="10" height="20"></td>
<td align="right" valign="middle" width="60" nowrap height="20"><img id="id_back" alt="返回上一页" onclick="JavaScript:history.back()" onmouseover="JavaScript:this.src=imgBackUp.src" onmouseout="JavaScript:this.src=imgBackDown.src" src="images/toolbar_back.gif" border="0" style="cursor:hand;width:22px; height:20px;"><img id="id_refresh" alt="刷新" onclick="JavaScript:fn_Refresh()" onmouseover="JavaScript:this.src=imgRefreshUp.src" onmouseout="JavaScript:this.src=imgRefreshDown.src" src="images/toolbar_refresh.gif" border="0" style="cursor:hand;width:22px; height:20px;"></td>
<td align="right" valign="middle" width="25" nowrap height="20"><img id="id_locate" alt="帮助" onclick="JavaScript:fn_ShowHelp()" onmouseover="JavaScript:this.src=imgHelpUp.src" onmouseout="JavaScript:this.src=imgHelpDown.src" src="images/toolbar_help.gif" border="0" style="cursor:hand;width:22px; height:20px;"></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top">
<div id="viewPanel" style="visibility:visible; position:absolute; overflow:auto;">
<br>
<table width="85%" height="300" border="0" align="center" cellpadding="0" cellspacing="0" class="datalist">
<tr>
<td class="DataGroup" valign="middle">
<table width="100%" border="0" align="center" cellPadding="0" cellSpacing="0" class="datalist">
<tr>
<td align=left width="251"><span class="10pt"><b>商品修改 </b></span></td>
<td align=left width="41"><font color="#FFFFFF"> </font></td>
<td align=right width="63"><a href="sendinfo.php?number=<?echo $yewu[number]?>" target="_blank"></a></td>
<td align=right width="92"><a href="Pdt_Upd_Pri.asp?Sign=<%=Sign%>" class="CommonFace">单独定价列表</a>
</td>
</tr>
<tr>
<td colspan="4" height="23"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr>
<td width="96" height="29" align="right">
商品编号:</td>
<td width="190"> <%=Sign%> <span class="10pt">
<input name="Sign" type="hidden" id="User3" value="<%=Sign%>">
</span> </td>
<td width="88" align="right">状态:</td>
<td width="187"><select name="Pdt_State" size="1" id="Pdt_State">
<option value="1">上 架1</option>
<option value="2">下 架2</option>
</select> <script language="JavaScript">
EForm.Pdt_State.value = "<%=PdtData("Pdt_State")%>";
</script> </td>
</tr>
<tr>
<td height="29" align="right">商品名称:</td>
<td ><input name="Pdt_Name" type="text" class="InputOne" id="Pdt_Name3" value="<%=PdtData("Pdt_Name")%>" size="18"onblur="CkName();" >
<script language="JavaScript">
function CkName(){
if(EForm.Pdt_Name.value==""){
alert("请填写商品名称!");
EForm.Pdt_Name.focus();
return false;
}
}
</script></td>
<td align="right">商品类目:</td>
<td ><span class="10pt">
<%
Set LData = Conn.Query("EfangPdtSort","Order By PSort_ID")
Do while not (LData.EOF or LData.BOF)
SortList = SortList & "<option value=" & LData("PSort_Sign") & ">" & LData("PSort_Name") & "</option>"
LData.movenext
Loop
Set LData=Nothing
%>
<select name="Pdt_Sort" size="1" id="User_WUSer_Pick" style="width: 79px">
<option value="">未选择</option>
<%=SortList%>
</select>
<script language="JavaScript">
<!--
EForm.Pdt_Sort.value = "<%=PdtData("Pdt_Sort")%>";
-->
</script>
</span> </td>
</tr>
<tr>
<td height="30" align="right">计价单位:</td>
<td ><input name="Pdt_PUnit" type="text" class="InputOne" id="Pdt_PUnit" value="<%=PdtData("Pdt_PUnit")%>" size="18"></td>
<td align="right">最低购买数量:</td>
<td ><select name="Pdt_LNum" id="select">
<%for i=1 to 50%>
<option value="<%=i%>"><%=i%></option>
<%next%>
</select> <span class="10pt">
<script language="JavaScript">
<!--
EForm.Pdt_LNum.value = "<%=PdtData("Pdt_LNum")%>";
-->
</script>
</span> </td>
</tr>
<tr bordercolor="#006699" bordercolordark="#FFFFFF" >
<td height=29 align=right>排序:</td>
<td height=28><input name="Pdt_Desc" type="text" class="InputOne" id="Pdt_Desc" value="<%=PdtData("Pdt_Desc")%>" size="8"></td>
<td height=28 align="right"> </td>
<td height=28> </td>
</tr>
<tr bordercolor="#006699" bordercolordark="#FFFFFF" >
<td height=29 align=right> <%
Set TmData = Conn.Query("EfangLevel","Level_Sign='Level1'","Level_Name")
Response.Write TmData("Level_Name") & ":"
%> </td>
<td height=28> <input name="Pdt_Level1" type="text" class="InputOne" id="Pdt_Level1" value="<%=PdtData("Pdt_Level1")%>" size="10">
元
<%Set TmData = Nothing%></td>
<td height=28 align="right">成本价:</td>
<td height=28><input name="Pdt_CBen" type="text" class="InputOne" id="Pdt_CBen3" value="<%=PdtData("Pdt_CBen")%>" size="10">
元 </td>
</tr>
<%
Set TmData = Conn.Query("EfangLevel","Level_Sign='Level2'")
If TmData("Level_Enable") = True Then
%>
<tr>
<td height="29" align="right"> <%=TmData("Level_Name")& ":"%> </td>
<td colspan="3"><input name="Pdt_Level2" type="text" class="InputOne" value="<%=PdtData("Pdt_Level2")%>" size="10">
元
<%Set TmData = Nothing%> </td>
</tr>
<%End If%>
<%
Set TmData = Conn.Query("EfangLevel","Level_Sign='Level3'")
If TmData("Level_Enable") = True Then
%>
<tr>
<td height="29" align="right"> <%=TmData("Level_Name")& ":"%> </td>
<td colspan="3"><input name="Pdt_Level3" type="text" class="InputOne" value="<%=PdtData("Pdt_Level3")%>" size="10">
元
<%Set TmData = Nothing%> </td>
</tr>
<%End If%>
<%
Set TmData = Conn.Query("EfangLevel","Level_Sign='Level4'")
If TmData("Level_Enable") = True Then
%>
<tr>
<td height="29" align="right"> <%=TmData("Level_Name")& ":"%> </td>
<td colspan="3"><input name="Pdt_Level4" type="text" class="InputOne" value="<%=PdtData("Pdt_Level4")%>" size="10">
元
<%Set TmData = Nothing%> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -