|
@@ -1,152 +0,0 @@
|
|
|
-<template>
|
|
|
- <m-dialog ref="dialog" title="审核详情" v-bind="$attrs" hideFooter>
|
|
|
- <el-form label-width="120px">
|
|
|
- <el-form-item label="审核状态">
|
|
|
- <div :class="{ 'd-flex': item.status === 0 }" class="justify-between align-center fullHeight">
|
|
|
- <el-tag :type="statusList[item.status]?.type ?? 'info'">{{ statusList[item.status]?.label ?? '未知状态' }}</el-tag>
|
|
|
- <div v-if="item.status === 0">
|
|
|
- <m-button type="success" size="small" icon="el-icon-check" class="mr-3" @click="onResolve">通过</m-button>
|
|
|
- <el-popover
|
|
|
- placement="bottom"
|
|
|
- v-model="visible"
|
|
|
- width="300"
|
|
|
- trigger="click"
|
|
|
- >
|
|
|
- <el-input v-model="rejectText" type="textarea" :rows="3" placeholder="请输入拒绝原因"></el-input>
|
|
|
- <div class="pt-3 text-right">
|
|
|
- <m-button size="mini" @click="visible = false">取消</m-button>
|
|
|
- <m-button size="mini" type="orange" @click="onReject">提交</m-button>
|
|
|
- </div>
|
|
|
- <template #reference>
|
|
|
- <m-button type="danger" size="small" icon="el-icon-close">拒绝</m-button>
|
|
|
- </template>
|
|
|
- </el-popover>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="拒绝理由" v-if="item.status === 2">
|
|
|
- {{ item.authMsg }}
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="基本信息">
|
|
|
- <el-descriptions class="margin-top" :column="3" direction="vertical" border>
|
|
|
- <el-descriptions-item label="月份">
|
|
|
- <el-tag class="mr-3">{{ item.month || '无' }}</el-tag>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="发起机构">
|
|
|
- <el-tag class="mr-3">{{ item.opOrganizationName || '无' }}</el-tag>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="员工类型">
|
|
|
- <el-tag class="mr-3">{{ item.employeeCategory || '无' }}</el-tag>
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="分配明细">
|
|
|
- <BonusTable ref="bonusTableRefs" clearHeader :filter-header="filterHeader" :show-summary="true" shadow="never"></BonusTable>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <!-- <div>
|
|
|
- <template v-if="item.status !== 0">
|
|
|
- <el-tag :type="statusList[item.status]?.type ?? 'info'">{{ statusList[item.status]?.label ?? '未知状态' }}</el-tag>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <m-button type="success" size="small" icon="el-icon-check" class="mr-3" @click="onResolve">通过</m-button>
|
|
|
- <el-popover
|
|
|
- placement="bottom"
|
|
|
- v-model="visible"
|
|
|
- width="300"
|
|
|
- trigger="click"
|
|
|
- >
|
|
|
- <el-input v-model="rejectText" type="textarea" :rows="3" placeholder="请输入拒绝原因"></el-input>
|
|
|
- <div class="pt-3 text-right">
|
|
|
- <m-button size="mini" @click="visible = false">取消</m-button>
|
|
|
- <m-button size="mini" type="orange" @click="onReject">提交</m-button>
|
|
|
- </div>
|
|
|
- <template #reference>
|
|
|
- <m-button type="danger" size="small" icon="el-icon-close">拒绝</m-button>
|
|
|
- </template>
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
-
|
|
|
- </div> -->
|
|
|
- <!-- </div> -->
|
|
|
- <!-- <BonusTable ref="bonusTableRefs" clearHeader :filter-header="filterHeader" :show-summary="true" shadow="never"></BonusTable> -->
|
|
|
- </m-dialog>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import BonusTable from '../components/bonusTable.vue'
|
|
|
-import { STATUS_LIST } from '../utils'
|
|
|
-import {
|
|
|
- saveBonusApproveConfirmation
|
|
|
-} from '@/api/bonus'
|
|
|
-export default {
|
|
|
- name: 'approveDetails',
|
|
|
- components: {
|
|
|
- BonusTable
|
|
|
- },
|
|
|
- data () {
|
|
|
- return {
|
|
|
- statusList: STATUS_LIST,
|
|
|
- visible: false,
|
|
|
- rejectText: null,
|
|
|
- item: {},
|
|
|
- filterHeader: ['month', 'organizationName', 'employeeCategory', 'status', 'actions', 'assignablePerformanceSalary', 'version', 'dataType', 'createDate']
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- open (item) {
|
|
|
- this.item = item
|
|
|
- this.$refs.dialog.open()
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.bonusTableRefs.onInit({
|
|
|
- month: item.month,
|
|
|
- organizationNo: item.opOrganizationNo,
|
|
|
- employeeCategory: item.employeeCategory,
|
|
|
- employeePerformanceIds: item.employeePerformanceIds
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- onResolve () {
|
|
|
- this.$confirm('是否确定通过?', '提示').then(async () => {
|
|
|
- try {
|
|
|
- await saveBonusApproveConfirmation({
|
|
|
- employeePerformanceConfirmationId: this.item.employeePerformanceConfirmationId,
|
|
|
- status: 1
|
|
|
- })
|
|
|
- this.$message.success('审核通过')
|
|
|
- this.$refs.dialog.close()
|
|
|
- this.$emit('onRefresh')
|
|
|
- } catch (error) {
|
|
|
- this.$message.error(error)
|
|
|
- }
|
|
|
- }).catch(_ => {})
|
|
|
- },
|
|
|
- onReject () {
|
|
|
- if (!this.rejectText) {
|
|
|
- this.$message.error('请输入拒绝原因')
|
|
|
- return
|
|
|
- }
|
|
|
- this.$confirm('是否确定拒绝?', '提示').then(async () => {
|
|
|
- try {
|
|
|
- await saveBonusApproveConfirmation({
|
|
|
- employeePerformanceConfirmationId: this.item.employeePerformanceConfirmationId,
|
|
|
- status: 2,
|
|
|
- authMsg: this.rejectText
|
|
|
- })
|
|
|
- this.$message.success('已成功拒绝')
|
|
|
- this.$refs.dialog.close()
|
|
|
- this.$emit('onRefresh')
|
|
|
- } catch (error) {
|
|
|
- this.$message.error(error)
|
|
|
- }
|
|
|
- }).catch(_ => {})
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="scss" scoped>
|
|
|
-.fullHeight {
|
|
|
- height: 100%;
|
|
|
-}
|
|
|
-</style>
|