This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const employeesApi = require('../../api/employees')
|
||||
const { chooseImageFilePath, uploadObjectFile } = require('../../utils/upload')
|
||||
const { showErrorToast, toUserMessage } = require('../../utils/toast')
|
||||
const { showActionModal } = require('../../utils/action-modal')
|
||||
|
||||
const EMPLOYEE_COLORS = ['#7BA7C7', '#8FB89A', '#A894C7', '#D7A86E', '#D98DA5', '#79A6A3', '#B9A16B', '#9BA9C8']
|
||||
const COLOR_WHEEL_RADIUS = 110
|
||||
@@ -372,16 +373,15 @@ Page({
|
||||
wx.showToast({ title: '已关联并通过审核', icon: 'success' })
|
||||
} catch (error) {
|
||||
this.setData({ associatingApplication: false })
|
||||
wx.showModal({
|
||||
const result = await showActionModal(this, {
|
||||
title: '关联审核未完成',
|
||||
content: toUserMessage(error, '美甲师档案已创建,可重试关联申请。'),
|
||||
icon: 'warning',
|
||||
confirmText: '重试',
|
||||
cancelText: '稍后处理',
|
||||
success: result => {
|
||||
if (result.confirm) this.associateCreatedEmployee()
|
||||
else this.setData({ onboardingVisible: true })
|
||||
}
|
||||
cancelText: '稍后处理'
|
||||
})
|
||||
if (result.confirm) this.associateCreatedEmployee()
|
||||
else this.setData({ onboardingVisible: true })
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "新增美甲师",
|
||||
"usingComponents": {
|
||||
"entity-selector-sheet": "/components/entity-selector-sheet/index"
|
||||
"entity-selector-sheet": "/components/entity-selector-sheet/index",
|
||||
"action-modal": "/components/action-modal/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,12 +55,12 @@
|
||||
<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>
|
||||
<button class="secondary-btn 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>
|
||||
<button class="secondary-btn onboarding-skip" loading="{{savingDefaultSchedule}}" disabled="{{savingDefaultSchedule}}" bindtap="skipFirstSchedule">{{pickerMode ? '暂不设置(使用全天排班)' : '不设置,保留全天排班'}}</button>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
@@ -87,4 +87,5 @@
|
||||
</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" />
|
||||
<action-modal id="actionModal" />
|
||||
</view>
|
||||
|
||||
@@ -301,6 +301,6 @@
|
||||
.onboarding-desc { margin-top: 12rpx; color: #837b72; font-size: 23rpx; line-height: 1.7; text-align: center; }
|
||||
.onboarding-default-note { margin-top: 14rpx; padding: 14rpx 16rpx; border-radius: 12rpx; background: #eff7f2; color: #39705d; font-size: 21rpx; line-height: 1.55; text-align: left; }
|
||||
.onboarding-primary { width: 100%; margin-top: 30rpx; }
|
||||
.onboarding-skip { margin-top: 12rpx; background: transparent; color: #7e776f; font-size: 23rpx; }
|
||||
.onboarding-skip { margin-top: 20rpx; }
|
||||
.association-retry-box { width: 100%; margin-top: 20rpx; padding: 18rpx; box-sizing: border-box; border-radius: 12rpx; background: #fff5f3; color: #8f4d46; font-size: 22rpx; text-align: center; }
|
||||
.association-retry-box .onboarding-primary { margin-top: 18rpx; }
|
||||
|
||||
Reference in New Issue
Block a user