Tiket Railink  

Railink Ticket
Selamat datang di web reservasi railink
  • 1
    Pencarian

    Pencarian Jadwal

  • 2
    Penumpang

    Isi Data Penumpang

  • 3
    Pembayaran

    Pembayaran Online

  • 4
    E-Ticket

    Cetak E-Ticket

INFO JADWAL & RESERVASI TIKET
Stasiun Keberangkatan
Stasiun Kedatangan
Tanggal Pergi
Tanggal Pulang
Dewasa Anak - Anak
PEMBAYARAN TIKET
Silahkan masukkan kode pemesanan Anda:
$(document).ready(function(){ var _url_check_payment_ = "https://ticket.railink.co.id/js/checkPayment"; var _url_seat_map_ = "https://ticket.railink.co.id/js/seatMap"; var _url_get_book_ = "https://ticket.railink.co.id/js/getBook"; /** * VALIDATION FORM PAYMENT */ var dhtml = ''; $(".konfirmasi","form.form_payment").on("change",function(e){ var loading = ''; if($(this).is(":checked")){ var _ticket = $(this).data("value"); $.ajax({ type : "POST", data : "type_ticket=" + _ticket + "&trx=&csrf_token=", url : _url_check_payment_, beforeSend : function(){ $(loading).modal({keyboard: false}); },success: function(result){ if(result == 1){ $("input[name='sessevent'],button#pay_next").removeAttr("disabled"); $("button#pay_next").addClass("btn-warning").css({"color" : "white"}); }else{ $(".konfirmasi","form.form_payment").removeAttr("checked"); $(dhtml).modal("show").on("hidden.bs.modal",function(){ $(this).remove(); }); } }, complete : function(){ $("#loading").modal("hide").remove(); } }); }else{ $("button#pay_next").removeClass("btn-warning").css({"color" : "grey"}); e.preventDefault(); } }); /** End validation form payment **/ $("#myResetSeat").modal("show"); // modal untuk pengisian tempat duduk ulang saat terjadi error 001000 di page view ticket/customer_form /** * Accordion form jadwal & reservasi tiket */ $(".form-reser:gt(0)").hide(); $(".reservation-form").each(function(){ $(".head-reservation",this).on("click",function(e){ var $target = $(e.target).parents(".reservation-form"); $(this).next().slideToggle(400,function(){ if($(this).is(":visible")){ $($target).siblings().find(".form-reser").slideUp(400,function(){ $(this).siblings("div").find("span").removeClass("glyphicon-collapse-down").addClass("glyphicon-collapse-up"); }); $(this).siblings("div").find("span").removeClass("glyphicon-collapse-up").addClass("glyphicon-collapse-down"); }else{ $($target).siblings().find(".form-reser").slideDown(400,function(){ $(this).siblings("div").find("span").removeClass("glyphicon-collapse-up").addClass("glyphicon-collapse-down"); }); $(this).siblings("div").find("span").removeClass("glyphicon-collapse-down").addClass("glyphicon-collapse-up"); } }); }); }); /** end accordion form jadwal **/ /** * Validation Payment */ $("#Div_1","#payment").hide(); $("#mydiv > input").on("click",function(){ $(this).hide(); $("#Div_1","#payment").show(); }); // End Payment Validation parent.postMessage({ height:$(document.body).height()+50+"px" },"*"); $('.slide-show').slick({ infinite: true, dots: true, slidesToShow: 1, arrows: false, autoplay: true }); /** * VALIDATION SCHEDULE SELECTION * file : views/ticket/schedules_result.php * param * inputSchedule * schedule approve */ var fxS = { "initSortSch" : function(selector){ var t_sort = $(selector).attr("data-sort"); var sel_status = $(selector).parent().find(".active"); $(selector).parent().find("span").remove(); if(t_sort === "asc"){ $(selector) .attr("data-sort","desc") .append(" ▴"); }else{ $(selector) .attr("data-sort","asc") .append(" ▾"); } if($(sel_status).length === 0){ $(selector) .parent() .prepend(""); }else{ $(sel_status) .replaceWith(""); } }, "TypeSortSch" : function(selector){ var t_sort = $(selector).attr("data-sort"); if(t_sort === "asc"){ return -1; }else{ return 1; } } } $("div[class$='term-cond']").parent().next().andSelf().hide(); // hidden div term condition var len_train = $("div .list-train").length; $("div .list-train").each(function(x, lt){ /* * Create sort function schedule form * sorty by * price * time * subclass * @type */ $("select[name='sortlist'] option[value='0']").attr("selected",true); $("select[name='sortlist']").each(function(y,sel){ $(this).on("change",function(e){ var val_sort = $(e.target).val(); if(val_sort !== "0"){ if(y === x){ var opt_sel = $("option:selected",e.target); fxS.initSortSch(opt_sel); var rec = $("tbody > tr",lt).get(); rec.sort(function(a,b){ var sortSch = fxS.TypeSortSch(opt_sel); if( val_sort === "p_adult"){ var val1 = parseInt($("td:eq(2) > .p_adult",a).text().replace(/.+/,"")); var val2 = parseInt($("td:eq(2) > .p_adult",b).text().replace(/.+/,"")); return (val1 < val2) ? -sortSch : (val1 > val2) ? sortSch : 0; }else if(val_sort === "p_child"){ var val1 = parseInt($("td:eq(2) > .p_child",a).text().replace(/.+/,"")); var val2 = parseInt($("td:eq(2) > .p_child",b).text().replace(/.+/,"")); return (val1 < val2) ? -sortSch : (val1 > val2) ? sortSch : 0; }else if(val_sort === "t_departure"){ var date1 = new Date($("td:eq(1) > .t_departure",a).attr("data-date")); var date2 = new Date($("td:eq(1) > .t_departure",b).attr("data-date")); return (date1.getTime() < date2.getTime()) ? -sortSch : (date1.getTime() > date2.getTime()) ? sortSch : 0; }else if(val_sort === "t_arrive"){ var date1 = new Date($("td:eq(1) > .t_arrive",a).attr("data-date")); var date2 = new Date($("td:eq(1) > .t_arrive",b).attr("data-date")); return (date1.getTime() < date2.getTime()) ? -sortSch : (date1.getTime() > date2.getTime()) ? sortSch : 0; }else if(val_sort === "subclass"){ var val1 = $(a).find(".subclass","td:eq(0)").text().toUpperCase(); var val2 = $(b).find(".subclass","td:eq(0)").text().toUpperCase(); return (val1 < val2) ? -sortSch : (val1 > val2) ? sortSch : 0; } }); $.each(rec, function(index, row){ $("tbody",lt).append(row); }); } // endif x === y } // endif val_sort }); }); /* * Create seatmap selection */ $("a[class$='Jadwal']",this).each(function(index, elements){ $(elements).click(function(e){ e.preventDefault(); var targetDiv = $(e.target).closest($("div .list-train")); var len_column = $(e.target).closest("table").find("tr").size(); $(e.target).closest("tr").siblings("tr").toggle({duration: "slow", complete : function(){ $("input",this).prop({disabled : true}); }}); // end toggle $(elements).parent().each(function(){ $(this).addClass("hidden"); var target_button = $(this).siblings("div"); // button pilih or hapus jadwal if($(elements).is(".hapusJadwal")){ $(target_button).removeClass("hidden"); $(this).siblings("input").prop({disabled : true}); $(targetDiv).next("#seat-map-layout").slideUp("slow",function(){$(this).remove();}); if($("div[class$='term-cond']").is(":visible")){ $("div[class$='term-cond']").parent().next().andSelf().fadeOut("fast"); $("div[class$='term-cond']").find(":checkbox").removeAttr("checked"); } }else if($(elements).is(".pilihJadwal")){ $(this).siblings("input").prop({disabled : false}); /** LOAD LAYOUT SEAT MAP **/ var input_seat = $(this).closest("td").find("input[name*=getSeatMap]").val(); var kategori = $.parseJSON($(this).siblings("input[name^=inputSchedule]").val()); // title berangkat or kembali $.ajax({ type : "GET", url : _url_seat_map_, data : "s=" + input_seat + "&kat=" + kategori[5] + "&csrf_token=", beforeSend : function(){ $("

").appendTo($(targetDiv)); }, success : function(html){ $(html).fadeIn("fast",function(){ /* * Create click seat button * @type object */ var num_passenger = '0'; var num_checked = 0; $("button",this).each(function(key,element){ $(this).click(function(e){ var count_seat = 0; var data_seat = $("input",e.target).val(); var len = data_seat.length; if(len > 0){ if($("span",this).hasClass("glyphicon-unchecked")){ $("span",this).removeClass("glyphicon-unchecked").addClass("glyphicon-check"); $("input",this).prop({disabled : false}); num_checked = num_checked + 1; }else{ $("input",this).prop({disabled : true}); num_checked = num_checked - 1; $("span",this).removeClass("glyphicon-check").addClass("glyphicon-unchecked"); } }else{ var dhtml = ''; $(dhtml).modal("show"); } /** * Jika jumlah tempat duduk yang di click/booking * lebih banyak dari jumlah calon penumpang * maka di void */ if(num_checked > num_passenger){ var dhtml = ''; $(dhtml).modal("show"); $("input",this).prop({disabled : true}); num_checked = num_checked - 1; $("span",this).removeClass("glyphicon-check").addClass("glyphicon-unchecked"); } /** TOGGLE TERM CONDITION CHECKBOX AND BUTTON NEXT * if length of hapus button on table equal with element div .list-train * **/ $(e.target).closest("form").find("input[name^='seat_position']").each(function(){ if($(this).is(":enabled")){ count_seat = count_seat + $(this).length; } }); /** * Jika jumlah tepat duduk yang dibooking * sudah sama dengan jumlah calon penumpang * satu perjalanan bahkan dua perjalanan * maka term and conditions dimunculkan */ var num_rpp = '0'; if(count_seat === (num_passenger * parseInt(num_rpp))){ $("div[class$='term-cond']").parent().fadeIn("fast",function(){ $(this).find(":checkbox").click(function(){ if($(this).is(":checked")){ $(this).closest("div.row").next().show("fast"); // show button "LANJUTKAN/NEXT" }else{ $(this).closest("div.row").next().hide("fast"); // hide button "LANJUTKAN/NEXT" } }); }); }else{ $("div[class$='term-cond']").parent().next().andSelf().fadeOut("fast"); $("div[class$='term-cond']").find(":checkbox").removeAttr("checked"); } /** END TOGGLE TERM CONDITION CHECKBOX AND BUTTON NEXT **/ e.preventDefault(); }); // end click button /** * Untuk browser selain firefox * dibuat trigger di icon glyphicon-check */ $(this).children("span").on("click",function(){ $(this).parent().trigger("click"); }); }); // end each button .btn-group-vertical }).insertAfter($(targetDiv)); // end html slideDown }, complete : function(){ $(target_button).removeClass("hidden"); $("p",targetDiv).remove(); } }); /** END LAYOUT SEAT MAP **/ } }); // tombol batal di show e.preventDefault(); }); // END CLICK }); }); /** END SCHEDULE SELECTION **/ $("input[class*=datepicker]").datepicker({ changeMonth: true, changeYear: true, dateFormat:'dd-mm-yy', yearRange : '-100:+0' }); $( "input[class*=datespicker]").datepicker({ changeMonth: true, numberOfMonths: 1, minDate: +1, dateFormat: 'dd-mm-yy' }); $("#penumpang").accordion(); /** * Accordion for flexi form customer * if some error in accordion, the table is showed **/ $("div#collapse_0").collapse("show"); $("div[id^='collapse_']","#accordion").each(function(i,e){ var check_error = $(".error > i",this).length; if(check_error > 0){ $(this).collapse("show"); } }); /** * VALIDATION CUSTOMER FORM * file : /views/ticket/customer_form.php * @param * --- adult & child ---- * customer name * passenger birth day * * ------ adult ------ * customer contact * customer email * passanger name * passenger contact * passenger ID */ $("input[name='customer_name']").focus(); // $(".error").hide(); $("input[class$=submitt]").click(function(event){ /** * Validation Fullname Reserver * @param {input} full name */ $("input[name*='name']").each(function(e){ var data = $(this).val(); var errMess = $(this).data("errmess"); var len = data.length; if(len > 2){ if(validate_name(data)){ $(this).next(".error").hide(); }else{ $(this).next(".error").html("Nama lengkap hanya terdiri dari karakter [a-z] atau [A-Z] dan spasi.").show(); event.preventDefault(); } }else{ $(this).next(".error").html("Nama lengkap terdiri atas minimum 3 karakter.").show(); event.preventDefault(); } }); /** * Validation Contact Reserver * @param {type} numeric */ var data = $("input[name='customer_contact']").val(); var len = data.length; if(len > 3){ if(validate_phone(data)){ $("input[name='customer_contact']").next(".error").hide(); }else{ $("input[name='customer_contact']").next(".error").html('No kontak hanya terdiri atas "-+" serta numerik [0-9].').show(); event.preventDefault(); } }else{ $("input[name='customer_contact']").next(".error").html('Jumlah minimum nomor kontak 4 karakter.').show(); event.preventDefault(); } /** * Validation Email Reserver * @param {input} email */ var data = $("input[name='customer_email']").val(); var len = data.length; if(len > 1){ if(validate_email(data)){ $("input[name='customer_email']").next(".error").hide(); }else{ $("input[name='customer_email']").next().html('Contoh format email : contoh@gmail.com').show(); event.preventDefault(); } }else{ $("input[name='customer_email']").next().html('Kolom email tidak boleh kosong.').show(); event.preventDefault(); } /** * Validation address Reserver * @param {input string} address */ var data = $("input[name='customer_address']").val(); var len = data.length; if(len > 1){ if(validate_address(data)){ $("input[name='customer_address']").next(".error").hide(); }else{ $("input[name='customer_address']").next().html('Kolom alamat hanya terdiri atas "A-Za-z0-9-. "').show(); event.preventDefault(); } }else{ $("input[name='customer_address']").next().html('Kolom alamat tidak boleh kosong.').show(); event.preventDefault(); } /** * Validation Passenger ID * @param {input} text */ $("input[name*='adult_id_no']").each(function(e){ var data = $(this).val(); var len = data.length; if(validate_noid(data)){ $(this).next(".error").hide(); }else{ $(this).next(".error").html("No ID hanya terdiri dari numeric [0-9].").show(); event.preventDefault(); } }); /** * Validation Passenger Contact * @param {input} text */ $("input[name*='adult_mobile']").each(function(e){ var data = $(this).val(); var len = data.length; if(len > 3){ if(validate_phone(data)){ $(this).next(".error").hide(); }else{ $(this).next(".error").html('No kontak hanya terdiri atas "-+" serta numerik [0-9].').show(); event.preventDefault(); } }else{ $(this).next(".error").html('Jumlah minimum nomor kontak 4 karakter.').show(); event.preventDefault(); } }); /** END VALIDATION CUSTOMER FORM **/ }); /** * VALIDATION RESERVATION SCHEDULE & TICKETS * file : /views/ticket/schedules_form.php * * @param {form} * departue date * arrival station * type of journey (one way / return) * date of go * date of return * num of adult and child * @returns {Boolean} */ // DEPARTURE & ARRIVAL STATION $("select[name='org']").change(function(){ var data_org = $("option:selected",this).val(); if(data_org === 0){ $("select:lt(2) option",".form-reser").show(); $("select[name='des']").val("0"); }else{ if($("select[name='des']").has(":selected",this)){ $("option[value='"+data_org+"']", "select[name='des']").hide(); $("option[value!='"+data_org+"']", "select[name='des']").show(); $("select[name='des']").val("0"); } } }); // TYPE OF JOURNEY AND DATE $('input[name=rpp]').click(function (e){ var rpp = parseInt($(this).val()); if(rpp === 1) $('.arv_date').hide("slow"); else $('.arv_date').show("slow"); $("input[name=arv_date]").val(""); }); $('input[name=rpp]:checked').trigger("click"); // NUMBER OF PASSENGERS $("select[name='adult']").change(function(event){ var data = parseInt($(":selected",this).val()); var num_adult = 0; if(data > 0){ var num_child = parseInt($(":selected","select[name='chd']").val()); if(num_child > 0){ num_adult = num_child + data; if(num_adult > 4){ $(this).popover({placement : "top", content : "jumlah penumpang tidak boleh lebih dari 4 (empat)", title : "Perhatian:"}); $(this).on('shown.bs.popover', function(){ $(this).blur(function(){ $(this).popover("hide"); }); }); $(this).val("0"); num_adult = num_child - data; event.preventDefault(); }else{ $(this).popover("destroy"); } } return true; } }); $("select[name='chd']").change(function(event){ var data = parseInt($(":selected",this).val()); var num_child = 0; if(data > 0){ var num_adult = parseInt($(":selected","select[name='adult']").val()); if(num_adult > 0){ num_child = num_adult + data; if(num_child > 4){ $(this).popover({placement : "top", content : "jumlah penumpang tidak boleh lebih dari 4 (empat)", title : "Perhatian:"}); $(this).on('shown.bs.popover', function(){ $(this).blur(function(){ $(this).popover("hide"); }); }); $(this).val("0"); num_child = num_child - data; event.preventDefault(); }else{ $(this).popover("destroy"); } } return true; } }); var fnV = { "errMess" : function(selector,err_msg){ var data_msg = (err_msg != null) ? err_msg : selector.data("errmess"); var mess = '' + data_msg + ''; var target = $(selector).parents("td").find("font"); if (target.is(":visible") === false) $(mess).appendTo(selector.parents("td")); else $(target).replaceWith(mess); }, "SELECT" : function(selector, err_category){ ///if(selector.is(":visible") === false) return false; var resFalse = [0,"0",""]; if($.inArray(selector.val(),resFalse) > -1){ fnV.errMess(selector, err_category); return false; }else{ $(selector).parents("td").find("font").remove(); return true; } }, "CHECKBOX" : function(selector){ if(selector.is(":visible") === false) return false; if(selector.is(":checked") === true) { $(selector).parents("td").find("font").remove(); return true; }else{ fnV.errMess(selector); return false; } }, "INPUTTEXT" : function(selector, type, opsi){ if(opsi !== null && opsi === "required"){ if(selector.is(":visible") === false) return false; if(type !== null) if(type === "date"){ if (validate_date(selector.val()) === true) { $(selector).parents("td").find("font").remove(); return true; }else{ fnV.errMess(selector); return false; } } if(selector.val() !== ""){ $(selector).parents("td").find("font").remove(); return true; }else{ fnV.errMess(selector); return false; } }else{ $(selector).parents("td").find("font").remove(); return true; } }, "NUM_PASSENGER" : function(selector_1, selector_2, err_category){ var num_passenger = (parseInt(selector_1.val()) + parseInt(selector_2.val())); if(num_passenger > 4 ){ fnV.errMess(selector_1,err_category); return false; } else{ $(selector_1).parents("td").find("font").remove(); return true; } } } $(".form-reser #info_jadwal").on("click", function(event){ var errmsg = $("select[name='adult']").data("errmess"); if( fnV.SELECT($("select[name='org']")) === true && fnV.SELECT($("select[name='des']")) === true && fnV.CHECKBOX($("input[name='rpp']")) === true && fnV.INPUTTEXT($("input[name='dep_date']"),"date","required") === true && fnV.INPUTTEXT($("input[name='arv_date']"),"date",(parseInt($("input[name='rpp']:checked").val()) == 2) ? "required" : "" ) === true && fnV.SELECT($("select[name='adult']"),errmsg.input_required) === true && fnV.NUM_PASSENGER($("select[name='adult']"),$("select[name='child']"),errmsg.num_limit) === true ){ return true; } event.preventDefault(); }); //** END VALIDATION SCHEDULES FORM **// /** * VALIDATION FORM FLEXI TICKET * */ var _target_tgl_pergi = $("tr#gr_tgl_pergi","#form_flexi_ticket_reservation"); var _target_flexi_range_day = $("tr#gr_flexi_range_days","#form_flexi_ticket_reservation"); $("select[name='ticket_type']","#form_flexi_ticket_reservation").on("change", function(){ if($(this).val() == "1"){ if(_target_flexi_range_day.is(":visible") === true) _target_flexi_range_day.hide("slow").find("select[name='range_day']").val("0"); if(_target_tgl_pergi.is(":visible") === false) _target_tgl_pergi.show("slow").find("input[name='dep_date']").removeAttr("disabled"); }else if($(this).val() == "2"){ if(_target_tgl_pergi.is(":visible") === true) _target_tgl_pergi.hide("slow").find("input[name='dep_date']").val(""); if(_target_flexi_range_day.is(":visible") === false) _target_flexi_range_day.show("slow").find("select[name='range_day']").removeAttr("disabled"); }else{ _target_tgl_pergi.hide().find("input[name='dep_date']").attr("disabled","disabled").val(""); _target_flexi_range_day.hide().find("select[name='range_day']").attr("disabled","disabled").val("0"); } }).trigger("change"); /** * VALIDATION FORM PEMBAYARAN KODE BOOKING * @param {input} booking code * @returns {Boolean} * */ var rb_code = false; $("input[name='kode_booking']").keyup(function(e){ $(this).val($(this).val().toUpperCase()); var b_code = $(this).val(); var len = b_code.length; if(validate_bookcode(String.fromCharCode(e.keyCode))){ if(len == 6){ var book_exist = $(this).closest("table").find("strong:contains(" + b_code + ")"); if($(book_exist).is(":visible") === false){ $(this).attr("disabled","disabled"); $.ajax({ url : _url_get_book_, type: "post", data: "bcode=" + b_code + "&csrf_token=", beforeSend : function(){ var l_attr = ' '; $(l_attr).insertAfter("tr#inputproses"); }, success : function(html){ var d_attr = '' + html + ''; $(d_attr).insertBefore("tr#buttonshow").fadeIn(1000,function(){ if($(".alert-danger",this).is(":visible")){ $(this).delay(2000).fadeOut(1000,f

February2019

Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
 
 
 
 
 
1Friday
2Saturday
3Sunday
4Monday
5Tuesday
6Wednesday
7Thursday
8Friday
9Saturday
10Sunday
11Monday
12Tuesday
13Wednesday
14Thursday
15Friday
16Saturday
17Sunday
18Monday
19Tuesday
20Wednesday
21Thursday
22Friday
23Saturday
24Sunday
25Monday
26Tuesday
27Wednesday
28Thursday