From c3a4f88a5b66f3453eef882b6464ca82e50fcc18 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Mon, 28 Jul 2025 14:15:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AEjiJuType=20=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E8=83=BD=E5=A4=9F=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/picking/outbound/code-outbound.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/picking/outbound/code-outbound.vue b/src/pages/picking/outbound/code-outbound.vue index 9a7a031..07e4769 100644 --- a/src/pages/picking/outbound/code-outbound.vue +++ b/src/pages/picking/outbound/code-outbound.vue @@ -95,7 +95,7 @@ :checked="item.checked" :disabled=" (maxNum === isSelectNum && !item.checked) || - isWithinOneMonth(item.nextCheckTime) + (isWithinOneMonth(item.nextCheckTime) && item.jiJuType == 2) " style="transform: scale(0.7)" /> @@ -213,16 +213,16 @@ onShow(() => { }) const isWithinOneMonth = (dateStr) => { - if (!dateStr) { - return false - } + if (!dateStr) return false + const inputDate = new Date(dateStr) const today = new Date() today.setHours(0, 0, 0, 0) // 清除时分秒 - const futureLimit = new Date(today) - futureLimit.setDate(today.getDate() + 30) - return inputDate >= today && inputDate <= futureLimit + const diffTime = inputDate.getTime() - today.getTime() + const diffDays = diffTime / (1000 * 60 * 60 * 24) + + return diffDays <= 30 } // 获取编码列表