144 lines
7.5 KiB
Plaintext
144 lines
7.5 KiB
Plaintext
<view class="page planning-page">
|
||
<view class="card control-card">
|
||
<view class="date-row">
|
||
<view class="date-side">
|
||
<button class="icon-btn small" bindtap="prevRange">‹</button>
|
||
</view>
|
||
<view class="date-center">
|
||
<text class="date-main">{{dateTitle}}</text>
|
||
<text class="date-sub">{{businessStartTime}}-{{businessEndTime}}</text>
|
||
</view>
|
||
<view class="date-side date-tools">
|
||
<button class="today-btn" bindtap="goToday">今</button>
|
||
<button class="icon-btn small" bindtap="nextRange">›</button>
|
||
</view>
|
||
</view>
|
||
<view class="segmented">
|
||
<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 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>
|
||
<text class="chip-count">{{item.rangeCount || 0}}</text>
|
||
</view>
|
||
</scroll-view>
|
||
</view>
|
||
|
||
<view wx:if="{{viewMode === 'day'}}" class="section">
|
||
<view class="day-summary">
|
||
<view class="summary-item card">
|
||
<text class="summary-value">{{dayTotal}}</text>
|
||
<text class="summary-label">今日预约</text>
|
||
</view>
|
||
<view class="summary-item card">
|
||
<text class="summary-value">{{freeArtistCount}}</text>
|
||
<text class="summary-label">可插单员工</text>
|
||
</view>
|
||
<view class="summary-item card">
|
||
<text class="summary-value">{{pendingCount}}</text>
|
||
<text class="summary-label">待确认</text>
|
||
</view>
|
||
</view>
|
||
|
||
<scroll-view class="day-board card" scroll-y>
|
||
<view class="timeline-wrap" style="height: {{timelineHeight}}rpx;">
|
||
<view class="time-axis">
|
||
<view wx:for="{{hours}}" wx:key="value" class="time-label" style="top: {{item.top}}rpx;">{{item.label}}</view>
|
||
</view>
|
||
<scroll-view class="lane-scroll" scroll-x enable-flex>
|
||
<view class="lanes" style="height: {{timelineHeight}}rpx; width: {{laneWidth}}rpx;">
|
||
<view wx:for="{{dayLanes}}" wx:key="artistId" class="artist-lane" style="height: {{timelineHeight}}rpx; width: {{laneItemWidth}}rpx;">
|
||
<view class="lane-head">
|
||
<view class="chip-dot" style="background: {{item.color}};"></view>
|
||
<text>{{item.name}}</text>
|
||
</view>
|
||
<view wx:for="{{item.blocks}}" wx:for-item="block" wx:key="orderItemId" class="appointment-block {{block.status === 0 ? 'pending' : ''}}" 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>
|
||
<text class="block-status">{{block.statusText}}</text>
|
||
</view>
|
||
<view wx:if="{{item.blocks.length === 0}}" class="lane-empty">全天可约</view>
|
||
</view>
|
||
</view>
|
||
</scroll-view>
|
||
</view>
|
||
</scroll-view>
|
||
</view>
|
||
|
||
<view wx:if="{{viewMode === 'week'}}" class="section">
|
||
<scroll-view class="week-strip" scroll-x enable-flex>
|
||
<view wx:for="{{weekDays}}" wx:key="date" class="week-day-card card {{item.date === currentDateText ? 'active' : ''}}" data-date="{{item.date}}" bindtap="selectDate">
|
||
<text class="week-name">{{item.weekName}}</text>
|
||
<text class="week-date">{{item.day}}</text>
|
||
<text class="week-total">{{item.totalCount}}单</text>
|
||
<view class="week-bars">
|
||
<view wx:for="{{item.artistCounts}}" wx:for-item="count" wx:key="artistId" class="week-bar" style="background: {{count.color}}; width: {{count.width}}%;"></view>
|
||
</view>
|
||
</view>
|
||
</scroll-view>
|
||
<view class="card week-grid">
|
||
<view class="week-grid-head">
|
||
<text>本周排班密度</text>
|
||
<text class="muted">{{weekRange}}</text>
|
||
</view>
|
||
<view wx:for="{{weekDays}}" wx:key="date" class="week-line">
|
||
<view class="week-line-date">{{item.weekName}} {{item.day}}</view>
|
||
<view class="week-line-bars">
|
||
<view wx:for="{{item.artistCounts}}" wx:for-item="count" wx:key="artistId" class="week-count-bar" style="background: {{count.color}}; width: {{count.barWidth}}%;">
|
||
<text>{{count.shortName}}{{count.count}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view wx:if="{{viewMode === 'month'}}" class="section">
|
||
<view class="month-toolbar">
|
||
<text class="month-toolbar-title">月历显示</text>
|
||
<view class="month-mode-switch">
|
||
<view wx:for="{{monthDisplayModes}}" wx:key="value" class="month-mode {{monthDisplayMode === item.value ? 'active' : ''}}" data-mode="{{item.value}}" bindtap="switchMonthDisplay">{{item.label}}</view>
|
||
</view>
|
||
<view wx:if="{{monthDisplayMode === 'rows'}}" class="row-name-switch {{monthRowLabelVisible ? 'active' : ''}}" bindtap="toggleMonthRowLabel">
|
||
<text>姓名</text>
|
||
<view class="switch-track"><view class="switch-thumb"></view></view>
|
||
</view>
|
||
</view>
|
||
<view class="month-card card">
|
||
<view class="month-week-head">
|
||
<text wx:for="{{weekLabels}}" wx:key="*this">{{item}}</text>
|
||
</view>
|
||
<view class="month-grid">
|
||
<view wx:for="{{monthDays}}" wx:key="date" class="month-cell {{item.isCurrentMonth ? '' : 'out-month'}} {{item.date === currentDateText ? 'selected' : ''}}" data-date="{{item.date}}" bindtap="selectDate">
|
||
<view class="month-cell-head">
|
||
<text class="month-day">{{item.day}}</text>
|
||
<text wx:if="{{item.dayStatus === 'full'}}" class="day-mark full">满</text>
|
||
<text wx:elif="{{item.dayStatus === 'rest'}}" class="day-mark rest">休</text>
|
||
</view>
|
||
<view wx:if="{{monthDisplayMode === 'count'}}" class="month-bars">
|
||
<view wx:for="{{item.artistCounts}}" wx:for-item="count" wx:key="artistId" wx:if="{{count.count > 0}}" class="month-artist-bar" style="background: {{count.color}};">
|
||
<text>{{count.shortName}}{{count.count}}</text>
|
||
</view>
|
||
<view wx:if="{{item.totalCount === 0}}" class="month-empty">空</view>
|
||
</view>
|
||
<view wx:else class="month-blocks">
|
||
<block wx:if="{{monthDisplayMode === 'blocks'}}">
|
||
<view wx:for="{{item.expandedBlocks}}" wx:for-item="block" wx:key="key" class="month-order-block" style="background: {{block.color}};"></view>
|
||
<view wx:if="{{item.totalCount === 0}}" class="month-empty">空</view>
|
||
</block>
|
||
<block wx:else>
|
||
<view wx:for="{{item.rowBlocks}}" wx:for-item="block" wx:key="key" class="month-row-block {{monthRowLabelVisible ? 'named' : ''}}" style="background: {{block.color}};">
|
||
<text wx:if="{{monthRowLabelVisible}}">{{block.artistName}}</text>
|
||
</view>
|
||
<view wx:if="{{item.totalCount === 0}}" class="month-empty">空</view>
|
||
</block>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<button class="fab" bindtap="createAppointment">+</button>
|
||
</view>
|