Files
JayuCloud/JY-Salon-WeChat/pages/leave-management/index.wxml
T

32 lines
1.3 KiB
Plaintext

<view class="page no-tab">
<view class="card leave-form">
<view class="field">
<text class="field-label">请假日期</text>
<picker mode="date" value="{{leaveForm.workDate}}" bindchange="onLeaveDateChange">
<view class="field-value">{{leaveForm.workDate}}</view>
</picker>
</view>
<view class="field">
<text class="field-label">备注</text>
<input value="{{leaveForm.remark}}" bindinput="onLeaveRemarkInput" placeholder="可选,例如全天请假" />
</view>
</view>
<view class="section">
<view class="section-title">工时记录</view>
<view class="list">
<view wx:if="{{loading}}" class="empty card">工时记录加载中...</view>
<view wx:elif="{{loadError}}" class="empty card error">
<text>{{loadError}}</text>
<button class="secondary-btn retry-btn" bindtap="loadRecords">重试</button>
</view>
<view wx:elif="{{records.length === 0}}" class="empty card">暂无请假记录</view>
<view wx:for="{{records}}" wx:key="id" class="card list-card leave-record">
<text class="leave-date">{{item.date}}</text>
<text class="leave-text">{{item.text}}</text>
</view>
</view>
</view>
<view class="fixed-bottom"><button class="primary-btn" loading="{{saving}}" bindtap="add">新增请假</button></view>
</view>