| | |
| | | url: 'api/attendanceBusinessTravel', |
| | | idField: 'id', |
| | | sort: 'travelStartTime,desc', |
| | | crudMethod: { ...crudAttendanceBusinessTravel } |
| | | crudMethod: { ...crudAttendanceBusinessTravel }, |
| | | queryOnPresenterCreated: false |
| | | }) |
| | | }, |
| | | // 数据字典constant |
| | |
| | | that.wecomApprovalVisible = true |
| | | } |
| | | }) |
| | | |
| | | // 从路由中获取参数 |
| | | const { userId, travelStartTime, travelEndTime } = that.$route.query |
| | | // 将参数注入到查询参数中 |
| | | userId && (that.$set(that.crud.query, 'userId', Number(userId))) |
| | | travelStartTime && (that.$set(that.crud.query, 'travelStartTime', travelStartTime)) |
| | | travelEndTime && (that.$set(that.crud.query, 'travelEndTime', travelEndTime)) |
| | | // 执行查询 |
| | | that.crud.toQuery() |
| | | that.$router.replace({ path: that.$route.path, query: {}}) |
| | | }, |
| | | methods: { |
| | | // 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
| | |
| | | components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, cpApprovalDelDialog }, |
| | | mixins: [presenter(), header(), form(defaultForm), crud()], |
| | | cruds() { |
| | | return CRUD({ title: '考勤加班', url: 'api/attendanceOvertime', idField: 'id', sort: 'id,desc', crudMethod: { ...crudAttendanceOvertime }}) |
| | | return CRUD({ title: '考勤加班', url: 'api/attendanceOvertime', idField: 'id', sort: 'id,desc', crudMethod: { ...crudAttendanceOvertime }, queryOnPresenterCreated: false }) |
| | | }, |
| | | dicts: [constant.OVERTIME_STATUS, constant.APPROVAL_SITE_TYPE], |
| | | data() { |
| | |
| | | that.wecomApprovalVisible = true |
| | | } |
| | | }) |
| | | |
| | | // 从路由中获取参数 |
| | | const { userId, overtimeStartTime, overtimeEndTime } = that.$route.query |
| | | // 将参数注入到查询参数中 |
| | | userId && (that.$set(that.crud.query, 'userId', Number(userId))) |
| | | overtimeStartTime && overtimeEndTime && (that.$set(that.crud.query, 'overtimeStartTime', [overtimeStartTime, overtimeEndTime])) |
| | | overtimeStartTime && overtimeEndTime && (that.$set(that.crud.query, 'overtimeEndTime', [overtimeStartTime, overtimeEndTime])) |
| | | // 执行查询 |
| | | that.crud.toQuery() |
| | | that.$router.replace({ path: that.$route.path, query: {}}) |
| | | }, |
| | | methods: { |
| | | // 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
| | |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="travelAllowance" label="其他补助(出差)" width="110"> |
| | | <template slot-scope="scope"> |
| | | {{ crud.toMoney((scope.row.travelAllowance == null ? 0 : scope.row.travelAllowance)) }} |
| | | <el-link type="primary" class="fs-12" @click="$router.push({ path: '/attendance/attendanceBusinessTravel', query: { userId: scope.row.userId, travelStartTime: scope.row.salaryYearMonth, travelEndTime: getMonthLastDay(scope.row.salaryYearMonth) } })"> |
| | | {{ crud.toMoney((scope.row.travelAllowance == null ? 0 : scope.row.travelAllowance)) }} |
| | | </el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="overtimeAllowance" label="其他补助(加班)" width="110"> |
| | |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="comptimeAllowance" label="其他补助(调休)" width="110"> |
| | | <template slot-scope="scope"> |
| | | {{ crud.toMoney((scope.row.comptimeAllowance == null ? 0 : scope.row.comptimeAllowance)) }} |
| | | <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) } })"> |
| | | {{ crud.toMoney((scope.row.comptimeAllowance == null ? 0 : scope.row.comptimeAllowance)) }} |
| | | </el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="preTaxAmount" label="税前金额" width="100"> |
| | |
| | | tempList.push(temp[e[i].length - 1]) |
| | | } |
| | | this.selval = tempList |
| | | }, |
| | | // 获取当月最后一天 |
| | | getMonthLastDay(dateStr) { |
| | | const date = new Date(dateStr) |
| | | // 获取当月最后一天 |
| | | const lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0) |
| | | // 设置为 23:59:59 |
| | | lastDay.setHours(23, 59, 59, 999) |
| | | // 格式化为字符串 |
| | | return this.parseTime(lastDay, '{y}-{m}-{d} {h}:{i}:{s}') |
| | | } |
| | | } |
| | | } |
| | |
| | | color: red; |
| | | font-size: 12px; |
| | | } |
| | | .fs-12 { |
| | | font-size: 12px; |
| | | } |
| | | </style> |