You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/application/third_party/trainsystem/views/refund.php

48 lines
2.1 KiB
PHP

<div style="width:90%;margin:30px auto;">
<div class="panel panel-primary" style="width:60%;margin:0 auto;">
<div class="panel-heading">
<h3 class="panel-title"><?php echo $train_date;?>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $checi;?>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo isset($elecnumber)?$elecnumber:"";?></h3>
</div>
<div class="panel-body">
<?php
foreach ($passengers as $items){
echo '<p>'.$from_station_name.'<span class="glyphicon glyphicon-arrow-right"></span>'.$to_station_name.'</p>';
echo '<p style="border-top:1px dashed #000; height:1px;margin-top:10px;" ></p>';
echo '<p>'.$items->tst_realname.'('.$items->tst_ticketype.')&nbsp;&nbsp;&nbsp;&nbsp;'.$items->tst_seatstype.'&nbsp;&nbsp;'.$items->tst_seatdetail.'&nbsp;&nbsp;&nbsp;&nbsp;票价:¥'.$items->tst_ticketprice.'</p>';
if((int)$items->tst_status != 7){
echo '<p>';
echo '<a href="###" style="padding:5px 15px;" class="btn btn-warning btn-sm returnticket" name="'.$items->tst_realname.'" passid="'.$items->tst_numberid.'"><span class="glyphicon glyphicon-remove"></span>退票</a>';
echo '</p>';
}else{
$info = json_decode($items->tst_returncallback);
echo '<p><table class="table table-bordered table-hover" style="text-align:center;"><tr><th colspan="2" style="text-align:center;">退票处理</th></tr>';
echo '<tr><td>'.$items->tst_lasteditdate.'</td>';
echo '<tr><td>'.$msg.'</td></tr></table></p>';
}
}?>
</div>
</div>
</div>
<script>
$(function(){
$('.returnticket').click(function(){
var url = <?php echo "'http://www.mycht.cn/info.php/apps/trainsystem/returnorders/returntickets?ordernumber=$ordernumber'"?>;
var return_ticket = $(this);
name = $(this).attr('name');
passid = $(this).attr('passid');
url += '&passportname='+name+'&passportno='+passid;
//console.log(url);return false;
$.ajax({
url:url,
success:function(json){
alert('请求成功,正在处理退票...');
return_ticket.html('退票成功');
},
error:function(json){
alert('请求失败,请重新请求...');
return_ticket.html('退票失败');
}
});
});
});
</script>