完善店员申请关联与预约页面
自动发布开发环境 Nacos 配置 / publish (push) Successful in 21s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 8s

This commit is contained in:
2026-11-03 23:29:40 +08:00
parent 1fc46f3835
commit 4b4c1ddef5
18 changed files with 442 additions and 64 deletions
+20 -5
View File
@@ -50,6 +50,11 @@ Page({
},
onShow() {
if (this._waitingForEmployeeCreate) {
this._waitingForEmployeeCreate = false
this.loadEmployees()
if (this.data.reviewExpanded) this.loadReviewApplications()
}
const app = getApp()
if (!this.data.isManager || !app.globalData.openEmployeeReview) return
app.globalData.openEmployeeReview = false
@@ -128,12 +133,13 @@ Page({
})
if (!artists.length) {
this.setData({ associationSheetVisible: false })
await confirmModal({
title: '暂时无法通过',
content: '当前门店没有未关联微信的美甲师档案,请先新增美甲师,再审核这条申请。',
confirmText: '知道了',
showCancel: false
const result = await confirmModal({
title: '需要先新建美甲师',
content: '当前门店没有未关联微信的美甲师档案。新建后将自动关联这条申请并通过审核。',
confirmText: '去新建',
cancelText: '稍后处理'
})
if (result.confirm) this.createEmployeeForApplication(applicationId, application && application.applicationNo)
}
} catch (error) {
this.setData({ associationError: error.message || '未关联美甲师加载失败' })
@@ -291,6 +297,15 @@ Page({
}
},
createEmployeeForApplication(applicationId, applicationNo) {
if (!applicationId) return
this._waitingForEmployeeCreate = true
wx.navigateTo({
url: `/pages/employee-create/index?applicationId=${encodeURIComponent(applicationId)}&applicationNo=${encodeURIComponent(applicationNo || '')}`,
fail: () => { this._waitingForEmployeeCreate = false }
})
},
onEmployeeAvatarError(event) {
const index = Number(event.currentTarget.dataset.index)
if (!Number.isInteger(index) || !this.data.employees[index]) return