新增预约详情作品图片轮播字段与组装;新增订单预览与未关联微信用户候选接口;补齐请假记录查询接口;订单数据预览改为四列;请假管理接入真实排班例外并支持新增;日程、我的、美甲师详情与改派选择器按设计稿微调;注册结果页与申请提交时间对齐设计稿。
69 lines
5.9 KiB
Plaintext
69 lines
5.9 KiB
Plaintext
<view class="page no-tab employee-create-page">
|
||
<view class="create-intro">
|
||
<text class="create-title">新增美甲师档案</text>
|
||
<text class="create-subtitle">{{applicationId ? '保存后将自动关联当前申请并通过审核' : (pickerMode ? '保存后自动选择该美甲师' : '保存后即可用于预约指定和美甲师管理')}}</text>
|
||
</view>
|
||
|
||
<view class="card avatar-card" bindtap="chooseAvatar">
|
||
<image wx:if="{{form.avatarUrl}}" class="avatar-preview" src="{{form.avatarUrl}}" mode="aspectFill" binderror="onAvatarError"></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="login-unlinked" bindtap="openUserPicker">
|
||
<text class="login-unlinked-label">微信登录</text>
|
||
<text class="login-unlinked-status">{{selectedWechatUser ? '已选择' : '未关联'}}</text>
|
||
<text class="login-unlinked-note">{{selectedWechatUser ? selectedWechatUser.title : '选择已登录小程序的微信用户,可直接关联为美甲师'}}</text>
|
||
<text class="login-unlinked-arrow">›</text>
|
||
</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 || associatingApplication}}" disabled="{{avatarUploading || creating || associatingApplication || (applicationId && applicationApproved)}}" bindtap="submit">{{applicationId && !createdEmployee ? '创建并通过审核' : (applicationId && createdEmployee && !applicationApproved ? '重试关联并通过' : '保存美甲师')}}</button>
|
||
</view>
|
||
|
||
<view wx:if="{{onboardingVisible}}" class="onboarding-mask" catchtouchmove="stopTouchMove">
|
||
<view class="onboarding-card">
|
||
<view class="onboarding-icon {{applicationId && !applicationApproved ? 'association-failed' : ''}}">{{applicationId && !applicationApproved ? '!' : '✓'}}</view>
|
||
<text class="onboarding-title">{{applicationId && !applicationApproved ? '美甲师档案已创建' : (applicationId ? '申请已关联并通过' : '美甲师已创建')}}</text>
|
||
<text class="onboarding-desc">{{applicationId && !applicationApproved ? '员工档案已保留,申请仍待处理。关联失败不会重复创建员工,可直接重试。' : (pickerMode ? '设置常规排班后,可继续把当前预约分配给该美甲师。' : '为新美甲师设置首个常规排班,之后即可正常承接预约。')}}</text>
|
||
<view wx:if="{{applicationId && !applicationApproved}}" class="association-retry-box">
|
||
<text>申请编号 {{applicationNo || applicationId}}</text>
|
||
<button class="primary-btn onboarding-primary" loading="{{associatingApplication}}" disabled="{{associatingApplication}}" bindtap="associateCreatedEmployee">重试关联并通过审核</button>
|
||
<button class="onboarding-skip" disabled="{{associatingApplication}}" bindtap="leaveAssociationForLater">稍后处理</button>
|
||
</view>
|
||
<block wx:else>
|
||
<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>
|
||
</block>
|
||
</view>
|
||
</view>
|
||
<entity-selector-sheet visible="{{userPickerVisible}}" title="选择微信用户" keyword="{{userKeyword}}" placeholder="搜索昵称或手机号" items="{{userItems}}" selected-id="{{selectedWechatUserId}}" loading="{{userLoading}}" empty-text="暂无未关联的微信用户" action-text="暂不关联" bind:search="onUserSearch" bind:select="selectWechatUser" bind:action="closeUserPicker" bind:close="closeUserPicker" />
|
||
<entity-selector-sheet visible="{{associationSheetVisible}}" title="关联待审核申请" keyword="{{associationKeyword}}" placeholder="搜索申请昵称、手机号或编号" items="{{associationItems}}" selected-id="{{associationSelectedId}}" loading="{{associationLoading}}" empty-text="暂无可关联申请" action-text="暂不关联,继续" bind:search="onAssociationSearch" bind:select="selectAssociation" bind:action="skipAssociation" bind:close="skipAssociation" />
|
||
</view>
|