|
|
@@ -121,7 +121,7 @@ const queryParams = reactive({
|
|
|
});
|
|
|
const queryRef = ref(null);
|
|
|
|
|
|
-const statusMap = { 0: '预约成功', 1: '修改信息', 2: '退订房间' };
|
|
|
+const statusMap = { 0: '预约成功', 1: '待支付', 2: '退订房间' };
|
|
|
const statusTagType = { 0: 'success', 1: 'warning', 2: 'info' };
|
|
|
|
|
|
// 入住天数(含首尾两天)
|
|
|
@@ -157,29 +157,38 @@ function handleExport() {
|
|
|
proxy?.download('content/hotelBooking/export', { ...queryParams }, `booking_${new Date().getTime()}.xlsx`);
|
|
|
}
|
|
|
|
|
|
-// 手动退房(后台强制退订):二次确认,退订后恢复房间库存
|
|
|
+// 手动退房(后台强制退订):二次确认 + 可编辑备注,退订后恢复房间库存
|
|
|
function handleForceCancel(row) {
|
|
|
- ElMessageBox.confirm(
|
|
|
+ ElMessageBox.prompt(
|
|
|
`确定要手动退房吗?将强制退订订单「${row.bookingNo || ''}」(${row.hotelName || ''} ${row.roomName || ''}),并恢复该时段剩余房间`,
|
|
|
- '系统提示',
|
|
|
- { type: 'warning', confirmButtonText: '确认退房' }
|
|
|
+ '手动退房',
|
|
|
+ {
|
|
|
+ inputType: 'textarea',
|
|
|
+ inputPlaceholder: '退房备注(选填,如退房原因)',
|
|
|
+ inputValidator: () => true,
|
|
|
+ type: 'warning',
|
|
|
+ confirmButtonText: '确认退房'
|
|
|
+ }
|
|
|
)
|
|
|
- .then(async () => {
|
|
|
- await forceCancelBooking(row.id);
|
|
|
+ .then(async ({ value }) => {
|
|
|
+ await forceCancelBooking(row.id, value);
|
|
|
ElMessage.success('退房成功');
|
|
|
getList();
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
}
|
|
|
|
|
|
-// 差价退回:仅补差为“是”可操作,二次确认(登记退回,不走真实支付)
|
|
|
+// 差价退回:仅补差为“是”可操作,二次确认 + 可编辑备注(登记退回,不走真实支付)
|
|
|
function handleRefundExtra(row) {
|
|
|
- ElMessageBox.confirm(`确定要将订单「${row.bookingNo || ''}」的补差金额 ${row.extraAmount || 0} 原路退回吗?`, '系统提示', {
|
|
|
+ ElMessageBox.prompt(`确定要将订单「${row.bookingNo || ''}」的补差金额 ${row.extraAmount || 0} 原路退回吗?`, '差价退回', {
|
|
|
+ inputType: 'textarea',
|
|
|
+ inputPlaceholder: '退回备注(选填,如为何补差退回)',
|
|
|
+ inputValidator: () => true,
|
|
|
type: 'warning',
|
|
|
confirmButtonText: '确认退回'
|
|
|
})
|
|
|
- .then(async () => {
|
|
|
- await refundExtraBooking(row.id);
|
|
|
+ .then(async ({ value }) => {
|
|
|
+ await refundExtraBooking(row.id, value);
|
|
|
ElMessage.success('差价已标记退回');
|
|
|
getList();
|
|
|
})
|