|
@ -115,6 +115,7 @@ |
|
|
toLocation: null, |
|
|
toLocation: null, |
|
|
currentLabel: null, |
|
|
currentLabel: null, |
|
|
reScanItem: null, //重复的箱码 |
|
|
reScanItem: null, //重复的箱码 |
|
|
|
|
|
formlocationErpCode:"" |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
@ -238,7 +239,8 @@ |
|
|
this.showScanMessage('箱码【' + that.currentLabel.packingCode + '】在【原料库】【半成品库】未查询到库存信息'); |
|
|
this.showScanMessage('箱码【' + that.currentLabel.packingCode + '】在【原料库】【半成品库】未查询到库存信息'); |
|
|
} else if (res.totalCount === 1) { |
|
|
} else if (res.totalCount === 1) { |
|
|
let balanceItem = res.items[0]; |
|
|
let balanceItem = res.items[0]; |
|
|
this.createItem(balanceItem); |
|
|
this.checkItem(balanceItem); |
|
|
|
|
|
// this.createItem(balanceItem); |
|
|
} else { |
|
|
} else { |
|
|
this.$refs.balanceItems.openPopup(res.items); |
|
|
this.$refs.balanceItems.openPopup(res.items); |
|
|
} |
|
|
} |
|
@ -254,8 +256,24 @@ |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
checkItem(balanceItem){ |
|
|
|
|
|
if(this.itemList.length==0){ |
|
|
|
|
|
this.formlocationErpCode = balanceItem.locationErpCode; |
|
|
|
|
|
this.createItem(balanceItem) |
|
|
|
|
|
}else { |
|
|
|
|
|
if(this.formlocationErpCode==balanceItem.locationErpCode){ |
|
|
|
|
|
this.createItem(balanceItem); |
|
|
|
|
|
}else { |
|
|
|
|
|
this.showMessage('箱码【' + balanceItem.packingCode + '】的ERP储位【' + balanceItem.locationErpCode + |
|
|
|
|
|
'】与默认的ERP储位[' + this |
|
|
|
|
|
.formlocationErpCode + |
|
|
|
|
|
'】不是同一ERP储位'); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
createItem(balanceItem) { |
|
|
createItem(balanceItem) { |
|
|
|
|
|
|
|
|
let that = this; |
|
|
let that = this; |
|
|
let label = that.currentLabel; |
|
|
let label = that.currentLabel; |
|
|
let itemInfo = that.itemList.find(r => { |
|
|
let itemInfo = that.itemList.find(r => { |
|
@ -352,7 +370,8 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectedBalanceItem(balanceItem) { |
|
|
selectedBalanceItem(balanceItem) { |
|
|
this.createItem(balanceItem); |
|
|
// this.createItem(balanceItem); |
|
|
|
|
|
this.checkItem(balanceItem); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getToLocation(code) { |
|
|
getToLocation(code) { |
|
@ -373,7 +392,12 @@ |
|
|
if (res.type != 5) { |
|
|
if (res.type != 5) { |
|
|
this.showMessage('目标库位必须是【线边库】') |
|
|
this.showMessage('目标库位必须是【线边库】') |
|
|
} else { |
|
|
} else { |
|
|
this.toLocation = res; |
|
|
if(res.erpLocationCode!=this.formlocationErpCode){ |
|
|
|
|
|
this.showMessage('来源库位的ERP储位【'+this.formlocationErpCode+'】与目标库位ERP储位【'+res.erpLocationCode+'】不相等') |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.toLocation = res; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
@ -456,6 +480,7 @@ |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cancel() { |
|
|
cancel() { |
|
|
let that = this; |
|
|
let that = this; |
|
|