Files
JayuCloud/JC-Salon-WeChat/pages/employees/index.wxml
T

71 lines
3.5 KiB
Plaintext
Raw Normal View History

2026-06-04 16:39:06 +08:00
<view class="page">
<view class="list-heading">
<text>美甲师</text>
<button class="compact-btn" bindtap="addEmployee">新增</button>
</view>
<view class="list">
2026-06-26 11:07:54 +08:00
<view wx:if="{{loadError}}" class="empty card">
<text>{{loadError}}</text>
<button class="secondary-btn retry-btn" bindtap="loadEmployees">重试</button>
</view>
<view wx:elif="{{employees.length === 0}}" class="empty card">暂无美甲师</view>
2026-06-04 16:39:06 +08:00
<view wx:for="{{employees}}" wx:key="id" class="card employee-card" data-id="{{item.id}}" bindtap="openDetail">
<view class="employee-left">
2026-06-27 00:08:18 +08:00
<view wx:if="{{item.avatar}}" class="avatar image-avatar">
<image src="{{item.avatar}}" mode="aspectFill"></image>
</view>
<view wx:else class="avatar" style="background: {{item.color}};">{{item.shortName}}</view>
2026-06-04 16:39:06 +08:00
<view>
<text class="employee-name">{{item.name}}</text>
2026-09-04 16:13:58 +08:00
<text class="employee-schedule">{{item.todaySchedule}} · {{item.todayAvailable ? '可预约' : '休息中'}}</text>
<text class="employee-meta">今日 {{item.todayOrders}} 单 · 本月 {{item.monthOrders}} 单</text>
2026-06-04 16:39:06 +08:00
</view>
</view>
<view class="color-pill" style="background: {{item.color}};"></view>
</view>
</view>
<view wx:if="{{createModalVisible}}" class="modal-mask" bindtap="closeCreateModal">
<view class="employee-modal" catchtap="stopTap">
<view class="modal-head">
<view>
<text class="modal-title">新增美甲师</text>
</view>
2026-06-25 22:29:47 +08:00
<view class="modal-close" bindtap="closeCreateModal">×</view>
</view>
2026-06-27 15:19:32 +08:00
<view class="avatar-upload">
<view wx:if="{{createForm.avatarUrl}}" class="avatar-preview image-avatar">
<image src="{{createForm.avatarUrl}}" mode="aspectFill"></image>
</view>
<view wx:else class="avatar-preview">头像</view>
<button class="secondary-btn avatar-btn" loading="{{avatarUploading}}" bindtap="chooseEmployeeAvatar">上传头像</button>
<button wx:if="{{createForm.avatarUrl}}" class="text-btn avatar-remove" bindtap="removeEmployeeAvatar">移除</button>
</view>
<view class="form-grid">
<view class="modal-field">
2026-06-26 11:07:54 +08:00
<text class="required-label">姓名</text>
<input value="{{createForm.nickname}}" data-field="nickname" bindinput="onCreateInput" placeholder="请输入姓名" />
</view>
<view class="modal-field">
2026-06-26 11:07:54 +08:00
<text class="required-label">手机号</text>
<input value="{{createForm.phone}}" data-field="phone" bindinput="onCreateInput" type="number" placeholder="请输入手机号" />
</view>
<view class="modal-field">
2026-06-26 11:07:54 +08:00
<text class="required-label">登录账号</text>
<input value="{{createForm.account}}" data-field="account" bindinput="onCreateInput" placeholder="请输入账号" />
</view>
<view class="modal-field">
2026-06-26 11:07:54 +08:00
<text class="required-label">初始密码</text>
<input value="{{createForm.password}}" data-field="password" bindinput="onCreateInput" password placeholder="请输入密码" />
</view>
<view class="modal-field">
2026-06-26 11:07:54 +08:00
<text class="required-label">微信号</text>
<input value="{{createForm.wechatId}}" data-field="wechatId" bindinput="onCreateInput" placeholder="请输入微信号" />
</view>
</view>
<button class="primary-btn modal-submit" loading="{{creating}}" bindtap="submitEmployee">保存美甲师</button>
</view>
</view>
2026-06-04 16:39:06 +08:00
</view>