|
@@ -1,111 +0,0 @@
|
|
|
-<template>
|
|
|
- <div>
|
|
|
- <m-search class="mb-3" v-model="searchValues" :items="searchItems" @search="onSearch"></m-search>
|
|
|
- <m-table
|
|
|
- v-loading="loading"
|
|
|
- :headers="headers"
|
|
|
- :items="items"
|
|
|
- :page-size="pageInfo.size"
|
|
|
- :total="total"
|
|
|
- :page-current="pageInfo.current"
|
|
|
- @page-change="onPageChange"
|
|
|
- ></m-table>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import {
|
|
|
- getSalaryPayrollPage
|
|
|
-} from '@/api/panorama'
|
|
|
-import {
|
|
|
- PAYROLL_HEADER
|
|
|
-} from '@/utils/panorama'
|
|
|
-export default {
|
|
|
- name: 'panorama-salary-payroll',
|
|
|
- data () {
|
|
|
- return {
|
|
|
- pageInfo: {
|
|
|
- current: 1,
|
|
|
- size: 10
|
|
|
- },
|
|
|
- total: 0,
|
|
|
- query: {
|
|
|
- organizationNo: this.$route.query.organizationNo
|
|
|
- },
|
|
|
- headers: PAYROLL_HEADER,
|
|
|
- items: [],
|
|
|
- searchValues: {
|
|
|
- employeeName: null,
|
|
|
- month: null
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- created () {
|
|
|
- const query = this.$route.query
|
|
|
- if (query.employeeNo) {
|
|
|
- Object.assign(this.query, {
|
|
|
- unifiedCertificationNumber: query.employeeNo
|
|
|
- })
|
|
|
- }
|
|
|
- this.onInit()
|
|
|
- },
|
|
|
- computed: {
|
|
|
- searchItems () {
|
|
|
- return [
|
|
|
- {
|
|
|
- label: '姓名',
|
|
|
- prop: 'employeeName',
|
|
|
- type: 'input',
|
|
|
- hidden: this.$route.query.employeeNo,
|
|
|
- options: {
|
|
|
- placeholder: '请输入姓名'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '月份',
|
|
|
- prop: 'month',
|
|
|
- type: 'datePicker',
|
|
|
- options: {
|
|
|
- type: 'month',
|
|
|
- format: 'yyyy-MM',
|
|
|
- valueFormat: 'yyyy-MM',
|
|
|
- placeholder: '请选择更新月份'
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- async onInit () {
|
|
|
- this.loading = true
|
|
|
- try {
|
|
|
- const { data } = await getSalaryPayrollPage({
|
|
|
- page: {
|
|
|
- ...this.pageInfo
|
|
|
- },
|
|
|
- ...this.query,
|
|
|
- ...this.searchValues
|
|
|
- })
|
|
|
- this.items = data.records
|
|
|
- this.total = data.total
|
|
|
- } catch (error) {
|
|
|
- this.$message.error(error.message)
|
|
|
- } finally {
|
|
|
- this.loading = false
|
|
|
- }
|
|
|
- },
|
|
|
- onSearch () {
|
|
|
- this.pageInfo.current = 1
|
|
|
- this.onInit()
|
|
|
- },
|
|
|
- onPageChange (index) {
|
|
|
- this.pageInfo.current = index
|
|
|
- this.onInit()
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="scss" scoped>
|
|
|
-
|
|
|
-</style>
|