功能:优化Salon作品选择与历史补单
This commit is contained in:
@@ -245,7 +245,7 @@ Page({
|
||||
}
|
||||
const appointmentDate = dateUtil.formatDate(event.currentTarget.dataset.date)
|
||||
if (appointmentDate < dateUtil.formatDate(new Date())) {
|
||||
wx.showToast({ title: '不能为历史日期新增预约', icon: 'none' })
|
||||
this.openBackfillOrder(appointmentDate)
|
||||
return
|
||||
}
|
||||
this.openAppointmentForm(appointmentDate)
|
||||
@@ -630,12 +630,16 @@ Page({
|
||||
this.openAppointmentForm(this.data.currentDateText)
|
||||
},
|
||||
|
||||
openBackfillOrder() {
|
||||
openBackfillOrder(serviceDate) {
|
||||
if (!this.data.canCreateAppointment) {
|
||||
wx.showToast({ title: '当前账号仅支持查看预约', icon: 'none' })
|
||||
return
|
||||
}
|
||||
wx.navigateTo({ url: '/pages/backfill-order/index' })
|
||||
const query = [`serviceDate=${encodeURIComponent(serviceDate || this.data.currentDateText)}`]
|
||||
if (this.data.selectedArtistId) {
|
||||
query.push(`artistId=${encodeURIComponent(this.data.selectedArtistId)}`)
|
||||
}
|
||||
wx.navigateTo({ url: `/pages/backfill-order/index?${query.join('&')}` })
|
||||
},
|
||||
|
||||
openAppointmentForm(appointmentDate) {
|
||||
|
||||
Reference in New Issue
Block a user