| | |
| | | } |
| | | } |
| | | |
| | | for (let item of that.matData) { |
| | | item['anfme'] = item.count |
| | | } |
| | | uni.request({ |
| | | url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/mobile/comb/auth", |
| | | header: {'token':uni.getStorageSync('token')}, |
| | | data:{ |
| | | barcode:barcode, |
| | | combMats:that.matData, |
| | | billNo: billNo, |
| | | }, |
| | | method:'POST', |
| | | success(res) { |
| | | if(res.data.code === 200){ |
| | | that.reset() |
| | | that.matData = [] |
| | | that.couChange=true |
| | | that.messageToggle('success') |
| | | that.messageText = '组托成功' |
| | | this.getFocus('firstFocus') |
| | | } else if(res.data.code === 403){ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | } else { |
| | | that.messageToggle('error') |
| | | that.messageText = res.data.msg |
| | | } |
| | | } |
| | | }) |
| | | return |
| | | // 一期的如下 |
| | | for (var i = 0; i < that.matData.length; i++) { |
| | | var sad = that.matData[i].qty - that.value |
| | | if (sad <= 5 && sad > 0) { |