diff --git a/src/views/expense-management/share-detail/add.vue b/src/views/expense-management/share-detail/add.vue index 764e864..3253efb 100644 --- a/src/views/expense-management/share-detail/add.vue +++ b/src/views/expense-management/share-detail/add.vue @@ -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&¤tRow.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&¤tRow.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 + // } + // } } /**