refactor(expense-management): 注释掉研发人员重复性检查代码

- 在 add.vue 文件中,注释掉了两段用于检查研发人员重复性的代码
- 此修改可能是为了暂时禁用重复性检查功能,或者准备替换为新的检查逻辑
This commit is contained in:
dj
2025-06-08 23:08:02 +08:00
parent 70d94f3c1d
commit e4025b90e9

View File

@@ -182,22 +182,22 @@ const selectProject=(row,index)=>{
const researchPersonnelNumObj = getSelectProjectAndResearchPersonnelNum(researchPersonnelIdArray)
let repeatProjectName=getProjectName(row.projectId)
// console.log('currentRow.value',currentRow.value)
for (let researchPersonnelIdKey in researchPersonnelNumObj) {//先判断人员是否重复
if(currentRow.value.projectId){
if(researchPersonnelNumObj[researchPersonnelIdKey]>1){
ElNotification({
title: '警告',
message: `${repeatProjectName} 项目下,同一个研发人员不能分摊多次!`,
type: 'warning',
})
row.researchPersonnelId = ''
row.researchPersonnel = ''
row.companyName = ''
row.accountType = ''
}
}
}
// for (let researchPersonnelIdKey in researchPersonnelNumObj) {//先判断人员是否重复
// if(currentRow.value.projectId){
// if(researchPersonnelNumObj[researchPersonnelIdKey]>1){
// ElNotification({
// title: '警告',
// message: `${repeatProjectName} 项目下,同一个研发人员不能分摊多次!`,
// type: 'warning',
// })
// row.researchPersonnelId = ''
// row.researchPersonnel = ''
// row.companyName = ''
// row.accountType = ''
// }
// }
//
// }
// for (let projectIdKey in projectNumObj) {
// // console.log('projectNumObjKey', projectIdKey, projectNumObj[projectIdKey])
// if(projectNumObj[projectIdKey]>1){
@@ -263,27 +263,27 @@ const selectedResearchPersonnel = (select) => {
repeatProjectName=getProjectName(projectIdKey)
}
}
for (let researchPersonnelIdKey in researchPersonnelNumObj) {
// console.log('researchPersonnelIdKey', researchPersonnelIdKey, researchPersonnelNumObj[researchPersonnelIdKey])
if(researchPersonnelNumObj[researchPersonnelIdKey]>1&&repeatProjectName&&currentRow.value.projectId){
isRepeatResearchPersonnel.value=true
ElNotification({
title: '警告',
message: `${repeatProjectName} 项目下,同一个研发人员不能分摊多次!`,
type: 'warning',
})
formData.value.tableData.forEach((item,index)=>{
if (index === currentIndex.value) {
item.researchPersonnelId = ''
item.researchPersonnel = ''
item.companyName = ''
item.accountType = ''
}
})
}else{
userList.value = select
}
}
// for (let researchPersonnelIdKey in researchPersonnelNumObj) {
// // console.log('researchPersonnelIdKey', researchPersonnelIdKey, researchPersonnelNumObj[researchPersonnelIdKey])
// if(researchPersonnelNumObj[researchPersonnelIdKey]>1&&repeatProjectName&&currentRow.value.projectId){
// isRepeatResearchPersonnel.value=true
// ElNotification({
// title: '警告',
// message: `${repeatProjectName} 项目下,同一个研发人员不能分摊多次!`,
// type: 'warning',
// })
// formData.value.tableData.forEach((item,index)=>{
// if (index === currentIndex.value) {
// item.researchPersonnelId = ''
// item.researchPersonnel = ''
// item.companyName = ''
// item.accountType = ''
// }
// })
// }else{
// userList.value = select
// }
// }
}
/**