<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<%
|
'Response.Cookies("OA")("adminID")=""
|
'Response.end
|
ServiceOrdID=SafeRequest(Request("ServiceOrdID"))
|
Phone=SafeRequest(Request("Phone"))
|
OrdClass=SafeRequest(Request("OrdClass"))
|
admin_save=SafeRequest(Request("admin_save"))
|
OrdEdit=SafeRequest(Request("OrdEdit"))
|
|
|
NEWOrder=SafeRequest(Request("NEWOrder"))
|
'各种返回信息
|
SystemMessageType=trim(Request("SystemMessageType"))
|
SMT=trim(Request("SMT"))
|
error=trim(Request("error"))
|
if SystemMessageType<>"" then
|
if SMT="1" then
|
SystemMessageTXT="数据不完整!!"
|
elseif SMT="2" then
|
SystemMessageTXT="请不要重复提交单据!!"
|
elseif SMT="3" then
|
SystemMessageTXT="保存完成!!"
|
elseif SMT="4" then
|
SystemMessageTXT="数据不足,请按要求填写或先保存为[咨询单]!!"
|
elseif SMT="5" then
|
SystemMessageTXT="服务单审核完成!!"
|
elseif SMT="6" then
|
SystemMessageTXT="服务单反审核完成!!"
|
elseif SMT="7" then
|
SystemMessageTXT="生成服务单完成!!"
|
elseif SMT="8" then
|
SystemMessageTXT="取消服务单完成!!"
|
elseif SMT="9" then
|
SystemMessageTXT="作废咨询单完成!!"
|
elseif SMT="10" then
|
SystemMessageTXT="还原服务单完成!!"
|
elseif SMT="11" then
|
SystemMessageTXT="短信已发送!!"
|
elseif SMT="12" then
|
SystemMessageTXT="手机本月多次提交订单!!"
|
elseif SMT="22" then
|
SystemMessageTXT="请选择需要操作的单据"
|
elseif SMT="23" then
|
SystemMessageTXT="费用单审核完成!!"
|
elseif SMT="24" then
|
SystemMessageTXT="费用单反审核完成!!"
|
elseif SMT="25" then
|
SystemMessageTXT="费用单作废完成!!"
|
elseif SMT="35" then
|
SystemMessageTXT="费用单新建完成!!"
|
elseif SMT="40" then
|
SystemMessageTXT="操作留言保存完成!!"
|
elseif SMT="41" then
|
SystemMessageTXT="操作留言删除完成!!"
|
Else
|
SystemMessageTXT=SMT
|
end if
|
end If
|
|
If session("Origin")<>"" Then
|
'保存错误返回字段
|
Origin = session("Origin")
|
session("Origin")=""
|
OriginSP = SPLIT(Origin,"|")
|
For i=1 to UBOUND(OriginSP)
|
OriginSPv=SPLIT(OriginSP(i),"=")
|
If UBOUND(OriginSPv)=1 then
|
v=OriginSPv(0)
|
t=OriginSPv(1)
|
Execute( v & "= """&t&""" ")
|
End If
|
Next
|
End if
|
|
OrderLevel=0
|
closeWindow=SafeRequest(Request("closeWindow"))
|
state=request("state")
|
If state<>"" Then
|
stateSP=split(state,"|")
|
for i = 0 to UBOUND(stateSP)
|
If InStr(stateSP(i),"ServiceOrdID=")=1 Then
|
ServiceOrdID=Replace(stateSP(i),"ServiceOrdID=","")
|
ElseIf InStr(stateSP(i),"closeWindow=")=1 Then
|
closeWindow=Replace(stateSP(i),"closeWindow=","")
|
ElseIf InStr(stateSP(i),"NEWOrder=")=1 Then
|
NEWOrder=Replace(stateSP(i),"NEWOrder=","")
|
End If
|
Next
|
End If
|
if NEWOrder="" And ServiceOrdID="" then Response.Redirect "/"
|
If NEWOrder<>"" then
|
state=NEWOrder
|
Else
|
state=ServiceOrdID
|
End If
|
%>
|
<!--#include virtual="/weixin/OAuth2.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<!--#include virtual="/weixin/sha1.gds"-->
|
<%
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
If ServiceOrdID<>"" And NEWOrder="" Then
|
sql="select * from ServiceOrder where ServiceOrdID="&ServiceOrdID
|
rs.open sql,objConn,1,1
|
If not rs.Eof then
|
ServiceOrdID = rs("ServiceOrdID") '服务单号
|
ServiceOrdUserID = rs("ServiceOrdUserID") '用户ID
|
ServiceOrdClass = rs("ServiceOrdClass") '单据类型
|
ServiceOrdAreaType = rs("ServiceOrdAreaType")
|
ServiceOrdType = rs("ServiceOrdType") '服务单类型
|
ServiceOrdState = rs("ServiceOrdState") '服务单状态
|
ServiceOrdStartDate = rs("ServiceOrdStartDate") '开单日期
|
ServiceOrdApptDate = rs("ServiceOrdApptDate") '预约日期
|
ServiceOrdCoName = rs("ServiceOrdCoName") '联系人姓名
|
ServiceOrdCoPhone = rs("ServiceOrdCoPhone") '联系人电话
|
ServiceOrdCoTies = rs("ServiceOrdCoTies") '联系人与患者关系
|
ServiceOrdPtName = rs("ServiceOrdPtName") '患者姓名
|
ServiceOrdPtAge = rs("ServiceOrdPtAge") '患者年龄
|
ServiceOrdPtKG = rs("ServiceOrdPtKG") '患者体重
|
ServiceOrdPtSex = rs("ServiceOrdPtSex") '患者性别
|
ServiceOrdPtIDCard = rs("ServiceOrdPtIDCard") '患者身份证
|
ServiceOrdPtNat = rs("ServiceOrdPtNat") '患者国籍
|
ServiceOrdPtOutHospID = rs("ServiceOrdPtOutHospID") '转出医院ID
|
ServiceOrdPtOutHosp = rs("ServiceOrdPtOutHosp") '转出医院
|
ServiceOrdPtInHospID = rs("ServiceOrdPtInHospID") '转入医院ID
|
ServiceOrdPtInHosp = rs("ServiceOrdPtInHosp") '转入医院
|
ServiceOrdPtServices = rs("ServiceOrdPtServices") '转出科室
|
ServiceOrdPtServicesID=rs("ServiceOrdPtServicesID") '转出科室ID
|
ServiceOrdPtInServices = rs("ServiceOrdPtInServices") '转入科室
|
ServiceOrdPtInServicesID=rs("ServiceOrdPtInServicesID") '转入科室ID
|
ServiceOrdPtDiagnosis = rs("ServiceOrdPtDiagnosis") '诊断
|
ServiceOrdTaskRemarks = rs("ServiceOrdTaskRemarks") '对医护司备注
|
|
ServiceOrdPtCondition = rs("ServiceOrdPtCondition") '备注
|
ServiceOrdPtDoctor = rs("ServiceOrdPtDoctor") '患者医生
|
ServiceOrdPtDoctorPhone=rs("ServiceOrdPtDoctorPhone") '患者医生电话
|
ServiceOrdTraProvince = rs("ServiceOrdTraProvince") '出发地省份
|
ServiceOrdTraCity = rs("ServiceOrdTraCity") '出发地城市
|
ServiceOrdTraStreet = rs("ServiceOrdTraStreet") '出发地
|
ServiceOrdTraStreetCoo= rs("ServiceOrdTraStreetCoo") '出发地坐标
|
ServiceOrdTraEnd = rs("ServiceOrdTraEnd") '目的地
|
ServiceOrdTraEndCoo = rs("ServiceOrdTraEndCoo") '目的地坐标
|
ServiceOrdTraVia = rs("ServiceOrdTraVia") '途经地
|
ServiceOrdTraDistance = rs("ServiceOrdTraDistance") '距离(公里)
|
ServiceOrdTraDuration = rs("ServiceOrdTraDuration") '预计行程时间
|
ServiceOrdTraUnitPrice= rs("ServiceOrdTraUnitPrice") '单价/公里
|
ServiceOrdTraOfferPrice=rs("ServiceOrdTraOfferPrice") '标准报价
|
ServiceOrdTraTxnPrice = rs("ServiceOrdTraTxnPrice") '成交价
|
ServiceOrdTraPrePayment=rs("ServiceOrdTraPrePayment") '需预付款金额
|
SettlementPrice = rs("SettlementPrice") '结算价
|
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") '服务单审核时间
|
ServiceOrd_CC_ID = rs("ServiceOrd_CC_ID") '服务单客服人员ID
|
ServiceOrd_Sale_ID = rs("ServiceOrd_Sale_ID") '服务单销售人员ID
|
ServiceOrdIntroducer= rs("ServiceOrdIntroducer") '服务单介绍人
|
ServiceOrdCancelReason= rs("ServiceOrdCancelReason")
|
ServiceOrdCancelReasonTXT= rs("ServiceOrdCancelReasonTXT")
|
ServiceOrdUnitID = rs("ServiceOrdUnitID") '第三方ID
|
ServiceOrdUnitRemarks = rs("ServiceOrdUnitRemarks") '第三方订单备注
|
PayQRcodeURL = rs("PayQRcodeURL") '第三方支付链接
|
ServiceOrdVisit = rs("ServiceOrdVisit") '回访记录
|
ServiceOrdVisit_time = rs("ServiceOrdVisit_time") '回访时间
|
ServiceOrdVisit_ID = rs("ServiceOrdVisit_ID") '回访人员ID
|
ServiceOrdSource = rs("ServiceOrdSource") '订单来源(OrdSource)
|
ServiceOrdOperationRemarks= rs("ServiceOrdOperationRemarks") '操作备注项
|
ServiceOrdEstimatedOrderDate=rs("ServiceOrdEstimatedOrderDate")'预计派单时间
|
OrderLevel = rs("OrderLevel") '查看等级
|
ConditionLevel = rs("ConditionLevel") '病重级别
|
DirectionType = rs("DirectionType") '转运去向
|
Guest_openid = rs("Guest_openid")
|
Guest_Reward = rs("Guest_Reward")
|
Guest_Point = rs("Guest_Point")
|
RV_Point = rs("RV_Point")
|
Guest_Evaluate = rs("Guest_Evaluate")
|
Guest_Impression = rs("Guest_Impression")
|
Guest_Time = rs("Guest_Time")
|
FromHQ2_is = rs("FromHQ2_is")
|
IsLocking = rs("IsLocking") '财务锁定
|
ServiceOrdUserUpdateTime= rs("ServiceOrdUserUpdateTime")'客人更新资料时间
|
If IsNumeric(ServiceOrdTraDistance) Then ServiceOrdTraDistance=ServiceOrdTraDistance&"公里"
|
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)
|
'通知已阅标记
|
sql="update ServiceOrd_Message set MessageToState=1,MessageToStateTime=GETDATE() where ServiceOrdIDDt="&ServiceOrdID&" and MessageToOAid="&session("adminID")&" and MessageToState=0 and MessageState=1"
|
objConn.Execute sql
|
|
rs.close()
|
sql="select TransferModeID from ServiceOrd_TransferMode where ServiceOrdTMID="&ServiceOrdID
|
rs.open sql,objConn,1,1
|
do while not rs.Eof
|
TransferModeID=TransferModeID&","&rs(0)
|
rs.movenext
|
Loop
|
If TransferModeID<>"" Then TransferModeID=Mid(TransferModeID,2)
|
|
If InStr(session("admin_OrderClass"),ServiceOrdClass)>0 Or isDepartment("070109")=1 Then
|
Call OA_Running("手机端打开服务单:"&ServiceOrdNo&" ID:"&ServiceOrdID)
|
Else
|
Call OA_Running("手机端打开服务单失败:"&ServiceOrdNo&" ID:"&ServiceOrdID)
|
Response.Redirect "/"
|
Response.End()
|
End If
|
End If
|
rs.close()
|
|
'相关调度单
|
sql="select DispatchOrdID,DispatchOrdState,DispatchOrd_AP_Check,DispatchOrd_NS_ID,DispatchOrd_AP_ID from DispatchOrd where DispatchOrdState not in (10) and ServiceOrdIDDt="&ServiceOrdID
|
rs.open sql,objConn,1,1
|
If not rs.Eof Then
|
DispatchOrdID = rs("DispatchOrdID")
|
DispatchOrdState= rs("DispatchOrdState")
|
DispatchOrd_AP_Check= rs("DispatchOrd_AP_Check")
|
DispatchOrd_NS_ID= rs("DispatchOrd_NS_ID")
|
DispatchOrd_AP_ID= rs("DispatchOrd_AP_ID")
|
End If
|
rs.close()
|
|
End If
|
|
'操作人员是否相关人员
|
is_AdminOrd=0
|
If ServiceOrd_CC_ID<>"" And is_AdminOrd=0 Then
|
If CInt(session("adminID"))=CInt(ServiceOrd_CC_ID) Then
|
is_AdminOrd=1
|
End If
|
End If
|
If ServiceOrd_NS_ID<>"" And is_AdminOrd=0 Then
|
If CInt(session("adminID"))=CInt(ServiceOrd_NS_ID) Then
|
is_AdminOrd=1
|
End If
|
End If
|
If ServiceOrd_AP_ID<>"" And is_AdminOrd=0 Then
|
If CInt(session("adminID"))=CInt(ServiceOrd_AP_ID) Then
|
is_AdminOrd=1
|
End If
|
End If
|
If DispatchOrd_NS_ID<>"" And is_AdminOrd=0 Then
|
If CInt(session("adminID"))=CInt(DispatchOrd_NS_ID) Then
|
is_AdminOrd=1
|
End If
|
End If
|
If DispatchOrd_AP_ID<>"" And is_AdminOrd=0 Then
|
If CInt(session("adminID"))=CInt(DispatchOrd_AP_ID) Then
|
is_AdminOrd=1
|
End If
|
End If
|
If isDepartment("020112")=1 And is_AdminOrd=0 Then
|
is_AdminOrd=1
|
End If
|
is_AdminOrd=1
|
|
'默认字段
|
If ServiceOrdStartDate="" Then ServiceOrdStartDate=now()
|
If ServiceOrdClass="" Then
|
If session("admin_OrderClass")<>"" Then
|
OA_OrderClassIDSP = SPLIT(session("admin_OrderClass"),",")
|
for i = 0 to UBOUND(OA_OrderClassIDSP)
|
sql="select vID,vtext,vOrder2 from dictionary where vType=1 and vtitle='OrderClass' and vOrder2='"&Trim(OA_OrderClassIDSP(i))&"' order by vOrder"
|
rs.open sql,objConn,1,1
|
if not rs.Eof Then
|
ServiceOrdClass=rs("vOrder2")
|
End If
|
rs.close()
|
if ServiceOrdClass<>"" Then Exit For
|
next
|
Else
|
ServiceOrdClass="BF"
|
End If
|
End If
|
If ServiceOrdState="" Or (ServiceOrdState="2" And ServiceOrdID="") Then ServiceOrdState=1
|
If OrdClass<>"" Then
|
ServiceOrdClass=OrdClass
|
OrdClassName=OrderClassA(OrdClass)
|
Else
|
OrdClass=ServiceOrdClass
|
OrdClassName=OrderClassA(OrdClass)
|
End If
|
If ServiceOrdID="" Then
|
ServiceOrdID_TXT="[系统自动生成]"
|
Else
|
ServiceOrdID_TXT=ServiceOrdNo
|
End If
|
ServiceOrdStateTXT=ServiceOrdStateA(ServiceOrdState)
|
If TransferModeID="" Then TransferModeID="1"
|
|
If NEWOrder="2" then
|
order_head_title="新建调度单"
|
Else
|
order_head_title="服务单:"&ServiceOrdNo&" "&ServiceOrdStateTXT
|
End If
|
%>
|
<!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><%=ServiceOrdStateTXT%></title>
|
<link href="css/main.css" type="text/css" rel="stylesheet">
|
<style>
|
.os_shopname{ line-height:45px; font-weight:700; margin-left:10px; border-bottom:1px solid #f1f1f1}
|
</style>
|
</head>
|
|
<body style="font-size:15px;">
|
<div id="m_Orer">
|
<script src="js/jquery-1.7.1.min.js" type=text/javascript></script>
|
<script src="js/IDCard.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"><%=order_head_title%></div>
|
</div>
|
<%If SystemMessageTXT<>"" Then Response.Write "<script>alert('"&SystemMessageTXT&"');</script>"%>
|
<%If OrderLevel<>1 Or isDepartment("020111")=1 Then%>
|
<form id="form1" name="form1" action="admin_save.gds" method="post" onsubmit="return check()">
|
<input name="admin_save" type="hidden" value="">
|
<input name="ServiceOrdID" type="hidden" value="<%=ServiceOrdID%>">
|
<input name="DispatchOrdID" type="hidden" value="<%=DispatchOrdID%>">
|
<input name="ServiceOrdState" type="hidden" value="<%=ServiceOrdState%>">
|
<input name="ServiceOrdStartDate" type="hidden" value="<%=ServiceOrdStartDate%>">
|
<input name="TransferModeID" type="hidden" value="<%=TransferModeID%>">
|
<input name="ServiceOrdTraDistance" type="hidden" value="<%=ServiceOrdTraDistance%>">
|
<input name="SettlementPrice" type="hidden" value="<%=SettlementPrice%>">
|
<input name="ServiceOrd_m" type="hidden" value="1">
|
<input name="NEWOrder" type="hidden" value="<%=NEWOrder%>">
|
<input name="PaidMoneyTimestamp" id="PaidMoneyTimestamp" type="hidden" value="<%=ToUnixTime(now(),+8)%>">
|
<input name="ServiceOrd_CC_ID" type="hidden" value="<%=ServiceOrd_CC_ID%>">
|
<input name="ServiceOrd_Sale_ID" type="hidden" value="<%=ServiceOrd_Sale_ID%>">
|
<input name="ServiceOrdIntroducer" type="hidden" value="<%=ServiceOrdIntroducer%>">
|
<input name="ServiceOrdSource" type="hidden" value="<%=ServiceOrdSource%>">
|
<input name="FromHQ2_is" type="hidden" value="<%=FromHQ2_is%>">
|
<div class="os_shopname" style="color:red">
|
单据类型:
|
<select name="ServiceOrdAreaType" id="ServiceOrdAreaType" style="height:28px;font-size:15px;" class="select">
|
<%
|
sql="select vID,vtext from dictionary where vtitle='ServiceOrdAreaType' and vType=1 order by vOrder"
|
rs.open Sql,objConn,1,1
|
do while not rs.Eof%>
|
<option value="<%=rs("vID")%>"<%if ServiceOrdAreaType=rs("vID") then Response.Write " selected"%>><%=rs("vtext")%></option>
|
<%rs.movenext
|
Loop
|
rs.close()%>
|
</select>
|
<select name="ServiceOrdType" id="ServiceOrdType" style="height:28px;font-size:15px;" class="select">
|
<%If ServiceOrdClass="AB" Then OrdClassSql=" and vID=5 "
|
If InStr(admin_OrderClass,"BF")>=0 And (ServiceOrdClass="" Or ServiceOrdClass="BF") Then
|
sql="select vID,vtext from dictionary where vtitle='ServiceOrderType' and vType>=1 "&OrdClassSql&" order by vOrder"
|
Else
|
sql="select vID,vtext from dictionary where vtitle='ServiceOrderType' and vType=1 "&OrdClassSql&" order by vOrder"
|
End If
|
rs.open Sql,objConn,1,1
|
do while not rs.Eof%>
|
<option value="<%=rs("vID")%>"<%if ServiceOrdType=rs("vID") then Response.Write " selected"%>><%=rs("vtext")%></option>
|
<%rs.movenext
|
Loop
|
rs.close()%>
|
</select>
|
|
<%If ServiceOrdID="" Or ServiceOrdUnitID<>"0" Then%>
|
<select name="ServiceOrdClass" id="ServiceOrdClass" style="height:28px;font-size:15px;width: 120px;" class="select" onchange="form1_FromLatLng()">
|
<%admin_OrderClassPS=SPLIT(admin_OrderClass,",")
|
isOrderClass=0
|
ClassLatLngS=""
|
for z = 0 to UBOUND(admin_OrderClassPS)
|
If OrderClassB(admin_OrderClassPS(z),"vType")="1" Then
|
sql="select ServiceAddress_lat,ServiceAddress_lng from IntroducerUnitData where UnitState>0 and ServiceAddress_lat is not null and ServiceAddress_lng is not null and ServiceBranch='"&admin_OrderClassPS(z)&"'"
|
rs.open sql,objConn,1,1
|
if not rs.Eof Then
|
ClassLatLng=rs("ServiceAddress_lat")&","&rs("ServiceAddress_lng")
|
Else
|
ClassLatLng=""
|
End If
|
rs.close()
|
ClassLatLngS=ClassLatLngS&"|"&admin_OrderClassPS(z)&";"&ClassLatLng
|
If ServiceOrdClass=admin_OrderClassPS(z) Then
|
isOrderClass=1
|
FromLatLng=ClassLatLng
|
End If%>
|
<option value="<%=admin_OrderClassPS(z)%>"<%if ServiceOrdClass=admin_OrderClassPS(z) then Response.Write " selected"%>><%=OrderClassB(admin_OrderClassPS(z),"vtext")%></option>
|
<%End If
|
Next
|
If isOrderClass=0 Then%>
|
<option value="<%=ServiceOrdClass%>" selected><%=OrderClassB(ServiceOrdClass,"vtext")%></option>
|
<%
|
End If
|
%>
|
</select>
|
<script LANGUAGE="javascript">
|
function form1_FromLatLng(){
|
OrdClass = document.form1.ServiceOrdClass.value;
|
FromLatLng='';
|
<%ClassLatLngPS=SPLIT(ClassLatLngS,"|")
|
for z = 1 to UBOUND(ClassLatLngPS)
|
ClassLatLngPSs=SPLIT(ClassLatLngPS(z),";")
|
%>
|
if(OrdClass=='<%=ClassLatLngPSs(0)%>') {
|
FromLatLng='<%=ClassLatLngPSs(1)%>';
|
}
|
<%Next%>
|
document.form1.FromLatLng.value = FromLatLng;
|
lbs_driving();
|
}
|
</script>
|
<%Else
|
sql="select ServiceAddress_lat,ServiceAddress_lng from IntroducerUnitData where UnitState>0 and ServiceBranch='"&ServiceOrdClass&"'"
|
rs.open sql,objConn,1,1
|
if not rs.Eof Then
|
FromLatLng=rs("ServiceAddress_lat")&","&rs("ServiceAddress_lng")
|
End If
|
rs.close()
|
%>
|
<input name="ServiceOrdClass" type="hidden" value="<%=ServiceOrdClass%>">
|
<input type="text" name="ServiceOrdClassTXT" class="small valid" style="width:112px;float:none;height:24px;" value="<%=OrderClassB(ServiceOrdClass,"vtext")%>" readonly="true">
|
<%End If%>
|
</div>
|
<%If FromHQ2_is="1" then%>
|
<div class="os_shopname">任务类型:分部支援总部执行任务</div>
|
<%End If%>
|
<%
|
'敏感信息处理
|
If isDepartment("020109")=0 And session("Power_"&ServiceOrdID)<>"1" And (DispatchOrdID<>"" or ServiceOrdID<>"") And (ServiceOrdClass="BF") Then
|
sql="select MID from ServiceOrd_Message where ServiceOrdIDDt="&ServiceOrdID&" and MessageState>0 and MessageToOAid="&session("adminID")
|
rs.open sql,objConn,1,1
|
if not rs.eof Then
|
is_Privacy="YES"
|
Else
|
is_Privacy="NO"
|
If ServiceOrdCoName<>"" Then ServiceOrdCoName="【隐】"
|
If ServiceOrdCoPhone<>"" Then ServiceOrdCoPhone="【隐】"
|
If ServiceOrdPtAge<>"" Then ServiceOrdPtAge="【隐】"
|
If ServiceOrdPtName<>"" Then ServiceOrdPtName="【隐】"
|
If ServiceOrdPtServicesID<>"" And ServiceOrdPtServicesID<>"0" Then ServiceOrdPtServicesID="-2"
|
If ServiceOrdPtServices<>"" Then ServiceOrdPtServices="【隐】"
|
If ServiceOrdPtInServicesID<>"" And ServiceOrdPtInServicesID<>"0" Then ServiceOrdPtInServicesID="-2"
|
If ServiceOrdPtInServices<>"" Then ServiceOrdPtInServices="【隐】"
|
End If
|
rs.close()
|
|
End If
|
%>
|
|
<input name="FromLatLng" id="FromLatLng" type="hidden" value="<%=FromLatLng%>">
|
<input name="WaypointsLatLng" type="hidden" value="">
|
<input name="ToLatLng" type="hidden" value="">
|
<div class="os_shopname" style="color:red">患者姓名:<input type="text" id="ServiceOrdPtName" name="ServiceOrdPtName" style="width:162px;border: none;font-size: 15px;" value="<%=ServiceOrdPtName%>" placeholder="____________________________________" onchange="upperCase(this.name)"><label style="color: #ff0000;">*</label></div>
|
<div class="os_shopname" style="color:red">联系人姓名:<input type="text" id="ServiceOrdCoName" name="ServiceOrdCoName" style="width:150px;border: none;font-size: 15px;" value="<%=ServiceOrdCoName%>" placeholder="____________________________________" onchange="upperCase(this.name)"><label style="color: #ff0000;">*</label></div>
|
<%If ServiceOrdCoPhone<>"" then%>
|
<div class="os_shopname" style="color:red">
|
<select id="CoPhoneType" style="height:28px;font-size:15px;" class="select" onchange="validatemobile(document.getElementById('ServiceOrdCoPhone').value);">
|
<option value="1"<%if ServiceOrdCoPhone="" Or left(ServiceOrdCoPhone,1)="1" then Response.Write " selected"%>>手机号码:</option>
|
<option value="2"<%if (left(ServiceOrdCoPhone,1)="0" Or (ServiceOrdCoPhone<>"" And left(ServiceOrdCoPhone,1)<>"1")) And left(ServiceOrdCoPhone,2)<>"00" then Response.Write " selected"%>>固定号码:</option>
|
<option value="3"<%if left(ServiceOrdCoPhone,2)="00" then Response.Write " selected"%>>港澳台国外:</option>
|
</select>
|
<input type="number" id="ServiceOrdCoPhone" name="ServiceOrdCoPhone" style="width:150px;border: none;font-size: 15px;" value="<%=ServiceOrdCoPhone%>" placeholder="____________________________________" onchange="upperCase(this.name);validatemobile(this.value);"><label style="color: #ff0000;">*</label> <a href="tel:<%=ServiceOrdCoPhone%>" style="color: #1AAD19;">📞点击拨打</a></div>
|
<%else%>
|
<div class="os_shopname" style="color:red">
|
<select id="CoPhoneType" style="height:28px;font-size:15px;" class="select" onchange="validatemobile(document.getElementById('ServiceOrdCoPhone').value);">
|
<option value="1"<%if ServiceOrdCoPhone="" Or left(ServiceOrdCoPhone,1)="1" then Response.Write " selected"%>>手机号码:</option>
|
<option value="2"<%if (left(ServiceOrdCoPhone,1)="0" Or (ServiceOrdCoPhone<>"" And left(ServiceOrdCoPhone,1)<>"1")) And left(ServiceOrdCoPhone,2)<>"00" then Response.Write " selected"%>>固定号码:</option>
|
<option value="3"<%if left(ServiceOrdCoPhone,2)="00" then Response.Write " selected"%>>港澳台国外:</option>
|
</select>
|
<input type="number" id="ServiceOrdCoPhone" name="ServiceOrdCoPhone" style="width:150px;border: none;font-size: 15px;" value="<%=ServiceOrdCoPhone%>" placeholder="____________________________________" onchange="upperCase(this.name);validatemobile(this.value);"><label style="color: #ff0000;">*</label></div>
|
<%End If%>
|
<script type="text/javascript">
|
function validatemobile(mobile) {
|
var CoPhoneType=document.getElementById("CoPhoneType").value;
|
if (CoPhoneType=='1')
|
{
|
if(mobile.length==0) {
|
document.getElementById("posi").style.display="";
|
return false;
|
}
|
if(mobile.length!=11) {
|
alert("请输入有效的手机号码,需是11位!");
|
document.getElementById("posi").style.display="none";
|
return false;
|
}
|
var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(17[0-9]{1})|(18[0-9]{1})|(19[0-9]{1}))+\d{8})$/;
|
if(!myreg.test(mobile)) {
|
document.getElementById("posi").style.display="none";
|
alert("请输入有效的手机号码!");
|
return false;
|
}
|
}else if (CoPhoneType=='2' || CoPhoneType=='3')
|
{
|
if(mobile.length==0) {
|
document.getElementById("posi").style.display="";
|
return false;
|
}
|
if(mobile.length<8) {
|
alert("请输入有效的电话号码!");
|
document.getElementById("posi").style.display="none";
|
return false;
|
}
|
}
|
|
document.getElementById("posi").style.display="";
|
}
|
</script>
|
<%If ServiceOrdApptDate<>"" And ServiceOrdApptDate<>"1900/1/1" And Not isnull(ServiceOrdApptDate) then%>
|
<input name="ServiceOrdApptDate" type="hidden" value="<%=ServiceOrdApptDate%>">
|
<div class="os_shopname" style="color:red">客户预约时间:<%=ServiceOrdApptDate%></div>
|
<%End If%>
|
<%If ServiceOrdTaskRemarks<>"" then%>
|
<input name="ServiceOrdTaskRemarks" type="hidden" value="<%=ServiceOrdTaskRemarks%>">
|
<div class="os_shopname">医护司备注:<%=ServiceOrdTaskRemarks%></div>
|
<%End If%>
|
<%If ServiceOrdOperationRemarks<>"" then%>
|
<input name="ServiceOrdOperationRemarks" type="hidden" value="<%=ServiceOrdOperationRemarks%>">
|
<div class="os_shopname">操作备注:<%=ServiceOrdOperationRemarks%></div>
|
<%End If%>
|
<div class="os_shopname">与患者关系:<input type="text" id="ServiceOrdCoTies" name="ServiceOrdCoTies" style="width:150px;border: none;font-size: 15px;" value="<%=ServiceOrdCoTies%>" placeholder="____________________________________" onchange="upperCase(this.name)"></div>
|
<div class="os_shopname">
|
<input type="radio" name="IsPtIDCard" id="IsPtIDCard_1" value="1" onchange="js_IsPtIDCard(this.name)"<%if Len(ServiceOrdPtIDCard)="18" Or Len(ServiceOrdPtIDCard)="15" Or ServiceOrdPtIDCard="" then Response.Write " checked"%>><label class="input-small" for="IsPtIDCard_1"> 已领取身份证</label> <input type="radio" name="IsPtIDCard" id="IsPtIDCard_2" value="2" onchange="js_IsPtIDCard(this.name)"<%if Len(ServiceOrdPtIDCard)<>"18" and Len(ServiceOrdPtIDCard)<>"15" and ServiceOrdPtIDCard<>"" then Response.Write " checked"%>><label class="input-small" for="IsPtIDCard_2"> 未领取身份证</label>
|
国籍:<input type="text" id="ServiceOrdPtNat" name="ServiceOrdPtNat" style="width:48px;border: none;font-size: 15px;text-align:center;" value="<%=ServiceOrdPtNat%>" placeholder="中国" onchange="upperCase(this.name)">
|
</div>
|
<div class="os_shopname">
|
<label for="input-small" id="IDCardName"><%if Len(ServiceOrdPtIDCard)="18" Or Len(ServiceOrdPtIDCard)="15" then%>患者出生日期:<%else%>患者身份证:<%End If%></label>
|
<input type="text" id="ServiceOrdPtIDCard" name="ServiceOrdPtIDCard" style="width:168px;border: none;font-size: 15px;" value="<%=ServiceOrdPtIDCard%>" placeholder="________________________" onchange="upperCase(this.name);js_checkCard(this.name);">
|
<label class="input-small" id="IDCardError"></label>
|
<script LANGUAGE="javascript">
|
function js_IsPtIDCard() {
|
IsPtIDCard=document.form1.IsPtIDCard.value;
|
if (IsPtIDCard=="1"){
|
document.getElementById("IDCardName").innerHTML="患者身份证:";
|
IDCard=document.getElementById("ServiceOrdPtIDCard").value;
|
checkCard(IDCard);
|
}else{
|
document.getElementById("IDCardName").innerHTML="患者出生日期:";
|
document.getElementById("IDCardError").innerHTML="";
|
}
|
}
|
function js_checkCard(CardName) {
|
IDCard=document.getElementById(CardName).value;
|
IsPtIDCard=document.form1.IsPtIDCard.value;
|
//console.log(IDCard);
|
if (IsPtIDCard=="1"){
|
checkCard(IDCard);
|
}
|
//console.log(IsPtIDCard);
|
}
|
</script>
|
</div>
|
<div class="os_shopname">患者年龄:<input type="number" id="ServiceOrdPtAge" name="ServiceOrdPtAge" style="width:48px;border: none;font-size: 15px;text-align:center;" value="<%=ServiceOrdPtAge%>" placeholder="______" onchange="upperCase(this.name)"> 性别:<input type="text" id="ServiceOrdPtSex" name="ServiceOrdPtSex" style="width:48px;border: none;font-size: 15px;text-align:center;" value="<%=ServiceOrdPtSex%>" placeholder="______" onchange="upperCase(this.name)"> 体重(KG):<input type="text" id="ServiceOrdPtKG" name="ServiceOrdPtKG" style="width:48px;border: none;font-size: 15px;text-align:center;" value="<%=ServiceOrdPtKG%>" placeholder="______" onchange="upperCase(this.name)"></div>
|
|
<input name="ServiceOrdPtOutHospID" id="ServiceOrdPtOutHospID" type="hidden" value="<%=ServiceOrdPtOutHospID%>">
|
<input name="ServiceOrdPtServicesID" id="ServiceOrdPtServicesID" type="hidden" value="<%=ServiceOrdPtServicesID%>">
|
<%'医院字典
|
OutHospAddress=""
|
OutHospAddress=ServiceOrdTraVia
|
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 ServiceOrdPtServicesID<>"0" And ServiceOrdPtServicesID<>"" Then
|
sql="select vId,vtext from dictionary where vType=1 and vtitle='HospitalDepartment' and vID="&ServiceOrdPtServicesID&" order by vOrder"
|
rs.open sql,objConn,1,1
|
If not rs.Eof Then
|
HospDepartmentName=rs(1)
|
End If
|
rs.close()
|
End If
|
%>
|
<div class="os_shopname" style="color:red">转出医院:<input type="text" id="ServiceOrdPtOutHosp" name="ServiceOrdPtOutHosp" style="width:230px;border: none;font-size: 15px;" value="<%=ServiceOrdPtOutHospTXT%>" onclick="showHosp('ServiceOrdPtOutHosp')" readonly="true" placeholder="____________________________________"><label style="color: #ff0000;">*</label></div>
|
<div class="os_shopname" style="color:red;display: none;" id="ServiceOrdPtOutHosp_Tra">详细地址:<input type="text" id="ServiceOrdPtOutHosp_TraTXT" name="ServiceOrdTraVia" style="width:230px;border: none;font-size: 15px;" value="<%=ServiceOrdTraVia%>" placeholder="____________________________________" onchange="lbs_distance('ServiceOrdPtOutHosp',document.getElementById('ServiceOrdPtOutHosp_TraTXT').value);"><label style="color: #ff0000;">*</label></div>
|
<%If ServiceOrdPtOutHospTXT="家中" Then
|
HomeAddress=ServiceOrdTraVia
|
%>
|
<script language="javascript">ServiceOrdPtOutHosp_Tra.style.display="block";</script>
|
<%End If%>
|
<div class="os_shopname">转出科室:<input type="text" id="HospDepartmentName" name="HospDepartmentName" style="width:80px;border: none;font-size: 15px;" value="<%=HospDepartmentName%>" onclick="showHospDepartment('ServiceOrdPtServicesID','HospDepartmentName');" readonly="true" placeholder="____________________________________">
|
床位:<input type="text" id="ServiceOrdPtServices" name="ServiceOrdPtServices" style="width:100px;border: none;font-size: 15px;" value="<%=ServiceOrdPtServices%>" placeholder="____________________________________" onchange="upperCase(this.name)">
|
</div>
|
|
<input name="ServiceOrdPtInHospID" id="ServiceOrdPtInHospID" type="hidden" value="<%=ServiceOrdPtInHospID%>">
|
<input name="ServiceOrdPtInServicesID" id="ServiceOrdPtInServicesID" type="hidden" value="<%=ServiceOrdPtInServicesID%>">
|
<%'医院字典
|
InHospAddress=""
|
InHospAddress=ServiceOrdTraEnd
|
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=""
|
If ServiceOrdPtInServicesID<>"0" And ServiceOrdPtInServicesID<>"" Then
|
sql="select vId,vtext from dictionary where vType=1 and vtitle='HospitalDepartment' and vID="&ServiceOrdPtInServicesID&" order by vOrder"
|
rs.open sql,objConn,1,1
|
If not rs.Eof Then
|
HospInDepartmentName=rs(1)
|
End If
|
rs.close()
|
End If
|
%>
|
<div class="os_shopname" style="color:red">转入医院:<input type="text" id="ServiceOrdPtInHosp" name="ServiceOrdPtInHosp" style="width:230px;border: none;font-size: 15px;" value="<%=ServiceOrdPtInHospTXT%>" onclick="showHosp('ServiceOrdPtInHosp')" readonly="true" placeholder="____________________________________"><label style="color: #ff0000;">*</label></div>
|
<div class="os_shopname" style="color:red;display: none;" id="ServiceOrdPtInHosp_Tra">详细地址:<input type="text" id="ServiceOrdPtInHosp_TraTXT" name="ServiceOrdTraEnd" style="width:230px;border: none;font-size: 15px;" value="<%=ServiceOrdTraEnd%>" placeholder="____________________________________" onchange="lbs_distance('ServiceOrdPtInHosp',document.getElementById('ServiceOrdPtInHosp_TraTXT').value);"><label style="color: #ff0000;">*</label></div>
|
<%If ServiceOrdPtInHospTXT="家中" Then
|
HomeAddress=ServiceOrdTraEnd
|
%>
|
<script language="javascript">ServiceOrdPtInHosp_Tra.style.display="block";</script>
|
<%End If%>
|
<div class="os_shopname">转入科室:<input type="text" id="HospInDepartmentName" name="HospInDepartmentName" style="width:80px;border: none;font-size: 15px;" value="<%=HospInDepartmentName%>" onclick="showHospDepartment('ServiceOrdPtInServicesID','HospInDepartmentName');" readonly="true" placeholder="____________________________________">
|
床位:<input type="text" id="ServiceOrdPtInServices" name="ServiceOrdPtInServices" style="width:100px;border: none;font-size: 15px;" value="<%=ServiceOrdPtInServices%>" placeholder="____________________________________" onchange="upperCase(this.name)">
|
</div>
|
<!--
|
<div class="os_shopname" style="color:red">
|
转运去向:
|
<select name="DirectionType" id="DirectionType" style="height:28px;" class="select1">
|
<option value="0">请选择</option>
|
<%sql="select vId,vtext from dictionary where vType=1 and vtitle='DirectionType' order by vOrder"
|
rs.open sql,objConn,1,1
|
do while not rs.Eof
|
DirectionTypeID=rs(0)
|
DirectionTypeName=rs(1)
|
%>
|
<option value="<%=DirectionTypeID%>"<%if Clng(DirectionType)=Clng(DirectionTypeID) then Response.Write " selected"%>><%=DirectionTypeName%></option>
|
<%
|
rs.movenext
|
loop
|
rs.close()%>
|
</select><label style="color: #ff0000;">*</label>
|
病重级别:
|
<select name="ConditionLevel" id="ConditionLevel" style="height:28px;" class="select1">
|
<option value="0">请选择</option>
|
<%sql="select vId,vtext from dictionary where vType=1 and vtitle='ConditionLevel' order by vOrder"
|
rs.open sql,objConn,1,1
|
do while not rs.Eof
|
ConditionLevelID=rs(0)
|
ConditionLevelName=rs(1)
|
%>
|
<option value="<%=ConditionLevelID%>"<%if Clng(ConditionLevel)=Clng(ConditionLevelID) then Response.Write " selected"%>><%=ConditionLevelName%></option>
|
<%
|
rs.movenext
|
loop
|
rs.close()%>
|
</select><label style="color: #ff0000;">*</label>
|
</div>
|
-->
|
<div class="os_shopname" style="color:red">成 交 价 :<input type="number" id="ServiceOrdTraTxnPrice" name="ServiceOrdTraTxnPrice" style="width:60px;border: none;font-size: 15px;text-align: right;" value="<%=ServiceOrdTraTxnPrice%>" placeholder="___________________" onchange="upperCase(this.name)"> 元<label style="color: #ff0000;">*</label>
|
<%If ServiceOrdTraPaidPrice>0 And ServiceOrdTraPaidPrice=ServiceOrdTraPrePayment Then%>
|
已支付预付款:<%=MoneyCheck(ServiceOrdTraPaidPrice,0)%>元</a><br>
|
<%ElseIf ServiceOrdTraPaidPrice>0 Then%>
|
已支付:<%=MoneyCheck(ServiceOrdTraPaidPrice,0)%>元</a><br>
|
<%End If%>
|
<%If ServiceOrdTraTxnPrice>0 Or ServiceOrdTraTxnPrice>0 Then%>
|
|
<%If ServiceOrdTraPrePayment>0 And ServiceOrdTraPaidPrice<ServiceOrdTraPrePayment Then%> <a onclick="JS_SMSCreateSave('','[Pay|1|<%=ServiceOrdID%>] ')">发<label style="color: #ff0000;">预付款</label>短信</a><%End If%>
|
<%If ServiceOrdTraTxnPrice>0 And ServiceOrdTraPaidPrice<ServiceOrdTraTxnPrice Then%> <a onclick="JS_SMSCreateSave('','[Pay|0|<%=ServiceOrdID%>] ')">发付<label style="color: #ff0000;">全款</label>短信</a><%End If%>
|
<%End If%>
|
</div>
|
|
<div class="os_shopname" style="color:red">需预付款:<input type="number" id="ServiceOrdTraPrePayment" name="ServiceOrdTraPrePayment" style="width:60px;border: none;font-size: 15px;text-align: right;" value="<%=ServiceOrdTraPrePayment%>" placeholder="___________________" onchange="upperCase(this.name)"> 元<label style="color: #ff0000;">*</label>
|
|
预估距离:<span id="ServiceOrdTraDistanceTXT"><%=ServiceOrdTraDistance%></span></div>
|
|
<div class="os_shopname">诊断:<textarea id="ServiceOrdPtDiagnosis" name="ServiceOrdPtDiagnosis" cols="50" rows="3" style="width: 97%;" onchange="upperCase(this.name)"><%=ServiceOrdPtDiagnosis%></textarea></div>
|
<!--
|
<div class="os_shopname">目前病情:<%
|
ConditionDefault="1"
|
If ServiceOrdID<>"" then
|
sql="select ConditionID from ServiceOrd_Condition where ServiceOrdCoID="&ServiceOrdID
|
rs.open sql,objConn,1,1
|
do while not rs.Eof
|
ConditionID=ConditionID&","&rs(0)
|
rs.movenext
|
loop
|
rs.close()
|
End if
|
ConditionIDSP = SPLIT(ConditionID,",")
|
sql="select vID,vtext,vType,vOrder,vOrder2 from dictionary where vType>=1 and vtitle='Condition' order by vOrder,ID"
|
rs.open sql,objConn,1,1
|
If not rs.Eof Then
|
ConditionName= rs("vOrder2")
|
ConditionOrder=rs("vOrder")
|
Response.Write "<li class=""condition""><span>"&ConditionName&": </span>"
|
j=0
|
z=2
|
do while not rs.Eof
|
ConditionID = rs("vID")
|
Condition = rs("vtext")
|
ConditionType= rs("vType")
|
ConditionName= rs("vOrder2")
|
|
If ConditionOrder<>rs("vOrder") Then
|
'Response.Write " </li><li class=""condition""><span>"&ConditionName&":</span>"
|
If z=3 Then
|
Response.Write "<li class=""condition"" style=""min-width: 250px;""><span>"&ConditionName&":</span>"
|
Else
|
Response.Write "<li class=""condition""><span>"&ConditionName&":</span>"
|
End If
|
ConditionOrder=rs("vOrder")
|
z=z+1
|
End If
|
|
Condition_is="0"
|
for i = 1 to UBOUND(ConditionIDSP)
|
If Cstr(ConditionID)=Cstr(ConditionIDSP(i)) Then
|
Condition_is="1"
|
j=j+1
|
End If
|
If j+1>i Then j=i-1
|
Next
|
If UBOUND(ConditionIDSP)>0 then
|
If ConditionType="2" And Cstr(ConditionIDSP(j+1))<>Cstr(ConditionID+1) And Cstr(ConditionIDSP(j))=Cstr(ConditionID) Then Condition_is="1"
|
Else
|
If ConditionType="2" Then Condition_is="1"
|
End If
|
%>
|
<input type="radio" id="ConditionID_<%=ConditionID%>" value="<%=ConditionID%>" name="ConditionID_<%=ConditionOrder%>" <%If Condition_is="1" Then Response.Write " checked=""checked"""%>><label for="ConditionID_<%=ConditionID%>"><%=Condition%></label>
|
<%
|
rs.movenext
|
loop
|
Response.Write " </li>"
|
End If
|
rs.close()
|
%>
|
</div>
|
-->
|
<div class="os_shopname">备注:<textarea id="ServiceOrdPtCondition" name="ServiceOrdPtCondition" cols="50" rows="3" style="width: 97%;" onchange="upperCase(this.name)"><%=ServiceOrdPtCondition%></textarea></div>
|
<div class="os_shopname"></div>
|
<div class="os_shopname"></div>
|
<%If session("admin_execLevel")>=1 Then%>
|
<div class="os_img">
|
<div class="posi" id="posi" >
|
<%'新任务单
|
If NEWOrder="2" Then%>
|
<div class="ljgm"><a href="javascript:form1_submit19_2()" class="bttt" style="color: #fff;background: #9a6d92;font-weight: 700;">保存,下一步</a></div>
|
<div class="ljgm" style="width: 25%;"><a href="/m_ServiceOrder_List.gds?OrdState=0" class="bttt">返回列表</a></div>
|
<%'未调度
|
ElseIf ServiceOrdID<>"" And is_AdminOrd=1 And (ServiceOrdState="1" Or ServiceOrdState="2" Or (ServiceOrdState="3" And DispatchOrdID="")) Then%>
|
<div class="ljgm"><a href="javascript:form1_submit20()" class="bttt" style="color: #fff;background: #9a6d92;font-weight: 700;">保存,下一步</a></div>
|
<div class="ljgm" style="width: 25%;"><a href="javascript:showCancel()" class="bttt">取消</a></div>
|
<div class="ljgm" style="width: 25%;"><a href="/m_ServiceOrder_List.gds?OrdState=0" class="bttt">返回列表</a></div>
|
<%'已调度(未审核)
|
ElseIf ServiceOrdID<>"" And is_AdminOrd=1 And DispatchOrdID<>"" And ServiceOrdState="3" And DispatchOrd_AP_Check<>"1" And IsLocking<>"1" Then%>
|
<div class="ljgm" style="width: 20%;"><a href="javascript:form1_submit20()" class="bttt" style="color: #fff;background: #9a6d92;font-weight: 700; margin: 0 5px;">保存修改</a></div>
|
<div class="ljgm" style="width: 20%;"><a href="/m_DispatchOrder.gds?DispatchOrdID=<%=DispatchOrdID%>" class="bttt" style="margin: 0 5px;">调度信息</a></div>
|
<div class="ljgm" style="width: 20%;"><a href="javascript:form1_submit27_2()" class="bttt" style="margin: 0 5px;">取消</a></div>
|
<div class="ljgm" style="width: 20%;"><a href="/m_ServiceOrder_List.gds?OrdState=0" class="bttt" style="margin: 0 5px;">返回列表</a></div>
|
<%'已审核完成
|
else%>
|
<div class="ljgm"><a href="/m_ServiceOrder_List.gds?OrdState=0" class="bttt">返回列表</a></div>
|
<%End If%>
|
</div>
|
</div>
|
<%End If%>
|
<script>
|
//修改项目名称记录
|
function upperCase(name)
|
{
|
var EditDataForm=document.getElementById("EditDataForm").value;
|
if (EditDataForm.indexOf(name)==-1){
|
if (EditDataForm.length>1){
|
EditDataForm=EditDataForm+","+name;
|
}else{
|
EditDataForm=name;
|
}
|
document.getElementById("EditDataForm").value=EditDataForm;
|
}
|
console.log(document.getElementById("EditDataForm").value);
|
}
|
//发送短信
|
function JS_SMSCreateSave(Send_Phone,Send_Text)
|
{
|
if(document.form1.ServiceOrdCoPhone.value=='' || document.form1.ServiceOrdCoPhone.value=='0') {
|
alert('请输入联系人电话!!');
|
return false;
|
}
|
Send_Phone=document.form1.ServiceOrdCoPhone.value;
|
if(confirm("确定发支付短信至"+Send_Phone+"?")){
|
window.location.replace('/admin_save.gds?admin_save=96&ReturnURL=Phone&Send_Phone='+Send_Phone+'&Send_Text='+Send_Text+'&Send_Remarks=ServiceOrdID:<%=ServiceOrdID%>');
|
}
|
}
|
</script>
|
<input name="EditDataForm" id="EditDataForm" type="hidden" value="">
|
</form>
|
<%Else%>
|
<div class="os_shopname" style="color:red">单据类型:A计划任务单,无权限查看</div>
|
<%End If%>
|
</div>
|
<!--医院选择-->
|
<div id="m_Hosp" style="display:none;">
|
<input id="HospJSID" type="hidden" value="">
|
<div class="settings-item"><div class="inner-settings-item flexbox to"><div class="title flexItem"><p class="name"><a onclick="closeHosp()">❌️</a></p></div></div></div>
|
<div class="search-box fixed">
|
<div class="inner-search-box">
|
<div class="search-box-o flexbox">
|
<div class="flexItem">
|
<div class="search-input-box flexbox">
|
<div class="flexItem">
|
<input type="text" class="tosearch-input" id="HospSearchTXT" name="HospSearchTXT" placeholder="输入【医院名称】搜索" value="<%=HospSearchTXT%>" onkeypress="EnterPress_Hosp(event)" onkeydown="EnterPress_Hosp()"/>
|
</div>
|
</div>
|
</div>
|
<!--
|
<div class="search_more">
|
<a id="toletter_search" class="search_letter_btn" onclick="closeHosp()"> </a>
|
</div>
|
-->
|
</div>
|
</div>
|
</div>
|
<div id="tomain" class="wrap_inner">
|
<div class="search-box-height search-box-height-to" style="height: 50px;"></div>
|
<div class="address_list">
|
<div class="tolist" id="HospList">
|
|
<div class="settings-item">
|
<div class="inner-settings-item flexbox to">
|
<div class="title flexItem"><p class="name">正在加载中...</p></div>
|
</div>
|
</div>
|
|
</div>
|
</div>
|
</div>
|
</div>
|
<script>
|
function showHosp(HospType){
|
document.getElementById('m_Orer').style.display='none';
|
document.getElementById('m_Hosp').style.display='';
|
document.getElementById("HospJSID").value=HospType;
|
HopsCity=$("#ServiceOrdClass").find("option:selected").text();
|
//alert(HopsCity);
|
window.HiddenFrame.location.replace('HospSearch.gds?pagesize=8&HopsCity='+HopsCity+'&HospType='+HospType);
|
}
|
function closeHosp(){
|
document.getElementById('m_Orer').style.display='';
|
document.getElementById('m_Hosp').style.display='none';
|
//alert(document.getElementById("DispatchOrdHosp").scrolltop);
|
document.body.scrollTop=1200;
|
}
|
//选择医院查询
|
function JS_HospSearch()
|
{
|
HospSearchTXT=document.all.HospSearchTXT.value;
|
window.HiddenFrame.location.replace('HospSearch.gds?OrdClass=<%=DispatchOrdClass%>&pagesize=8&HospSearchTXT='+HospSearchTXT);
|
}
|
function EnterPress_Hosp(e){ //传入 event
|
var e = e || window.event;
|
if(e.keyCode == 13){JS_HospSearch();}
|
}
|
//选择医院
|
function JS_HospSave(HospID,HospName,HospAddress)
|
{
|
var id=document.getElementById("HospJSID").value;
|
document.getElementById(id+"ID").value=HospID;
|
document.getElementById(id).value=HospName;
|
document.getElementById(id+"_Tra").style.display="none";
|
closeHosp();
|
if (HospName=='家中')
|
{
|
HospAddress="<%=HomeAddress%>";
|
document.getElementById(id+"_Tra").style.display="block";
|
}
|
if (HospAddress!='')
|
{
|
lbs_distance(id,HospAddress);
|
}
|
document.getElementById(id+"_TraTXT").value=HospAddress;
|
}
|
//显示医院列表窗口
|
function JS_HospList(HospListArray,acc1,acc2,HospSearchTXT,acc3)
|
{
|
var HospListHTML = "";
|
var i = 0;
|
HopsCity=$("#ServiceOrdClass").find("option:selected").text();
|
HospType=document.getElementById("HospJSID").value;
|
if (HospListArray.length>0)
|
{
|
for (var i=0;i<HospListArray.length;i++)
|
{
|
HospListHTML = HospListHTML+"<div class='settings-item' onclick='JS_HospSave("+HospListArray[i][0]+",\""+HospListArray[i][1]+"\",\""+HospListArray[i][3]+"\")'><div class='inner-settings-item flexbox to'><div class='title flexItem'><p class='name'>"+HospListArray[i][1]+"</p></div></div></div>";
|
|
}
|
}
|
if (acc2>1)
|
{
|
i=i+1;
|
HospListHTML = HospListHTML+"<div class='settings-item'><div class='inner-settings-item flexbox to'><div class='title flexItem'><p class='name'>";
|
if (acc1>1){HospListHTML = HospListHTML+"<a href='javascript:window.HiddenFrame.location.replace(\"HospSearch.gds?OrdClass=<%=DispatchOrdClass%>&pagesize=8&HopsCity="+HopsCity+'&HospType='+HospType+"&HospSearchTXT="+HospSearchTXT+"&page="+(acc1-1)+"\");'>上一页</a>";}else{HospListHTML = HospListHTML+" ";}
|
if (acc1<acc2){HospListHTML = HospListHTML+" <a href='javascript:window.HiddenFrame.location.replace(\"HospSearch.gds?OrdClass=<%=DispatchOrdClass%>&pagesize=8&HopsCity="+HopsCity+'&HospType='+HospType+"&HospSearchTXT="+HospSearchTXT+"&page="+(acc1+1)+"\");'>下一页</a>";}
|
//HospListHTML = HospListHTML+" <a onclick='closeHosp()'>关 闭</a></p></div></div></div>";
|
HospListHTML = HospListHTML+"</p></div></div></div>";
|
}
|
document.getElementById("HospList").innerHTML=HospListHTML;
|
}
|
</script>
|
<!--医院选择 end-->
|
|
<!--科室选择-->
|
<div id="m_HospDepartment" style="display:none;">
|
<input id="HospDepartmentJSID" type="hidden" value="">
|
<input id="HospDepartmentJS" type="hidden" value="">
|
<div class="settings-item"><div class="inner-settings-item flexbox to"><div class="title flexItem"><p class="name"><a onclick="closeHospDepartment()">❌️</a></p></div></div></div>
|
<div class="search-box fixed">
|
<div class="inner-search-box">
|
<div class="search-box-o flexbox">
|
<div class="flexItem">
|
<div class="search-input-box flexbox">
|
<div class="flexItem">
|
<input type="text" class="tosearch-input" id="HospDepartmentSearchTXT" name="HospDepartmentSearchTXT" placeholder="输入【科室名称】搜索" value="<%=HospDepartmentSearchTXT%>" onkeypress="EnterPress_HospDepartment(event)" onkeydown="EnterPress_HospDepartment()"/>
|
</div>
|
</div>
|
</div>
|
<!--
|
<div class="search_more">
|
<a id="toletter_search" class="search_letter_btn" onclick="closeHospDepartment()"> </a>
|
</div>
|
-->
|
</div>
|
</div>
|
</div>
|
<div id="tomain" class="wrap_inner">
|
<div class="search-box-height search-box-height-to" style="height: 50px;"></div>
|
<div class="address_list">
|
<div class="tolist" id="HospDepartmentList">
|
|
<div class="settings-item">
|
<div class="inner-settings-item flexbox to">
|
<div class="title flexItem"><p class="name">正在加载中...</p></div>
|
</div>
|
</div>
|
|
</div>
|
</div>
|
</div>
|
</div>
|
<script>
|
function showHospDepartment(HospDepartmentType,HospDepartmentName){
|
document.getElementById('m_Orer').style.display='none';
|
document.getElementById('m_HospDepartment').style.display='';
|
document.getElementById("HospDepartmentJSID").value=HospDepartmentType;
|
document.getElementById("HospDepartmentJS").value=HospDepartmentName;
|
window.HiddenFrame.location.replace('HospDepartmentSearch.gds');
|
}
|
function closeHospDepartment(){
|
document.getElementById('m_Orer').style.display='';
|
document.getElementById('m_HospDepartment').style.display='none';
|
//alert(document.getElementById("DispatchOrdHospDepartment").scrolltop);
|
document.body.scrollTop=1200;
|
}
|
//选择科室查询
|
function JS_HospDepartmentSearch()
|
{
|
HospDepartmentSearchTXT=document.all.HospDepartmentSearchTXT.value;
|
window.HiddenFrame.location.replace('HospDepartmentSearch.gds?HospDepartmentSearchTXT='+HospDepartmentSearchTXT);
|
}
|
function EnterPress_HospDepartment(e){ //传入 event
|
var e = e || window.event;
|
if(e.keyCode == 13){JS_HospDepartmentSearch();}
|
}
|
//选择科室
|
function JS_HospDepartmentSave(HospDepartmentID,HospDepartmentName)
|
{
|
var id=document.getElementById("HospDepartmentJSID").value;
|
var idName=document.getElementById("HospDepartmentJS").value;
|
document.getElementById(id).value=HospDepartmentID;
|
document.getElementById(idName).value=HospDepartmentName;
|
closeHospDepartment();
|
}
|
//显示科室列表窗口
|
function JS_HospDepartmentList(HospDepartmentListArray,acc1,acc2,HospDepartmentSearchTXT,acc3)
|
{
|
var HospDepartmentListHTML = "";
|
var i = 0;
|
if (HospDepartmentListArray.length>0)
|
{
|
for (var i=0;i<HospDepartmentListArray.length;i++)
|
{
|
HospDepartmentListHTML = HospDepartmentListHTML+"<div class='settings-item' onclick='JS_HospDepartmentSave("+HospDepartmentListArray[i][0]+",\""+HospDepartmentListArray[i][1]+"\")'><div class='inner-settings-item flexbox to'><div class='title flexItem'><p class='name'>"+HospDepartmentListArray[i][1]+"</p></div></div></div>";
|
|
}
|
}
|
if (acc2>1)
|
{
|
i=i+1;
|
HospDepartmentListHTML = HospDepartmentListHTML+"<div class='settings-item'><div class='inner-settings-item flexbox to'><div class='title flexItem'><p class='name'>";
|
if (acc1>1){HospDepartmentListHTML = HospDepartmentListHTML+"<a href='javascript:window.HiddenFrame.location.replace(\"HospDepartmentSearch.gds?OrdClass=<%=DispatchOrdClass%>&HospDepartmentSearchTXT="+HospDepartmentSearchTXT+"&page="+(acc1-1)+"\");'>上一页</a>";}else{HospDepartmentListHTML = HospDepartmentListHTML+" ";}
|
if (acc1<acc2){HospDepartmentListHTML = HospDepartmentListHTML+" <a href='javascript:window.HiddenFrame.location.replace(\"HospDepartmentSearch.gds?OrdClass=<%=DispatchOrdClass%>&HospDepartmentSearchTXT="+HospDepartmentSearchTXT+"&page="+(acc1+1)+"\");'>下一页</a></p></div></div></div>";}else{HospDepartmentListHTML = HospDepartmentListHTML+"</p></div></div></div>";}
|
}
|
document.getElementById("HospDepartmentList").innerHTML=HospDepartmentListHTML;
|
}
|
</script>
|
<!--科室选择 end-->
|
|
<!--取消原因选择 -->
|
<div id="m_Cancel" style="display:none;">
|
<div class="settings-item"><div class="inner-settings-item flexbox to"><div class="title flexItem"><p class="name"><a onclick="closeCancel()">❌️</a></p></div></div></div>
|
<div class="search-box fixed">
|
<div class="inner-search-box">
|
<div class="search-box-o flexbox">
|
<div class="flexItem">
|
<div class="search-input-box flexbox">
|
<div class="flexItem">
|
请选择取消原因
|
</div>
|
</div>
|
</div>
|
<!--
|
<div class="search_more">
|
<a id="toletter_search" class="search_letter_btn" onclick="closeCancel()"> </a>
|
</div>
|
-->
|
</div>
|
</div>
|
</div>
|
<div id="tomain" class="wrap_inner">
|
<div class="search-box-height search-box-height-to" style="height: 50px;"></div>
|
<div class="address_list">
|
<div class="tolist" id="CancelList">
|
|
<div class="settings-item">
|
<div class="inner-settings-item flexbox to">
|
<div class="title flexItem"><p class="name">正在加载中...</p></div>
|
</div>
|
</div>
|
|
</div>
|
</div>
|
</div>
|
</div>
|
<script>
|
function showCancel(CancelType,CancelName){
|
document.getElementById('m_Orer').style.display='none';
|
document.getElementById('m_Cancel').style.display='';
|
var HospListArray=new Array()
|
<%
|
i=0
|
sql="select vID,vtext from dictionary where vtitle='CancelReason' and vType>=1 order by vOrder"
|
rs.open Sql,objConn,1,1
|
do while not rs.Eof
|
vID = rs("vID")
|
vtext = rs("vtext")
|
%>
|
HospListArray[<%=i%>]=new Array("<%=vID%>","<%=vtext%>")
|
<%i=i+1
|
rs.movenext
|
loop
|
rs.close()
|
%>
|
JS_CancelList(HospListArray);
|
}
|
function closeCancel(){
|
document.getElementById('m_Orer').style.display='';
|
document.getElementById('m_Cancel').style.display='none';
|
//alert(document.getElementById("DispatchOrdCancel").scrolltop);
|
document.body.scrollTop=1200;
|
}
|
//选择取消原因
|
//form1_submit27_1()
|
function JS_CancelSave(CanceID,CanceName)
|
{
|
if(confirm("确定因["+CanceName+"]取消?")){
|
closeHospDepartment();
|
window.location.replace('/admin_save.gds?admin_save=27&Source=Phone&ServiceOrdID=<%=ServiceOrdID%>&DispatchOrdID=<%=DispatchOrdID%>&Del=YES&CancelReason='+CanceID+'&CancelReasonTXT=');
|
}
|
}
|
//显示取消原因列表窗口
|
function JS_CancelList(CancelListArray)
|
{
|
var CancelListHTML = "";
|
var i = 0;
|
if (CancelListArray.length>0)
|
{
|
for (var i=0;i<CancelListArray.length;i++)
|
{
|
CancelListHTML = CancelListHTML+"<div class='settings-item' onclick='JS_CancelSave("+CancelListArray[i][0]+",\""+CancelListArray[i][1]+"\")'><div class='inner-settings-item flexbox to'><div class='title flexItem'><p class='name'>"+CancelListArray[i][1]+"</p></div></div></div>";
|
|
}
|
}
|
document.getElementById("CancelList").innerHTML=CancelListHTML;
|
}
|
</script>
|
<!--取消原因选择 end-->
|
|
<script LANGUAGE="javascript">
|
String.prototype.Trim = function() {
|
var m = this.match(/^\s*(\S+(\s+\S+)*)\s*$/);
|
return (m == null) ? "" : m[1];
|
}
|
String.prototype.isMobile = function() {
|
return (/^(?:1\d|15[89])-?\d{6}(\d{3}|\*{3})$/.test(this.Trim()));
|
}
|
String.prototype.isTel = function()
|
{
|
//"兼容格式: 国家代码(2到3位)-区号(2到3位)-电话号码(7到8位)-分机号(3位)"
|
//return (/^(([0\+]\d{2,3}-)?(0\d{2,3})-)?(\d{7,8})(-(\d{3,}))?$/.test(this.Trim()));
|
return (/^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/.test(this.Trim()));
|
}
|
//生成服务单(新增)
|
function form1_submit19_2(){
|
if(document.form1.ServiceOrdCoName.value=='') {
|
alert('请输入联系人姓名!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdCoPhone.value=='' || document.form1.ServiceOrdCoPhone.value=='0') {
|
alert('请输入联系人电话!!');
|
return false;
|
}
|
if (document.form1.ServiceOrdCoPhone.value.isMobile()){
|
//return true;
|
}else{
|
alert("请输入正确的电话号码");
|
return false;
|
}
|
if(document.form1.ServiceOrdPtName.value=='') {
|
alert('请输入患者姓名!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdPtOutHospID.value=='' || document.form1.ServiceOrdPtOutHospID.value=='0') {
|
alert('请输入转出医院!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdPtInHospID.value=='' || document.form1.ServiceOrdPtInHospID.value=='0') {
|
alert('请输入转入医院!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdTraTxnPrice.value=='') {
|
alert('请输入成交价!!');
|
return false;
|
}
|
|
|
document.form1.action = "admin_save.gds";
|
document.form1.admin_save.value = "19";
|
document.form1.ServiceOrdState.value = "2";
|
form1.submit();
|
}
|
//修改服务单
|
function form1_submit20(){
|
if(document.form1.ServiceOrdID.value=='') {
|
alert('服务单ID出错!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdCoName.value=='') {
|
alert('请输入联系人姓名!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdCoPhone.value=='' || document.form1.ServiceOrdCoPhone.value=='0') {
|
alert('请输入联系人电话!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdPtName.value=='') {
|
alert('请输入患者姓名!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdPtOutHospID.value=='' || document.form1.ServiceOrdPtOutHospID.value=='0') {
|
alert('请输入转出医院!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdPtInHospID.value=='' || document.form1.ServiceOrdPtInHospID.value=='0') {
|
alert('请输入转入医院!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdTraTxnPrice.value=='') {
|
alert('请输入成交价!!');
|
return false;
|
}
|
if(document.form1.ServiceOrdTraDistance.value=='') {
|
//alert('距离计算有误,请重新输入地址!!');
|
//return false;
|
}
|
|
document.form1.action = "admin_save.gds";
|
document.form1.admin_save.value = "20";
|
if(document.form1.ServiceOrdState.value=='1') {
|
document.form1.ServiceOrdState.value = "2";
|
}
|
form1.submit();
|
}
|
//取消服务单(生成调度单前)
|
function form1_submit27_1(){
|
if(confirm("确定取消?")){window.location.replace('/admin_save.gds?admin_save=27&Source=Phone&ServiceOrdID=<%=ServiceOrdID%>&DispatchOrdID=<%=DispatchOrdID%>&Del=YES&CancelReason=8&CancelReasonTXT=手机端取消');}
|
}
|
//取消服务单(生成调度单后)
|
function form1_submit27_2(){
|
if(confirm("已生成调度,确定同时取消?")){window.location.replace('/admin_save.gds?admin_save=27&Source=Phone&ServiceOrdID=<%=ServiceOrdID%>&DispatchOrdID=<%=DispatchOrdID%>&ServiceOrdDel=1&Del=YES&CancelReason=8&CancelReasonTXT=手机端取消');}
|
}
|
//地址坐标查询
|
function lbs_distance(addressname,address) {
|
//alert(address);
|
$.ajax({
|
type: "POST",
|
url: "/weixin/lbs_distance.asp",//需要跳转到的界面 the page you want to post data
|
data: {
|
address: address//要传给后台的数据 the data you should send to background
|
},
|
beforeSend: function() {},//在发送之前你可以进行相关操作 what you want to do before send
|
success: function(data) {
|
lbs=data.split("|");
|
if (lbs[0]!='0')
|
{
|
var lat=lbs[0];
|
var lng=lbs[1];
|
if (addressname=='ServiceOrdPtOutHosp')
|
{
|
document.form1.WaypointsLatLng.value = lat+","+lng;
|
}
|
else if ((addressname=='ServiceOrdPtInHosp'))
|
{
|
document.form1.ToLatLng.value = lat+","+lng;
|
}
|
lbs_driving();
|
//alert(lng);
|
}else{
|
//alert("地址查询失败");
|
document.form1.ServiceOrdTraDistance.value = "";
|
}
|
}
|
})
|
};
|
//路线规划服务
|
function lbs_driving() {
|
//alert(address);
|
FromLatLng=document.form1.FromLatLng.value;
|
WaypointsLatLng=document.form1.WaypointsLatLng.value;
|
ToLatLng=document.form1.ToLatLng.value;
|
if (FromLatLng!='' && WaypointsLatLng!='' && ToLatLng!='')
|
{
|
//路线规划里程公式 (出发地=>途经点=>目的地=>出发地)/2
|
WaypointsLatLng=WaypointsLatLng+';'+ToLatLng;
|
ToLatLng=FromLatLng;
|
$.ajax({
|
type: "POST",
|
url: "/weixin/lbs_driving.asp",//需要跳转到的界面 the page you want to post data
|
data: {
|
FromLatLng: FromLatLng,
|
WaypointsLatLng: WaypointsLatLng,
|
ToLatLng: ToLatLng//要传给后台的数据 the data you should send to background
|
},
|
beforeSend: function() {},//在发送之前你可以进行相关操作 what you want to do before send
|
success: function(data) {
|
lbs=data.split("|");
|
if (lbs[0]!='0')
|
{
|
var distance=lbs[0]; //总距离
|
var duration=lbs[1]; //估算时间(含路况)
|
document.form1.ServiceOrdTraDistance.value = parseInt(distance/1000/2)+"公里";
|
document.getElementById("ServiceOrdTraDistanceTXT").innerHTML = parseInt(distance/1000/2)+"公里";
|
}else{
|
//alert("查询失败");
|
document.form1.ServiceOrdTraDistance.value = "";
|
document.getElementById("ServiceOrdTraDistanceTXT").innerHTML="未知";
|
}
|
}
|
})
|
}else{
|
document.form1.ServiceOrdTraDistance.value = "";
|
document.getElementById("ServiceOrdTraDistanceTXT").innerHTML="未知";
|
}
|
};
|
|
</script>
|
<%
|
'微信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'
|
]
|
});
|
|
</script>
|
<script src="/js/zepto.min.js"></script>
|
|
|
<script>
|
function closeWindow_JS(){
|
alert('数据保存完成');
|
wx.closeWindow();
|
}
|
<%'返回时关闭页面
|
if closeWindow="YES" then%>
|
//window.setTimeout(closeWindow_JS,500);
|
//window.setTimeout(closeWindow_JS,2000);
|
<%else
|
'获取地理位置
|
%>
|
//window.setTimeout(getLocation_JS,1000);
|
//window.setTimeout(getLocation1_JS,100);
|
<%end if%>
|
<%
|
If InHospAddress<>"" Then Response.Write "lbs_distance('ServiceOrdPtInHosp','"&InHospAddress&"');"
|
If OutHospAddress<>"" Then Response.Write "lbs_distance('ServiceOrdPtOutHosp','"&OutHospAddress&"');"
|
%>
|
</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>
|