push them all

This commit is contained in:
Mauve
2026-09-29 21:51:58 +08:00
parent 54a9182746
commit 3f8930df4c
13 changed files with 176 additions and 82 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ export const getBookingsMock = (params, config = {}) => uni.$u.http.post('/app/b
export const saveBooking = (params, config = {}) => uni.$u.http.post('/app/booking/create', params, config) export const saveBooking = (params, config = {}) => uni.$u.http.post('/app/booking/create', params, config)
export const getBookings = (params, config = {}) => uni.$u.http.post('/app/bookings/search_optimize', params, config) export const getBookings = (params, config = {}) => uni.$u.http.post('/app/bookings/search_optimize', params, config)
export const getBookingByConf = (params, config = {}) => uni.$u.http.post('/app/booking/get_booking_by_conf', params, config) export const getBookingByConf = (params, config = {}) => uni.$u.http.post('/app/booking/get_booking_by_conf', params, config)
export const getLimoBookings = (params, config = {}) => uni.$u.http.post('/limo/search_limo', params, config) export const getLimoBookings = (params, config = {}) => uni.$u.http.post('/app/limo/search_limo', params, config)
export const getBookingById = (params, config = {}) => uni.$u.http.post('/app/booking/get_booking_by_id', params, config) export const getBookingById = (params, config = {}) => uni.$u.http.post('/app/booking/get_booking_by_id', params, config)
export const editBooking = (params, config = {}) => uni.$u.http.post('/app/booking/edit', params, config) export const editBooking = (params, config = {}) => uni.$u.http.post('/app/booking/edit', params, config)
export const getBookingsByGroupId = (params, config = {}) => uni.$u.http.post('/app/booking/get_bookings_by_groupId', params, config) export const getBookingsByGroupId = (params, config = {}) => uni.$u.http.post('/app/booking/get_bookings_by_groupId', params, config)
+15 -15
View File
@@ -1,22 +1,22 @@
export const getLimoTripPriceList = (params, config = {}) => uni.$u.http.post('/limo/getTripPriceList', params, config) export const getLimoTripPriceList = (params, config = {}) => uni.$u.http.post('/app/limo/getTripPriceList', params, config)
export const getLimoLocation = (params, config = {}) => export const getLimoLocation = (params, config = {}) =>
uni.$u.http.get('/limo/getLocation', { params, ...config }) uni.$u.http.get('/app/limo/getLocation', { params, ...config })
export const getLimoCarType= (params, config = {}) => export const getLimoCarType= (params, config = {}) =>
uni.$u.http.get('/limo/getCarType', { params, ...config }) uni.$u.http.get('/app/limo/getCarType', { params, ...config })
export const getLimoGreetType = (params, config = {}) => export const getLimoGreetType = (params, config = {}) =>
uni.$u.http.get('/limo/getGreetType', { params, ...config }) uni.$u.http.get('/app/limo/getGreetType', { params, ...config })
export const getQualification = (params, config = {}) => export const getQualification = (params, config = {}) =>
uni.$u.http.get('/limo/checkQualification', { params, ...config }) uni.$u.http.get('/app/limo/checkQualification', { params, ...config })
export const getLimoOverrider = (params, config = {}) => export const getLimoOverrider = (params, config = {}) =>
uni.$u.http.get('/limo/getOverrider', { params, ...config }) uni.$u.http.get('/app/limo/getOverrider', { params, ...config })
export const getLimoApprover = (params, config = {}) => export const getLimoApprover = (params, config = {}) =>
uni.$u.http.get('/limo/playerLimoBooker', { params, ...config }) uni.$u.http.get('/app/limo/playerLimoBooker', { params, ...config })
export const getLimoFlightDetails = (params, config = {}) => export const getLimoFlightDetails = (params, config = {}) =>
uni.$u.http.get('/limo/getFlightDetails', { params, ...config }) uni.$u.http.get('/app/limo/getFlightDetails', { params, ...config })
export const getLimoTodayBooking = (params, config = {}) => uni.$u.http.post('/limo/getTodayBooking', params, config) export const getLimoTodayBooking = (params, config = {}) => uni.$u.http.post('/app/limo/getTodayBooking', params, config)
export const createLimoBooking = (params, config = {}) => uni.$u.http.post('/limo/createBooking', params, config) export const createLimoBooking = (params, config = {}) => uni.$u.http.post('/app/limo/createBooking', params, config)
export const prepareBooking = (params, config = {}) => uni.$u.http.post('/limo/prepareBooking', params, config) export const prepareBooking = (params, config = {}) => uni.$u.http.post('/app/limo/prepareBooking', params, config)
export const editLimoBooking = (params, config = {}) => uni.$u.http.post('/limo/updateBooking', params, config) export const editLimoBooking = (params, config = {}) => uni.$u.http.post('/app/limo/updateBooking', params, config)
export const cancelLimoBooking = (params, config = {}) => uni.$u.http.post('/limo/cancelBooking', params, config) export const cancelLimoBooking = (params, config = {}) => uni.$u.http.post('/app/limo/cancelBooking', params, config)
export const getLimoBookingById = (params, config = {}) => uni.$u.http.post('/limo/get_limo_booking_by_id', params, config) export const getLimoBookingById = (params, config = {}) => uni.$u.http.post('/app/limo/get_limo_booking_by_id', params, config)
export const getLimoBookingByConf = (params, config = {}) => uni.$u.http.post('/limo/get_limo_booking_by_conf', params, config) export const getLimoBookingByConf = (params, config = {}) => uni.$u.http.post('/app/limo/get_limo_booking_by_conf', params, config)
+7 -7
View File
@@ -1,9 +1,9 @@
export const saveNotification = (params, config = {}) => uni.$u.http.post('/notification/saveNotification', params, config) export const saveNotification = (params, config = {}) => uni.$u.http.post('/app/notification/saveNotification', params, config)
export const getNotificationByUserId = (params, config = {}) => export const getNotificationByUserId = (params, config = {}) =>
uni.$u.http.get('/notification/get_notification_by_user_id', { params, ...config }) uni.$u.http.get('/app/notification/get_notification_by_user_id', { params, ...config })
export const changeNotification = (params, config = {}) => uni.$u.http.post('/notification/change_status', params, config) export const changeNotification = (params, config = {}) => uni.$u.http.post('/app/notification/change_status', params, config)
export const readAllNotification = (params, config = {}) => uni.$u.http.post('/notification/read_all', params, config) export const readAllNotification = (params, config = {}) => uni.$u.http.post('/app/notification/read_all', params, config)
export const countNotification = (params, config = {}) => export const countNotification = (params, config = {}) =>
uni.$u.http.get('/notification/count_notification_by_user_id', { params, ...config }) uni.$u.http.get('/app/notification/count_notification_by_user_id', { params, ...config })
export const saveDeviceToken = (params, config = {}) => uni.$u.http.post('/deviceToken/save_device_token', params, config) export const saveDeviceToken = (params, config = {}) => uni.$u.http.post('/app/deviceToken/save_device_token', params, config)
export const updateDeviceToken = (params, config = {}) => uni.$u.http.post('/deviceToken/update_device_token', params, config) export const updateDeviceToken = (params, config = {}) => uni.$u.http.post('/app/deviceToken/update_device_token', params, config)
+3 -3
View File
@@ -868,7 +868,7 @@
} }
// 保存失敗彈出錯誤提示框 // 保存失敗彈出錯誤提示框
else { else {
var message = resBook.errorCode != null && resBook.errorCode != "" ? resBook.errorCode : var message = resBook.errorCode ? resBook.errorCode :
resBook.message; resBook.message;
this.buttonStr = this.$t("common.ok"); this.buttonStr = this.$t("common.ok");
this.iconPath = '../../static/images/ico_err.png'; this.iconPath = '../../static/images/ico_err.png';
@@ -1151,7 +1151,7 @@
this.showDirBtn = true; this.showDirBtn = true;
this.showMsgBox = true; this.showMsgBox = true;
} else { } else {
var message = res.errorCode != "" ? res.errorCode : res.message; var message = res.errorCode ? res.errorCode : res.message;
this.buttonStr = this.$t("common.ok"); this.buttonStr = this.$t("common.ok");
this.iconPath = '../../static/images/ico_err.png'; this.iconPath = '../../static/images/ico_err.png';
this.msgStr = this.$t("common.saveFail") + ". " + this.$t("common.errorMsg") + ": " + this.msgStr = this.$t("common.saveFail") + ". " + this.$t("common.errorMsg") + ": " +
@@ -1451,7 +1451,7 @@
this.showDirBtn = true; this.showDirBtn = true;
this.showMsgBox = true; this.showMsgBox = true;
} else { } else {
var message = res.errorCode != "" ? res.errorCode : res.message; var message = res.errorCode ? res.errorCode : res.message;
this.buttonStr = this.$t("common.ok"); this.buttonStr = this.$t("common.ok");
this.iconPath = '../../static/images/ico_err.png'; this.iconPath = '../../static/images/ico_err.png';
this.msgStr = this.$t("common.saveFail") + ". " + this.$t("common.errorMsg") + ": " + this.msgStr = this.$t("common.saveFail") + ". " + this.$t("common.errorMsg") + ": " +
+16 -5
View File
@@ -185,7 +185,7 @@
</view> </view>
<view class="hz-flex-row hz-mr-t-30"> <view class="hz-flex-row hz-mr-t-30">
<view style="width:100%"> <view style="width:100%">
<view class="hz-font-color-black hz-font-lg">{{$t("approval.pendingResponse")}}: {{bookingData.approver || '-'}}</view> <view class="hz-font-color-black hz-font-lg">{{$t("approval.pendingResponse")}}: {{bookingData.approverName || '-'}}</view>
</view> </view>
</view> </view>
</view> </view>
@@ -219,13 +219,15 @@
<!-- DUE_OUT --> <!-- DUE_OUT -->
<view v-else-if="currentBookingStatus == 'DUE_OUT'" class="hz-flex-row hz-spacing" style=" display: flex; justify-content: space-around;" :style="showExtendLayout() ? {width:'100%'}:{width:'34%'}"> <view v-else-if="currentBookingStatus == 'DUE_OUT'" class="hz-flex-row hz-spacing" style=" display: flex; justify-content: space-around;" :style="showExtendLayout() ? {width:'100%'}:{width:'34%'}">
<view @click="popupLang()" class="hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center">{{$t("bookingDetail.saveImage")}}</view> <view @click="popupLang()" class="hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center">{{$t("bookingDetail.saveImage")}}</view>
<view v-if="showExtendLayout()" @click="popupCalendar()" class="hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center" style="margin-left:4px;">{{$t("bookingDetail.extension")}}</view> <view v-if="showExtendLayout() && isExtendBooker()" @click="popupCalendar()" class="hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center" style="margin-left:4px;">{{$t("bookingDetail.extension")}}</view>
<view v-else-if="showExtendLayout()" @click="showExtendBookerPopup()" class="hz-cancel-disabled hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center" style="margin-left:4px;">{{$t("bookingDetail.extension")}}</view>
</view> </view>
<!-- CHECKED_IN --> <!-- CHECKED_IN -->
<view v-else-if="currentBookingStatus == 'CHECKED_IN'" class="hz-flex-row hz-spacing" style=" display: flex; justify-content: space-around;" :style="showExtendLayout() ? {width:'100%'}:{width:'34%'}"> <view v-else-if="currentBookingStatus == 'CHECKED_IN'" class="hz-flex-row hz-spacing" style=" display: flex; justify-content: space-around;" :style="showExtendLayout() ? {width:'100%'}:{width:'34%'}">
<view @click="popupLang()" class="hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center">{{$t("bookingDetail.saveImage")}}</view> <view @click="popupLang()" class="hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center">{{$t("bookingDetail.saveImage")}}</view>
<view v-if="bookingData.propertyCategory != 'OTHER'" @click="showMisChargeMsg = true" class="hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center" style="margin-left:4px;">{{$t("common.misCharge").toUpperCase()}}</view> <view v-if="bookingData.propertyCategory != 'OTHER'" @click="showMisChargeMsg = true" class="hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center" style="margin-left:4px;">{{$t("common.misCharge").toUpperCase()}}</view>
<view v-if="showExtendLayout()" @click="popupCalendar()" class="hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center" style="margin-left:8px;">{{$t("bookingDetail.extension")}}</view> <view v-if="showExtendLayout() && isExtendBooker()" @click="popupCalendar()" class="hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center" style="margin-left:8px;">{{$t("bookingDetail.extension")}}</view>
<view v-else-if="showExtendLayout()" @click="showExtendBookerPopup()" class="hz-cancel-disabled hz-btn hz-bg-primary hz-font-lg hz-font-bold hz-font-color-white hz-text-center" style="margin-left:8px;">{{$t("bookingDetail.extension")}}</view>
</view> </view>
<!-- WAITLIST --> <!-- WAITLIST -->
<view v-else-if="currentBookingStatus == 'WAITLIST'" class="hz-flex-row hz-spacing" style="width:100%;"> <view v-else-if="currentBookingStatus == 'WAITLIST'" class="hz-flex-row hz-spacing" style="width:100%;">
@@ -666,6 +668,15 @@
return false; return false;
} }
}, },
isExtendBooker(){
return this.userData.userId == this.bookingData.createdBy;
},
showExtendBookerPopup(){
uni.showToast({
title: this.$t("bookingDetail.onlyBookerCanExtend"),
icon: "none"
});
},
showOtherPopup(){ showOtherPopup(){
uni.showToast({ uni.showToast({
title:this.$t("bookingDetail.cannotCancel"), title:this.$t("bookingDetail.cannotCancel"),
@@ -920,7 +931,7 @@
if( ( dayjs(day.date).isAfter(startDate) || dayjs(day.date).isSame(startDate,'day')) && if( ( dayjs(day.date).isAfter(startDate) || dayjs(day.date).isSame(startDate,'day')) &&
( dayjs(day.date).isBefore(endDate) ||dayjs(day.date).isSame(endDate,'day')) ){ ( dayjs(day.date).isBefore(endDate) ||dayjs(day.date).isSame(endDate,'day')) ){
// console.log(cdate) // console.log(cdate)
var operaStatus = this.bookingData.lastOperaStatus; var operaStatus = this.bookingData.lastOperaStatus;
var checkExp = (operaStatus.toUpperCase()==='CHECKED_IN')||(operaStatus.toUpperCase()==='DUE_OUT'); var checkExp = (operaStatus.toUpperCase()==='CHECKED_IN')||(operaStatus.toUpperCase()==='DUE_OUT');
if((this.bookingData.expDate==null||this.bookingData.expDate=='')&&checkExp){ if((this.bookingData.expDate==null||this.bookingData.expDate=='')&&checkExp){
@@ -1003,7 +1014,7 @@
const res = await changeMiscCharge(params); const res = await changeMiscCharge(params);
if(res.success!==null && res.success == true){ if(res.success!==null && res.success == true){
this.iconPath = '../../static/images/ico_suc.png'; this.iconPath = '../../static/images/ico_suc.png';
this.popMsgStr = this.$t("bookingDetail.changeMiscChargeSuccess"); this.popMsgStr = this.$t("bookingDetail.changeMisChargeSuccess");
this.showMsgBox = true; this.showMsgBox = true;
this.showETAMsg = false; this.showETAMsg = false;
+106 -37
View File
@@ -44,8 +44,8 @@
</view> </view>
</view> </view>
<view> <view class="hz-record-list">
<view v-for="(record,index) in displayRecordList" :key="`${record.recordType}-${record.id || record.confirmationNo || index}`"> <view class="hz-record-item" v-for="(record,index) in displayRecordList" :key="(record.recordType || 'record') + '-' + (record.id || record.confirmationNo || index)">
<view @click="openRecordDetail(record)" :class="getRecordCardClass(record)" class="hz-card-booking hz-record-card hz-pd-30 hz-font-bold hz-font-sm"> <view @click="openRecordDetail(record)" :class="getRecordCardClass(record)" class="hz-card-booking hz-record-card hz-pd-30 hz-font-bold hz-font-sm">
<view class="hz-flex-row hz-booking-type-row"> <view class="hz-flex-row hz-booking-type-row">
<view class="hz-booking-type-wrap"> <view class="hz-booking-type-wrap">
@@ -72,6 +72,9 @@
<view class="hz-w-55"> <view class="hz-w-55">
<view class="hz-font-md">{{$t("common.checkOutDate")}}: {{ record.checkoutDate }}</view> <view class="hz-font-md">{{$t("common.checkOutDate")}}: {{ record.checkoutDate }}</view>
</view> </view>
<!-- <view class="hz-flex-row hz-sharer-wrap" v-if="canShowSharer(record)">
<view v-if="hasSharer(record)" class="hz-btn-sharer hz-font-min hz-sharer-tag">{{$t("bookingRecord.sharer").toUpperCase()}}</view>
</view> -->
<view class="hz-flex-row hz-sharer-wrap" v-if="canShowSharer(record)"> <view class="hz-flex-row hz-sharer-wrap" v-if="canShowSharer(record)">
<view v-if="hasSharer(record)" class="hz-btn-sharer hz-font-min hz-sharer-tag">{{$t("bookingRecord.sharer").toUpperCase()}}</view> <view v-if="hasSharer(record)" class="hz-btn-sharer hz-font-min hz-sharer-tag">{{$t("bookingRecord.sharer").toUpperCase()}}</view>
</view> </view>
@@ -204,11 +207,17 @@
this.pullDownRefresh(); this.pullDownRefresh();
}, },
methods: { methods: {
normalizeBookingList(res){
if(Array.isArray(res)) return res;
if(res && Array.isArray(res.data)) return res.data;
if(res && res.data && Array.isArray(res.data.records)) return res.data.records;
if(res && Array.isArray(res.records)) return res.records;
return null;
},
updateHotelBookingList(res){ updateHotelBookingList(res){
if(Array.isArray(res) && res.length > 0){ const list = this.normalizeBookingList(res);
this.bookingList = res; if(list){
}else{ this.bookingList = list;
this.bookingList = [];
} }
}, },
updateLimoBookingList(res) { updateLimoBookingList(res) {
@@ -246,39 +255,62 @@
// 數據方法 // 數據方法
async getDataByPage(){ async getDataByPage(){
if(this.userData.canViewBooking==false) return; if(this.userData.canViewBooking==false) return;
const previousTask = this.currentTask; const previousRequest = this.currentTask;
const requestId = ++this.getDataByPageRequestId; const requestId = ++this.getDataByPageRequestId;
if(previousTask){
try{
previousTask.abort();
}catch(err){
}
}
// 一次页面加载会同时发起 Hotel 和 Limo 请求,统一保存并取消它们。
const requestTasks = []; const requestTasks = [];
let finishRequest;
const requestFinished = new Promise(resolve => {
finishRequest = resolve;
});
const requestController = { const requestController = {
requestId,
finished: requestFinished,
isAborted: false,
addTask: task => {
if(!task || typeof task.abort !== 'function') return;
if(requestController.isAborted || requestId !== this.getDataByPageRequestId){
try{
task.abort();
}catch(err){
}
return;
}
requestTasks.push(task);
},
abort: () => { abort: () => {
requestTasks.forEach(task => { if(requestController.isAborted) return;
if(task && typeof task.abort === 'function'){ requestController.isAborted = true;
try{ requestTasks.splice(0).forEach(task => {
task.abort(); try{
}catch(err){ task.abort();
} }catch(err){
} }
}); });
} },
}; finish: () => finishRequest()
const requestConfig = {
getTask: task => {
if(requestId === this.getDataByPageRequestId){
requestTasks.push(task);
}else if(task && typeof task.abort === 'function'){
task.abort();
}
}
}; };
this.currentTask = requestController; this.currentTask = requestController;
if(previousRequest && typeof previousRequest.abort === 'function'){
previousRequest.abort();
// 等旧请求的 abort 回调先完成,避免 App 端取消动作影响紧接着的新请求。
if(previousRequest.finished){
await Promise.race([
previousRequest.finished,
new Promise(resolve => setTimeout(resolve, 50))
]);
}else{
await new Promise(resolve => setTimeout(resolve, 0));
}
}
if(requestId !== this.getDataByPageRequestId){
requestController.finish();
return;
}
const requestConfig = {
getTask: task => requestController.addTask(task)
};
let params = {}; let params = {};
uni.showLoading({ uni.showLoading({
title: this.$t("common.loading") title: this.$t("common.loading")
@@ -314,6 +346,7 @@
uni.$u.toast(e.errMsg,5000); uni.$u.toast(e.errMsg,5000);
await this.writeLog(this.userData.userId,"save_booking","","[APP][bookingDetail.vue][getDataByPage][Catch Exception]"+e.errMsg,"[RequestData]" +JSON.stringify(params),"",1,false); await this.writeLog(this.userData.userId,"save_booking","","[APP][bookingDetail.vue][getDataByPage][Catch Exception]"+e.errMsg,"[RequestData]" +JSON.stringify(params),"",1,false);
}finally{ }finally{
requestController.finish();
if(requestId === this.getDataByPageRequestId){ if(requestId === this.getDataByPageRequestId){
if(this.currentTask === requestController){ if(this.currentTask === requestController){
this.currentTask = null; this.currentTask = null;
@@ -382,10 +415,14 @@
return bookingType+': Limo'; return bookingType+': Limo';
}, },
getRecordStatusText(record){ getRecordStatusText(record){
if(this.isHotelRecord(record)){ try{
return this.getStatusText(record); if(this.isHotelRecord(record)){
}else{ return this.getStatusText(record);
return record.status.replace("_"," "); }
if(record.status == null) return '';
return String(record.status).replace("_"," ");
}catch(e){
return '';
} }
}, },
getRecordStatusClass(record){ getRecordStatusClass(record){
@@ -478,8 +515,8 @@
userId: this.userData.userId userId: this.userData.userId
}; };
const [resHotel, resLimo] = await Promise.all([ const [resHotel, resLimo] = await Promise.all([
getBookings(bookingParams, requestConfig), getBookings(bookingParams, requestConfig).catch(() => null),
getLimoBookings(bookingParams, requestConfig) getLimoBookings(bookingParams, requestConfig).catch(() => null)
]); ]);
if(requestId !== this.getDataByPageRequestId) return; if(requestId !== this.getDataByPageRequestId) return;
this.updateHotelBookingList(resHotel); this.updateHotelBookingList(resHotel);
@@ -924,4 +961,36 @@
.hz-book-btn-wrap--single { .hz-book-btn-wrap--single {
width: 95%; width: 95%;
} }
.hz-page {
overflow-x: hidden;
}
.hz-record-list,
.hz-record-item,
.hz-record-card {
box-sizing: border-box;
max-width: 100%;
min-width: 0;
}
.hz-record-card {
align-items: stretch;
overflow: hidden;
width: 100%;
}
.hz-record-card ::v-deep .hz-flex-row,
.hz-record-card ::v-deep .hz-w-50,
.hz-record-card ::v-deep .hz-w-55,
.hz-record-card ::v-deep .hz-w-100,
.hz-record-card ::v-deep .hz-booking-type-wrap,
.hz-record-card ::v-deep .hz-font-md {
box-sizing: border-box;
max-width: 100%;
min-width: 0;
}
.hz-record-card ::v-deep .hz-w-55 {
flex: 1;
width: auto;
}
.hz-record-card ::v-deep .hz-font-md {
word-break: break-word;
}
</style> </style>
+12 -2
View File
@@ -143,7 +143,7 @@
</view> </view>
<!-- IM request --> <!-- IM request -->
<view v-show="showIMRequest"> <view v-show="showIMRequest">
<view class="hz-spacing hz-font-lg hz-font-bold">{{$t("newBooking.deposit")}}</view> <view class="hz-spacing hz-font-lg hz-font-bold">{{$t("newBooking.deposit")}}<span class="mandatory">*</span></view>
<view class="hz-split"></view> <view class="hz-split"></view>
<view class="hz-spacing" style="margin-top:10px;margin-bottom:30px;"> <view class="hz-spacing" style="margin-top:10px;margin-bottom:30px;">
<u-radio-group v-model="modelBooking.depositType" placement="row" @change="changeDeposit" <u-radio-group v-model="modelBooking.depositType" placement="row" @change="changeDeposit"
@@ -157,7 +157,7 @@
</u-radio-group> </u-radio-group>
</view> </view>
<view class="hz-spacing hz-font-lg hz-font-bold">{{$t("newBooking.postCharge")}}</view> <view class="hz-spacing hz-font-lg hz-font-bold">{{$t("newBooking.postCharge")}}<span class="mandatory">*</span></view>
<view class="hz-split"></view> <view class="hz-split"></view>
<view class="hz-spacing" style="margin-top:10px;margin-bottom:30px;"> <view class="hz-spacing" style="margin-top:10px;margin-bottom:30px;">
<u-radio-group v-model="modelBooking.isPost" placement="row" @change="changePost" <u-radio-group v-model="modelBooking.isPost" placement="row" @change="changePost"
@@ -911,6 +911,16 @@
uni.$u.toast(this.$t("newBooking.alertRoom")); uni.$u.toast(this.$t("newBooking.alertRoom"));
return; return;
} }
if (this.showIMRequest) {
if (this.modelBooking.depositType === undefined || this.modelBooking.depositType === null || this.modelBooking.depositType === '') {
uni.$u.toast(this.$t("newBooking.alertDeposit"));
return;
}
if (this.modelBooking.isPost === undefined || this.modelBooking.isPost === null || this.modelBooking.isPost === '') {
uni.$u.toast(this.$t("newBooking.alertPostCharge"));
return;
}
}
/*if(this.modelBooking.roomTypeId===undefined || this.modelBooking.roomTypeId===null){ /*if(this.modelBooking.roomTypeId===undefined || this.modelBooking.roomTypeId===null){
uni.$u.toast(this.$t("newBooking.alertRoomType")); uni.$u.toast(this.$t("newBooking.alertRoomType"));
return; return;
+1 -1
View File
@@ -1226,7 +1226,7 @@
this.showDirBtn = true; this.showDirBtn = true;
this.showMsgBox = true; this.showMsgBox = true;
} else { } else {
var message = res.errorCode != "" ? res.errorCode : res.message; var message = res.errorCode ? res.errorCode : res.message;
this.buttonStr = this.$t("common.ok"); this.buttonStr = this.$t("common.ok");
this.iconPath = '../../static/images/ico_err.png'; this.iconPath = '../../static/images/ico_err.png';
this.msgStr = this.$t("common.saveFail") + ". " + this.$t("common.errorMsg") + ": " + this.msgStr = this.$t("common.saveFail") + ". " + this.$t("common.errorMsg") + ": " +
+2 -2
View File
@@ -1,7 +1,7 @@
class config { class config {
constructor() { constructor() {
//local //local
this.internalUrl = 'https://localhost:9086'; // this.internalUrl = 'https://localhost:9086';
// mgm web DEV // mgm web DEV
// this.internalUrl = 'https://localhost'; // this.internalUrl = 'https://localhost';
@@ -10,7 +10,7 @@ class config {
// this.internalUrl = 'https://47.238.46.81'; // this.internalUrl = 'https://47.238.46.81';
// MGM APP DEV // MGM APP DEV
// this.internalUrl = 'https://dlahcadev.mcmsapoc.com'; this.internalUrl = 'https://dlahcadev.mcmsapoc.com';
//this.version = "beta 2.0"; //this.version = "beta 2.0";
//ali ECS //ali ECS
+2 -2
View File
@@ -41,7 +41,7 @@ module.exports = (vm) => {
const clientId = uni.getStorageSync("clientId") const clientId = uni.getStorageSync("clientId")
config.header.Authorization = token; config.header.Authorization = token;
config.header.ClientId = clientId; config.header.ClientId = clientId;
// #ifdef APP-PLUS // #ifdef APP-PLUS || H5
config.header.Origin = config.custom.origin; config.header.Origin = config.custom.origin;
// #endif // #endif
if(config.url.indexOf('refresh_token')==-1 ){ if(config.url.indexOf('refresh_token')==-1 ){
@@ -100,7 +100,7 @@ module.exports = (vm) => {
return data === undefined ? {} : data return data === undefined ? {} : data
}, (error) => { }, (error) => {
console.log(error) console.log(error)
if( error.errMsg=="request:ok") { if(error.errMsg=="request:ok") {
error.errMsg= "request:fail"; error.errMsg= "request:fail";
if(error.data!=undefined){ if(error.data!=undefined){
if(error.data.message!=undefined){ if(error.data.message!=undefined){
+3
View File
@@ -120,7 +120,9 @@
"newBooking.extension":"Extension", "newBooking.extension":"Extension",
"newBooking.preference":"Note:Selected preference is not guaranteed!", "newBooking.preference":"Note:Selected preference is not guaranteed!",
"newBooking.deposit":"Deposit", "newBooking.deposit":"Deposit",
"newBooking.alertDeposit":"Deposit must be selected",
"newBooking.postCharge":"Post Charge", "newBooking.postCharge":"Post Charge",
"newBooking.alertPostCharge":"Post charge must be selected",
"newBooking.waiveDeposit":"Waive Deposit", "newBooking.waiveDeposit":"Waive Deposit",
"newBooking.collectDeposit":"Collect Deposit", "newBooking.collectDeposit":"Collect Deposit",
"newBooking.yesPost":"Yes Post", "newBooking.yesPost":"Yes Post",
@@ -214,6 +216,7 @@
"bookingDetail.cancelBooking":"CANCEL BOOKING", "bookingDetail.cancelBooking":"CANCEL BOOKING",
"bookingDetail.ETA":"ETA", "bookingDetail.ETA":"ETA",
"bookingDetail.extension":"EXTENSION", "bookingDetail.extension":"EXTENSION",
"bookingDetail.onlyBookerCanExtend":"Only booker can extend booking.",
"bookingDetail.backToBooking":"BACK TO BOOKING", "bookingDetail.backToBooking":"BACK TO BOOKING",
"bookingDetail.cannotExtend":"Reached booking max stay days", "bookingDetail.cannotExtend":"Reached booking max stay days",
"bookingDetail.cancelSuccessful":"Booking is Cancelled", "bookingDetail.cancelSuccessful":"Booking is Cancelled",
+3
View File
@@ -119,7 +119,9 @@
"newBooking.extension": "續房", "newBooking.extension": "續房",
"newBooking.preference": "注意:特殊需求均無法保證,須視乎實際状況安排", "newBooking.preference": "注意:特殊需求均無法保證,須視乎實際状況安排",
"newBooking.deposit": "押金", "newBooking.deposit": "押金",
"newBooking.alertDeposit": "必須選擇押金",
"newBooking.postCharge": "房賬", "newBooking.postCharge": "房賬",
"newBooking.alertPostCharge": "必須選擇房賬",
"newBooking.waiveDeposit": "免收押金", "newBooking.waiveDeposit": "免收押金",
"newBooking.collectDeposit": "收取押金", "newBooking.collectDeposit": "收取押金",
"newBooking.yesPost": "掛房賬", "newBooking.yesPost": "掛房賬",
@@ -203,6 +205,7 @@
"approvalRouting.title":"審批路由", "approvalRouting.title":"審批路由",
"bookingDetail.saveImage": "保存圖片", "bookingDetail.saveImage": "保存圖片",
"bookingDetail.extension": "續房", "bookingDetail.extension": "續房",
"bookingDetail.onlyBookerCanExtend": "只有創建者才可以續房。",
"bookingDetail.cancelSuccessful": "取消成功", "bookingDetail.cancelSuccessful": "取消成功",
"bookingDetail.cancelFailed": "取消失敗", "bookingDetail.cancelFailed": "取消失敗",
"bookingDetail.confirmCancel": "你確定要取消預定嗎?", "bookingDetail.confirmCancel": "你確定要取消預定嗎?",
+5 -7
View File
@@ -235,7 +235,7 @@
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<view class="hz-font-12px">R6M TPD: {{formatNumber(rowRecord.detailData.r6MTPD)}}</view> <view class="hz-font-12px">R6M TPD: {{formatNumber(rowRecord.detailData.r6MTPD)}}</view>
<view class="hz-font-12px">R6M Win: {{formatNumber(rowRecord.detailData.r6MWin)}}</view>: <view class="hz-font-12px">R6M Win: {{formatNumber(rowRecord.detailData.r6MWin)}}</view>
<view class="hz-font-12px">R6M RI: <view class="hz-font-12px">R6M RI:
{{getPercentFormat(rowRecord.detailData.r6MRIPercentage)}}</view> {{getPercentFormat(rowRecord.detailData.r6MRIPercentage)}}</view>
<view v-show="currentIndex === 2 && filterType ==='MASS'" class="hz-font-12px">R6M Theo : {{formatNumber(rowRecord.detailData.r6MTheo)}} <view v-show="currentIndex === 2 && filterType ==='MASS'" class="hz-font-12px">R6M Theo : {{formatNumber(rowRecord.detailData.r6MTheo)}}
@@ -963,12 +963,12 @@
// } // }
}else{ }else{
this.iconPath = '../../static/images/ico_err.png'; this.iconPath = '../../static/images/ico_err.png';
if(res.errorCode == 'NO_RECORD'){ if(res.code == 'NO_RECORD'){
this.popMsgStr = this.$t("todo.etaFail")+":"+this.$t("common.errorMsg")+":"+ this.$t("todo.notRecord"); this.popMsgStr = this.$t("todo.etaFail")+":"+this.$t("common.errorMsg")+":"+ this.$t("todo.notRecord");
}else if(res.errorCode == 'MISS_PARAMETER'){ }else if(res.code == 'MISS_PARAMETER'){
this.popMsgStr = this.$t("todo.etaFail")+":"+this.$t("common.errorMsg")+":"+ this.$t("todo.missParams"); this.popMsgStr = this.$t("todo.etaFail")+":"+this.$t("common.errorMsg")+":"+ this.$t("todo.missParams");
}else{ }else{
this.popMsgStr = this.$t("todo.etaFail")+":"+this.$t("common.errorMsg")+":"+ res.errorCode; this.popMsgStr = this.$t("todo.etaFail")+":"+this.$t("common.errorMsg")+":"+ res.code;
} }
} }
this.showMsgBox = true; this.showMsgBox = true;
@@ -988,7 +988,6 @@
uni.hideLoading(); uni.hideLoading();
this.etaTime = ''; this.etaTime = '';
} }
// 使用父组件的closeAll方法关闭所有滑块 // 使用父组件的closeAll方法关闭所有滑块
this.$nextTick(() => { this.$nextTick(() => {
const swipeRef = this.$refs.swipeAction; const swipeRef = this.$refs.swipeAction;
@@ -1600,8 +1599,7 @@
getETALable() { getETALable() {
return function(record) { return function(record) {
if (this.currentIndex !== 1 && this.currentIndex !== 2) { if (this.currentIndex !== 1 && this.currentIndex !== 2) {
console.log(record); return record.eta;
return record.eTA;
} else if (record.bigLossFlag === 1) { } else if (record.bigLossFlag === 1) {
return "BIGLOSS"; return "BIGLOSS";
} else if (record.bigWinFlag === 1) { } else if (record.bigWinFlag === 1) {