|
|
|
@ -1040,7 +1040,6 @@ ready(el => {
|
|
|
|
|
const airportSelect = el('airport_or_railway_station');
|
|
|
|
|
arriveAtCitySelect.on('change', () => {
|
|
|
|
|
const selectedCity = arriveAtCitySelect.options[arriveAtCitySelect.selectedIndex].value;
|
|
|
|
|
console.info('selectedCity: ' + selectedCity);
|
|
|
|
|
const airportList = cityAirportMap.get(selectedCity)
|
|
|
|
|
airportSelect.options.length = 0;
|
|
|
|
|
airportList.forEach(element => {
|
|
|
|
@ -1111,19 +1110,17 @@ ready(el => {
|
|
|
|
|
error_refusal.show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const today = new Date();
|
|
|
|
|
today.setHours(0, 0, 0, 0);
|
|
|
|
|
const arrivalDate = new Date(arrivalDateVal);
|
|
|
|
|
const departureDate = new Date(departureDateVal);
|
|
|
|
|
const expiryDate = new Date(expiryDateVal);
|
|
|
|
|
const diffExpiryDate = calcDiffInDays(today, expiryDate);
|
|
|
|
|
const diffExpiryDate = calcDiffInDays(arrivalDate, expiryDate);
|
|
|
|
|
console.log(diffExpiryDate);
|
|
|
|
|
if (isNaN(diffExpiryDate) || diffExpiryDate <= 180) {
|
|
|
|
|
if (isNaN(diffExpiryDate) || diffExpiryDate <= 90) {
|
|
|
|
|
console.log('Your passport must be valid for more than 3 months at the time of entry into China.');
|
|
|
|
|
validateSuccess = false;
|
|
|
|
|
error_3months.show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const arrivalDate = new Date(arrivalDateVal);
|
|
|
|
|
const departureDate = new Date(departureDateVal);
|
|
|
|
|
const diffInDays = calcDiffInDays(arrivalDate, departureDate);
|
|
|
|
|
console.log(diffInDays);
|
|
|
|
|
if (isNaN(diffInDays) || diffInDays > 6) {
|
|
|
|
@ -1147,13 +1144,13 @@ ready(el => {
|
|
|
|
|
qualify_144hours.show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (diffInDays > 0 && diffInDays <= 3) {
|
|
|
|
|
if (diffInDays > 0 && diffInDays <= 3 && indexOf72 !== -1 && validateSuccess) {
|
|
|
|
|
qualify_72hours.show();
|
|
|
|
|
} else {
|
|
|
|
|
qualify_72hours.hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (diffInDays > 3 && diffInDays <= 6) {
|
|
|
|
|
if (diffInDays > 3 && diffInDays <= 6 && indexOf144 !== -1 && validateSuccess) {
|
|
|
|
|
qualify_144hours.show();
|
|
|
|
|
} else {
|
|
|
|
|
qualify_144hours.hide();
|
|
|
|
|