From 97d2daf71d472fedfd984696836d3ca67e76f42e Mon Sep 17 00:00:00 2001
From: BAOLH <baolh@yhzhg.cn>
Date: Thu, 16 Jul 2026 09:55:58 +0000
Subject: [PATCH] 工资详情页添加出差和调休相关跳转功能(计算月份修正)

---
 eladmin-web-master/src/views/salary/newSalary/index.vue |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/eladmin-web-master/src/views/salary/newSalary/index.vue b/eladmin-web-master/src/views/salary/newSalary/index.vue
index 794e4ce..a6db46c 100644
--- a/eladmin-web-master/src/views/salary/newSalary/index.vue
+++ b/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)

--
Gitblit v1.9.3