| | |
| | | 'token':uni.getStorageSync('token'), |
| | | }, |
| | | success(result) { |
| | | console.log('findBarcode:' + result.data); |
| | | let res = result.data; |
| | | if (res.code === 200) { |
| | | if (res.data.ioType === 101) { |
| | |
| | | }, 100); |
| | | return; |
| | | } |
| | | if (that.matCount == that.matList.length) { |
| | | uni.showToast({title: '请确认出库数量!', icon: "none",position: 'top'}) |
| | | return; |
| | | } |
| | | uni.request({ |
| | | url: that.commonUrl + '/mobile/pakout/confirm/pick/auth', |
| | | data: { |
| | |
| | | success(result) { |
| | | var res = result.data; |
| | | if(res.code === 200 ) { |
| | | if(res.data) { |
| | | if (that.matList.length == 0) { |
| | | that.matList.push(res.data) |
| | | var add = true |
| | | if(res.data) { |
| | | for(let i = 0;i < that.matList.length; i++) { |
| | | var matnr = that.matList[i].matnr + '-' + that.matList[i].batch |
| | | if (matnr === that.matnr) { |
| | | that.messageToggle('warn'); |
| | | that.messageText = '该商品已添加'; |
| | | that.foucss(); |
| | | add = false |
| | | } |
| | | } |
| | | if (add) { |
| | | that.matList.unshift(res.data); |
| | | that.listLen = that.matList.length; |
| | | that.foucss(); |
| | | return; |
| | | } |
| | | for(let i = 0;i<that.matList.length;i++) { |
| | | if (that.matList.length < that.matCount){ |
| | | if(JSON.stringify(that.matList[i]) === JSON.stringify(res.data)) { |
| | | that.messageToggle('warn'); |
| | | that.messageText = '该商品已添加'; |
| | | that.foucss(); |
| | | return; |
| | | } else { |
| | | that.matList.unshift(res.data); |
| | | that.listLen = that.matList.length; |
| | | that.foucss(); |
| | | return; |
| | | } |
| | | } else { |
| | | that.messageToggle('warn'); |
| | | that.messageText = '已出全部商品,请确认出库'; |
| | | that.foucss(); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } else if (res.code == 403) { |