|
|
@@ -20,7 +20,7 @@
|
|
|
<van-tab title="解绑站点" name="2" ></van-tab>
|
|
|
</van-tabs>
|
|
|
<div class="content-code">
|
|
|
- <div class="barcode-input" >
|
|
|
+ <div class="barcode-input" v-if="!(mode=='asrs' && active=='2')">
|
|
|
<van-search
|
|
|
ref="boxRef"
|
|
|
v-model.lazy="scanBox"
|
|
|
@@ -87,6 +87,14 @@ const mode=ref(route.query.type)
|
|
|
// 扫描条码监听
|
|
|
const _handlerScan = (code) => {
|
|
|
if(!code) return
|
|
|
+ // 当 mode=='asrs' 且是解绑站点功能时,直接扫描站点
|
|
|
+ if(mode.value=='asrs' && active.value=='2'){
|
|
|
+ if(code){
|
|
|
+ scanStation.value = barcodeToUpperCase(code)
|
|
|
+ onConfirm()
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
if (scanType.value == 1) {
|
|
|
let searchKey = barcodeToUpperCase(code);
|
|
|
const gridMatch = searchKey.match(/^([A-Z]+\d+)(?:-[AB]\d*)?$/);
|
|
|
@@ -112,14 +120,28 @@ const _handlerScan = (code) => {
|
|
|
}
|
|
|
}
|
|
|
const onActive=(type)=>{
|
|
|
+ // 切换到解绑站点且是asrs模式时,直接聚焦到站点输入框
|
|
|
+ if(mode.value=='asrs' && type=='2'){
|
|
|
+ scanType.value=2
|
|
|
+ tips.value='请扫描工作站台'
|
|
|
+ scanBox.value=''
|
|
|
+ }else if(type=='1'){
|
|
|
+ scanType.value=1
|
|
|
+ tips.value='请扫描料箱'
|
|
|
+ scanBox.value=''
|
|
|
+ scanStation.value=''
|
|
|
+ }
|
|
|
}
|
|
|
const onConfirm=()=>{
|
|
|
- if(!scanBox.value ){
|
|
|
- tips.value='请先扫描料箱编号'
|
|
|
- scanType.value=1
|
|
|
- showNotify({ type: 'danger', duration: 3000, message:'请先扫描料箱编号' })
|
|
|
- scanError()
|
|
|
- return
|
|
|
+ // 当 mode=='asrs' 且是解绑站点功能时,不需要校验料箱编码
|
|
|
+ if(!(mode.value=='asrs' && active.value=='2')){
|
|
|
+ if(!scanBox.value ){
|
|
|
+ tips.value='请先扫描料箱编号'
|
|
|
+ scanType.value=1
|
|
|
+ showNotify({ type: 'danger', duration: 3000, message:'请先扫描料箱编号' })
|
|
|
+ scanError()
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
if(!scanStation.value){
|
|
|
tips.value='请先扫描站点'
|
|
|
@@ -212,7 +234,10 @@ const _boxAndStationUnbindTask=()=>{
|
|
|
}
|
|
|
//立库解绑
|
|
|
const _asrsBoxAndStationUnbindTask=()=>{
|
|
|
- const data={warehouse, stationCode:scanStation.value,containerCode:scanBox.value}
|
|
|
+ const data={warehouse, stationCode:scanStation.value}
|
|
|
+ if(active.value!='2'){
|
|
|
+ data.containerCode = scanBox.value
|
|
|
+ }
|
|
|
showLoading()
|
|
|
asrsBoxAndStationUnbindTask(data).then(res=>{
|
|
|
if(res.data){
|