59 lines
2.7 KiB
Plaintext
59 lines
2.7 KiB
Plaintext
<view class="page">
|
||
<view class="list-heading">
|
||
<text>美甲师</text>
|
||
<button class="compact-btn" bindtap="addEmployee">新增</button>
|
||
</view>
|
||
|
||
<view class="list">
|
||
<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>
|
||
<view wx:for="{{employees}}" wx:key="id" class="card employee-card" data-id="{{item.id}}" bindtap="openDetail">
|
||
<view class="employee-left">
|
||
<view class="avatar" style="background: {{item.color}};">{{item.shortName}}</view>
|
||
<view>
|
||
<text class="employee-name">{{item.name}}</text>
|
||
<text class="employee-meta">本月 {{item.monthOrders}} 单 · ¥{{item.monthAmount}}</text>
|
||
</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>
|
||
<view class="modal-close" bindtap="closeCreateModal">×</view>
|
||
</view>
|
||
<view class="form-grid">
|
||
<view class="modal-field">
|
||
<text class="required-label">姓名</text>
|
||
<input value="{{createForm.nickname}}" data-field="nickname" bindinput="onCreateInput" placeholder="请输入姓名" />
|
||
</view>
|
||
<view class="modal-field">
|
||
<text class="required-label">手机号</text>
|
||
<input value="{{createForm.phone}}" data-field="phone" bindinput="onCreateInput" type="number" placeholder="请输入手机号" />
|
||
</view>
|
||
<view class="modal-field">
|
||
<text class="required-label">登录账号</text>
|
||
<input value="{{createForm.account}}" data-field="account" bindinput="onCreateInput" placeholder="请输入账号" />
|
||
</view>
|
||
<view class="modal-field">
|
||
<text class="required-label">初始密码</text>
|
||
<input value="{{createForm.password}}" data-field="password" bindinput="onCreateInput" password placeholder="请输入密码" />
|
||
</view>
|
||
<view class="modal-field">
|
||
<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>
|
||
</view>
|