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

📄 admin_sightbook.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 3 页
字号:
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>景点名称:</strong></td>
      <td colspan="5" class="item_25">[<%=EL_Common.ServerHTMLEncode(rsBook("SightArea"))%>] <%=EL_Common.ServerHTMLEncode(rsBook("SightName"))%></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>旅行日期:</strong></td>
      <td class="item_25"><%=rsBook("TravelDate")%></td>
      <td align="right" class="td_ItemName"><strong>人数:</strong></td>
      <td width="17%" class="item_25"><%=rsBook("Person")%></td>
      <td align="right" class="td_ItemName"><strong>确认方式:</strong></td>
      <td 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 colspan="6" class="MouseOver_25">&nbsp;&nbsp;<strong class="YellowText">联系人信息</strong></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 colspan="3" class="item_25"><%=EL_Common.HTMLEncode(rsBook("Email"))%></td>
    </tr>
    <tr>
      <td colspan="6" class="MouseOver_25">&nbsp;&nbsp;<strong class="YellowText">订单价格信息</strong></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong>门市价格:</strong></td>
      <td class="item_25"><%=EL_Common.ELFormatCurrency(rsBook("MarketPrice"))%></td>
      <td align="right" class="td_ItemName"><strong>是否打折:</strong></td>
      <td class="item_25"><%=EL_Common.ShowBoolean(rsBook("IsDiscount").value, "<span class=bluetext>是</span>", "<span class=redtext>否</span>")%></td>
      <td align="right" class="td_ItemName"><strong>享受折扣:</strong></td>
      <td class="item_25"><%=rsBook("Discount")%></td>
    </tr>
    <tr>
      <td rowspan="3" align="right" nowrap class="td_ItemName"><strong>详细价格清单:</strong></td>
      <td colspan="3" rowspan="3" class="item_25"><%="¥"& rsBook("BookPrice") &" x "& rsBook("Person") &" 人 = <span style='font-size:18px; font-weight:bold; margin:0px; color:#CC0000'>¥"& (rsBook("BookPrice") * rsBook("Person")) &"</span>"%></td>
      <td align="right" class="td_ItemName"><strong class="redText">折后价格:</strong></td>
      <td class="item_25"><input name="PriceOfDiscount" type="text" id="PriceOfDiscount" value="<%=EL_Common.ELFormatCurrency(rsBook("PriceOfDiscount"))%>" readonly="true" size="10" style="font-weight:bold; color:red; text-align:right;"><img src="Images/lock.gif" width="11" height="14" alt="已锁定,不能修改"></td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong class="GreenText">实际收款:</strong></td>
      <td class="item_25">
	  <% If rsBook("BookStatus") = 2 Then %>	  
	  <input name="TruePrice" type="text" id="TruePrice" value="<%=EL_Common.ELFormatCurrency(rsBook("TruePrice"))%>" readonly="true" size="10" style="font-weight:bold; color:green; text-align:right;"><img src="Images/lock.gif" width="11" height="14" alt="已锁定,不能修改">
	  <% Else %>
	  <input name="TruePrice" type="text" id="TruePrice" value="<%=rsBook("TruePrice")%>" size="10" style="font-weight:bold; color:green; text-align:right;">
	  <% End If %>	  </td>
    </tr>
    <tr>
      <td align="right" class="td_ItemName"><strong class="BlueText">已付金额:</strong></td>
      <td class="item_25"><div style="float:left"><input name="PayedMoney" type="text" id="PayedMoney" value="<%=EL_Common.ELFormatCurrency(rsBook("PayedMoney"))%>" readonly="true" size="10" style="font-weight:bold; color:blue; text-align:right;"><img src="Images/lock.gif" width="11" height="14" alt="已锁定,不能修改"></div><div style="padding-top:5px; padding-left:3px; float:left; color:blue">(<%=ArrPayStatus(rsBook("PayStatus"))%>)</div></td>
    </tr>
    <tr>
      <td align="right" 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" valign="top"><strong class="redText">注:当结清订单后,不能对订单再做任何修改,除备注之外</strong></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="Submit2" value="还原订单" onClick="doRestore()">
	  <input type="button" name="Submit2" value="彻底删除订单" onClick="doDeleteTrue()">
	  <% Else %>
	    <input type="button" name="Submit4" value="删除订单" onClick="doDelete()">
	    <input name="button" type="button" id="button" value="保存修改" onClick="SaveModify()">
	  <%
	    Select Case rsBook("BookStatus")
		   Case 0: Response.Write "<input name='button2' type='button' id='button2' value='确认订单' onclick='BookConfirm(1)'> "
		   Case 1: Response.Write "<input name='button2' type='button' id='button2' value='结清订单' onclick='BookConfirm(2)'> "
		End Select
		
		If rsBook("BookStatus") <> 0 Then
		   Response.Write "<input name='button2' type='button' id='button2' value='添加付款记录' onclick=""location.href='Admin_Payment.asp?Action=Add&BookType=4&BookID="& BookID &"'"">"
		End If
	  %>
	  <input name="button2" type="button" id="button2" value="打印订单" onClick="location.href='Admin_SightBook.asp?Action=Print&BookID=<%=BookID%>'">	  </td>
	  <% End If %>
    </tr>
  </table>
</form>
<br>
<strong class="BlueText">·付款记录</strong>
<%
Dim PaymentCmd, rsPayment, RowCount, TotalPay
Call EL_Common.InitCommonCmd(PaymentCmd, rsPayment, "EL_Payment", "PaymentID,UserName,BankName,PayType,PayMoney,PayDateTime,Remark", "BookTableName='EL_SightBook' And BookNumber='"& rsBook("BookNumber") &"' And BookID="& BookID)
rsPayment.Close()
RowCount = PaymentCmd(0)
TotalPay = 0
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
  <tr>

    <td width="9%" align="center" class="top_item"><strong>客户名称</strong></td>
    <td width="19%" align="center" class="top_item"><strong>支付银行</strong></td>
    <td width="12%" align="center" class="top_item"><strong>支付类型</strong></td>
    <td width="14%" align="center" class="top_item"><strong>支付金额</strong></td>
    <td width="14%" align="center" class="top_item"><strong>支付时间</strong></td>
    <td width="24%" align="center" class="top_item"><strong>备注</strong></td>
    <td width="8%" align="center" class="top_item"><strong>操作</strong></td>
  </tr>
  <%
   If RowCount = 0 Then
      Response.Write "<tr><td colspan=7 class=td_50 align=center>没有任何付款记录</td></tr>"
   Else
      rsPayment.Open()	  
	  For i = 1 To RowCount
  %>
  <tr class="td_25" onMouseOver="this.className='MouseOver_25'" onMouseOut="this.className='td_25'">
    <td align="center"><%=EL_Common.ServerHTMLEncode(rsPayment("UserName"))%></td>
    <td align="center"><%=EL_Common.ServerHTMLEncode(rsPayment("BankName"))%></td>
    <td align="center"><%=ArrPayType(rsPayment("PayType"))%></td>
    <td align="right" class="BlueText"><%=EL_Common.ELFormatCurrency(rsPayment("PayMoney"))%>&nbsp;</td>
    <td align="center"><%=rsPayment("PayDateTime")%></td>
    <td align="center"><%=EL_Common.ServerHTMLEncode(rsPayment("Remark"))%></td>
    <td align="center"><a href="Admin_Payment.asp?Action=Show&PaymentID=<%=rsPayment("PaymentID")%>">查看</a></td>
  </tr>  
  <%
        TotalPay = TotalPay + rsPayment("PayMoney")
		If i<RowCount Then rsPayment.MoveNext
	  Next
	  rsPayment.Close()
	End If
  %>
  <tr class="td_25">
    <td colspan="3" align="right"><strong>合计金额:</strong></td>
    <td colspan="4">&nbsp;<strong class="redText"><%=EL_Common.ELFormatCurrency(TotalPay)%></strong></td>
  </tr>
</table>
<%
Set rsPayment = Nothing
Set PaymentCmd = Nothing
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,TrueName,SightName,TravelDate,Person,PriceOfDiscount,TruePrice,BookDateTime,BookStatus,PayStatus"
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 PayStatus <> -1 Then  StrCondition = StrCondition &" And PayStatus="& PayStatus &" "

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_SightBook")
  .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 "sightname":  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 PayStatus
      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 PayStatus
      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
AllTotalPrice = EL_Common.GetFieldValue("SUM(TruePrice)", "EL_SightBook", StrCondition)
%>
<script language="javascript">
function CheckedAll(){
  for (var i=0;i<document.myform.elements.length;i++){
    var e = document.myform.elements[i];
    if (e.type == 'checkbox' && e.name=='CheckObject' && e.disabled == false){
       e.checked = true;
    }
  }
  getObject("myselect").innerHTML = "[<a href='javascript:CancelAll()'>取消</a>]";
}
function CancelAll(){
  for (var i=0;i<document.myform.elements.length;i++){
    var e = document.myform.elements[i];
    if (e.type == 'checkbox' && e.name=='CheckObject' && e.disabled == false){
       e.checked = false;
    }
  }
  getObject("myselect").innerHTML = "[<a href='javascript:CheckedAll()'>全选</a>]";
}
function CheckObject(){
   var frm = getObject("myform");
   for (var i=0;i<frm.elements.length;i++){
    var e = frm.elements[i];
    if (e.type == 'checkbox' && e.name=='CheckObject' && e.disabled == false && e.checked == true ){
       return true
    }
  }
  return false;
}
function Check(frm){
  SubmitOnce(frm);

⌨️ 快捷键说明

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