|
|
@@ -182,9 +182,14 @@ import { closeLoading, showLoading } from '@/utils/loading'
|
|
|
import nodataUrl from '@/assets/nodata.png'
|
|
|
import { showNotify, showToast } from 'vant'
|
|
|
import { barcodeToUpperCase } from '@/utils/dataType.js'
|
|
|
-import { errorMessages } from '@vue/compiler-sfc'
|
|
|
const router = useRouter()
|
|
|
const store = useStore()
|
|
|
+try {
|
|
|
+ getHeader()
|
|
|
+ androidFocus()
|
|
|
+} catch (error) {
|
|
|
+ router.push('/login')
|
|
|
+}
|
|
|
const warehouse = store.warehouse
|
|
|
const pattern=/^[1-9]\d*$/
|
|
|
// 容器号和扫描类型的状态
|
|
|
@@ -210,12 +215,6 @@ const countRef=ref(null)
|
|
|
const back=ref(true)
|
|
|
// 页面初始化
|
|
|
onMounted(() => {
|
|
|
- try {
|
|
|
- getHeader()
|
|
|
- androidFocus()
|
|
|
- } catch (error) {
|
|
|
- router.push('/login')
|
|
|
- }
|
|
|
openListener()
|
|
|
scanInit(_handlerScan)
|
|
|
loadData()
|
|
|
@@ -228,6 +227,8 @@ const setBarcode = (code) => {
|
|
|
return
|
|
|
}
|
|
|
const checkContainer = `FJ-${warehouse}-`
|
|
|
+ console.log(warehouse,"warehouse")
|
|
|
+ console.log(code,"code")
|
|
|
if (!code.includes(checkContainer)) {
|
|
|
scanError()
|
|
|
setTimeout(()=>{
|
|
|
@@ -438,6 +439,10 @@ const onSelectMode = async (value) => {
|
|
|
|
|
|
// 数据刷新
|
|
|
const loadData = () => {
|
|
|
+ if(searchBarcode.value){
|
|
|
+ _getInventoryList(searchBarcode.value)
|
|
|
+ return
|
|
|
+ }
|
|
|
inputBarcodeType.value = ''
|
|
|
if (!containerNo.value) {
|
|
|
inputBarcodeRef.value?.show('', '请扫描反拣容器号')
|
|
|
@@ -450,7 +455,7 @@ onUnmounted(() => {
|
|
|
closeListener()
|
|
|
})
|
|
|
|
|
|
-window.onRefresh = searchBarcode.value?_getInventoryList(searchBarcode.value):loadData
|
|
|
+window.onRefresh = loadData
|
|
|
</script>
|
|
|
|
|
|
<style lang="sass" scoped>
|