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

62 lines
3.7 KiB
Plaintext

<view class="page no-tab employee-create-page">
<view class="create-intro">
<text class="create-title">录入美甲师账号</text>
<text class="create-subtitle">{{pickerMode ? '保存后自动选择该美甲师' : '保存后即可用于预约指定和美甲师管理'}}</text>
</view>
<view class="card avatar-card" bindtap="chooseAvatar">
<image wx:if="{{form.avatarUrl}}" class="avatar-preview" src="{{form.avatarUrl}}" mode="aspectFill"></image>
<image wx:else class="avatar-preview" src="/assets/images/default-user-avatar.png" mode="aspectFit"></image>
<view class="avatar-copy">
<text class="avatar-title">美甲师头像</text>
<text class="avatar-tip">点击选择图片,可稍后补充</text>
</view>
<text class="avatar-action">{{avatarUploading ? '上传中' : '更换'}}</text>
</view>
<button wx:if="{{form.avatarUrl}}" class="remove-avatar" catchtap="removeAvatar">移除当前头像</button>
<view class="card form-card create-form">
<view class="field">
<text class="field-label required">姓名</text>
<input value="{{form.nickname}}" data-field="nickname" bindinput="onInput" placeholder="请输入美甲师姓名" />
</view>
<view class="field">
<text class="field-label required">手机号</text>
<input value="{{form.phone}}" data-field="phone" bindinput="onInput" type="number" maxlength="11" placeholder="请输入手机号" />
</view>
<view class="field">
<text class="field-label required">登录账号</text>
<input value="{{form.account}}" data-field="account" bindinput="onInput" placeholder="默认跟随手机号" />
</view>
<view class="field">
<text class="field-label required">初始密码</text>
<input value="{{form.password}}" data-field="password" bindinput="onInput" password placeholder="请输入初始密码" />
</view>
<view class="field">
<text class="field-label">微信号</text>
<input value="{{form.wechatId}}" data-field="wechatId" bindinput="onInput" placeholder="选填" />
</view>
<view class="field color-field">
<text class="field-label required">专属颜色</text>
<view class="color-options">
<view wx:for="{{employeeColors}}" wx:key="*this" class="color-option {{form.color === item ? 'selected' : ''}}" style="background: {{item}};" data-color="{{item}}" bindtap="selectColor"></view>
</view>
</view>
</view>
<view class="fixed-bottom">
<button class="primary-btn" loading="{{creating}}" disabled="{{avatarUploading || creating}}" bindtap="submit">保存美甲师</button>
</view>
<view wx:if="{{onboardingVisible}}" class="onboarding-mask" catchtouchmove="stopTouchMove">
<view class="onboarding-card">
<view class="onboarding-icon">✓</view>
<text class="onboarding-title">美甲师已创建</text>
<text class="onboarding-desc">{{pickerMode ? '设置常规排班后,可继续把当前预约分配给该美甲师。' : '为新美甲师设置首个常规排班,之后即可正常承接预约。'}}</text>
<text class="onboarding-default-note">不立即设置时,将默认全年无休、全天可预约(00:00-23:59),之后可在排班设置中调整。</text>
<button class="primary-btn onboarding-primary" loading="{{savingDefaultSchedule}}" disabled="{{savingDefaultSchedule}}" bindtap="setupFirstSchedule">{{pickerMode ? '设置排班并分配' : '立即设置排班'}}</button>
<button class="onboarding-skip" loading="{{savingDefaultSchedule}}" disabled="{{savingDefaultSchedule}}" bindtap="skipFirstSchedule">{{pickerMode ? '暂不设置(默认全天可约)' : '不设置,使用默认全天排班'}}</button>
</view>
</view>
</view>