@@ -835,18 +835,21 @@ Page({
|
||||
if (!appointment) return
|
||||
wx.showModal({
|
||||
title: '取消预约',
|
||||
content: '确定取消这条预约吗?',
|
||||
editable: true,
|
||||
placeholderText: '可填写取消原因',
|
||||
content: '',
|
||||
confirmText: '确认取消',
|
||||
success: result => {
|
||||
if (result.confirm) {
|
||||
this.updateAppointmentStatus(appointment.orderId, 3)
|
||||
this.updateAppointmentStatus(appointment.orderId, 3, result.content || '')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async updateAppointmentStatus(orderId, status) {
|
||||
async updateAppointmentStatus(orderId, status, cancelReason) {
|
||||
try {
|
||||
await planningApi.updateStatus(orderId, status)
|
||||
await planningApi.updateStatus(orderId, status, cancelReason)
|
||||
wx.showToast({ title: '预约已取消', icon: 'success' })
|
||||
this.loadCalendar()
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user