zhengnaiwen_citu hai 4 meses
pai
achega
7fda001843

+ 3 - 2
src/views/accumulatePoints/accumulatePointsMotivate/index.vue

@@ -5,11 +5,11 @@
       <div slot="header" class="clearfix">
         <span>兑换列表</span>
         <div class="tools">
-          <span class="mr-3">
+          <span class="mr-5">
             已使用积分:<span class="text-link" @click="onHistory">{{ itemData.canUsedScore ?? 0 }}</span>
           </span>
           <span>
-            可用积分:{{ itemData.canUsed ?? 0 }}
+            可用积分:<span>{{ itemData.canUsed ?? 0 }}</span>
           </span>
           <!-- <m-button type="orange" @click="onHistory">兑换记录</m-button> -->
         </div>
@@ -147,6 +147,7 @@ export default {
           })
           this.$message.success('兑换成功')
           this.onInit()
+          this.getDetails()
         } catch (error) {
           this.$snackbar.error(error)
         }

+ 2 - 1
src/views/bonus/setting/index.vue

@@ -87,7 +87,8 @@ export default {
             orders: this.orders
           },
           entity: {
-            ...this.searchValues
+            ...this.searchValues,
+            configurationCategory: '绩效奖金配置'
           }
         })
         this.items = data.records

+ 5 - 1
src/views/salary/solution/salarySolution/index.vue

@@ -5,12 +5,14 @@
         <m-button type="orange" size="small" icon="el-icon-plus" @click="onOpen('salarySolutionEditRefs')">新增</m-button>
       </template>
       <template #actions="{ row }">
+        <m-button text type="primary" size="small" @click="onOpen('salarySolutionDetailsRefs', row)">查看</m-button>
         <m-button text type="primary" size="small" @click="onOpen('salarySolutionEditRefs', row)">编辑</m-button>
         <m-button text type="primary" size="small" @click="onOpen('salarySolutionRulesRefs', row)">规则配置</m-button>
         <m-button text type="primary" size="small" @click="onOpen('salarySolutionHistory', row)">版本记录</m-button>
         <m-button text type="danger" size="small" @click="onDelete(row)">删除</m-button>
       </template>
     </ListTemplate>
+    <SalarySolutionDetails ref="salarySolutionDetailsRefs"></SalarySolutionDetails>
     <SalarySolutionEdit ref="salarySolutionEditRefs" @refresh="onInit"></SalarySolutionEdit>
     <SalarySolutionRules ref="salarySolutionRulesRefs" @refresh="onInit"></SalarySolutionRules>
     <SalarySolutionHistory ref="salarySolutionHistory">
@@ -29,13 +31,15 @@ import ListTemplate from '../components/ListTemplate.vue'
 import SalarySolutionEdit from './salarySolutionEdit.vue'
 import SalarySolutionRules from './salarySolutionRules.vue'
 import SalarySolutionHistory from './salarySolutionHistory.vue'
+import SalarySolutionDetails from './salarySolutionDetails.vue'
 export default {
   name: 'salary-solution-list',
   components: {
     ListTemplate,
     SalarySolutionEdit,
     SalarySolutionRules,
-    SalarySolutionHistory
+    SalarySolutionHistory,
+    SalarySolutionDetails
   },
   mounted () {
     this.$emit('mounted')

+ 64 - 0
src/views/salary/solution/salarySolution/salarySolutionDetails.vue

@@ -0,0 +1,64 @@
+<template>
+  <m-dialog title="规则详情" ref="dialog">
+    <el-descriptions class="margin-top" :column="1" :size="size" border>
+      <el-descriptions-item>
+        <template slot="label">方案名称</template>
+        {{ itemData.title }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">方案名称</template>
+        {{ itemData.title }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">方案名称</template>
+        {{ itemData.title }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">方案名称</template>
+        {{ itemData.title }}
+      </el-descriptions-item>
+    </el-descriptions>
+  </m-dialog>
+</template>
+
+<script>
+import {
+  getSolutionDetails
+} from '@/api/salary'
+export default {
+  name: 'salarySolutionDetails',
+  data () {
+    return {
+      loading: false,
+      columnHeaders: [
+        { name: '方案名称', prop: 'title' },
+        { name: '方案描述', prop: 'title' },
+        { name: '绩效机构', prop: 'title' },
+        { name: '方案名称', prop: 'title' },
+        { name: '方案名称', prop: 'title' }
+      ],
+      itemData: {}
+    }
+  },
+  methods: {
+    async open (item) {
+      this.$refs.dialog.open()
+      this.loading = true
+      try {
+        const { data } = await getSolutionDetails({
+          performanceSolutionId: item.performanceSolutionId
+        })
+        this.itemData = data
+      } catch (error) {
+        this.$message.error(error)
+      } finally {
+        this.loading = false
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 5 - 2
src/views/salaryFixed/salaryFixedRules/index.vue

@@ -44,13 +44,16 @@ export default {
   methods: {
     onComponentMounted () {
       this.$nextTick(() => {
-        this.$refs[this.activeName][0].onInit(this.name)
+        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.name)
+        this.$refs[this.activeName][0].onInit && this.$refs[this.activeName][0].onInit(this.name)
       })
     }
   }

+ 72 - 0
src/views/salaryFixed/salaryFixedRules/salaryFixedRulesParam/index.vue

@@ -0,0 +1,72 @@
+<template>
+  <div>
+    <m-table
+      card-title="系数参数设定"
+      :headers="[
+        { label: '配置名称', prop: 'configurationTitle' },
+        { label: '配置值', prop: 'configurationValue' },
+        { label: '操作', prop: 'actions' }
+      ]"
+      :items="items"
+    >
+      <template #actions="{ row }">
+        <el-button type="text" @click="onEdit(row)">编辑</el-button>
+      </template>
+    </m-table>
+    <SalaryFixedRulesParamEdit ref="salaryFixedRulesParamEditRefs" @success="onInit"></SalaryFixedRulesParamEdit>
+  </div>
+</template>
+
+<script>
+import {
+  getBonusSettingPage
+} from '@/api/bonus'
+import SalaryFixedRulesParamEdit from './salaryFixedRulesParamEdit.vue'
+export default {
+  name: 'salaryFixedRulesParam',
+  components: {
+    SalaryFixedRulesParamEdit
+  },
+  data () {
+    return {
+      loading: false,
+      total: 0,
+      orders: [],
+      pageInfo: {
+        current: 1,
+        size: 10
+      },
+      items: []
+    }
+  },
+  methods: {
+    async onInit () {
+      this.loading = true
+      try {
+        const { data } = await getBonusSettingPage({
+          page: {
+            ...this.pageInfo,
+            orders: this.orders
+          },
+          entity: {
+            configurationCategory: '基础薪资配置'
+          }
+        })
+        this.items = data.records
+        this.total = data.total
+      } catch (error) {
+        this.$message.error(error)
+      } finally {
+        this.loading = false
+      }
+    },
+    onEdit (row) {
+      this.$refs.salaryFixedRulesParamEditRefs.open(row)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 76 - 0
src/views/salaryFixed/salaryFixedRules/salaryFixedRulesParam/salaryFixedRulesParamEdit.vue

@@ -0,0 +1,76 @@
+<template>
+  <m-dialog ref="dialog" title="编辑参数" @sure="onSure">
+    <m-form ref="form" :items="formItems" v-model="formValues">
+      <template #configurationTitle>
+        <el-tag type="primary">{{ formValues.configurationTitle }}</el-tag>
+      </template>
+    </m-form>
+  </m-dialog>
+</template>
+
+<script>
+import {
+  saveBonusSetting
+} from '@/api/bonus'
+export default {
+  name: 'salaryFixedRulesParamEdit',
+  data () {
+    return {
+      formItems: [
+        {
+          label: '参数名称',
+          prop: 'configurationTitle'
+        },
+        {
+          label: '参数值',
+          prop: 'configurationValue',
+          type: 'input',
+          options: {
+            placeholder: '请输入参数值'
+          },
+          rules: [
+            { required: true, message: '请输入参数值', trigger: 'blur' }
+          ]
+        }
+      ],
+      formValues: {
+        configurationTitle: null,
+        configurationValue: null
+      },
+      itemData: {}
+    }
+  },
+  methods: {
+    open (item) {
+      this.itemData = item
+      this.formValues.configurationTitle = item.configurationTitle
+      this.formValues.configurationValue = item.configurationValue
+      this.$refs.dialog.open()
+    },
+    onSure () {
+      this.$refs.form.validate(async valid => {
+        if (!valid) {
+          return
+        }
+        try {
+          await saveBonusSetting({
+            performanceConfigurationId: this.itemData.performanceConfigurationId,
+            ...this.formValues
+          })
+          this.$message.success('保存成功')
+          this.$refs.dialog.close()
+          this.$emit('success')
+        } catch (error) {
+          this.$message.error(error)
+        } finally {
+          this.loading = false
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>