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

📄 user_shopbook.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
Option Explicit
Response.buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
%>
<!--#Include File="../Conn.asp"-->
<!--#Include File="../Inc/Const.asp"-->
<!--#Include File="User_CheckPurview.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="User_Style.css" type="text/css" rel="stylesheet">
<script language="javascript" src="../Js/Common.js"></script>
<title>商品兑换管理</title>
</head>
<body>
<%
Dim CurrentPage, CurrentPath, URLParameters, BookStatus, SendStatus
Dim ArrSendStatus(5), ArrBookStatus(5)

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>"

  

CurrentPage = EL_Common.ELRequest("page", 2)
BookStatus = EL_Common.ELRequest("BookStatus", 1)
SendStatus = EL_Common.ELRequest("SendStatus", 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

URLParameters = request.ServerVariables("QUERY_STRING")
If CurrentPage<1 Then 
   CurrentPage = 1
Else
   URLParameters = EL_Common.ReplaceText(URLParameters, "&*page=[0-9]*", "")
End If

CurrentPath = "·您现在的位置:<a href='"& EL_CurrentScriptName &"'>商城订单管理</a> "
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="13%" background="Images/navbg.gif"><img src="Images/navtitle.gif" width="113" height="37"></td>
    <td width="87%" background="Images/navbg.gif">| <a href="User_HotelBook.asp" class="nav">酒店订单</a> | <a href="User_FlightBook.asp" class="nav">机票订单</a> | <a href="User_ProductBook.asp" class="nav">度假订单</a> | <a href="User_SightBook.asp" class="nav">景点订单</a> | <a href="User_CarBook.asp" class="nav">租车订单</a> | <a href="User_ShopBook.asp" class="nav">商品兑换</a> | <a href="User_Payment.asp" class="nav">订单付款记录</a> | </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="13%" class="td_22"></td>
    <td width="87%" class="td_22">
	<div style="float:left;">
	  <input name="BookStatus" type="radio" class="nomargin" value="-1" <%=EL_Common.SetObjectChecked(-1, BookStatus)%> onClick="location.href='<%=EL_CurrentScriptName%>?SendStatus=<%=SendStatus%>&BookStatus=-1'"> 所有订单
	  <input name="BookStatus" type="radio" class="nomargin" value="0" <%=EL_Common.SetObjectChecked(0, BookStatus)%> onClick="location.href='<%=EL_CurrentScriptName%>?SendStatus=<%=SendStatus%>&BookStatus=0'"> 未确认订单
	  <input name="BookStatus" type="radio" class="nomargin" value="1" <%=EL_Common.SetObjectChecked(1, BookStatus)%> onClick="location.href='<%=EL_CurrentScriptName%>?SendStatus=<%=SendStatus%>&BookStatus=1'"> 已确认订单	  
	  <input name="BookStatus" type="radio" class="nomargin" value="2" <%=EL_Common.SetObjectChecked(2, BookStatus)%> onClick="location.href='<%=EL_CurrentScriptName%>?SendStatus=<%=SendStatus%>&BookStatus=2'"> 已结清订单
	</div>
	<div style="float:left; padding-left:10px;"><span class="leftdiv" style="padding-left:10px;">
	  <select name="SendStatus" id="SendStatus" onChange="location.href='<%=EL_CurrentScriptName%>?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>
	</span></div>	
	</td>
  </tr>
</table>
<div class="dw">
<%
Select Case Action
   Case "": Call ManageBook()
   Case "Show": Call ShowBook()
   Case "Print": Call PrintBook()
   Case "SaveModify": Call SaveModify(8)
   Case "Cancel": Call SaveModify(9)
End Select
Call ApplicationTerminate()

Sub SaveModify(SetType)
   On Error Resume Next
   Dim BookCmd
   Dim BookID, ContactUserName, CheckInUserName, CustomerType, Mobile, Phone, Fax, Email, ZipCode, Address
   
   BookID = EL_Common.ELRequest("BookID", 2)
   ContactUserName = EL_Common.ELRequest("ContactUserName", 1)
   CheckInUserName = EL_Common.ELRequest("CheckInUserName", 1)
   CustomerType = EL_Common.ELRequest("CustomerType",1)
   Mobile = EL_Common.ELRequest("Mobile", 1)
   Phone = EL_Common.ELRequest("Phone", 1)
   Fax = EL_Common.ELRequest("Fax", 1)
   Email = EL_Common.ELRequest("Email", 1)
   ZipCode = EL_Common.ELRequest("ZipCode", 1)
   Address = EL_Common.ELRequest("Address", 1)
   
   If ContactUserName = "" Then
      EL_Common.ShowErrorMsg("请输入联系人名")
	  Exit Sub
   End If
   If Mobile = ""  And Phone = "" Then
      EL_Common.ShowErrorMsg("请输入手机号码或电话号码")
	  Exit Sub
   End If
   If ZipCode = "" Then
      EL_Common.ShowErrorMsg("请输入邮政编码")
	  Exit Sub
   End If
   If Address = "" Then
      EL_Common.ShowErrorMsg("请输入邮寄地址")
	  Exit Sub
   End If
   
   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, BookID)
	  .Parameters.Append .CreateParameter("@ContactUserName", 200, 1, 50, ContactUserName)
	  .Parameters.Append .CreateParameter("@Mobile", 200, 1, 50, Mobile)
	  .Parameters.Append .CreateParameter("@Phone", 200, 1, 50, Phone)
	  .Parameters.Append .CreateParameter("@Fax", 200, 1, 50, Fax)
	  .Parameters.Append .CreateParameter("@Email", 200, 1, 100, Email)
	  .Parameters.Append .CreateParameter("@ZipCode", 200, 1, 10, ZipCode)
	  .Parameters.Append .CreateParameter("@Address", 200, 1, 255, Address)
	  .Parameters.Append .CreateParameter("@BookStatus", 3, 1, 4, 0)
	  .Parameters.Append .CreateParameter("@SendStatus", 3, 1, 4, 0)
	  .Parameters.Append .CreateParameter("@Remark", 200, 1, 1000, "")
	  .Parameters.Append .CreateParameter("@Editor", 200, 1, 50, "")
	  .Execute()
   End With 
   Set BookCmd = Nothing
   EL_Common.ShowScriptError()
   If SetType = 8 Then
      EL_Common.ShowSuccessMsg("订单修改成功")
   Elseif SetType = 9 Then
      ComeURL = "User_ShopBook.asp"
	  EL_Common.ShowSuccessMsg("订单取消成功")
   End If
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 Cancel(){
   var frm = getObject("myform");
   getObject("Action").value = "Cancel";
   if(confirm("确认要取消兑换吗?")){
     frm.submit();
	 return;
  }
}
function SaveModify(){
   var frm = getObject("myform");
   getObject("Action").value = "SaveModify";
   frm.submit();
   return;
}
</script>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td><%=CurrentPath%></td>
  </tr>
</table>
<form name="myform" action="User_ShopBook.asp" method="post" onSubmit="SubmitOnce(this)">
  <table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
    <tr>
      <td colspan="6" class="top_26"><strong>查看订单号:</strong><%=rsBook("BookNumber")%></td>
    </tr>
    <tr>
      <td width="12%" align="right" class="td_ItemName"><strong>订单状态:</strong></td>
      <td colspan="3" class="td_item_22"><%=ArrBookStatus(rsBook("BookStatus"))%> &nbsp; <%=ArrSendStatus(rsBook("SendStatus"))%> </td>
      <td width="11%" align="right" class="td_ItemName"><strong>订单时间:</strong></td>
      <td width="22%" class="td_item_22"><%=rsBook("BookDateTime")%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>会员名:</strong></td>
      <td width="25%" class="td_item_22"><%=EL_Common.ServerHTMLEncode(rsBook("UserName"))%></td>
      <td width="9%" align="right" class="td_ItemName"><strong>客户名:</strong></td>
      <td colspan="3" class="td_item_22"><%=EL_Common.ServerHTMLEncode(rsBook("TrueName"))%></td>
      </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>商品名称:</strong></td>
      <td class="td_item_22"><%=EL_Common.ServerHTMLEncode(rsBook("ProductName"))%></td>
      <td align="right" nowrap class="td_ItemName"><strong>兑换数量:</strong></td>
      <td width="21%" class="td_item_22"><%=rsBook("ProductNum")%></td>
      <td align="right" class="td_ItemName"><strong><%=PointItemName%>:</strong></td>
      <td class="td_item_22"><%=rsBook("BookPoints")%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>确认方式:</strong></td>
      <td colspan="5" class="td_item_22"><%=EL_Common.ServerHTMLEncode(rsBook("ConfirmType"))%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>其他说明:</strong></td>
      <td colspan="5" class="td_item_22"><%=EL_Common.HTMLEncode(rsBook("Demand"))%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>收货人名:</strong></td>
      <td class="td_item_22"><%If rsBook("BookStatus") > 0 Then %>
          <input name="ContactUserName" type="text" id="ContactUserName" readonly="true" value="<%=EL_Common.HTMLEncode(rsBook("ContactUserName"))%>" size="14"><img src="Images/lock.gif" width="11" height="14" alt="已锁定,不能修改">
          <%Else%>
          <input name="ContactUserName" type="text" id="ContactUserName" value="<%=EL_Common.HTMLEncode(rsBook("ContactUserName"))%>" size="14">
          <%End If%></td>
      <td align="right" class="td_ItemName"><strong>手机号码:</strong></td>
      <td class="td_item_22"><%If rsBook("BookStatus") > 0 Then %>
          <input name="Mobile" type="text" id="Mobile" readonly="true" value="<%=EL_Common.HTMLEncode(rsBook("Mobile"))%>" size="14"><img src="Images/lock.gif" width="11" height="14" alt="已锁定,不能修改">
          <%Else%>
          <input name="Mobile" type="text" id="Mobile" value="<%=EL_Common.HTMLEncode(rsBook("Mobile"))%>" size="14">
          <%End If%></td>
      <td align="right" class="td_ItemName"><strong>传真号码:</strong></td>
      <td class="td_item_22"><%If rsBook("BookStatus") > 0 Then %>
          <input name="Fax" type="text" id="Fax2" readonly="true" value="<%=EL_Common.HTMLEncode(rsBook("Fax"))%>" size="14"><img src="Images/lock.gif" width="11" height="14" alt="已锁定,不能修改">
          <%Else%>
          <input name="Fax" type="text" id="Fax2" value="<%=EL_Common.HTMLEncode(rsBook("Fax"))%>" size="14">
          <%End If%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>电话号码:</strong></td>
      <td class="td_item_22"><%If rsBook("BookStatus") > 0 Then %>
          <input name="Phone" type="text" id="Phone" readonly="true" value="<%=EL_Common.HTMLEncode(rsBook("Phone"))%>" size="14"><img src="Images/lock.gif" width="11" height="14" alt="已锁定,不能修改">

⌨️ 快捷键说明

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