| | |
| | | <!-- <view><text style="width: 400rpx;">型号:{{item.model}}</text></view> --> |
| | | <view><text style="width: 400rpx;">批次:{{item.batch}}</text></view> |
| | | <view style="width: 500rpx;"><text>型号:{{item.model}}</text></view> |
| | | <view><text style="width: 400rpx;">库存状态:{{item.cstateid$}}</text></view> |
| | | <!-- <view><text style="width: 400rpx;">备注:{{item.memo}}</text></view> --> |
| | | <view> |
| | | <text style="width: 400rpx;">主数量:{{item.anfme}}</text> |
| | |
| | | let res = result.data |
| | | if (res.code === 200 && res.data) { |
| | | that.matData = res.data |
| | | |
| | | let tiaoma = that.matnr; |
| | | that.matnr = '' |
| | | uni.navigateTo({ |
| | | url: "matQuery", |
| | | events: { |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | matList: function(data) { |
| | | that.checkMat(data.data) |
| | | let resultData = data.data; |
| | | resultData.tiaoma = tiaoma; |
| | | that.checkMat(resultData) |
| | | // that.matList.push(data.data) |
| | | }, |
| | | }, |
| | |
| | | checkMat(mat) { |
| | | var len = this.matList.length |
| | | var add = true |
| | | // for (var i = 0; i < len; i++) { |
| | | // if (mat.matnr == this.matList[i].tiaoma){ |
| | | // uni.showToast({title: "条码重复扫了", icon: "none", position: 'top'}) |
| | | // } |
| | | // // if (mat.matnr == this.matList[i].matnr&&mat.batch == this.matList[i].batch&&mat.orderNo == this.matList[i].orderNo) { |
| | | // // this.matList[i].anfme += mat.anfme |
| | | // // this.$forceUpdate() // 强制刷新 |
| | | // // add = false |
| | | // // } |
| | | // } |
| | | for (var i = 0; i < len; i++) { |
| | | if (mat.tiaoma == this.matList[i].tiaoma){ |
| | | uni.showToast({title: "条码重复扫了", icon: "none", position: 'top'}) |
| | | add = false |
| | | } |
| | | // if (mat.matnr == this.matList[i].matnr&&mat.batch == this.matList[i].batch&&mat.orderNo == this.matList[i].orderNo) { |
| | | // this.matList[i].anfme += mat.anfme |
| | | // this.$forceUpdate() // 强制刷新 |
| | | // add = false |
| | | // } |
| | | } |
| | | if (add) { |
| | | this.matList.unshift(mat) |
| | | |