src="jquery-2.2.4.min.js"; language="JavaScript"; //结算信息 window.onload = function() { initHtml(); } //点击了关闭 function click_cancel(father_name, self_name) { if(father_name) { var father = $(father_name); center_show(father); } else { $('.mask').css('display', 'none'); } $(self_name).css('display', 'none'); } //请求订单-短信通知 function get_order_send_message(mes_url) { $.getJSON(mes_url, function(res_data) { if(res_data['code'] != "0") { $('#ht_tr_mes_one').html(''); alert(res_data['info']); } if(res_data['message'].length <= 0) { $('#ht_tr_mes_one').html(''); return; } $('.notifacation').html('短信通知:' + res_data['message'].length + '条'); // $('#span_info_noti').html('短信通知:'+res_data['message'].length+'条'); console.log("短信" + mes_url); console.log(res_data); var ht_tr_mes_one_str = $('#ht_tr_mes_one').prop('outerHTML'); var ht_send_message_list = $('#ht_send_message_list'); var order_send_message_arr = res_data['message']; if(order_send_message_arr == undefined) { return; } var mesHTML = ''; for(var i = 0; i < order_send_message_arr.length; i++) { var dict = order_send_message_arr[i]; var HTML = ht_tr_mes_one_str; HTML = HTML.replace('[内容]', dict['send_mobile'] + ":" + dict['message']); HTML = HTML.replace('[操作人]', dict['user_name']); HTML = HTML.replace('[发送时间]', dict['send_time']); mesHTML += HTML; } console.log(mesHTML); ht_send_message_list.html(mesHTML); }); } //点击了三个固定的 function click_show_div(objName, self_obj) { var obj = $(objName); if(obj.css('display') == 'none') { center_show(obj); } else { obj.css('display', 'none'); } } //点击了第二级 function click_two_show_div(father_name, self_name) { var father = $(father_name); var self = $(self_name); father.css('display', 'none'); center_show(self); } //居中显示 var tempDiv = null; function center_show(show_div) { tempDiv = show_div; //显示蒙板 show_div.css('display', 'block'); show_div.css('z-index', 10); show_div.css('background-color', 'white'); show_div.css('position', 'fixed'); var w = show_div.css('width'); var h = show_div.css('height'); w = w.substr(0, w.length - 2); h = h.substr(0, h.length - 2); // var s_left=(window.screen.availWidth-w)/2 +"px"; // var s_top=(window.screen.availHeight-h)/2 +'px'; var s_left = (window.innerWidth - w) / 2 + 'px'; var s_top = (window.innerHeight - h) / 2 + 'px'; show_div.css('left', s_left); show_div.css('top', s_top); $('.mask').css('display', 'block'); } //点击蒙板 function hide_all() { $('.mask').css('display', 'none'); tempDiv.css('display', 'none'); } function getPar(par) { //获取当前URL var local_url = document.location.href; local_url = decodeURI(local_url); //获取要取得的get参数位置 var get = local_url.indexOf(par + "="); if(get == -1) { return ""; } //截取字符串 var get_par = local_url.slice(par.length + get + 1); //判断截取后的字符串是否还有其他get参数 var nextPar = get_par.indexOf("&"); if(nextPar != -1) { get_par = get_par.slice(0, nextPar); } return get_par; } var orderid = getPar("order_id"); //var status=getQueryString("status"); var url = "./st-xm/Api/order_details_qianlvhs.php?order_id=" + orderid; $.getJSON(url, function(res_data) { var jieguo = res_data; console.log(url); console.log(jieguo); if(jieguo.code == 0) { var order_no = jieguo.order_no; var order_status = jieguo.order_status; var order_source = jieguo.order_source; var order_status = jieguo.order_status; var sales = jieguo.sales; var order_sub = jieguo.order_sub; $('.order_no').html("订单号:" + order_no); $('.order_status').html(order_status); $('.order_source').html("订单来源:" + order_source); $('.sales').html("销售方式:" + sales); if(order_status == '待支付') { time = jieguo.pay_second; ShowCountDown(); setInterval("ShowCountDown()", 1000); //1000为1秒钟 $('#order-ticket').addClass('hide'); $('#order-complete').addClass('hide'); $('#order-cancel').addClass('hide'); $('#order-pay .order_sub_date').html(order_sub.order_sub_date); $('#order-pay .order_sub_time').html(order_sub.order_sub_time); $('#order-pay').css("display", "block"); } else if(order_status == '已出票') { var order_pay_success = jieguo.order_pay_success; var order_ticket_success = jieguo.order_ticket_success; $('#order-pay').addClass('hide'); $('#order-complete').addClass('hide'); $('#order-cancel').addClass('hide'); $('#order-ticket .order_sub_date').html(order_sub.order_sub_date); $('#order-ticket .order_sub_time').html(order_sub.order_sub_time); $('#order-ticket .order_pay_success_date').html(order_pay_success.order_pay_success_date); $('#order-ticket .order_pay_success_time').html(order_pay_success.order_pay_success_time); $('#order-ticket .order_ticket_success_date').html(order_ticket_success.order_ticket_success_date); $('#order-ticket .order_ticket_success_time').html(order_ticket_success.order_ticket_success_time); $('#order-ticket').css("display", "block"); } else if(order_status == '已完成') { var order_pay_success = jieguo.order_pay_success; var order_ticket_success = jieguo.order_ticket_success; var order_travel_success = jieguo.order_travel_success; $('#order-pay').addClass('hide'); $('#order-ticket').addClass('hide'); $('#order-cancel').addClass('hide'); $('#order-complete .order_sub_date').html(order_sub.order_sub_date); $('#order-complete .order_sub_time').html(order_sub.order_sub_time); $('#order-complete .order_pay_success_date').html(order_pay_success.order_pay_success_date); $('#order-complete .order_pay_success_time').html(order_pay_success.order_pay_success_time); $('#order-complete .order_ticket_success_date').html(order_ticket_success.order_ticket_success_date); $('#order-complete .order_ticket_success_time').html(order_ticket_success.order_ticket_success_time); $('#order-complete .order_travel_success_date').html(order_travel_success.order_travel_success_date); $('#order-complete').css("display", "block"); } else if(order_status == '已取消') { var order_cancel = jieguo.order_cancel; $('#order-pay').addClass('hide'); $('#order-ticket').addClass('hide'); $('#order-complete').addClass('hide'); $('#order-cancel .order_sub_date').html(order_sub.order_sub_date); $('#order-cancel .order_sub_time').html(order_sub.order_sub_time); $('#order-cancel .order_cancel_reason').html(order_cancel.order_cancel_reason); $('#order-cancel .order_cancel_date').html(order_cancel.order_cancel_date); $('#order-cancel .order_cancel_time').html(order_cancel.order_cancel_time); $('#order-cancel').css("display", "block"); } var line_info = jieguo.line_info; var insertTable = ""; for(var item in line_info) { insertTable += "