<?php include "./inc/odbc.php"; ?>
|
<?php include "./inc/function.php"; ?>
|
<?php
|
$OrderType=empty($_REQUEST['OrderType'])!=false ? "1" : $_REQUEST['OrderType'];
|
//$openid="oAJ1cwQi4wLaoX_75FxUNPodweZI";
|
include "./inc/OAuth2.php";
|
?>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<title>民航医疗快线</title>
|
<link rel="stylesheet" href="/css/webtyle.css">
|
<link rel="stylesheet" href="/css/bootstrap.css">
|
<link rel="stylesheet" href="/css/bootstrap-theme.min.css">
|
<script src="/js/jquery-1.10.2.min.js"></script>
|
<script src="/js/bootstrap.min.js"></script>
|
<script src="/js/app.js?v=1.8"></script>
|
<link rel="stylesheet" href="/css/app.css?v=1.9">
|
<link rel="stylesheet" href="/css/app_2.css?v=2.0">
|
</head>
|
<body class="ds_body">
|
<div style="text-align:center;margin-top:20px"><img src="img/top.png" width="90%" height="" border="0" alt=""></div>
|
<hr style="text-align:center;width:100%"></hr>
|
<style>
|
*{margin:0;padding:0;}
|
li{list-style:none;}
|
a{text-decoration:none;}
|
.clear{zoom:1;}
|
.clear:after{content:'';display:block;clear:both;}
|
.fl{float:left;}
|
.fr{float:right;}
|
|
body{ font-size:16px;}
|
section .title{padding-left:20px;background:#F3F3F3;line-height:40px;font-size:16px;}
|
section .wrap{background:#fff;padding:0 0 20px 0;position:relative;}
|
.wrap .left .time{padding-left:20px;line-height:40px;background-size:6%;height:40px;}
|
.wrap .add_wrap{/* padding-left:40px;background:url(/resources/images/20160527shoujiye02.png) no-repeat 14px 14px;background-size:3%; */}
|
.wrap .address{line-height:42px;font-size:16px;padding-left:40px;width:320px;overflow:hidden;height:42px; }
|
.bg-t{background:url(/img/20160527shoujiye04.png) no-repeat 14px 14px;}
|
.bg-b{background:url(/img/20160527shoujiye06.png) no-repeat 14px -22px;}
|
.bg-c{background:url(/img/20160527shoujiye05.png) no-repeat 14px -22px;}
|
|
.wrap .right{position:absolute;right:8px;top:10px;color:#A0A0A0;font-size:16px;}
|
|
.massage {
|
margin: 0 auto;
|
width: 90%;
|
margin-top: 10px;
|
border-bottom: 1px solid #CCC;
|
padding-bottom: 5px;
|
height: 70px;
|
}
|
ul{width: 100%;list-style: none;text-align: center;margin-bottom: 10px;}
|
ul li{height: 30px;width: 70%;line-height: 30px;margin-left: 15%; background: #d9534f; margin-top: 10px;border-radius: 5px;}
|
ul li a{text-decoration: none;color: white;display: block;}
|
</style>
|
|
<div class="box">
|
|
<?php
|
$sql="select wxID from weixinOpenIDToPhone where weixinState=1 and weixinOpenID='".$openid."' order by wxID";
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
if (sqlsrv_rows_affected($data)==0) {
|
header("Location: /MyPhone.php?NEWPhone=1");exit;
|
}
|
}
|
if ($OrderType=="2") {
|
//服务评价
|
$sql="select top 50 ServiceOrdID,ServiceOrdClass,ServiceOrdState,ServiceOrdCoName,ServiceOrdCoPhone,ServiceOrdPtName,ServiceOrdTraVia,ServiceOrdTraEnd,ServiceOrdStartDate=convert(char,ServiceOrdStartDate,120),DispatchOrdID,DispatchOrdClass,DispatchOrdState,Guest_Point,ServiceOrdPtOutHospID,ServiceOrdPtInHospID from weixinOpenIDToPhone,ServiceOrder,DispatchOrd where ServiceOrdCoPhone=UserPhone and ServiceOrdIDDt=ServiceOrdID and DispatchOrdState in (6,7,8,9) and weixinOpenID='".$openid."' order by ServiceOrdStartDate desc";
|
//}
|
//elseif ($OrderType=="3"){
|
//发票申请
|
// $sql="select top 50 ServiceOrdID,ServiceOrdClass,ServiceOrdState,ServiceOrdCoName,ServiceOrdCoPhone,ServiceOrdPtName,ServiceOrdTraVia,ServiceOrdTraEnd,ServiceOrdStartDate=convert(char,ServiceOrdStartDate,120),DispatchOrdID,DispatchOrdClass,DispatchOrdState,Guest_Point,ServiceOrdPtOutHospID,ServiceOrdPtInHospID from weixinOpenIDToPhone,ServiceOrder LEFT JOIN DispatchOrd ON ServiceOrdIDDt=ServiceOrdID and DispatchOrdState not in (10) where ServiceOrdCoPhone=UserPhone and ServiceOrdState not in (4) and ServiceOrdTraPaidPrice>0 and (DispatchOrdReturnDate is null or dateadd(day,7,DispatchOrdReturnDate)>=GETDATE()) and weixinOpenID='".$openid."'order by ServiceOrdStartDate desc";
|
} else{
|
//转运记录
|
$sql="select top 50 ServiceOrdID,ServiceOrdClass,ServiceOrdState,ServiceOrdCoName,ServiceOrdCoPhone,ServiceOrdPtName,ServiceOrdTraVia,ServiceOrdTraEnd,ServiceOrdStartDate=convert(char,ServiceOrdStartDate,120),DispatchOrdID,DispatchOrdClass,DispatchOrdState,Guest_Point,ServiceOrdPtOutHospID,ServiceOrdPtInHospID from weixinOpenIDToPhone,ServiceOrder LEFT JOIN DispatchOrd ON ServiceOrdIDDt=ServiceOrdID and DispatchOrdState not in (10) where ServiceOrdCoPhone=UserPhone and weixinOpenID='".$openid."' order by ServiceOrdStartDate desc";
|
}
|
if ($openid=='oAJ1cwegdmr12YVPyyM5hF1EhcOk'){
|
$sql=str_replace(" and weixinOpenID='".$openid."'","",$sql);
|
}
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
if (sqlsrv_rows_affected($data)!=0) {
|
while($rs = sqlsrv_fetch_array($data) ) {
|
$ServiceOrdID = $rs['ServiceOrdID']; //服务单ID
|
$ServiceOrdClass = $rs['ServiceOrdClass']; //服务单类型
|
$ServiceOrdState = $rs['ServiceOrdState']; //服务单状态
|
$ServiceOrdCoName = $rs['ServiceOrdCoName']; //联系人姓名
|
$ServiceOrdCoPhone = $rs['ServiceOrdCoPhone']; //联系人电话
|
$ServiceOrdPtName = $rs['ServiceOrdPtName']; //患者姓名
|
$ServiceOrdTraVia = $rs['ServiceOrdTraVia']; //客人出发地
|
$ServiceOrdTraEnd = $rs['ServiceOrdTraEnd']; //客人目的地
|
$ServiceOrdStartDate= $rs['ServiceOrdStartDate'];//下单日期
|
$DispatchOrdID = $rs['DispatchOrdID']; //调度单ID
|
$DispatchOrdClass = $rs['DispatchOrdClass']; //调度类型
|
$DispatchOrdState = $rs['DispatchOrdState']; //调度单状态
|
$Guest_Point = $rs['Guest_Point']; //评价情况
|
$ServiceOrdPtOutHospID=$rs['ServiceOrdPtOutHospID'];//转出医院ID
|
$ServiceOrdPtInHospID=$rs['ServiceOrdPtInHospID'];//转入医院ID
|
if ($ServiceOrdPtOutHospID!='0' and $ServiceOrdPtOutHospID!='153') {
|
$sql="select HospName,HospLevel from HospData where HospID=".$ServiceOrdPtOutHospID;
|
$HospData = sqlsrv_query($conn,$sql);
|
if($HospData == true){
|
if (sqlsrv_rows_affected($HospData)!=0) {
|
while($rsHosp = sqlsrv_fetch_array($HospData) ) {
|
$ServiceOrdTraVia=$rsHosp['HospName'];
|
}
|
}
|
}
|
}
|
if ($ServiceOrdPtInHospID!='0' and $ServiceOrdPtInHospID!='153') {
|
$sql="select HospName,HospLevel from HospData where HospID=".$ServiceOrdPtInHospID;
|
$HospData = sqlsrv_query($conn,$sql);
|
if($HospData == true){
|
if (sqlsrv_rows_affected($HospData)!=0) {
|
while($rsHosp = sqlsrv_fetch_array($HospData) ) {
|
$ServiceOrdTraEnd=$rsHosp['HospName'];
|
}
|
}
|
}
|
}
|
|
if ($OrderType=="2") {
|
if ($Guest_Point==0){
|
if (strtotime($ServiceOrdStartDate)+2592000<strtotime(date("y-m-d h:i:s"))){
|
$OrdState="已过评价时间";
|
}else{
|
$OrdState="未评价";
|
}
|
|
}else{
|
$OrdState="已评价";
|
}
|
}else{
|
$OrdState=OrdState_A($ServiceOrdState,$DispatchOrdState);
|
}
|
if (date("Y",strtotime($ServiceOrdStartDate))==date("Y")){
|
$DateTime="m月d日 H:i";
|
}else{
|
$DateTime="Y年m月d日 H:i";
|
}
|
?>
|
<section>
|
<p class="title"> </p>
|
<a href="MyOrder.php?ServiceOrdID=<?php echo $ServiceOrdID;?>&OrderType=<?php echo $OrderType;?>&sign=<?php echo MD5($ServiceOrdID.$GPSKey);?>" class="detailed">
|
<div class="wrap">
|
<div class="left">
|
<p class="time"><?php echo $ServiceOrdCoName;?> <?php echo date($DateTime,strtotime($ServiceOrdStartDate));?></p>
|
<div class="add_wrap">
|
<?php if ($ServiceOrdTraVia!=''){?><p class="address bg-t"><?php echo $ServiceOrdTraVia;?></p><?php } ?>
|
<p class="address bg-b"><?php echo $ServiceOrdTraEnd;?></p>
|
</div>
|
</div>
|
<p class="right"><?php echo $OrdState;?></p>
|
</div>
|
</a>
|
<?php if ($OrderType=="2" and $Guest_Point==0 and strtotime($ServiceOrdStartDate)+2592000>=strtotime(date("y-m-d h:i:s"))) {?><ul><li><a href="MyOrder.php?ServiceOrdID=<?php echo $ServiceOrdID;?>&OrderType=<?php echo $OrderType;?>&sign=<?php echo MD5($ServiceOrdID.$GPSKey);?>">给予服务评价</a></li></ul><?php }?>
|
|
</section>
|
<?php
|
}
|
}else{
|
?>
|
<div class="massage">
|
<a href="#" class="detailed">
|
<ul>
|
<li><p class="mas">暂无转运单</p></li>
|
</ul>
|
</a>
|
</div>
|
<?php
|
}
|
}
|
?>
|
|
|
|
|
|
</div>
|
</body>
|
</html>
|