根据jiJuType 控制是否能够出库

This commit is contained in:
bb_pan 2025-07-28 14:15:56 +08:00
parent 17655f9b2f
commit c3a4f88a5b
1 changed files with 7 additions and 7 deletions

View File

@ -95,7 +95,7 @@
:checked="item.checked" :checked="item.checked"
:disabled=" :disabled="
(maxNum === isSelectNum && !item.checked) || (maxNum === isSelectNum && !item.checked) ||
isWithinOneMonth(item.nextCheckTime) (isWithinOneMonth(item.nextCheckTime) && item.jiJuType == 2)
" "
style="transform: scale(0.7)" style="transform: scale(0.7)"
/> />
@ -213,16 +213,16 @@ onShow(() => {
}) })
const isWithinOneMonth = (dateStr) => { const isWithinOneMonth = (dateStr) => {
if (!dateStr) { if (!dateStr) return false
return false
}
const inputDate = new Date(dateStr) const inputDate = new Date(dateStr)
const today = new Date() const today = new Date()
today.setHours(0, 0, 0, 0) // 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
} }
// //