fix : 费用分摊选择用户会被批量修改
This commit is contained in:
@@ -39,9 +39,9 @@
|
||||
<el-table-column prop="researchPersonnel" label="研发人员" width="230">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="researchPersonnel">
|
||||
{{ scope.row.researchPersonnelName ? scope.row.researchPersonnelName : currentReachPerson.name }}
|
||||
{{ scope.row.researchPersonnelName }}
|
||||
<el-button @click="showPersonnelPicker(scope.row,scope.$index)">
|
||||
{{ scope.row.researchPersonnelName || currentReachPerson.name ? '更改' : '请选择研发人员' }}
|
||||
{{ scope.row.researchPersonnelName ? '更改' : '请选择研发人员' }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -211,13 +211,13 @@ const showPersonnelPicker = (row, index) => {
|
||||
userPicker.value.showUserPicker()
|
||||
}
|
||||
const selected = (select) => {
|
||||
for (const selectElement of select) {
|
||||
currentReachPerson.value = selectElement
|
||||
if (!select || select.length === 0) {
|
||||
return
|
||||
}
|
||||
formData.value.tableData.forEach((item, index) => {
|
||||
if (index == currentIndex.value) {
|
||||
item.researchPersonnel = currentReachPerson.value.id
|
||||
item.researchPersonnelName = currentReachPerson.value.name
|
||||
if (index === currentIndex.value) {
|
||||
item.researchPersonnel = select[0].id
|
||||
item.researchPersonnelName = select[0].name
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -252,7 +252,7 @@ const handleAdd = () => {
|
||||
workday: '21.75',
|
||||
researchDuration: null,
|
||||
}
|
||||
currentReachPerson.value.name=''
|
||||
currentReachPerson.value.name = ''
|
||||
formData.value.tableData.push(row)
|
||||
}
|
||||
const handleCopy = (row) => {
|
||||
@@ -260,6 +260,7 @@ const handleCopy = (row) => {
|
||||
projectId: row.projectId,
|
||||
projectName: '',
|
||||
researchPersonnel: row.researchPersonnel,
|
||||
researchPersonnelName: row.researchPersonnelName,
|
||||
wagesPayable: row.wagesPayable,
|
||||
performance: row.performance,
|
||||
reserveFund: row.reserveFund,
|
||||
|
||||
Reference in New Issue
Block a user