Przeglądaj źródła

海康-增加入参

zhaohuanhuan 8 miesięcy temu
rodzic
commit
56f13afc6c

+ 4 - 0
src/types/haikang.ts

@@ -68,6 +68,10 @@ export interface setBindAllocateWallType {
    * 分拨墙
    */
   equipment: string;
+  /**
+   * asn单号
+   */
+  asnNo: string;
   /**
    * 库位
    */

+ 7 - 9
src/views/haikang/boxReturn/boxReturn/index.vue

@@ -61,8 +61,6 @@ const tips=ref('请扫描料箱')
 const scanType = ref(1)
 const scanBox=ref('')
 const scanStation=ref('')
-const store = useStore()
-const warehouse = store.warehouse
 try {
   getHeader()
 } catch (error) {
@@ -71,8 +69,9 @@ try {
 onMounted(() => {
   openListener()
   scanInit(_handlerScan)
-
 })
+const store = useStore()
+const warehouse = store.warehouse
 const active=ref('1')
 // 扫描条码监听
 const _handlerScan = (code) => {
@@ -120,9 +119,8 @@ const _createHikBoxInboundTask=()=>{
       scanSuccess()
     }
   }).catch(err=>{
-    tips.value='料箱入库失败,请重新扫描工作站点'
+    tips.value=err.message
     scanStation.value=''
-    showNotify({ type: 'danger', duration: 3000, message:'料箱入库失败,请重新扫描工作站点' })
     scanError()
   }).finally(()=>{
     closeLoading()
@@ -132,7 +130,8 @@ const _boxAndStationUnbindTask=()=>{
   const data={
     warehouse,
     boxCode:scanBox.value,
-    stationCode:scanStation.value
+    stationCode:scanStation.value,
+
   }
   showLoading()
   boxAndStationUnbindTask(data).then(res=>{
@@ -141,13 +140,12 @@ const _boxAndStationUnbindTask=()=>{
       scanType.value=1
       scanBox.value=''
       scanStation.value=''
-      showNotify({ type: 'success', duration: 3000, message:'料箱入库成功,请继续扫描需要入库料箱' })
+      showNotify({ type: 'success', duration: 3000, message:'料箱解绑成功,请继续扫描需要入库料箱' })
       scanSuccess()
     }
   }).catch(err=>{
-    tips.value='料箱解绑失败,请重新扫描工作站点'
+    tips.value=err.message
     scanStation.value=''
-    showNotify({ type: 'danger', duration: 3000, message:'料箱解绑失败,请重新扫描工作站点' })
     scanError()
   }).finally(()=>{
     closeLoading()

+ 2 - 4
src/views/haikang/putaway/dispatch/index.vue

@@ -117,9 +117,6 @@ import { useStore } from '@/store/modules/user'
 import { getRecommendedLocation, getWaitPutawayList, setBindAllocateWall } from '@/api/haikang'
 import { barcodeToUpperCase } from '@/utils/dataType'
 import { closeLoading, showLoading } from '@/utils/loading'
-
-
-const store = useStore()
 try {
   getHeader()
   androidFocus()
@@ -131,6 +128,7 @@ onMounted(() => {
   scanInit(_handlerScan)
   loadData()
 })
+const store = useStore()
 const warehouse = store.warehouse
 //收货容器号
 const containerNo = ref('')
@@ -294,7 +292,7 @@ const setLocation = (item) => {
       container: containerNo.value,
       barcode: barcodeActive.value.barcode,
       barcodeAS: barcodeActive.value.barcodeAs,
-      asnNo: barcodeActive.value.asnNo,
+      asnCode: barcodeActive.value.asnNo,
       sku: barcodeActive.value.sku,
       location: locationActive.value[0].location,
       lotNum: barcodeActive.value.lotNumber,

+ 8 - 8
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, playVoiceBin, scanError, scanSuccess } from '@/utils/android'
+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'
@@ -82,10 +82,9 @@ import Box from '@/views/haikang/putaway/components/Box.vue'
 import GoBack from '@/views/haikang/putaway/components/GoBack.vue'
 import { boxReturn, getShelveItemInfo, outboundEmptyBoxAndBindTask, setBoxInboundInventory } from '@/api/haikang'
 import { closeLoading, showLoading } from '@/utils/loading'
-const store = useStore()
-const warehouse = store.warehouse
 try {
   getHeader()
+  androidFocus()
 } catch (error) {
 }
 // 页面初始化
@@ -94,7 +93,8 @@ onMounted(() => {
   scanInit(_handlerScan)
   loadData()
 })
-
+const store = useStore()
+const warehouse = store.warehouse
 const dataList=ref([])
 
 //料箱编号
@@ -338,8 +338,8 @@ const setGoBack=async (item)=>{
   const res= await _setBoxInboundInventory()
   if(res){
     if(item.active==1){
-      const {warehouse,container,boxCode}=barcodeActive.value
-      const boxRes= await boxReturn({warehouse,container,boxCode})
+      const {warehouse,container,boxCode,asnCode}=barcodeActive.value
+      const boxRes= await boxReturn({warehouse,container,boxCode,externalCode:asnCode})
       if(boxRes){
         reset()
         barcodeActive.value={}
@@ -352,8 +352,8 @@ const setGoBack=async (item)=>{
         scanSuccess()
       }
     }else if(item.active==2){
-      const {warehouse,container,boxCode,lotNum}=barcodeActive.value
-      const boxRes= await outboundEmptyBoxAndBindTask({warehouse,container,originalBoxCode:boxCode,lotNum,boxType:item.bin,boxEmpty:item.boxEmpty}).catch((err=>{
+      const {warehouse,container,boxCode,lotNum,asnCode}=barcodeActive.value
+      const boxRes= await outboundEmptyBoxAndBindTask({warehouse,container,originalBoxCode:boxCode,lotNum,boxType:item.bin,boxEmpty:item.boxEmpty,externalCode:asnCode}).catch((err=>{
         reset()
         barcodeActive.value={}
         workBinNo.value=''