|
|
@@ -75,7 +75,7 @@ import { onMounted, onUnmounted, ref } from 'vue'
|
|
|
import { androidFocus, getHeader, goBack, playVoiceBin, scanError, scanSuccess } from '@/utils/android'
|
|
|
import { closeListener, openListener, scanInit } from '@/utils/keydownListener'
|
|
|
import { useStore } from '@/store/modules/user'
|
|
|
-import { showNotify } from 'vant'
|
|
|
+import { showConfirmDialog, showNotify } from 'vant'
|
|
|
import { barcodeToUpperCase, toMap } from '@/utils/dataType'
|
|
|
import InputBarcode from '@/views/outbound/picking/components/InputBarcode.vue'
|
|
|
import Box from '@/views/haikang/putaway/components/Box.vue'
|
|
|
@@ -323,14 +323,39 @@ const setPutaway=async (type)=>{
|
|
|
}
|
|
|
goBackRef.value?.show(workBinNo.value,activeType,count.value,barcodeActive.value)
|
|
|
}else if(type==1){
|
|
|
- if(!barcodeActive.value.container){
|
|
|
+ if(locationDetailList.value.length==0){
|
|
|
scanType.value = 1
|
|
|
- tips.value = `请先扫描商品条码,查询待上架信息`
|
|
|
- showNotify({ type: 'danger', duration: 3000, message: `请先扫描商品条码,查询待上架信息` })
|
|
|
+ tips.value = `请先扫描料箱编号`
|
|
|
+ showNotify({ type: 'danger', duration: 3000, message: `请先扫描料箱编号,查询待上架信息` })
|
|
|
scanError()
|
|
|
return false
|
|
|
}
|
|
|
- goBackRef.value?.show(workBinNo.value,'1','', {})
|
|
|
+ showConfirmDialog({
|
|
|
+ title: '料箱回库',
|
|
|
+ message: `${ workBinNo.value },是否执行料箱回库?`,
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ showLoading()
|
|
|
+ const {container,asnCode}=locationDetailList.value[0]
|
|
|
+ boxReturn({warehouse,container,boxCode:workBinNo.value,externalCode:asnCode}).then(res=>{
|
|
|
+ closeLoading()
|
|
|
+ scanSuccess()
|
|
|
+ tips.value = `料箱回库成功,请继续扫描料箱编号`
|
|
|
+ showNotify({ type: 'success', duration: 3000, message: `料箱回库成功,请继续扫描料箱编号` })
|
|
|
+ reset()
|
|
|
+ barcodeActive.value={}
|
|
|
+ workBinNo.value=''
|
|
|
+ searchBarcode.value=''
|
|
|
+ searchLocation.value=''
|
|
|
+ scanType.value = 1
|
|
|
+ }).catch(err=>{
|
|
|
+ closeLoading()
|
|
|
+ scanError()
|
|
|
+ tips.value =err.message
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ // goBackRef.value?.show(workBinNo.value,'1','', {})
|
|
|
}
|
|
|
}
|
|
|
const setGoBack=async (item)=>{
|