📄 admin_payment.asp
字号:
StrCondition = StrCondition &" And "& Search_Field &"='"& Search_Keywords &"' "
Else
StrCondition = StrCondition &" And "& Search_Field &" Like '%"& Search_Keywords &"%' "
End if
End If
Call EL_Common.InitCommand(PaymentCmd, "EL_SP_SplitPage")
With PaymentCmd
.Parameters.Append .CreateParameter("RETURN", 3, 4, 4)
.Parameters.Append .CreateParameter("@Tables", 200, 1, 50, "EL_Payment")
.Parameters.Append .CreateParameter("@PrimaryKey", 200, 1, 20, "PaymentID")
.Parameters.Append .CreateParameter("@Sort", 200, 1, 200, "PaymentID 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 rsPayment = .Execute()
End With
rsPayment.Close()
RowCount = PaymentCmd(0)
TotalRowCount = PaymentCmd(9)
PageCounts = PaymentCmd(10)
AllTotal = EL_Common.GetFieldValue("SUM(PayMoney)", "EL_Payment", StrCondition)
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 "bankname": CurrentPath = CurrentPath &"银行名称:"
Case "paydatetime": CurrentPath = CurrentPath &"交易时间:"
End Select
If lCase(Search_Field) <> "username" Then CurrentPath = CurrentPath &"<span class=redtext>"& Search_Keywords &"</span>"
ElseIf SearchType <> 0 Then
If BookType <> 0 Then CurrentPath = CurrentPath &">> "& ShowBookType(BookType)
Select Case SearchType
Case 1: CurrentPath = CurrentPath &" >> 一周内的付款记录"
Case 2: CurrentPath = CurrentPath &" >> 本个月内的付款记录"
Case 3: CurrentPath = CurrentPath &" >> 一个月内的付款记录"
End Select
Select Case PayType
Case 0: CurrentPath = CurrentPath &" >> 银行汇款记录"
Case 1: CurrentPath = CurrentPath &" >> 在线支付记录"
End Select
Else
CurrentPath = CurrentPath &">> "& ShowBookType(BookType)
If BookType <> 0 Then CurrentPath = CurrentPath &" >> "
Select Case PayType
Case 0: CurrentPath = CurrentPath &" 银行汇款记录"
Case 1: CurrentPath = CurrentPath &" 在线支付记录"
Case Else: CurrentPath = CurrentPath &" 所有记录"
End Select
End If
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><%=CurrentPath%></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td width="14%" 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>
<td width="10%" align="center" nowrap class="top_item"><strong>会员名</strong></td>
<td width="9%" align="center" nowrap class="top_item"><strong>支付类型</strong></td>
<td width="11%" align="center" nowrap class="top_item"><strong>银行名称</strong></td>
<td width="8%" align="center" nowrap class="top_item"><strong>交易日期</strong></td>
<td width="12%" align="center" nowrap class="top_item"><strong>交易金额</strong></td>
<td width="15%" align="center" nowrap class="top_item"><strong>备注</strong></td>
<td width="5%" align="center" nowrap class="top_item"><strong>操作</strong></td>
</tr>
<%
If RowCount = 0 Then
Response.Write "<tr><td colspan=10 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"><a href="Admin_<%=Replace(rsPayment("BookTableName"), "EL_", "")%>.asp?Action=Show&BookID=<%=rsPayment("BookID")%>"><%=EL_Common.ServerHTMLEncode(rsPayment("BookNumber"))%></a></td>
<td align="center"><%=EL_Common.ServerHTMLEncode(ShowBookType(rsPayment("BookTableName")))%></td>
<td align="center"><%=EL_Common.ServerHTMLEncode(rsPayment("TrueName"))%></td>
<td align="center"><%=EL_Common.ServerHTMLEncode(rsPayment("UserName"))%></td>
<td align="center"><%=ArrPayType(rsPayment("PayType"))%></td>
<td align="center"><%=EL_Common.ServerHTMLEncode(rsPayment("BankName"))%></td>
<td align="center"><%=FormatDateTime(rsPayment("PayDateTime"), 2)%></td>
<td align="right" style="padding-right:5px;"><span class="redText"><%=EL_Common.ELFormatCurrency(rsPayment("PayMoney"))%></span></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>
<%
PageTotal = PageTotal + rsPayment("PayMoney")
If i<RowCount Then rsPayment.MoveNext
Next
rsPayment.Close()
End If
%>
<tr>
<td colspan="7" align="right" class="td_25"><strong>本页金额合计:</strong></td>
<td colspan="3" class="td_25" style="padding-left:5px;"><b class="greenText"><%=EL_Common.ELFormatCurrency(PageTotal)%></b></td>
</tr>
<tr>
<td colspan="7" align="right" class="td_25"><strong>总金额合计:</strong></td>
<td colspan="3" class="td_25" style="padding-left:5px;"><b class="blueText"><%=EL_Common.ELFormatCurrency(AllTotal)%></b></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="12%"> </td>
<td width="88%" align="right" nowrap><%Call EL_Common.ShowPage(URLParameters, CurrentPage, PageSizes, PageCounts, TotalRowCount, "记录", "条")%></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
</table>
<%
Set rsPayment = Nothing
Set PaymentCmd = Nothing
EL_Common.ShowScriptError()
End Sub
Sub AddPayment()
On Error Resume Next
Dim BookCmd, rsBook
Dim BookID, BookType, SPName, TruePrice
BookID = EL_Common.ELRequest("BookID", 2)
BookType = EL_Common.ELRequest("BookType", 2)
Select Case BookType
Case 1: SPName = "EL_SP_GetHotelBook"
Case 2: SPName = "EL_SP_GetFlightBook"
Case 3: SPName = "EL_SP_GetProductBook"
Case 4: SPName = "EL_SP_GetSightBook"
Case 5: SPName = "EL_SP_GetCarBook"
Case Else:
EL_Common.ShowErrorMsg("订单类型错误")
Exit Sub
End Select
Call EL_Common.InitCommand(BookCmd, SPName)
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()
Select Case BookType
Case 1: TruePrice = rsBook("TruePrice")
Case 2: TruePrice = rsBook("DepartTruePrice") + rsBook("BackTruePrice")
Case 3: TruePrice = rsBook("TruePrice")
Case 4: TruePrice = rsBook("TruePrice")
Case 5: TruePrice = rsBook("TruePrice")
Case Else: TruePrice = 0
End Select
CurrentPath = CurrentPath &" >> 添加付款记录"
%>
<script language="javascript">
function Check(frm){
if(frm.PayDateTime.value.trim()==""){
alert("请输入汇款日期");
frm.PayDateTime.focus();
return false;
}
if(frm.PayMoney.value.trim()=="" || parseFloat(frm.PayMoney.value)<=0){
alert("请输入汇款金额不正确");
frm.PayMoney.focus();
return false;
}
}
function MsgClick(){
var sendMessage = getObject("SendMessage");
var sendEmail = getObject("SendEmail");
if(sendMessage.checked || sendEmail.checked){
getObject("MsgContent").style.display = '';
}else{
getObject("MsgContent").style.display = 'none';
}
}
</script>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><%=CurrentPath%></td>
</tr>
</table>
<form name="myform" action="Admin_Payment.asp" method="post" onSubmit="return Check(this)">
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td colspan="2" class="top_25"><strong>添加付款记录</strong></td>
</tr>
<tr>
<td width="17%" class="td_ItemName"><strong>订单编号</strong></td>
<td width="83%" class="td_25"><input name="textfield" type="text" value="<%=EL_Common.ServerHTMLEncode(rsBook("BookNumber"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>客户名</strong></td>
<td class="td_25"><input name="textfield2" type="text" value="<%=EL_Common.ServerHTMLEncode(rsBook("TrueName"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>会员名</strong></td>
<td class="td_25"><input name="textfield22" type="text" value="<%=EL_Common.ServerHTMLEncode(rsBook("UserName"))%>" size="40" readonly="true"></td>
</tr>
<tr>
<td class="td_ItemName"><strong class="GreenText">订单实际收款金额</strong></td>
<td class="td_25"><input name="textfield23" type="text" value="<%=EL_Common.ELFormatCurrency(TruePrice)%>" size="15" readonly="true" style="font-weight:bold; color:green;"></td>
</tr>
<tr>
<td class="td_ItemName"><strong class="BlueText">已付金额</strong></td>
<td class="td_25"><input name="textfield232" type="text" value="<%=EL_Common.ELFormatCurrency(rsBook("PayedMoney"))%>" size="15" readonly="true" style="font-weight:bold; color:blue;"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>汇入银行</strong></td>
<td class="td_25"><input name="BankName" type="text" id="BankName" size="40"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>汇款日期</strong></td>
<td class="td_25"><input name="PayDateTime" type="text" id="PayDateTime" value="<%=Date()%>" size="20"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>汇款金额</strong></td>
<td class="td_25"><input name="PayMoney" type="text" id="PayMoney" size="15"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>备注</strong></td>
<td class="td_25"><textarea name="Remark" cols="60" rows="5" id="Remark"></textarea></td>
</tr>
<tr>
<td class="td_ItemName"><strong>汇款通知</strong><br>
通知会员已收到汇款</td>
<td class="td_25"><input name="SendMessage" type="checkbox" class="nomargin" id="SendMessage" value="1" checked onClick="MsgClick()">
发送站内短信通知<br>
<%
Dim TestMailObject
TestMailObject = Trim(EL_Common.GetFieldValue("Object_Email", "EL_Config", "1=1"))
If TestMailObject = "" Or ObjTest(TestMailObject) = False Then
TestMailObject = "disabled"
End If
%>
<input name="SendEmail" type="checkbox" class="nomargin" id="SendEmail" value="1" <%=TestMailObject%> onClick="MsgClick()">
发生电子邮件通知
<table id="MsgContent" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td width="5%" align="right" nowrap class="td_25" style="padding-left:5px;">短信标题:</td>
<td width="95%" class="td_25"><input name="Title" type="text" id="Title" value="已收到汇款通知(订单:<%=EL_Common.ServerHTMLEncode(rsBook("BookNumber"))%>)" size="50"></td>
</tr>
<tr>
<td align="right" nowrap class="td_25" style="padding-left:5px;">短信内容:</td>
<td class="td_25"><textarea name="Content" cols="65" rows="5" id="Content"><%=rsBook("UserName")%>:
您好!您的汇款我们已经收到,订单编号:<%=rsBook("BookNumber")%>
汇入银行:
汇款日期:
汇款金额:</textarea></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" class="td_25"><strong class="redText">注意:汇款信息一旦录入,就不能再做修改或删除!请在保存之前确认输入无误!</strong></td>
</tr>
<tr>
<td class="td_ItemName"> </td>
<td class="td_50"><input type="submit" name="Submit" value="保存汇款信息">
<input type="button" name="Submit2" value=" 取 消 " onClick="history.back()">
<input name="BookID" type="hidden" id="BookID" value="<%=BookID%>">
<input name="Action" type="hidden" id="Action" value="Save">
<input name="BookType" type="hidden" id="BookType" value="<%=BookType%>"></td>
</tr>
</table>
</form>
<%
rsBook.Close()
Set rsBook = Nothing
Set BookCmd = Nothing
EL_Common.ShowScriptError()
End Sub
%>
<%
Function ShowBookType(ByVal b)
Select Case LCase(b)
Case "el_hotelbook", "1": ShowBookType = "酒店订单"
Case "el_flightbook", "2": ShowBookType = "机票订单"
Case "el_productbook", "3": ShowBookType = "度假订单"
Case "el_sightbook", "4": ShowBookType = "景点订单"
End Select
End Function
Function ObjTest(strObj)
On Error Resume Next
ObjTest = False
Dim TestObj
Set TestObj = server.CreateObject (strObj)
If -2147221005 <> Err then
ObjTest = True
Else
Err.Clear
End If
End Function
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -