/** * Created by luocj on 2016/11/23. */ var order_id = getPar('order_id'); var tr = $('.order_list').prop('outerHTML'); window.onload = function () { getHotelDetail(); downBookingRecord() }; function getHotelDetail() { var param = { type: 'order_OutHotelOrderList', op: 'getOrderDetail', order_id: order_id }; $.ajax({ data: param, url: base_api, dataType: 'json', type: 'post', success: function (res_data) { ZZLog(res_data); setDataBody(res_data); }, error: function (e) { ZZAlertInfo(e) } }) } function setDataBody(res_data) { //替换上左 $('#order_id').text('订 单 号: '+order_id); if (res_data['order_status']==148 || res_data['order_status']==383){ $('#order_status').text('已取消'); }else if(res_data['order_status']==313){ $('#order_status').text('待发单'); }else if(res_data['order_status']==198) { $('#order_status').text('待确认'); }else if(res_data['order_status']==314) { $('#order_status').text('已安排'); }else if(res_data['order_status']==147) { $('#order_status').text('已完成'); } if (res_data['order_confirm']!==null){ $('#make_sure_num').text('酒店确认号:'+res_data['order_confirm']); }else { $('#make_sure_num').text(''); } //替换下方预订信息 $('#hotel_name').text(res_data['parent_prod_name']); $('#product_name').text(res_data['prod_name']); $('#start_date').text(res_data['prod_start_station_date']); $('#end_date').text(res_data['prod_end_station_date']); $('#datediff').text('共 ' + res_data['sum_night'] + ' 晚'); $('#time').text(res_data['child_detail'][0]['run_time']); $('#contacts').text(res_data['customer_name']); $('#phone').text(res_data['customer_mobile']); var customer_memo = res_data['customer_memo']; var notes = customer_memo.split('||'); var user_org_id = getCookie('user_org_id'); $.each(notes, function (key, item) { if(item != ''){ var tmp = item.split('|'); var div_note = '