📄 admin_carbook.asp
字号:
<%
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,CarName,BeginDate,EndDate,HireType,UseType,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_CarBook")
.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 "carname": 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_CarBook", 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);
return true;
}
function doDelete(){
var frm = getObject("myform");
if(!CheckObject()){
alert("请至少选定1份订单");
return false;
}
frm.action = "Admin_CarBook.asp?Action=Delete";
if(confirm("确认要执行选定删除吗?")){
frm.submit();
return;
}
return false;
}
function doRestore(){
var frm = getObject("myform");
if(!CheckObject()){
alert("请至少选定1份订单");
return false;
}
frm.action = "Admin_CarBook.asp?Action=Restore";
if(confirm("确认要还原选定订单吗?")){
frm.submit();
return;
}
return false;
}
function doRestoreAll(){
var frm = getObject("myform");
frm.action = "Admin_CarBook.asp?Action=RestoreAll";
if(confirm("确认要还原所有订单吗?")){
frm.submit();
return;
}
return false;
}
function doDeleteTrue(){
var frm = getObject("myform");
if(!CheckObject()){
alert("请至少选定1份订单");
return false;
}
frm.action = "Admin_CarBook.asp?Action=DeleteTrue";
if(confirm("确认要彻底删除选定订单吗?")){
frm.submit();
return;
}
return false;
}
function doDeleteTrueAll(){
var frm = getObject("myform");
frm.action = "Admin_CarBook.asp?Action=DeleteTrueAll";
if(confirm("确认要彻底删除所有订单吗?")){
frm.submit();
return;
}
return false;
}
</script>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><%=CurrentPath%></td>
</tr>
</table>
<form name="myform" action="" method="post">
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td width="3%" align="center" nowrap class="top_item"><strong>选择</strong></td>
<td width="21%" align="center" nowrap class="top_item"><strong>订单号</strong></td>
<td width="9%" align="center" nowrap class="top_item"><strong>客户名</strong></td>
<td width="10%" align="center" nowrap class="top_item"><strong>会员名</strong></td>
<td width="15%" align="center" nowrap class="top_item"><strong>订单时间</strong></td>
<td width="8%" align="center" nowrap class="top_item"><strong>订单金额</strong></td>
<td width="9%" align="center" nowrap class="top_item"><strong>实际付款</strong></td>
<td width="8%" align="center" nowrap class="top_item"><strong>订单状态</strong></td>
<td width="8%" align="center" nowrap class="top_item"><strong>付款</strong></td>
<% If ManageType = "Recycled" Then %>
<td width="9%" align="center" nowrap class="top_item"><strong>回收站操作</strong></td>
<% End If %>
</tr>
<%
If RowCount = 0 Then
If ManageType = "Recycled" Then
Response.Write "<tr><td colspan=11 class=td_50 align=center>没有任何订单</td></tr>"
Else
Response.Write "<tr><td colspan=10 class=td_50 align=center>没有任何订单</td></tr>"
End If
Else
rsBook.Open()
For i = 1 To RowCount
%>
<tr class="td_25" onMouseOver="this.className='MouseOver_25'" onMouseOut="this.className='td_25'">
<td align="center"><input name="CheckObject" type="checkbox" id="CheckObject" value="<%=rsBook("BookID")%>"></td>
<td align="center">
<a href="Admin_CarBook.asp?Action=Show&BookID=<%=rsBook("BookID")%>" title="租车名称:<%=EL_Common.ServerHTMLEncode(rsBook("CarName"))%> 开始日期:<%=rsBook("BeginDate")%> 结束日期:<%=rsBook("EndDate")%> 租车方式:<%=ArrHireType(rsBook("HireType"))%> (<%=ArrUseType(rsBook("UseType"))%>)">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -