|
|
|
@ -293,7 +293,6 @@ export default { |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (targetLocation.length < 2) { |
|
|
|
this.$message.warning('目标货位格式不正确') |
|
|
|
if (this.$refs.locationInput) { |
|
|
|
@ -301,7 +300,6 @@ export default { |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 检查目标库位是否与源库位相同 |
|
|
|
if (this.transferMode === 'label' && targetLocation === this.labelInfo.locationId) { |
|
|
|
this.$message.warning('目标库位不能与当前库位相同') |
|
|
|
@ -310,7 +308,6 @@ export default { |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.transferMode === 'location' && targetLocation === this.scanCode.trim()) { |
|
|
|
this.$message.warning('目标库位不能与源库位相同') |
|
|
|
if (this.$refs.locationInput) { |
|
|
|
@ -318,19 +315,15 @@ export default { |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
const site = localStorage.getItem('site') |
|
|
|
const warehouseId = localStorage.getItem('selectedWarehouse') |
|
|
|
const operator = localStorage.getItem('userName') |
|
|
|
|
|
|
|
if (!site || !warehouseId || !operator) { |
|
|
|
this.$message.error('缺少必要参数,请重新登录') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
this.loading = true |
|
|
|
|
|
|
|
const params = { |
|
|
|
scanCode: this.scanCode.trim(), |
|
|
|
transferMode: this.transferMode, |
|
|
|
@ -341,9 +334,7 @@ export default { |
|
|
|
warehouseId: warehouseId, |
|
|
|
operator: operator |
|
|
|
} |
|
|
|
|
|
|
|
const { data } = await saveCrossAreaTransfer(params) |
|
|
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('调拨成功') |
|
|
|
this.resetForm() |
|
|
|
|