Commit e4e0e1dd by Lin

feat(Employee, AddFiles, DetailFiles):增强员工管理与数据处理

- 更新 Employee 组件,新增 employeeType 和 sellerEmployeeList,以实现更完善的员工分类。
1 parent 565096a8
......@@ -15,7 +15,6 @@
/>
<image
v-if="goodsInfo.isMainPush == 1"
class="prelearn-entrance"
:style="prelearnButtonStyle"
:src="require('@/assets/images/common/icon-prestudy-entrance.webp')"
......
......@@ -65,6 +65,8 @@ export default {
confirmText: '确认',
},
goodsInfo: {},
enteredViaRow: false,
isMainPush: null,
prelearnContext: {
activityId: '',
activityProductId: '',
......@@ -164,7 +166,9 @@ export default {
if (options.row) {
try {
this.goodsInfo = JSON.parse(decodeURIComponent(options.row))
console.log('[prelearnBridge] 商品完整数据 goodsInfo:', this.goodsInfo)
this.enteredViaRow = true
this.isMainPush = this.goodsInfo.isMainPush ?? null
console.log('[prelearnBridge] 商品完整数据 goodsInfo:', this.goodsInfo, 'isMainPush:', this.isMainPush)
const productId =this.goodsInfo.productId
if (productId) {
......@@ -735,7 +739,43 @@ export default {
}
// #endif
},
async checkMainPushStaffLearnStatus() {
const res = await uni.$api.activityApi.getPrelearnScriptBoardAPI({
activityId: this.goodsInfo.activityId || this.prelearnContext.activityId,
activityProductId: this.goodsInfo.productId || this.prelearnContext.activityProductId,
})
console.log('[prelearnBridge] getPrelearnScriptBoardAPI res:', res)
return Number(res?.staffLearnStatus) === 1
},
showMainPushBackTip() {
uni.showModal({
title: '提示',
content: '请先完成预学习后再退出',
showCancel: false,
confirmText: '知道了',
})
},
async back() {
if (this.enteredViaRow && Number(this.isMainPush) !== 1) {
this.navigateBack()
return
}
if (Number(this.isMainPush) === 1) {
try {
const learned = await this.checkMainPushStaffLearnStatus()
if (learned) {
this.navigateBack()
return
}
this.showMainPushBackTip()
} catch (error) {
console.error('[prelearnBridge] 预学习状态查询失败:', error)
this.showMainPushBackTip()
}
return
}
try {
const res = await uni.$api.commonApi.getPrelernHomePopupAPI()
console.log('[prelearnBridge] getPrelernHomePopupAPI res:', res)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!