📄 admin_shopbook.asp
字号:
<%
Option Explicit
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
%>
<!--#Include File="../Conn.asp"-->
<!--#Include File="Admin_CheckPurview.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href='Admin_Style.css' type='text/css' rel='stylesheet'>
<title>商品兑换管理</title>
<script language="javascript" src="../js/Common.js"></script>
<script language="javascript" src="../js/InstallDir.js"></script>
<script language="javascript" src="../Js/Ajax.js"></script>
</head>
<body>
<%
If EL_Admin.Purview <> 1 Then
If EL_Admin.CheckAdminPurview(17, 3) = False And EL_Admin.CheckAdminPurview(22, 3) = False Then
EL_Admin.ShowPurviewError("对不起!您没有足够的管理权限")
End If
End If
Dim CurrentPath, Search_Keywords, Search_Field
Dim ArrSendStatus(5), ArrBookStatus(5), BookStatus, SendStatus, SearchType, ManageType
ArrSendStatus(0) = "<span class=redtext>未发货</span>"
ArrSendStatus(1) = "<span class=bluetext>发货中</span>"
ArrSendStatus(2) = "<span class=greentext>已发货</span>"
ArrSendStatus(3) = "<span class=graytext>客户取消</span>"
ArrBookStatus(0) = "<span class=redtext>未确认</span>"
ArrBookStatus(1) = "<span class=bluetext>已确认</span>"
ArrBookStatus(2) = "<span class=greentext>已结清</span>"
ArrBookStatus(3) = "<span class=graytext>客户取消</span>"
Search_Keywords = EL_Common.ReplaceBadChar(EL_Common.ELRequest("Search_Keywords", 1))
Search_Field = EL_Common.ReplaceBadChar(EL_Common.ELRequest("Search_Field", 1))
BookStatus = EL_Common.ELRequest("BookStatus", 1)
SendStatus = EL_Common.ELRequest("SendStatus", 1)
SearchType = EL_Common.ELRequest("SearchType", 2)
ManageType = EL_Common.ELRequest("ManageType", 1)
If BookStatus = "" Then
BookStatus = -1
Else
BookStatus = EL_Common.ELClng(BookStatus)
End If
If SendStatus = "" Then
SendStatus = -1
Else
SendStatus = EL_Common.ELClng(SendStatus)
End If
CurrentPath = "·您现在的位置:<a href='"& EL_CurrentScriptName &"'>商城订单管理</a> "
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td align="center" class="top_25"><strong>商品兑换管理</strong></td>
</tr>
<tr>
<td class="td_50">管理导航:<a href="Admin_ShopBook.asp">商品兑换管理</a> | <a href="Admin_ShopBook.asp?SearchType=1">今日订单</a> | <a href="Admin_ShopBook.asp?SearchType=2">一周内订单</a> | <a href="Admin_ShopBook.asp?SearchType=3">半个月内订单</a> | <a href="Admin_ShopBook.asp?SearchType=4">一个月内订单</a> | <a href="Admin_ShopBook.asp?ManageType=Recycled">订单回收站</a></td>
</tr>
<tr>
<td class="item_25">
<div class="leftdiv">
<input name="BookStatus" type="radio" class="nomargin" value="-1" <%=EL_Common.SetObjectChecked(-1, BookStatus)%> onClick="location.href='<%=EL_CurrentScriptName%>?ManageType=<%=ManageType%>&SearchType=<%=SearchType%>&SendStatus=<%=SendStatus%>&BookStatus=-1'"> 所有订单
<input name="BookStatus" type="radio" class="nomargin" value="0" <%=EL_Common.SetObjectChecked(0, BookStatus)%> onClick="location.href='<%=EL_CurrentScriptName%>?ManageType=<%=ManageType%>&SearchType=<%=SearchType%>&SendStatus=<%=SendStatus%>&BookStatus=0'"> 未确认订单
<input name="BookStatus" type="radio" class="nomargin" value="1" <%=EL_Common.SetObjectChecked(1, BookStatus)%> onClick="location.href='<%=EL_CurrentScriptName%>?ManageType=<%=ManageType%>&SearchType=<%=SearchType%>&SendStatus=<%=SendStatus%>&BookStatus=1'"> 已确认订单
<input name="BookStatus" type="radio" class="nomargin" value="2" <%=EL_Common.SetObjectChecked(2, BookStatus)%> onClick="location.href='<%=EL_CurrentScriptName%>?ManageType=<%=ManageType%>&SearchType=<%=SearchType%>&SendStatus=<%=SendStatus%>&BookStatus=2'"> 已结清订单
</div>
<div class="leftdiv" style="padding-left:10px;">
<select name="SendStatus" id="SendStatus" onChange="location.href='<%=EL_CurrentScriptName%>?ManageType=<%=ManageType%>&SearchType=<%=SearchType%>&BookStatus=<%=BookStatus%>&SendStatus='+this.value">
<option value="-1" <%=EL_Common.SetObjectSelected(-1, SendStatus)%>>所有物流状态</option>
<option value="0" <%=EL_Common.SetObjectSelected(0, SendStatus)%>>未发货</option>
<option value="1" <%=EL_Common.SetObjectSelected(1, SendStatus)%>>发货中</option>
<option value="2" <%=EL_Common.SetObjectSelected(2, SendStatus)%>>已发货</option>
</select>
</div>
<div class="leftdiv" style="padding-left:10px; padding-top:4px; font-weight:bold">订单搜索:</div>
<div class="leftdiv">
<form name="SearchForm" action="Admin_ShopBook.asp" method="get">
<select name="Search_Field" id="Search_Field">
<option value="BookNumber">订单号</option>
<option value="Username" selected="selected">会员名</option>
<option value="TrueName">客户名</option>
<option value="SightName">商品名称</option>
<option value="ContactUserName">收货人名</option>
<option value="Mobile">联系人手机</option>
<option value="Phone">联系人电话</option>
<option value="Email">电子邮件</option>
<option value="ZipCode">邮政编码</option>
<option value="Address">邮寄地址</option>
<option value="Demand">特殊要求</option>
<option value="BookDateTime">订单时间</option>
</select>
<input name="Search_Keywords" type="text" id="Search_Keywords" size="15">
<input type="submit" name="Submit" value="搜索">
</form>
</div>
</td>
</tr>
</table>
<br>
<%
Select Case Action
Case "": Call ManageBook()
Case "Show": Call ShowBook()
Case "Print": Call PrintBook()
Case "SaveModify": Call SaveMofiyBook(0)
Case "SetBookStatus": Call SaveMofiyBook(1)
Case "SetSendStatus": Call SaveMofiyBook(7)
Case "Delete": Call SaveMofiyBook(2)
Case "Restore": Call SaveMofiyBook(3)
Case "RestoreAll": Call SaveMofiyBook(4)
Case "DeleteTrue": Call SaveMofiyBook(5)
Case "DeleteTrueAll": Call SaveMofiyBook(6)
End Select
Call EL_Common.Bottom()
Call ApplicationTerminate()
Sub SaveMofiyBook(SetType)
On Error Resume Next
Dim BookCmd
Dim ArrBookID, BookID, SetBookStatus, SetSendStatus, Remark
BookID = EL_Common.ELRequest("BookID", 2)
ArrBookID = EL_Common.ELRequest("CheckObject", 1)
SetBookStatus = EL_Common.ELRequest("SetBookStatus", 2)
SetSendStatus = EL_Common.ELRequest("SetSendStatus", 2)
Remark = EL_Common.ELRequest("Remark", 1)
ArrBookID = EL_Common.Join2String(ArrBookID, BookID, ",")
Call EL_Common.InitCommand(BookCmd, "EL_SP_ModifyShopBook")
With BookCmd
.Parameters.Append .CreateParameter("RETURN", 2, 4)
.Parameters.Append .CreateParameter("@SetType", 3, 1, 4, SetType)
.Parameters.Append .CreateParameter("@ArrBookID", 200, 1, 500, ArrBookID)
.Parameters.Append .CreateParameter("@ContactUserName", 200, 1, 50, "")
.Parameters.Append .CreateParameter("@Mobile", 200, 1, 50, "")
.Parameters.Append .CreateParameter("@Phone", 200, 1, 50, "")
.Parameters.Append .CreateParameter("@Fax", 200, 1, 50, "")
.Parameters.Append .CreateParameter("@Email", 200, 1, 100, "")
.Parameters.Append .CreateParameter("@ZipCode", 200, 1, 10, "")
.Parameters.Append .CreateParameter("@Address", 200, 1, 255, "")
.Parameters.Append .CreateParameter("@BookStatus", 3, 1, 4, SetBookStatus)
.Parameters.Append .CreateParameter("@SendStatus", 3, 1, 4, SetSendStatus)
.Parameters.Append .CreateParameter("@Remark", 200, 1, 1000, Remark)
.Parameters.Append .CreateParameter("@Editor", 200, 1, 50, EL_Admin.AdminName)
.Execute()
End With
Select Case BookCmd(0)
Case 40:
EL_Common.ShowErrorMsg("由于库存量不足,订单不能被确认")
Set BookCmd = Nothing
Exit Sub
Case 41:
EL_Common.ShowErrorMsg("由于会员"& PointItemName &"不足,订单不能被确认")
Set BookCmd = Nothing
Exit Sub
Case 42:
EL_Common.ShowErrorMsg("由于库存量不足,不能发货")
Set BookCmd = Nothing
Exit Sub
Case 43:
EL_Common.ShowErrorMsg("由于会员"& PointItemName &"不足,不能发货")
Set BookCmd = Nothing
Exit Sub
End Select
Set BookCmd = Nothing
EL_Common.ShowScriptError()
Select Case SetType
Case 0:
Call EL_Common.InsertLog(3, ComeURL, "修改商品订单", EL_Admin.AdminName)
EL_Common.ShowSuccessMsg("订单修改成功")
Case 1:
If SetBookStatus = 1 Then
Call EL_Common.InsertLog(3, ComeURL, "确认商品订单", EL_Admin.AdminName)
EL_Common.ShowSuccessMsg("订单确认成功")
ElseIf SetBookStatus = 2 Then
Call EL_Common.InsertLog(3, ComeURL, "结清商品订单", EL_Admin.AdminName)
EL_Common.ShowSuccessMsg("成功结清订单")
End If
Case 2:
Call EL_Common.InsertLog(3, ComeURL, "删除商品订单", EL_Admin.AdminName)
EL_Common.ShowSuccessMsg("成功删除订单")
Case 3:
Call EL_Common.InsertLog(3, ComeURL, "还原商品订单", EL_Admin.AdminName)
EL_Common.ShowSuccessMsg("成功还原订单")
Case 4:
Call EL_Common.InsertLog(3, ComeURL, "还原所有商品订单", EL_Admin.AdminName)
EL_Common.ShowSuccessMsg("成功还原所有订单")
Case 5:
Call EL_Common.InsertLog(3, ComeURL, "彻底删除商品订单", EL_Admin.AdminName)
EL_Common.ShowSuccessMsg("订单已被彻底删除")
Case 6:
Call EL_Common.InsertLog(3, ComeURL, "清空商品订单回收站", EL_Admin.AdminName)
EL_Common.ShowSuccessMsg("回收站已清空")
Case 7:
If SetSendStatus = 1 Then
Call EL_Common.InsertLog(3, ComeURL, "商品订单发货", EL_Admin.AdminName)
EL_Common.ShowSuccessMsg("订单正在发货中……")
ElseIf SetSendStatus = 2 Then
Call EL_Common.InsertLog(3, ComeURL, "确认客户已收货", EL_Admin.AdminName)
EL_Common.ShowSuccessMsg("客户已成功收到货,请核对后结清此订单")
End If
End Select
End Sub
Sub ShowBook()
On Error Resume Next
Dim BookCmd, rsBook, i
Dim BookID, BookPriceInfo
BookID = EL_Common.ELRequest("BookID", 2)
Call EL_Common.InitCommand(BookCmd, "EL_SP_GetShopBook")
With BookCmd
.Parameters.Append .CreateParameter("RETURN", 2, 4)
.Parameters.Append .CreateParameter("@BookID", 3, 1, 4, BookID)
Set rsBook = .Execute()
End With
rsBook.Close()
If BookCmd(0) <> 1 Then
EL_Common.ShowErrorMsg("指定订单不存在")
Set rsBook = Nothing
Set BookCmd = Nothing
Exit Sub
End If
rsBook.Open()
CurrentPath = CurrentPath &" >> 查看订单"
%>
<script language="javascript">
/*function setDocumentDisabled(type){
var e = getObject("dd");
if(type==1){
e.style.width = '100%';
e.style.height = document.body.scrollHeight;
e.style.top=0;
e.style.left=0;
e.style.display = '';
document.body.onresize = function(){
e.style.width='100%';
e.style.height = document.body.scrollHeight;
}
}else{
if(e){
e.style.width = '0px';
e.style.height = '0px';
e.style.display = 'none';
}
}
}
function showDialog(type, s){
setDocumentDisabled(type);
var e = getObject("Dialog");
if(type==1){
e.style.left = (document.body.clientWidth-parseInt(e.style.width)) / 2 + 'px';
e.style.top = (document.body.clientHeight-parseInt(e.style.height)) / 2 + 'px';
e.style.display = '';
getObject("Mess").innerText = s;
getObject("DlgOk").focus();
}else{
e.style.display = 'none';
e.style.left = -1;
e.style.top = -1
getObject("Mess").innerText = '';
}
}
*/
function doDelete(){
var frm = getObject("myform");
frm.action += "?DelType=1"
getObject("Action").value = "Delete";
if(confirm("确认要删除订单吗?")){
frm.submit();
return;
}
}
function SaveModify(){
var frm = getObject("myform");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -