123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723 |
- <!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">
- <!-- 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">
- <!-- libraries -->
- <link href="css/lib/font-awesome.css" type="text/css" rel="stylesheet"/>
- <!-- this page specific styles -->
- <link rel="stylesheet" href="css/compiled/flight-query.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>
- <a href="./index.html">
- <i class="icon-home"></i>
- <span>首页</span>
- </a>
- </li>
- <li class="active">
- <div class="pointer">
- <div class="arrow"></div>
- <div class="arrow_border"></div>
- </div>
- <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-tasks"></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">
- <!-- query form -->
- <form role="form" class="query">
- <div class="alert alert-danger"><i class="icon-remove-sign"></i>请输入您的查询信息。</div>
- <textarea rows="10" class="form-control query-txt" placeholder="由于阿里接口参数原因,本系统有以下限制
- 1: 不支持往返下单
- 2: 不支持护照下单及其他证件下单
- 3: 生日格式 YYYY-MM-DD
- " name="txt"></textarea>
- <button class="btn-flat" type="button">查询</button>
- </form>
- <!-- end query form -->
- <!-- query-list table -->
- <div class="panel panel-default">
- <div class="panel-heading">航班信息</div>
- <div class="panel-body">
- <div class="table-wrapper orders-table section">
- <div class="row">
- <table class="table">
- <thead>
- <tr class="text-center">
- <th class="col-md-1" style="width: 14%">
- 产品类型
- </th>
- <th class="col-md-2" style="width: 15%">
- <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" style="width: 12%">
- <span class="line"></span>
- 价格
- </th>
- <th class="col-md-3">
- <span class="line"></span>
- 退改签信息
- </th>
- </tr>
- </thead>
- <tbody class="query-list">
- <!-- row -->
- <tr class="first">
- <td>--</td>
- <td>--</td>
- <td>--</td>
- <td>--</td>
- <td>--</td>
- <td>--</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <!-- end query-list table -->
- </div>
- <div class="panel panel-default passengers-info">
- <div class="panel-heading">乘车人信息</div>
- <div class="panel-body">
- <div class="row">
- <table class="table table-hover">
- <thead>
- <tr>
- <th class="col-md-2" width="14%;">
- 乘客姓名
- </th>
- <th class="col-md-3" width="20%;">
- <span class="line"></span>
- 证件类型
- </th>
- <th class="col-md-3" width="24%;">
- <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 class="passengers-list">
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div class="alert alert-success" style="display: none;"><i class="icon-ok-sign"></i>您已成功下单。</div>
- <button class="btn-flat success quick-buy" type="button" data-toggle="modal">下单</button>
- </div>
- </div>
- <!-- end main container -->
- <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="orderinfoS" id="orderinfoS">
- <div class="modal-dialog" role="document" style="width:32%;">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close modalClose" data-dismiss="modal"><span
- aria-hidden="true">×</span></button>
- <h3 class="modal-title text-success" id="gridSystemModalLabel">操作成功!</h3>
- </div>
- <div class="modal-body">
- <ul class="list-group" style="margin-bottom: 0;">
- <!-- <li class="list-group-item">淘宝订单号:12313356633</li>
- <li class="list-group-item">支付宝交易流水号:800123654796643366555663</li>
- <li class="list-group-item">订单实际支付金额:1000</li>
- <li class="list-group-item">该单是否使用了原PNR出票:否</li> -->
- </ul>
- </div>
- <div class="modal-footer">
- <a type="button" class="btn btn-info details" href="javascript:;">查看订单详情</a>
- <button type="button" class="btn btn-default modalClose" data-dismiss="modal">关闭</button>
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div><!-- /.modal -->
- <!-- scripts -->
- <script src="js/jquery.min.js"></script>
- <script src="js/bootstrap.min.js"></script>
- <script src="js/theme.js"></script>
- <script>
- $(function () {
- var uname = localStorage.uname;
- var token = localStorage.tokenId;
- $(".icon-remove-sign").click(function () {
- $(this).parent(".alert").hide();
- });
- // 提交表单
- $(".query button").click(function () {
- var txt = $(".query-txt").val();
- // console.log(txt);
- if (txt == "") {
- $(this).parent(".query").find(".alert").show();
- } else {
- $.ajax({
- url: 'http://114.55.6.23/jh/ticket/parseTxtAndGetInfo',
- // url:'http://192.168.1.19:16001/ticket/parseTxtAndGetInfo',
- data: {"uname": uname, "token": token, "txt": txt},
- type: "POST",
- dataType: "json",
- error: function (XMLHttpRequest, textStatus, errorThrown) {
- console.log(XMLHttpRequest.responseText);
- console.log(XMLHttpRequest.readyState);
- console.log(textStatus);
- $(".query .alert").html('<i class="icon-remove-sign"></i>' + "您输入的信息有误,请重新输入!").show();
- $(".icon-remove-sign").click(function () {
- $(this).parent(".alert").hide();
- });
- },
- success: function (data) {
- if (data.status == 100) {
- $(".query .alert").html('<i class="icon-remove-sign"></i>' + data.attachment).show();
- $(".icon-remove-sign").click(function () {
- $(this).parent(".alert").hide();
- });
- } else if (data.status == 200) {
- // $(".query-txt").val("");
- $(".query-list .first").hide();
- $(".passengers-info").show();
- $(".quick-buy").show();
- console.log(data);
- var queryList = "";
- var passengersList = "";
- for (var i = 0; i < data.attachment.getPriceResps.length; i++) {
- var str = '<tr>' +
- '<td>' +
- '<p>' + '<i class="icon-ok" style="display: none"></i>' + '<span>' + data.attachment.getPriceResps[i].productType + '</span>' + '</p>' +
- '<p class = "hidden">infoId:' + '<span class="infoId">' + data.attachment.getPriceResps[i].infoId + '</span>' + '</p>' +
- '</td>' +
- '<td>' +
- '<p>航空公司:' + '<span>' + data.attachment.getPriceResps[i].airLine + '</span>' + '</p>' +
- '<p>航班号:' + '<span>' + data.attachment.getPriceResps[i].flightNum + '</span>' + '</p>' +
- '<p>舱位:' + '<span>' + data.attachment.getPriceResps[i].cabin + '</span>' + '</p>' +
- '<p>舱位等级:' + '<span>' + data.attachment.getPriceResps[i].cabinClass + '</span>' + '</p>' +
- '</td>' +
- '<td>' +
- '<p>出发城市:' + '<span>' + data.attachment.getPriceResps[i].depAirport + '</span>' + '</p>' +
- '<p>' + '<span>' + data.attachment.getPriceResps[i].depTime + '</span>' + '</p>' +
- '</td>' +
- '<td>' +
- '<p>到达城市:' + '<span>' + data.attachment.getPriceResps[i].arrAirport + '</span>' + '</p>' +
- '<p>' + '<span>' + data.attachment.getPriceResps[i].arrTime + '</span>' + '</p>' +
- '</td>' +
- '<td>' +
- '<p>舱位价格:' + '<span>' + data.attachment.getPriceResps[i].cabinPrice + '</span>' + '</p>' +
- '<p>票面价格:' + '<span>' + data.attachment.getPriceResps[i].ticketPrice + '</span>' + '</p>' +
- '</td>' +
- '<td>' +
- '<p>退改签说明:' + '<span>' + data.attachment.getPriceResps[i].tuiGaiQian.tuigaiqianStr + '</span>' + '</p>' +
- // '<p>产品类型:'+ data.attachment.getPriceResps[i].productType+'</p>'+
- '</td>' +
- '</tr>';
- queryList += str;
- }
- $(".query-list").html(queryList);
- //判断返回的乘客信息是否有误
- if (data.attachment.passengers.length < 1) {
- passengersList = '<tr class="psg-item">' +
- '<td>' +
- '<input class="form-control pname" type="text" name="Pname" required="required" placeholder="姓名">' +
- '</td>' +
- '<td>' +
- '<select class="form-control docType" name="docType" required="required">' +
- '<option value="NI">身份证</option>' +
- '<option value="PP">护照</option>' +
- '<option value="MI">军人证</option>' +
- '<option value="BH">回乡证</option>' +
- '<option value="TW">台胞证</option>' +
- '<option value="HK">港澳通行证</option>' +
- '<option value="PO">警官证 </option>' +
- '<option value="SO">士兵证</option>' +
- '<option value="TH">其他证件</option>' +
- '</select>' +
- '</td>' +
- '<td>' +
- '<input class="form-control docId" type="text" name="docId" required="required"/>' +
- '</td>' +
- '<td>' +
- '<input class="form-control birthDay" type="text" name="birthDay" required="required" placeholder="YYYY-MM-DD"/>' +
- '</td>' +
- '<td>' +
- '<select class="form-control ptype" name="Ptype" required="required">' +
- '<option value="ADT">成人</option>' +
- '<option value="CHD">儿童</option>' +
- '</select>' +
- '</td>' +
- '</tr>';
- } else {
- for (var i = 0; i < data.attachment.passengers.length; i++) {
- if (data.attachment.passengers[i].docId == null || data.attachment.passengers[i].docId == "") {
- var nameval = "";
- if (data.attachment.passengers[i].pname == null || data.attachment.passengers[i].pname == "") {
- nameval = "";
- } else {
- nameval = data.attachment.passengers[i].pname;
- }
- ;
- var str = '<tr class="psg-item">' +
- '<td>' +
- '<input class="form-control pname" type="text" name="Pname" required="required" placeholder="姓名" value=' + nameval + '>' +
- '</td>' +
- '<td>' +
- '<select class="form-control docType" name="docType" required="required">' +
- '<option value="NI">身份证</option>' +
- '<option value="PP">护照</option>' +
- '<option value="MI">军人证</option>' +
- '<option value="BH">回乡证</option>' +
- '<option value="TW">台胞证</option>' +
- '<option value="HK">港澳通行证</option>' +
- '<option value="PO">警官证 </option>' +
- '<option value="SO">士兵证</option>' +
- '<option value="TH">其他证件</option>' +
- '</select>' +
- '</td>' +
- '<td>' +
- '<input class="form-control docId" type="text" name="docId" required="required"/>' +
- '</td>' +
- '<td>' +
- '<input class="form-control birthDay" type="text" name="birthDay" required="required" placeholder="YYYY-MM-DD"/>' +
- '</td>' +
- '<td>' +
- '<select class="form-control ptype" name="Ptype" required="required">' +
- '<option value="ADT">成人</option>' +
- '<option value="CHD">儿童</option>' +
- '</select>' +
- '</td>' +
- '</tr>';
- passengersList += str;
- } else {
- var docTypeL;
- var docTypeS = data.attachment.passengers[i].docType;
- switch (docTypeS) {
- case "PP":
- docTypeL = "护照";
- break;
- case "NI":
- docTypeL = "身份证";
- break;
- case "MI":
- docTypeL = "军人证";
- break;
- case "BH":
- docTypeL = "回乡证";
- break;
- case "TW":
- docTypeL = "台胞证";
- break;
- case "HK":
- docTypeL = "港澳通行证";
- break;
- case "PO":
- docTypeL = "警官证";
- break;
- case "SO":
- docTypeL = "士兵证";
- break;
- case "TH":
- docTypeL = "其他证件";
- break;
- }
- docTypeS = docTypeL;
- var pTypeL;
- var pTypeS = data.attachment.passengers[i].ptype;
- switch (pTypeS) {
- case "ADT":
- pTypeL = "成人";
- break;
- case "CHD":
- pTypeL = "儿童";
- break;
- }
- pTypeS = pTypeL;
- var pasStr = '<tr>' +
- '<td>' +
- '<p class="pname">' + data.attachment.passengers[i].pname + '</p>' +
- '</td>' +
- '<td>' +
- '<p>' + '<span class="docType hidden">' + data.attachment.passengers[i].docType + '</span>' + docTypeS + '</p>' +
- '</td>' +
- '<td>' +
- '<p>' + '<span class="docId">' + data.attachment.passengers[i].docId + '</span>' + '</p>' +
- '</td>' +
- '<td>' +
- '<p class="birthDay">' + data.attachment.passengers[i].birthDay + '</p>' +
- '</td>' +
- '<td>' +
- '<p>' + '<span class="ptype hidden">' + data.attachment.passengers[i].ptype + '</span>' + pTypeS + '</p>' +
- '</td>' +
- '</tr>';
- passengersList += pasStr;
- }
- }
- }
- $(".passengers-list").html(passengersList);
- //选中需要购买的航班信息
- var checkedInfo = "";
- $(".query-list tr").click(function () {
- $(".query-list tr.active").removeClass("active");
- $(this).addClass("active");
- checkedInfo = $(this).find(".infoId").html();
- // alert( checkedInfo);
- });
- //身份证号回填生日
- $("input[name='docId']").blur(function () {
- var that = $(this);
- var inputdocid = $(this).val().trim();
- var docselected = that.parent().prev();
- var bthdayinput = that.parent().next();
- var valtype = docselected.find("select[name='docType']").val();
- var valbthday = bthdayinput.find("input[name='birthDay']");
- if (inputdocid != null && inputdocid != "") {
- if (valtype == "NI") {
- var brithday = getBirthdayFromIdCard(inputdocid);
- valbthday.val(brithday);
- //valbthday.attr("disabled","disabled");
- } else {
- valbthday.val("");
- }
- }
- });
- function getBirthdayFromIdCard(idCard) {
- var birthday = "";
- if (idCard != null && idCard != "") {
- if (idCard.length == 15) {
- birthday = "19" + idCard.substr(6, 6);
- } else if (idCard.length == 18) {
- birthday = idCard.substr(6, 8);
- } else {
- alert("请输入正确的身份证号!");
- }
- ;
- birthday = birthday.replace(/(.{4})(.{2})/, "$1-$2-");
- }
- return birthday;
- }
- // 定义下单需要的数据
- var respsg = data.attachment.passengers;
- var psgList = new Array();
- var pname;
- var ptype;
- var docType;
- var docId;
- var birthDay;
- var psgItem;
- $(".quick-buy").on('click', function (data) {
- checkedInfo = $(".query-list tr.active").find(".infoId").html();
- // alert(checkedInfo);
- if ($(".query-list tr.active").length < 1) {
- var orderStr = '<li class="list-group-item" style="border: none;font-size: 16px;">请选择航班信息!</li>';
- var modHeader = '<h3 class="modal-title text-danger" id="gridSystemModalLabel">操作失败!</h3>';
- $(".modal-header button").next("h3").remove();
- $(".modal-header button").after(modHeader);
- $(".modal-footer .details").addClass("hide");
- $(".modal-body .list-group").html(orderStr);
- $('#orderinfoS').modal();
- return false;
- };
- psgList = [];
- //各种情况的数据
- if (respsg.length < 1) {
- pname = $(".passengers-list tr td").find(".pname").val();
- ptype = $(".passengers-list tr td").find(".ptype").val();
- docType = $(".passengers-list tr td").find(".docType").val();
- docId = $(".passengers-list tr td").find(".docId").val();
- birthDay = $(".passengers-list tr td").find(".birthDay").val();
- if (docId == null || docId == ""){
- var orderStr = '<li class="list-group-item" style="border: none;font-size: 16px;">请输入证件号码!</li>';
- var modHeader = '<h3 class="modal-title text-danger" id="gridSystemModalLabel">操作失败!</h3>';
- $(".modal-header button").next("h3").remove();
- $(".modal-header button").after(modHeader);
- $(".modal-footer .details").addClass("hide");
- $(".modal-body .list-group").html(orderStr);
- $('#orderinfoS').modal();
- return false;
- }
- psgItem = {
- "docType": docType,
- "docId": docId,
- "birthDay": birthDay,
- "Pname": pname,
- "ptype": ptype
- };
- psgList.push(psgItem);
- } else {
- var flag = true;
- for (var i = 0; i < respsg.length; i++) {
- if (respsg[i].docId == null || respsg[i].docId == "") {
- flag = false;
- } else {
- flag = true;
- }
- }
- if (flag) {
- //下单时,获取联系人信息
- for (var i = 0; i < $(".passengers-list tr").length; i++) {
- pname = $(".passengers-list tr").eq(i).find("td").find(".pname").html();
- ptype = $(".passengers-list tr").eq(i).find("td").find(".ptype").html();
- docType = $(".passengers-list tr").eq(i).find("td").find(".docType").html();
- docId = $(".passengers-list tr").eq(i).find("td").find(".docId").html();
- birthDay = $(".passengers-list tr").eq(i).find("td").find(".birthDay").html();
- if (docId == null || docId == ""){
- var orderStr = '<li class="list-group-item" style="border: none;font-size: 16px;">请输入证件号码!</li>';
- var modHeader = '<h3 class="modal-title text-danger" id="gridSystemModalLabel">操作失败!</h3>';
- $(".modal-header button").next("h3").remove();
- $(".modal-header button").after(modHeader);
- $(".modal-footer .details").addClass("hide");
- $(".modal-body .list-group").html(orderStr);
- $('#orderinfoS').modal();
- return false;
- }
- psgItem = {
- "docType": docType,
- "docId": docId,
- "birthDay": birthDay,
- "Pname": pname,
- "ptype": ptype
- };
- psgList.push(psgItem);
- }
- } else {
- //下单时,获取联系人信息
- for (var i = 0; i < $(".passengers-list tr").length; i++) {
- pname = $(".passengers-list tr").eq(i).find(".pname").val();
- ptype = $(".passengers-list tr").eq(i).find(".ptype").val();
- docType = $(".passengers-list tr").eq(i).find(".docType").val();
- docId = $(".passengers-list tr").eq(i).find(".docId").val();
- birthDay = $(".passengers-list tr").eq(i).find(".birthDay").val();
- if (docId == null || docId == ""){
- var orderStr = '<li class="list-group-item" style="border: none;font-size: 16px;">请输入证件号码!</li>';
- var modHeader = '<h3 class="modal-title text-danger" id="gridSystemModalLabel">操作失败!</h3>';
- $(".modal-header button").next().remove();
- $(".modal-header button").after(modHeader);
- $(".modal-footer .details").addClass("hide");
- $(".modal-body .list-group").html(orderStr);
- $('#orderinfoS').modal();
- return false;
- }
- //var data = $(".passengers-list tr").eq(i).find('.form-control').serialize();
- psgItem = {
- "docType": docType,
- "docId": docId,
- "birthDay": birthDay,
- "Pname": pname,
- "ptype": ptype
- };
- psgList.push(psgItem);
- }
- }
- ;
- }
- ;
- function GetJsonData() {
- var orderParams = {
- "uname": uname,
- "token": token,
- "infoId": checkedInfo,
- "passengers": psgList
- };
- return orderParams;
- };
- var send = {
- "uname": uname,
- "token": token,
- "infoId": checkedInfo,
- "passengers": psgList
- }
- console.log(send);
- $.ajax({
- type: "POST",
- // url:"http://192.168.1.19:16001/ticket/orderAndPayByParams",
- url: "http://www.zjh.free.ngrok.cc/ticket/orderAndPayByParams",
- async: false,
- //; charset=utf-8
- contentType: "application/json",
- data: JSON.stringify(send),
- dataType: "json",
- success: function (data) {
- console.log(data);
- if (data.status == 200) {
- var useOriginalPnr = "";
- if (data.attachment.useOriginalPnr) {
- useOriginalPnr = "是";
- } else {
- useOriginalPnr = "否";
- }
- var orderStr = '<li class="list-group-item">淘宝订单号:' + data.attachment.orderid + '</li>' +
- '<li class="list-group-item">支付宝交易流水号:' + data.attachment.alipayTradeNo + '</li>' +
- '<li class="list-group-item">订单实际支付金额:' + data.attachment.totalMoney + '</li>' +
- '<li class="list-group-item">该单是否使用了原PNR出票:' + useOriginalPnr + '</li>';
- var modHeader = '<h3 class="modal-title text-success" id="gridSystemModalLabel">操作成功!</h3>';
- $(".modal-header button").next().remove();
- $(".modal-header button").after(modHeader);
- $(".modal-footer .hide").removeClass("hide");
- $(".modal-body .list-group").html(orderStr);
- $(".modal-footer .details").attr("href", "./order-details.html?Id=" + data.attachment.orderid);
- $('#orderinfoS').modal();
- } else {
- var orderStr = '<li class="list-group-item" style="border: none;font-size: 16px;">'+data.attachment+'</li>';
- var modHeader = '<h3 class="modal-title text-danger" id="gridSystemModalLabel">操作失败!</h3>';
- $(".modal-header button").next("h3").remove();
- $(".modal-header button").after(modHeader);
- $(".modal-footer .details").addClass("hide");
- $(".modal-body .list-group").html(orderStr);
- $('#orderinfoS').modal();
- return false;
- }
- },
- error: function (XMLHttpRequest, textStatus, errorThrown) {
- console.log(XMLHttpRequest.responseText);
- console.log(XMLHttpRequest.readyState);
- console.log(textStatus);
- alert("系统出问题啦o(╥﹏╥)o......");
- }
- });
- });
- }
- }
- });
- }
- });
- /*$('.modalClose').on('click', function () {
- window.history.go(0);
- })*/
- });
- </script>
- </body>
- </html>
|