| | |
| | | for (var i = 0; i < len; i++) { |
| | | if (mat.matnr == this.matList[i].matnr) { |
| | | if (mat.batch){ |
| | | if( mat.batch == this.matList[i].batch){ |
| | | if(mat.batch == this.matList[i].batch){ |
| | | this.matList[i].times +=1 |
| | | if (this.matList[i].anfme + mat.anfme <=this.matList[i].count){ |
| | | this.matList[i].anfme += mat.anfme |
| | | this.$forceUpdate() // 强制刷新 |
| | | add = false |
| | | } |
| | | }else{ |
| | | uni.showToast({title: '组托数量超过订单数量', icon: "none",position: 'top'}) |
| | | } |
| | | }else{ |
| | | if (this.matList[i].anfme + mat.anfme <=this.matList[i].count){ |
| | | this.matList[i].times +=1 |
| | | this.matList[i].anfme += mat.anfme |
| | | this.$forceUpdate() // 强制刷新 |
| | | add = false |
| | | }else{ |
| | | uni.showToast({title: '组托数量超过订单数量', icon: "none",position: 'top'}) |
| | | } |
| | | }else{ |
| | | this.matList[i].anfme += mat.anfme |
| | | this.$forceUpdate() // 强制刷新 |
| | | add = false |
| | | } |
| | | |
| | | } |