weicd
2023-10-20 3ebd27c2a194949e68eeaca77b889fc95418349e
工资相关
3 files modified
33 ■■■■■ changed files
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/domain/Salary.java 5 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/dto/SalaryDto.java 3 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/salary/salary/index.vue 25 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/domain/Salary.java
@@ -348,6 +348,11 @@
    @ApiModelProperty(value = "承认状态")
    private String approveStatus;
    @Column(name = "`travel_allowance`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "出差补助金额")
    private BigDecimal travelAllowance;
    public void copy(Salary source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/dto/SalaryDto.java
@@ -163,6 +163,9 @@
    /** 失业险基数 */
    private BigDecimal unemploymentRadix;
    /** 出差补助金额 */
    private BigDecimal travelAllowance;
    /** 失业险个人缴纳比例 */
    private Double unemploymentPersonalProportion;
eladmin-web-master/src/views/salary/salary/index.vue
@@ -385,6 +385,16 @@
            {{ crud.toMoney(scope.row.industrialInjuryPersonalAmount) }}
          </template>
        </el-table-column>
        <el-table-column :show-overflow-tooltip="true" prop="afterTaxAmount" label="其他金额" width="100">
          <template slot-scope="scope">
            {{crud.toMoney((scope.row.pieceRate == null ? 0 : scope.row.pieceRate) + (scope.row.travelAllowance == null ? 0 : scope.row.travelAllowance)) }}
          </template>
        </el-table-column>
        <el-table-column :show-overflow-tooltip="true" prop="individualIncomeTax" label="个人所得税" width="100">
          <template slot-scope="scope">
            {{ crud.toMoney(scope.row.individualIncomeTax) }}
          </template>
        </el-table-column>
        <el-table-column :show-overflow-tooltip="true" prop="remarks" label="备注" width="140" />
        <el-table-column :show-overflow-tooltip="true" prop="createTime" label="创建时间" width="140" />
        <el-table-column :show-overflow-tooltip="true" prop="publicityStatus" label="公示状态" width="80" fixed="right">
@@ -564,6 +574,12 @@
        needCompletedAchievementsHours: [
          { required: true, message: '应完成绩效工时不能为空', trigger: 'blur' },
          { validator: durationValidate, trigger: 'blur' }
        ],
        pieceRate: [
          { validator: wageValidate, trigger: 'blur' }
        ],
        travelAllowance: [
          { validator: wageValidate, trigger: 'blur' }
        ],
        alreadyCompletedAchievementsHours: [
          { required: true, message: '已完成绩效工时不能为空', trigger: 'blur' },
@@ -934,6 +950,10 @@
      this.industrialInjuryCompanyAmountRandom = Math.random()
      // 税前金额随机数
      this.preTaxAmountRandom = Math.random()
      // 计件随机数
      this.pieceRateRandom = Math.random()
      // 出差补助随机数
      this.travelAllowanceRandom = Math.random()
      // 个人所得税随机数
      // this.individualIncomeTaxRandom = Math.random()
      this.individualIncomeTaxRandom = 0
@@ -1824,17 +1844,18 @@
          // 判断循环是否结束
          if (i === res.length - 1) {
            // 个人所得税 = 税额
            this.form.individualIncomeTax = taxAmount
            // this.form.individualIncomeTax = taxAmount
            // 个人所得税随机数
            // this.individualIncomeTaxRandom = Math.random()
            // 税后金额 = 计税金额 - 税额
            this.form.afterTaxAmount = (taxableAmount - taxAmount) < 0 ? 0 : taxableAmount - taxAmount
            this.form.afterTaxAmount = (taxableAmount - taxAmount) < 0 ? 0 : taxableAmount - taxAmount - this.form.individualIncomeTax
            // 税后金额随机数
            this.afterTaxAmountRandom = Math.random()
          }
        }
      })
    },
    // 个人所得税变更
    individualIncomeTaxBlur() {
      // 计税金额 = 税前金额 - 五险一金个人缴纳金额