This commit is contained in:
qsh
2024-12-25 17:05:06 +08:00
parent 926cefaee9
commit 34a1fc56d3
3 changed files with 7 additions and 5 deletions

View File

@@ -133,9 +133,10 @@ const open = async (row) => {
formLoading.value = true formLoading.value = true
try { try {
const data = await SalaryApi.getSalaryDetail(row.id) const data = await SalaryApi.getSalaryDetail(row.id)
formData.value = { ...data, meritsRate: data.meritsRate * 100 } if (!data) {
if (!formData.value) {
resetForm(row.id) resetForm(row.id)
} else {
formData.value = { ...data }
} }
} finally { } finally {
formLoading.value = false formLoading.value = false
@@ -179,7 +180,7 @@ const submitForm = async () => {
// 提交请求 // 提交请求
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value const data = { ...formData.value }
await SalaryApi.updateSalary(data) await SalaryApi.updateSalary(data)
message.success('配置成功') message.success('配置成功')
dialogVisible.value = false dialogVisible.value = false

View File

@@ -56,7 +56,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="period" label="年月" min-width="90px" /> <el-table-column prop="period" label="年月" min-width="90px" />
<el-table-column prop="dept" label="组织" min-width="90px" /> <el-table-column prop="dept" label="组织" min-width="90px" />
<el-table-column label="考核总分" prop="" align="center" /> <el-table-column label="考核总分" prop="score" align="center" />
<el-table-column label="操作" fixed="right" width="200"> <el-table-column label="操作" fixed="right" width="200">
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button

View File

@@ -198,7 +198,8 @@ function getSummaries({ columns, data }) {
const values = data.map((item) => Number(item[column.property])) const values = data.map((item) => Number(item[column.property]))
if (!values.every((value) => Number.isNaN(value))) { if (!values.every((value) => Number.isNaN(value))) {
if (column.property == 'weightSocre') { if (column.property == 'weightSocre') {
sums[index] = 5.6 const employee = employeeOptions.value.find((it) => it.examinedUser == employeeId.value)
sums[index] = employee.scoreTotal
} else { } else {
sums[index] = '' sums[index] = ''
} }