<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<%
|
'Response.Cookies("OA")("adminID")=""
|
'Response.end
|
PaidMoneyID=request("PaidMoneyID")
|
SystemMessageType=trim(Request("SystemMessageType"))
|
SMT=trim(Request("SMT"))
|
state=request("state")
|
If state<>"" Then
|
stateSP=split(state,"|")
|
for i = 0 to UBOUND(stateSP)
|
If InStr(stateSP(i),"PaidMoneyID=")=1 Then
|
PaidMoneyID=Replace(stateSP(i),"PaidMoneyID=","")
|
End If
|
Next
|
End If
|
if PaidMoneyID="" then Response.Redirect "/"
|
state=PaidMoneyID
|
|
%>
|
<!--#include virtual="/weixin/OAuth2.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<!--#include virtual="/weixin/sha1.gds"-->
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<title>退款申请</title>
|
<link href="css/main.css" type="text/css" rel="stylesheet">
|
</head>
|
|
<%
|
If isDepartment("030209")=0 Then
|
Response.Write "权限不足"
|
Response.End()
|
End If
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
sql="select * from PaidMoney where id="&PaidMoneyID
|
rs.open sql,objConn,1,1
|
If not rs.Eof Then
|
ServiceOrdID = rs("ServiceOrdIDDt")
|
DispatchOrdID = rs("DispatchOrdIDDt")
|
PaidMoney = rs("PaidMoney")
|
PaidMoneyType = rs("PaidMoneyType")
|
PaidMoneyMono = rs("PaidMoneyMono")
|
PaidMoneyOaID = rs("PaidMoneyOaID")
|
PaidMoneyTime = rs("PaidMoneyTime")
|
PaidMoney_AP_ID = rs("PaidMoney_AP_ID")
|
PaidMoney_AP_Time=rs("PaidMoney_AP_Time")
|
PaidMoney_AP_Check=rs("PaidMoney_AP_Check")
|
|
If (InStr(PaidMoneyMono,"[线上退款]")>0 And InStr(PaidMoneyMono,"收款编号:")>0) Then
|
PayID = Mid(PaidMoneyMono,1,InStr(PaidMoneyMono,"[")-1)
|
PaidMoneyToId = Mid(PaidMoneyMono,InStr(PaidMoneyMono,"收款编号:")+5)
|
PaidMoneyMono = Mid(PaidMoneyMono,InStr(PaidMoneyMono,"]")+2)
|
PaidMoneyMono = Mid(PaidMoneyMono,1,InStr(PaidMoneyMono,"收款编号:")-2)
|
Else
|
Response.Write "数据错误 - 1"
|
Response.End()
|
End If
|
End If
|
rs.close()
|
If PaidMoneyToId<>"" Then
|
sql="select * from PaidMoney where id="&PaidMoneyToId
|
rs.open sql,objConn,1,1
|
If not rs.Eof Then
|
If ServiceOrdID="0" Then ServiceOrdID = rs("ServiceOrdIDDt")
|
If DispatchOrdID="0" Then DispatchOrdID = rs("DispatchOrdIDDt")
|
ToPaidMoney = rs("PaidMoney")
|
ToPaidMoneyType = rs("PaidMoneyType")
|
ToPaidMoneyMono = rs("PaidMoneyMono")
|
ToPaidMoneyOaID = rs("PaidMoneyOaID")
|
ToPaidMoneyTime = rs("PaidMoneyTime")
|
ToPaidMoney_AP_ID = rs("PaidMoney_AP_ID")
|
ToPaidMoney_AP_Time=rs("PaidMoney_AP_Time")
|
ToPaidMoney_AP_Check=rs("PaidMoney_AP_Check")
|
|
If (InStr(ToPaidMoneyMono,"[支付专用]")>0) Then
|
ToPayID = Mid(ToPaidMoneyMono,1,InStr(ToPaidMoneyMono,"[")-1)
|
Else
|
Response.Write "数据错误 - 3"
|
Response.End()
|
End If
|
End If
|
rs.close()
|
Else
|
Response.Write "数据错误 - 4"
|
Response.End()
|
End If
|
If PayID=ToPayID And PaidMoney<0 Then
|
If PaidMoneyType="3" Then
|
'微信支付退款
|
PaidMoneyRefundURL="https://api.966120.com.cn/weixin/jingnei/example/refund.php?PaidMoneyID="&PaidMoneyID&"&transaction_id="&PayID&"&total_fee="&ToPaidMoney*100&"&refund_fee="&-PaidMoney*100
|
ElseIf PaidMoneyType="4" Then
|
'支付宝退款
|
PaidMoneyRefundURL="https://api.966120.com.cn/alipay/wappay/refund.php?PaidMoneyID="&PaidMoneyID&"&WIDtrade_no="&PayID&"&total_fee="&ToPaidMoney&"&WIDrefund_amount="&-PaidMoney&"&WIDout_request_no="&PaidMoneyID
|
Else
|
Response.Write "数据错误 - 5"
|
Response.End()
|
End If
|
Else
|
Response.Write "数据错误 - 6"
|
Response.End()
|
End If
|
|
'相关受理单
|
If ServiceOrdID<>"" then
|
sql="select * from ServiceOrder where ServiceOrdID="&ServiceOrdID
|
rs.open sql,objConn,1,1
|
If not rs.Eof then
|
ServiceOrdID = rs("ServiceOrdID") '服务单号
|
ServiceOrdClass = rs("ServiceOrdClass") '单据类型
|
ServiceOrdType = rs("ServiceOrdType") '服务单类型
|
ServiceOrdState = rs("ServiceOrdState") '服务单状态
|
ServiceOrdStartDate = rs("ServiceOrdStartDate") '开单日期
|
ServiceOrdApptDate = rs("ServiceOrdApptDate") '预约日期
|
If year(ServiceOrdApptDate)<2010 then ServiceOrdApptDate=""
|
ServiceOrdCoName = rs("ServiceOrdCoName") '联系人姓名
|
ServiceOrdCoPhone = rs("ServiceOrdCoPhone") '联系人电话
|
ServiceOrdCoTies = rs("ServiceOrdCoTies") '联系人与患者关系
|
ServiceOrdPtName = rs("ServiceOrdPtName") '患者姓名
|
ServiceOrdPtAge = rs("ServiceOrdPtAge") '患者年龄
|
ServiceOrdPtSex = rs("ServiceOrdPtSex") '患者性别
|
ServiceOrdPtNat = rs("ServiceOrdPtNat") '患者国籍
|
ServiceOrdPtOutHosp = rs("ServiceOrdPtOutHosp") '转出医院
|
ServiceOrdPtOutHospID = rs("ServiceOrdPtOutHospID") '转出医院ID
|
ServiceOrdPtInHosp = rs("ServiceOrdPtInHosp") '转入医院
|
ServiceOrdPtInHospID = rs("ServiceOrdPtInHospID") '转入医院ID
|
ServiceOrdPtServices = rs("ServiceOrdPtServices") '转出科室
|
ServiceOrdPtServicesID= rs("ServiceOrdPtServicesID") '转出科室ID
|
ServiceOrdPtInServices = rs("ServiceOrdPtInServices") '转入科室
|
ServiceOrdPtInServicesID= rs("ServiceOrdPtInServicesID") '转入科室ID
|
ServiceOrdPtDiagnosis = rs("ServiceOrdPtDiagnosis") '诊断
|
ServiceOrdPtCondition = rs("ServiceOrdPtCondition") '备注
|
ServiceOrdPtDoctor = rs("ServiceOrdPtDoctor") '患者医生
|
ServiceOrdPtDoctorPhone=rs("ServiceOrdPtDoctorPhone") '患者医生电话
|
ServiceOrdTraProvince = rs("ServiceOrdTraProvince") '出发地省份
|
ServiceOrdTraCity = rs("ServiceOrdTraCity") '出发地城市
|
ServiceOrdTraStreet = rs("ServiceOrdTraStreet") '出发地
|
ServiceOrdTraStreetCoo= rs("ServiceOrdTraStreetCoo") '出发地坐标
|
ServiceOrdTraVia = rs("ServiceOrdTraVia") '途经
|
ServiceOrdTraEnd = rs("ServiceOrdTraEnd") '目的地
|
ServiceOrdTraEndCoo = rs("ServiceOrdTraEndCoo") '目的地坐标
|
ServiceOrdTraDistance = rs("ServiceOrdTraDistance") '距离(公里)
|
ServiceOrdTraDuration = rs("ServiceOrdTraDuration") '预计行程时间
|
ServiceOrdTraUnitPrice= rs("ServiceOrdTraUnitPrice") '单价/公里
|
ServiceOrdTraOfferPrice=rs("ServiceOrdTraOfferPrice") '标准报价
|
ServiceOrdTraTxnPrice = rs("ServiceOrdTraTxnPrice") '成交价
|
ServiceOrdTraPaidPrice= rs("ServiceOrdTraPaidPrice") '已支付金额
|
ServiceOrdTraPriceReason=rs("ServiceOrdTraPriceReason")'差价原因
|
ServiceOrd_CC_ID = rs("ServiceOrd_CC_ID") '第一次接单人员ID
|
ServiceOrd_CC_Time = rs("ServiceOrd_CC_Time") '第一次接单时间
|
ServiceOrd_NS_ID = rs("ServiceOrd_NS_ID") '确认服务单人员ID
|
ServiceOrd_NS_Time = rs("ServiceOrd_NS_Time") '确认服务单时间
|
ServiceOrd_AP_Check = rs("ServiceOrd_AP_Check") '服务单审核状态(0未审核,1已审核)
|
ServiceOrd_AP_ID = rs("ServiceOrd_AP_ID") '服务单审核人员ID
|
ServiceOrd_AP_Time = rs("ServiceOrd_AP_Time") '服务单审核时间
|
ServiceOrdIntroducer = rs("ServiceOrdIntroducer") '介绍人
|
ServiceOrd_Sale_ID = rs("ServiceOrd_Sale_ID") '销售人员ID
|
ServiceOrdTaskRemarks = rs("ServiceOrdTaskRemarks") '对医护司备注
|
ServiceOrdOperationRemarks = rs("ServiceOrdOperationRemarks") '调度操作备注
|
ServiceOrdNo = ServiceOrdClass& year(rs("ServiceOrd_CC_Time"))&Right("0"&month(rs("ServiceOrd_CC_Time")),2)&Right("0"&day(rs("ServiceOrd_CC_Time")),2) & "-"&Right("00"&rs("ServiceOrdNo"),3)
|
If IsNumeric(ServiceOrdTraDistance) Then ServiceOrdTraDistance=ServiceOrdTraDistance&"公里"
|
If NEWOrder<>"" Then DispatchOrdPerfomance=ServiceOrdTraTxnPrice
|
End If
|
rs.close()
|
sql="select * from DispatchOrd where DispatchOrdState>0 and ServiceOrdIDDt="&ServiceOrdID
|
rs.open sql,objConn,1,1
|
If not rs.Eof Then
|
DispatchOrdID = rs("DispatchOrdID") '调度单号
|
DispatchOrdClass = rs("DispatchOrdClass") '单据类型
|
ServiceOrdID = rs("ServiceOrdIDDt") '对应受理单号
|
DispatchOrdState = rs("DispatchOrdState") '调度单状态
|
DispatchOrdStartDate = rs("DispatchOrdStartDate") '调度单状态时间
|
DispatchOrd_NS_ID = rs("DispatchOrd_NS_ID")
|
DispatchOrdNo = DispatchOrdClass& year(rs("DispatchOrd_NS_Time"))&Right("0"&month(rs("DispatchOrd_NS_Time")),2)&Right("0"&day(rs("DispatchOrd_NS_Time")),2) & "-"&Right("00"&rs("DispatchOrdNo"),3) '调度单编号
|
End If
|
rs.close()
|
Call OA_Running("打开退款申请:"&ServiceOrdID&" PaidMoneyID:"&PaidMoneyID)
|
End If
|
|
%>
|
<body style="font-size:15px;">
|
<div id="m_Orer">
|
<script src="js/jquery-1.7.1.min.js" type=text/javascript></script>
|
<script>
|
$(document).ready(function(){
|
$('.order_default_status').click(function(){
|
$(".order_all_status").toggle();
|
|
});
|
});
|
</script>
|
<!-- 强制禁止用户修改微信客户端的字体大小---begin--- -->
|
<script>
|
(function() {
|
|
if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
|
handleFontSize();
|
} else {
|
if (document.addEventListener) {
|
document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
|
} else if (document.attachEvent) {
|
document.attachEvent("WeixinJSBridgeReady", handleFontSize);
|
document.attachEvent("onWeixinJSBridgeReady", handleFontSize); }
|
}
|
function handleFontSize() {
|
// 设置网页字体为默认大小
|
WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
|
// 重写设置网页字体大小的事件
|
WeixinJSBridge.on('menu:setfont', function() {
|
WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
|
});
|
}
|
})();
|
</script>
|
<!-- 强制禁止用户修改微信客户端的字体大小---end--- -->
|
<div class="order_head">
|
<div class="order_head_title" style="text-align:left;font-size:16px">退款申请</div>
|
</div>
|
<div class="os_shopname">退款单号:<%=PaidMoneyID%> 状态:<%=AP_Check_A(PaidMoney_AP_Check)%></div>
|
<div class="os_shopname">申请人:<%=OAUser(ToPaidMoneyOaID,"UserName")%> <%=PaidMoneyTime%></div>
|
<%If PaidMoney_AP_ID<>"" Then%>
|
<div class="os_shopname" style="color:red">审核人:<%=OAUser(PaidMoney_AP_ID,"UserName")%> <%=PaidMoney_AP_Time%></div>
|
<%End If%>
|
<div class="os_shopname" style="color:red">退款金额:<%=PaidMoney%>元</div>
|
<div class="os_shopname">退款方式:<%=PaidMoneyType_A(PaidMoneyType)%>原路退回</div>
|
<div class="os_shopname">退款备注:<%=PaidMoneyMono%></div>
|
|
<%If PaidMoneyToId<>"0" And PaidMoneyToId<>"" Then%>
|
<div class="os_shopname"></div>
|
<div class="os_shopname">相关收款单:<%=PaidMoneyToId%></div>
|
<div class="os_shopname">收款金额:<%=ToPaidMoney%>元</div>
|
<div class="os_shopname">收款方式:<%=PaidMoneyType_A(ToPaidMoneyType)%> <%=ToPaidMoneyTime%></div>
|
<div class="os_shopname">收款备注:<%=ToPaidMoneyMono%></div>
|
<%End If%>
|
|
<%If ServiceOrdID<>"0" Then%>
|
<div class="os_shopname"></div>
|
<div class="os_shopname">相关服务单号:<%=ServiceOrdNo%></div>
|
<div class="os_shopname">开单客服:<%=OAUser(ServiceOrd_CC_ID,"UserName")%> 服务状态:<%=ServiceOrdStateA(ServiceOrdState)%></div>
|
<div class="os_shopname">联系人:<%=ServiceOrdCoName%> <%=ServiceOrdCoPhone%><a href="tel:<%=ServiceOrdCoPhone%>" style="color: #1AAD19;">📞点击拨打</a></div>
|
<%
|
If IsNumeric(ServiceOrdPtOutHospID) And ServiceOrdPtOutHospID<>"" Then
|
sql="select HospName,HopsProvince,HopsCity,HopsArea,HospAddress from HospData where HospID="&ServiceOrdPtOutHospID
|
rs.open sql,objConn,1,1
|
If not rs.Eof Then
|
ServiceOrdPtOutHospTXT=rs("HospName")
|
If rs("HospAddress")<>"" Then
|
OutHospAddress=rs("HopsProvince")&rs("HopsCity")&rs("HopsArea")&rs("HospAddress")
|
End If
|
Else
|
ServiceOrdPtOutHospTXT=ServiceOrdPtOutHosp
|
End If
|
rs.close()
|
Else
|
ServiceOrdPtOutHospTXT=ServiceOrdPtOutHosp
|
End If
|
If ServiceOrdPtOutHospTXT="0" Then ServiceOrdPtOutHospTXT=""
|
If IsNumeric(ServiceOrdPtInHospID) And ServiceOrdPtInHospID<>"" Then
|
sql="select HospName,HopsProvince,HopsCity,HopsArea,HospAddress from HospData where HospID="&ServiceOrdPtInHospID
|
rs.open sql,objConn,1,1
|
If not rs.Eof Then
|
ServiceOrdPtInHospTXT=rs("HospName")
|
If rs("HospAddress")<>"" Then
|
InHospAddress=rs("HopsProvince")&rs("HopsCity")&rs("HopsArea")&rs("HospAddress")
|
End If
|
Else
|
ServiceOrdPtInHospTXT=ServiceOrdPtInHosp
|
End If
|
rs.close()
|
Else
|
ServiceOrdPtInHospTXT=ServiceOrdPtInHosp
|
End If
|
If ServiceOrdPtInHospTXT="0" Then ServiceOrdPtInHospTXT=""
|
%>
|
<div class="os_shopname">转出医院:<%=ServiceOrdPtOutHospTXT%></div>
|
<div class="os_shopname">转入医院:<%=ServiceOrdPtInHospTXT%></div>
|
<%If ServiceOrdTaskRemarks<>"" Then%><div class="os_shopname">对医护司备注:<%=ServiceOrdTaskRemarks%></div><%End If%>
|
<%If ServiceOrdOperationRemarks<>"" Then%><div class="os_shopname">调度操作备注:<%=ServiceOrdOperationRemarks%></div><%End If%>
|
<%End If%>
|
|
<%If DispatchOrdID<>"0" Then%>
|
<div class="os_shopname"></div>
|
<div class="os_shopname">相关调度单号:<%=DispatchOrdNo%></div>
|
<div class="os_shopname">调度客服:<%=OAUser(DispatchOrd_NS_ID,"UserName")%> 调度状态:<%=DispatchOrdStateA(DispatchOrdState)%></div>
|
<%End If%>
|
|
|
<div style="height:50px;"></div>
|
<%If PaidMoney_AP_Check=0 And PaidMoney>=-2000 Then%>
|
<div class="posi" id="posi">
|
<div class="ljgm"><a href="javascript:form1_submit_1()" class="bttt" style="color: #fff;background: #9a6d92;font-weight: 700;">确认退款</a></div>
|
<div class="ljgm" style="width: 40%;"><a href="javascript:form1_submit_2()" class="bttt">作废</a></div>
|
</div>
|
<script LANGUAGE="javascript">
|
function form1_submit_1(){
|
$.ajax({
|
type: "POST",
|
dataType:'json',
|
url: "m_PaidMoneyRefund_ajax.gds",
|
data: {
|
PaidMoneyID:<%=PaidMoneyID%>
|
},
|
success:function(data){
|
console.log(data);
|
if (data!='')
|
{
|
if (data.result==0){
|
if(confirm("确定退款?")){window.location.replace('<%=PaidMoneyRefundURL%>');}
|
}else{
|
alert("退款单已处理");
|
}
|
}
|
}
|
})
|
}
|
function form1_submit_2()
|
{
|
if(confirm("确定作废?")){window.location.replace('/admin_save.gds?admin_save=34&PaidMoneyID=<%=PaidMoneyID%>&ReturnID=m&PaidMoney_Check=-1');}
|
}
|
</script>
|
<%End If%>
|
<%If SMT="8" Then
|
If PaidMoney_AP_Check=1 Then%>
|
<script LANGUAGE="javascript">
|
alert('<%=OAUser(PaidMoney_AP_ID,"UserName")%>已经同意退款,退款时间:<%=PaidMoney_AP_Time%>');
|
</script>
|
<%Else%>
|
<script LANGUAGE="javascript">
|
alert("退款接口出错,请如IT部联系");
|
</script>
|
<%End If
|
End If%>
|
</div>
|
|
|
<%
|
'微信JS-SDK
|
timestamp = ToUnixTime(now(),+8)
|
wxnonceStr = "5P1QYH5OEW6BCXTo"
|
wxticket = Getjsapi_ticket()
|
wxurl = WEBURL&Request.ServerVariables("URL")
|
if Request.ServerVariables("QUERY_STRING")<>"" then wxurl=wxurl&"?"&Request.ServerVariables("QUERY_STRING")
|
wxOri = "jsapi_ticket="&wxticket&"&noncestr="&wxnonceStr&"×tamp="×tamp&"&url="&wxurl
|
wxSha1 = hex_sha1(wxOri)
|
%>
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
<script>
|
wx.config({
|
debug: false,
|
appId: '<%=corpid%>',
|
timestamp: <%=timestamp%>,
|
nonceStr: '<%=wxnonceStr%>',
|
signature: '<%=wxSha1%>',
|
jsApiList: [
|
'checkJsApi',
|
'openLocation',
|
'getLocation',
|
'closeWindow',
|
'chooseImage',
|
'uploadImage'
|
]
|
});
|
|
</script>
|
<script src="/js/zepto.min.js"></script>
|
|
|
<script>
|
</script>
|
<IFRAME id="HiddenFrame" name="HiddenFrame" WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=#ffffff></IFRAME>
|
</body>
|
</html>
|