|
@@ -23,10 +23,12 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
- getBonusApprovePage
|
|
|
|
|
|
+ getBonusApprovePage,
|
|
|
|
+ getAllocationEmployeeCategory
|
|
} from '@/api/bonus'
|
|
} from '@/api/bonus'
|
|
import ApproveDetails from './approveDetails.vue'
|
|
import ApproveDetails from './approveDetails.vue'
|
|
import { STATUS_LIST } from '../utils'
|
|
import { STATUS_LIST } from '../utils'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: 'bonusAllocationApprove',
|
|
name: 'bonusAllocationApprove',
|
|
components: {
|
|
components: {
|
|
@@ -52,7 +54,8 @@ export default {
|
|
current: 1,
|
|
current: 1,
|
|
size: 10
|
|
size: 10
|
|
},
|
|
},
|
|
- searchValues: {}
|
|
|
|
|
|
+ searchValues: {},
|
|
|
|
+ employeeCategoryItems: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -68,22 +71,26 @@ export default {
|
|
type: 'month',
|
|
type: 'month',
|
|
valueFormat: 'yyyy-MM',
|
|
valueFormat: 'yyyy-MM',
|
|
format: 'yyyy 年 MM 月'
|
|
format: 'yyyy 年 MM 月'
|
|
|
|
+ },
|
|
|
|
+ handles: {
|
|
|
|
+ change: this.getEmployeeCategoryItems
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- {
|
|
|
|
- label: '发起机构',
|
|
|
|
- prop: 'organizationName',
|
|
|
|
- type: 'input',
|
|
|
|
- options: {
|
|
|
|
- placeholder: '请输入发起机构'
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // label: '发起机构',
|
|
|
|
+ // prop: 'organizationName',
|
|
|
|
+ // type: 'input',
|
|
|
|
+ // options: {
|
|
|
|
+ // placeholder: '请输入发起机构'
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
{
|
|
{
|
|
label: '员工类型',
|
|
label: '员工类型',
|
|
prop: 'employeeCategory',
|
|
prop: 'employeeCategory',
|
|
- type: 'input',
|
|
|
|
|
|
+ type: 'select',
|
|
options: {
|
|
options: {
|
|
- placeholder: '请输入员工类型'
|
|
|
|
|
|
+ placeholder: '请输入员工类型',
|
|
|
|
+ items: this.employeeCategoryItems
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
]
|
|
@@ -111,6 +118,28 @@ export default {
|
|
this.pageInfo.current = page
|
|
this.pageInfo.current = page
|
|
this.onInit()
|
|
this.onInit()
|
|
},
|
|
},
|
|
|
|
+ async getEmployeeCategoryItems () {
|
|
|
|
+ try {
|
|
|
|
+ const { data } = await getAllocationEmployeeCategory({
|
|
|
|
+ month: this.searchValues.month
|
|
|
|
+ })
|
|
|
|
+ this.employeeCategoryItems = data.map(e => {
|
|
|
|
+ return {
|
|
|
|
+ label: e,
|
|
|
|
+ value: e
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if (!data.length) {
|
|
|
|
+ this.searchValues.employeeCategory = null
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.searchValues.employeeCategory = this.employeeCategoryItems[0].value
|
|
|
|
+ return data
|
|
|
|
+ } catch (error) {
|
|
|
|
+ this.employeeCategoryItems = []
|
|
|
|
+ this.$message.error(error)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
onSearch () {
|
|
onSearch () {
|
|
this.pageInfo.current = 1
|
|
this.pageInfo.current = 1
|
|
this.onInit()
|
|
this.onInit()
|