|
@@ -5,18 +5,18 @@
|
|
|
<van-icon name="arrow-left" size="25" /><div style="color: #fff">返回</div>
|
|
<van-icon name="arrow-left" size="25" /><div style="color: #fff">返回</div>
|
|
|
</template>
|
|
</template>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
- <div class="nav-right" @click="setPutaway(1)">料箱回库</div>
|
|
|
|
|
|
|
+ <div class="nav-right" @click="setPutaway(1)">{{ boxLabel }}回库</div>
|
|
|
</template>
|
|
</template>
|
|
|
</van-nav-bar>
|
|
</van-nav-bar>
|
|
|
<div class="putaway">
|
|
<div class="putaway">
|
|
|
<div class="putaway-top">
|
|
<div class="putaway-top">
|
|
|
<div class="putaway-tips">
|
|
<div class="putaway-tips">
|
|
|
<div style="flex: 1"><van-notice-bar left-icon="volume-o">{{ tips }}</van-notice-bar></div>
|
|
<div style="flex: 1"><van-notice-bar left-icon="volume-o">{{ tips }}</van-notice-bar></div>
|
|
|
- <div class="putaway-tips-box" v-if="dataList.length>0">剩余料箱:{{ dataList[0].remainBoxCount || 0 }}</div>
|
|
|
|
|
|
|
+ <div class="putaway-tips-box" v-if="dataList.length>0">剩余{{ boxLabel }}:{{ dataList[0].remainBoxCount || 0 }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="putaway-input">
|
|
<div class="putaway-input">
|
|
|
<div class="code-input">
|
|
<div class="code-input">
|
|
|
- <van-field v-model="workBinNo" placeholder="请扫描料箱号" label="料箱编号:" left-icon="" :class="[scanType===1?'search-input-barcode':'']"
|
|
|
|
|
|
|
+ <van-field v-model="workBinNo" :placeholder="`请扫描${boxLabel}号`" :label="`${boxLabel}编号:`" left-icon="" :class="[scanType===1?'search-input-barcode':'']"
|
|
|
autocomplete="off" readonly @click="setBarcodeInput(workBinNo,1)"></van-field>
|
|
autocomplete="off" readonly @click="setBarcodeInput(workBinNo,1)"></van-field>
|
|
|
<van-field v-model="searchBarcode" placeholder="请扫描商品条码" label="商品条码:" left-icon="" readonly :class="[scanType===2?'search-input-barcode':'']"
|
|
<van-field v-model="searchBarcode" placeholder="请扫描商品条码" label="商品条码:" left-icon="" readonly :class="[scanType===2?'search-input-barcode':'']"
|
|
|
autocomplete="off" @click="setBarcodeInput(searchBarcode,2)"></van-field>
|
|
autocomplete="off" @click="setBarcodeInput(searchBarcode,2)"></van-field>
|
|
@@ -56,7 +56,7 @@
|
|
|
:cols="barcodeActive.containerCol"
|
|
:cols="barcodeActive.containerCol"
|
|
|
></shelf>
|
|
></shelf>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="font-size: 14px;" v-if="barcodeActive.gridNum" >料箱格口:{{ barcodeActive.gridNum }}</div>
|
|
|
|
|
|
|
+ <div style="font-size: 14px;" v-if="barcodeActive.gridNum" >{{ boxLabel }}格口:{{ barcodeActive.gridNum }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="putaway-bottom" v-if="equipmentBarcodeList.length>0">
|
|
<div class="putaway-bottom" v-if="equipmentBarcodeList.length>0">
|
|
@@ -104,7 +104,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { onMounted, onUnmounted, ref } from 'vue'
|
|
|
|
|
|
|
+import { computed, onMounted, onUnmounted, ref } from 'vue'
|
|
|
import { androidFocus, 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 { closeListener, openListener, scanInit } from '@/utils/keydownListener'
|
|
|
import { useStore } from '@/store/modules/user'
|
|
import { useStore } from '@/store/modules/user'
|
|
@@ -114,7 +114,7 @@ import InputBarcode from '@/views/outbound/picking/components/InputBarcode.vue'
|
|
|
import Box from '@/views/haikang/putaway/components/Box.vue'
|
|
import Box from '@/views/haikang/putaway/components/Box.vue'
|
|
|
import Shelf from '@/views/haikang/putaway/components/Shelf.vue'
|
|
import Shelf from '@/views/haikang/putaway/components/Shelf.vue'
|
|
|
import GoBoxBack from '@/views/haikang/putaway/components/GoBoxBack.vue'
|
|
import GoBoxBack from '@/views/haikang/putaway/components/GoBoxBack.vue'
|
|
|
-import { boxReturn, getShelveItemInfo, outboundEmptyBoxAndBindTask, setBoxInboundInventory } from '@/api/haikang'
|
|
|
|
|
|
|
+import { boxReturn,taskContinue, getShelveItemInfo, outboundEmptyBoxAndBindTask, setBoxInboundInventory } from '@/api/haikang'
|
|
|
import { closeLoading, showLoading } from '@/utils/loading'
|
|
import { closeLoading, showLoading } from '@/utils/loading'
|
|
|
import {useRoute} from "vue-router";
|
|
import {useRoute} from "vue-router";
|
|
|
try {
|
|
try {
|
|
@@ -133,12 +133,13 @@ const warehouse = store.warehouse
|
|
|
const dataList=ref([])
|
|
const dataList=ref([])
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
|
const mode=ref(route.query.type)
|
|
const mode=ref(route.query.type)
|
|
|
|
|
+const boxLabel = computed(() => mode.value ? '容器' : '料箱')
|
|
|
//料箱编号
|
|
//料箱编号
|
|
|
const workBinNo = ref('')
|
|
const workBinNo = ref('')
|
|
|
//扫描类型
|
|
//扫描类型
|
|
|
const scanType = ref(1) //料箱1、商品条码2,站台3
|
|
const scanType = ref(1) //料箱1、商品条码2,站台3
|
|
|
//提示
|
|
//提示
|
|
|
-const tips = ref('请扫描料箱编号')
|
|
|
|
|
|
|
+const tips = ref(mode.value ? '请扫描容器编号' : '请扫描料箱编号')
|
|
|
//匹配库位条码
|
|
//匹配库位条码
|
|
|
const matchedBarcodeItem=ref([])
|
|
const matchedBarcodeItem=ref([])
|
|
|
//条码
|
|
//条码
|
|
@@ -381,8 +382,8 @@ const reset=()=>{
|
|
|
const inputCheck=()=>{
|
|
const inputCheck=()=>{
|
|
|
if(!workBinNo.value){
|
|
if(!workBinNo.value){
|
|
|
scanType.value = 1
|
|
scanType.value = 1
|
|
|
- tips.value = `请扫描料箱编号`
|
|
|
|
|
- showNotify({ type: 'danger', duration: 3000, message: `请扫描料箱编号` })
|
|
|
|
|
|
|
+ tips.value = `请扫描${boxLabel.value}编号`
|
|
|
|
|
+ showNotify({ type: 'danger', duration: 3000, message: `请扫描${boxLabel.value}编号` })
|
|
|
scanError()
|
|
scanError()
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
@@ -447,23 +448,29 @@ const setPutaway=async (type)=>{
|
|
|
}else if(type==1){
|
|
}else if(type==1){
|
|
|
if(locationDetailList.value.length==0){
|
|
if(locationDetailList.value.length==0){
|
|
|
scanType.value = 1
|
|
scanType.value = 1
|
|
|
- tips.value = `请先扫描料箱编号`
|
|
|
|
|
- showNotify({ type: 'danger', duration: 3000, message: `请先扫描料箱编号,查询待上架信息` })
|
|
|
|
|
|
|
+ tips.value = `请先扫描${boxLabel.value}编号`
|
|
|
|
|
+ showNotify({ type: 'danger', duration: 3000, message: `请先扫描${boxLabel.value}编号,查询待上架信息` })
|
|
|
scanError()
|
|
scanError()
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- showConfirmDialog({
|
|
|
|
|
- title: '料箱回库',
|
|
|
|
|
- message: `${ workBinNo.value },是否执行料箱回库?`,
|
|
|
|
|
|
|
+ showConfirmDialog({
|
|
|
|
|
+ title: `${boxLabel.value}回库`,
|
|
|
|
|
+ message: `${ workBinNo.value },是否执行${boxLabel.value}回库?`,
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
showLoading()
|
|
showLoading()
|
|
|
const {container,asnCode,stationCode,locationId}=locationDetailList.value[0]
|
|
const {container,asnCode,stationCode,locationId}=locationDetailList.value[0]
|
|
|
- boxReturn({warehouse,container,boxCode:workBinNo.value,stationCode,locationId,externalCode:asnCode,taskType:mode.value?'ASRS':'HIK'}).then(res=>{
|
|
|
|
|
|
|
+ const apiCall = mode.value
|
|
|
|
|
+ ? boxReturn
|
|
|
|
|
+ : taskContinue
|
|
|
|
|
+ const params = mode.value
|
|
|
|
|
+ ? {warehouse,container,boxCode:workBinNo.value,stationCode,locationId,externalCode:asnCode,taskType:'ASRS'}
|
|
|
|
|
+ : {warehouse, boxCode: workBinNo.value, stationCode, externalCode: asnCode, emptyRobot: false}
|
|
|
|
|
+ apiCall(params).then(res=>{
|
|
|
closeLoading()
|
|
closeLoading()
|
|
|
scanSuccess()
|
|
scanSuccess()
|
|
|
- tips.value = `料箱回库成功,请继续扫描料箱编号`
|
|
|
|
|
- showNotify({ type: 'success', duration: 3000, message: `料箱回库成功,请继续扫描料箱编号` })
|
|
|
|
|
|
|
+ tips.value = `${boxLabel.value}回库成功,请继续扫描${boxLabel.value}编号`
|
|
|
|
|
+ showNotify({ type: 'success', duration: 3000, message: `${boxLabel.value}回库成功,请继续扫描${boxLabel.value}编号` })
|
|
|
reset()
|
|
reset()
|
|
|
barcodeActive.value={}
|
|
barcodeActive.value={}
|
|
|
workBinNo.value=''
|
|
workBinNo.value=''
|
|
@@ -488,7 +495,11 @@ const setGoBack=async (item)=>{
|
|
|
if(item.active==1){
|
|
if(item.active==1){
|
|
|
const {warehouse,container,boxCode,asnCode,stationCode,locationId}=barcodeActive.value
|
|
const {warehouse,container,boxCode,asnCode,stationCode,locationId}=barcodeActive.value
|
|
|
showLoading()
|
|
showLoading()
|
|
|
- const boxRes= await boxReturn({warehouse,container,boxCode,externalCode:asnCode,stationCode,locationId,taskType:mode.value?'ASRS':'HIK'}).catch(err=>{
|
|
|
|
|
|
|
+ const apiCall = mode.value ? boxReturn : taskContinue
|
|
|
|
|
+ const params = mode.value
|
|
|
|
|
+ ? {warehouse,container,boxCode,externalCode:asnCode,stationCode,locationId,taskType:'ASRS'}
|
|
|
|
|
+ : {warehouse, boxCode, stationCode, externalCode: asnCode, emptyRobot: false}
|
|
|
|
|
+ const boxRes= await apiCall(params).catch(err=>{
|
|
|
closeLoading()
|
|
closeLoading()
|
|
|
})
|
|
})
|
|
|
closeLoading()
|
|
closeLoading()
|
|
@@ -500,9 +511,9 @@ const setGoBack=async (item)=>{
|
|
|
searchLocation.value=''
|
|
searchLocation.value=''
|
|
|
recommendedLocation.value=''
|
|
recommendedLocation.value=''
|
|
|
scanType.value = 1
|
|
scanType.value = 1
|
|
|
- tips.value = `请扫描料箱编号`
|
|
|
|
|
|
|
+ tips.value = `请扫描${boxLabel.value}编号`
|
|
|
binScanList.value=[]
|
|
binScanList.value=[]
|
|
|
- showNotify({ type: 'success', duration: 3000, message: `请扫描下一个料箱编号` })
|
|
|
|
|
|
|
+ showNotify({ type: 'success', duration: 3000, message: `请扫描下一个${boxLabel.value}编号` })
|
|
|
scanSuccess()
|
|
scanSuccess()
|
|
|
}
|
|
}
|
|
|
}else if(item.active==2){
|
|
}else if(item.active==2){
|
|
@@ -518,7 +529,7 @@ const setGoBack=async (item)=>{
|
|
|
recommendedLocation.value=''
|
|
recommendedLocation.value=''
|
|
|
scanType.value = 1
|
|
scanType.value = 1
|
|
|
binScanList.value=[]
|
|
binScanList.value=[]
|
|
|
- tips.value = `请扫描料箱编号`
|
|
|
|
|
|
|
+ tips.value = `请扫描${boxLabel.value}编号`
|
|
|
scanError()
|
|
scanError()
|
|
|
}))
|
|
}))
|
|
|
closeLoading()
|
|
closeLoading()
|
|
@@ -531,8 +542,8 @@ const setGoBack=async (item)=>{
|
|
|
recommendedLocation.value=''
|
|
recommendedLocation.value=''
|
|
|
scanType.value = 1
|
|
scanType.value = 1
|
|
|
binScanList.value=[]
|
|
binScanList.value=[]
|
|
|
- tips.value = `料箱调取成功,请继续扫描料箱编号`
|
|
|
|
|
- showNotify({ type: 'success', duration: 3000, message: `料箱调取成功,请继续扫描料箱编号` })
|
|
|
|
|
|
|
+ tips.value = `${boxLabel.value}调取成功,请继续扫描${boxLabel.value}编号`
|
|
|
|
|
+ showNotify({ type: 'success', duration: 3000, message: `${boxLabel.value}调取成功,请继续扫描${boxLabel.value}编号` })
|
|
|
scanSuccess()
|
|
scanSuccess()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -561,7 +572,7 @@ const _setBoxInboundInventory = async () => {
|
|
|
//设置条码
|
|
//设置条码
|
|
|
const inputBarcodeRef = ref(null)
|
|
const inputBarcodeRef = ref(null)
|
|
|
const setBarcodeInput = (code, type) => {
|
|
const setBarcodeInput = (code, type) => {
|
|
|
- const typeMap = { 1: '请扫描料箱编号', 2: '请扫商品条码', 3: '请扫站台编号', 4: '请扫上架库位' }
|
|
|
|
|
|
|
+ const typeMap = { 1: `请扫描${boxLabel.value}编号`, 2: '请扫商品条码', 3: '请扫站台编号', 4: '请扫上架库位' }
|
|
|
scanType.value = type
|
|
scanType.value = type
|
|
|
inputBarcodeRef.value?.show(code, typeMap[type])
|
|
inputBarcodeRef.value?.show(code, typeMap[type])
|
|
|
}
|
|
}
|