瀏覽代碼

海康-上架格口播报

zhaohuanhuan 9 月之前
父節點
當前提交
9bd73a8ee3
共有 1 個文件被更改,包括 10 次插入4 次删除
  1. 10 4
      src/views/haikang/putaway/putaway/index.vue

+ 10 - 4
src/views/haikang/putaway/putaway/index.vue

@@ -72,7 +72,7 @@
 </template>
 <script setup lang="ts">
 import { onMounted, onUnmounted, ref } from 'vue'
-import { getHeader, goBack, scanError, scanSuccess } from '@/utils/android'
+import { 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'
@@ -173,12 +173,18 @@ const _handlerScan = (code) => {
             locationBarcodeBinList.value.push(item.bin)
           })
           locationBarcodeBinList.value = [...new Set(locationBarcodeBinList.value)]
+          if(locationBarcodeBinList.value.length==1){
+            playVoiceBin(Number(locationBarcodeBinList.value[0]))
+          }else {
+            scanSuccess()
+          }
         } else {
+          scanSuccess()
           equipmentTrueFalseBy.value=true
         }
         scanType.value = 2
         tips.value = `请扫描商品条码`
-        scanSuccess()
+
       }else{
         scanError()
         tips.value = `${workBinNo.value},待上架任务已取消`
@@ -217,8 +223,8 @@ const _handlerScan = (code) => {
         scanType.value = 3
         count.value=1
         // countRef.value?.focus()
-        tips.value = `请输入上架数量`
-      scanError()
+        tips.value = `请输入上架数量`
+      scanSuccess()
     } else {
       count.value=''
       searchBarcode.value = ''