Browse Source

默认计划员,不允许被移除

master
han\hanst 12 hours ago
parent
commit
2490022303
  1. 21
      src/views/modules/erf/expApplyList.vue

21
src/views/modules/erf/expApplyList.vue

@ -613,7 +613,8 @@
placeholder="请选择计划员(可多选)"
style="width: 100%"
multiple
clearable>
clearable
@remove-tag="handlePlannerRemoveTag">
<el-option
v-for="planner in plannerList"
:key="planner.userId"
@ -719,6 +720,7 @@ export default {
prodManagerList: [], //
qualityManagerList: [], //
plannerList: [], //
lockedPlannerUserId: null, //
//
flowStatus: {
@ -1012,6 +1014,9 @@ export default {
this.prodManagerList = data.prodManagers || []
this.qualityManagerList = data.qualityManagers || []
this.plannerList = data.planners || []
// userId
const joyce = this.plannerList.find(p => 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('该计划员不可移除')
}
},
/**
* 确认下达
*/

Loading…
Cancel
Save