weicd
2023-10-11 d87b1cc1ef69be335835ccb25fbaff96253b272a
修改
2 files modified
38 ■■■■■ changed files
eladmin-web-master/src/views/salary/newSalary/index.vue 20 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/salary/salary/index.vue 18 ●●●●● patch | view | raw | blame | history
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
            // 税后金额随机数
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
            // 税后金额随机数