| | |
| | | fetchGoods() { |
| | | let that = this |
| | | setTimeout(() => { |
| | | if (that.barcode.length < 1) { |
| | | return |
| | | }else if (that.barcode.length != 8) { |
| | | this.messageToggle('error', '拖盘码为8位随机数字!!') |
| | | return |
| | | } |
| | | }, 500) |
| | | |
| | | this.getMatnrBybarcode() |
| | | that.getMatnrBybarcode() |
| | | }, 800) |
| | | },
|
| | | |
| | | /** |
| | | * 根据拖盘码拉取已组拖数据 |
| | | */ |
| | | getMatnrBybarcode() { |
| | | if (this.barcode.length < 1) { |
| | | return |
| | | } |
| | | if (this.barcode.length != 8) { |
| | | this.messageToggle('error', '拖盘码为8位随机数字!!') |
| | | return |
| | | } |
| | | let that = this |
| | | uni.request({ |
| | | url: that.baseUrl + '/pda/barcode/matnr/' + that.barcode, |
| | |
| | | if (result.code === 200) { |
| | | that.dataList = result.data |
| | | } |
| | | console.log(result) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | comb() {
|
| | | uni.vibrateShort();
|
| | | let that = this;
|
| | | this.$toast.loading('加载中...')
|
| | | uni.request({
|
| | | url: that.baseUrl + '/pda/matnr/in/barcode',
|
| | | data: JSON.stringify({
|
| | |
| | | 'token': uni.getStorageSync('token')
|
| | | },
|
| | | success(result) {
|
| | | that.$toast.hideLoading()
|
| | | var res = result.data
|
| | | if (res.code === 200) {
|
| | | that.resst(); |
| | | that.messageToggle('success', '上架成功!!')
|
| | | } else if (res.code == 403) {
|
| | | that.messageText = res.msg
|
| | |
| | | that.messageText = res.msg
|
| | | that.messageToggle('error')
|
| | | }
|
| | | |
| | | }, |
| | | fail() { |
| | | that.$toast.hideLoading() |
| | | }, |
| | | complete() { |
| | | that.resst() |
| | | }
|
| | | });
|
| | | },
|
| | |
| | | }, |
| | | |
| | | resst() { |
| | | this.dataList = [] |
| | | this.barcode = '' |
| | | this.locno = '' |
| | | }, |