| | |
| | | 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"> |
| | |
| | | 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(""); |
| | |
| | | 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> |
| | | |