<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
|
<% Session.CodePage=65001 %>
|
<% Response.charset = "utf-8" %>
|
<!--#include virtual="/inc/odbc.asp"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<!--#include virtual="/inc/core.asp"-->
|
<%
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
ServiceOrdID = trim(request("ServiceOrdID"))
|
If ServiceOrdID<>"" Then
|
sql="select ServiceOrdTraTxnPrice,ServiceOrdTraPaidPrice from ServiceOrder where ServiceOrdTraTxnPrice<=ServiceOrdTraPaidPrice and ServiceOrdID="&ServiceOrdID
|
rs.open sql,objConn,1,1
|
If not rs.Eof Then
|
rs.close()
|
sql="select top 1 id,PaidMoney,PaidMoneyTime,PaidMoneyType,PaidMoneyMono from PaidMoney where ServiceOrdIDDt="&ServiceOrdID&" and PaidMoney>0 and DateDiff(ss,PaidMoneyTime,getdate())<=30 order by id desc"
|
rs.open Sql,objConn,1,1
|
If not rs.Eof Then
|
id = rs("id")
|
PaidMoney = rs("PaidMoney")
|
If PaidMoney<1 And PaidMoney>0 Then PaidMoney="0"&PaidMoney
|
PaidMoneyTime = rs("PaidMoneyTime")
|
PaidMoneyType = rs("PaidMoneyType")
|
PaidMoneyMono = rs("PaidMoneyMono")
|
If PaidMoneyMono<>"" Then PaidMoneyMono=Replace(PaidMoneyMono,"[支付专用]","")
|
webJson="{""trade_state"":""SUCCESS"",""id"":"&id&",""PaidMoney"":"""&PaidMoney&""",""PaidMoneyTime"":"""&PaidMoneyTime&""",""PaidMoneyMono"":"""&PaidMoneyMono&"""}"
|
Else
|
webJson="{""trade_state"":""CLOSED""}"
|
End If
|
Else
|
trade_state="CLOSED"
|
webJson="{""trade_state"":""CLOSED""}"
|
End If
|
rs.close()
|
Else
|
webJson="{""trade_state"":""CLOSED""}"
|
End If
|
|
Response.Write webJson
|
%>
|