| | |
| | | // 判断添加的商品是否和已经添加的重复 |
| | | let dataList = this.dataList |
| | | this.index = index |
| | | let orderCount = this.dataList[index].stock |
| | | let locCount = this.dataList[index].anfme |
| | | let pickedAnfme = this.dataList[index].pickedAnfme |
| | | // 预计最大要出库 |
| | | let ftCount = pickedAnfme + orderCount |
| | | |
| | | if (this.dataList[index].stock > this.dataList[index].anfme) { |
| | | this.maxCount = this.dataList[index].anfme - this.dataList[index].pickedAnfme |
| | | if (orderCount > locCount) { |
| | | this.maxCount = locCount - pickedAnfme |
| | | } else { |
| | | this.maxCount = this.dataList[index].stock |
| | | if (ftCount > locCount) { |
| | | this.maxCount = locCount -pickedAnfme |
| | | } else { |
| | | this.maxCount = orderCount |
| | | } |
| | | |
| | | } |
| | | |
| | | this.$refs.addItem.open() |
| | | }, |
| | | addClose() { |