| | |
| | | </uni-table> |
| | | </view> |
| | | <view> |
| | | <button class="cu-btn bg-yellow pda-btn" @click="comb()">组托</button> |
| | | <button class="cu-btn bg-grey pda-btn" @click="reset">重置</button> |
| | | <button class="cu-btn bg-yellow pda-btn" @click="comb()">组 托</button> |
| | | <button class="cu-btn bg-grey pda-btn" @click="reset">重 置</button> |
| | | </view> |
| | | <view> |
| | | <!-- 提示信息弹窗 --> |
| | |
| | | rowNum:'', |
| | | value:'', |
| | | couChange:true, |
| | | baseIP:'', |
| | | |
| | | |
| | | } |
| | | }, |
| | | |
| | | mounted(){ |
| | | const UIP = uni.getStorageSync('UIP'); |
| | | this.baseIP = UIP |
| | | }, |
| | | methods: { |
| | | reset:function() { |
| | | this.billNo = ''; |
| | |
| | | } |
| | | if(billNo.indexOf('=')>-1){ |
| | | billNo = billNo.split(",")[0].split("=")[1]; |
| | | console.log(billNo) |
| | | } |
| | | if(billNo.length===0){ |
| | | return |
| | | } |
| | | this.matData = [] |
| | | uni.request({ |
| | | url:that.baseUrl+ "/mobile/bill/query/auth", |
| | | url: that.baseHttp + that.baseIP + that.baseUrl + "/mobile/bill/query/auth", |
| | | header: { |
| | | 'content-type':'application/x-www-form-urlencoded', |
| | | 'token': localStorage.getItem('token')}, |
| | | 'token':uni.getStorageSync('token')}, |
| | | data: { |
| | | billNo: billNo |
| | | }, |
| | |
| | | if(res.data.data != null){ |
| | | that.addTableData(res.data.data) |
| | | }else if(res.data.code === 403){ |
| | | |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }else { |
| | | |
| | | this.messageToggle('error') |
| | | this.messageText = res.data.msg |
| | | } |
| | | } |
| | | } |
| | |
| | | return; |
| | | } |
| | | uni.request({ |
| | | url:that.baseUrl+ "/mobile/comb/auth", |
| | | header: {'token': localStorage.getItem('token')}, |
| | | url: that.baseHttp + that.baseIP + that.baseUrl + "/mobile/comb/auth", |
| | | header: {'token':uni.getStorageSync('token')}, |
| | | data:{ |
| | | barcode:barcode, |
| | | combMats:that.matData, |
| | |
| | | }, |
| | | method:'POST', |
| | | success(res) { |
| | | |
| | | if(res.data.code === 200){ |
| | | that.reset() |
| | | that.matData = [] |
| | | that.messageToggle('success') |
| | | that.messageText = '组托成功' |
| | | } else if (res.data.code === 403) { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | } else { |
| | | this.messageToggle('error') |
| | | this.messageText = res.data.msg |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | onShow() { |
| | | // const query = uni.createSelectorQuery() |
| | | // console.log(prototype.placeholder) |
| | | } |
| | | } |
| | | </script> |