diff --git a/src/views/modules/erf/expApplyList.vue b/src/views/modules/erf/expApplyList.vue index 35683a7..742c9b3 100644 --- a/src/views/modules/erf/expApplyList.vue +++ b/src/views/modules/erf/expApplyList.vue @@ -613,7 +613,8 @@ placeholder="请选择计划员(可多选)" style="width: 100%" multiple - clearable> + clearable + @remove-tag="handlePlannerRemoveTag"> p.userDisplay && p.userDisplay.includes('郑宇')) + this.lockedPlannerUserId = joyce ? joyce.userId : null // 根据事业部设置默认生产经理(使用user_display模糊匹配) const defaultProdManagerIds = [] if (row.buDesc === 'RFID') { @@ -1072,6 +1077,20 @@ export default { }) }, + /** + * 计划员移除标签拦截:默认计划员,不允许被移除 + */ + handlePlannerRemoveTag(removedId) { + if (this.lockedPlannerUserId && removedId === this.lockedPlannerUserId) { + this.$nextTick(() => { + if (!this.submitData.plannerIds.includes(this.lockedPlannerUserId)) { + this.submitData.plannerIds = [this.lockedPlannerUserId, ...this.submitData.plannerIds] + } + }) + this.$message.warning('该计划员不可移除') + } + }, + /** * 确认下达 */