//query?
https://app9.rmscloud.cn/api/Reservation/ResStatusWarningsLoop
post
{
"ResStatus":2, //目标状态
"Reservations":[9375839]
}
//movement?
confirm -> check in 1->2
https://app9.rmscloud.cn/api/Reservation/ResStatus/ChangeStatus
post
{"ResStatus":2,"Reservations":[9375839]}
check out 2->3
https://app9.rmscloud.cn/api/Reservation/ResStatus/ChangeStatus
post
{"ResStatus":3,"Reservations":[9482172]}
//arrived number
/*
Name: fnGetInhouseReservationList
Function: Get In-House reservation list
Param: null
Return: In-House reservation list
*/
function fnGetInhouseReservationList()
{
let date = new Date();
let strSymble1;
let strSymble2;
//如果月或者日小于10,strSymble '-'或者‘-0’
if (parseInt(date.getMonth()) < 9) {
strSymble1 = '-0';
}
else
strSymble1 = '-';
if (parseInt(date.getDate()) < 10) {
strSymble2 = '-0';
}
else
strSymble2 = '-';
//in-house reservation-screen data "ReportView": 3,
//Arriving reportView: 7
//arrived:5;
let jobj1 = {
"FromDate": date.getFullYear() + strSymble1
+ parseInt(date.getMonth() + 1) + strSymble2
+ date.getDate(),
"ToDate": date.getFullYear() + strSymble1
+ parseInt(date.getMonth() + 1) + strSymble2
+ date.getDate(),
"OnlyShowPrimaryClient": true,
"ShowGroupMasterOnly": false,
"Properties": [254],
"BookingTypeId": 0,
"ReportView": 3,
"ResView": 0,
"CatGrpIds": [],
"CatIds": []
}
let response = $.ajax({
url: 'api/Reservation/InOutScreen/RetrieveScreenData',
async: false, //同步执行,不然数据没有get,导致回传数据为空
data: JSON.stringify(jobj1), //!
dataType: 'json',
contentType: 'application/json; charset=utf-8',//!
type: 'POST'
})
if(response.readyState == 4)
return response.responseJSON.InOutData;
else
return -1;
}
/*
Name: fnGetReservationDetails
Function: get reservation details by reservation number
Param: reservation number
Return: -1 for error
reservation details
*/
function fnGetReservationDetails( nResNumber)
{
let rtn = $.get(
"/api/ReservationService/ReservationScreenData",
{
bEventBooking: "false",
bShowCancelled: "true",
bUsePreviousTypeOfBooking: 'false',
//nGrpResId无所谓即使是团队预定
nGrpResId: 0,
nResId: nResNumber
},
function (data) {
console.log("fnGetReservationDetails: ");
console.log(data)},
"json"
)
}
/*
Name: fnMatchFromRmNum2ResNum
Function: get reservation number by room number
Param: room number
Return: -1 for error
reservation details
*/
function fnMatchFromRmNum2ResNum( nRmNum)
{
}
function fnTasksLoop()
{
}