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