| | |
| | | <view> |
| | | <view class="code"> |
| | | <view class="item"> |
| | | <view class="code-decs">托盘码:</view> |
| | | <view class="code-decs">站点码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()"> |
| | | </view> |
| | |
| | | <view class="left-item">{{item.specs}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">批号:</view> |
| | | <view class="desc" style="width: 38%;">情况说明:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.batch" type="warning"></uni-tag> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">批号:</view> |
| | | <view class="popup-item-right"><input type="text" v-model="batch"></view> |
| | | <view class="popup-item-left" style="width: 20vw;">情况说明:</view> |
| | | <view class="popup-item-right" style="width: 46vw;"><input type="text" v-model="batch"></view> |
| | | </view> |
| | | <!-- <view class="popup-item"> |
| | | <view class="popup-item-left">重量:</view> |
| | |
| | | }, |
| | | // barcode input 事件 |
| | | barcodeInput() { |
| | | this.barcode = this.barcode.replace(/^\{|\}$/g, '') |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | | if (len != 8) { |
| | | if (len != 3) { |
| | | uni.showToast({ |
| | | title: '托盘码有误请重试', |
| | | icon: "none", |
| | |
| | | // 搜索物料 |
| | | findMat() { |
| | | let that = this |
| | | var mat = that.matnr |
| | | let submitMat |
| | | let newMatnr |
| | | if (mat.includes(';')) { |
| | | newMatnr = mat.split(';') |
| | | submitMat = newMatnr[1] |
| | | } else { |
| | | submitMat = mat |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mat/auth', |
| | | data: { |
| | | matnr: that.matnr |
| | | matnr: submitMat |
| | | }, |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |