保存客户资料与员工排班改造阶段成果
This commit is contained in:
@@ -90,8 +90,21 @@ async function run() {
|
||||
assert.strictEqual(dayState.timelineHeight, 2934)
|
||||
assert.strictEqual(dayState.hours.find(item => item.label === '14:00').top, 1014)
|
||||
assert.strictEqual(dayState.dayLanes[0].blocks[0].height, 240)
|
||||
assert.match(planningWxss, /background-size:\s*100% 240rpx/)
|
||||
assert.match(planningWxss, /\.control-card\s*\{[^}]*padding:\s*12rpx 16rpx;/)
|
||||
const shortAppointmentState = dayPage.buildDayView({
|
||||
businessStartTime: '10:30',
|
||||
businessEndTime: '11:30',
|
||||
artists: [{ id: 1, name: '美甲师', color: '#000' }],
|
||||
appointments: [{ orderItemId: 9, date: '2026-10-12', startTime: '2026-10-12 10:45:00', durationMinutes: 15, artistId: 1 }]
|
||||
})
|
||||
assert.strictEqual(shortAppointmentState.hours[0].top, 54)
|
||||
assert.strictEqual(shortAppointmentState.hours[1].top, 294)
|
||||
const shortAppointmentLane = shortAppointmentState.dayLanes.find(lane => lane.artistId === 1)
|
||||
assert.strictEqual(shortAppointmentLane.blocks[0].height, 60)
|
||||
assert.strictEqual(shortAppointmentLane.blocks[0].compact, true)
|
||||
assert.match(planningWxml, /class="hour-line" style="top: \{\{hour\.top\}\}rpx;"/)
|
||||
assert.match(planningWxml, /class="time-label" style="top: \{\{item\.top\}\}rpx;"/)
|
||||
assert.doesNotMatch(planningWxss, /background-size:\s*100% 240rpx/)
|
||||
assert.match(planningWxss, /\.control-card\s*\{[^}]*padding:\s*8rpx 14rpx;/)
|
||||
|
||||
const requestPage = createPage({ viewMode: 'day', currentDateText: '2026-10-11' })
|
||||
let calendarRequests = 0
|
||||
|
||||
@@ -95,10 +95,10 @@
|
||||
<view class="chip-dot" style="background: {{item.color}};"></view>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<view wx:for="{{hours}}" wx:for-item="hour" wx:key="value" class="hour-line" style="top: {{hour.top}}rpx;"></view>
|
||||
<view wx:for="{{item.blocks}}" wx:for-item="block" wx:key="orderItemId" class="appointment-block {{block.status === 0 ? 'pending' : ''}} {{block.compact ? 'compact' : ''}}" 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 class="block-footer">
|
||||
<view class="block-footer">
|
||||
<text class="block-status">{{block.statusText}}</text>
|
||||
<view class="block-actions" catchtap="stopTap">
|
||||
@@ -108,7 +108,6 @@
|
||||
<text wx:if="{{block.historicalBackfill && block.status === 4}}" data-id="{{block.orderItemId}}" data-status="2" catchtap="quickUpdateStatus">完成</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{item.blocks.length === 0}}" class="lane-empty">{{item.emptyText || '全天可约'}}</view>
|
||||
</view>
|
||||
|
||||
@@ -344,9 +344,17 @@
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
border-right: 1rpx solid #e7ece9;
|
||||
background-image: linear-gradient(to bottom, rgba(203, 220, 213, 0.45) 1rpx, transparent 1rpx);
|
||||
background-position: 0 54rpx;
|
||||
background-size: 100% 240rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.hour-line {
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
height: 1rpx;
|
||||
background: rgba(203, 220, 213, 0.72);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.lane-head {
|
||||
@@ -365,6 +373,7 @@
|
||||
|
||||
.appointment-block {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
right: 12rpx;
|
||||
left: 12rpx;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user