zhengnaiwen_citu 5 місяців тому
батько
коміт
0ae29b15a1

+ 8 - 3
src/api/accumulatePoint.js

@@ -2,20 +2,25 @@ import http from '@/utils/request'
 
 // 积分 列表
 export function getAccumulatePointList (data) {
-  return http.post('', data)
+  return http.post('/employee/score/page', data)
 }
 
 // 积分 保存
 export function saveAccumulatePoint (data) {
-  return http.post('', data)
+  return http.post('/employee/score/submit', data)
 }
 
 // 积分 查询
 export function getAccumulatePoint (data) {
-  return http.post('', data)
+  return http.post('/employee/score/detail', data)
 }
 
 // 积分 删除
 export function deleteAccumulatePoint (data) {
   return http.post('', data)
 }
+
+// 积分 删除
+export function getAccumulatePointRule () {
+  return http.post('/employee/score/rule/detail')
+}

+ 16 - 5
src/views/humanResources/accumulatePoints/accumulatePointsApply/accumulatePointsApplyEdit.vue

@@ -1,6 +1,6 @@
 <template>
   <m-dialog ref="dialog" title="积分申报">
-    <m-card shadow="never">
+    <m-card shadow="never" v-loading="loading">
       <el-descriptions
         v-for="item in items"
         :key="item.ruleCategory"
@@ -55,19 +55,30 @@
 </template>
 
 <script>
-import data from './data'
-
+import {
+  getAccumulatePointRule
+} from '@/api/accumulatePoint'
 export default {
   name: 'accumulatePointsApplyEdit',
   data () {
     return {
-      items: data,
+      loading: false,
+      items: [],
       formValues: {}
     }
   },
   methods: {
-    open () {
+    async open () {
+      this.loading = true
       this.$refs.dialog.open()
+      try {
+        const { data } = await getAccumulatePointRule()
+        this.items = data
+      } catch (error) {
+        this.$message.error(error)
+      } finally {
+        this.loading = false
+      }
     }
   }
 }

+ 0 - 356
src/views/humanResources/accumulatePoints/accumulatePointsApply/data.js

@@ -1,356 +0,0 @@
-export default [
-  {
-    ruleCategory: '基础积分',
-    maxScore: 200,
-    item: [
-      {
-        employeeScoreRuleItemId: '2',
-        title: '岗位晋升',
-        score: 100,
-        inputType: 0,
-        calculationMethod: 0,
-        group: '岗位晋升',
-        child: null,
-        maxScore: null,
-        desc: null
-      },
-      {
-        employeeScoreRuleItemId: '1',
-        title: '入职满一年',
-        score: 50,
-        inputType: 0,
-        calculationMethod: 0,
-        group: '入职满一年',
-        child: null,
-        maxScore: null,
-        desc: null
-      }
-    ]
-  },
-  {
-    ruleCategory: '能力发展积分',
-    maxScore: 300,
-    item: [
-      {
-        employeeScoreRuleItemId: '3',
-        title: '通过行内资格考试',
-        score: 30,
-        inputType: 0,
-        calculationMethod: 0,
-        group: '通过行内资格考试',
-        child: null,
-        maxScore: null,
-        desc: null
-      },
-      {
-        employeeScoreRuleItemId: '4',
-        title: '获得AFP/CFP专业认证',
-        score: 50,
-        inputType: 2,
-        calculationMethod: 0,
-        group: '获得AFP/CFP专业认证',
-        child: null,
-        maxScore: '100',
-        desc: null
-      },
-      {
-        employeeScoreRuleItemId: '7',
-        title: '职称晋升',
-        score: 100,
-        inputType: 3,
-        calculationMethod: 0,
-        group: '职称晋升',
-        child: [
-          {
-            employeeScoreRuleItemId: '7',
-            title: '职称晋升中级',
-            score: 100,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '职称晋升',
-            child: null,
-            maxScore: null,
-            desc: null
-          },
-          {
-            employeeScoreRuleItemId: '6',
-            title: '职称晋升初级',
-            score: 50,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '职称晋升',
-            child: null,
-            maxScore: null,
-            desc: null
-          },
-          {
-            employeeScoreRuleItemId: '8',
-            title: '职称晋升高级',
-            score: 150,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '职称晋升',
-            child: null,
-            maxScore: null,
-            desc: null
-          },
-          {
-            employeeScoreRuleItemId: '22',
-            title: '未晋升',
-            score: 0,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '职称晋升',
-            child: null,
-            maxScore: null,
-            desc: null
-          }
-        ],
-        maxScore: null,
-        desc: null
-      }
-    ]
-  },
-  {
-    ruleCategory: '业绩共享积分',
-    maxScore: 200,
-    item: [
-      {
-        employeeScoreRuleItemId: '12',
-        title: '超额完成创收任务',
-        score: 0,
-        inputType: 2,
-        calculationMethod: 0,
-        group: '超额完成创收任务',
-        child: null,
-        maxScore: '200',
-        desc: null
-      },
-      {
-        employeeScoreRuleItemId: '13',
-        title: '主导创新项目落地',
-        score: 50,
-        inputType: 2,
-        calculationMethod: 0,
-        group: '主导创新项目落地',
-        child: null,
-        maxScore: '100',
-        desc: null
-      },
-      {
-        employeeScoreRuleItemId: '9',
-        title: '年度绩效',
-        score: 150,
-        inputType: 3,
-        calculationMethod: 0,
-        group: '年度绩效',
-        child: [
-          {
-            employeeScoreRuleItemId: '9',
-            title: 'A',
-            score: 150,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '年度绩效',
-            child: null,
-            maxScore: null,
-            desc: null
-          },
-          {
-            employeeScoreRuleItemId: '10',
-            title: 'B',
-            score: 100,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '年度绩效',
-            child: null,
-            maxScore: null,
-            desc: null
-          },
-          {
-            employeeScoreRuleItemId: '11',
-            title: 'C',
-            score: 50,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '年度绩效',
-            child: null,
-            maxScore: null,
-            desc: null
-          },
-          {
-            employeeScoreRuleItemId: '23',
-            title: '无',
-            score: 0,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '年度绩效',
-            child: null,
-            maxScore: null,
-            desc: null
-          }
-        ],
-        maxScore: null,
-        desc: null
-      }
-    ]
-  },
-  {
-    ruleCategory: '荣誉奖励积分',
-    maxScore: 200,
-    item: [
-      {
-        employeeScoreRuleItemId: '17',
-        title: '合理化建议被采纳',
-        score: 20,
-        inputType: 0,
-        calculationMethod: 0,
-        group: '合理化建议被采纳',
-        child: null,
-        maxScore: null,
-        desc: null
-      },
-      {
-        employeeScoreRuleItemId: '24',
-        title: '获得省级行业奖项',
-        score: 80,
-        inputType: 3,
-        calculationMethod: 0,
-        group: '获得省级行业奖项',
-        child: [
-          {
-            employeeScoreRuleItemId: '24',
-            title: '是',
-            score: 80,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '获得省级行业奖项',
-            child: null,
-            maxScore: null,
-            desc: null
-          },
-          {
-            employeeScoreRuleItemId: '15',
-            title: '否',
-            score: 0,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '获得省级行业奖项',
-            child: null,
-            maxScore: null,
-            desc: null
-          }
-        ],
-        maxScore: null,
-        desc: null
-      },
-      {
-        employeeScoreRuleItemId: '16',
-        title: '获得国家级行业奖项',
-        score: 150,
-        inputType: 3,
-        calculationMethod: 0,
-        group: '获得国家级行业奖项',
-        child: [
-          {
-            employeeScoreRuleItemId: '16',
-            title: '是',
-            score: 150,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '获得国家级行业奖项',
-            child: null,
-            maxScore: null,
-            desc: null
-          },
-          {
-            employeeScoreRuleItemId: '25',
-            title: '否',
-            score: 0,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '获得国家级行业奖项',
-            child: null,
-            maxScore: null,
-            desc: null
-          }
-        ],
-        maxScore: null,
-        desc: null
-      },
-      {
-        employeeScoreRuleItemId: '14',
-        title: '行内年度优秀员工',
-        score: 50,
-        inputType: 3,
-        calculationMethod: 0,
-        group: '行内年度优秀员工',
-        child: [
-          {
-            employeeScoreRuleItemId: '14',
-            title: '是',
-            score: 50,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '行内年度优秀员工',
-            child: null,
-            maxScore: null,
-            desc: null
-          },
-          {
-            employeeScoreRuleItemId: '21',
-            title: '否',
-            score: 0,
-            inputType: 3,
-            calculationMethod: 0,
-            group: '行内年度优秀员工',
-            child: null,
-            maxScore: null,
-            desc: null
-          }
-        ],
-        maxScore: null,
-        desc: null
-      }
-    ]
-  },
-  {
-    ruleCategory: '扣分项',
-    maxScore: 999999,
-    item: [
-      {
-        employeeScoreRuleItemId: '18',
-        title: '合规问题',
-        score: 50,
-        inputType: 0,
-        calculationMethod: 1,
-        group: '合规问题',
-        child: null,
-        maxScore: null,
-        desc: null
-      },
-      {
-        employeeScoreRuleItemId: '19',
-        title: '客户有效投诉',
-        score: 30,
-        inputType: 0,
-        calculationMethod: 1,
-        group: '客户有效投诉',
-        child: null,
-        maxScore: null,
-        desc: null
-      },
-      {
-        employeeScoreRuleItemId: '20',
-        title: '考试未达标',
-        score: 20,
-        inputType: 0,
-        calculationMethod: 1,
-        group: '考试未达标',
-        child: null,
-        maxScore: null,
-        desc: null
-      }
-    ]
-  }
-]

+ 4 - 4
src/views/humanResources/accumulatePoints/accumulatePointsApply/index.vue

@@ -24,7 +24,7 @@
 
 <script>
 import {
-  // getAccumulatePointList,
+  getAccumulatePointList,
   deleteAccumulatePoint
 } from '@/api/accumulatePoint'
 import AccumulatePointsApplyEdit from './accumulatePointsApplyEdit.vue'
@@ -69,9 +69,9 @@ export default {
     async onInit () {
       this.loading = true
       try {
-        // const { data } = await getAccumulatePointList()
-        // this.items = data.records
-        // this.total = data.total
+        const { data } = await getAccumulatePointList()
+        this.items = data.records
+        this.total = data.total
       } catch (error) {
         this.$message.error(error)
       } finally {