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

📄 admin_shopbook.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 3 页
字号:
   getObject("Action").value = "SaveModify";
   frm.submit();
}
function BookConfirm(ConfirmType){
   var frm = getObject("myform");
   frm.action = 'Admin_ShopBook.asp?SetBookStatus='+ ConfirmType;
   getObject("Action").value = "SetBookStatus";
   if(ConfirmType==1){
	  if(confirm("确定要确认此订单吗?")){
        frm.submit();
  	    return;
      }
   }else if(ConfirmType==2){
	  if(confirm("确定要结清此订单吗?")){
        frm.submit();
  	    return;
      }
   }
}
function doRestore(){
  var frm = getObject("myform");
  getObject("Action").value  = "Restore";
  if(confirm("确认要还原订单吗?")){
     frm.submit();
	 return;
  }
  return false;
}
function doDeleteTrue(){
  var frm = getObject("myform");
  getObject("Action").value  = "DeleteTrue";
  if(confirm("确认要彻底删除订单吗?")){
     frm.submit();
	 return;
  }
  return false;
}
function SendGoods(SendType){
   var frm = getObject("myform");
   frm.action = 'Admin_ShopBook.asp?SetSendStatus='+ SendType;
   getObject("Action").value = "SetSendStatus";   
   if(SendType==1){
	  if(confirm("确定要给此订单发货吗?")){
        frm.submit();
  	    return;
      }
   }else if(SendType==2){
	  if(confirm("确定客户已收到货了吗?")){
        frm.submit();
  	    return;
      }
   }
}
</script>
<div id="dd" style="position:absolute; width:0px;height:0px; z-index:1; background:#666666; display:none; filter:alpha(opacity=35);"></div>
<div id="Dialog" style="position:absolute; width:450px;height:150px; z-index:2008; background:#ffffff; border:1px solid #efefef; display:none;">
  <div style="border:1px solid #A3B4C1; width:100%; height:100%;">
   <div style="border:1px solid #efefef; width:100%; height:100%;">
     <div class="dialog_title" style="padding:5px; color:#444444">系统提示</div>
	 <div style="height:80; text-align:center; padding-top:20px; font-size:14px; color:#06559B;" id="Mess"></div>
	 <div style="height:20; padding:5px;">
	   <input name="SendMessage" type="checkbox" class="nomargin" id="SendMessage" value="1" checked>发送站内短信通知会员
	   <input name="SendEmail" type="checkbox" id="SendEmail" value="1" class="nomargin">发送电子邮件通知会员
	 </div>
	 <div style="height:25px; padding:5px; text-align:center; background:#EEF2F6;">
	    <input name="DlgOk" type="button" id="DlgOk" value=" 确 定 " onClick="getObject('myform').submit()" style="background:#E5F0F7; border:1px solid #86A2C0; height:22px; margin-right:10px;">
		<input name="DlgCancel" type="button" id="DlgCancel" value=" 取 消 " onClick="showDialog(0)" style="background:#E5F0F7; border:1px solid #86A2C0; height:22px;">
	 </div>
   </div>
  </div>
</div>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td><%=CurrentPath%></td>
  </tr>
</table>
<form name="myform" action="Admin_ShopBook.asp" method="post" onSubmit="SubmitOnce(this)">
  <table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
    <tr>
      <td colspan="6" class="top_25"><strong>查看订单号:</strong><%=rsBook("BookNumber")%></td>
    </tr>
    <tr>
      <td width="12%" align="right" class="td_ItemName"><strong>订单状态:</strong></td>
      <td colspan="3" class="item_25"><%=ArrBookStatus(rsBook("BookStatus"))%>
	  &nbsp;
      <%=ArrSendStatus(rsBook("SendStatus"))%>	  </td>
      <td width="11%" align="right" class="td_ItemName"><strong>订单时间:</strong></td>
      <td width="22%" class="item_25"><%=rsBook("BookDateTime")%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>会员名:</strong></td>
      <td width="26%" class="item_25"><%=EL_Common.ServerHTMLEncode(rsBook("UserName"))%></td>
      <td width="12%" align="right" class="td_ItemName"><strong>客户名:</strong></td>
      <td colspan="3" class="item_25"><%=EL_Common.ServerHTMLEncode(rsBook("TrueName"))%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>商品名称:</strong></td>
      <td class="item_25"><%=EL_Common.ServerHTMLEncode(rsBook("ProductName"))%></td>
      <td align="right" nowrap class="td_ItemName"><strong>兑换数量:</strong></td>
      <td width="17%" class="item_25"><%=rsBook("ProductNum")%></td>
      <td align="right" class="td_ItemName"><strong><%=PointItemName%>:</strong></td>
      <td class="item_25"><%=rsBook("BookPoints")%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>确认方式:</strong></td>
      <td colspan="5" class="item_25"><%=EL_Common.ServerHTMLEncode(rsBook("ConfirmType"))%></td>
    </tr>
	<tr>
      <td align="right" class="td_ItemName"><strong>其他说明:</strong></td>
      <td colspan="5" class="item_25"><%=EL_Common.HTMLEncode(rsBook("Demand"))%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>收货人名:</strong></td>
      <td class="item_25"><%=EL_Common.HTMLEncode(rsBook("ContactUserName"))%></td>
      <td align="right" class="td_ItemName"><strong>手机号码:</strong></td>
      <td class="item_25"><%=EL_Common.HTMLEncode(rsBook("Mobile"))%></td>
      <td align="right" class="td_ItemName"><strong>传真号码:</strong></td>
      <td class="item_25"><%=EL_Common.HTMLEncode(rsBook("Fax"))%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>电话号码:</strong></td>
      <td class="item_25"><%=EL_Common.HTMLEncode(rsBook("Phone"))%></td>
      <td align="right" class="td_ItemName"><strong>电子邮件:</strong></td>
      <td class="item_25"><%=EL_Common.HTMLEncode(rsBook("Email"))%></td>
      <td align="right" class="td_ItemName"><strong>邮政编码:</strong></td>
      <td class="item_25"><%=EL_Common.HTMLEncode(rsBook("ZipCode"))%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>邮寄地址:</strong></td>
      <td colspan="5" class="item_25"><%=EL_Common.HTMLEncode(rsBook("Address"))%></td>
    </tr>    
    <tr>
      <td align="right" class="td_ItemName"><strong>所需<%=PointItemName%>:</strong></td>
      <td colspan="5" class="item_25"><%=rsBook("BookPoints") & PointItemUnit%> x <%=rsBook("ProductNum")%> = <span style="font-size:18px; font-weight:bold; color:#CC0000;"><%=rsBook("BookPoints") * rsBook("ProductNum")%>&nbsp;<%=PointItemUnit%></span></td>
    </tr>
    <tr>
      <td align="right" nowrap class="td_ItemName"><strong>订单处理备注:</strong></td>
      <td colspan="3" class="item_25"><textarea name="Remark" cols="40" rows="5" id="Remark" style="width:100%;"><%=rsBook("Remark")%></textarea></td>
      <td colspan="2" class="item_25"><span class="redText"><strong>注:只有结清订单后才对会员的<%=PointItemName%>进行扣除</strong></span>      </td>
    </tr>
    <tr>
      <td colspan="6" align="center" class="td_50">
	  <input name="BookID" type="hidden" id="BookID" value="<%=BookID%>">
        <input name="Action" type="hidden" id="Action">
        <% If rsBook("Deleted") Then %>
        <input type="button" name="Submit22" value="还原订单" onClick="doRestore()">
        <input type="button" name="Submit22" value="彻底删除订单" onClick="doDeleteTrue()">
        <% Else %>
        <input type="button" name="Submit4" value="删除订单" onClick="doDelete()">
        <input name="button" type="button" id="button" value="保存修改" onClick="SaveModify()">
        <%
	    If rsBook("BookStatus") = 0 Then
		   Response.Write "<input name='button2' type='button' id='button2' value='确认订单' onclick='BookConfirm(1)'> "
		End If
		
		If rsBook("BookStatus") = 1 And rsBook("SendStatus") = 0 Then
		   Response.Write "<input name='button2' type='button' id='button2' value=' 发 货 ' onclick='SendGoods(1)'>"
		End If
		
		If rsBook("SendStatus") = 1 Then 
		   Response.Write "<input name='button2' type='button' id='button2' value='客户已收到货' onclick='SendGoods(2)'> "
		End If
		If rsBook("SendStatus") = 2 And rsBook("BookStatus") <> 2 Then 
		   Response.Write "<input name='button2' type='button' id='button2' value='结清订单' onclick='BookConfirm(2)'> "
		End If
	  %>
        <input name="button22" type="button" id="button22" value="打印订单" onClick="location.href='Admin_ShopBook.asp?Action=Print&BookID=<%=BookID%>'"></td>
	  <% End If %>
    </tr>
  </table>
</form>
<%
rsBook.Close()
Set rsBook = Nothing
Set BookCmd = Nothing
EL_Common.ShowScriptError()
End Sub

Sub ManageBook()
On Error Resume Next
Dim BookCmd, rsBook, RowCount, i, StrFields, StrCondition
Dim PageCounts, TotalRowCount, PageTotalPrice, AllTotalPrice
PageTotalPrice = 0
AllTotalPrice = 0

StrFields = "BookID,BookNumber,UserID,UserName,ContactUserName,ProductName,ProductNum,TotalPoints,BookDateTime,BookStatus,SendStatus"
If ManageType = "Recycled" Then
   StrCondition = "Deleted="& EL_True
Else
   StrCondition = "Deleted="& EL_False
End If

If Search_Keywords<>"" And Search_Field<>"" Then 
   If lCase(Search_Field) = "username" Then
      StrCondition = StrCondition &"And "& Search_Field &"='"& Search_Keywords &"' "
   Else
      StrCondition = StrCondition &"And "& Search_Field &" Like '%"& Search_Keywords &"%' "
   End if
End If

If BookStatus <> -1 Then  StrCondition = StrCondition &" And BookStatus="& BookStatus &" "

If SendStatus <> -1 Then  StrCondition = StrCondition &" And SendStatus="& SendStatus &" "

Select Case SearchType
   Case 1: StrCondition = StrCondition &" And BookDateTime>='"& Date() &"' "
   Case 2: StrCondition = StrCondition &" And BookDateTime>='"& DateAdd("d", -7, Date()) &"' "
   Case 3: StrCondition = StrCondition &" And BookDateTime>='"& DateAdd("d", -15, Date()) &"' "
   Case 4: StrCondition = StrCondition &" And BookDateTime>='"& DateAdd("d", -30, Date()) &"' "
End Select

Call EL_Common.InitCommand(BookCmd, "EL_SP_SplitPage")
With BookCmd
  .Parameters.Append .CreateParameter("RETURN", 3, 4, 4)
  .Parameters.Append .CreateParameter("@Tables", 200, 1, 50, "EL_ShopBook")
  .Parameters.Append .CreateParameter("@PrimaryKey", 200, 1, 20, "BookID")
  .Parameters.Append .CreateParameter("@Sort", 200, 1, 200, "BookDateTime DESC")
  .Parameters.Append .CreateParameter("@CurrentPage", 3, 1, 4, CurrentPage)
  .Parameters.Append .CreateParameter("@PageSize", 3, 1, 4, PageSizes)
  .Parameters.Append .CreateParameter("@Fields", 200, 1, 1000, StrFields)
  .Parameters.Append .CreateParameter("@Filter", 200, 1, 1000, StrCondition)
  .Parameters.Append .CreateParameter("@Group", 200, 1, 1, "")
  .Parameters.Append .CreateParameter("@TotalRowCount", 3, 2, 4)
  .Parameters.Append .CreateParameter("@PageCount", 3, 2, 4)
  Set rsBook = .Execute()
End With
rsBook.Close()
RowCount = BookCmd(0)
TotalRowCount = BookCmd(9)
PageCounts = BookCmd(10)

If ManageType = "Recycled" Then
   CurrentPath = CurrentPath &" >> 订单回收站"
End If

If Search_Keywords<>"" And Search_Field<>"" Then
   If lCase(Search_Field) <> "username" Then
      CurrentPath = CurrentPath &">> 订单搜索 >> "
   End If
   Select Case LCase(Search_Field)
     Case "booknumber":  CurrentPath = CurrentPath &"订单号:"
	 Case "username":  CurrentPath = CurrentPath &" >> 会员 <span class=redtext>"& Search_Keywords &"</span> 的所有订单"
	 Case "truename":  CurrentPath = CurrentPath &"客户名:"
	 Case "productname":  CurrentPath = CurrentPath &"商品名称:"
	 Case "contactusername":  CurrentPath = CurrentPath &"收货人名:"
	 Case "mobile":  CurrentPath = CurrentPath &"手机号码:"
	 Case "phone":  CurrentPath = CurrentPath &"联系电话:"
	 Case "email":  CurrentPath = CurrentPath &"电子邮件:"
	 Case "demand": CurrentPath = CurrentPath &"特殊要求:"
	 Case "bookdatetime": CurrentPath = CurrentPath &"订单时间:"
  End Select
  If lCase(Search_Field) <> "username" Then CurrentPath = CurrentPath &"<span class=redtext>"& Search_Keywords &"</span>"
ElseIf SearchType <> 0 Then
   Select Case SearchType
      Case 1:  CurrentPath = CurrentPath &" >> <span class=redtext>今日</span>"
      Case 2:  CurrentPath = CurrentPath &" >> 一周内"
      Case 3:  CurrentPath = CurrentPath &" >> 半个月内"
      Case 4:  CurrentPath = CurrentPath &" >> 一个月内"
   End Select
   Select Case BookStatus
      Case 0: CurrentPath = CurrentPath &"<span class='redtext'>未确认</span>"
	  Case 1: CurrentPath = CurrentPath &"<span class='bluetext'>已确认</span>"
	  Case 2: CurrentPath = CurrentPath &"<span class='greentext'>已结清</span>"
   End Select 
   Select Case SendStatus
      Case 0: CurrentPath = CurrentPath &"<span class='redtext'>未发货</span>"
	  Case 1: CurrentPath = CurrentPath &"<span class='bluetext'>发货中</span>"
	  Case 2: CurrentPath = CurrentPath &"<span class='greentext'>已发货</span>"
   End Select
   CurrentPath = CurrentPath &"订单"
Else
   CurrentPath = CurrentPath &" >> 所有"
   Select Case BookStatus
      Case 0: CurrentPath = CurrentPath &"<span class='redtext'>未确认</span>"
	  Case 1: CurrentPath = CurrentPath &"<span class='bluetext'>已确认</span>"
	  Case 2: CurrentPath = CurrentPath &"<span class='greentext'>已结清</span>"
   End Select 
   Select Case SendStatus
      Case 0: CurrentPath = CurrentPath &"<span class='redtext'>未发货</span>"
	  Case 1: CurrentPath = CurrentPath &"<span class='bluetext'>发货中</span>"
	  Case 2: CurrentPath = CurrentPath &"<span class='greentext'>已发货</span>"
   End Select
   CurrentPath = CurrentPath &"订单"
End If

%>
<script language="javascript">

⌨️ 快捷键说明

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