|
@@ -7,8 +7,28 @@
|
|
|
<el-tag v-if="item.employeeCategory" class="mr-3">{{ item.employeeCategory }}</el-tag>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <m-button type="success" size="small" icon="el-icon-check" @click="onResolve">通过</m-button>
|
|
|
- <m-button type="danger" size="small" icon="el-icon-close">拒绝</m-button>
|
|
|
+ <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="primary" @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" :filter-header="filterHeader" shadow="never"></BonusTable>
|
|
@@ -17,6 +37,7 @@
|
|
|
|
|
|
<script>
|
|
|
import BonusTable from '../components/bonusTable.vue'
|
|
|
+import { STATUS_LIST } from '../utils'
|
|
|
import {
|
|
|
saveBonusApproveConfirmation
|
|
|
} from '@/api/bonus'
|
|
@@ -27,6 +48,9 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ statusList: STATUS_LIST,
|
|
|
+ visible: false,
|
|
|
+ rejectText: null,
|
|
|
item: {},
|
|
|
filterHeader: ['month', 'organizationName', 'employeeCategory', 'status', 'actions', 'assignablePerformanceSalary', 'version', 'dataType', 'createDate']
|
|
|
}
|
|
@@ -61,6 +85,29 @@ export default {
|
|
|
this.$message.error(error)
|
|
|
}
|
|
|
}).catch(_ => {})
|
|
|
+ },
|
|
|
+ onReject () {
|
|
|
+ if (!this.rejectText) {
|
|
|
+ this.$message.error('请输入拒绝原因')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$confirm('是否确定拒绝?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ try {
|
|
|
+ await saveBonusApproveConfirmation({
|
|
|
+ employeePerformanceConfirmationId: this.item.employeePerformanceConfirmationId,
|
|
|
+ status: 2
|
|
|
+ })
|
|
|
+ this.$message.success('已成功拒绝')
|
|
|
+ this.$refs.dialog.close()
|
|
|
+ this.$emit('onRefresh')
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error(error)
|
|
|
+ }
|
|
|
+ }).catch(_ => {})
|
|
|
}
|
|
|
}
|
|
|
}
|