|
@@ -111,7 +111,7 @@
|
|
|
</van-search>
|
|
</van-search>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="barcode-input location-type-row" v-if="systemForcePublishEnabled" >
|
|
<div class="barcode-input location-type-row" v-if="systemForcePublishEnabled" >
|
|
|
- <van-cell title="上架区域:" :value="locationTypeLabel" is-link @click="locationTypeSheetShow = true" />
|
|
|
|
|
|
|
+ <van-cell title="上架区域:" :value="locationTypeLabel" is-link @click="locationTypeSheetShow = true" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="take-lot" v-if="barcodeActiveList.length>0">
|
|
<div class="take-lot" v-if="barcodeActiveList.length>0">
|
|
@@ -154,7 +154,7 @@
|
|
|
</van-cell>
|
|
</van-cell>
|
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
|
</van-action-sheet>
|
|
</van-action-sheet>
|
|
|
- <!-- 库位类型选择-->
|
|
|
|
|
|
|
+ <!-- 上架区域-->
|
|
|
<van-action-sheet v-model:show="locationTypeSheetShow" cancel-text="取消" description="上架区域"
|
|
<van-action-sheet v-model:show="locationTypeSheetShow" cancel-text="取消" description="上架区域"
|
|
|
close-on-click-action>
|
|
close-on-click-action>
|
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
@@ -163,8 +163,17 @@
|
|
|
<van-cell title="存储区" @click="onSelectLocationType('STORAGE')" />
|
|
<van-cell title="存储区" @click="onSelectLocationType('STORAGE')" />
|
|
|
<van-cell title="退货区" @click="onSelectLocationType('RETURN')" />
|
|
<van-cell title="退货区" @click="onSelectLocationType('RETURN')" />
|
|
|
<van-cell title="挂装区" @click="onSelectLocationType('HANGING')" />
|
|
<van-cell title="挂装区" @click="onSelectLocationType('HANGING')" />
|
|
|
|
|
+ <van-cell title="周转区" @click="onSelectLocationType('ZZ')" />
|
|
|
|
|
+ <van-cell title="叠装区" @click="onSelectLocationType('DZ')" />
|
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
|
</van-action-sheet>
|
|
</van-action-sheet>
|
|
|
|
|
+ <!-- 库位类型-->
|
|
|
|
|
+ <location-type-picker
|
|
|
|
|
+ ref="changeLocationTypePickerRef"
|
|
|
|
|
+ :warehouse="warehouse"
|
|
|
|
|
+ description="选择库位类型"
|
|
|
|
|
+ @confirm="doChangeLocationWithType"
|
|
|
|
|
+ />
|
|
|
<!-- 组合商品上架数量-->
|
|
<!-- 组合商品上架数量-->
|
|
|
<barcode-combine ref="barcodeCombineRef" @setCombine="setPutawayCombine" @cancel="onCombineCancel" :matched-sku="combineMatchedSku" />
|
|
<barcode-combine ref="barcodeCombineRef" @setCombine="setPutawayCombine" @cancel="onCombineCancel" :matched-sku="combineMatchedSku" />
|
|
|
</template>
|
|
</template>
|
|
@@ -175,6 +184,7 @@ import { androidFocus, getHeader, goBack, scanError, scanSuccess } from '@/utils
|
|
|
import InputBarcode from '@/views/outbound/picking/components/InputBarcode.vue'
|
|
import InputBarcode from '@/views/outbound/picking/components/InputBarcode.vue'
|
|
|
import LocationList from '@/views/inbound/putaway/components/LocationList.vue'
|
|
import LocationList from '@/views/inbound/putaway/components/LocationList.vue'
|
|
|
import BarcodeCombine from '@/views/inbound/putaway/components/BarcodeCombine.vue'
|
|
import BarcodeCombine from '@/views/inbound/putaway/components/BarcodeCombine.vue'
|
|
|
|
|
+import LocationTypePicker from '@/views/inbound/putaway/components/LocationTypePicker.vue'
|
|
|
import { openListener,closeListener,scanInit } from '@/utils/keydownListener.js'
|
|
import { openListener,closeListener,scanInit } from '@/utils/keydownListener.js'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
import { closeLoading, showLoading } from '@/utils/loading'
|
|
import { closeLoading, showLoading } from '@/utils/loading'
|
|
@@ -351,6 +361,7 @@ const setBarcode = (code, type) => {
|
|
|
formattedTime.value = '00:00:00'
|
|
formattedTime.value = '00:00:00'
|
|
|
totalSeconds.value = 0
|
|
totalSeconds.value = 0
|
|
|
locationType.value = ''
|
|
locationType.value = ''
|
|
|
|
|
+ changeLocationTypePickerRef.value?.clearCache()
|
|
|
}
|
|
}
|
|
|
const params = { warehouseId:warehouse, containerId: code }
|
|
const params = { warehouseId:warehouse, containerId: code }
|
|
|
getWaitPutawayListNew(params).then(res => {
|
|
getWaitPutawayListNew(params).then(res => {
|
|
@@ -458,6 +469,7 @@ const switchTask = () => {
|
|
|
back.value = false
|
|
back.value = false
|
|
|
if (systemForcePublishEnabled.value) excludedLocations.value = {}
|
|
if (systemForcePublishEnabled.value) excludedLocations.value = {}
|
|
|
locationType.value = ''
|
|
locationType.value = ''
|
|
|
|
|
+ changeLocationTypePickerRef.value?.clearCache()
|
|
|
inputBarcodeRef.value?.show('', `请扫描容器号`, '')
|
|
inputBarcodeRef.value?.show('', `请扫描容器号`, '')
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -473,11 +485,13 @@ const combineMatchedSku = ref([])
|
|
|
const excludedLocations = ref({})
|
|
const excludedLocations = ref({})
|
|
|
// 换一换按钮 loading
|
|
// 换一换按钮 loading
|
|
|
const changeLocationLoading = ref(false)
|
|
const changeLocationLoading = ref(false)
|
|
|
-// 库位类型,默认全部
|
|
|
|
|
|
|
+// 上架区域,默认全部
|
|
|
const locationType = ref('')
|
|
const locationType = ref('')
|
|
|
const locationTypeSheetShow = ref(false)
|
|
const locationTypeSheetShow = ref(false)
|
|
|
|
|
+const changeLocationTypePickerRef = ref(null)
|
|
|
const locationTypeLabel = computed(() => {
|
|
const locationTypeLabel = computed(() => {
|
|
|
- const map = { PICKING: '拣货位', STORAGE: '存储位', RETURN: '退货区', HANGING: '挂装区' }
|
|
|
|
|
|
|
+ const map = { PICKING: '拣货位', STORAGE: '存储位', RETURN: '退货区', HANGING: '挂装区',ZZ: '周转区', DZ: '叠装区'
|
|
|
|
|
+}
|
|
|
return locationType.value ? map[locationType.value] : '全部'
|
|
return locationType.value ? map[locationType.value] : '全部'
|
|
|
})
|
|
})
|
|
|
const onSelectLocationType = async (value = '') => {
|
|
const onSelectLocationType = async (value = '') => {
|
|
@@ -631,6 +645,7 @@ const _getRecommendedLocation = async (item, options = {}) => {
|
|
|
const total = barcodeQuantity(barcodeActiveList.value)
|
|
const total = barcodeQuantity(barcodeActiveList.value)
|
|
|
const params = { warehouse, lotNum: lotNumber, owner, sku, qty: total, lotAtt08 }
|
|
const params = { warehouse, lotNum: lotNumber, owner, sku, qty: total, lotAtt08 }
|
|
|
if (locationType.value) params.locationUse = locationType.value
|
|
if (locationType.value) params.locationUse = locationType.value
|
|
|
|
|
+ if (options.changeTypeName) params.locationType = options.changeTypeName
|
|
|
if (fromChangeLocation && uniqueLocationIds) params.excludedLocations = uniqueLocationIds
|
|
if (fromChangeLocation && uniqueLocationIds) params.excludedLocations = uniqueLocationIds
|
|
|
const res = await getRecommendedLocationNew(params)
|
|
const res = await getRecommendedLocationNew(params)
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
@@ -656,25 +671,30 @@ const _getRecommendedLocation = async (item, options = {}) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 换一换:请求新的推荐库位,排除当前批次已推荐过的
|
|
|
|
|
-const onChangeLocation = async () => {
|
|
|
|
|
- if (barcodeActiveList.value.length > 0) {
|
|
|
|
|
- changeLocationLoading.value = true
|
|
|
|
|
- try {
|
|
|
|
|
- const item = barcodeActiveList.value[0]
|
|
|
|
|
- const lotNumber = item.lotNumber
|
|
|
|
|
- const currentLoc = locationList.value?.[0]
|
|
|
|
|
- if (currentLoc) {
|
|
|
|
|
- const lotExcluded = excludedLocations.value[lotNumber] || []
|
|
|
|
|
- excludedLocations.value = {
|
|
|
|
|
- ...excludedLocations.value,
|
|
|
|
|
- [lotNumber]: [...lotExcluded, currentLoc]
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// 换一换:先选库位类型,再请求新的推荐库位
|
|
|
|
|
+const onChangeLocation = () => {
|
|
|
|
|
+ if (barcodeActiveList.value.length === 0) return
|
|
|
|
|
+ changeLocationTypePickerRef.value?.show(warehouse)
|
|
|
|
|
+}
|
|
|
|
|
+const doChangeLocationWithType = async (item) => {
|
|
|
|
|
+ if (barcodeActiveList.value.length === 0) return
|
|
|
|
|
+ changeLocationLoading.value = true
|
|
|
|
|
+ try {
|
|
|
|
|
+ const batchItem = barcodeActiveList.value[0]
|
|
|
|
|
+ const lotNumber = batchItem.lotNumber
|
|
|
|
|
+ const currentLoc = locationList.value?.[0]
|
|
|
|
|
+ if (currentLoc) {
|
|
|
|
|
+ const lotExcluded = excludedLocations.value[lotNumber] || []
|
|
|
|
|
+ excludedLocations.value = {
|
|
|
|
|
+ ...excludedLocations.value,
|
|
|
|
|
+ [lotNumber]: [...lotExcluded, currentLoc]
|
|
|
}
|
|
}
|
|
|
- await _getRecommendedLocation(item, { fromChangeLocation: true })
|
|
|
|
|
- } finally {
|
|
|
|
|
- changeLocationLoading.value = false
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ const reqOpts = { fromChangeLocation: true }
|
|
|
|
|
+ if (item?.value) reqOpts.changeTypeName = item.value
|
|
|
|
|
+ await _getRecommendedLocation(batchItem, reqOpts)
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ changeLocationLoading.value = false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const numberRef = ref(null)
|
|
const numberRef = ref(null)
|