|
@@ -225,12 +225,14 @@ const validateCustomPutawayLocation = async (locationCode) => {
|
|
|
if (isScannedLocationInRecommendedList(locationCode)) return true
|
|
if (isScannedLocationInRecommendedList(locationCode)) return true
|
|
|
const batchItem = barcodeActiveList.value[0]
|
|
const batchItem = barcodeActiveList.value[0]
|
|
|
if (!batchItem) return false
|
|
if (!batchItem) return false
|
|
|
|
|
+ if(!searchLocation.value) return false
|
|
|
try {
|
|
try {
|
|
|
const res = await existsLocationTypeMaxQty({
|
|
const res = await existsLocationTypeMaxQty({
|
|
|
warehouse,
|
|
warehouse,
|
|
|
owner: batchItem.owner,
|
|
owner: batchItem.owner,
|
|
|
sku: batchItem.sku,
|
|
sku: batchItem.sku,
|
|
|
location: locationCode,
|
|
location: locationCode,
|
|
|
|
|
+ locationUse:locationType.value
|
|
|
})
|
|
})
|
|
|
if (res?.data === true) {
|
|
if (res?.data === true) {
|
|
|
showNotify({ type: 'warning', duration: 3000, message: '请按系统推荐库位上架' })
|
|
showNotify({ type: 'warning', duration: 3000, message: '请按系统推荐库位上架' })
|
|
@@ -303,7 +305,7 @@ const syncLastChangeLocationTypeFromList = () => {
|
|
|
const resolveChangeLocationType = (larger) => {
|
|
const resolveChangeLocationType = (larger) => {
|
|
|
const fromList = pickLocationTypeFromList(larger)
|
|
const fromList = pickLocationTypeFromList(larger)
|
|
|
if (fromList) return fromList
|
|
if (fromList) return fromList
|
|
|
- if (larger && lastChangeLocationType.value) return lastChangeLocationType.value
|
|
|
|
|
|
|
+ if (lastChangeLocationType.value) return lastChangeLocationType.value
|
|
|
return ''
|
|
return ''
|
|
|
}
|
|
}
|
|
|
//换一换使用的库位类型(换大的或换小的)
|
|
//换一换使用的库位类型(换大的或换小的)
|
|
@@ -776,6 +778,9 @@ const changeLocationPickerRef = ref(null)
|
|
|
const getChangeLocationDisabledState = () => {
|
|
const getChangeLocationDisabledState = () => {
|
|
|
const noLargerType = !pickLocationTypeFromList(true)
|
|
const noLargerType = !pickLocationTypeFromList(true)
|
|
|
const noSmallerType = !pickLocationTypeFromList(false)
|
|
const noSmallerType = !pickLocationTypeFromList(false)
|
|
|
|
|
+ if (noLargerType && noSmallerType && !lastChangeLocationType.value) {
|
|
|
|
|
+ return { disableLarger: true, disableSmaller: true }
|
|
|
|
|
+ }
|
|
|
return {
|
|
return {
|
|
|
disableLarger: noLargerType && lastChangeLocationDirection.value === true,
|
|
disableLarger: noLargerType && lastChangeLocationDirection.value === true,
|
|
|
disableSmaller: noSmallerType && lastChangeLocationDirection.value === false,
|
|
disableSmaller: noSmallerType && lastChangeLocationDirection.value === false,
|