|
|
|
@ -136,7 +136,7 @@ |
|
|
|
<div class="col-no">NO.</div> |
|
|
|
<div class="col-material-code">物料编码</div> |
|
|
|
<div class="col-required-qty">需求数量</div> |
|
|
|
<div class="col-available-qty">可用数量</div> |
|
|
|
<div class="col-available-qty">出库数量</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="table-body"> |
|
|
|
@ -214,7 +214,6 @@ export default { |
|
|
|
site: localStorage.getItem('site'), |
|
|
|
buNo: this.buNo |
|
|
|
}; |
|
|
|
|
|
|
|
validateLabelWithReturn(params).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
// 检查是否已经扫描过 |
|
|
|
@ -223,16 +222,15 @@ export default { |
|
|
|
this.$message.warning('该标签已扫描,请勿重复扫描'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 添加到列表顶部(最后扫描的在最上面) |
|
|
|
this.labelList.unshift({ |
|
|
|
id: Date.now(), |
|
|
|
labelCode: labelCode, |
|
|
|
partNo: data.data.partNo, |
|
|
|
quantity: data.data.quantity, |
|
|
|
batchNo: data.data.batchNo |
|
|
|
batchNo: data.data.batchNo, |
|
|
|
locationId: data.data.locationId |
|
|
|
}); |
|
|
|
|
|
|
|
this.$message.success('操作成功'); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '该标签与退货单不符,请检查'); |
|
|
|
@ -260,7 +258,6 @@ export default { |
|
|
|
this.$message.warning('请先扫描标签'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const params = { |
|
|
|
site: this.returnInfo.site, |
|
|
|
buNo: this.returnInfo.buNo, |
|
|
|
@ -270,21 +267,21 @@ export default { |
|
|
|
labelCode: label.labelCode, |
|
|
|
partNo: label.partNo, |
|
|
|
quantity: label.quantity, |
|
|
|
batchNo: label.batchNo |
|
|
|
batchNo: label.batchNo, |
|
|
|
locationId: label.locationId |
|
|
|
})) |
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
confirmPurchaseReturn(params).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('退货成功'); |
|
|
|
this.$router.back(); |
|
|
|
this.$message.success('退货成功') |
|
|
|
this.$router.back() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '退货失败'); |
|
|
|
this.$message.error(data.msg || '退货失败') |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('退货失败:', error); |
|
|
|
this.$message.error('退货失败'); |
|
|
|
}); |
|
|
|
console.error('退货失败:', error) |
|
|
|
this.$message.error('退货失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 打印标签 |
|
|
|
|