【getQuequeCount】
参数列表:
train_date: new Date(orderRequestDTO.train_date.time).toString(),//列车日期
train_no: orderRequestDTO.train_no,//列车编号
stationTrainCode: orderRequestDTO.station_train_code,//列车代码
seatType: limit_tickets[0].seat_type,//座位类型
fromStationTelecode: orderRequestDTO.from_station_telecode,//出发地代码
toStationTelecode: orderRequestDTO.to_station_telecode,//目的地代码
leftTicket: ticketInfoForPassengerForm.queryLeftTicketRequestDTO.ypInfoDetail,//余票令牌(secretStr)
purpose_codes: ticketInfoForPassengerForm.purpose_codes,//乘客类型
train_location: ticketInfoForPassengerForm.train_location,//火车位置(location_code)
isCheckOrderInfo: data.isCheckOrderInfo//是否进行了订单详细信息的检查
_json_att:null
REPEAT_SUBMIT_TOKEN:globalRepeatSubmitToken//全局性的提交令牌
返回信息:
//先判断Y.data.isRelogin == "Y",true则需要登录操作
{
"validateMessagesShowId":"_validatorMessage",
"status":true,
"httpstatus":200,
"data":{
"count":"6",
"ticket":"73",//split(","),[0]表示当前座位类型剩余票数,[1]表示无座类型剩余票数
"op_2":"false",//当前排队人数是否超过余票张数
"countT":"0",//当前排队人数
"op_1":"true"
},
"messages":[
],
"validateMessages":{
}
}
相应函数:
if (Y.status) {
if (Y.data.isRelogin == "Y") {
window.location.href = ctx + "login/init?random=" + new Date().getTime()
}
var Z = Y.data.ticket.split(",");
X = "本次列车," + (limit_tickets[0].seat_type_name).split("(")[0] + "余票";
if (parseInt(Z[0]) >= 0) {
X += "<strong>" + Z[0] + "</strong>张"
} else {
X += Z[0]
}
if (Z.length > 1) {
X += ",无座余票";
if (parseInt(Z[1]) >= 0) {
X += "<strong>" + Z[1] + "</strong>张"
} else {
X += Z[1]
}
}
X += "。";
if (Y.data.op_2 == "true") {
X += '<font color="red">目前排队人数已经超过余票张数,请您选择其他席别或车次。</font>';
$("#qr_submit_id").hide()
} else {
if (Y.data.countT > 0) {
X += '目前排队人数<font color="red">' + Y.data.countT + "</font>人,";
X += "<br/>请确认以上信息是否正确,点击“确认”后,系统将为您随机分配席位。"
}
}
var aa = $("#sy_ticket_num_id");
if (aa != null ) {
aa.html(X)
}
doTicketTitleShow(true);
renderCheckTickInfo(limit_tickets);
N("checkticketinfo_id");
if (parseInt(Z[0]) > 0 || parseInt(Z[1]) > 0 || "充足" == Z[0] || "充足" == Z[1]) {
S()
}
} else {
S()
}
},
error: function(Y, aa, Z) {
S();
return
}