123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344 |
-
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>订单详情</title>
- <meta name="description" content="后台管理系统" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <!-- bootstrap -->
- <link href="css/bootstrap/bootstrap.css" rel="stylesheet" />
- <link href="css/bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet" />
- <!-- libraries -->
- <link href="css/lib/jquery-ui-1.10.2.custom.css" rel="stylesheet" type="text/css" />
- <link href="css/lib/font-awesome.css" type="text/css" rel="stylesheet" />
- <!-- global styles -->
- <link rel="stylesheet" type="text/css" href="css/compiled/layout.css">
- <link rel="stylesheet" type="text/css" href="css/compiled/elements.css">
- <link rel="stylesheet" type="text/css" href="css/compiled/icons.css">
- <!-- this page specific styles -->
- <link rel="stylesheet" href="css/compiled/order-details.css" type="text/css" media="screen" />
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- </head>
- <body>
- <!-- navbar -->
- <header class="navbar navbar-inverse" role="banner">
- <div class="navbar-header">
- <button class="navbar-toggle" type="button" data-toggle="collapse" id="menu-toggler">
- <span class="sr-only">导航</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="./index.html"><img src="img/logo.png"></a>
- </div>
- <ul class="nav navbar-nav pull-right hidden-xs">
- <li class="settings hidden-xs hidden-sm">
- <a href="./setting.html" role="button">
- <i class="icon-cog"></i>
- </a>
- </li>
- <li class="settings hidden-xs hidden-sm">
- <a href="./signin.html" role="button">
- 退出<i class="icon-signout" style="font-size: 12px;margin-left: 10px;"></i>
- </a>
- </li>
- </ul>
- </header>
- <!-- end navbar -->
- <!-- sidebar -->
- <div id="sidebar-nav">
- <ul id="dashboard-menu">
- <li class="active">
- <a href="./index.html">
- <i class="icon-home"></i>
- <span>首页</span>
- </a>
- </li>
- <li>
- <a href="./flight-query.html">
- <i class="icon-plane"></i>
- <span>快捷下单</span>
- </a>
- </li>
- <li>
- <a href="./flight-query-complex.html">
- <i class="icon-fighter-jet"></i>
- <span>人工下单</span>
- </a>
- </li>
- <li>
- <a href="./order-list.html">
- <i class="icon-code-fork"></i>
- <span>订单管理</span>
- </a>
- </li>
- <li>
- <a href="./setting.html">
- <i class="icon-cog"></i>
- <span>系统配置</span>
- </a>
- </li>
- </ul>
- </div>
- <!-- end sidebar -->
- <!-- main container -->
- <div class="content">
- <div id="pad-wrapper" class="order-info">
- <div class="panel panel-default flight-info">
- <div class="panel-heading bg-success">订单详细信息</div>
- <div class="panel-body">
- <div class="info"></div>
- <div class="panel-box flight-info">
- <p class="box-heading">航班信息</p>
- <div class="table-wrapper orders-table section">
- <table class="table table-hover table-striped">
- <thead>
- <tr>
- <th class="col-md-2">
- 航班信息
- </th>
- <th class="col-md-2">
- <span class="line"></span>
- 仓位信息
- </th>
- <th class="col-md-2">
- <span class="line"></span>
- 起飞时间
- </th>
- <th class="col-md-2">
- <span class="line"></span>
- 到达时间
- </th>
- <th class="col-md-2">
- <span class="line"></span>
- 票面价格
- </th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- </div>
-
- <div class="panel-box passengers-info">
- <p class="box-heading">联系人信息</p>
- <div class="table-wrapper orders-table section">
- <table class="table table-hover table-striped">
- <thead>
- <tr>
- <th class="col-md-4">
-
- 乘客信息
- </th>
- <th class="col-md-4">
- <span class="line"></span>
- 证件信息
- </th>
- <th class="col-md-4">
- <span class="line">
- 票号/乘客类型
- </th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- scripts -->
- <script src="js/jquery.min.js"></script>
- <script src="js/bootstrap.min.js"></script>
- <script src="js/jquery-ui-1.10.2.custom.min.js"></script>
- <script src="js/theme.js"></script>
- <script>
- $(function(){
- var uname = localStorage.uname;
- var token = localStorage.tokenId;
- function GetQueryString(name){
- var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
- var r = window.location.search.substr(1).match(reg);
- if(r!=null)return unescape(r[2]); return null;
- }
- var orderid = GetQueryString("Id");
- $.ajax({
- type:"POST",
- async:false,
- url:"http://114.55.6.23/jh/ticket/getOrderInfo",
- data:{"uname":uname,"token":token,"orderId":orderid},
- dataType:"json",
- success:function(data){
- console.log(data);
- if(data.status == 200){
- console.log(data.attachment);
- // 订单状态 0:订单取消 1:支付失败 2:出票中 3:出票成功 4:未付款 5:未知的状态
- var orderStatusL;
- var payStatusL;
- var orderStatusS = data.attachment.status;
- switch (orderStatusS){
- case "0":orderStatusL="订单取消";
- break;
- case "1":orderStatusL="支付失败";
- break;
- case "2":orderStatusL="出票中";
- break;
- case "3":orderStatusL="出票成功";
- break;
- case "4":orderStatusL="未付款";
- break;
- case "5":orderStatusL="未知的状态";
- break;
- }
- orderStatusS = orderStatusL;
- // 支付状态 0:初始 9:创建支付宝交易成功 1:支付成功(冻结) 3:解冻成功 5:转交易成功 11:关闭交易成功(未支付) 13:卖家确认可以支付
- var payStatusS = data.attachment.payStatus;
- switch (payStatusS){
- case "0":payStatusL="初始";
- break;
- case "1":payStatusL="支付成功(冻结)";
- break;
- case "9":payStatusL="创建支付宝交易成功";
- break;
- case "3":payStatusL="解冻成功";
- break;
- case "11":payStatusL="关闭交易成功(未支付)";
- break;
- case "5":payStatusL="转交易成功";
- break;
- case "13":payStatusL="卖家确认可以支付";
- break;
- }
- payStatusS = payStatusL;
- var infoStr = '<p>支付宝订单号: '+data.attachment.alipayTradeNo+'</p>'+
- '<p>阿里旅行订单号: '+data.attachment.orderId+'</p>'+
- '<p>订单状态: '+orderStatusS+'</p>'+
- '<p>订单总金额(优惠前): '+data.attachment.totalMoney+'</p>'+
- '<p class="text-success">订单实际支付金额(优惠后): '+data.attachment.actualPay+'</p>'+
- '<p>支付状态: '+payStatusS+'</p>'+
- '<p>卖家昵称: '+data.attachment.sellerTaobaoNick+'</p>'+
- '<p>产品类型: '+data.attachment.productType+'</p>'+
- '<p>外部订单号: '+data.attachment.reservationCode+'</p>';
- $(".panel-body .info").html(infoStr);
- var flightStr = "";
- for(var i=0;i<data.attachment.flightInfos.length;i++){
- var str ='<tr>'+
- '<td>'+
- '<p>航空公司:'+ data.attachment.flightInfos[i].airlineCode+'</p>'+
- '<p>航班号:'+ data.attachment.flightInfos[i].flightNo+'</p>'+
- '</td>'+
- '<td>'+
- '<p>仓位:'+ data.attachment.flightInfos[i].cabin+'</p>'+
- '</td>'+
- '<td>'+
- '<p>出发城市:'+ data.attachment.flightInfos[i].depAirport+'</p>'+
- '<p>'+ data.attachment.flightInfos[i].depTime +'</p>'+
- '</td>'+
- '<td>'+
- '<p>到达城市:'+ data.attachment.flightInfos[i].arrAirport+'</p>'+
- '<p>'+ data.attachment.flightInfos[i].arrTime+'</p>'+
- '</td>'+
- '<td>'+
- '<p>销售价:(单位:元)'+ data.attachment.flightInfos[i].salePrice+'</p>'+
- // '<p>行程类型:'+data.attachment.flightInfos[i].segmentType+ '</p>'+
- '</td>'+
- '</tr>';
- flightStr += str;
- }
- console.log("000000000"+data.attachment.passengerList.length);
- var pasString = "";
- for(var i=0;i<data.attachment.passengerList.length;i++){
- var docTypeL;
- var docTypeS = data.attachment.passengerList[i].docType;
- switch (docTypeS){
- case "1":docTypeL="护照";
- break;
- case "0":docTypeL="身份证";
- break;
- case "3":docTypeL="军人证";
- break;
- case "4":docTypeL="回乡证";
- break;
- case "5":docTypeL="台胞证";
- break;
- case "6":docTypeL="港澳台胞";
- break;
- case "10":docTypeL="警官证";
- break;
- case "11":docTypeL="士兵证";
- break;
- }
- docTypeS = docTypeL;
- var pTypeL;
- var pTypeS = data.attachment.passengerList[i].ptype;
- switch (pTypeS){
- case "ADT":pTypeL="成人";
- break;
- case "CHD":pTypeL="儿童";
- break;
- }
- pTypeS = pTypeL;
- var pasStr ='<tr>'+
- '<td>'+
- '<p>旅客姓名:'+ data.attachment.passengerList[i].pname+'</p>'+
- '<p>出生日期:'+ data.attachment.passengerList[i].birthDay+'</p>'+
- '</td>'+
- '<td>'+
- '<p>证件类型:'+ docTypeS+'</p>'+
- '<p>证件号码'+ data.attachment.passengerList[i].docId +'</p>'+
- '</td>'+
- '<td>'+
- '<p>票号:'+ data.attachment.passengerList[i].ticketNo+'</p>'+
- '<p>乘客类型:'+ pTypeS+'</p>'+
- '</td>'+
- '</tr>';
- pasString += pasStr;
- }
-
- $(".flight-info tbody").html(flightStr);
- $(".passengers-info tbody").html(pasString);
-
- }else{
- alert(data.attachment);
- }
-
- },
- error:function(XMLHttpRequest, textStatus, errorThrown) {
- console.log(XMLHttpRequest.responseText);
- console.log(XMLHttpRequest.readyState);
- console.log(textStatus);
- alert("系统出问题啦o(╥﹏╥)o......");
- }
- });
- })
- </script>
- </body>
- </html>
|