| | |
| | | <!-- <view class="item"> |
| | | <view class="code-decs">物料码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()"> |
| | | <view class="item-right"> |
| | | <!-- <view class="item-right"> |
| | | <button></button> |
| | | <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text> |
| | | <uni-icons type="right" color="#c1c1c1"></uni-icons> |
| | | </view> |
| | | </view> --> |
| | | </view> --> |
| | | <!-- </view> --> --> |
| | | </view> |
| | | <view class="mat-list-title"> |
| | | 商品列表 |
| | |
| | | <view class="desc">数量:</view> |
| | | <view class="left-item">{{item.anfme}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">状态:</view> |
| | | <view class="left-item">{{item.review}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="list-right"> |
| | | <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons> |
| | |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">数量:</view> |
| | | <view class="popup-item-right" style="border: none;justify-content: center;"> |
| | | <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" /> |
| | | <uni-number-box :value="count" :step='0.001' :max="9999999" color="#747474" @change="changeValue" /> |
| | | </view> |
| | | </view> |
| | | <view class="btn"> |
| | |
| | | barcodeInput() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | | if (len != 8) { |
| | | uni.showToast({ |
| | | title: '托盘码有误请重试', |
| | | icon: "none", |
| | | position: 'top' |
| | | }); |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | | var len = this.barcode.length |
| | | this.focuss() |
| | | }, 200) |
| | | }, |
| | |
| | | let that = this |
| | | let m = that.matnr.split(";") |
| | | let matnr1 = m[0].slice(3) |
| | | uni.request({ |
| | | url: that.baseUrl + '/mat/auth', |
| | | data: { |
| | | matnr: matnr1 |
| | | }, |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | result = result.data |
| | | if (result.code === 200 && result.data) { |
| | | that.matData = result.data |
| | | that.matnr = '' |
| | | that.matData['batch'] = '' |
| | | uni.navigateTo({ |
| | | url: "../mat/matSelected", |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | success: function(res) { |
| | | res.eventChannel.emit('mat', { |
| | | data: result.data |
| | | }) |
| | | }, |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | events: { |
| | | matList: function(data) { |
| | | that.checkMat(data.data) |
| | | that.focuss() |
| | | }, |
| | | }, |
| | | }); |
| | | } else if (result.code == 403) { |
| | | uni.showToast({ |
| | | title: result.msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({ |
| | | title: result.msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | } |
| | | |
| | | for(var i = 0;i<that.dataList.length;i++){ |
| | | if(that.dataList[i].matnr === matnr1){ |
| | | that.dataList[i].review = "已复核" |
| | | } |
| | | }); |
| | | |
| | | } |
| | | setTimeout(() => { |
| | | this.matnr = ''; |
| | | }, 100); |
| | | // uni.request({ |
| | | // url: that.baseUrl + '/mat/auth', |
| | | // data: { |
| | | // matnr: matnr1 |
| | | // }, |
| | | // header: { |
| | | // 'token': uni.getStorageSync('token') |
| | | // }, |
| | | // success(result) { |
| | | // result = result.data |
| | | // if (result.code === 200 && result.data) { |
| | | // that.matData = result.data |
| | | // that.matnr = '' |
| | | // that.matData['batch'] = '' |
| | | // uni.navigateTo({ |
| | | // url: "../mat/matSelected", |
| | | // // 通过eventChannel向被打开页面传送数据 |
| | | // success: function(res) { |
| | | // res.eventChannel.emit('mat', { |
| | | // data: result.data |
| | | // }) |
| | | // }, |
| | | // // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | // events: { |
| | | // matList: function(data) { |
| | | // that.checkMat(data.data) |
| | | // that.focuss() |
| | | // }, |
| | | // }, |
| | | // }); |
| | | // } else if (result.code == 403) { |
| | | // uni.showToast({ |
| | | // title: result.msg, |
| | | // icon: "none", |
| | | // position: 'top' |
| | | // }) |
| | | // setTimeout(() => { |
| | | // uni.reLaunch({ |
| | | // url: '../login/login' |
| | | // }); |
| | | // }, 1000); |
| | | // } else { |
| | | // uni.showToast({ |
| | | // title: result.msg, |
| | | // icon: "none", |
| | | // position: 'top' |
| | | // }) |
| | | // } |
| | | |
| | | // } |
| | | // }); |
| | | |
| | | }, |
| | | selectMat() { |
| | |
| | | that.matnr = '' |
| | | }, |
| | | checkMat(mat) { |
| | | mat.review = "未复核" |
| | | var len = this.dataList.length |
| | | var add = true ,sameItem = false |
| | | for (var i = 0; i < len; i++) { |
| | |
| | | return; |
| | | } |
| | | for (var i = 0; i < that.dataList.length; i++) { |
| | | // if (that.dataList[i].review !== "已复核" ) { |
| | | // this.messageText = that.dataList[i].matnr + '未复核' |
| | | // this.messageToggle('error') |
| | | // return; |
| | | // } |
| | | if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') { |
| | | this.messageText = that.dataList[i].matnr + '组托数量不能为0' |
| | | this.messageToggle('error') |
| | | return; |
| | | } |
| | | } |
| | | |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/comb/auth', |
| | |
| | | width: 100%; |
| | | background-color: white; |
| | | position: fixed; |
| | | margin-top: 200rpx; |
| | | margin-top: 300rpx; |
| | | z-index: 9; |
| | | /* border-top: 1px solid #DCDFE6; */ |
| | | text-align: center; |