From d87b1cc1ef69be335835ccb25fbaff96253b272a Mon Sep 17 00:00:00 2001
From: weicd <weicd@yhzhg.cn>
Date: Wed, 11 Oct 2023 06:40:56 +0000
Subject: [PATCH] 修改
---
eladmin-web-master/src/views/salary/newSalary/index.vue | 20 ++++++++++++++++----
eladmin-web-master/src/views/salary/salary/index.vue | 18 +++++++++++++-----
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/eladmin-web-master/src/views/salary/newSalary/index.vue b/eladmin-web-master/src/views/salary/newSalary/index.vue
index c8698b8..02c2b45 100644
--- a/eladmin-web-master/src/views/salary/newSalary/index.vue
+++ b/eladmin-web-master/src/views/salary/newSalary/index.vue
@@ -829,6 +829,13 @@
selval: []
}
},
+ watch: {
+ 'crud.status.cu'(newValue) {
+ if (newValue === 0) {
+ this.individualIncomeTaxRandom = null
+ }
+ }
+ },
methods: {
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
@@ -912,9 +919,14 @@
// 税前金额随机数
this.preTaxAmountRandom = Math.random()
// 个人所得税随机数
- this.individualIncomeTaxRandom = Math.random()
+ // this.individualIncomeTaxRandom = Math.random()
+ this.individualIncomeTaxRandom = 0
// 税后金额随机数
- this.afterTaxAmountRandom = Math.random()
+ this.afterTaxAmountRandom = Math.random(),
+ // 获取用户级别工资
+ crudUserLevelWage.getTargetYearMonth({ userId: this.form.userId, targetYearMonth: this.form.salaryYearMonth }).then(res => {
+ this.Level_now = res.level
+ })
},
// 钩子: 编辑 - 之前
// [CRUD.HOOK.beforeToEdit]() {
@@ -1398,7 +1410,7 @@
// 个人所得税
this.form.individualIncomeTax = 0
// 个人所得税随机数
- this.individualIncomeTaxRandom = Math.random()
+ // this.individualIncomeTaxRandom = Math.random()
// 税后金额
this.form.afterTaxAmount = 0
// 税后金额随机数
@@ -1739,7 +1751,7 @@
// 个人所得税 = 税额
this.form.individualIncomeTax = taxAmount
// 个人所得税随机数
- this.individualIncomeTaxRandom = Math.random()
+ // this.individualIncomeTaxRandom = Math.random()
// 税后金额 = 计税金额 - 税额
this.form.afterTaxAmount = (taxableAmount - taxAmount) < 0 ? 0 : taxableAmount - taxAmount
// 税后金额随机数
diff --git a/eladmin-web-master/src/views/salary/salary/index.vue b/eladmin-web-master/src/views/salary/salary/index.vue
index 8c17de2..50e4715 100644
--- a/eladmin-web-master/src/views/salary/salary/index.vue
+++ b/eladmin-web-master/src/views/salary/salary/index.vue
@@ -852,7 +852,14 @@
// 个人所得税随机数
individualIncomeTaxRandom: 0,
// 税后金额随机数
- afterTaxAmountRandom: 0
+ afterTaxAmountRandom: 0,
+ }
+ },
+ watch: {
+ 'crud.status.cu'(newValue) {
+ if (newValue === 0) {
+ this.individualIncomeTaxRandom = null
+ }
}
},
methods: {
@@ -941,7 +948,8 @@
// 税前金额随机数
this.preTaxAmountRandom = Math.random()
// 个人所得税随机数
- this.individualIncomeTaxRandom = Math.random()
+ // this.individualIncomeTaxRandom = Math.random()
+ this.individualIncomeTaxRandom = 0
// 税后金额随机数
this.afterTaxAmountRandom = Math.random()
},
@@ -1440,7 +1448,7 @@
// 个人所得税
this.form.individualIncomeTax = 0
// 个人所得税随机数
- this.individualIncomeTaxRandom = Math.random()
+ // this.individualIncomeTaxRandom = Math.random()
// 税后金额
this.form.afterTaxAmount = 0
// 税后金额随机数
@@ -1829,9 +1837,9 @@
// 判断循环是否结束
if (i === res.length - 1) {
// 个人所得税 = 税额
- this.form.individualIncomeTax = taxAmount
+ // this.form.individualIncomeTax = taxAmount
// 个人所得税随机数
- this.individualIncomeTaxRandom = Math.random()
+ // this.individualIncomeTaxRandom = Math.random()
// 税后金额 = 计税金额 - 税额
this.form.afterTaxAmount = (taxableAmount - taxAmount) < 0 ? 0 : taxableAmount - taxAmount
// 税后金额随机数
--
Gitblit v1.9.3