Parcourir la source

手持-海康快上-增加释放分拨墙,手持-解绑站点-料箱编号改为非必填

zhaohuanhuan il y a 8 mois
Parent
commit
ff2b175833

+ 15 - 3
src/api/haikang/index.ts

@@ -95,9 +95,9 @@ export function createHikBoxInboundTask(data:any) {
   })
 }
 /**
- * 海康-站点解绑
- * @param data
- */
+* 海康-站点解绑
+* @param data
+*/
 export function boxAndStationUnbindTask(params:any) {
   return request({
     url: '/api/wms/robot/task/boxAndStationUnbindTask',
@@ -106,6 +106,18 @@ export function boxAndStationUnbindTask(params:any) {
   })
 }
 
+/**
+ * 结束上架任务
+ * @param data
+ */
+export function finishTask(params:any) {
+  return request({
+    url: '/api/wms/return/inventory/finishTask',
+    method: 'post',
+    params
+  })
+}
+
 
 
 

+ 2 - 3
src/views/haikang/boxReturn/boxReturn/index.vue

@@ -97,7 +97,7 @@ const _handlerScan = (code) => {
   }
 }
 const onConfirm=()=>{
-  if(!scanBox.value){
+  if(!scanBox.value && active.value!=2){
     tips.value='请先扫描料箱编号'
     scanType.value=1
     showNotify({ type: 'danger', duration: 3000, message:'请先扫描料箱编号' })
@@ -152,9 +152,8 @@ const _createHikBoxInboundTask=()=>{
 const _boxAndStationUnbindTask=()=>{
   const data={
     warehouse,
-    boxCode:scanBox.value,
+    boxCode:scanBox.value || undefined,
     stationCode:scanStation.value,
-
   }
   showLoading()
   boxAndStationUnbindTask(data).then(res=>{

+ 20 - 6
src/views/haikang/putaway/dispatch/index.vue

@@ -7,8 +7,7 @@
         <div style="color: #fff">返回</div>
       </template>
       <template #right>
-<!--        {{Object.keys(dataMap).length}}-->
-<!--        <div class="nav-right" @click="onClickRight">提交任务</div>-->
+        <div class="nav-right" style="color: #fff" @click="onClickRight">释放分拨墙</div>
       </template>
     </van-nav-bar>
     <div class="allocation">
@@ -109,12 +108,12 @@
 </template>
 <script setup lang="ts">
 import { onMounted, onUnmounted, ref } from 'vue'
-import { showNotify, showToast } from 'vant'
+import { showConfirmDialog, showNotify, showToast } from 'vant'
 import { androidFocus, getHeader, goBack, playVoiceBin, scanError, scanSuccess } from '@/utils/android'
 import InputBarcode from '@/views/outbound/picking/components/InputBarcode.vue'
 import { closeListener, openListener, scanInit } from '@/utils/keydownListener'
 import { useStore } from '@/store/modules/user'
-import { getRecommendedLocation, getWaitPutawayList, setBindAllocateWall } from '@/api/haikang'
+import { finishTask, getRecommendedLocation, getWaitPutawayList, setBindAllocateWall } from '@/api/haikang'
 import { barcodeToUpperCase } from '@/utils/dataType'
 import { closeLoading, showLoading } from '@/utils/loading'
 try {
@@ -343,9 +342,24 @@ onUnmounted(() => {
 
 window.onRefresh = loadData
 
-//调用上架任务
+//删除分拨
 const onClickRight = () => {
-  console.log('right')
+  showConfirmDialog({
+    title: '温馨提示',
+    message:'您正在进行释放分拨墙是否继续?',
+    keyboardEnabled:false
+  }).then(() => {
+    showLoading()
+    const params={warehouse,container:containerNo.value}
+    finishTask(params).then(res=>{
+      showNotify({ type: 'success', duration: 3000, message: `解绑成功` })
+      scanSuccess()
+    }).catch(err=>{
+      scanError()
+    }).finally(() => {
+      closeLoading()
+    })
+  }).catch(() => {})
 }
 </script>
 <style scoped lang="sass">

+ 1 - 1
src/views/haikang/putaway/putaway/index.vue

@@ -151,7 +151,7 @@ const locationBarcodeBinList = ref([])
 const boxRef = ref(null)
 const _handlerScan = (code) => {
   if (scanType.value == 1) {
-    workBinNo.value = code
+    workBinNo.value =barcodeToUpperCase(code)
     showLoading()
     getShelveItemInfo({warehouse, boxCode: code, }).then(res => {
       if(res.data.length>0){