qsh 1 month ago
parent 82f7d4be5e
commit 17208922ad
  1. 7
      src/api/pers/employee.js
  2. 40
      src/components/Editor/src/Editor.vue
  3. 28
      src/views/Finance/Salary/Comp/DialogSalary.vue
  4. 3
      src/views/Home/FalseDiligenceReport/index.vue
  5. 20
      src/views/Home/Salary/index.vue
  6. 183
      src/views/Kpi/Appraise/Components/DialogAppraise.vue
  7. 147
      src/views/Kpi/Appraise/index.vue
  8. 205
      src/views/Kpi/Score/index.vue
  9. 26
      src/views/Pers/Employee/Comp/DialogEmployee.vue
  10. 1
      src/views/Pers/Employee/index.vue

@ -5,6 +5,11 @@ export const createEmployee = (data) => {
return request.post({ url: '/admin-api/oa/employee/create', data, isSubmitForm: true })
}
// 分页
export const getEmployeeSimpleList = (params) => {
return request.get({ url: '/admin-api/oa/employee/list-all-simple', params })
}
// 修改
export const updateEmployee = (data) => {
return request.put({ url: '/admin-api/oa/employee/update', data })
@ -30,7 +35,7 @@ export const deleteEmployee = (id) => {
return request.delete({ url: '/admin-api/oa/employee/delete', params: { id } })
}
// 详情
// 获取钉钉id
export const getDingUserId = (params) => {
return request.get({ url: '/admin-api/oa/employee/getDingTalkUserIdByMobile', params })
}

@ -24,7 +24,27 @@ const props = defineProps({
default: () => undefined
},
readonly: propTypes.bool.def(false),
modelValue: propTypes.string.def('')
modelValue: propTypes.string.def(''),
toolbarConfig: {
type: Object,
default: () => ({
excludeKeys: [
'insertVideo', //
'insertImage', //
'insertLink', //
'codeBlock', //
'headerSelect', //
'blockquote', //
'fontFamily', //
'todo', //
'group-indent', //
'emotion', //
'undo', //
'redo', //
'fullScreen'
]
})
}
})
const emit = defineEmits(['change', 'update:modelValue'])
@ -212,24 +232,6 @@ const editorStyle = computed(() => {
}
})
const toolbarConfig = ref({
excludeKeys: [
'insertVideo', //
'insertImage', //
'insertLink', //
'codeBlock', //
'headerSelect', //
'blockquote', //
'fontFamily', //
'todo', //
'group-indent', //
'emotion', //
'undo', //
'redo', //
'fullScreen'
]
})
//
const handleChange = (editor: IDomEditor) => {
emit('change', editor)

@ -18,8 +18,13 @@
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="奖金" prop="rewardSalary">
<el-input-number v-model="formData.rewardSalary" :min="0" :controls="false" />
<el-form-item label="绩效(%)">
<el-input-number
v-model="formData.jixiaoSalary"
:min="0"
:max="100"
:controls="false"
/>
</el-form-item>
</el-col>
</el-row>
@ -49,6 +54,11 @@
<el-input-number v-model="formData.fullWorkSalary" :min="0" :controls="false" />
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="奖金" prop="rewardSalary">
<el-input-number v-model="formData.rewardSalary" :min="0" :controls="false" />
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="其他应发" prop="extraSalary">
<el-input-number v-model="formData.extraSalary" :min="0" :controls="false" />
@ -57,16 +67,11 @@
</el-row>
<el-divider direction="horizontal" content-position="left">应扣</el-divider>
<el-row :gutter="20">
<el-col :span="12" :offset="0">
<!-- <el-col :span="12" :offset="0">
<el-form-item label="绩效">
<el-input placeholder="生成后录入" disabled />
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="考勤">
<el-input placeholder="自动计算" disabled />
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row :gutter="20">
<el-col :span="12" :offset="0">
@ -86,6 +91,11 @@
<el-input placeholder="自动计算" disabled />
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="考勤">
<el-input placeholder="自动计算" disabled />
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="其他应扣" prop="extraDeduct">
<el-input-number v-model="formData.extraDeduct" :min="0" :controls="false" />

@ -268,6 +268,9 @@ async function getList() {
} else {
tableList.value = data.list.map((it, index) => ({
...it,
userDingAttendanceRespVOList: it.userDingAttendanceRespVOList.sort((pre, cur) =>
pre.employeeName.localeCompare(cur.employeeName)
),
id: index + 1,
edit: it.status == 1 ? '2' : '0'
}))

@ -57,7 +57,7 @@
<el-table-column prop="dept" label="部门" min-width="90px" />
<el-table-column prop="post" label="职位" min-width="90px" />
<el-table-column label="应发工资" align="center">
<el-table-column label="基本工资" min-width="90px">
<el-table-column label="无责底薪" min-width="90px">
<template #default="{ row }">
<el-input-number
v-if="row.edit"
@ -70,7 +70,20 @@
<span v-else> {{ row.baseSalary }}</span>
</template>
</el-table-column>
<el-table-column label="绩效" min-width="90px">
<el-table-column label="标准绩效" min-width="90px">
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.standardMeritsSalary"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.standardMeritsSalary }}</span>
</template>
</el-table-column>
<el-table-column label="绩效实发" min-width="90px">
<template #default="{ row }">
<el-input-number
v-if="row.edit"
@ -364,6 +377,9 @@ async function getList() {
} else {
tableList.value = data.list.map((it, index) => ({
...it,
userSalaryGrantRespVOList: it.userSalaryGrantRespVOList.sort((pre, cur) =>
pre.name.localeCompare(cur.name)
),
id: index + 1,
edit: it.status == 1 ? '2' : '0'
}))

@ -0,0 +1,183 @@
<template>
<Dialog :title="title" v-model="show" width="800px">
<el-form v-loading="formLoading" :model="form" ref="formRef" :rules="rules" label-width="80px">
<el-row :gutter="20">
<el-col :span="24" :offset="0">
<el-form-item label="考核指标" prop="name">
<el-input v-model="form.name" placeholder="请输入" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12" :offset="0">
<el-form-item label="权重" prop="rate">
<el-input-number v-model="form.rate" :min="0" :step="1" :controls="false" />
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="评分上限" prop="maxScore">
<el-input-number v-model="form.maxScore" :min="0" :step="1" :controls="false" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24" :offset="0">
<el-form-item label="考核内容" prop="kaoheneirong">
<Editor
v-model:modelValue="form.kaoheneirong"
height="150px"
:toolbarConfig="{
toolbarKeys: []
}"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24" :offset="0">
<el-form-item label="考核规则" prop="kaoheguize">
<Editor
v-model:modelValue="form.kaoheguize"
height="150px"
:toolbarConfig="{ toolbarKeys: [] }"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24" :offset="0">
<el-form-item label="考核员工" prop="checkEmployees">
<div>
<el-checkbox
v-model="checkAll"
:indeterminate="isIndeterminate"
@change="handleCheckAllChange"
>
全选
</el-checkbox>
<el-checkbox-group v-model="form.checkEmployees" @change="handleCheckedChange">
<el-checkbox
v-for="item in employeeOptions"
:key="item.id"
:label="item.id"
:value="item.id"
>
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<span>
<el-button @click="show = false"> </el-button>
<el-button type="primary" :disabled="formLoading" @click="handleSave"> </el-button>
</span>
</template>
</Dialog>
</template>
<script setup name="DialogAppraise">
// import * as ResourceApi from '@/api/system/library/resource'
const { t } = useI18n() //
const message = useMessage() //
const show = ref(false)
const title = ref('')
const formType = ref('create')
const form = ref({})
const formLoading = ref(false)
const rules = ref({
name: { required: true, message: '标题不可为空', trigger: 'blur' },
kaoheneirong: { required: true, message: '标题不可为空', trigger: 'blur' },
kaoheguize: { required: true, message: '标题不可为空', trigger: 'blur' }
})
async function open(type, val) {
show.value = true
title.value = type == 'update' ? '修改考核项' : '新增考核项'
formType.value = type
resetForm()
if (val?.id) {
formLoading.value = true
try {
// form.value = await ResourceApi.getResource(id)
} finally {
formLoading.value = false
}
} else if (val.name) {
form.value = { ...val }
}
const checkedCount = form.value.checkEmployees?.length || 0
isIndeterminate.value = checkedCount > 0 && checkedCount < employeeOptions.value.length
}
function resetForm() {
form.value = {
name: '',
rate: 0,
kaoheneirong: ``,
kaoheguize: ``,
maxScore: 5,
checkEmployees: []
}
}
defineExpose({ open }) // open
const formRef = ref()
/** 提交表单 */
const emit = defineEmits(['success']) // success
async function handleSave() {
//
if (!formRef.value) return
const valid = await formRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
if (formType.value === 'create') {
// await ResourceApi.createResource(form.value)
message.success(t('common.createSuccess'))
} else {
// await ResourceApi.updateResource(form.value)
message.success(t('common.updateSuccess'))
}
show.value = false
//
emit('success', form.value)
} finally {
formLoading.value = false
}
}
const checkAll = ref(false)
const isIndeterminate = ref(false)
const employeeOptions = ref([
{ id: 1, name: '武大郎' },
{ id: 2, name: '李二郎' },
{ id: 3, name: '拼命三郎' },
{ id: 4, name: '杨四郎' }
])
function handleCheckAllChange(val) {
form.value.checkEmployees = val ? employeeOptions.value.map((it) => it.id) : []
isIndeterminate.value = false
}
function handleCheckedChange(value) {
const checkedCount = value.length
checkAll.value = checkedCount === employeeOptions.value.length
isIndeterminate.value = checkedCount > 0 && checkedCount < employeeOptions.value.length
}
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,147 @@
<template>
<div>
<!-- 搜索工作栏 -->
<el-form :model="searchForm" ref="queryFormRef" inline label-width="0">
<el-form-item>
<el-input v-model="searchForm.name" placeholder="请输入考核指标" clearable />
</el-form-item>
<el-form-item>
<el-button @click="handleQuery" v-hasPermi="['kpi:appraise:search']"> 搜索</el-button>
<el-button @click="resetQuery" v-hasPermi="['kpi:appraise:reset']"> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['kpi:appraise:add']"
>
新增
</el-button>
</el-form-item>
</el-form>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" border>
<el-table-column prop="name" label="考核指标" width="180" />
<el-table-column prop="rate" label="权重%" width="90" />
<el-table-column label="考核内容">
<template #default="{ row }">
<div v-dompurify-html="row.kaoheneirong"></div>
</template>
</el-table-column>
<el-table-column label="考核规则" prop="kaoheguize">
<template #default="{ row }">
<div v-dompurify-html="row.kaoheguize"></div>
</template>
</el-table-column>
<el-table-column label="评分上限" prop="maxScore" width="90" />
<el-table-column label="考核人数" width="90">
<template #default="{ row }">
{{ row.checkEmployees?.length || 0 }}
</template>
</el-table-column>
<el-table-column label="操作" class-name="fixed-width" width="120">
<template #default="{ row }">
<el-button
link
type="primary"
@click="openForm('update', row)"
v-hasPermi="['kpi:appraise:update']"
>
修改
</el-button>
<el-button
link
type="danger"
@click="handleDelete(row.id)"
v-hasPermi="['kpi:appraise:remove']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-model:limit="searchForm.pageSize"
v-model:page="searchForm.pageNo"
:total="total"
@pagination="getList"
/>
<DialogAppraise ref="formRef" @success="handleQuery" />
</div>
</template>
<script setup name="KpiContent">
import DialogAppraise from './Components/DialogAppraise.vue'
const message = useMessage() //
const loading = ref(false) //
const list = ref() //
const searchForm = ref({
name: undefined,
pageNo: 1,
pageSize: 20
})
const total = ref(0)
/** 初始化 **/
onMounted(() => {
handleQuery()
})
const getList = async (info) => {
loading.value = true
try {
const data = [
{
name: '纳税申报',
rate: 35,
kaoheneirong:
'<p>1、每个月13号之前在柠檬云财税把上个月的财务数据录入系统出具财务报表;</p><p>2、社保和公积金及时增减人员,做好核定工作,及时申报缴纳;</p><p>3、按照税务局规定时间把自己所负责的公司增指税、附加税、所得税以及其他税种申报完成</p>',
kaoheguize: `当天处理完今日线索,连续2天未处理完,一次扣2分,最多扣5分`,
maxScore: 5,
checkEmployees: [1, 3, 4]
}
]
if (info) {
data.push(info)
}
list.value = data
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = (info) => {
searchForm.value.pageNo = 1
getList(info)
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type, row) => {
formRef.value.open(type, row)
}
/** 删除按钮操作 */
const handleDelete = async (id) => {
try {
//
await message.delConfirm()
//
await DeptApi.deleteDept(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,205 @@
<template>
<div>
<!-- 搜索工作栏 -->
<el-form :model="searchForm" inline label-width="0">
<el-form-item>
<el-date-picker
v-model="searchForm.peroid"
type="month"
format="YYYY-MM"
value-format="YYYY-MM"
:clearable="false"
style="width: 100%"
/>
</el-form-item>
<el-form-item>
<el-button @click="getList" v-hasPermi="['kpi:score:search']"> 搜索</el-button>
</el-form-item>
</el-form>
<el-tabs v-model="searchForm.employeeId" @tab-click="getList">
<el-tab-pane
v-for="item in employeeOptions"
:key="item.id"
:label="item.name"
:name="item.id"
>
<div class="mb-10px">
<el-tag v-if="peroidSaved" type="danger"> 当前周期已封存不可修改当月绩效考核 </el-tag>
<el-tag v-else type="warning">
当前周期未封存可选择修改当月绩效考核两秒内不操作将自动保存考核结果
</el-tag>
</div>
<el-table
v-loading="loading"
:data="list"
border
show-summary
:summary-method="getSummaries"
>
<el-table-column prop="name" label="考核指标" width="180" />
<el-table-column prop="rate" label="权重%" width="90" />
<el-table-column label="考核内容">
<template #default="{ row }">
<div v-dompurify-html="row.kaoheneirong"></div>
</template>
</el-table-column>
<el-table-column label="考核规则" prop="kaoheguize">
<template #default="{ row }">
<div v-dompurify-html="row.kaoheguize"></div>
</template>
</el-table-column>
<el-table-column label="评分上限" prop="maxScore" width="90" />
<el-table-column label="考核评分" width="120">
<template #default="{ row }">
<div v-if="peroidSaved">{{ row.score }}</div>
<el-input-number
v-else
v-model="row.score"
:min="0"
:max="row.maxScore"
:step="1"
:controls="false"
size="small"
style="width: 100%"
@input="handleSave(row)"
/>
</template>
</el-table-column>
<el-table-column label="评分备注" width="200">
<template #default="{ row }">
<div v-if="peroidSaved">{{ row.remark }}</div>
<el-input
v-else
v-model="row.remark"
type="textarea"
:rows="3"
size="small"
style="width: 100%"
@input="handleSave(row)"
/>
</template>
</el-table-column>
<el-table-column label="加权得分" prop="jiaquandefen" width="90" />
</el-table>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup name="KpiScore">
import { formatDate } from '@/utils/formatTime'
const message = useMessage() //
const loading = ref(false) //
const list = ref() //
const searchForm = ref({
peroid: undefined,
employeeId: undefined
})
const peroidSaved = ref(true)
const employeeOptions = ref([
{ id: 1, name: '武大郎' },
{ id: 2, name: '李二郎' },
{ id: 3, name: '拼命三郎' },
{ id: 4, name: '杨四郎' }
// { id: 11, name: '' },
// { id: 21, name: '' },
// { id: 31, name: '' },
// { id: 41, name: '' },
// { id: 12, name: '' },
// { id: 22, name: '' },
// { id: 32, name: '' },
// { id: 42, name: '' },
// { id: 13, name: '' },
// { id: 23, name: '' },
// { id: 33, name: '' },
// { id: 43, name: '' }
])
onMounted(() => {
//
const today = new Date()
searchForm.value.peroid = formatDate(
new Date(today.getFullYear(), today.getMonth() - 1),
'YYYY-MM'
)
if (employeeOptions.value.length > 0) {
searchForm.value.employeeId = employeeOptions.value[0].id
}
getList()
})
async function getList() {
if (!searchForm.value.employeeId) {
message.error('当月无待考核员工!!!')
return
}
loading.value = true
try {
const data = [
{
name: '纳税申报',
rate: 40,
kaoheneirong:
'<p>1、每个月13号之前在柠檬云财税把上个月的财务数据录入系统出具财务报表;</p><p>2、社保和公积金及时增减人员,做好核定工作,及时申报缴纳;</p><p>3、按照税务局规定时间把自己所负责的公司增指税、附加税、所得税以及其他税种申报完成</p>',
kaoheguize: `当天处理完今日线索,连续2天未处理完,一次扣2分,最多扣5分`,
maxScore: 20,
score: 10,
checkEmployees: [1, 3, 4],
jiaquandefen: 4
},
{
name: '数据统计',
rate: 20,
kaoheneirong:
'<p>1、每个月13号之前在柠檬云财税把上个月的财务数据录入系统出具财务报表;</p><p>2、社保和公积金及时增减人员,做好核定工作,及时申报缴纳;</p><p>3、按照税务局规定时间把自己所负责的公司增指税、附加税、所得税以及其他税种申报完成</p>',
kaoheguize: `当天处理完今日线索,连续2天未处理完,一次扣2分,最多扣5分`,
maxScore: 10,
score: 8,
checkEmployees: [1, 3, 4],
jiaquandefen: 1.6
}
]
list.value = data
peroidSaved.value = !peroidSaved.value
} finally {
loading.value = false
}
}
let timer = ref(null)
function handleSave() {
clearTimeout(timer.value)
timer.value = setTimeout(() => {
message.success('正在保存数据,请稍后')
}, 2000)
}
function getSummaries({ columns, data }) {
let sums = []
columns.forEach((column, index) => {
if (index == 0) {
sums[index] = '考核总分'
return
}
const values = data.map((item) => Number(item[column.property]))
if (!values.every((value) => Number.isNaN(value))) {
if (column.property == 'jiaquandefen') {
sums[index] = 5.6
} else {
sums[index] = ''
}
} else {
sums[index] = ''
}
})
return sums
}
</script>
<style lang="scss" scoped></style>

@ -143,12 +143,34 @@
<el-input v-model="formData.dingUserId" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="微信号" prop="wxAlias">
<el-input v-model="formData.wxAlias" placeholder="请输入微信号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="绩效考核人" prop="jixiaokaoheren">
<el-select
v-model="formData.jixiaokaoheren"
placeholder="选择绩效考核人"
clearable
filterable
multiple
collapse-tags
>
<el-option
v-for="item in employeeOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="备注">
@ -194,6 +216,7 @@ const formRules = ref({
const formRef = ref() // Ref
const attendanceSettingIdOptions = ref([])
const instanceIdsOptions = ref([])
const employeeOptions = ref([])
/** 打开弹窗 */
const open = async (type, id) => {
@ -221,6 +244,9 @@ function getOptions() {
getPlanSimpleList().then((data) => {
attendanceSettingIdOptions.value = data
})
EmployeeApi.getEmployeeSimpleList({ status: 0 }).then((data) => {
employeeOptions.value = data
})
}
/** 提交表单 */

@ -36,6 +36,7 @@
<el-table-column label="微信号" prop="wxAlias" min-width="120" />
<el-table-column label="钉钉号" prop="dingUserId" min-width="120" />
<el-table-column label="考勤方案" prop="attendanceSettingName" width="100" />
<el-table-column label="绩效考核人" prop="" width="120" />
<el-table-column label="已开通系统" prop="instanceName" min-width="120" />
<el-table-column label="在职状态" key="status" width="150">
<template #default="scope">

Loading…
Cancel
Save