|
@@ -84,7 +84,6 @@
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
<div style="float:right;overflow: hidden;">
|
|
|
- <!-- <a-button size="small" id="salesEdit-dru">导入明细</a-button> -->
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
@@ -242,8 +241,10 @@ export default {
|
|
|
this.spinning = true
|
|
|
// 校验库存
|
|
|
stockByProductSn({ productSn: record.productSn }).then(res => {
|
|
|
- if (res.status == 200 && res.data) {
|
|
|
- if (res.data.currentStockQty != undefined && val > res.data.currentStockQty) {
|
|
|
+ if (res.status == 200) {
|
|
|
+ if (res.data && (!res.data.currentStockQty || val <= res.data.currentStockQty)) {
|
|
|
+ _this.changeQty(record)
|
|
|
+ } else {
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
|
content: '库存不足,确认添加为急件吗?',
|
|
@@ -257,8 +258,6 @@ export default {
|
|
|
_this.spinning = false
|
|
|
}
|
|
|
})
|
|
|
- } else {
|
|
|
- _this.changeQty(record)
|
|
|
}
|
|
|
} else {
|
|
|
this.spinning = false
|