Ver Fonte

立库-入库-调用高度接口

zhaohuanhuan há 1 mês atrás
pai
commit
f7d186166b

+ 13 - 0
src/api/haikang/index.ts

@@ -155,4 +155,17 @@ export function asrsBoxAndStationUnbindTask(params:any) {
 
 
 
+/**
+ * 立库-高度检测
+ * @param data
+ */
+export function getAsrsHeight() {
+  return request({
+    url: 'http://58.33.243.164:50004/height',
+    method: 'get',
+  })
+}
+
+
+
 

+ 2 - 2
src/utils/request.ts

@@ -51,10 +51,10 @@ service.interceptors.response.use(
         }
         return
       }
-      if(res.code===305 && response.config.url=='api/entryOrder/app/blind/checkBarcodeIgnoreCase'){
+      if(res.code===305 && response.config.url=='api/entryOrder/app/blind/checkBarcodeIgnoreCase' ){
         return res
       }
-      if( response.config.url=='api/wms/fluxPrint/print'){
+      if( response.config.url=='api/wms/fluxPrint/print' ||  response.config.url=='http://58.33.243.164:50004/height'){
           return res
       }
       if(res.message=='找不到此盲收任务'){

+ 11 - 6
src/views/haikang/boxReturn/boxReturn/index.vue

@@ -61,7 +61,7 @@ import {
   asrsBoxAndStationUnbindTask,
   boxAndStationUnbindTask, createAsrsPalletInbound,
   createAsrsShelfInbound,
-  createHikBoxInboundTask
+  createHikBoxInboundTask, getAsrsHeight
 } from '@/api/haikang'
 import { useStore } from '@/store/modules/user'
 import { closeLoading, showLoading } from '@/utils/loading'
@@ -112,11 +112,6 @@ const _handlerScan = (code) => {
   }
 }
 const onActive=(type)=>{
-  // if(type==2 && mode.value=='asrs'){
-  //   scanType.value=2
-  // }else{
-  //   scanType.value=1
-  // }
 }
 const onConfirm=()=>{
   if(!scanBox.value ){
@@ -166,6 +161,13 @@ const _createHikBoxInboundTask=()=>{
       palletCode: scanBox.value
     };
     url = createAsrsPalletInbound;
+  }else if (scanBox.value.startsWith('HK')) {
+    data = {
+      ...baseData,
+      deviceType:'HIK_INBOUND_STATION',
+      boxCode:scanBox.value,
+    };
+    url = createHikBoxInboundTask;
   }
   showLoading()
   url(data).then(res=>{
@@ -175,6 +177,9 @@ const _createHikBoxInboundTask=()=>{
     scanStation.value=''
     showNotify({ type: 'success', duration: 3000, message:'料箱入库成功,请继续扫描需要入库料箱' })
     scanSuccess()
+    if(mode.value=='asrs'){
+      getAsrsHeight().then(res=>{}).catch()
+    }
   }).catch(err=>{
     tips.value=err.message
     scanStation.value=''