|
@@ -1,120 +0,0 @@
|
|
|
-<template>
|
|
|
- <div>
|
|
|
- <m-search class="mb-3" :items="searchItems" :showResetBtn="false" v-model="searchValues" @search="onSearch"></m-search>
|
|
|
- <m-table
|
|
|
- v-loading="loading"
|
|
|
- :items="items"
|
|
|
- :headers="headers"
|
|
|
- >
|
|
|
- <template #parentOrganizationName="{ row }">
|
|
|
- {{ row.organization?.parentOrganizationName }}
|
|
|
- </template>
|
|
|
- <template #organizationName="{ row }">
|
|
|
- {{ row.organization?.organizationName }}
|
|
|
- </template>
|
|
|
- <template #organizationCategory="{ row }">
|
|
|
- {{ row.organization?.organizationCategory }}
|
|
|
- </template>
|
|
|
- <template #status="{ row }">
|
|
|
- {{ row.status !== 'null' && row.status !=='undefined' ? (row.status ? '已发放' : '发放中') : '' }}
|
|
|
- </template>
|
|
|
- <template #performanceSalaryManageEmployees="{ row }">
|
|
|
- {{ row.performanceSalaryManageEmployees && row.performanceSalaryManageEmployees?.length ? row.performanceSalaryManageEmployees.map(e => e.employeeName).join(',') : '' }}
|
|
|
- </template>
|
|
|
- </m-table>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import { dateFormat } from '@/utils/date'
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
-import { getPerformanceAllocationProgress } from '@/api/process'
|
|
|
-export default {
|
|
|
- name: 'ProcessNetwork',
|
|
|
- data () {
|
|
|
- return {
|
|
|
- searchValues: {
|
|
|
- month: dateFormat('YYYY-mm', new Date()),
|
|
|
- parentOrganizationNo: null
|
|
|
- },
|
|
|
- headers: [
|
|
|
- { label: '月份', prop: 'month' },
|
|
|
- { label: '上级机构', prop: 'parentOrganizationName' },
|
|
|
- { label: '机构名称', prop: 'organizationName' },
|
|
|
- { label: '机构类型', prop: 'organizationCategory' },
|
|
|
- { label: '负责人', prop: 'performanceSalaryManageEmployees' },
|
|
|
- { label: '绩效奖金处理状态', prop: 'status' }
|
|
|
- ],
|
|
|
- items: [],
|
|
|
- loading: false,
|
|
|
- defaultOrganization: null
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- ...mapGetters(['organizationTree']),
|
|
|
- organizationItems () {
|
|
|
- if (this.organizationTree.length > 0) {
|
|
|
- return this.organizationTree[0].child
|
|
|
- }
|
|
|
- return []
|
|
|
- },
|
|
|
- searchItems () {
|
|
|
- return [
|
|
|
- {
|
|
|
- label: '月份',
|
|
|
- prop: 'month',
|
|
|
- type: 'datePicker',
|
|
|
- options: {
|
|
|
- clearable: false,
|
|
|
- type: 'month',
|
|
|
- format: 'yyyy-MM',
|
|
|
- valueFormat: 'yyyy-MM',
|
|
|
- placeholder: '选择查询月份'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '上级机构',
|
|
|
- prop: 'parentOrganizationNo',
|
|
|
- type: 'select',
|
|
|
- options: {
|
|
|
- placeholder: '请选择上级机构',
|
|
|
- items: this.organizationItems,
|
|
|
- labelValue: 'organizationNo',
|
|
|
- clearable: false,
|
|
|
- labelText: 'organizationName'
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- mounted () {
|
|
|
- if (this.organizationTree.length > 0) {
|
|
|
- this.searchValues.parentOrganizationNo = this.organizationItems[0].organizationNo
|
|
|
- this.defaultOrganization = this.organizationItems[0].organizationNo
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- async onInit () {
|
|
|
- this.loading = true
|
|
|
- try {
|
|
|
- const { data } = await getPerformanceAllocationProgress(this.searchValues)
|
|
|
- this.items = data || []
|
|
|
- } catch (error) {
|
|
|
- this.$message.error(error)
|
|
|
- } finally {
|
|
|
- this.loading = false
|
|
|
- }
|
|
|
- },
|
|
|
- onSearch () {
|
|
|
- if (!this.searchValues.parentOrganizationNo) {
|
|
|
- this.searchValues.parentOrganizationNo = this.defaultOrganization
|
|
|
- }
|
|
|
- this.onInit()
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="scss" scoped>
|
|
|
- /* 自定义样式 */
|
|
|
-</style>
|