zhengnaiwen_citu il y a 3 mois
Parent
commit
3b684f43e9

+ 14 - 0
src/views/salary/sandbox/index.vue

@@ -46,7 +46,9 @@ import SalarySandboxRules from './salarySandboxRules.vue'
 import Coefficient from '../solution/salaryCoefficient'
 import History from '../solution/salarySolutionHistory'
 import SolutionDetails from '../solution/components/solutionDetails.vue'
+
 import {
+  sendSalaryRelease,
   getSolutionDetails
 } from '@/api/salary'
 export default {
@@ -76,6 +78,18 @@ export default {
     this.$refs[this.activeName].onInit()
   },
   methods: {
+    async onSend (row) {
+      this.loading = true
+      try {
+        await sendSalaryRelease({ performanceSolutionId: row.performanceSolutionId })
+        this.$message.success('发布成功')
+        this.$refs.Solution.onInit()
+      } catch (error) {
+        this.$message.error(error)
+      } finally {
+        this.loading = false
+      }
+    },
     onCalculate () {},
     onOpen (ref, item) {
       this.$refs[ref]?.open && this.$refs[ref].open(item)

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

@@ -22,8 +22,7 @@
 
 <script>
 import {
-  deleteSolution,
-  sendSalaryRelease
+  deleteSolution
 } from '@/api/salary'
 import ListTemplate from '../components/ListTemplate.vue'
 import SalarySolutionHistory from './salarySolutionHistory.vue'
@@ -47,18 +46,6 @@ 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)
     },