修复店务预约与小程序生产问题

This commit is contained in:
2026-07-20 01:22:37 +08:00
parent 92949f9368
commit d180880445
25 changed files with 565 additions and 70 deletions
+14 -2
View File
@@ -41,6 +41,17 @@ function resolveAppointmentTimeText(item) {
return `${startText}-${endText}`
}
function buildAppointmentBadges(item) {
const badges = []
if (item.needRemoval) {
badges.push({ key: 'needRemoval', text: '需卸甲', type: 'removal' })
}
if (item.fromMeituan) {
badges.push({ key: 'fromMeituan', text: '美团', type: 'meituan' })
}
return badges
}
function isCompletedStatus(status) {
return Number(status) === 2
}
@@ -150,7 +161,7 @@ Page({
selectedArtistId: id,
selectedArtistName: artist ? artist.name : '全部员工'
})
this.prepareView()
this.loadCalendar()
},
selectDate(event) {
@@ -366,8 +377,9 @@ Page({
return {
...item,
top: Math.max(0, itemStart - startMinute) + laneHeaderHeight,
height: Math.max(64, item.durationMinutes || 60),
height: Math.max(82, item.durationMinutes || 60),
timeText: resolveAppointmentTimeText(item),
badges: buildAppointmentBadges(item),
statusClass: appointmentStatusClass(item.status)
}
})
@@ -66,6 +66,9 @@
<view wx:for="{{item.blocks}}" wx:for-item="block" wx:key="orderItemId" class="appointment-block {{block.statusClass}}" style="top: {{block.top}}rpx; height: {{block.height}}rpx; border-left-color: {{item.color}};" data-id="{{block.orderItemId}}" bindtap="openAppointment">
<text class="block-title">{{block.customerName}}</text>
<text class="block-meta">{{block.timeText}} · {{block.productTitle}}</text>
<view wx:if="{{block.badges.length}}" class="block-badges">
<text wx:for="{{block.badges}}" wx:for-item="badge" wx:key="key" class="block-badge {{badge.type}}">{{badge.text}}</text>
</view>
<text class="block-status">{{block.statusText}}</text>
</view>
<view wx:if="{{item.blocks.length === 0}}" class="lane-empty">全天可约</view>
+29
View File
@@ -355,6 +355,35 @@
line-height: 1.25;
}
.block-badges {
display: flex;
flex-wrap: wrap;
gap: 6rpx;
}
.block-badge {
display: inline-flex;
align-items: center;
height: 24rpx;
padding: 0 8rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.82);
color: #7b5b46;
font-size: 18rpx;
font-weight: 800;
line-height: 1;
}
.block-badge.removal {
background: #fff0dc;
color: #9a5f2d;
}
.block-badge.meituan {
background: #eaf4ff;
color: #49729d;
}
.lane-empty {
position: absolute;
top: 76rpx;