Files
JayuCloud/FM-Wechat-Fronted/pages/schedule-setting/index.wxml
T

85 lines
4.3 KiB
Plaintext

<view class="page no-tab">
<view class="section">
<view class="section-title">常规排班</view>
<view class="card rule-card">
<view class="preset-grid">
<view wx:for="{{presetOptions}}" wx:key="value" class="preset-chip {{item.active ? 'active' : ''}}" data-value="{{item.value}}" bindtap="selectPreset">{{item.label}}</view>
</view>
<view class="field-block">
<view class="field-title">工作日</view>
<view class="weekday-grid">
<view wx:for="{{weekdayOptions}}" wx:key="value" class="weekday-chip {{item.active ? 'active' : ''}}" data-value="{{item.value}}" bindtap="toggleWeekday">{{item.label}}</view>
</view>
</view>
<view class="field">
<text class="field-label">开始时间</text>
<picker mode="time" value="{{form.startTime}}" bindchange="onStartChange"><view class="field-value">{{form.startTime}}</view></picker>
</view>
<view class="field">
<text class="field-label">结束时间</text>
<picker mode="time" value="{{form.endTime}}" bindchange="onEndChange"><view class="field-value">{{form.endTime}}</view></picker>
</view>
<view class="field">
<text class="field-label">预约间隔</text>
<input type="number" value="{{form.slotMinutes}}" data-field="slotMinutes" bindinput="onInput" />
</view>
<view class="field">
<text class="field-label">容量</text>
<input type="number" value="{{form.capacity}}" data-field="capacity" bindinput="onInput" />
</view>
<view class="field">
<text class="field-label">备注</text>
<input value="{{form.remark}}" data-field="remark" bindinput="onInput" placeholder="可选" />
</view>
</view>
</view>
<view class="section">
<view class="section-title">特殊日期</view>
<view class="card rule-card">
<view class="field">
<text class="field-label">日期</text>
<picker mode="date" value="{{exceptionForm.workDate}}" bindchange="onExceptionDateChange"><view class="field-value">{{exceptionForm.workDate}}</view></picker>
</view>
<view class="field">
<text class="field-label">类型</text>
<picker range="{{exceptionTypes}}" range-key="label" value="{{exceptionTypeIndex}}" bindchange="onExceptionTypeChange"><view class="field-value">{{exceptionTypeLabel}}</view></picker>
</view>
<view wx:if="{{exceptionForm.exceptionType !== 'REST'}}" class="field">
<text class="field-label">开始时间</text>
<picker mode="time" value="{{exceptionForm.startTime}}" bindchange="onExceptionStartChange"><view class="field-value">{{exceptionForm.startTime}}</view></picker>
</view>
<view wx:if="{{exceptionForm.exceptionType !== 'REST'}}" class="field">
<text class="field-label">结束时间</text>
<picker mode="time" value="{{exceptionForm.endTime}}" bindchange="onExceptionEndChange"><view class="field-value">{{exceptionForm.endTime}}</view></picker>
</view>
<view wx:if="{{exceptionForm.exceptionType !== 'REST'}}" class="field">
<text class="field-label">预约间隔</text>
<input type="number" value="{{exceptionForm.slotMinutes}}" data-field="slotMinutes" bindinput="onExceptionInput" />
</view>
<view wx:if="{{exceptionForm.exceptionType !== 'REST'}}" class="field">
<text class="field-label">容量</text>
<input type="number" value="{{exceptionForm.capacity}}" data-field="capacity" bindinput="onExceptionInput" />
</view>
<view class="field">
<text class="field-label">备注</text>
<input value="{{exceptionForm.remark}}" data-field="remark" bindinput="onExceptionInput" placeholder="可选" />
</view>
<button class="secondary-btn exception-btn" loading="{{saving}}" bindtap="saveException">保存特殊日期</button>
</view>
<view wx:if="{{exceptions.length}}" class="exception-list">
<view wx:for="{{exceptions}}" wx:key="id" class="card exception-card">
<text>{{item.summary}}</text>
<text wx:if="{{item.remark}}" class="exception-remark">{{item.remark}}</text>
</view>
</view>
</view>
<view class="fixed-bottom">
<button class="primary-btn" loading="{{saving}}" bindtap="save">保存排班规则</button>
</view>
</view>