qsh 4 weeks ago
parent e5e141fb84
commit 926cefaee9
  1. 10
      src/api/kpi/score.js
  2. 13
      src/views/Finance/Salary/Comp/DialogSalary.vue
  3. 8
      src/views/Home/Salary/index.vue
  4. 8
      src/views/Kpi/Appraise/index.vue
  5. 48
      src/views/Kpi/Record/DialogScoreDetail.vue
  6. 56
      src/views/Kpi/Record/index.vue
  7. 7
      src/views/Kpi/Score/index.vue

@ -29,3 +29,13 @@ export const saveScoreRecord = (params) => {
export const getKpiPeriodStatus = (params) => {
return request.get({ url: '/admin-api/oa/examine-period/getExaminePeriodByPeriod', params })
}
// 查询考核记录
export const getScoreRecord = (data) => {
return request.post({ url: '/admin-api/oa/examine-result/periodPage', data })
}
// 查详情
export const getScoreDetail = (params) => {
return request.get({ url: '/admin-api/oa/examine-result/detail', params })
}

@ -19,12 +19,7 @@
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="绩效(%)">
<el-input-number
v-model="formData.jixiaoSalary"
:min="0"
:max="100"
:controls="false"
/>
<el-input-number v-model="formData.meritsRate" :min="0" :max="100" :controls="false" />
</el-form-item>
</el-col>
</el-row>
@ -137,7 +132,8 @@ const open = async (row) => {
getOptions()
formLoading.value = true
try {
formData.value = await SalaryApi.getSalaryDetail(row.id)
const data = await SalaryApi.getSalaryDetail(row.id)
formData.value = { ...data, meritsRate: data.meritsRate * 100 }
if (!formData.value) {
resetForm(row.id)
}
@ -167,7 +163,8 @@ const resetForm = (id) => {
socialDeduct: 0,
accumulationFundDeduct: 0,
meritsSalary: 0,
extraDeduct: 0
extraDeduct: 0,
meritsRate: 0
}
formRef.value?.resetFields()
}

@ -74,26 +74,26 @@
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.standardMeritsSalary"
v-model="row.meritsSalary"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.standardMeritsSalary }}</span>
<span v-else> {{ row.meritsSalary }}</span>
</template>
</el-table-column>
<el-table-column label="绩效实发" min-width="90px">
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.meritsSalary"
v-model="row.reallyMeritsSalary"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.meritsSalary }}</span>
<span v-else> {{ row.reallyMeritsSalary }}</span>
</template>
</el-table-column>
<el-table-column label="补贴" min-width="90px">

@ -22,7 +22,7 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list" border>
<el-table-column prop="examineTarget" label="考核指标" width="180" />
<el-table-column prop="type" label="分值模式" width="90" :formatter="getKpiModeLabel" />
<el-table-column prop="typeName" label="分值模式" width="90" :formatter="getKpiModeLabel" />
<el-table-column prop="weight" label="权重%" width="90" />
<el-table-column label="考核内容">
<template #default="{ row }">
@ -125,7 +125,11 @@ const handleQuery = () => {
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
searchForm.value = {
examineTarget: undefined,
pageNo: 1,
pageSize: 20
}
handleQuery()
}

@ -0,0 +1,48 @@
<template>
<Dialog title="绩效考核详情" v-model="show" width="1200px">
<el-table :data="list" border stripe>
<el-table-column prop="examineTarget" label="考核指标" width="100" />
<el-table-column prop="typeName" label="分值模式" width="90" />
<el-table-column prop="weight" label="权重%" width="90" />
<el-table-column label="考核内容">
<template #default="{ row }">
<div v-dompurify-html="row.examineContent"></div>
</template>
</el-table-column>
<el-table-column label="考核规则" prop="examineRule">
<template #default="{ row }">
<div v-dompurify-html="row.examineRule"></div>
</template>
</el-table-column>
<el-table-column label="评分上限" prop="examineScore" width="90" />
<el-table-column label="考核评分" width="90" prop="score" />
<el-table-column label="评分备注" width="90" prop="remark" />
<el-table-column label="加权得分" prop="weightSocre" width="90" />
</el-table>
<template #footer>
<span>
<el-button @click="show = false"> </el-button>
</span>
</template>
</Dialog>
</template>
<script setup name="DialogScoreDetail">
import * as KpiApi from '@/api/kpi/score.js'
const show = ref(false)
const list = ref([])
async function open(id) {
show.value = true
try {
const data = await KpiApi.getScoreDetail({ id })
list.value = data.list
} finally {
}
}
defineExpose({ open }) // open
</script>
<style lang="scss" scoped></style>

@ -23,7 +23,7 @@
</el-form-item>
<el-form-item>
<el-input
v-model.trim="searchForm.name"
v-model.trim="searchForm.examinedUserName"
placeholder="员工姓名"
clearable
@keyup.enter="handleSearch"
@ -40,17 +40,17 @@
stripe
:default-expand-all="false"
row-key="id"
:tree-props="{ children: 'userDingAttendanceRespVOList', hasChildren: 'hasChildren' }"
:tree-props="{ children: 'examineResultRespVOList', hasChildren: 'hasChildren' }"
:span-method="spanMethod"
>
<el-table-column label="姓名" min-width="90px">
<template #default="{ row }">
<span v-if="row.userDingAttendanceRespVOList && row.userDingAttendanceRespVOList.length">
<span v-if="row.examineResultRespVOList && row.examineResultRespVOList.length">
<span>{{ row.period }}</span>
<span class="ml-20px">考核人数{{ row.attendanceUserCount }}</span>
<span class="ml-20px">考核人数{{ row.examineNum }}</span>
</span>
<span v-else>
{{ row.employeeName }}
{{ row.examinedUserName }}
</span>
</template>
</el-table-column>
@ -59,19 +59,9 @@
<el-table-column label="考核总分" prop="" align="center" />
<el-table-column label="操作" fixed="right" width="200">
<template #default="{ row }">
<el-button
type="primary"
text
v-if="!row.id"
style="padding: 0"
v-hasPermi="['kpi:record:detail']"
@click="handleDetail(row)"
>
详情
</el-button>
<el-button
type="danger"
v-if="row.id"
v-if="!row.examinedUser"
:disabled="row.status == 1"
style="padding: 0"
text
@ -81,6 +71,16 @@
<span v-if="row.status == 0">封存</span>
<span v-else-if="row.status == 1">已封存</span>
</el-button>
<el-button
type="primary"
text
v-if="row.examinedUser"
style="padding: 0"
v-hasPermi="['kpi:record:detail']"
@click="handleDetail(row)"
>
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -91,17 +91,20 @@
v-model:limit="searchForm.pageSize"
@pagination="getList"
/>
<DialogScoreDetail ref="detailDialogRef" />
</div>
</template>
<script setup name="KpiRecord">
import { removeNullField } from '@/utils'
import * as KpiApi from '@/api/kpi/score.js'
import DialogScoreDetail from './DialogScoreDetail.vue'
const message = useMessage() //
const searchForm = ref({
name: undefined,
examinedUserName: undefined,
period: undefined,
dept: undefined,
pageNo: 1,
@ -133,17 +136,15 @@ async function getList() {
month: new Date(params.period).getMonth() + 1
}
}
const data = await KpiApi.getScorePage(removeNullField(params))
if (searchForm.value.name) {
const data = await KpiApi.getScoreRecord(removeNullField(params))
if (searchForm.value.examinedUserName) {
tableList.value = data.list.reduce((pre, cur) => {
return pre.concat(cur.userDingAttendanceRespVOList)
return pre.concat(cur.examineResultRespVOList)
}, [])
} else {
tableList.value = data.list.map((it, index) => ({
...it,
userDingAttendanceRespVOList: it.userDingAttendanceRespVOList.sort((pre, cur) =>
pre.employeeName.localeCompare(cur.employeeName)
),
examineResultRespVOList: it.examineResultRespVOList,
id: index + 1
}))
}
@ -156,7 +157,7 @@ async function getList() {
}
function spanMethod({ row, columnIndex }) {
if (row.userDingAttendanceRespVOList && row.userDingAttendanceRespVOList.length > 0) {
if (row.examineResultRespVOList && row.examineResultRespVOList.length > 0) {
if (columnIndex === 0) {
return [1, 4]
} else if (columnIndex == 4 && row.id) {
@ -167,16 +168,17 @@ function spanMethod({ row, columnIndex }) {
}
}
const detailDialogRef = ref()
function handleDetail(row) {
console.log(row)
detailDialogRef.value.open(row.id)
}
async function handleSealup(row) {
try {
//
await message.confirm('确认要封存"' + row.period + '"假勤吗?')
await message.confirm('确认要封存"' + row.period + '"考核记录吗?')
//
await KpiApi.saveFalseDiligence({
await KpiApi.saveScoreRecord({
period: row.period
})
message.success('封存成功!')

@ -20,9 +20,12 @@
<el-tab-pane
v-for="item in employeeOptions"
:key="item.examinedUser"
:label="item.examinedUserName"
:name="item.examinedUser"
>
<template #label>
<span>{{ item.examinedUserName }}</span>
<el-badge :is-dot="item.notExaminedCount > 0" type="danger" />
</template>
<div class="mb-10px">
<el-tag v-if="periodSaved == 1" type="danger">
当前周期已封存不可修改当月绩效考核
@ -40,7 +43,7 @@
:summary-method="getSummaries"
>
<el-table-column prop="examineTarget" label="考核指标" width="180" />
<el-table-column prop="type" label="分值模式" width="90" />
<el-table-column prop="typeName" label="分值模式" width="90" />
<el-table-column prop="weight" label="权重%" width="90" />
<el-table-column label="考核内容">
<template #default="{ row }">

Loading…
Cancel
Save