flight-query-complex.html 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>机票预订</title>
  6. <meta name="description" content="后台管理系统" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <!-- bootstrap -->
  9. <link href="css/bootstrap/bootstrap.css" rel="stylesheet">
  10. <link href="css/bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet">
  11. <!-- global styles -->
  12. <link rel="stylesheet" type="text/css" href="css/compiled/layout.css">
  13. <link rel="stylesheet" type="text/css" href="css/compiled/elements.css">
  14. <link rel="stylesheet" type="text/css" href="css/compiled/icons.css">
  15. <!-- libraries -->
  16. <link href="css/lib/font-awesome.css" type="text/css" rel="stylesheet" />
  17. <link href="css/lib/bootstrap.datepicker.css" type="text/css" rel="stylesheet">
  18. <!-- this page specific styles -->
  19. <link rel="stylesheet" href="css/compiled/flight-query-complex.css" type="text/css" media="screen" />
  20. <link rel="stylesheet" href="css/compiled/tables.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>
  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 class="active">
  67. <div class="pointer">
  68. <div class="arrow"></div>
  69. <div class="arrow_border"></div>
  70. </div>
  71. <a href="./flight-query-complex.html">
  72. <i class="icon-fighter-jet"></i>
  73. <span>人工下单</span>
  74. </a>
  75. </li>
  76. <li>
  77. <a href="./order-list.html">
  78. <i class="icon-tasks"></i>
  79. <span>订单管理</span>
  80. </a>
  81. </li>
  82. <li>
  83. <a href="./setting.html">
  84. <i class="icon-cog"></i>
  85. <span>系统配置</span>
  86. </a>
  87. </li>
  88. </ul>
  89. </div>
  90. <!-- end sidebar -->
  91. <!-- main container -->
  92. <div class="content">
  93. <div id="pad-wrapper">
  94. <!-- query form -->
  95. <form class="query">
  96. <div class="alert alert-danger"><i class="icon-remove-sign"></i>请输入完整的查询信息。</div>
  97. <div class="row form-wrapper">
  98. <div class="col-md-3 col-xs-6 field-box">
  99. <label>航班号:</label>
  100. <input class="form-control" type="text" name="flightNo" required="required"/>
  101. </div>
  102. <div class="col-md-3 col-xs-6 field-box">
  103. <label>航空公司:</label>
  104. <input class="form-control" type="text" name="airlineCode" required="required" disabled="disabled"/>
  105. </div>
  106. <div class="col-md-3 col-xs-6 field-box">
  107. <label>舱位:</label>
  108. <input class="form-control" type="text" name="cabin" />
  109. </div>
  110. <div class="col-md-3 col-xs-6 field-box" class="dep_date">
  111. <label>出行日期:</label>
  112. <input class="form-control" type="text" name="depDate" required="required"/>
  113. <div class="pop-dialog">
  114. <div class="pointer">
  115. <div class="arrow"></div>
  116. <div class="arrow_border"></div>
  117. </div>
  118. <div class="body">
  119. <div data-date="2017-10-01" data-date-format="yyyy-mm-dd"></div>
  120. </div>
  121. </div>
  122. </div>
  123. <div class="col-md-3 col-xs-6 field-box">
  124. <label>起飞机场:</label>
  125. <input class="form-control" type="text" name="depAirport" required="required"/>
  126. </div>
  127. <div class="col-md-3 col-xs-6 field-box">
  128. <label>到达机场:</label>
  129. <input class="form-control" type="text" name="arrAirport" required="required"/>
  130. </div>
  131. <div class="col-md-3 col-xs-6 field-box">
  132. <button class="btn-flat success" type="button">查询</button>
  133. </div>
  134. </div>
  135. </form>
  136. <!-- end query form -->
  137. <!-- query-list table -->
  138. <div class="table-wrapper orders-table section" style="margin-bottom: 35px;">
  139. <table class="table">
  140. <thead>
  141. <tr class="text-center">
  142. <th class="col-md-2" style="width: 14%;">
  143. 产品类型
  144. </th>
  145. <th class="col-md-1" style="width: 15%;">
  146. <span class="line"></span>
  147. 航班信息
  148. </th>
  149. <th class="col-md-2">
  150. <span class="line"></span>
  151. 起飞时间
  152. </th>
  153. <th class="col-md-2">
  154. <span class="line"></span>
  155. 到达时间
  156. </th>
  157. <th class="col-md-2" style="width: 12%;">
  158. <span class="line"></span>
  159. 价格
  160. </th>
  161. <th class="col-md-3">
  162. <span class="line"></span>
  163. 退改签信息
  164. </th>
  165. </tr>
  166. </thead>
  167. <tbody class="query-list">
  168. <!-- row -->
  169. <tr class="first">
  170. <td>--</td>
  171. <td>--</td>
  172. <td>--</td>
  173. <td>--</td>
  174. <td>--</td>
  175. <td>--</td>
  176. </tr>
  177. </tbody>
  178. </table>
  179. </div>
  180. <form class="passengers-info" style="display:none;">
  181. <p class="bg-info">乘机人信息</p>
  182. <div class="cont-wrap">
  183. <div class="row form-wrapper psg-item">
  184. <div class="col-md-4 col-xs-6 field-box">
  185. <label>旅客姓名:</label>
  186. <input class="form-control" type="text" name="Pname" required="required"/>
  187. </div>
  188. <div class="col-md-4 col-xs-6 field-box">
  189. <label>证件类型:</label>
  190. <select class="form-control docType" name="docType" required="required" style="width: 73%;">
  191. <option value="NI">身份证</option>
  192. <option value="PP">护照</option>
  193. <option value="MI">军人证</option>
  194. <option value="BH">回乡证</option>
  195. <option value="TW">台胞证</option>
  196. <option value="HK">港澳通行证</option>
  197. <option value="PO">警官证 </option>
  198. <option value="SO">士兵证</option>
  199. <option value="TH">其他证件</option>
  200. </select>
  201. </div>
  202. <div class="col-md-4 col-xs-6 field-box">
  203. <label>证件号码:</label>
  204. <input class="form-control" type="text" name="docId" required="required"/>
  205. </div>
  206. <div class="col-md-4 col-xs-6 field-box">
  207. <label>乘客类型:</label>
  208. <select class="form-control" name="Ptype" required="required" style="width: 73%;">
  209. <option value="ADT">成人</option>
  210. <option value="CHD">儿童</option>
  211. </select>
  212. </div>
  213. <div class="col-md-4 col-xs-6 field-box">
  214. <label>出生日期:</label>
  215. <input class="form-control" type="text" name="birthDay" required="required" PLACEHOLDER="YYYY-MM-DD"/>
  216. <div class="pop-dialog">
  217. <div class="pointer">
  218. <div class="arrow"></div>
  219. <div class="arrow_border"></div>
  220. </div>
  221. <div class="body">
  222. <div data-date="2017-10-01" data-date-format="yyyy-mm-dd"></div>
  223. </div>
  224. </div>
  225. </div>
  226. <!-- <div class="col-md-3 col-xs-6 field-box">
  227. <label>票号:</label>
  228. <input class="form-control" type="text" name="ticketNo" required="required"/>
  229. </div> -->
  230. <div class="col-md-2 col-xs-6 field-box">
  231. <button class="btn-flat success addPsg" type="button" style="margin-left:18%;">
  232. <i class="icon-plus"></i>再添加一位乘客</button>
  233. </div>
  234. <div class="col-md-2 col-xs-6 field-box">
  235. <button class="btn-flat danger delPsg" type="button" style="margin-left:0;">
  236. <i class="icon-trash"></i>删除</button>
  237. </div>
  238. </div>
  239. </div>
  240. </form>
  241. <button class="btn btn-info quick-buy pull-right" type="button" data-toggle="modal">下单</button>
  242. <!-- end query-list table -->
  243. </div>
  244. <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="orderinfoS" id="orderinfoS">
  245. <div class="modal-dialog" role="document" style="width:32%;">
  246. <div class="modal-content">
  247. <div class="modal-header">
  248. <button type="button" class="close modalClose" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
  249. <h3 class="modal-title text-success" id="gridSystemModalLabel">您已下单成功!</h3>
  250. </div>
  251. <div class="modal-body">
  252. <ul class="list-group" style="margin-bottom: 0;">
  253. </ul>
  254. </div>
  255. <div class="modal-footer">
  256. <a type="button" class="btn btn-info details" href="javascript:;">查看订单详情</a>
  257. <button type="button" class="btn btn-default modalClose" data-dismiss="modal">关闭</button>
  258. </div>
  259. </div><!-- /.modal-content -->
  260. </div><!-- /.modal-dialog -->
  261. </div><!-- /.modal -->
  262. </div>
  263. <!-- end main container -->
  264. <!-- scripts -->
  265. <script src="js/jquery.min.js"></script>
  266. <script src="js/bootstrap.min.js"></script>
  267. <script src="js/theme.js"></script>
  268. <script src="js/bootstrap.datepicker.js"></script>
  269. <script>
  270. $(function(){
  271. //航司回填
  272. $("input[name='flightNo']").blur(function(){
  273. var airlineCode = $("input[name='flightNo']").val().substring(0,2);
  274. $("input[name='airlineCode']").val(airlineCode);
  275. // console.log($("input[name='airlineCode']").val());
  276. });
  277. //身份证号回填生日
  278. $("input[name='docId']").blur(function(){
  279. var that = $(this);
  280. var inputdocid = $(this).val().trim();
  281. var docselected = that.parent().prev();
  282. var bthdayinput = that.parent().next().next();
  283. var valtype = docselected.find("select[name='docType']").val();
  284. var valbthday = bthdayinput.find("input[name='birthDay']");
  285. if(inputdocid!= null && inputdocid != ""){
  286. if( valtype == "NI"){
  287. var brithday = getBirthdayFromIdCard(inputdocid);
  288. valbthday.val(brithday);
  289. // valbthday.attr("disabled","disabled");
  290. }else{
  291. valbthday.val("");
  292. }
  293. }
  294. });
  295. // 初始化出行日期日历插件
  296. $("form input[name='depDate']").datepicker({
  297. format: 'yyyy-mm-dd',
  298. startDate: '-3d'
  299. });
  300. function getNowFormatDate() {
  301. var date = new Date();
  302. var seperator1 = "-";
  303. var month = date.getMonth() + 1;
  304. var strDate = date.getDate();
  305. if (month >= 1 && month <= 9) {
  306. month = "0" + month;
  307. }
  308. if (strDate >= 0 && strDate <= 9) {
  309. strDate = "0" + strDate;
  310. }
  311. var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
  312. $("form input[name='depDate']").val(currentdate);
  313. }
  314. getNowFormatDate();
  315. function getBirthdayFromIdCard(idCard) {
  316. var birthday = "";
  317. if(idCard != null && idCard != ""){
  318. if(idCard.length == 15){
  319. birthday = "19"+idCard.substr(6,6);
  320. }else if(idCard.length == 18){
  321. birthday = idCard.substr(6,8);
  322. }else{
  323. alert("请输入正确的身份证号!");
  324. };
  325. birthday = birthday.replace(/(.{4})(.{2})/,"$1-$2-");
  326. }
  327. return birthday;
  328. }
  329. //关闭弹出框
  330. $(".icon-remove-sign").click(function(){
  331. $(this).parent(".alert").hide();
  332. });
  333. // 提交查询表单
  334. $(".query button").click(function(){
  335. $(".query .alert").hide();
  336. var _this = $(this);
  337. var uname = localStorage.uname;
  338. var token = localStorage.tokenId;
  339. var cabin = $("input[name='cabin']").val();
  340. var airlineCode = $("input[name='airlineCode']").val();
  341. var flightNo = $("input[name='flightNo']").val();
  342. var depDate = $("input[name='depDate']").val();
  343. var depAirport = $("input[name='depAirport']").val();
  344. var arrAirport = $("input[name='arrAirport']").val();
  345. /* console.log(arrAirport == "");
  346. console.log(airlineCode == "");
  347. console.log(flightNo == "");
  348. console.log(depDate == "");
  349. console.log(depAirport == "");*/
  350. if(airlineCode == "" || flightNo == "" || depDate == "" || depAirport == "" || arrAirport == ""){
  351. $(".query").find(".alert").show();
  352. $(".icon-remove-sign").click(function(){
  353. $(this).parent(".alert").hide();
  354. });
  355. return false;
  356. };
  357. $.ajax({
  358. // url:'http://114.55.6.23/jh/ticket/get',
  359. url:'http://114.55.6.23/jh/ticket/get',
  360. data:{
  361. "uname":uname,
  362. "token":token,
  363. "cabin":cabin,
  364. "airlineCode":airlineCode,
  365. "flightNo":flightNo,
  366. "depDate":depDate,
  367. "depAirport":depAirport,
  368. "arrAirport":arrAirport
  369. },
  370. type:"POST",
  371. dataType:"json",
  372. error:function(XMLHttpRequest, textStatus, errorThrown) {
  373. console.log(XMLHttpRequest.responseText);
  374. console.log(XMLHttpRequest.readyState);
  375. console.log(textStatus);
  376. },
  377. success:function(data){
  378. if(data.status == 100){
  379. $(".query .alert").html('<i class="icon-remove-sign"></i>'+data.attachment).show();
  380. $(".icon-remove-sign").click(function(){
  381. $(this).parent(".alert").hide();
  382. });
  383. }else if(data.status == 200){
  384. console.log(data);
  385. $(".query-list .first").hide();
  386. var queryStr = "";
  387. for(var i = 0;i < data.attachment.length;i++){
  388. var str='<tr>'+
  389. '<td>'+
  390. '<p>'+'<i class="icon-ok" style="display: none"></i>'+ '<span>'+ data.attachment[i].productType +'</span>'+'</p>'+
  391. '<p class="hidden">infoId:'+ '<span class="infoId">'+ data.attachment[i].infoId +'</span>'+'</p>'+
  392. '</td>'+
  393. '<td>'+
  394. '<p>航空公司:'+ '<span>'+ data.attachment[i].airLine +'</span>'+'</p>'+
  395. '<p>航班号:'+ '<span>'+ data.attachment[i].flightNum +'</span>'+'</p>'+
  396. '<p>舱位:'+ '<span>'+ data.attachment[i].cabin +'</span>'+'</p>'+
  397. '<p>舱位等级:'+'<span>'+ data.attachment[i].cabinClass+'</span>'+ '</p>'+
  398. '</td>'+
  399. '<td>'+
  400. '<p>出发城市:'+ '<span>'+ data.attachment[i].depAirport +'</span>'+'</p>'+
  401. '<p>'+ '<span>'+ data.attachment[i].depTime +'</span>' +'</p>'+
  402. '</td>'+
  403. '<td>'+
  404. '<p>到达城市:'+ '<span>'+ data.attachment[i].arrAirport +'</span>'+'</p>'+
  405. '<p>'+ '<span>'+ data.attachment[i].arrTime +'</span>'+'</p>'+
  406. '</td>'+
  407. '<td>'+
  408. '<p>舱位价格:'+ '<span>'+ data.attachment[i].cabinPrice +'</span>' +'</p>'+
  409. '<p>票面价格:'+ '<span>'+data.attachment[i].ticketPrice +'</span>' +'</p>'+
  410. '</td>'+
  411. '<td>'+
  412. '<p>退改签说明:'+ '<span>'+ data.attachment[i].tuiGaiQian.tuigaiqianStr +'</span>' +'</p>'+
  413. // '<p>产品类型:'+ data.attachment[i].productType+'</p>'+
  414. '</td>'+
  415. '</tr>';
  416. queryStr += str;
  417. }
  418. $(".query-list").html(queryStr);
  419. };
  420. var checkedInfo = "";
  421. $(".query-list tr").click(function(){
  422. $(".query-list tr.active").removeClass("active");
  423. $(this).addClass("active");
  424. checkedInfo = $(this).find(".infoId").html();
  425. // alert( checkedInfo);
  426. });
  427. $(".passengers-info").show();
  428. $(".quick-buy").show();
  429. // 增加乘客信息
  430. $(".addPsg").click(function(){
  431. $(".delPsg").removeAttr("disabled");
  432. var psgItemClone = $(".psg-item:last").clone(true);
  433. psgItemClone.find("input[name='Pname']").val("");
  434. psgItemClone.find("input[name='Ptype']").val("ADT");
  435. psgItemClone.find("select[name='docType']").val("NI");
  436. psgItemClone.find("input[name='docId']").val("");
  437. $(".cont-wrap").append(psgItemClone);
  438. });
  439. // 删除乘客信息
  440. $(".delPsg").click(function(){
  441. //第一条乘客信息中删除按钮禁用
  442. if($(".psg-item").length == 1){
  443. $(this).attr("disabled",true);
  444. }else{
  445. $(this).removeAttr("disabled");
  446. $(this).parents(".psg-item").remove();
  447. }
  448. });
  449. // 定义下单时需要的参数
  450. var psgList = new Array();
  451. var pname;
  452. var ptype;
  453. var docType;
  454. var docId;
  455. var birthDay;
  456. var psgItem;
  457. /*var depTime = data.attachment.depTime;
  458. var arrAirport = data.attachment.arrAirport;
  459. var cabin = data.attachment.cabin;
  460. var cabinClass = data.attachment.cabinClass;
  461. var cabinPrice = data.attachment.cabinPrice;
  462. var leg = data.attachment.leg;
  463. var depDate = data.attachment.depDate;
  464. var airLine = data.attachment.airLine;
  465. var flightNum = data.attachment.flightNum;
  466. var depAirport = data.attachment.depAirport;
  467. var arrTime = data.attachment.arrTime;
  468. var ticketPrice = data.attachment.ticketPrice;
  469. var amount = data.attachment.amount;
  470. var fee = data.attachment.fee;
  471. var tax = data.attachment.tax;*/
  472. $(".quick-buy").click(function(data){
  473. checkedInfo = $(".query-list tr.active").find(".infoId").html();
  474. // alert(checkedInfo);
  475. if($(".query-list tr.active").length < 1){
  476. var orderStr = '<li class="list-group-item" style="border: none;font-size: 16px;">请选择航班信息!</li>';
  477. var modHeader = '<h3 class="modal-title text-danger" id="gridSystemModalLabel">操作失败!</h3>';
  478. $(".modal-header button").next("h3").remove();
  479. $(".modal-header button").after(modHeader);
  480. $(".modal-footer .details").addClass("hide");
  481. $(".modal-body .list-group").html(orderStr);
  482. $('#orderinfoS').modal();
  483. return false;
  484. };
  485. //从身份证号中截取生日
  486. for(var i = 0;i < $(".psg-item").length;i++){
  487. pname = $(".psg-item").eq(i).find("input[name='Pname']").val();
  488. ptype = $(".psg-item").eq(i).find("select[name='Ptype']").val();
  489. docType = $(".psg-item").eq(i).find("select[name='docType']").val();
  490. docId = $(".psg-item").eq(i).find("input[name='docId']").val();
  491. birthDay = $(".psg-item").eq(i).find("input[name='birthDay']").val();
  492. psgItem = {
  493. "docType": docType,
  494. "docId": docId,
  495. "birthDay": birthDay,
  496. "Pname": pname,
  497. "ptype": ptype
  498. };
  499. psgList.push(psgItem);
  500. }
  501. function GetJsonData() {
  502. var orderParams = {
  503. "uname":uname,
  504. "token":token,
  505. /*"depTime":depTime,
  506. "arrAirport":arrAirport,
  507. "cabin":cabin,
  508. "cabinClass":cabinClass,
  509. "cabinPrice":cabinPrice,
  510. "leg":leg,
  511. "depDate":depDate,
  512. "airLine":airLine,
  513. "flightNum":flightNum,
  514. "depAirport":depAirport,
  515. "arrTime":arrTime,
  516. "ticketPrice":ticketPrice,
  517. "amount":amount,
  518. "fee":fee,
  519. "tax":tax,*/
  520. "infoId":checkedInfo,
  521. "passengers":psgList
  522. };
  523. return orderParams;
  524. };
  525. if(docId == "" || ptype == "" || docType == "" || birthDay == "" || pname == ""){
  526. var orderStr = '<li class="list-group-item" style="border: none;font-size: 16px;">请输入完整的乘机人信息!</li>';
  527. var modHeader = '<h3 class="modal-title text-danger" id="gridSystemModalLabel">操作失败!</h3>';
  528. $(".modal-header button").next("h3").remove();
  529. $(".modal-header button").after(modHeader);
  530. $(".modal-footer .details").addClass("hide");
  531. $(".modal-body .list-group").html(orderStr);
  532. $('#orderinfoS').modal();
  533. return false;
  534. };
  535. // CheckAdd();
  536. $.ajax({
  537. type:"POST",
  538. url:"http://114.55.6.23/jh/ticket/orderAndPayByParams",
  539. async:false,
  540. contentType: "application/json; charset=utf-8",
  541. data: JSON.stringify(GetJsonData()),
  542. dataType:"json",
  543. success:function(data){
  544. console.log(data);
  545. if(data.status == 200){
  546. var useOriginalPnr = "";
  547. if(data.attachment.useOriginalPnr){
  548. useOriginalPnr = "是";
  549. }else{
  550. useOriginalPnr = "否";
  551. }
  552. var orderStr = '<li class="list-group-item">淘宝订单号:'+data.attachment.orderid+'</li>'+
  553. '<li class="list-group-item">支付宝交易流水号:'+data.attachment.alipayTradeNo+'</li>'+
  554. '<li class="list-group-item">订单实际支付金额:'+data.attachment.totalMoney+'</li>'+
  555. '<li class="list-group-item">该单是否使用了原PNR出票:'+useOriginalPnr+'</li>';
  556. $(".modal-body .list-group").html(orderStr);
  557. $(".modal-footer .details").attr("href","order-details.html?Id="+data.attachment.orderid);
  558. $('#orderinfoS').modal();
  559. }else{
  560. var orderStr = '<li class="list-group-item">'+data.attachment+'</li>';
  561. var modHeader = '<h3 class="modal-title text-danger" id="gridSystemModalLabel">操作失败!</h3>';
  562. $(".modal-header button").after(modHeader);
  563. $(".modal-body .list-group").html(orderStr);
  564. $(".modal-footer .details").addClass("hide");
  565. $('#orderinfoS').modal();
  566. }
  567. },
  568. error:function(XMLHttpRequest, textStatus, errorThrown) {
  569. console.log(XMLHttpRequest.responseText);
  570. console.log(XMLHttpRequest.readyState);
  571. console.log(textStatus);
  572. alert("系统出问题啦o(╥﹏╥)o......");
  573. }
  574. });
  575. });
  576. }
  577. });
  578. });
  579. $('.modalClose').on('click',function(){
  580. window.history.go(0);
  581. })
  582. });
  583. </script>
  584. </body>
  585. </html>