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 } // 获取编码列表