diff --git a/src/components/oa/staffAttendanceReplenishCheckIn.vue b/src/components/oa/staffAttendanceReplenishCheckIn.vue index 1596296..e6c7203 100644 --- a/src/components/oa/staffAttendanceReplenishCheckIn.vue +++ b/src/components/oa/staffAttendanceReplenishCheckIn.vue @@ -54,6 +54,13 @@ export default { }, methods: { open(details) { + details.forEach(item => { + if(item.specCd === '1001'){ + item.specName = this.$t('staffAttendance.work') + }else{ + item.specName = this.$t('staffAttendance.offWork') + } + }) this.details = details || [] this.form = { detailId: '', diff --git a/src/components/org/addScheduleClassesStaff.vue b/src/components/org/addScheduleClassesStaff.vue index 5f05402..1a24b31 100644 --- a/src/components/org/addScheduleClassesStaff.vue +++ b/src/components/org/addScheduleClassesStaff.vue @@ -45,10 +45,13 @@ export default { scheduleId: this.scheduleId, staffs: this.staffs } - await saveScheduleClassesStaff(params) - this.$message.success(this.$t('common.operationSuccess')) + const {code,msg} = await saveScheduleClassesStaff(params) + if(code === 0){ this.$emit('success') this.visible = false + }else{ + this.$message.error(msg) + } } catch (error) { this.$message.error(this.$t('common.saveError')) } diff --git a/src/views/contract/addContractList.vue b/src/views/contract/addContractList.vue index 8da94fc..df988a7 100644 --- a/src/views/contract/addContractList.vue +++ b/src/views/contract/addContractList.vue @@ -214,7 +214,7 @@
- +
diff --git a/src/views/oa/monthAttendanceManageList.vue b/src/views/oa/monthAttendanceManageList.vue index ad19b17..3c3ae09 100644 --- a/src/views/oa/monthAttendanceManageList.vue +++ b/src/views/oa/monthAttendanceManageList.vue @@ -228,11 +228,9 @@ export default { pagePath: 'monthAttendance' } await exportMonthAttendance(params) - this.$message.success(this.$t('common.operationSuccess')) + this.$router.push('/pages/property/downloadTempFile?tab=下载中心') } catch (error) { this.$message.error(this.$t('monthAttendance.exportError')) - } finally { - this.loading = false } }, diff --git a/src/views/oa/staffAttendanceManageList.vue b/src/views/oa/staffAttendanceManageList.vue index 6f55080..6450b30 100644 --- a/src/views/oa/staffAttendanceManageList.vue +++ b/src/views/oa/staffAttendanceManageList.vue @@ -38,32 +38,34 @@
- -
- {{ staffAttendanceManageInfo.curYear }}-{{ staffAttendanceManageInfo.curMonth }}-{{ index }} -
+
+
+ {{ staffAttendanceManageInfo.curYear }}-{{ staffAttendanceManageInfo.curMonth }}-{{ index }} +
-
- {{ $t('staffAttendance.replenish') }} -
+
+ {{ $t('staffAttendance.replenish') }} +
-
-
{{ item.rest }}
-
- {{ item.specCd === '1001' ? $t('staffAttendance.work') : $t('staffAttendance.offWork') }}: - {{ formatTime(item.checkTime) }} - - - ({{ item.stateName }}) +
+
{{ item.rest }}
+
+ {{ item.specCd === '1001' ? $t('staffAttendance.work') : $t('staffAttendance.offWork') }}: + {{ formatTime(item.checkTime) }} + - + ({{ item.stateName }}) +
-
- @@ -76,7 +78,7 @@ - +
@@ -177,6 +179,7 @@ export default { const { data } = await queryAttendanceClassesTask(params) this.staffAttendanceManageInfo.attendances = data || [] + console.log(this.staffAttendanceManageInfo.attendances) } catch (error) { console.error('Failed to load staff attendances:', error) } @@ -199,8 +202,12 @@ export default { getDayAttendance(day) { if (!this.staffAttendanceManageInfo.attendances) return null + const attendance = this.staffAttendanceManageInfo.attendances.find(item => item.taskDay == day) - return this.staffAttendanceManageInfo.attendances.find(item => item.taskDay === day) || null + if (!attendance) { + return null + } + return attendance }, getAttendanceDetail(day) { @@ -306,11 +313,39 @@ export default { } .attendance-grid { + + .attendance-day { padding: 10px; margin-bottom: 20px; border-radius: 4px; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); + height: 120px; + + .labeling-strip { + position: relative; + + .strip { + position: absolute; + top: 0; + right: 0; + background-color: #409eff; + color: #fff; + padding: 4px 8px; + font-size: 12px; + border-radius: 0 4px 0 4px; + cursor: pointer; + z-index: 1; + + &:hover { + background-color: #66b1ff; + } + + span { + white-space: nowrap; + } + } + } .day-header { font-weight: bold; @@ -318,6 +353,10 @@ export default { text-align: center; } + + + + .replenish-btn { color: #409eff; cursor: pointer;