|
@@ -48,6 +48,7 @@ import {
|
|
getOrganizationTree
|
|
getOrganizationTree
|
|
} from '@/utils/dict'
|
|
} from '@/utils/dict'
|
|
import { STATUS_LIST } from '../utils'
|
|
import { STATUS_LIST } from '../utils'
|
|
|
|
+import { mapGetters } from 'vuex'
|
|
export default {
|
|
export default {
|
|
name: 'bonusAllocation',
|
|
name: 'bonusAllocation',
|
|
components: {
|
|
components: {
|
|
@@ -64,9 +65,7 @@ export default {
|
|
organizationNo: null,
|
|
organizationNo: null,
|
|
employeeCategory: null
|
|
employeeCategory: null
|
|
},
|
|
},
|
|
- query: {
|
|
|
|
- month: dateFormat('YYYY-mm', new Date())
|
|
|
|
- },
|
|
|
|
|
|
+ query: {},
|
|
employeeCategoryItems: [],
|
|
employeeCategoryItems: [],
|
|
totalGrantPerformanceSalary: 0,
|
|
totalGrantPerformanceSalary: 0,
|
|
deptItems: [],
|
|
deptItems: [],
|
|
@@ -74,6 +73,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
|
|
+ ...mapGetters(['employeeInfo']),
|
|
totalAllocationPerformanceSalary () {
|
|
totalAllocationPerformanceSalary () {
|
|
return Object.values(this.values).reduce((r, v) => {
|
|
return Object.values(this.values).reduce((r, v) => {
|
|
return new Decimal(r).plus(v || 0)
|
|
return new Decimal(r).plus(v || 0)
|
|
@@ -91,6 +91,9 @@ export default {
|
|
type: 'month',
|
|
type: 'month',
|
|
valueFormat: 'yyyy-MM',
|
|
valueFormat: 'yyyy-MM',
|
|
format: 'yyyy 年 MM 月'
|
|
format: 'yyyy 年 MM 月'
|
|
|
|
+ },
|
|
|
|
+ handles: {
|
|
|
|
+ change: this.getEmployeeCategoryItems
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -123,17 +126,12 @@ export default {
|
|
]
|
|
]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- watch: {
|
|
|
|
- 'searchValues.month': {
|
|
|
|
- handler (v) {
|
|
|
|
- this.getEmployeeCategoryItems()
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
async created () {
|
|
async created () {
|
|
this.loading = true
|
|
this.loading = true
|
|
this.onGetDept()
|
|
this.onGetDept()
|
|
await this.getEmployeeCategoryItems()
|
|
await this.getEmployeeCategoryItems()
|
|
|
|
+ this.searchValues.organizationNo = this.employeeInfo.organizationNo
|
|
|
|
+ this.query = { ...this.searchValues }
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.onInit()
|
|
this.onInit()
|
|
})
|
|
})
|
|
@@ -178,12 +176,13 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.searchValues.employeeCategory = this.employeeCategoryItems[0].value
|
|
this.searchValues.employeeCategory = this.employeeCategoryItems[0].value
|
|
|
|
+ return data
|
|
} catch (error) {
|
|
} catch (error) {
|
|
this.employeeCategoryItems = []
|
|
this.employeeCategoryItems = []
|
|
this.$message.error(error)
|
|
this.$message.error(error)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onSearch () {
|
|
|
|
|
|
+ async onSearch () {
|
|
this.query = { ...this.searchValues }
|
|
this.query = { ...this.searchValues }
|
|
this.onInit({ current: 1 })
|
|
this.onInit({ current: 1 })
|
|
},
|
|
},
|