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) => { export const getKpiPeriodStatus = (params) => {
return request.get({ url: '/admin-api/oa/examine-period/getExaminePeriodByPeriod', 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>
<el-col :span="12" :offset="0"> <el-col :span="12" :offset="0">
<el-form-item label="绩效(%)"> <el-form-item label="绩效(%)">
<el-input-number <el-input-number v-model="formData.meritsRate" :min="0" :max="100" :controls="false" />
v-model="formData.jixiaoSalary"
:min="0"
:max="100"
:controls="false"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -137,7 +132,8 @@ const open = async (row) => {
getOptions() getOptions()
formLoading.value = true formLoading.value = true
try { 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) { if (!formData.value) {
resetForm(row.id) resetForm(row.id)
} }
@ -167,7 +163,8 @@ const resetForm = (id) => {
socialDeduct: 0, socialDeduct: 0,
accumulationFundDeduct: 0, accumulationFundDeduct: 0,
meritsSalary: 0, meritsSalary: 0,
extraDeduct: 0 extraDeduct: 0,
meritsRate: 0
} }
formRef.value?.resetFields() formRef.value?.resetFields()
} }

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

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

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

Loading…
Cancel
Save