|
@@ -2,16 +2,20 @@
|
|
|
<div>
|
|
|
<ListTemplate ref="listTemplateRefs" :card-title="$attrs.label" v-loading="loading">
|
|
|
<template #tool>
|
|
|
- <slot name="tool"></slot>
|
|
|
+ <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>
|
|
|
<slot name="actions" :row="row"></slot>
|
|
|
<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">
|
|
|
<template #actions="{ row }">
|
|
|
<m-button type="primary" text @click="$emit('history', row)" size="small">查看规则配置</m-button>
|
|
@@ -22,15 +26,26 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- deleteSolution
|
|
|
+ deleteSolution,
|
|
|
+ sendSalaryRelease
|
|
|
} from '@/api/salary'
|
|
|
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',
|
|
|
+ props: {
|
|
|
+ permission: {
|
|
|
+ type: Array,
|
|
|
+ default: () => []
|
|
|
+ }
|
|
|
+ },
|
|
|
components: {
|
|
|
ListTemplate,
|
|
|
+ SalarySolutionEdit,
|
|
|
+ SalarySolutionRules,
|
|
|
SalarySolutionHistory,
|
|
|
SalarySolutionDetails
|
|
|
},
|
|
@@ -46,8 +61,23 @@ export default {
|
|
|
onInit () {
|
|
|
this.$refs.listTemplateRefs.onInit()
|
|
|
},
|
|
|
+ async onSend (row) {
|
|
|
+ this.loading = true
|
|
|
+ try {
|
|
|
+ await sendSalaryRelease({ performanceSolutionId: row.performanceSolutionId })
|
|
|
+ this.$message.success('发布成功')
|
|
|
+ this.$refs.listTemplateRefs.onInit()
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error(error)
|
|
|
+ } finally {
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ },
|
|
|
onOpen (ref, item) {
|
|
|
this.$refs[ref]?.open && this.$refs[ref].open(item)
|
|
|
+ },
|
|
|
+ onCalculate () {
|
|
|
+
|
|
|
},
|
|
|
onDelete (item) {
|
|
|
this.$confirm(`确定删除${item.title}吗?`, '提示').then(async () => {
|