优化员工排班与规划月视图体验

This commit is contained in:
2026-06-27 00:08:18 +08:00
parent 5fc0e35759
commit 13916e61b7
21 changed files with 413 additions and 73 deletions
+9 -1
View File
@@ -3,6 +3,12 @@ const employeesApi = require('../../api/employees')
const EMPLOYEE_COLORS = ['#7AA9C2', '#8EB99B', '#BDA7D8', '#D7B17D', '#D98D8D']
const DEFAULT_EMPLOYEE_PASSWORD = 'Fingertip@123'
function buildScheduleSummary(item) {
const mode = item.scheduleModeSummary || item.scheduleMode || '未设置'
const time = item.scheduleTimeSummary || item.ruleTimeSummary || ''
return time ? `${mode} ${time}` : mode
}
Page({
data: {
employees: [],
@@ -32,9 +38,11 @@ Page({
id: item.userId || item.id,
name: item.nickname || item.name || item.artistName || `美甲师${index + 1}`,
shortName: (item.nickname || item.name || '师').slice(-1),
avatar: item.avatar || item.avatarUrl || '',
color: EMPLOYEE_COLORS[index % EMPLOYEE_COLORS.length],
monthOrders: item.monthOrders || item.orderCount || 0,
monthAmount: item.monthAmount || item.turnover || 0
monthAmount: item.monthAmount || item.turnover || 0,
scheduleSummary: buildScheduleSummary(item)
}))
})
} catch (error) {