| | |
| | | <view class="item"> |
| | | <view class="code-decs">托盘码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" |
| | | @confirm="barcodeInput()"> |
| | | @input="barcodeInput()"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">物料码:</view> |
| | |
| | | <uni-tag :text="item.batch" type="warning"></uni-tag> |
| | | </view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <!-- <view class="list-left-item"> |
| | | <view class="desc">重量:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.weight" type="warning"></uni-tag> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <view class="list-left-item"> |
| | | <view class="desc">数量:</view> |
| | | <view class="left-item">{{item.anfme}}</view> |
| | |
| | | <view class="popup-item-left">批号:</view> |
| | | <view class="popup-item-right"><input type="text" v-model="batch"></view> |
| | | </view> --> |
| | | <view class="popup-item"> |
| | | <!-- <view class="popup-item"> |
| | | <view class="popup-item-left">重量:</view> |
| | | <view class="popup-item-right"><input type="text" v-model="weight"></view> |
| | | </view> |
| | | </view> --> |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">数量:</view> |
| | | <view class="popup-item-right" style="border: none;justify-content: center;"> |
| | |
| | | rowNum: '', |
| | | matnr: '', |
| | | matnr1: '', |
| | | anfme: '', |
| | | batch: '', |
| | | weight: '', |
| | | msgType1: 'success', |
| | |
| | | this.msgType1 = type |
| | | this.$refs.message.open() |
| | | }, |
| | | barcodeInput() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | | if (len != 8) { |
| | | uni.showToast({ |
| | | title: '托盘码有误请重试', |
| | | icon: "none", |
| | | position: 'top' |
| | | }); |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | | this.focuss() |
| | | }, 200) |
| | | }, |
| | | // 托盘码有误重置 |
| | | barcodeFocuss() { |
| | | let that = this; |
| | | that.barcodeFocus = false; |
| | | setTimeout(() => { |
| | | that.barcode = ''; |
| | | that.barcodeFocus = true; |
| | | }, 100); |
| | | }, |
| | | // 商品光标清空重置 |
| | | focuss() { |
| | | this.matFocus = false; |
| | | setTimeout(() => { |
| | | this.matnr = ''; |
| | | this.matFocus = true; |
| | | }, 100); |
| | | }, |
| | | // 搜索物料 |
| | | findMat() { |
| | | let that = this |
| | | var matnr = that.matnr.split(";") |
| | | that.order = matnr[0] |
| | | that.matnr = matnr[1] |
| | | if (matnr[1]) { |
| | | that.order = matnr[0] |
| | | that.matnr = matnr[1] |
| | | if (matnr[2] === null) { |
| | | that.batch = '' |
| | | matnr[2] = '' |
| | | } |
| | | that.anfme = matnr[3] |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mat/auth', |
| | | data: { |
| | |
| | | }, |
| | | success(result) { |
| | | result = result.data |
| | | if (result.code === 200 && result.data) { |
| | | if (result.code === 200) { |
| | | if (result.data === null) { |
| | | uni.showToast({ |
| | | title: '无物料', |
| | | icon: "error", |
| | | position: 'top' |
| | | }) |
| | | that.focuss() |
| | | return |
| | | } |
| | | that.matData = result.data |
| | | that.matnr = '' |
| | | that.matData['batch'] = '' |
| | | // if (matnr[2] === null) { |
| | | // matnr[2] = '' |
| | | // } |
| | | result.data.batch = matnr[2] |
| | | that.matData['anfme'] = '' |
| | | if (matnr[2] === null) { |
| | | result.data.batch = '' |
| | | } |
| | | result.data.anfme = matnr[3] |
| | | uni.navigateTo({ |
| | | url: "../mat/matSelected", |
| | | // 通过eventChannel向被打开页面传送数据 |
| | |
| | | display: flex; |
| | | min-height: 80rpx; |
| | | background-color: #FFF; |
| | | margin: auto 20rpx; |
| | | padding: 10rpx; |
| | | margin: 30rpx 20rpx; |
| | | border-radius: 20rpx; |
| | | box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2); |
| | | } |
| | | .list:first-child { |
| | | margin-top: 410rpx; |
| | | margin-top: 340rpx; |
| | | } |
| | | .list:last-child { |
| | | margin-bottom: 120rpx; |