功能:支持待分配预约与首次排班引导
This commit is contained in:
@@ -7,6 +7,7 @@ Page({
|
||||
appointment: {},
|
||||
avatarText: '',
|
||||
timeText: '',
|
||||
isUnassigned: false,
|
||||
loadError: ''
|
||||
},
|
||||
|
||||
@@ -32,6 +33,7 @@ Page({
|
||||
applyAppointment(appointment) {
|
||||
this.setData({
|
||||
appointment,
|
||||
isUnassigned: appointment.assignmentStatus === 'UNASSIGNED' || !appointment.artistId,
|
||||
avatarText: String(appointment.customerName || '客').slice(0, 1),
|
||||
timeText: `${(appointment.startTime || '').slice(0, 16)} - ${(appointment.endTime || '').slice(11, 16)}`,
|
||||
loadError: ''
|
||||
@@ -39,6 +41,10 @@ Page({
|
||||
},
|
||||
|
||||
async updateStatus(status) {
|
||||
if (status !== 3 && this.data.isUnassigned) {
|
||||
wx.showToast({ title: '请先分配员工', icon: 'none' })
|
||||
return
|
||||
}
|
||||
try {
|
||||
await planningApi.updateStatus(this.data.appointment.orderId, status)
|
||||
markPlanningRefresh()
|
||||
|
||||
Reference in New Issue
Block a user