| | |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()"> |
| | | <view class="item-right"> |
| | | <button></button> |
| | | <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text> |
| | | <!-- <text style="text-align: right;color: #409EFF;" @click="findMat()">提取+</text> --> |
| | | <uni-icons type="right" color="#c1c1c1"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="list-left-item"> |
| | | <view class="desc">No:</view> |
| | | <view class="left-item">{{i + 1}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">订单号:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.orderNo" type="primary"></uni-tag> |
| | | </view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">料号:</view> |
| | |
| | | baseUrl: '', |
| | | token: '', |
| | | barcode: '', |
| | | orderNo: '', |
| | | orderNo: null, |
| | | dataList: [], |
| | | count: 0, |
| | | rowNum: '', |
| | |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.orderNo.length |
| | | this.barcodeFocuss() |
| | | // this.barcodeFocuss() |
| | | }, 200) |
| | | }, |
| | | barcodeInput() { |
| | |
| | | // 搜索物料 |
| | | findMat() { |
| | | let that = this |
| | | // 判断物料长度是否为1 |
| | | // if (that.dataList.length >= 1) { |
| | | // this.messageText = "只能添加一种物料" |
| | | // this.messageToggle('warn') |
| | | // that.matnr = '' |
| | | // return |
| | | // } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mat/auth', |
| | | url: that.baseUrl + '/mobile/scan/order/mats', |
| | | method: 'POST', |
| | | data: { |
| | | orderNo: that.orderNo, |
| | | matnr: that.matnr |
| | | }, |
| | | header: { |
| | |
| | | }, |
| | | }, |
| | | }); |
| | | } else if (res.code == 403) { |
| | | } else if (result.code == 403) { |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | title: result.msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | title: result.msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | selectMat() { |
| | | let that = this |
| | | if (that.orderNo == null || that.orderNo == undefined ) { |
| | | that.messageText = '请填写订单编号!!' |
| | | that.messageToggle('error') |
| | | return; |
| | | } |
| | | |
| | | uni.navigateTo({ |
| | | url: "../mat/matQuery", |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的 |
| | | res.eventChannel.emit('commonUrl', { |
| | | commonUrl: '' |
| | | res.eventChannel.emit('orderNo', { |
| | | orderNo: that.orderNo |
| | | }) |
| | | }, |
| | | events: { |