order-details.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. 
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="UTF-8">
  6. <title>订单详情</title>
  7. <meta name="description" content="后台管理系统" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9. <!-- bootstrap -->
  10. <link href="css/bootstrap/bootstrap.css" rel="stylesheet" />
  11. <link href="css/bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet" />
  12. <!-- libraries -->
  13. <link href="css/lib/jquery-ui-1.10.2.custom.css" rel="stylesheet" type="text/css" />
  14. <link href="css/lib/font-awesome.css" type="text/css" rel="stylesheet" />
  15. <!-- global styles -->
  16. <link rel="stylesheet" type="text/css" href="css/compiled/layout.css">
  17. <link rel="stylesheet" type="text/css" href="css/compiled/elements.css">
  18. <link rel="stylesheet" type="text/css" href="css/compiled/icons.css">
  19. <!-- this page specific styles -->
  20. <link rel="stylesheet" href="css/compiled/order-details.css" type="text/css" media="screen" />
  21. <!--[if lt IE 9]>
  22. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  23. <![endif]-->
  24. </head>
  25. <body>
  26. <!-- navbar -->
  27. <header class="navbar navbar-inverse" role="banner">
  28. <div class="navbar-header">
  29. <button class="navbar-toggle" type="button" data-toggle="collapse" id="menu-toggler">
  30. <span class="sr-only">导航</span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. <span class="icon-bar"></span>
  34. </button>
  35. <a class="navbar-brand" href="./index.html"><img src="img/logo.png"></a>
  36. </div>
  37. <ul class="nav navbar-nav pull-right hidden-xs">
  38. <li class="settings hidden-xs hidden-sm">
  39. <a href="./setting.html" role="button">
  40. <i class="icon-cog"></i>
  41. </a>
  42. </li>
  43. <li class="settings hidden-xs hidden-sm">
  44. <a href="./signin.html" role="button">
  45. 退出<i class="icon-signout" style="font-size: 12px;margin-left: 10px;"></i>
  46. </a>
  47. </li>
  48. </ul>
  49. </header>
  50. <!-- end navbar -->
  51. <!-- sidebar -->
  52. <div id="sidebar-nav">
  53. <ul id="dashboard-menu">
  54. <li class="active">
  55. <a href="./index.html">
  56. <i class="icon-home"></i>
  57. <span>首页</span>
  58. </a>
  59. </li>
  60. <li>
  61. <a href="./flight-query.html">
  62. <i class="icon-plane"></i>
  63. <span>快捷下单</span>
  64. </a>
  65. </li>
  66. <li>
  67. <a href="./flight-query-complex.html">
  68. <i class="icon-fighter-jet"></i>
  69. <span>人工下单</span>
  70. </a>
  71. </li>
  72. <li>
  73. <a href="./order-list.html">
  74. <i class="icon-code-fork"></i>
  75. <span>订单管理</span>
  76. </a>
  77. </li>
  78. <li>
  79. <a href="./setting.html">
  80. <i class="icon-cog"></i>
  81. <span>系统配置</span>
  82. </a>
  83. </li>
  84. </ul>
  85. </div>
  86. <!-- end sidebar -->
  87. <!-- main container -->
  88. <div class="content">
  89. <div id="pad-wrapper" class="order-info">
  90. <div class="panel panel-default flight-info">
  91. <div class="panel-heading bg-success">订单详细信息</div>
  92. <div class="panel-body">
  93. <div class="info"></div>
  94. <div class="panel-box flight-info">
  95. <p class="box-heading">航班信息</p>
  96. <div class="table-wrapper orders-table section">
  97. <table class="table table-hover table-striped">
  98. <thead>
  99. <tr>
  100. <th class="col-md-2">
  101. 航班信息
  102. </th>
  103. <th class="col-md-2">
  104. <span class="line"></span>
  105. 仓位信息
  106. </th>
  107. <th class="col-md-2">
  108. <span class="line"></span>
  109. 起飞时间
  110. </th>
  111. <th class="col-md-2">
  112. <span class="line"></span>
  113. 到达时间
  114. </th>
  115. <th class="col-md-2">
  116. <span class="line"></span>
  117. 票面价格
  118. </th>
  119. </tr>
  120. </thead>
  121. <tbody></tbody>
  122. </table>
  123. </div>
  124. </div>
  125. <div class="panel-box passengers-info">
  126. <p class="box-heading">联系人信息</p>
  127. <div class="table-wrapper orders-table section">
  128. <table class="table table-hover table-striped">
  129. <thead>
  130. <tr>
  131. <th class="col-md-4">
  132. 乘客信息
  133. </th>
  134. <th class="col-md-4">
  135. <span class="line"></span>
  136. 证件信息
  137. </th>
  138. <th class="col-md-4">
  139. <span class="line">
  140. 票号/乘客类型
  141. </th>
  142. </tr>
  143. </thead>
  144. <tbody></tbody>
  145. </table>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. <!-- scripts -->
  153. <script src="js/jquery.min.js"></script>
  154. <script src="js/bootstrap.min.js"></script>
  155. <script src="js/jquery-ui-1.10.2.custom.min.js"></script>
  156. <script src="js/theme.js"></script>
  157. <script>
  158. $(function(){
  159. var uname = localStorage.uname;
  160. var token = localStorage.tokenId;
  161. function GetQueryString(name){
  162. var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
  163. var r = window.location.search.substr(1).match(reg);
  164. if(r!=null)return unescape(r[2]); return null;
  165. }
  166. var orderid = GetQueryString("Id");
  167. $.ajax({
  168. type:"POST",
  169. async:false,
  170. url:"http://114.55.6.23/jh/ticket/getOrderInfo",
  171. data:{"uname":uname,"token":token,"orderId":orderid},
  172. dataType:"json",
  173. success:function(data){
  174. console.log(data);
  175. if(data.status == 200){
  176. console.log(data.attachment);
  177. // 订单状态 0:订单取消 1:支付失败 2:出票中 3:出票成功 4:未付款 5:未知的状态
  178. var orderStatusL;
  179. var payStatusL;
  180. var orderStatusS = data.attachment.status;
  181. switch (orderStatusS){
  182. case "0":orderStatusL="订单取消";
  183. break;
  184. case "1":orderStatusL="支付失败";
  185. break;
  186. case "2":orderStatusL="出票中";
  187. break;
  188. case "3":orderStatusL="出票成功";
  189. break;
  190. case "4":orderStatusL="未付款";
  191. break;
  192. case "5":orderStatusL="未知的状态";
  193. break;
  194. }
  195. orderStatusS = orderStatusL;
  196. // 支付状态 0:初始 9:创建支付宝交易成功 1:支付成功(冻结) 3:解冻成功 5:转交易成功 11:关闭交易成功(未支付) 13:卖家确认可以支付
  197. var payStatusS = data.attachment.payStatus;
  198. switch (payStatusS){
  199. case "0":payStatusL="初始";
  200. break;
  201. case "1":payStatusL="支付成功(冻结)";
  202. break;
  203. case "9":payStatusL="创建支付宝交易成功";
  204. break;
  205. case "3":payStatusL="解冻成功";
  206. break;
  207. case "11":payStatusL="关闭交易成功(未支付)";
  208. break;
  209. case "5":payStatusL="转交易成功";
  210. break;
  211. case "13":payStatusL="卖家确认可以支付";
  212. break;
  213. }
  214. payStatusS = payStatusL;
  215. var infoStr = '<p>支付宝订单号:&nbsp;&nbsp;&nbsp;&nbsp;'+data.attachment.alipayTradeNo+'</p>'+
  216. '<p>阿里旅行订单号:&nbsp;&nbsp;&nbsp;&nbsp;'+data.attachment.orderId+'</p>'+
  217. '<p>订单状态:&nbsp;&nbsp;&nbsp;&nbsp;'+orderStatusS+'</p>'+
  218. '<p>订单总金额(优惠前):&nbsp;&nbsp;&nbsp;&nbsp;'+data.attachment.totalMoney+'</p>'+
  219. '<p class="text-success">订单实际支付金额(优惠后):&nbsp;&nbsp;&nbsp;&nbsp;'+data.attachment.actualPay+'</p>'+
  220. '<p>支付状态:&nbsp;&nbsp;&nbsp;&nbsp;'+payStatusS+'</p>'+
  221. '<p>卖家昵称:&nbsp;&nbsp;&nbsp;&nbsp;'+data.attachment.sellerTaobaoNick+'</p>'+
  222. '<p>产品类型:&nbsp;&nbsp;&nbsp;&nbsp;'+data.attachment.productType+'</p>'+
  223. '<p>外部订单号:&nbsp;&nbsp;&nbsp;&nbsp;'+data.attachment.reservationCode+'</p>';
  224. $(".panel-body .info").html(infoStr);
  225. var flightStr = "";
  226. for(var i=0;i<data.attachment.flightInfos.length;i++){
  227. var str ='<tr>'+
  228. '<td>'+
  229. '<p>航空公司:'+ data.attachment.flightInfos[i].airlineCode+'</p>'+
  230. '<p>航班号:'+ data.attachment.flightInfos[i].flightNo+'</p>'+
  231. '</td>'+
  232. '<td>'+
  233. '<p>仓位:'+ data.attachment.flightInfos[i].cabin+'</p>'+
  234. '</td>'+
  235. '<td>'+
  236. '<p>出发城市:'+ data.attachment.flightInfos[i].depAirport+'</p>'+
  237. '<p>'+ data.attachment.flightInfos[i].depTime +'</p>'+
  238. '</td>'+
  239. '<td>'+
  240. '<p>到达城市:'+ data.attachment.flightInfos[i].arrAirport+'</p>'+
  241. '<p>'+ data.attachment.flightInfos[i].arrTime+'</p>'+
  242. '</td>'+
  243. '<td>'+
  244. '<p>销售价:(单位:元)'+ data.attachment.flightInfos[i].salePrice+'</p>'+
  245. // '<p>行程类型:'+data.attachment.flightInfos[i].segmentType+ '</p>'+
  246. '</td>'+
  247. '</tr>';
  248. flightStr += str;
  249. }
  250. console.log("000000000"+data.attachment.passengerList.length);
  251. var pasString = "";
  252. for(var i=0;i<data.attachment.passengerList.length;i++){
  253. var docTypeL;
  254. var docTypeS = data.attachment.passengerList[i].docType;
  255. switch (docTypeS){
  256. case "1":docTypeL="护照";
  257. break;
  258. case "0":docTypeL="身份证";
  259. break;
  260. case "3":docTypeL="军人证";
  261. break;
  262. case "4":docTypeL="回乡证";
  263. break;
  264. case "5":docTypeL="台胞证";
  265. break;
  266. case "6":docTypeL="港澳台胞";
  267. break;
  268. case "10":docTypeL="警官证";
  269. break;
  270. case "11":docTypeL="士兵证";
  271. break;
  272. }
  273. docTypeS = docTypeL;
  274. var pTypeL;
  275. var pTypeS = data.attachment.passengerList[i].ptype;
  276. switch (pTypeS){
  277. case "ADT":pTypeL="成人";
  278. break;
  279. case "CHD":pTypeL="儿童";
  280. break;
  281. }
  282. pTypeS = pTypeL;
  283. var pasStr ='<tr>'+
  284. '<td>'+
  285. '<p>旅客姓名:'+ data.attachment.passengerList[i].pname+'</p>'+
  286. '<p>出生日期:'+ data.attachment.passengerList[i].birthDay+'</p>'+
  287. '</td>'+
  288. '<td>'+
  289. '<p>证件类型:'+ docTypeS+'</p>'+
  290. '<p>证件号码'+ data.attachment.passengerList[i].docId +'</p>'+
  291. '</td>'+
  292. '<td>'+
  293. '<p>票号:'+ data.attachment.passengerList[i].ticketNo+'</p>'+
  294. '<p>乘客类型:'+ pTypeS+'</p>'+
  295. '</td>'+
  296. '</tr>';
  297. pasString += pasStr;
  298. }
  299. $(".flight-info tbody").html(flightStr);
  300. $(".passengers-info tbody").html(pasString);
  301. }else{
  302. alert(data.attachment);
  303. }
  304. },
  305. error:function(XMLHttpRequest, textStatus, errorThrown) {
  306. console.log(XMLHttpRequest.responseText);
  307. console.log(XMLHttpRequest.readyState);
  308. console.log(textStatus);
  309. alert("系统出问题啦o(╥﹏╥)o......");
  310. }
  311. });
  312. })
  313. </script>
  314. </body>
  315. </html>