|
@@ -29,11 +29,15 @@
|
|
|
</template>
|
|
</template>
|
|
|
</van-field>
|
|
</van-field>
|
|
|
<van-field v-model="searchLocation" placeholder="请扫描库位" label="上架库位:" left-icon="" readonly :class="[scanType===4?'search-input-barcode':'']"
|
|
<van-field v-model="searchLocation" placeholder="请扫描库位" label="上架库位:" left-icon="" readonly :class="[scanType===4?'search-input-barcode':'']"
|
|
|
- autocomplete="off" @click="setBarcodeInput(searchLocation,4)"></van-field>
|
|
|
|
|
|
|
+ autocomplete="off" @click="setBarcodeInput(searchLocation,4)">
|
|
|
|
|
+ <template #button>
|
|
|
|
|
+ <div v-if="recommendedLocation" style="color:#666;font-size: 12px"><span style="font-size: 10px">推荐:</span>{{ recommendedLocation }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </van-field>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="putaway-button">
|
|
<div class="putaway-button">
|
|
|
- <van-button type="primary" size="small" block @click="setPutaway(2)" >提交上架</van-button>
|
|
|
|
|
|
|
+ <van-button type="primary" size="small" block :disabled="searchLocation!=recommendedLocation || searchLocation=='' " @click="setPutaway(2)" >提交上架</van-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="putaway-box" v-if="barcodeActive.bin">
|
|
<div class="putaway-box" v-if="barcodeActive.bin">
|
|
|
<div><box ref="boxRef" :box="{name:workBinNo,category:barcodeActive.gridCount}"></box></div>
|
|
<div><box ref="boxRef" :box="{name:workBinNo,category:barcodeActive.gridCount}"></box></div>
|
|
@@ -112,6 +116,8 @@ const count = ref('')
|
|
|
const countRef=ref(null)
|
|
const countRef=ref(null)
|
|
|
//上架库位
|
|
//上架库位
|
|
|
const searchLocation=ref('')
|
|
const searchLocation=ref('')
|
|
|
|
|
+//推荐库位
|
|
|
|
|
+const recommendedLocation=ref('')
|
|
|
const locationList = (data) => {
|
|
const locationList = (data) => {
|
|
|
return data.reduce((acc, item) => {
|
|
return data.reduce((acc, item) => {
|
|
|
const key = item.boxCode
|
|
const key = item.boxCode
|
|
@@ -198,6 +204,7 @@ const _handlerScan = (code) => {
|
|
|
searchBarcode.value = ''
|
|
searchBarcode.value = ''
|
|
|
count.value=''
|
|
count.value=''
|
|
|
searchLocation.value=''
|
|
searchLocation.value=''
|
|
|
|
|
+ recommendedLocation.value=''
|
|
|
tips.value = err.message
|
|
tips.value = err.message
|
|
|
barcodeActive.value={}
|
|
barcodeActive.value={}
|
|
|
showNotify({ type: 'danger', duration: 3000, message: err.message })
|
|
showNotify({ type: 'danger', duration: 3000, message: err.message })
|
|
@@ -216,27 +223,39 @@ const _handlerScan = (code) => {
|
|
|
})
|
|
})
|
|
|
locationScanBarcodeBinList.value = [...new Set(locationScanBarcodeBinList.value)]
|
|
locationScanBarcodeBinList.value = [...new Set(locationScanBarcodeBinList.value)]
|
|
|
barcodeActive.value =matchedBarcodeItem.value[0]
|
|
barcodeActive.value =matchedBarcodeItem.value[0]
|
|
|
- searchLocation.value=barcodeActive.value.locationId
|
|
|
|
|
|
|
+ recommendedLocation.value=barcodeActive.value.locationId
|
|
|
|
|
+
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
boxRef.value?.clearHigh()
|
|
boxRef.value?.clearHigh()
|
|
|
boxRef.value?.high(barcodeActive.value.gridNum || 1)
|
|
boxRef.value?.high(barcodeActive.value.gridNum || 1)
|
|
|
}, 300)
|
|
}, 300)
|
|
|
- scanType.value = 3
|
|
|
|
|
- count.value=1
|
|
|
|
|
|
|
+ scanType.value = 4
|
|
|
|
|
+ // count.value=1
|
|
|
// countRef.value?.focus()
|
|
// countRef.value?.focus()
|
|
|
- tips.value = `请输入上架数量`
|
|
|
|
|
|
|
+ tips.value = `请扫描上架库位`
|
|
|
scanSuccess()
|
|
scanSuccess()
|
|
|
} else {
|
|
} else {
|
|
|
count.value=''
|
|
count.value=''
|
|
|
searchBarcode.value = ''
|
|
searchBarcode.value = ''
|
|
|
searchLocation.value=''
|
|
searchLocation.value=''
|
|
|
|
|
+ recommendedLocation.value=''
|
|
|
barcodeActive.value={}
|
|
barcodeActive.value={}
|
|
|
tips.value = `${code}-商品条码不匹配,请重新扫描`
|
|
tips.value = `${code}-商品条码不匹配,请重新扫描`
|
|
|
showNotify({ type: 'danger', duration: 3000, message: `${code}-商品条码不匹配,请重新扫描` })
|
|
showNotify({ type: 'danger', duration: 3000, message: `${code}-商品条码不匹配,请重新扫描` })
|
|
|
scanError()
|
|
scanError()
|
|
|
}
|
|
}
|
|
|
}else if(scanType.value==4){
|
|
}else if(scanType.value==4){
|
|
|
- searchLocation.value = code
|
|
|
|
|
|
|
+ if(barcodeToUpperCase(code)!=barcodeToUpperCase(recommendedLocation.value)){
|
|
|
|
|
+ tips.value = `${code}-扫描库位与推荐库位不一致,请重新扫描`
|
|
|
|
|
+ showNotify({ type: 'danger', duration: 3000, message: `${code}-扫描库位与推荐库位不一致,请重新扫描` })
|
|
|
|
|
+ scanError()
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ searchLocation.value = barcodeToUpperCase(code)
|
|
|
|
|
+ scanType.value = 3
|
|
|
|
|
+ count.value=1
|
|
|
|
|
+ // countRef.value?.focus()
|
|
|
|
|
+ tips.value = `请输入上架数量`
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -312,6 +331,7 @@ const setPutaway=async (type)=>{
|
|
|
barcodeActive.value=''
|
|
barcodeActive.value=''
|
|
|
searchBarcode.value=''
|
|
searchBarcode.value=''
|
|
|
searchLocation.value=''
|
|
searchLocation.value=''
|
|
|
|
|
+ recommendedLocation.value=''
|
|
|
count.value=''
|
|
count.value=''
|
|
|
scanType.value = 2
|
|
scanType.value = 2
|
|
|
tips.value = `请继续扫描商品条码`
|
|
tips.value = `请继续扫描商品条码`
|
|
@@ -350,6 +370,7 @@ const setPutaway=async (type)=>{
|
|
|
workBinNo.value=''
|
|
workBinNo.value=''
|
|
|
searchBarcode.value=''
|
|
searchBarcode.value=''
|
|
|
searchLocation.value=''
|
|
searchLocation.value=''
|
|
|
|
|
+ recommendedLocation.value=''
|
|
|
scanType.value = 1
|
|
scanType.value = 1
|
|
|
}).catch(err=>{
|
|
}).catch(err=>{
|
|
|
closeLoading()
|
|
closeLoading()
|
|
@@ -377,6 +398,7 @@ const setGoBack=async (item)=>{
|
|
|
workBinNo.value=''
|
|
workBinNo.value=''
|
|
|
searchBarcode.value=''
|
|
searchBarcode.value=''
|
|
|
searchLocation.value=''
|
|
searchLocation.value=''
|
|
|
|
|
+ recommendedLocation.value=''
|
|
|
scanType.value = 1
|
|
scanType.value = 1
|
|
|
tips.value = `请扫描料箱编号`
|
|
tips.value = `请扫描料箱编号`
|
|
|
showNotify({ type: 'success', duration: 3000, message: `请扫描下一个料箱编号` })
|
|
showNotify({ type: 'success', duration: 3000, message: `请扫描下一个料箱编号` })
|
|
@@ -392,6 +414,7 @@ const setGoBack=async (item)=>{
|
|
|
workBinNo.value=''
|
|
workBinNo.value=''
|
|
|
searchBarcode.value=''
|
|
searchBarcode.value=''
|
|
|
searchLocation.value=''
|
|
searchLocation.value=''
|
|
|
|
|
+ recommendedLocation.value=''
|
|
|
scanType.value = 1
|
|
scanType.value = 1
|
|
|
tips.value = `请扫描料箱编号`
|
|
tips.value = `请扫描料箱编号`
|
|
|
scanError()
|
|
scanError()
|
|
@@ -403,6 +426,7 @@ const setGoBack=async (item)=>{
|
|
|
workBinNo.value=''
|
|
workBinNo.value=''
|
|
|
searchBarcode.value=''
|
|
searchBarcode.value=''
|
|
|
searchLocation.value=''
|
|
searchLocation.value=''
|
|
|
|
|
+ recommendedLocation.value=''
|
|
|
scanType.value = 1
|
|
scanType.value = 1
|
|
|
tips.value = `料箱调取成功,请继续扫描料箱编号`
|
|
tips.value = `料箱调取成功,请继续扫描料箱编号`
|
|
|
showNotify({ type: 'success', duration: 3000, message: `料箱调取成功,请继续扫描料箱编号` })
|
|
showNotify({ type: 'success', duration: 3000, message: `料箱调取成功,请继续扫描料箱编号` })
|