This commit is contained in:
@jyuhsin
2025-01-03 10:30:51 +08:00
parent b1a7ab2162
commit fbe36fe160
@@ -438,6 +438,12 @@ layout("/layouts/platform.html"){
const u = cloneData.find(o => val && o.userId === val)
if (u) {
this.$message.warning('协会成员不能重复')
}
const sameUser = this.managePerson.find(o => o.userId === val)
if(sameUser) {
this.$message.warning('该成员已在理事机构中设置')
}
if(u || sameUser) {
this.$set(row, 'loginname', '')
this.$set(row, 'unitname', '')
this.$set(row, 'mobile', '')
@@ -485,7 +491,13 @@ layout("/layouts/platform.html"){
this.$set(row, 'userId', '')
return
}
const user = this.userOptions.find(o => o.id === val)
let user = this.userOptions.find(o => o.id === val)
const sameUser = this.clubUserTableData.find(o => o.userId === val)
if(sameUser) {
this.$message.warning(user.username + '已在协会成员设置,自动为您调整到理事机构中')
user = sameUser
this.clubUserTableData = this.clubUserTableData.filter(o => o.userId !== sameUser.userId)
}
row.loginname = user.loginname
row.unitname = user.unitname
row.mobile = user.mobile