From 67e7a7a7440ad764afd43fa27187c09b899245da Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期二, 03 二月 2026 16:15:15 +0800
Subject: [PATCH] 规程资质15天标红

---
 src/pages/safeProduction/safeQualifications/index.vue |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/src/pages/safeProduction/safeQualifications/index.vue b/src/pages/safeProduction/safeQualifications/index.vue
index 4014791..0456efd 100644
--- a/src/pages/safeProduction/safeQualifications/index.vue
+++ b/src/pages/safeProduction/safeQualifications/index.vue
@@ -26,7 +26,8 @@
           v-if="visitList.length > 0">
       <view v-for="(item, index) in visitList"
             :key="index">
-        <view class="ledger-item">
+        <view class="ledger-item"
+              :class="{ 'expiring-soon': isExpiringSoon(item.effectiveTime) }">
           <view class="item-header">
             <view class="item-left">
               <view class="document-icon">
@@ -127,6 +128,17 @@
   import dayjs from "dayjs";
 
   const userStore = useUserStore();
+
+  // 妫�鏌ヨ祫璐ㄦ槸鍚﹀嵆灏嗗埌鏈燂紙鍒版湡鍓�15澶╋級
+  const isExpiringSoon = effectiveTime => {
+    if (!effectiveTime) return false;
+
+    const today = dayjs();
+    const expireDate = dayjs(effectiveTime);
+    const daysDiff = expireDate.diff(today, "day");
+
+    return daysDiff >= 0 && daysDiff <= 15;
+  };
 
   // 鎼滅储鍏抽敭璇�
   const customerName = ref("");
@@ -259,5 +271,20 @@
     background: #667eea; // 淇濇寔椤甸潰鐗规湁鐨勮儗鏅壊
     box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3); // 淇濇寔椤甸潰鐗规湁鐨勯槾褰辨晥鏋�
   }
+
+  // 鍗冲皢鍒版湡鐨勮祫璐ㄥ崱鐗囨牱寮�
+  .expiring-soon {
+    border: 2rpx solid #ff4d4f;
+    box-shadow: 0 2rpx 16rpx rgba(255, 77, 79, 0.2);
+  }
+
+  .expiring-soon .item-header {
+    background-color: rgba(255, 77, 79, 0.05);
+  }
+
+  .expiring-soon .detail-row:last-child .detail-value {
+    color: #ff4d4f;
+    font-weight: 500;
+  }
 </style>
 

--
Gitblit v1.9.3