| | |
| | | |
| | | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | eventChannel.on('matData', function(data) { |
| | | console.log(data); |
| | | that.matData = data.data |
| | | that.matData.anfme = that.matData.fullQty |
| | | }) |
| | |
| | | }, |
| | | findMat() { |
| | | let that = this |
| | | for (var i = 0; i < that.matList.length; i++) { |
| | | if (that.matnr == that.matList[i].matnr) { |
| | | uni.showToast({title: that.matnr + "当前物料提取,请勿重复扫描!", icon: "none",position: 'top'}) |
| | | setTimeout(()=>{ |
| | | that.matnr = ''; |
| | | that.focus = true; |
| | | }, 100); |
| | | return; |
| | | } |
| | | } |
| | | uni.request({ |
| | | url: that.commonUrl + '/mat/auth', |
| | | data: { |
| | |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | setTimeout(()=>{ |
| | | that.matnr = ''; |
| | | that.focus = true; |
| | | }, 100); |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | |
| | | // 添加商品 |
| | |
| | | var today = date.getFullYear() + '/' + (date.getMonth()+1) + '/' + date.getDate() |
| | | for (var i = 0; i < len; i++) { |
| | | if (mat.matnr == this.matList[i].matnr) { |
| | | this.matList[i].anfme += mat.anfme |
| | | uni.showToast({title: mat.matnr + "当前物料提取,请勿重复扫描!", icon: "none",position: 'top'}) |
| | | // this.matList[i].anfme += mat.anfme |
| | | this.$forceUpdate() // 强制刷新 |
| | | add = false |
| | | } |