提交 Salon 小程序现有调整

This commit is contained in:
2026-10-20 18:02:49 +08:00
parent 527754af02
commit 68533738e0
34 changed files with 98 additions and 95 deletions
+9 -9
View File
@@ -14,7 +14,7 @@ function canCreateAppointment() {
}
function resolveCalendarErrorMessage(error) {
return error && error.message ? error.message : '规划数据加载失败'
return error && error.message ? error.message : '日程数据加载失败'
}
function toLocalDate(value) {
@@ -66,7 +66,7 @@ Page({
currentDate: new Date(),
currentDateText: dateUtil.formatDate(new Date()),
selectedArtistId: '',
selectedArtistName: '全部员工',
selectedArtistName: '全部美甲师',
dateTitle: '',
rangeText: '',
weekRange: '',
@@ -132,7 +132,7 @@ Page({
profileForm: { nickname: missingNickname ? '' : profile.nickname, avatar }
})
} catch (error) {
// 资料提醒失败不影响规划数据。
// 资料提醒失败不影响日程数据。
}
const navigatedToReview = await this.showEmployeeReviewNotice()
if (!navigatedToReview) {
@@ -154,8 +154,8 @@ Page({
app.globalData.reviewNoticeShown = true
const result = await new Promise(resolve => {
wx.showModal({
title: '有员工申请待审核',
content: `当前有 ${summary.pendingCount} 条员工加入申请,是否立即处理?`,
title: '有美甲师申请待审核',
content: `当前有 ${summary.pendingCount} 条美甲师加入申请,是否立即处理?`,
cancelText: '稍后处理',
confirmText: '立即审核',
success: resolve,
@@ -233,7 +233,7 @@ Page({
const artist = this.data.artists.find(item => String(item.id) === String(id))
this.setData({
selectedArtistId: id,
selectedArtistName: artist ? artist.name : '全部员工'
selectedArtistName: artist ? artist.name : '全部美甲师'
})
this.loadCalendar()
},
@@ -306,9 +306,9 @@ Page({
this.setData({
calendarError: resolveCalendarErrorMessage(error),
selectedArtistId: '',
selectedArtistName: '全部员工'
selectedArtistName: '全部美甲师'
})
wx.showToast({ title: '规划数据加载失败', icon: 'none' })
wx.showToast({ title: '日程数据加载失败', icon: 'none' })
}).finally(() => {
if (requestId === this._calendarRequestId) this.setData({ loading: false })
if (this._calendarInflight && this._calendarInflight.promise === promise) {
@@ -565,7 +565,7 @@ Page({
currentDate: toLocalDate(target),
currentDateText: target,
selectedArtistId: '',
selectedArtistName: '全部员工'
selectedArtistName: '全部美甲师'
})
this.loadCalendar()
},
+1 -1
View File
@@ -1,3 +1,3 @@
{
"navigationBarTitleText": "规划"
"navigationBarTitleText": "日程"
}
+2 -2
View File
@@ -59,7 +59,7 @@ async function run() {
page.data.viewMode = 'month'
page.data.monthDisplayMode = 'count'
const monthDays = definition.buildMonthDays.call(page, {
artists: [{ id: 1, name: '员工', shortName: '员', color: '#000' }],
artists: [{ id: 1, name: '美甲师', shortName: '员', color: '#000' }],
daySummaries: [{ date: dateUtil.formatDate(dateUtil.startOfMonth(page.data.currentDateText)), totalCount: 2, unassignedCount: 1, artistCounts: [] }]
})
assert.strictEqual(monthDays.length, 42)
@@ -69,7 +69,7 @@ async function run() {
const dayState = dayPage.buildDayView({
businessStartTime: '10:00',
businessEndTime: '22:00',
artists: [{ id: 1, name: '员工', color: '#000' }],
artists: [{ id: 1, name: '美甲师', color: '#000' }],
appointments: [{ orderItemId: 8, date: '2026-10-12', startTime: '2026-10-12 14:00:00', durationMinutes: 60, artistId: null }]
})
assert.strictEqual(dayState.dayLanes[0].artistId, '__unassigned__')
+4 -4
View File
@@ -21,7 +21,7 @@
<view wx:for="{{viewModes}}" wx:key="value" class="segment {{viewMode === item.value ? 'active' : ''}}" data-mode="{{item.value}}" bindtap="switchView">{{item.label}}</view>
</view>
<scroll-view class="artist-filter" scroll-x enable-flex>
<view class="artist-chip {{!selectedArtistId ? 'active' : ''}}" data-id="" bindtap="selectArtist">全部员工</view>
<view class="artist-chip {{!selectedArtistId ? 'active' : ''}}" data-id="" bindtap="selectArtist">全部美甲师</view>
<view wx:for="{{artists}}" wx:key="id" class="artist-chip {{selectedArtistId == item.id ? 'active' : ''}}" data-id="{{item.id}}" bindtap="selectArtist">
<view class="chip-dot" style="background: {{item.color}};"></view>
<text>{{item.name}}</text>
@@ -30,7 +30,7 @@
</scroll-view>
<view wx:if="{{!selectedArtistId && rangeUnassignedCount > 0}}" class="unassigned-notice" bindtap="openNearestUnassigned">
<view class="chip-dot unassigned-dot"></view>
<text>有 {{rangeUnassignedCount}} 个预约待分配员工</text>
<text>有 {{rangeUnassignedCount}} 个预约待分配美甲师</text>
<text class="unassigned-link">立即处理 ›</text>
</view>
</view>
@@ -49,7 +49,7 @@
<view wx:if="{{calendarError}}" class="calendar-error-card">
<view class="calendar-error-copy">
<text class="calendar-error-title">规划数据加载失败</text>
<text class="calendar-error-title">日程数据加载失败</text>
<text class="calendar-error-message">{{calendarError}}</text>
</view>
<button class="calendar-error-action" bindtap="loadCalendar">重试</button>
@@ -71,7 +71,7 @@
</view>
<view class="summary-item card">
<text class="summary-value">{{freeArtistCount}}</text>
<text class="summary-label">可插单员工</text>
<text class="summary-label">可插单美甲师</text>
</view>
<view class="summary-item card">
<text class="summary-value">{{pendingCount}}</text>