zhengnaiwen_citu il y a 4 mois
Parent
commit
fc2cbab785

+ 3 - 3
src/api/bonus.js

@@ -16,9 +16,9 @@ export function getAllocationEmployeeCategory (data) {
 }
 
 // 业绩分配 检查审核状态
-// export function checkAllocationSubmitStatus (data) {
-//   return http.post('/employee/performance/confirmation/check/submit', data)
-// }
+export function checkAllocationSubmitStatus (data) {
+  return http.post('/employee/performance/confirmation/check/submit', data)
+}
 
 // 业绩分配 绩效分配统计
 export function getAllocationStatistics (data) {

+ 15 - 3
src/views/bonus/allocation/index.vue

@@ -37,7 +37,7 @@ import {
   saveAllocationGrant,
   // getAllocationEmployeeCategory,
   getAllocationOrganizationCategory,
-  // checkAllocationSubmitStatus,
+  checkAllocationSubmitStatus,
   getAllocationStatistics,
   saveAllocation
 } from '@/api/bonus'
@@ -87,7 +87,7 @@ export default {
           // }
         },
         {
-          label: '机构类型',
+          label: '分配类型',
           prop: 'organizationCategory',
           type: 'select',
           options: {
@@ -113,7 +113,7 @@ export default {
   methods: {
     async onInit (pageInfo) {
       this.loading = true
-      // await this.onCheckStatus()
+      await this.onCheckStatus()
       await this.onStatistics()
       if (!this.$refs.bonusTableRefs) {
         this.loading = false
@@ -204,6 +204,18 @@ export default {
         this.auditStatusLoading = false
       }
     },
+    // 查询提交状态
+    async onCheckStatus () {
+      this.auditStatusLoading = true
+      try {
+        const { data } = await checkAllocationSubmitStatus(this.query)
+        this.auditStatus = data?.status ?? null
+      } catch (error) {
+        this.$message.error(error)
+      } finally {
+        this.auditStatusLoading = false
+      }
+    },
     // 统计分配
     async onStatistics () {
       try {

+ 9 - 3
src/views/bonus/components/bonusTable.vue

@@ -19,6 +19,9 @@
     <template #status="{ row }">
       <el-tag :type="statusList[row.status].color">{{ statusList[row.status].text }}</el-tag>
     </template>
+    <template #branchStatus="{ row }">
+      <el-tag :type="statusList[row.branchStatus].color">{{ statusList[row.branchStatus].text }}</el-tag>
+    </template>
     <template #dataType="{row}">
       {{ row.dataType === 1 ? '手工数据' : '系统数据' }}
     </template>
@@ -66,7 +69,8 @@ export default {
         current: 1,
         size: 50
       },
-      orders: []
+      orders: [],
+      organizationCategory: null
     }
   },
   computed: {
@@ -75,10 +79,11 @@ export default {
         { label: '月份', prop: 'month' },
         { label: '机构名称', prop: 'organizationName', width: 150 },
         { label: '员工姓名', prop: 'employeeName', width: 80, align: 'center' },
-        { label: '分配状态', prop: 'status', align: 'center', width: 100 },
+        { label: '分配状态', prop: this.organizationCategory === '支行' ? 'branchStatus' : 'status', align: 'center', width: 100 },
         { label: '员工岗位', prop: 'employeeCategory', align: 'center' },
         { label: '可分配绩效薪资', prop: 'assignablePerformanceSalary', align: 'center', width: 150 },
-        { label: '领导分配绩效薪资', prop: 'allocationPerformanceSalary', 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' },
@@ -98,6 +103,7 @@ export default {
       }
       this.loading = true
       const { organizationCategory, ...query } = searchValues
+      this.organizationCategory = organizationCategory
       try {
         const { data } = await getAllocationPage({
           page: {

+ 94 - 4
src/views/salary/claim/index.vue

@@ -1,15 +1,105 @@
 <template>
-  <div>
-
+  <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: 'salaryClaim'
+  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>