BAOLH
2026-07-16 97d2daf71d472fedfd984696836d3ca67e76f42e
工资详情页添加出差和调休相关跳转功能(计算月份修正)
1 files modified
10 ■■■■■ changed files
eladmin-web-master/src/views/salary/newSalary/index.vue 10 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/salary/newSalary/index.vue
@@ -314,7 +314,7 @@
        </el-table-column>
        <el-table-column :show-overflow-tooltip="true" prop="comptimeAllowance" label="其他补助(调休)" width="110">
          <template slot-scope="scope">
            <el-link type="primary" class="fs-12" @click="$router.push({ path: '/attendance/attendanceOvertime', query: { userId: scope.row.userId, overtimeStartTime: scope.row.salaryYearMonth, overtimeEndTime: getMonthLastDay(scope.row.salaryYearMonth) } })">
            <el-link type="primary" class="fs-12" @click="$router.push({ path: '/attendance/attendanceOvertime', query: { userId: scope.row.userId, overtimeStartTime: getOvertimeSettleMonth(scope.row.salaryYearMonth), overtimeEndTime: getMonthLastDay(getOvertimeSettleMonth(scope.row.salaryYearMonth)) } })">
              {{ crud.toMoney((scope.row.comptimeAllowance == null ? 0 : scope.row.comptimeAllowance)) }}
            </el-link>
          </template>
@@ -1261,6 +1261,14 @@
      // 清空表单
      that.$refs['resignCalcForm'].clearValidate()
    },
    // 获取调休结算月份
    getOvertimeSettleMonth(dateStr) {
      const date = new Date(dateStr)
      // 减去3个月
      date.setMonth(date.getMonth() - 3)
      // 格式化为字符串
      return this.parseTime(date, '{y}-{m}-{d} {h}:{i}:{s}')
    },
    // 获取当月最后一天
    getMonthLastDay(dateStr) {
      const date = new Date(dateStr)