zhengnaiwen_citu před 4 měsíci
rodič
revize
ff2cb8bb32

+ 5 - 5
src/api/bonus.js

@@ -15,9 +15,9 @@ export function getAllocationEmployeeCategory (data) {
   return http.post('/employee/performance/category/dict', data)
 }
 
-// 业绩分配 检查审核状态
+// 业绩分配 检查提交状态
 export function checkAllocationSubmitStatus (data) {
-  return http.post('/employee/performance/confirmation/check/submit', data)
+  return http.post('/employee/performance/status', data)
 }
 
 // 业绩分配 绩效分配统计
@@ -30,9 +30,9 @@ export function saveAllocation (data) {
   return http.post('/employee/performance/submit/grant', data)
 }
 
-// 业绩分配 获取可分配机构类型
-export function getAllocationOrganizationCategory () {
-  return http.post('/performance/salary/manage/current/employee/organization/category')
+// 业绩分配 获取可分配机构
+export function getAllocationOrganizationList () {
+  return http.post('/performance/salary/manage/current/employee/organization')
 }
 
 // 奖金审核 列表

+ 3 - 3
src/components/ParamsSetting/index.vue

@@ -52,9 +52,9 @@ export default {
       loading: false
     }
   },
-  created () {
-    this.onInit()
-  },
+  // created () {
+  //   this.onInit()
+  // },
   methods: {
     async onInit () {
       this.loading = true

+ 15 - 0
src/utils/dict.js

@@ -30,3 +30,18 @@ export const EMPLOYEE_STATUS = [
   { text: '借调', color: 'warning', value: 3 },
   { text: '病休', color: 'info', value: 4 }
 ]
+
+export const BONUS_ALLOCATION_STATUS = {
+  0: {
+    text: '未分配',
+    color: 'warning'
+  },
+  1: {
+    text: '已分配',
+    color: 'success'
+  },
+  2: {
+    text: '已确认',
+    color: 'info'
+  }
+}

+ 127 - 44
src/views/bonus/allocation/index.vue

@@ -1,8 +1,17 @@
 <template>
   <div class="white pa-3">
     <m-search :items="searchItems" v-model="searchValues" class="mb-3" @search="onSearch"></m-search>
-    <BonusTable v-loading="loading" ref="bonusTableRefs" :filter-header="auditStatus !== 0 && auditStatus !== 1 ? [] : ['actions']">
-      <template #card-tools="{ items }">
+    <m-table
+      :items="items"
+      :headers="headers"
+      v-loading="loading"
+      :total="total"
+      :page-size="pageInfo.size"
+      :page-current="pageInfo.current"
+      max-height="600px"
+      @page-change="onPageChange"
+    >
+      <template #card-tools>
         <div class="content">
           <div>
             <!-- 绩效合计:<el-tag>{{ totalAllocationPerformanceSalary }}</el-tag> -->
@@ -11,55 +20,71 @@
               class="ml-3"
               type="orange"
               :loading="auditStatusLoading"
-              v-show="auditStatus !== 0 && auditStatus !== 1 && items.length"
+              v-show="!auditStatus && items.length"
               @click="onSave">
               确认分配
             </m-button>
           </div>
         </div>
       </template>
-      <template #actions="{ row, items }">
-        <el-input v-show="auditStatus !== 0 && auditStatus !== 1 && items.length" v-model="values[row.employeePerformanceId]" placeholder="请输入绩效" size="small"></el-input>
+      <template #actions="{ row }">
+        <el-input v-show="!auditStatus && items.length" v-model="values[row.employeePerformanceId]" placeholder="请输入绩效" size="small"></el-input>
       </template>
       <template #actions-header>
         合计:<el-tag>{{ totalAllocationPerformanceSalary }}</el-tag>
       </template>
-    </BonusTable>
+      <template #status="{ row }">
+        <el-tag :type="BONUS_ALLOCATION_STATUS[row.status].color">{{ BONUS_ALLOCATION_STATUS[row.status].text }}</el-tag>
+      </template>
+      <template #branchStatus="{ row }">
+        <el-tag :type="BONUS_ALLOCATION_STATUS[row.branchStatus].color">{{ BONUS_ALLOCATION_STATUS[row.branchStatus].text }}</el-tag>
+      </template>
+      <template #dataType="{row}">
+        {{ row.dataType === 1 ? '手工数据' : '系统数据' }}
+      </template>
+    </m-table>
   </div>
 </template>
 
 <script>
-import BonusTable from '../components/bonusTable.vue'
 import { dateFormat } from '@/utils/date'
 import Decimal from 'decimal.js'
 import {
-  // getAllocationPage,
   saveAllocationGrant,
-  // getAllocationEmployeeCategory,
-  getAllocationOrganizationCategory,
+  getAllocationOrganizationList,
   checkAllocationSubmitStatus,
+  getAllocationPage,
   getAllocationStatistics,
   saveAllocation
 } from '@/api/bonus'
+import {
+  BONUS_ALLOCATION_STATUS
+} from '@/utils/dict'
 import { mapGetters } from 'vuex'
 export default {
   name: 'bonusAllocation',
-  components: {
-    BonusTable
-  },
   data () {
     return {
-      auditStatus: null,
+      BONUS_ALLOCATION_STATUS,
+      auditStatus: false,
       auditStatusLoading: false,
       values: {},
       searchValues: {
         month: dateFormat('YYYY-mm', new Date()),
-        organizationCategory: null
+        organizationNo: null
       },
       query: {},
       organizationCategoryItems: [],
       totalGrantPerformanceSalary: 0,
-      loading: false
+      loading: false,
+      items: [],
+      total: 0,
+      pageInfo: {
+        current: 1,
+        size: 50
+      },
+      orders: [],
+      checkBranch: false // 区分分配机构类型
     }
   },
   computed: {
@@ -82,21 +107,46 @@ export default {
             valueFormat: 'yyyy-MM',
             format: 'yyyy 年 MM 月'
           }
-          // handles: {
-          //   change: this.getEmployeeCategoryItems
-          // }
         },
         {
-          label: '分配类型',
-          prop: 'organizationCategory',
+          label: '分配机构',
+          prop: 'organizationNo',
           type: 'select',
           options: {
             clearable: false,
             placeholder: '请选择机构类型',
-            items: this.organizationCategoryItems
+            items: this.organizationCategoryItems,
+            labelValue: 'organizationNo',
+            labelText: 'organizationName'
           }
+          // handles: {
+          //   change: (v) => {
+          //     this.checkBranch = this.organizationCategoryItems.find(e => e.organizationNo === v).checkBranch
+          //   }
+          // }
         }
       ]
+    },
+    headers () {
+      const headers = [
+        { label: '月份', prop: 'month' },
+        { label: '机构名称', prop: 'organizationName', width: 150 },
+        { label: '员工姓名', prop: 'employeeName', width: 80, align: 'center' },
+        { label: '分配状态', prop: this.checkBranch ? 'branchStatus' : 'status', align: 'center', width: 100 },
+        { label: '员工岗位', prop: 'employeeCategory', align: 'center' },
+        { label: '可分配绩效薪资', prop: 'assignablePerformanceSalary', align: 'center', width: 150 },
+        { label: '直属机构分配绩效薪资', prop: 'allocationPerformanceSalary', align: 'center', width: 160 },
+        { label: '支行分配绩效薪资', prop: 'branchAllocationPerformanceSalary', align: 'center', width: 150 },
+        { label: '基础绩效薪资', prop: 'basicPerformanceSalary', align: 'center', width: 120 },
+        { label: '总绩效薪资', prop: 'performanceSalary', align: 'center', minWidth: 120 },
+        { label: '数据来源', prop: 'dataType', align: 'center' },
+        { label: '数据版本', prop: 'version', width: 160 },
+        { label: '创建时间', prop: 'createDate', width: 160 }
+      ]
+      if (this.items.length && !this.auditStatus) {
+        headers.push({ label: '操作', prop: 'actions', width: 160, fixed: 'right' })
+      }
+      return headers
     }
   },
   async mounted () {
@@ -106,21 +156,14 @@ export default {
       return
     }
     this.query = { ...this.searchValues }
-    this.$nextTick(() => {
-      this.$refs.bonusTableRefs && this.onInit()
-    })
+    this.onInit()
   },
   methods: {
-    async onInit (pageInfo) {
+    async onInit () {
       this.loading = true
       await this.onCheckStatus()
       await this.onStatistics()
-      if (!this.$refs.bonusTableRefs) {
-        this.loading = false
-        return
-      }
-      const data = await this.$refs.bonusTableRefs.onInit(this.query, pageInfo)
-      this.loading = false
+      const data = await this.getPage()
       if (!data) {
         return
       }
@@ -129,18 +172,42 @@ export default {
         return res
       }, {})
     },
-    async getOrganizationCategoryItems () {
+    async getPage () {
       this.loading = true
+      const { organizationNo, ...query } = this.query
       try {
-        const { data } = await getAllocationOrganizationCategory()
-        this.organizationCategoryItems = data.map(e => {
-          return {
-            value: e,
-            label: e
-          }
+        const { data } = await getAllocationPage({
+          page: {
+            ...this.pageInfo,
+            orders: this.orders
+          },
+          entity: {
+            ...query
+          },
+          organizationNo
         })
-        if (this.organizationCategoryItems.length > 0) {
-          this.searchValues.organizationCategory = this.organizationCategoryItems[0].value
+        this.items = data.records
+        this.total = data.total
+        this.checkBranch = this.organizationCategoryItems.find(e => e.organizationNo === organizationNo).checkBranch
+        return data
+      } catch (error) {
+        this.$message.error(error)
+      } finally {
+        this.loading = false
+      }
+    },
+    onPageChange (index) {
+      this.pageInfo.current = index
+      this.getPage()
+    },
+    async getOrganizationCategoryItems () {
+      this.loading = true
+      try {
+        const { data } = await getAllocationOrganizationList()
+        this.organizationCategoryItems = data
+        if (data.length > 0) {
+          this.searchValues.organizationNo = this.organizationCategoryItems[0].organizationNo
+          this.checkBranch = this.organizationCategoryItems[0].checkBranch
         }
       } catch (error) {
         this.organizationCategoryItems = []
@@ -153,8 +220,12 @@ export default {
       if (!this.organizationCategoryItems.length) {
         return
       }
+      if (!this.searchValues.organizationNo) {
+        this.searchValues.organizationNo = this.organizationCategoryItems[0].organizationNo
+      }
       this.query = { ...this.searchValues }
-      this.onInit({ current: 1 })
+      this.pageInfo.current = 1
+      this.onInit()
     },
     // 领导分配绩效薪资
     onSave () {
@@ -163,6 +234,16 @@ export default {
         h('p', undefined, `提交月份:${this.query.month}`)
       ]
       try {
+        if (this.totalGrantPerformanceSalary !== this.totalAllocationPerformanceSalary) {
+          const el = h('div', [
+            h('p', undefined, '当前非完全配额,是否强制提交?'),
+            ..._el
+          ])
+          this.$confirm(el, '提示').then(() => {
+            this.onSaveAll(true)
+          }).catch(_ => {})
+          return
+        }
         const el = h('div', [
           h('p', undefined, '确定提交所有数据?'),
           ..._el
@@ -208,8 +289,10 @@ export default {
     async onCheckStatus () {
       this.auditStatusLoading = true
       try {
-        const { data } = await checkAllocationSubmitStatus(this.query)
-        this.auditStatus = data?.status ?? null
+        const { data } = await checkAllocationSubmitStatus({
+          ...this.query
+        })
+        this.auditStatus = data
       } catch (error) {
         this.$message.error(error)
       } finally {

+ 105 - 0
src/views/bonus/process/index.vue

@@ -0,0 +1,105 @@
+<template>
+  <div class="pa-3 white">
+    <m-search class="mb-3" :items="searchItems" v-model="searchValues" @search="onSearch"></m-search>
+    <m-table
+      v-loading="loading"
+      :items="items"
+      :headers="headers"
+      :page-size="pageInfo.size"
+      :page-current="pageInfo.current"
+      :total="total"
+      @page-change="onPageChange"
+    >
+      <template #card-tools>
+        <m-button type="orange" icon="el-icon-plus" @click="onAdd">新增</m-button>
+      </template>
+      <template #actions="{ row }">
+        <m-button type="primary" text @click="onEdit(row)">编辑</m-button>
+        <m-button type="danger" text @click="onDelete(row)">删除</m-button>
+      </template>
+    </m-table>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'template',
+  data () {
+    return {
+      searchItems: [
+        {
+          label: '名称',
+          prop: 'name',
+          type: 'input',
+          options: {
+            placeholder: '请输入名称'
+          }
+        }
+      ],
+      searchValues: {
+        name: null
+      },
+      headers: [
+        { label: '名称', prop: 'name' },
+        { label: '状态', prop: 'status' },
+        { label: '操作', prop: 'actions', fixed: 'right', width: 300 }
+      ],
+      items: [],
+      total: 0,
+      pageInfo: {
+        current: 1,
+        size: 10
+      },
+      loading: false
+    }
+  },
+  created () {
+    this.onInit()
+  },
+  methods: {
+    async onInit () {
+      this.loading = true
+      try {
+        // const { data } = await ApiName()
+        // this.items = data.records
+        // this.total = data.total
+      } catch (error) {
+        this.$message.error(error)
+      } finally {
+        this.loading = false
+      }
+    },
+    onAdd () {
+      this.$refs.templateRefs.open()
+    },
+    onEdit (item) {
+      this.$refs.templateRefs.open(item)
+    },
+    onDelete (row) {
+      this.$confirm('确定删除吗?', '提示')
+        .then(async () => {
+          try {
+            // await ApiName({ id: row.id })
+            this.$message.success('删除成功')
+            this.onInit()
+          } catch (error) {
+            this.$message.error(error)
+          }
+        })
+        .catch(_ => {})
+    },
+    onSearch () {
+      this.pageInfo.current = 1
+      this.onInit()
+    },
+    onPageChange (index) {
+      this.pageInfo.current = index
+      this.onInit()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  /* 自定义样式 */
+</style>

+ 31 - 0
src/views/bonus/setting/authority/index.vue

@@ -0,0 +1,31 @@
+<template>
+  <div>
+    <ParamsSetting ref="paramsSettingRefs" :card-title="cardTitle"></ParamsSetting>
+  </div>
+</template>
+
+<script>
+import ParamsSetting from '@/components/ParamsSetting'
+export default {
+  name: 'bonusSettingAuthority',
+  components: {
+    ParamsSetting
+  },
+  data () {
+    return {
+      cardTitle: null
+    }
+  },
+  methods: {
+    onInit (title) {
+      this.cardTitle = title
+      this.$refs.paramsSettingRefs.onInit()
+    }
+
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 52 - 5
src/views/bonus/setting/index.vue

@@ -1,19 +1,66 @@
 <template>
   <div class="pa-3 white">
-    <ParamsSetting></ParamsSetting>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane
+        v-for="item in items"
+        :key="item.name"
+        :label="item.label"
+        :name="item.name"
+      >
+        <component :is="item.component" :ref="item.name" :label="item.label" @hook:mounted="onComponentMounted"></component>
+      </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
 
 <script>
-import ParamsSetting from '@/components/ParamsSetting'
 export default {
   name: 'bonusSetting',
-  components: {
-    ParamsSetting
+  data () {
+    return {
+      activeName: '',
+      items: []
+    }
+  },
+  created () {
+    console.log(this.$route.meta.roles)
+    this.items = this.$route.meta.roles.filter(e => e.hidden === 1).sort((a, b) => a.sort - b.sort).map(e => {
+      return {
+        name: e.name,
+        label: e.label,
+        component: () => import(`./${e.component}/index.vue`)
+      }
+    })
+    if (this.$route.query.name) {
+      this.activeName = this.$route.query.name
+    } else {
+      this.activeName = this.items[0].name
+    }
+  },
+  computed: {
+    name () {
+      return this.items.find(e => e.name === this.activeName)?.label ?? ''
+    }
+  },
+  methods: {
+    onComponentMounted () {
+      this.$nextTick(() => {
+        if (!this.$refs[this.activeName]) {
+          return
+        }
+        this.$refs[this.activeName][0].onInit && this.$refs[this.activeName][0].onInit(this.name)
+      })
+    },
+    handleClick () {
+      this.$router.push(`${this.$route.path}?name=${this.activeName}`)
+      this.$nextTick(() => {
+        this.$refs[this.activeName][0].onInit && this.$refs[this.activeName][0].onInit(this.name)
+      })
+    }
   }
 }
 </script>
 
 <style lang="scss" scoped>
-
+  /* 自定义样式 */
 </style>

+ 181 - 0
src/views/bonus/setting/proportion/AllocationProportionEdit.vue

@@ -0,0 +1,181 @@
+<template>
+  <m-dialog :title="isEdit ? '编辑配置' : '新增配置'" ref="dialog" @sure="onSure">
+    <m-form ref="form" :items="formItems" v-model="formValues" v-loading="loading"></m-form>
+
+  </m-dialog>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+import {
+  getRosterList
+} from '@/api/system'
+import {
+  saveAllocationConfig
+} from '@/api/bonus'
+export default {
+  name: 'AllocationProportionEdit',
+  data () {
+    return {
+      formValues: {
+        employeeCode: null,
+        employeeName: null,
+        organizationNo: null,
+        organizationName: null
+      },
+      itemData: {},
+      filterLoading: false,
+      loading: false,
+      items: []
+    }
+  },
+  computed: {
+    isEdit () {
+      return Object.keys(this.itemData).length > 0
+    },
+    ...mapGetters(['organizationTree']),
+    organizationItems () {
+      if (this.organizationTree.length > 0) {
+        return this.organizationTree[0].child
+      }
+      return []
+    },
+    formItems () {
+      return [
+        {
+          label: '管理者',
+          prop: 'employeeCode',
+          type: 'select',
+          options: {
+            placeholder: '请选择管理者',
+            filterable: true,
+            remote: true,
+            labelText: 'employeeName',
+            labelValue: 'personnelCode',
+            remoteMethod: this.remoteMethod,
+            valueKey: 'personnelCode',
+            defaultFirstOption: true,
+            loading: this.filterLoading,
+            items: this.items
+          },
+          handles: {
+            change: (v) => {
+              const item = this.items.find(e => e.personnelCode === v)
+              this.formValues.employeeName = item.employeeName
+              this.formValues.employeeCode = item.personnelCode
+            }
+          },
+          rules: [
+            { required: true, message: '请选择管理者', trigger: 'change' }
+          ]
+        },
+        {
+          label: '管理机构',
+          prop: 'organizationNo',
+          type: 'cascader',
+          rules: [
+            { required: true, message: '请选择机构', trigger: 'change' }
+          ],
+          options: {
+            ref: 'organizationNo',
+            filterable: true,
+            clearable: true,
+            placeholder: '请选择机构',
+            options: this.organizationItems,
+            showAllLevels: false,
+            props: {
+              emitPath: false,
+              checkStrictly: true,
+              value: 'organizationNo',
+              label: 'organizationName',
+              children: 'child'
+            }
+          },
+          handles: {
+            change: (v) => {
+              const nodes = this.$refs.form.$refs.organizationNo.getCheckedNodes()
+              this.formValues.organizationNo = nodes[0].data.organizationNo
+              this.formValues.organizationName = nodes[0].data.organizationName
+            }
+          }
+        }
+      ]
+    }
+  },
+  methods: {
+    async open (item) {
+      this.loading = true
+      this.$refs.dialog.open()
+      if (!item) {
+        // 默认获取一次
+        await this.remoteMethod()
+        this.itemData = {}
+        this.formValues = {
+          employeeCode: null,
+          employeeName: null,
+          organizationNo: null,
+          organizationName: null
+        }
+      } else {
+        await this.remoteMethod(item.employeeName)
+        this.itemData = item
+        this.formValues = {
+          employeeCode: item.employeeCode,
+          organizationName: item.organizationName,
+          organizationNo: item.organizationNo,
+          employeeName: item.employeeName
+        }
+      }
+      this.$nextTick(() => {
+        this.$refs.form.clearValidate()
+        this.loading = false
+      })
+    },
+    async remoteMethod (str) {
+      this.filterLoading = true
+      try {
+        const { data } = await getRosterList({
+          entity: {
+            employeeName: str
+          },
+          page: {
+            current: 1,
+            size: 99
+          }
+        })
+        this.items = data.records
+      } catch (error) {
+        this.items = []
+        this.$message.error(error)
+      } finally {
+        this.filterLoading = false
+      }
+    },
+    onSure () {
+      this.$refs.form.validate(async valid => {
+        if (!valid) {
+          return
+        }
+        this.loading = true
+        try {
+          await saveAllocationConfig({
+            performanceSalaryManageEmployeeId: this.itemData.performanceSalaryManageEmployeeId,
+            ...this.formValues
+          })
+          this.$refs.dialog.close()
+          this.$message.success('操作成功')
+          this.$emit('success')
+        } catch (error) {
+          this.$message.error(error)
+        } finally {
+          this.loading = false
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 155 - 0
src/views/bonus/setting/proportion/index.vue

@@ -0,0 +1,155 @@
+<template>
+  <div>
+    <m-search class="mb-3" :items="searchItems" v-model="searchValues" @search="onSearch"></m-search>
+    <m-table
+      :card-title="cardTitle"
+      v-loading="loading"
+      :items="items"
+      :headers="headers"
+      :page-size="pageInfo.size"
+      :page-current="pageInfo.current"
+      :total="total"
+      @page-change="onPageChange"
+    >
+      <template #card-tools>
+        <m-button type="orange" icon="el-icon-plus" @click="onAdd">新增</m-button>
+      </template>
+      <template #actions="{ row }">
+        <m-button type="primary" text @click="onEdit(row)">编辑</m-button>
+        <m-button type="danger" text @click="onDelete(row)">删除</m-button>
+      </template>
+    </m-table>
+    <AllocationProportionEdit ref="allocationProportionEditRefs" @success="onInit"></AllocationProportionEdit>
+  </div>
+</template>
+
+<script>
+import {
+  getAllocationConfigList,
+  deleteAllocationConfig
+} from '@/api/bonus'
+import AllocationProportionEdit from './AllocationProportionEdit.vue'
+import { mapGetters } from 'vuex'
+export default {
+  name: 'AllocationProportion',
+  components: {
+    AllocationProportionEdit
+  },
+  data () {
+    return {
+      searchValues: {
+        employeeName: null
+      },
+      headers: [
+        { label: '管理者名称', prop: 'employeeName' },
+        { label: '管理机构', prop: 'organizationName' },
+        // { label: '分配占比', prop: 'manageProportion', align: 'center' },
+        { label: '创建时间', prop: 'createDate' },
+        { label: '操作', prop: 'actions' }
+      ],
+      items: [],
+      total: 0,
+      pageInfo: {
+        current: 1,
+        size: 10
+      },
+      loading: false,
+      cardTitle: null
+    }
+  },
+  computed: {
+    ...mapGetters(['organizationTree']),
+    organizationItems () {
+      if (this.organizationTree.length > 0) {
+        return this.organizationTree[0].child
+      }
+      return []
+    },
+    searchItems () {
+      return [
+        {
+          label: '管理者',
+          prop: 'employeeName',
+          type: 'input',
+          options: {
+            placeholder: '请输入名称'
+          }
+        },
+        {
+          label: '管理机构',
+          prop: 'organizationNo',
+          type: 'cascader',
+          options: {
+            ref: 'organizationNo',
+            filterable: true,
+            clearable: true,
+            placeholder: '请选择机构',
+            options: this.organizationItems,
+            showAllLevels: false,
+            props: {
+              emitPath: false,
+              checkStrictly: true,
+              value: 'organizationNo',
+              label: 'organizationName',
+              children: 'child'
+            }
+          }
+        }
+      ]
+    }
+  },
+  // created () {
+  //   this.onInit()
+  // },
+  methods: {
+    async onInit (title) {
+      if (title) {
+        this.cardTitle = title
+      }
+      this.loading = true
+      try {
+        const { data } = await getAllocationConfigList({
+          ...this.searchValues
+        })
+        this.items = data.records
+        this.total = data.total
+      } catch (error) {
+        this.$message.error(error)
+      } finally {
+        this.loading = false
+      }
+    },
+    onAdd () {
+      this.$refs.allocationProportionEditRefs.open()
+    },
+    onEdit (item) {
+      this.$refs.allocationProportionEditRefs.open(item)
+    },
+    onDelete (row) {
+      this.$confirm('确定删除吗?', '提示')
+        .then(async () => {
+          try {
+            await deleteAllocationConfig({ performanceSalaryManageEmployeeId: row.performanceSalaryManageEmployeeId })
+            this.$message.success('删除成功')
+            this.onInit()
+          } catch (error) {
+            this.$message.error(error)
+          }
+        })
+        .catch(_ => {})
+    },
+    onSearch () {
+      this.pageInfo.current = 1
+      this.onInit()
+    },
+    onPageChange (index) {
+      this.pageInfo.current = index
+      this.onInit()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  /* 自定义样式 */
+</style>

+ 4 - 1
src/views/salaryFixed/salaryFixedRules/salaryFixedRulesParam/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <ParamsSetting configuration-category="基础薪资配置" card-title="系数参数设定"></ParamsSetting>
+  <ParamsSetting ref="paramsSettingRefs" configuration-category="基础薪资配置" card-title="系数参数设定"></ParamsSetting>
 </template>
 
 <script>
@@ -8,6 +8,9 @@ export default {
   name: 'salaryFixedRulesParam',
   components: {
     ParamsSetting
+  },
+  mounted () {
+    this.$refs.paramsSettingRefs.onInit()
   }
 }
 </script>