From 1206b29adb97f98cbd14c1d9c91117c1f432e57e Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期六, 31 十月 2026 11:22:56 +0800
Subject: [PATCH] 考勤打卡功能开发
---
src/pages/hrm/attendance-clock/index.vue | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/pages/hrm/attendance-clock/index.vue b/src/pages/hrm/attendance-clock/index.vue
index 5c8df9c..b5872df 100644
--- a/src/pages/hrm/attendance-clock/index.vue
+++ b/src/pages/hrm/attendance-clock/index.vue
@@ -232,6 +232,12 @@
"褰撳墠鐢ㄦ埛"
);
const department = computed(() => status.value?.deptName || "鏈垎閰嶉儴闂�");
+ const onLeave = computed(() => status.value?.onLeave === true || record.value?.leaveFlag === true);
+ const leaveText = computed(() => {
+ const names = status.value?.leaveTypeNames || "璇峰亣";
+ const hours = Number(status.value?.leaveHours ?? record.value?.leaveHours ?? 0);
+ return hours > 0 ? `${names} ${hours.toFixed(2)} 灏忔椂` : names;
+ });
const dateLabel = computed(() => {
const rest =
status.value && status.value.workDay === false
@@ -487,6 +493,10 @@
<text class="smart-hint">{{ punch.hint }}</text>
<text class="rule-time">鐝 {{ rule?.workStartTime || "--:--" }} - {{ rule?.workEndTime || "--:--" }}</text>
</view>
+ <view v-if="onLeave" class="leave-alert">
+ <strong>浠婃棩宸茶鍋囷紝濡傞渶涓婄彮鍙甯告墦鍗�</strong>
+ <text>{{ leaveText }} 路 璇峰亣褰撳ぉ鎵撳崱涓嶈杩熷埌銆佹棭閫�鎴栫己鍗�</text>
+ </view>
<!-- #ifdef H5 -->
<view v-if="locationRequired && mapVisible"
class="map-panel">
@@ -614,6 +624,19 @@
align-items: center;
padding: 38rpx 0 30rpx;
}
+ .leave-alert {
+ display: flex;
+ flex-direction: column;
+ gap: 8rpx;
+ padding: 20rpx 24rpx;
+ margin-bottom: 20rpx;
+ color: #245a91;
+ background: #eaf4ff;
+ border: 1rpx solid #b8d8f7;
+ border-radius: 14rpx;
+ }
+ .leave-alert strong { font-size: 27rpx; }
+ .leave-alert text { color: #5d7894; font-size: 23rpx; }
.time {
display: block;
font-size: 66rpx;
--
Gitblit v1.9.3