根据jiJuType 控制是否能够出库
This commit is contained in:
parent
17655f9b2f
commit
c3a4f88a5b
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取编码列表
|
// 获取编码列表
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue