| | |
| | | <checkbox :value="item.id+''" :checked="item.checked" style="display: block;" /> |
| | | </label> |
| | | <view class="data-list-left"> |
| | | <view class="matnr"><text style="width: 700rpx;">编码:{{item.matnr}}</text></view> |
| | | <view class="matnr"><text style="width: 700rpx;">品号:{{item.matnr}}</text></view> |
| | | <view><text style="width: 700rpx;">品名:{{item.maktx}}</text></view> |
| | | <view><text style="width: 700rpx;">工序:{{item.sku}}</text></view> |
| | | <view><text style="width: 700rpx;">批号:{{item.batch}}</text></view> |
| | | <view> |
| | | <text style="width: 700rpx;">数量:{{item.anfme}}</text> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | commonUrl:null, |
| | | barcode: '', |
| | | barcodeFocus:true, |
| | | focus:false, |
| | |
| | | this.baseIP = UIP; |
| | | const UPORT = uni.getStorageSync('UPORT'); |
| | | this.basePORT = UPORT |
| | | const PROJ = uni.getStorageSync('UPROJ'); |
| | | this.baseUrl = PROJ |
| | | this.getUrl() |
| | | }, |
| | | methods: { |
| | | // 获取url |
| | | getUrl() { |
| | | this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl |
| | | }, |
| | | // barcode input 事件 |
| | | barcodeInput() { |
| | | var len = this.barcode.length |
| | |
| | | this.$refs.revise.open(type) |
| | | }, |
| | | initAnfme() { |
| | | |
| | | for (var i = 0; i < this.matList.length; i++) { |
| | | this.matList[i].anfme = 0 |
| | | } |
| | |
| | | } |
| | | uni.showLoading(); |
| | | uni.request({ |
| | | url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/comb/auth', |
| | | url: that.commonUrl + '/mobile/comb/auth', |
| | | data: JSON.stringify({ |
| | | orderNo: that.orderNo, |
| | | barcode: that.barcode, |
| | |
| | | findOrder() { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/order/search/orderNo/auth', |
| | | url: that.commonUrl + '/mobile/order/search/orderNo/auth', |
| | | data: { |
| | | orderNo: that.order |
| | | }, |
| | |
| | | 'token':uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | console.log("result:"); |
| | | console.log(result) |
| | | let res = result.data |
| | | if (res.code === 200) { |
| | | if(res.data) { |
| | | uni.showLoading(); |
| | | that.matList = res.data; |
| | | that.orderNo = that.order |
| | | that.initAnfme() |
| | | console.log(that.matList) |
| | | } |
| | | if (res.code === 200 && res.data) { |
| | | uni.showLoading(); |
| | | that.orderNo = that.order |
| | | // that.matList = res.data.map(item => ({ |
| | | // ...item, |
| | | // combMats: typeof item.combMats === 'string' ? |
| | | // JSON.parse(item.combMats) : item.combMats // 确保对象结构[1,2](@ref) |
| | | // })); |
| | | that.matList = res.data.combMats |
| | | that.initAnfme(); |
| | | |
| | | console.log("that.matList:"); |
| | | console.log(that.matList) |
| | | |
| | | } else if (res.code == 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | |
| | | } |
| | | .data-list { |
| | | border-bottom: 1px solid #d8d8d8; |
| | | height: 180rpx; |
| | | margin: 15rpx; |
| | | height: 210rpx; |
| | | margin: 15rpx auto auto auto; |
| | | border-radius: 20rpx; |
| | | } |
| | | .data-list:first-child { |